diff --git a/.changeset/chat-turn-stable-identity.md b/.changeset/chat-turn-stable-identity.md new file mode 100644 index 000000000..6eb85c42d --- /dev/null +++ b/.changeset/chat-turn-stable-identity.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Reduce UI stutter while AI responses stream in long sessions. diff --git a/.changeset/icon-button-tooltips.md b/.changeset/icon-button-tooltips.md new file mode 100644 index 000000000..f94bb443c --- /dev/null +++ b/.changeset/icon-button-tooltips.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Add hover tooltips to icon-only buttons. diff --git a/.changeset/image-preview-margin.md b/.changeset/image-preview-margin.md new file mode 100644 index 000000000..5031e3632 --- /dev/null +++ b/.changeset/image-preview-margin.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Add breathing room around the fullscreen image preview so images no longer touch the screen edges. diff --git a/.changeset/media-preview-style-align.md b/.changeset/media-preview-style-align.md new file mode 100644 index 000000000..e194ebe64 --- /dev/null +++ b/.changeset/media-preview-style-align.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Unify the fullscreen image and video previews with a shared circular close button and the same background overlay. diff --git a/.changeset/sidebar-min-width.md b/.changeset/sidebar-min-width.md new file mode 100644 index 000000000..72a9e7acd --- /dev/null +++ b/.changeset/sidebar-min-width.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Widen the sidebar's minimum draggable width. diff --git a/.changeset/tool-media-lightbox.md b/.changeset/tool-media-lightbox.md new file mode 100644 index 000000000..b81bb6abb --- /dev/null +++ b/.changeset/tool-media-lightbox.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": minor +--- + +web: Image and video tool results now open in a fullscreen preview on click, with zoom support for images. diff --git a/.changeset/tooltip-bubble-lazy-mount.md b/.changeset/tooltip-bubble-lazy-mount.md new file mode 100644 index 000000000..82034b0a9 --- /dev/null +++ b/.changeset/tooltip-bubble-lazy-mount.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Reduce memory and CPU usage when the app stays open for a long time. diff --git a/.changeset/turnfold-unmount-collapsed.md b/.changeset/turnfold-unmount-collapsed.md new file mode 100644 index 000000000..c5c41a1a0 --- /dev/null +++ b/.changeset/turnfold-unmount-collapsed.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Reduce memory usage and stutter during long sessions. diff --git a/apps/kimi-code/dist-web/assets/CodeBlockNode-ZZ-0lk3E.js b/apps/kimi-code/dist-web/assets/CodeBlockNode-BAtAs_qm.js similarity index 99% rename from apps/kimi-code/dist-web/assets/CodeBlockNode-ZZ-0lk3E.js rename to apps/kimi-code/dist-web/assets/CodeBlockNode-BAtAs_qm.js index 5265af7e2..accf625fd 100644 --- a/apps/kimi-code/dist-web/assets/CodeBlockNode-ZZ-0lk3E.js +++ b/apps/kimi-code/dist-web/assets/CodeBlockNode-BAtAs_qm.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CTjtTfCD.js","assets/index-HRJ6xRtC.js","assets/index-vdPxBs-i.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-HRJ6xRtC.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-CTjtTfCD.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-DzfhniX8.js","assets/index-D-7nOosq.js","assets/index-DGHD7Bg9.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-D-7nOosq.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-DzfhniX8.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/kimi-code/dist-web/assets/DesignSystemView-BOD_23qT.js b/apps/kimi-code/dist-web/assets/DesignSystemView-BOD_23qT.js deleted file mode 100644 index cc3248dda..000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-BOD_23qT.js +++ /dev/null @@ -1,13 +0,0 @@ -import{M as T,aD as z,aI as q,aL as o,u as i,v as t,G as d,H as e,F as p,aX as w,bb as y,I as c,bk as f,cx as h,cy as B,cz as k,cA as A,cB as M}from"./index-HRJ6xRtC.js";const I={class:"ds-page"},V={class:"layout"},H={class:"content"},L={class:"content-inner"},E={id:"tokens"},D={class:"icon-sizes"},O={class:"sz"},W={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},R={class:"sz"},N={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},U={class:"sz"},P={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"icon-grid"},j={class:"icon-group-label"},K={class:"ic-name"},G={id:"primitives"},_={class:"stage-wrap"},J={class:"stage p"},Q={class:"p-pill",style:{color:"var(--p-warning)"}},Y={class:"stage-wrap"},Z={class:"stage p col"},X={class:"demo-row"},$={class:"p-btn primary disabled"},aa={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},ta={class:"stage-wrap"},da={class:"stage p col"},ea={class:"demo-row"},sa={class:"stage-wrap"},oa={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},ia={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},na={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ra={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ca={id:"chat"},va={class:"stage-wrap"},fa={class:"stage p col"},pa={style:{"max-width":"560px",width:"100%"}},ha={class:"stage-wrap"},ua={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ga={class:"p-composer",style:{width:"100%","max-width":"620px"}},ba={class:"p-composer-bar"},ma={class:"p-composer-left"},wa={class:"p-pill",style:{color:"var(--p-warning)"}},ya="/repo",ka=T({__name:"DesignSystemView",emits:["close"],setup(xa,{emit:x}){const C=[{path:"/repo/apps/web/src/components/chat/TurnFilesSummary.vue",added:19,removed:4,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/composables/useFilePreview.ts",added:8,removed:1,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/components/chatTurnRendering.ts",added:0,removed:0,hasWrite:!0,statsIncomplete:!0,diff:null},{path:"/repo/apps/web/src/lib/toolDiff.ts",added:3,removed:2,hasWrite:!1,statsIncomplete:!1,diff:null}];function u(){}const S=x;function g(){S("close")}let v=null;function b(r){r.key==="Escape"&&g()}return z(()=>{document.addEventListener("keydown",b);const r=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;r.forEach(l=>{const s=l.getAttribute("href");if(!s)return;const m=document.getElementById(s.slice(1));m&&a.set(m,l)});let n=null;v=new IntersectionObserver(l=>{l.forEach(s=>{s.isIntersecting&&(n&&n.classList.remove("active"),n=a.get(s.target)??null,n&&n.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((l,s)=>v.observe(s)),r.length&&r[0].classList.add("active")}),q(()=>{document.removeEventListener("keydown",b),v&&(v.disconnect(),v=null)}),(r,a)=>(o(),i("div",I,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:g},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",V,[a[44]||(a[44]=d('',1)),t("main",H,[t("div",L,[a[42]||(a[42]=d('
● Design System · v1.0

Kimi Web Design System

This document defines the visual language and component specification for Kimi 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/kimi-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. Kimi 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.

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",E,[a[7]||(a[7]=d(`
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 semantic tokens. Each ships a light value in :root and a dark override in the data-color-scheme blocks — for example --color-bg is #ffffff in light and #121212 in dark; --color-accent is the brand blue (#1783ff light / #1a88ff dark). The semantic status colors (success / warning / danger / info) are independent palettes, one set each for light / dark.
bg
#ffffff / #121212
surface
#f5f5f5 / #1f1f1f
surface-sunken
#f5f5f5 / #121212
well
#f5f5f5 / #1f1f1f
surface-deep
#f5f5f5 / #0d0d0d
surface-overlay
#ffffff / rgba(255,255,255,.1)
selected
rgba(0,0,0,.05) / rgba(255,255,255,.1)
fg
rgba(0,0,0,.9) / rgba(255,255,255,.84)
fg-muted
rgba(0,0,0,.6) / rgba(255,255,255,.56)
line
rgba(0,0,0,.13) / rgba(255,255,255,.12)
subtle
rgba(0,0,0,.05) / rgba(255,255,255,.05)
accent (KMBlue)
#1783ff / #1a88ff
accent-soft
#e8f3ff / rgba(26,136,255,.1)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#f5f5f5#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-menu-bgrgba(255,255,255,.95)rgba(41,41,41,.95)Floating menu panel — frosted glass over --p-menu-backdrop blur
--color-surface-overlay#ffffffrgba(255,255,255,.1)Field-control fill on raised cards (selects, steppers) — top rung; light tops out at white (the level is carried by the border), dark steps one rung above raised. Floating layers stay at raised
--color-well#f5f5f5#1f1f1fContent well on the page (code blocks, tool-output panels, match/file lists, media thumbnails) — light reuses the sunken recess; dark lifts one rung ABOVE the page, because a true recess (#121212) vanishes into the page there
--color-surface-deep#f5f5f5#0d0d0dDeep chrome plane one step BELOW the page (panel headers, diff gutters) — dark drops under --color-bg so chrome framing stays darker than the content it frames
--color-textrgba(0,0,0,.9)rgba(255,255,255,.84)Body text / headings
--color-text-strong#000000#ffffffMax foreground emphasis — menu-row label & icon on hover
--color-text-mutedrgba(0,0,0,.6)rgba(255,255,255,.56)Secondary text / placeholder
--color-linergba(0,0,0,.13)rgba(255,255,255,.12)Divider / card border
--color-subtlergba(0,0,0,.05)rgba(255,255,255,.05)Subtle hairline — tertiary separators below --color-line (diff-gutter column rules, quiet dividers inside wells)
--color-selectedrgba(0,0,0,.05)rgba(255,255,255,.1)Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hoverrgba(0,0,0,.03)rgba(255,255,255,.05)Row hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface. The global hover rule: transparent-base controls overlay this f1 wash (hover never darkens — never sunken); filled controls use their own hover token (accent-hover, send-bg-hover)
--color-inline-code-bgrgba(0,0,0,.03)rgba(255,255,255,.1)Inline-code chip fill — fills.f1 / fills.f2; dark lifts off any dark surface (sunken == bg there)
--color-media-alpha-bg-1≈#858585≈#76797eCheckerboard 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≈#8c8f93Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#f9fbfc#0d0d0dSidebar surface — one step off --color-bg (just under white in light, one step BELOW the page in dark) so the session column reads as its own plane and never brighter than the reading surface
--color-scrimrgba(0,0,0,.4)rgba(0,0,0,.6)Modal scrim — the dark veil behind dialogs/lightboxes (mask.base; legacy hardcoded overlays can migrate here)
--color-scrim-strongrgba(0,0,0,.6)rgba(0,0,0,.75)Stronger scrim for full-screen media previews (mask.strong — the PhotoSwipe image preview backdrop)
--color-text-on-scrim#ffffffsameText drawn on the scrim (captions over the media lightbox)
--color-accent#1783ff#1a88ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Palette

The palette is the production kimi.com palette (design tokens tokens.json): neutral-gray surfaces, an alpha-based label / fill / separator ramp (labels.* / fills.* / separator.s1), the KMBlue accent, and a true neutral dark ladder (#121212 → #1f1f1f → #292929; the deep chrome plane and sidebar derive one step below at #0d0d0d — the palette has nothing darker than primary).

The ONE deliberate exception is the status hues: success / warning / danger / done keep the app's own WCAG-tuned ramp (≥4.5:1 on the neutral surfaces) — the production status colours (positiveGreen #16c456, orange #ff9500, danger red #ff3849) are too bright against it. Diff add/del bands happen to coincide (both use the production 25% fills in light, 14% in dark).

Surface usage

The surface layers each have a role — choose by "field overlay / raised layer / content well / default flat layer / sunken layer / page background / deep chrome", and avoid treating --p-surface-raised as a universal background. In dark, elevation = lighter: floating layers sit above the content, content wells sit above the page, and chrome planes (sidebar, panel headers) sit below it — never the reverse. One consequence: on the page itself, never use --color-surface-sunken for a content carrier — it equals --color-bg in dark and the fill vanishes; use --color-well. Sunken stays correct INSIDE surface / raised cards, where it is a genuine recess. Field controls (selects, steppers) on a raised card use --color-surface-overlay, the top fill rung; floating layers keep --color-surface-raised — their elevation is shadow + hairline, not a lighter fill.

TokenLightDarkUsage
--p-surface-overlay#ffffff#22272eField controls on raised cards — select, stepper (top fill rung; light = white)
--p-surface-raised#ffffff#1c2128Raised card / dialog / input (raised layer)
--p-well#f3f5f8#13181eCode block / tool output / list carrier directly on the page (content well — light: recessed, dark: one rung above the page)
--p-surface#fafbfc#13181ePanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#0d1117Recessed area INSIDE a surface / raised card — never a content carrier on the page (sunken layer)
--p-bg#ffffff#0d1117Page background
--p-surface-deep#fafbfc#0a0d12Panel header / diff gutter (deep chrome layer — below the page in dark)

Borders & hairlines

Three line tokens, three jobs: --color-line is the default structural separator, --color-subtle the tertiary separator that must stay quieter (diff-gutter column rules, quiet dividers inside wells), and --color-line-strong the edge of interactive controls (inputs, selects, secondary buttons). Width is one: 0.5px — every stroke is the same hairline, on static structural edges (card rims, plane seams, header dividers), interactive control rims and floating layers alike. Separation comes from luminance first — planes one rung apart already read as distinct in dark, so their shared edge stays a 0.5px hairline rather than a heavier border; same-rung neighbours (list rows, card head / body) are exactly where a hairline is required. In dark, drop shadows fade on near-black surfaces, so a floating layer's edge IS its hairline — never ship a shadow-only floating surface. (Legacy --line / --line2 alias --color-line / --color-subtle for one cycle; new work references the v2 names.)

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

Kimi Web uses two font tokens: --font-ui (UI and body, with Schibsted Grotesk for Latin and Noto Sans SC for Simplified Chinese) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Schibsted Grotesk + Noto Sans SC)

Body and UI use self-hosted Schibsted Grotesk for Latin text and self-hosted Noto Sans SC Variable for Simplified Chinese. Platform fonts remain as fallbacks:

--font-ui
--font-ui: "Schibsted Grotesk Variable", "Helvetica Neue", Arial,
-      "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC",
-      "Microsoft YaHei",
-      -apple-system, BlinkMacSystemFont, "Segoe UI",
-      Roboto, Ubuntu, sans-serif,
-      "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";

--font-mono · Code & monospace

Code, line numbers, diffs, and Bash commands use JetBrains Mono (a self-hosted variable font), falling back to the system monospace. Other tool labels and summaries use the UI font:

--font-mono
--font-mono: "JetBrains Mono Variable", "JetBrains Mono",
-      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

Loading strategy

FontSourceBundledUsage
JetBrains Mono@fontsource-variable/jetbrains-mono✓ self-hostedmonospace / code (--font-mono)
Schibsted Groteskprepare-fonts → web-ui/assets/fonts✓ generated + bundledUI / body / display (--font-ui, --font-display), wght 400-900, normal + italic
Noto Sans SCprepare-fonts → web-ui/assets/fonts✓ generated + bundledSimplified Chinese UI / body, wght 100–900
System UI / CJK fontsoperating systemlate fallback for UI / body
Schibsted Grotesk, Noto Sans SC, and JetBrains Mono are self-hosted. They make no external network requests and work offline; platform fonts remain as fallbacks.

Usage rules

Type scale & weight

The user font-size preference is one of four named steps (small / medium / large / xlarge, Medium default) written to data-font-scale on <html>; the step name is persisted, never a px value. The step only moves --base-font; every size token derives additively (default + shift), and line heights are locked to integer px via round(size × ratio, 1px) — never a unitless ratio.

Two token groups share the shift but keep their own ratios: --ui-* for chrome (tight, 1.40–1.50) and --md-* for Markdown content + the composer (loose, 1.56–1.63; body is anchored to the UI body size — the spec's +2px offset was dropped as a product decision — while keeping its own looser line-height ratios). T0/T1 cap at 24/22px on the top steps (built into the tokens via min() — do not remove). Use the .text-ui-* / .text-md-* utility classes; legacy aliases --ui-font-size (→ --ui-b2), --content-font-size (→ --md-b1) and the whole 6-level --text-* ramp (xs→c1, sm→b2−1px, base→b2, lg→t2, xl→t1, 2xl→t0) keep older components on the ramp. Panel titles sit at the base step (--ui-b2); dropdown menu items sit one rung below (--text-sm = b2 − 1px) — both still follow the user's font scale.

Section Title
--ui-t1 · title (cap 22)
Card title
--ui-t2 · subtitle
UI emphasis
--ui-b1 · body strong
UI control / button / form
--ui-b2 · body
Helper text / table
--ui-c1 · caption
Badge / timestamp
--ui-c2 · non-critical only
Markdown H1
--md-h1
Chat body / message bubbles / composer
--md-b1 · prose body
Quote / table
--md-b2 · secondary
Code block / inline code
--md-b3 · weak / code

The fixed product type tokens still define scale-independent defaults: transcript prose enables text-autospace: normal for mixed CJK and Latin text. Drop stray font-weight: 650 / 750; converge on 400 / 500 (regular / emphasis), with a dedicated 600 weight for sidebar section labels.

TokenValueUsage
--font-ui"Schibsted Grotesk Variable", …, "Noto Sans SC Variable", …UI & body (Schibsted Grotesk + Noto Sans SC)
--font-kbd"Schibsted Grotesk Variable", system-ui, sans-serifkeyboard shortcut keycaps
--font-monoJetBrains Mono…code, Bash commands, line numbers, diffs
data-font-scalesmall / medium / large / xlargeuser preference on <html>; sets --base-font (12–18px), Medium = 14px default
--ui-t0…--ui-c2default + --ui-shift, t0/t1 capped via min()chrome type ramp (title / subtitle / body / caption); .text-ui-* classes
--md-h1…--md-b3default + --md-shiftMarkdown ramp (headings / body / secondary / code); .text-md-* classes
--ui-font-size / --content-font-sizevar(--ui-b2) / var(--md-b1)legacy aliases kept on the ramp
--code-font-sizecalc(var(--content-font-size) - 2px)standalone code surfaces (diff view, file preview, tool cards) — one step below body, 12px @ Medium; prose-embedded code stays on the --md-* ramp
--text-xs / sm / base / lg / xl / 2xlc1 / b2−1 / b2 / t2 / t1 / t0legacy ramp, aliased into the scale
--leading-tight/normal/prose/relaxed1.25 / 1.5 / 1.6 / 1.7headings / UI / chat prose / long text
--weight-regular/option-label/medium/ui-strong400 / 475 / 500 / 525body / settings labels / emphasis / compact UI emphasis
--weight-section-label600sidebar section labels

Icon size

Icons use three size tokens uniformly. The global .p-ic default is 16px (--p-ic-md); components pick as needed, and random pixel sizes are forbidden.

TokenValueUsage
--p-ic-sm14pxsmall button, badge, menu item, inline link icon
--p-ic-md16pxdefault (button, icon button, toolbar)
--p-ic-lg20pxToast status icon, empty-state illustration

Icon

Icons always come from the centralized registry lib/icons.ts: in templates use the <Icon name size /> component (components/ui/Icon.vue); for v-html contexts (such as a tool glyph) use iconSvg(name, size). Do not hand-write <svg> — the scripts/check-style.mjs icon-from-registry rule flags stray SVGs. Every glyph shares the 24×24 source grid and currentColor (colour follows text); size uses the three tokens below, and only icons imported in lib/icons.ts are bundled by unplugin-icons at build time. Three collections feed the registry, in this order of preference: ~icons/kimi/* — Kimi Design System icons (24×24 outlined, 1.8px stroke), local SVGs under src/icons/kimi/ registered as a custom collection in the Vite config, used whenever a Kimi glyph exists for the intent; ~icons/tabler/* — Tabler Icons (MIT), for the few gaps it uniquely covers (today: the right-panel toggle); and ~icons/ri/*Remix Icon (Apache-2.0), for the remaining intents the Kimi set does not cover yet. A few glyphs are filed under their intent rather than the upstream asset name (see the lib/icons.ts header). When an icon is missing, prefer a glyph from the Kimi icon set: copy the SVG into src/icons/kimi/ (kebab-case name, monochrome currentColor) and register it — two static imports (component + ?raw string) plus one entry in ICONS; reach for Remix only when no Kimi glyph fits, and never draw paths in a component.

Size scale

`,49)),t("div",D,[t("div",O,[(o(),i("svg",W,[...a[1]||(a[1]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[2]||(a[2]=e("sm · 14",-1))]),t("div",R,[(o(),i("svg",N,[...a[3]||(a[3]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[4]||(a[4]=e("md · 16",-1))]),t("div",U,[(o(),i("svg",P,[...a[5]||(a[5]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[6]||(a[6]=e("lg · 20",-1))])]),a[8]||(a[8]=t("h4",{class:"mini"},"Icon library",-1)),a[9]||(a[9]=t("p",null,[e("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),t("code",null,"ICON_GROUPS"),e(" in "),t("code",null,"lib/icons.ts"),e(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),t("div",F,[(o(!0),i(p,null,w(f(B),([n,l])=>(o(),i(p,{key:n},[t("div",j,y(n),1),(o(!0),i(p,null,w(l,s=>(o(),i("div",{key:s,class:"icon-cell"},[c(f(h),{name:s},null,8,["name"]),t("span",K,y(s),1)]))),128))],64))),128))]),a[10]||(a[10]=d('

Do not use emoji as functional icons. The Kimi brand mark (the robot mascot logo) is a brand asset and is not part of this icon system.

A few special graphics are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <ContextRing :pct /> (the Composer context progress ring, data-driven), <AuthStateIcon kind /> (the success / expired / error colored illustrations in the login flow), <Spinner /> (loading state). Status dots (such as in the Provider list) always use CSS dots (border-radius:50%), not SVG. The scripts/check-style.mjs icon-from-registry rule exempts the above and the brand mark; all other hand-written <svg> is flagged.

Spacing

A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.

--space-1 · 4
icon gap, badge padding
--space-2 · 8
control gap, small padding
--space-3 · 12
button padding, form-item gap
--space-4 · 16
card padding, grid gap
--space-5 · 20
dialog padding
--space-6 · 24
section gap
--space-8 · 32
large section gap

Dense list (sidebar / file tree)

High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: in-row vertical padding --space-1 (4px), no margin between rows (the hover pill provides the separation); section gap (between logo / search / action buttons / group title / list) uniformly --space-2 (8px); between groups --space-2; the brand header is slightly looser at the top (--space-3). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.

Radius

Merge the existing 14 values into the nearest of 7 scale steps. Rule: the component type determines the radius, not the author's feel. The Composer shell is the sole product-specific exception: its 32px radius pairs with superellipse(1.5) so the flatter curve stays visually concentric with its controls.

xs · 4
sm · 6
md · 8
lg · 12
xl · 16
2xl · 20
composer · 32 / 1.5
full · 999
TokenValueUsageMerged from
--radius-xs4pxsmall badge, inline tag2/3/4px →
--radius-sm6pxsmall button, icon button, menu item5/6px →
--radius-md8pxbutton, input, badge, card7/8/9px →
--radius-lg12pxmenu, toast, bubble, floating card10/12px →
--radius-xl16pxcontainer baseline: dialogs, settings cards, sheets, work panel13/16px →
--radius-2xl20pxworkspace attachment card bottom (0 0 2xl 2xl) tucked under the composer18/20px →
--radius-composer32pxComposer shell, with --corner-shape-composerproduct-specific
--radius-full999pxpill badge, avatar, send button999px / 50%

Elevation & z-index

Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating 9999-style one-upping.

sm · dropdown menu / sticky
md · Toast
lg · overlay (reserved)
xl · dialog
Z-index TokenValueUsage
--z-base0normal flow
--z-sticky100sticky header / sidebar
--z-dropdown200dropdown menu / tooltip
--z-overlay300overlay / bottom Sheet
--z-modal400dialog — sibling overlays tie-break by DOM order, so the global confirm (ConfirmDialogHost) mounts on demand to always land last / on top
--z-modal-dropdown500menus / popovers that open above a modal dialog (teleported to <body>, e.g. the settings SecondaryModelPicker cascade)
--z-toast600toast
--z-max9999reserved: only this tier for extreme fallback

Motion

TokenValueUsage
--ease-outcubic-bezier(0.16, 1, 0.3, 1)enter, hover, expand
--ease-in-outcubic-bezier(0.4, 0, 0.2, 1)panel width, layout changes
--duration-fast120mspress, focus
--duration-base160mshover, show/hide
--duration-slow260msdialog, Sheet, layout
--duration-hover-intent250mshover-intent reveal gate (TOC rail)
--anim-rive-spin416.7msnew-chat / folder-plus icon: plus spin on hover
--anim-leftbar533.3mssidebar toggle icon: arrow fly-in on hover
--anim-leftbar-shrink200mssidebar toggle icon: divider shrink on hover

The --anim-* lengths are track timings ported verbatim from the designer's Rive exports, so they sit outside the --duration-* ramp on purpose — retiming the ramp must not distort them. Their interpolation stays linear because the easing is already baked into the dense keyframe stops; a token easing would double-apply. Three hover tracks use them today: the sidebar toggle shrinks its divider to half height while an arrow flies in and settles (the expand variant mirrors the track from the left), and the new-chat / folder-plus pluses do one bouncy spin. Each track is keyed to an id inside its own glyph (#bar-divider, #bar-arrow / #bar-arrow-expand, #p1, #af-p1) so every instance of the icon animates, and all revert on mouse-out. They still fall under the global reduced-motion switch below.

Reduced motion

i
Under @media (prefers-reduced-motion: reduce), all animation and transition durations drop to about 0.001ms (effectively off), and the chat working indicator's mascot renders its static fallback instead of the Rive loop. Components should not check this individually; it is handled uniformly in the global styles. The switch clears durations, not transition-delay: a hover-intent gate (the conversation TOC's 250ms reveal) decides whether hidden content appears, and clearing it would make pointer fly-bys strobe content for reduced-motion users.

Layout & breakpoints

Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.

TokenValueUsage
--p-sidebar-w264pxleft session sidebar width
--p-content-max760pxchat reading-column max width (regular chat prose)
--p-content-wide920pxwide content (settings / panel)
--p-table-max1040pxdesktop wide-table max width (see §04)
--p-table-cell-max700pxmax width of a single table column; longer cell content wraps (see §04)
--p-bp-sm640pxmobile / desktop boundary
--p-bp-md980pxnarrow / wide screen boundary
i
At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap.
',24))]),t("section",G,[a[27]||(a[27]=d(`
03

Primitives

Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — variant / size — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors.

i
For every interactive primitive, the keyboard behavior, focus, and ARIA contract are in §08 Accessibility. New primitives must ship with a keyboard model — mouse-only interaction is not enough.

Component selection guide

ScenarioUse
Primary action (submit / confirm)Button variant=primary
Secondary action / cancelButton secondary / ghost
Destructive action (delete / abort)Button danger / danger-soft
Status markerBadge
Toolbar filter / model switchPill
2–5 mutually exclusive optionsSegmentedControl
Top tabsTabs
Switch / multi-selectSwitch / Checkbox
Scrollable regions with overlay controlsScrollArea
Floating content card / list action menuCard / Menu
Inline notice / global toastBanner / Toast
Dialog / confirmation · bottom panel (mobile)Dialog / Sheet

Button

4 semantic variants × 3 sizes. The primary action primary takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses --radius-md uniformly (small size --radius-sm), weight 600, with a visible focus ring.

Variant matrix lightpreview
medium · default
small
With icon / state
Dark skin dark

API

Button.vue · usage
<Button variant="primary" size="md" :loading="submitting">Save</Button>
-    // variant: primary | secondary | ghost | danger | danger-soft
-    // size:    sm | md | lg
States

IconButton

Unified into three sizes — 26 / 32 / 44px — with the neutral --color-hover wash on hover and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.

IconButton
i
The desktop IconButton comes in sm 26 / md 32; on touch devices the tap target should be ≥ 44px, so use lg 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses lg).

Badge · Chip · Pill

Collapsed into two kinds: Badge (status badge, with an optional status dot) and Pill (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.

Badge · status badge
Semantic variants
pendingrunningcompletedneeds confirmationfailedKIMI
With icon / small size
planpassedread-only
`,19)),t("div",_,[a[14]||(a[14]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),t("div",J,[a[12]||(a[12]=d('kimi-k2· thinking',1)),t("span",Q,[c(f(h),{name:"shield-question",size:"sm"}),a[11]||(a[11]=e("yolo",-1))]),a[13]||(a[13]=t("span",{class:"p-pill"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("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"})]),e("12k / 200k")],-1))])]),a[28]||(a[28]=d(`

Kbd · keyboard shortcut

Kbd renders a shortcut as keycaps — one block per key, never inline text like (⌘K). Caps are 18px tall (Badge sm rhythm): transparent ground with a 0.5px hairline edge, 11px --font-kbd (Inter + system-ui), text colour inherited from the row that carries it — the cap has no fill or colour of its own, so it follows its context (bright inside the accent-ringed recording box, quiet in a hint row). Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row), and inside dialog navigation hints.

Kbd · keycaps
KCtrlKP

Card / Surface

All cards across the site share one structurehead / body / foot — and come in two tiers by visual weight:

Operation card · compact mono head (no fill)
read_filesession.ts
The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the Swarm composite card.
Attention card · floating neutral surface (no color band)
A decision needs your confirmation
A floating neutral card — no color band. The raised surface, large radius and soft shadow lift it above the transcript; the head is a plain dark title, and the hairline footer lines up quiet text buttons leading to one solid primary action.
Activity run · a summary row expands into the folded lines
Read 2 files
Readsession.tssrc/auth34 lines
Readmiddleware.tssrc/auth58 lines

Input / Select / Textarea

Unified 38px height (32px small), --radius-md radius, --color-surface-overlay background, and a unified blue focus ring (0 0 0 3px accent-soft). Select is a custom combobox and listbox, not a native <select>; opening it centres the selected option in the scrollable menu. Open Select roots enter the dropdown layer; containing settings groups temporarily release clipping and join that layer so later sections cannot cover the menu.

Form primitives
Only letters, numbers, and hyphens are allowed.
States
Please enter a valid workspace name
Normal state · validation passed

Code / Diff

Diff controls: The non-selectable branch summary starts with a 14px branch icon, aligns to the panel header's 12px inset, uses 12px labels, and ends with a 0.5px hairline. List and tree choices use the 14px list and tree-view registry icons. Flat-list and tree-view paths use the UI font at 12px. Tree roots share the flat list's 14px content inset, then each depth advances by 12px and adds a grey indentation rule.

Diff empty state: Centre the clean-workspace message in the available panel height and lead with a quiet 32px status icon.

Diff detail body: the right-side diff detail reuses HighlightedCode unframed (the panel owns the edge and scroll) — shiki highlighting with the language inferred from the file path, an old/new line-number gutter, hunk headers as a muted band, at the shared code size --code-font-size (12px at Medium, one step below body text). The file preview's code body (text / JSON / HTML and Markdown source) renders through the same component with a per-row number gutter plus search-hit / jump-target row states.

Inline code, code blocks, and diff contents use the monospace font (--p-font-mono); diff change counts and branch summaries use the UI font. Code blocks have a filename title bar and a copy button; the action edge uses a compact 6px inset. Diffs use + / - row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.

Code / Diff
inline code
The server uses jwt.verify(token) to verify the signature, returning 401 on failure.
code block
session.ts
import { verify } from './jwt';
-
-    export function auth(token: string) {
-      return verify(token, process.env.JWT_SECRET!);
-    }
diff
session.ts · +3 -1
import { verify } from './jwt';
-const secret = 'dev-secret';
+const secret = process.env.JWT_SECRET!;
return verify(token, secret);

Dialog

One dialog primitive replaces 6 hand-written implementations: unified --radius-xl radius, --shadow-xl shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.

Dialog primitive
New chat
Create an independent Agent chat in the current workspace.
i
Size & height: Dialog offers three widths — md 440 / lg 640 / xl 760 (--p-content-max) — chosen by content weight. Height comes in two kinds: auto (default, grows with content up to max-height) and fixed (constant height min(680px, 100vh - 64px), with overflow scrolled inside the body). Content / multi-tab dialogs (settings, model picker, provider manager, folder browser) always use fixed so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep auto. Selectable controls inside Settings use 0.5px hairlines. Its navigation stays transparent on the grouped canvas — separated from the content region by the 0.5px hairline (horizontal in the stacked mobile layout) — and uses 12px labels at weight 525 with 16px registry icons; the selected tab paints the same neutral --color-hover wash as hover, with the label simply brightening to --color-text — the Kimi app settings nav's recipe (.ss-nav-item--activeFills-F1, no accent tint, no weight change); section captions use 16px UI text in --color-text. Every setting row has a plain-language description; option labels use --color-text at weight 475 with a 1px gap before that description. Chinese descriptions use “思考” and “计划模式” rather than the English terms; “skills” stays lowercase when it appears within a sentence. Every settings section puts its rows inside one rounded group with 0.5px dividers; the content region paints the flat --color-surface so each group (--color-surface-raised) reads one rung above it — never a sunken pit, which would sink the dialog's content below its chrome in dark. The font-size stepper is a compact 32px UI-font control with 12px values and custom minus and plus buttons. Its 52px desktop row centres the control with equal space above and below. Archived workspace headings reuse the sidebar’s folder-closed registry icon, and Restore actions lead with the undo icon. Archive counts use weight 500; timestamps and workspace paths use the UI font.

Dialog backdrop: Use a restrained 28% neutral overlay so the workspace remains legible without competing with the modal.

Settings regions: The settings title and close action belong to the right content region. The navigation is a separate full-height region that starts at the dialog's top edge, not content beneath a dialog-wide header.

Archived sessions: Start with the localized page title. Do not add a repeated English kicker above it.

Settings interaction: Notification labels and descriptions are not selectable; their switches remain fully interactive.

Conversation chrome: Header labels are not selectable; the rename input remains selectable and editable. Branch names start with a 14px branch icon. The overflow trigger is a compact 24px control with a 14px icon. Below a 720px header container, hide the workspace prefix and give the conversation title the available width. On macOS desktop the header doubles as the window-drag region and interactive controls opt out with no-drag; while one of its menus or a dock work panel is open every window-drag strip (chat header, sidebar header, panel header) drops the drag region so an outside press anywhere reaches the page and dismisses the overlay (window dragging is simply paused).

Session search: follows the §09 flush picker anatomy — a boxed Input under the head, and a result list that fills the body's available height and owns vertical scrolling.

Model picker: follows the §09 flush picker anatomy; the provider filter remains horizontally scrollable without showing a persistent scrollbar. Only the model list scrolls; the shortcut bar remains pinned at the bottom.

Toast

Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise. For an undoable action there is a second, lighter form — the Action toast (ActionToast.vue): a pill floating top-center just below the 48px header, carrying a one-line sentence whose actions are plain inline <button>s (styled accent by the component), plus close. Self-timed (default 8s, hover pauses); the parent re-keys to reset and wraps it in a <Transition>. First used by session archive (Undo / Settings); warnings keep the bottom-right Toast stack.

Toast
Connected to server
The local server is responding normally; you can start a new chat.
Context usage 82%
Consider running /compact to free up space.
Action toast
or view archived chats in

Spinner

Loaders fall into two categories by scenario — do not mix them:

Spinner · plain loader (default)

`,39)),t("div",Y,[a[18]||(a[18]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Spinner · common scenarios")],-1)),t("div",Z,[t("div",X,[a[17]||(a[17]=d('Loading…',2)),t("button",$,[(o(),i("svg",aa,[...a[15]||(a[15]=[t("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),t("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),a[16]||(a[16]=e("Submitting",-1))])])])]),a[29]||(a[29]=t("h4",{class:"mini"},"WorkingIndicator · 小蓝 mascot (only the chat working state)",-1)),t("div",ta,[a[20]||(a[20]=t("div",{class:"stage-bar"},[t("span",{class:"st"},[e("WorkingIndicator · chat working state only "),t("span",{class:"tag spec"},"signature")])],-1)),t("div",da,[a[19]||(a[19]=t("span",{class:"stage-label"},"Usage · only while the chat has an unfinished prompt",-1)),t("div",ea,[c(k,{label:"Requesting…"}),c(k,{label:"Working…"})])])]),a[30]||(a[30]=d('
i
The chat working state is rendered uniformly by WorkingIndicator — the 小蓝 mascot (KimiMascot, the kimi.com avatar Rive asset, with a static SVG fallback under reduced motion or when the runtime fails) plus a phase label. All other loading states use the plain Spinner.

Link

Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. File links inside inline code use a 1.5px underline offset so the line stays clear of the chip background. The .muted variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.

Link · inline link
Read the full design token docs before building.View on GitHubView history

Menu / Dropdown

Desktop menus use a 3.5px panel inset. Standard items use 5px × 9px padding and a 7px icon gap. Their three-layer neutral shadow stays below 4% opacity.

Dropdown menu panel: frosted glass — the translucent --color-menu-bg fill over a blurred, saturated page backdrop (--p-menu-backdrop) — plus hairline + light shadow (--shadow-menu, a three-layer neutral ramp). This is the one place glassmorphism is the design language rather than an exception (§06); every floating menu surface (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups) uses the token pair, never ad-hoc blur values. Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. All menu actions use 13px labels at weight 475 with 16px leading icons; both share a 16px line box for vertical alignment. Menu timestamps use the UI font. On touch / mobile, use lg (≥44px row height) while keeping the same type size. A dropdown menu pops in from its trigger corner — fade plus a slight 0.97 scale over --duration-base (exit --duration-fast), the composer model dropdown's motion language; the transform origin and the nudge direction follow the anchoring, including the upward flip near the viewport edge.

Row states: hover uses the mode-aware --color-hover wash (it lightens under dark, never darkens); a leading icon sits one rung below the label (--muted), and on hover both label and icon step up to --color-text-strong, the max foreground tier. Selection keeps the accent pair (--color-accent-soft / --color-accent-hover); danger keeps its own colour.

Menu · dropdown menu
Open file
Selected item
Disabled item
Delete chat

SegmentedControl

Mutually exclusive short option groups, commonly used for 2–5 option switches such as "light / dark / follow system" or the four font-scale steps. Options may include a 14px registry icon or a colour swatch. A single raised indicator with a soft shadow (no border — the edge stays clean) slides and resizes between options using the standard motion tokens. Three sizes: md (default, settings pages), sm (compact rows), and xs (dense menus such as the composer model dropdown — 20px items, 12px labels).

SegmentedControl
LightDarkFollow system

SecondaryModelPicker

Linked model + thinking-effort picker (settings → Agent → Subagents, experimental; components/settings/SecondaryModelPicker.vue, shared by both ends). Use it whenever two choices are only valid as a pair — here an effort is meaningless without its model, and every model declares a different supported set. It is a cascading variant of the §03 Select: the trigger is the Select trigger verbatim (value renders model · effort, the unset state uses the placeholder tint), and the dropdown opens as a SINGLE-LEVEL model list (grouped by provider) on the floating menu surface (--color-menu-bg / --p-menu-backdrop / --shadow-lg). The menu teleports to <body> with position: fixed — it opens on top of the settings modal (on the --z-modal-dropdown rung), and only a body-level surface escapes the dialog's scrolling-body clip; it re-anchors to the trigger on any outside scroll and closes on window resize (the UserMenu teleport's full recipe). Hovering or clicking a model row flies its effort submenu out to the RIGHT of the row — same menu surface, anchored to the row's live position, flipping to the left only near the viewport edge per the §03 anchoring rules — with a 250ms hover-intent grace (the UserMenu flyout's recipe) so the diagonal path into the submenu doesn't collapse it. Every model row carries a trailing chevron-right affordance; clicking an effort confirms the pair and closes — one atomic write, never two staggered patches. Flyout options follow the composer's thinking-level model (segmentsFor): effort models get off + their declared levels (always-thinking ones get no off), boolean-thinking models get on/off, unsupported models get off alone; while no effort is set at all, a "Model default" entry leads (it writes the model alone — POST /config merges and cannot clear a stored effort, so the entry disappears once one is set). A configured effort the model no longer declares is appended as an extra flyout option so the current pair stays visible and re-selectable. Keyboard mirrors the Select contract (focus stays on the trigger, Esc preventDefaults so the hosting dialog does not close): ↑/↓ move within the active level (the flyout follows model moves), → opens the flyout, ← collapses it, Enter confirms, Home/End jump. ARIA: combobox trigger → dialog menu holding a model listbox plus the effort listbox flyout with option rows. The menu itself flips upward when the trigger sits near the viewport bottom.

Tabs

Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.

Tabs
GeneralAgentAdvanced

Switch

A two-state switch for settings that take effect immediately. The 36×20 track has a 0.5px hairline and full radius; its 16px knob uses 1.5px internal offsets so the visible inset remains 2px and symmetric after accounting for the border. On hover, the knob eases to an 18px rounded rectangle towards the track centre. When on, the track turns accent and the knob slides right.

Switch

Checkbox

A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.

Checkbox

Avatar

A 32px default avatar with md radius; .sm is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.

Avatar
KK

EmptyState

A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.

EmptyState
No chats yet
Click "New chat" to start a conversation with Kimi

Divider

A 0.5px hairline divider (--p-line); .p-divider-v is the vertical divider, used between inline elements.

Divider
Content above

Content below
kimi-k2thinking

Tooltip

A CSS-only hover hint, wrapped in .p-tip. Inverted background (--p-text / --p-bg), single line, no wrapping — carries only short notes.

Tooltip (hover the button)
New chat

Banner

An inline notice bar placed at the top of a content area. Three states — .info / .warning / .danger — each with a matching 18px icon.

Banner
Connected to server
Currently in yolo mode; tool calls will run automatically

Sheet / BottomSheet

A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.

BottomSheet
Choose a model
kimi-k2 · thinking
kimi-k2 · instant

Skeleton

A placeholder for loading content, using a breathing opacity animation (no gradients), following the no-gradient-text rule. Composed into titles / text lines / avatars.

Skeleton

Command Bar

An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses Button primary; the command area uses a mono light-grey background.

Command Bar
curl -fsSL https://code.kimi.com/install.sh | bash

TopBar

The application top bar. Solid by default; the .frost variant is translucent + background blur, used only for sticky navigation bars. Together with the floating menu surfaces (Menu / Dropdown), it is one of the two exceptions to the no-glassmorphism rule (see §06).

TopBar · solid / frosted glass
Solid TopBar
Frosted-glass TopBar · .frost

Find Bar · transcript search

The in-transcript find bar (Cmd/Ctrl+F), implemented by components/chat/TranscriptSearch.vue. A floating card pinned to the transcript's top-right (top: --panel-head-h + --space-3, right: --space-3 — equal inset on both axes), --z-sticky, raised surface + 0.5px hairline + --shadow-menu. One radius for both states: --radius-2xl is a full capsule at the collapsed height and a card once the footer expands — never animate between two radii.

PartRule
Input rowSearch icon (muted) + bare input — the list-style bare-input exception family (sidebar search row, inline rename), NOT the boxed Input primitive; the 38px bordered control would break the pill. Circular close IconButton sm (concentric with the capsule end); a 0.5px hairline separator before it. Height comes from the grid: 32px control (--space-8) + 2× --space-1 padding = 40px — at which --radius-2xl is exactly the half-height capsule.
Footer (results)Expands via the 0fr→1fr grid fold (--duration-slow), hairline top separator, prev/next IconButton sm left, right-aligned muted count (N/M results · --ui-font-size-sm). Only exists once a query has settled — while typing or empty, the bar stays a bare pill.
Statescollapsed (empty query) / searching (Spinner sm in the input row during the ~800ms debounce) / results / no-results (count reads "No results", nav disabled). Disabled is uniformly opacity:.5.
FocusComposer-style: a neutral hairline overlay (::after + --color-composer-focus-line) fading in on :focus-within. No accent ring.
Match inkCSS Custom Highlight API — the bar mutates no transcript DOM. All matches: --color-search-match (yellow); current: --color-search-match-current + a 2px --color-warning outline ring (a positioned overlay — highlight pseudos can't paint box outlines). Tokens live in web-ui/style.css with light/dark pairs.
KeyboardCmd/Ctrl+F opens + focuses (repeat = re-focus + select-all; hardcoded, reserved in the desktop keymap), Enter / Shift+Enter steps matches (wrapping), Esc closes from ANY control inside (container-level, so it never reaches the conversation's Esc-abort).
Matching semanticsRendered transcript DOM only (unloaded older pages are out of scope), capped at 1000 matches (count reads N/1000+). Matches span inline nodes within one block, never cross block breaks; inert and display:none content is excluded. Stepping scrolls the match's own rect into view, not its parent element.

SectionLabel

A small group title for sidebar lists, used to section the content below (such as Workspaces in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing .08em, color --color-fg-faint; left-aligned to the row's starting padding (--sb-pad-x), keeping the same indent as the group rows below. For scripts without case (such as Chinese), text-transform:uppercase simply has no effect — no special handling needed.

',55)),t("div",sa,[a[26]||(a[26]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Sidebar · group title")],-1)),t("div",oa,[a[25]||(a[25]=t("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),t("div",ia,[(o(),i("svg",na,[...a[21]||(a[21]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 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)])])),a[22]||(a[22]=e(" kimi-code-web ",-1))]),t("div",la,[(o(),i("svg",ra,[...a[23]||(a[23]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 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)])])),a[24]||(a[24]=e(" playground ",-1))])])])]),t("section",ca,[a[39]||(a[39]=d('
04

Chat Interface Overhaul

The message stream is the core of Kimi Web. Tool calls render as quiet activity lines — one borderless line per call, bespoke per tool kind, auto-grouped, expanding on demand — while Question / Approval elevate to a floating neutral surface because they need a decision, and the Swarm composite keeps a card; the Composer collapses into a single rounded container.

Unified message stream

User-message bubbles follow the kimiwork production recipe (MessageItem .user-bubble): a neutral --color-user-bubble-bg fill (BubbleGray — #f5f5f5 light / #292929 dark), uniform --radius-lg corners, no border, no shadow.

Message timestamps use 12px UI text at weight 500, matching the compact metadata scale without switching to a monospace face.

The user-message metadata row sits one 8px spacing step below the bubble, so its actions and timestamp read as supporting information rather than part of the bubble edge.

Overlong user messages clamp at 10 measured lines, the tail dissolving through an alpha mask rather than a tint overlay (the translucent accent fill would double-composite); a floating pill toggle centred on the fade expands in place and collapses back, and the collapse pins the toggle itself so the reading position survives. Skill / plugin command args clamp through the same wrapper, beside the card head. Like the transcript's other disclosure controls (thinking row, turn fold, tool lines), the toggle is a bare native button carrying aria-expanded — chat-surface disclosure controls do not use the §03 Button primitive.

The floating jump-to-latest control uses 12px UI text at weight 525, led by the full down-arrow icon rather than a disclosure caret.

Thinking is an inline, borderless disclosure row in the message stream — never a side panel. The k15 bulb (the thinking registry icon) leads the row in every state; while streaming the "Thinking…" label breathes (opacity only, never a gradient shimmer) and whole elapsed seconds tick beside it, afterwards the label settles to "Thinking process" with the final span as · Ns (renderer-measured, live sessions only — history shows no seconds). Collapsed by default, it expands in place with the standard grid-rows animation and a 90° chevron rotation, and it folds itself back once the stream moves past it, even if the user expanded mid-stream. The header only animates its text colour on hover (standard duration and easing tokens), no card shell.

Conversation · 760px reading column
Please change the login endpoint to JWT and add the corresponding unit tests.
🌔Analyzing the auth module…
Read 2 files
Readsession.tssrc/auth · :12-4534 lines
12 export function verify(token: string) {
13 return jwt.verify(token, getSecret());
14 }
Readmiddleware.tssrc/auth58 lines
Editmiddleware.tssrc/auth+12−4
Search"jwt.verify"src/auth4 results

I looked at the structure of src/auth; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.

A decision needs your confirmation
How long should the JWT expiry be? Default 7 days, refresh token 30 days.
Write permission required
About to modify src/auth/middleware.ts, 42 lines changed. Allow?
Replace session with JWT signing
Refactor the auth middleware
Add unit tests

Wide markdown tables (desktop): regular chat prose stays within the 760px reading column (--p-content-max), and tables stay there too by default — an overflowing table scrolls horizontally inside its own wrapper, so the page and the chat area never scroll sideways. A clipped table shows a gradient fade at its truncated right edge, and hovering the table reveals a small widen button at its top-right corner; clicking it lets the table grow naturally with its content up to 1040px (--p-table-max), centred within the conversation pane, and clicking again restores the default width. At the default width a single column is capped at 36% of the pane; once widened the cap relaxes to 700px (--p-table-cell-max), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a widened table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.

Tool calls: quiet activity lines, bespoke per tool

High-frequency calls like read / bash / grep are "operational noise" — boxed, collapsible cards quickly drown out the conversation. Tool calls therefore render as one quiet borderless line in the message stream — never a card — and each tool kind composes that line for its own content, so the stream reads like an activity log rather than a pile of widgets. The three visual-weight tiers:

Three visual-weight tiers
① Tool line · lightest (default) — bespoke content per tool, no card chrome
Runpnpm run build && pnpm lint0.8s
② Activity run · medium (consecutive quiet activity — thinking + tool lines — folds to one smart-summary row)
Read 3 files
③ Sub Agent identity card · one per delegation — task title + agent type; the whole card opens the side panel (no in-stream expansion, never grouped)
分析双引擎架构Explore
④ Decision card · heavy (only question / approval, needs user input)
Write permission required
About to modify src/auth/middleware.ts, 42 lines changed.
',15)),t("div",va,[a[31]||(a[31]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),t("div",fa,[t("div",pa,[c(A,{changes:C,cwd:ya,onOpenDiff:u,onOpenFile:u})])])]),a[40]||(a[40]=d('
Tool Call · quiet lines (expand on demand)
Read 2 files
Readsession.tssrc/auth · :12-4534 lines
12 export function verify(…
Readmiddleware.tssrc/auth58 lines
Editmiddleware.ts+12−4

Decision cards · Question / Approval

The two attention cards replace the composer in the dock and share one contract: a floating neutral shell (--color-surface-raised + hairline + --radius-lg + --shadow-menu), a plain dark 16px title head, and a hairline footer whose actions read in number-key order with exactly one accent primary. There is no semantic colour band — the floating card itself is the "needs a decision" signal.

Plan review · pinned option rows, second-line descriptions
按这份 plan 开始实现?
The plan markdown scrolls in a capped area; the approaches are pinned below it — label on the first line, full description always on the second. The number chip doubles as the keyboard hint.
1方案 A:静态徽章零依赖、渲染稳定,升级时需手动同步版本号。
2方案 B:动态徽章版本自动同步免维护,但要求仓库公开可访问。

Composer

Unified into a single raised container: --radius-composer (32px) with --corner-shape-composer: superellipse(1.5) and a stable 0.5px edge. Focus crossfades a low-chroma line-and-accent edge over --duration-slow with --ease-in-out, while the neutral shadow stays unchanged — there is no added halo and no layout shift. The textarea uses text-autospace: normal for mixed CJK and Latin input. Toolbar controls use a quiet 32px full-round geometry with 8px edge inset; the send button remains a standard 32px circle, with its glyph at 28px (--composer-send-icon-size, the production kimi.com size; it sits outside the --p-ic-* scale on purpose).

Fill and edge tokens: the card's fill and rest border are their own tokens — --color-composer-bg and --color-composer-line — running the kimiwork / kimi.com production input recipe (.chat-input__shell): fill = groupedBackground.secondary (#ffffff light / #1f1f1f dark), rest border = separator.s1 (13% black / 12% white), focus line = fills.f4 (25% in both schemes), and --shadow-input = effect.shadow.inputDefault (0 5px 16px -4px rgba(0,0,0,0.07), kept identical in dark — the hairline carries the edge there). Only colours sit in the tokens; the 32px superellipse shape and the focus-only edge overlay are unchanged.

Send button tokens: the send circle runs on --color-send-bg / --color-send-bg-hover / --color-send-icon (+ *-disabled, --opacity-send-disabled, --shadow-send[-hover]), following the production recipe (.chat-input__send): a neutral labels.primary fill (90% black light / 84% white dark, hover #252525 / 84.8%) with the production lift shadow (0 7px 16px -13px 38% + 0 1px 2px 7%, one step larger on hover), a groupedBackground.secondary glyph, and a disabled state of the same vocabulary — fills.f2 fill with a labels.quaternary glyph at full opacity. The button is disabled exactly when submit would no-op — an empty draft with no ready attachment (image-only sends stay enabled), an upload in flight, or the starting spinner — so disabled is a first-class persistent state, never a fade.

Layering, anchors, and motion: the dock normally stays at --z-sticky so the Latest Messages pill can remain visible above its veil. While any Composer popup is open, the dock temporarily joins --z-dropdown, ensuring permission, work-mode, and model menus always paint above that pill. The permission menu's left edge and the model menu's right edge each follow their own trigger pill. All three menus use --shadow-menu and the same trigger-corner pop motion as Session Row menus: 0.97 scale with a 2px shift toward the trigger, --duration-base on entry, and --duration-fast on exit.

Attachment strip: attachments hang inside the composer card above the textarea as two grouped rows — images/videos as shared MediaThumb rounded thumbnails, files as the shared AttachmentChip pill — the same pair the sent bubble renders, so a draft looks exactly like the sent message. File-store videos render a static play tile instead of fetching a first frame. The strip caps at two thumbnail rows and scrolls beyond that instead of pushing the input down; while overflowing, a quiet count badge pins to the bottom-left and new attachments auto-scroll into view (to the end of whichever group grew). With two or more attachments, a one-click clear-all pins to the strip's top-right corner as a quiet 22px badge (trash glyph, danger on hover). The composer's pending preview and the bubble's media clicks open the same MediaLightbox preview, which owns Escape via the shared dialog stack: images go through PhotoSwipe (lib/mediaPreview.ts) and zoom out of the clicked thumbnail (scrim = --color-scrim-strong, caption = --color-text-on-scrim), videos keep the custom modal.

',11)),t("div",ha,[a[38]||(a[38]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Composer")],-1)),t("div",ua,[t("div",ga,[a[36]||(a[36]=t("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),t("div",ba,[t("div",ma,[a[33]||(a[33]=t("button",{class:"p-icon-btn"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"})])],-1)),t("span",wa,[c(f(h),{name:"shield-question",size:"sm"}),a[32]||(a[32]=e("yolo",-1))]),a[34]||(a[34]=t("span",{class:"p-pill"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("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"})]),e("plan")],-1))]),a[35]||(a[35]=d('
kimi-k2· thinking
',1))])]),a[37]||(a[37]=d('
kimi-code-web
',1))])]),a[41]||(a[41]=d('
i
Site-wide consistency: the composer uses one 32px superellipse shell and one 32px desktop control height. Attachment, permission, modes, compact, and model controls are all full-round and transparent at rest; hover reveals a neutral wash, open/active may use accent-soft, and Send remains the sole persistent filled control — an inverted --color-text fill with a --color-bg glyph (never the accent), disabled while the input is empty or an upload is in flight. The transparent dock floats over the transcript, while the scrolling content receives bottom padding equal to the live dock height so its final item can still clear the composer. Composer chrome is not selectable; only the message input permits text selection. Each permission mode has its own registry icon — manual hand, yolo shield-question, auto full-access — paired with the label in the pill (collapsing to the accessible icon below a 620px composer container) and leading its dropdown row in the mode's colour, with the current row's check trailing the row's end. The right toolbar is the flexible region: the model pill shrink-wraps its content, then shrinks and truncates internally only when the toolbar runs out of room. The dock's workbar above the composer carries one pill vocabulary — 32px high with --space-4 inline padding and stadium-shaped (--radius-full) corners, a --color-surface fill (one rung above the page in both schemes — sunken is degenerate in dark — the same material as the popover it opens), and the system hairline edge (0.5px at --color-line-strong, one rung up for presence; no shadow), icon + label + a count or status — for background bash tasks, background sub-agents, todos, and the goal alike; a pill toggles the shared work panel (itself at --radius-xl with the same 0.5px --color-line-strong edge outside — inner separators stay --color-line — and the menu panel's --shadow-menu), and the goal's detail (full objective, completion criterion) fills the panel body while its pause / resume / cancel controls ride the panel head (the decision cards' action vocabulary — exactly one accent primary, resume while paused; secondary pause while active; danger-soft cancel) and the meta counts (turns / tokens / time / budget) sit in a hairline footer — never a separate full-width strip.

Workspace attachment card: on the empty session, the workspace picker is a separate attachment card tucked under the composer — and the composer card itself stays complete (its own 0.5px border, --radius-composer corners with --corner-shape-composer, and shadow are never altered). The attachment lives inside the composer's padding box as the card's sibling, so its width always matches; its top --space-4 slides behind the card (the card is raised to --z-sticky), its square top edge stays hidden, and only the rounded bottom (0 0 --radius-xl --radius-xl) shows. Background --color-hover at 60% via color-mix (≈0.03 black in light, self-adapting in dark), no border, no shadow. Inside sits one quiet capsule trigger: transparent, --radius-full, 16px leading icon and 12px label at weight 475 in --color-text-muted; hover deepens to --color-selected and the label turns --color-text. The dropdown follows the §03 menu spec and is viewport-aware (flips above when more room, clamps max-height to the scrollport); at --z-dropdown it outranks both the card and the fixed click-outside backdrop (--z-sticky), which renders outside the composer because the card's container-type captures position: fixed descendants.

Responsive

See §02 --p-bp-sm for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.

i
At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen.
',5))]),a[43]||(a[43]=d('
05

Theming

Kimi Web uses one unified theme: the same components, fonts, radii, shadows, and surfaces — theming only swaps color values. Every semantic color token ships a light value in :root and a dark override in the data-color-scheme blocks; the semantic status colors (success / warning / danger) are independent palettes, one set each for light / dark.

Accent

The app has one accent: the brand blue (--color-accent, #1783ff light / #58a6ff dark). Use it sparingly — the accent is reserved for the primary action, focus rings, links, and active marks (current tab, toggles); large fills always come from the neutral surface tokens. Selection that means "where I am" (sidebar rows, list pickers) is deliberately NOT accent-tinted — it uses --color-selected so it reads as location, not as an action.

Light / dark mode

Each semantic token ships a light value in :root and a dark override in the two data-color-scheme blocks (explicit choice, or following the OS preference via prefers-color-scheme). Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.

Benefits of one theme: components, fonts, radii, and surfaces are consistent site-wide; a single accent keeps the brand identity unambiguous; light / dark mode works out of the box; semantic status colors are independently tunable.
06

Style Rules

Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning.

Rule IDWhat it detectsAction
no-gradient-textgradient text / gradient backgroundForbidden
no-glassmorphismbackdrop-filter: blur (TopBar sticky nav bar and menu surfaces via --p-menu-backdrop are the exceptions)TopBar + menus exempt
no-color-glowcolored / large-radius box-shadow glowForbidden
no-emoji-iconusing emoji as a functional icon (no exceptions). Emoji inside user content — session titles, messages — is not chrome and is out of scope (see §07 Session row's emoji icon)Forbidden
no-hardcoded-hexunregistered hex color inside a component <style>Warning
no-hardcoded-fonthard-coded font-family in a component (e.g. 'Inter') instead of var(--font-ui)Warning
radius-from-scaleradius value not in {4,6,8,12,16,20,999}Warning
z-from-scalez-index using an unregistered large numberWarning
weight-from-scalefont-weight not in {400,500}Warning

State matrix

Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. focus-visible always uses --p-focus-ring (appears only on keyboard focus, see §08); disabled is uniformly opacity:.5.

StateButtonInputCardMenu itemSwitch
default
hover
active / pressed
focus-visible
disabled
loading
selected / active
error
readonly

Chat working indicator

The chat working state ("prompt sent, turn unfinished") is a brand signature of Kimi Web, rendered uniformly by the WorkingIndicator component: the 小蓝 mascot plus a phase label — "Requesting…" until the assistant's reply starts, "Working…" once it is streaming. All other loading states (including ActivityNotice) use the plain Spinner.

Glassmorphism exemption

backdrop-filter: blur is banned site-wide, with two exceptions: the .frost variant of TopBar — only in the one place of the "sticky navigation bar", used to stay readable over scrolling content — and the floating menu surfaces (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups), which go through the --color-menu-bg / --p-menu-backdrop token pair so the recipe stays single-sourced. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under no-glassmorphism, and menu blur with ad-hoc values (anything but the token) is flagged too. Persistent panels that stay open over scrolling content (the dock work panel) deliberately stay opaque — a live backdrop blur re-samples the scrolling page every frame and janks in Chromium.
07

App Shell & Sidebar

The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions.

Layout grid

On web it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent auto track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles. (The desktop app adds a second row for its terminal panel — desktop-only, see below.)

App.vue · .app
grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;\n    /*         sidebar ↑    ↑handle  ↑conversation  ↑handle ↑right panel (auto) */
TokenValueUsage
sidebar width270px default (adjustable)expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's --p-sidebar-w (264px)
--preview-w460pxwidth of the right preview panel when open
--panel-head-h48pxunified height for all right panel heads + the conversation column head; both use a 0.5px bottom hairline
--p-bp-sm640px≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel

Sidebar alignment system (--sb-*)

All sidebar rows (group head, session row, New chat, search, and Settings buttons) share 4 custom properties. Their 16px icon slots and --sb-gap place every label on the same x-axis as the workspace name.

TokenValueUsage
--sb-inset12pxrow box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding
--sb-pad-x20pxcontent start x (= --sb-inset + 8px row padding)
--sb-gutter16pxleading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name
--sb-gap8pxgap between the icon slot and the text
i
The session title's starting x = --sb-pad-x + --sb-gutter + --sb-gap. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally.

Sidebar structure

The sidebar from top to bottom: brand header → action group → pinned head (pinned section + "Workspaces" label) → scrolling grouped list (workspace head + session rows) → user-menu footer. New chat and Search are direct sibling controls in the same grid container; the optional new-workspace action shares the first row, while Search spans the next row. A 4px gap keeps Search clear of the scroll boundary. The pinned head sits OUTSIDE the scroll container (the action-group / footer pattern — never position: sticky, which would need an opaque plate over the frosted tint), so the pinned sessions and the "Workspaces" label stay put while the workspace groups scroll beneath; the pinned section is collapsible (a chevron on its label, revealed on hover/focus and kept visible while folded; state persisted) so a long pinned set can't eat the sidebar, and it re-expands when a new session is pinned. Both pinned edges use three light near, middle and far fades across 18px, entering over 260ms only while more session content exists beyond that edge — the top seam lives at the pinned head's bottom border. The footer seam is a 0.5px hairline. Controls reuse the §03 primitives as much as possible. The sidebar sits on --color-sidebar-bg (one step off --color-bg: warm off-white just under white in light, one step BELOW the page in dark — the session column reads as its own plane, and with dark elevation = lighter the chrome never sits brighter than the conversation pane; the hairline still separates it from the pane). Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the action group stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. The search glyph has a -0.5px optical correction to align its visual centre with the label. Row hover uses --sb-hover (= the global --color-hover wash); the selected row uses the lighter --sb-selected wash derived from --color-selected — On macOS desktop the sidebar is instead frosted: the window carries a native NSVisualEffectView ('menu' vibrancy, following the in-app scheme via the nativeTheme mirror, its state pinned to inactive so the material keeps its flat pressed-down colour — ≈ #282829 dark / #E7E7E7 light — with no active/inactive drift) and the sidebar column drops --color-sidebar-bg for a single translucent --color-sidebar-tint wash that presses the pinned material one step — ≈ #282829 → ≈ #1e1e1f in dark (rgba(0,0,0,0.25)), ≈ #E7E7E7 → ≈ #f1f1f1 in light (rgba(255,255,255,0.4)) — with header and footer staying transparent so the tint reads as one uniform pane; the root chain (html/body/#app/.app) stays unpainted only under the macos-desktop + vibrancy flags — the latter is the Settings → Appearance accessibility switch (default on; persisted main-side so the window is created with the right material, and live-applied on toggle): off repaints the root chain and the sidebar falls back to opaque --color-sidebar-bg, while the traffic-light layout keeps keying off macos-desktop alone — while the conversation pane, chat header and right preview keep their own opaque surfaces. The list's hover-icon clusters (session-row kebab, group-head actions) paint NOTHING there — no plate, no wash, no blur (real backdrop blur does not even render over this window: Chromium's backdrop sampler returns a flat wash above the transparent BrowserWindow + vibrancy view). Instead the row's title/name dissolves before it ever reaches the buttons: a two-stage mask-image fade — a subtle 16px dissolve at rest, extending over the cluster zone only while the actions are revealed (row hover / keyboard focus / menu open): 34px on session rows (the pin+kebab cluster overhangs the title by ≈25px), 68px on group heads (the floating cluster is ≈60px wide). The fade is zone-based, so short rows render untouched, and text-overflow becomes clip so a long tail dissolves instead of dotting.

BlockUseNote
Brand headerlogo + name + collapse IconButton (right-aligned)on Windows / web the brand is left and the collapse IconButton sm is right-aligned inside the header; the dev-only backend version/address pill uses the UI font, not monospace; the logo is animated (a blinking eye). On macOS desktop the header is a bare drag strip (brand hidden, traffic lights + resident floating toggle over it)
New chatfull-width left-aligned button (custom)500-weight label; same rhythm as the session rows in the list (left-aligned, hover = --sb-hover). Do not use Button (centered, breaks the rhythm)
Searchbare search row (custom)500-weight label; no border, hover/focus shows the faint --color-hover wash; icon + label, with the Kbd keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. Do not use Input (the 38px bordered version is too heavy). It is a direct sibling of New chat in the action group
Section label.p-section-labeluppercase muted small titles like "Workspaces", using --weight-section-label (600)
Pinned headfixed block above the scroll container (.sessions-head): the pinned section (PinnedSessionList.vue) + the "Workspaces" section labelstays put while the workspace groups scroll; owns the top scroll-linked seam (hairline + fade, only while scrolled). The pinned section folds via its label chevron (persisted, kimi-web.pinned-collapsed) and re-expands only on an explicit pin (never on load backfill); the expanded rows are capped at 40vh with their own scroll so a long pinned set can't push the list or footer out of view
Workspace head / session rowsee next two sectionsshare --sb-* alignment
User-menu footeraccount area (components/UserMenu.vue) opening an upward §03 menupinned row under the session list, separated by a 0.5px --line hairline; trigger keeps the same list-style family as New chat (24px round avatar + nickname when signed in, user icon + sign-in hint otherwise). The menu box follows the trigger's left edge and width (ResizeObserver-tracked, so it survives a sidebar resize) and is teleported to body because the column's container-type would capture position:fixed. Rows: plan usage / theme / language are macOS-style hover flyout submenus — the parent row carries the module icon, a faint current value and a fixed chevron-right, and hovering (or moving focus to the parent row, or pressing Enter / Space / → on it) opens a teleported panel anchored to the parent menu's right edge (content-adaptive width floored by the menu's own min-width and capped at the parent menu's width; flips left near the viewport edge) with a 250ms hover-intent close grace; the usage panel shows weekly + 5h rows (percent values with severity colours), while the theme (three schemes) and language (two locales) panels move the check to the picked option without closing the menu — then the upgrade entry below the top plan level, settings (with an always-visible Kbd keycap shortcut hint on desktop) and a confirming sign-out; all menu icons come from the Kimi set
!
Why New chat / search / inline rename don't use Button / Input: they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight.

Session row

A session row is an inset rounded pill, structured as: status slot → title → time → attention Badge → hover actions (pin / archive).

PartRule
Containerpadding: 8px 8px inside the list's --sb-inset gutter, radius-sm; no fixed/min height — row height is font-driven (title line-height: --leading-tight, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover actions are absolutely positioned so they never force the row taller (no hover jitter). hover = --sb-hover (the global --color-hover wash); active = --sb-selected (75% of the global selected wash) — neutral, no accent tint, no border, no weight change
Status slot (lead)fixed --sb-gutter width; running = Spinner sm, otherwise unread = 7px accent dot
Titleflex:1 with truncation and user-select:none; double-click enters inline rename (compact input, not Input), whose text remains selectable
Emoji iconthe session icon is the title's LEADING emoji cluster (web-core splitSessionEmoji — no icon field; every client renders the title as-is). The emoji is an ordinary title character — no decoration at rest or on hover (it stays a <button> for a11y), and clicking it opens SessionEmojiPicker — a Menu-shelled panel (bare list-style search row → scrollable sections: Recently used persisted in localStorage (cap 8) + the grouped emoji dataset, with remove/random as MenuItems in the footer; a query swaps the sections for keyword-search results), teleported + fixed + --z-dropdown, popping from the trigger corner like the right-click menu. The menu's "Set Emoji…" opens the same picker and is the discoverable path. Inline rename edits the whole title — the emoji is an ordinary character in the input
Timemono xs, fg-faint; yields to the hover actions on hover
Attention BadgeBadge sm: info (needs answer) / warning (needs approval) / danger (aborted)
Hover actionsIconButton sm × 2 — pin + archive — cross-faded over the time on row hover (no kebab button). Right-clicking the row opens the full menu (copy ID / rename / emoji / fork / export / pin / archive + timestamp) anchored to the cursor, except over the inline rename input, where the native text-editing menu stays
Flat-style variant (flat list + pinned section)the sidebar's flat list rows AND — always, regardless of view mode — the pinned section's rows differ from the grouped row in three ways (all keyed off the facade projecting cwdLabel): ① no leading status slot — the title is left-aligned at the row's content edge; ② a second line under the title: folder-closed icon sm + the cwd's final directory name (- when the session has no cwd), xs faint like the time — except the icon, which takes --color-text-muted (one rung stronger, the same optical compensation as the group head's folder; the open-folder glyph's thin back-flap washed out at 14px) — rest-width tail mask fade; when the session has an associated PR (v2 git domain), a quiet chip (git-pull-request icon + #number) sits at the line's right edge, state-colored the GitHub way (open = --color-success, merged = --color-done purple, closed = faint) and opens the PR on click; ③ the first line's right side shows status — attention Badges anchored to the row's right edge, running Spinner, unread dot — INSTEAD of the time, which only renders when there is nothing to report (the Spinner yields to the attention pills: a session waiting for approval/answer never shows both); on hover the actions cross-fade IN as the whole status cluster fades OUT — pills and pin/archive never co-exist (grouped rows keep pills visible on hover). Height stays font-driven — the pill just grows the line. Grouped rows never set cwdLabel and keep the classic structure. The flat ↔ grouped switch lives in a dropdown on the SESSIONS section label (fixed list-settings icon + hover tooltip; the menu opens with a muted group label, per-view icons, and the current view checked at the row's right edge; mode persisted per device)
Archiveno confirm — the hover archive button / menu item archives immediately, then App.vue shows the §03 ActionToast (top-center) with Undo (restores the session) and Settings (opens the archived list)

Workspace group

The group head and session rows share --sb-*: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.

Show more & collapse

The "expand / collapse" controls at the bottom of each workspace group are compact list controls (same family as search, New chat, inline rename — not Buttons) sharing one row: expand (chevron-down) first, collapse (chevron-up) after a faint middot when both are present. Expanding reveals the next batch of sessions, fetching the next page from the server only when the locally loaded rows can't cover it — the control never exposes whether a reveal came from memory or the network.

PartRule
Rowa single flex row holding the controls, all content-width — hover washes just the button as a snug pill, never the full row. Font-driven height (≈32px like a session row), radius-sm; hover = --sb-hover (no text recolor); :focus-visible uses --p-focus-ring
Chevronsm (down = expand, up = collapse); the row indents by --sb-gutter + --sb-gap so the first button's chevron starts exactly at the session-title x, lining the control's leading edge up with the titles above
Labelfont-ui, text-xs, --color-text-muted; truncated
Separatorfaint middot (--color-text-faint) with --space-1 side margins, rendered only when both controls are present
Behavioreach group keeps a display cap starting at the first page; "Show more" steps it up by one batch (5) and fetches the next page only when the loaded rows fall short (busy = "Loading…", disabled); "Show less" resets the cap to the first page (view-layer trim — data is kept, no refetch). "Show more" exists while undisplayed loaded rows remain or the server has more; "Show less" appears once past the first page

ResizeHandle

A 4px grab strip layered over the 1px column border (margin: 0 -2px makes the whole 4px grabbable) with a centred 2px indicator bar. The bar stays transparent at rest and shows the neutral fills one step up the ramp — f2 on hover, f3 while the drag is live (the sidebar column is translucent on macOS, so f1 read too faint) — never the accent.

RuleValue
Width / cursor4px strip, 2px bar / col-resize mid-range; w-resize / e-resize at the drag limits (hints the direction that still resizes)
Normal / hover / dragtransparent / --color-selected (f2) / --color-line-strong (f3) — the neutral ramp one step up, never accent
Layer--z-dropdown, above pane-level sticky chrome (chat dock at --z-sticky) so the overhang stays visible and grabbable
Behaviorpanel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage

Right panel

The right panels (file preview / Diff / compaction summary / sub-agent / side chat) share one track and one head primitive.

Bottom terminal panel (desktop-only)

The native terminal (components/terminal/) sits in the conversation column's own bottom grid slot — the sidebar and the right panel span BOTH rows and keep full height (the VS Code layout: the panel belongs to the editor area, not to the whole window). Its height transitions 0 ↔ var(--terminal-h) (260px default, 120 min, 60% viewport max; persisted), squeezing the conversation column above instead of overlaying it. The panel mounts lazily on first open and then stays mounted so xterm scrollback survives a collapse.

i
One-sentence principle: the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section.
08

Accessibility (pragmatic edition)

Kimi Web is a local developer tool; it does not target a specific WCAG conformance level, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now.

i
On the "ugly" focus ring: the focus visibility required below always uses :focus-visible (not :focus). It appears only on keyboard focus; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with --p-focus-ring, not overridden per place.

1. Contrast & color

2. Keyboard operable

Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:

ControlKeyboard behavior
DialogTab cycles within the dialog (focus trap); Esc closes; focus returns to the trigger element after closing.
Menu / move the highlight, Enter selects, Esc closes.
Tabs / switch tabs (roving tabindex); only the current tab is in the Tab sequence.
Switch / Segmented / or Space / Enter to toggle.

3. Focus visibility

4. Labels & semantics

5. Target size

Desktop click targets ≥ 32px; touch devices ≥ 44px (consistent with the §01 principle and the IconButton lg tier).

6. Reduced motion

Handled uniformly in the global styles per §02's @media (prefers-reduced-motion: reduce); components do not check this individually. The chat working indicator's mascot renders its static fallback.

7. Live announcements (non-mandatory)

Screen-reader announcements are not a mandatory contract in this product. Short hints like Toast can use role="status" / aria-live; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.

Explicitly not mandatory for now: a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains.
09

Dialogs

Every overlay in the app — pickers, browsers, managers, confirmations — is built on the single §03 Dialog primitive. This chapter fixes the two layout anatomies allowed inside that frame, plus the row and footer contracts that make all dialogs read as one family. Do not hand-roll a third anatomy.

The frame (recap)

All dialogs share the §03 primitive: --radius-xl radius, --shadow-xl shadow, a restrained 28% neutral backdrop, a head (title + IconButton close), a body, and a right-aligned foot. Widths md 440 / lg 640 / xl 760 and auto / fixed height are chosen per §03. One interruptive overlay at a time; Esc closes; focus is trapped and restored. A blocking flow that must be resolved rather than dismissed (server token) uses hideClose with closeOnOverlay/closeOnEsc off — never a hand-written overlay.

Anatomy A — padded (forms & confirmations)

The default: the body carries its own padding and the caller drops content straight in. Confirmations put their Buttons in the #foot slot (right-aligned, cancel → confirm). Used by: confirm, login, status panel, server token.

Anatomy B — flush (pickers & browsers)

:padded="false" with height="fixed"; the consumer owns the zone layout inside a full-height column. The zones below are the whole vocabulary — a picker dialog composes them and adds nothing else. Used by: model picker, session search, folder browser, provider manager.

ZoneContract
SearchThe boxed §03 Input, inset 22px so its edge aligns with the head title. Autofocus on open. No leading icon, no borderless variant.
Filter chipsOptional. 28px pill: transparent + muted text by default, --color-hover on hover, --color-selected + medium --color-text when active. Horizontally scrollable with the scrollbar hidden. Never a row of Buttons.
Listflex:1, owns the vertical scrolling, padded 4px 8px so rows bleed near the dialog edge. role="listbox"; rows carry role="option" + aria-selected.
Row8px 12px padding, --radius-md. Two quiet lines: name 14/20 (medium when current) and a meta line 12/18 in --color-text-faint — provider · context · capability labels, dot-separated. No badge rows, no raw-id line (search still matches them). Trailing slot: check icon (current row only), then the star IconButton.
Row statesHover / keyboard-selected → --color-hover; current → --color-selected — a neutral "where I am" fill, never an accent tint, never an inset stroke. The star stays hidden until row hover, keyboard selection, or starred; it is always visible on touch devices and colored --star when starred.
State rowsLoading / unavailable / empty: centered on both axes, muted 14px; warning color only for the unavailable case.
Shortcut barThe footer: full-bleed, padding 8px 16px, border-top --color-line, left-aligned. Keyboard hints are Kbd keycaps + 12px --color-text-faint labels, groups separated by "·", the whole bar aria-hidden. An instructional sentence (folder browser) reuses the same bar without keycaps.

Keyboard & behavior contract

Dialog map

DialogAnatomyComposition
Model pickerflush · lg · fixedsearch + provider chips + model rows + shortcut bar
Session searchflush · lg · fixedsearch + result rows + shortcut bar
Folder browserflush · lg · fixedbreadcrumb bar + filter bar + folder rows + actions + hint bar
Provider managerflush · xl · fixedmanagement rows with inset dividers (rows are not selectable) + add section + shortcut bar
Confirm / Login / Statuspadded · md · autotitle + message or form + right-aligned foot
App update (desktop)padded · lg · autoversion title + quiet meta line (release date · current version) + height-capped scrolling what's-new list / progress bar + right-aligned action row (skip → download, later → restart) with the auto-download checkbox right-aligned on its own foot row below (a pure preference for future checks)
Server tokenpadded · md · autohideClose, no Esc/overlay close — resolved only by a valid token
Settingsflush · xl · fixedpage-like exception: side-nav region, per §03
Onboarding wizardnot a Dialogfull-page takeover (not built on §03): one centered column (brand lockup → step content → ghost actions + centered primary CTA); selectable options share the option-card pattern — 0.5px --color-line hairline, --color-accent border + --color-accent-soft fill when selected
Design intent: a picker dialog should feel like a quiet command palette — one boxed search, calm rows, a neutral "you are here" fill, and a predictable shortcut bar. Anything noisier — badge clouds, accent-selected rows, per-dialog footer inventions — is a regression to weed out.
',5))])])])]))}}),Sa=M(ka,[["__scopeId","data-v-043da7f5"]]);export{Sa as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-BnL2v2lB.css b/apps/kimi-code/dist-web/assets/DesignSystemView-BnL2v2lB.css deleted file mode 100644 index dd72d6899..000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-BnL2v2lB.css +++ /dev/null @@ -1 +0,0 @@ -.ds-page[data-v-043da7f5]{--d-bg: var(--color-bg);--d-surface: var(--color-surface);--d-surface-2: var(--color-surface-sunken);--d-surface-3: var(--color-line);--d-fg: var(--color-text);--d-fg-soft: var(--color-text-muted);--d-fg-muted: var(--color-text-muted);--d-fg-faint: var(--color-text-faint);--d-line: var(--color-line);--d-line-2: var(--color-line);--d-accent: var(--color-accent);--d-accent-2: var(--color-accent-hover);--d-accent-soft: var(--color-accent-soft);--d-accent-bd: var(--color-accent-bd);--d-green: var(--color-success);--d-green-soft: var(--color-success-soft);--d-amber: var(--color-warning);--d-amber-soft: var(--color-warning-soft);--d-red: var(--color-danger);--d-red-soft: var(--color-danger-soft);--d-violet: var(--color-done);--d-code-bg: var(--color-surface-sunken);--d-sidebar: var(--color-surface);--d-shadow-sm: var(--shadow-sm);--d-shadow-md: var(--shadow-md);--d-shadow-lg: var(--shadow-lg);--sidebar-w: var(--p-sidebar-w);--content-max: var(--p-content-wide)}.ds-page[data-v-043da7f5] *,.ds-page[data-v-043da7f5] *:before,.ds-page[data-v-043da7f5] *:after{box-sizing:border-box}.ds-page[data-v-043da7f5]{scroll-behavior:smooth}.ds-page[data-v-043da7f5]{margin:0;background:var(--d-bg);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1[data-v-043da7f5],h2[data-v-043da7f5],h3[data-v-043da7f5],h4[data-v-043da7f5]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-043da7f5]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-043da7f5]{color:var(--d-accent-2);text-decoration:none}a[data-v-043da7f5]:hover{text-decoration:underline}code[data-v-043da7f5],pre[data-v-043da7f5],.mono[data-v-043da7f5]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-043da7f5]{background:var(--d-code-bg);border:.5px solid var(--d-line-2);border-radius:5px;padding:1px 6px;font-size:.88em;color:#1f2937;white-space:nowrap}.layout[data-v-043da7f5]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-043da7f5]{position:sticky;top:0;align-self:start;height:100vh;background:var(--d-sidebar);border-right:.5px solid var(--d-line);padding:26px 22px;overflow-y:auto}.brand[data-v-043da7f5]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-043da7f5]{width:26px;height:26px;border-radius:7px;flex:none;background:var(--d-fg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;letter-spacing:-.04em}.brand-name[data-v-043da7f5]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-043da7f5]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-043da7f5]{margin:22px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--d-fg-faint)}.p-section-label[data-v-043da7f5]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-043da7f5]{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--d-fg-soft);margin:1px 0;transition:background .15s,color .15s}.nav a .num[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-043da7f5]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-043da7f5]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-043da7f5]{color:var(--d-fg-soft)}.content[data-v-043da7f5]{min-width:0}.content-inner[data-v-043da7f5]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-043da7f5]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-043da7f5]{margin-top:72px}.hero[data-v-043da7f5]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-043da7f5]{display:inline-flex;align-items:center;gap:8px;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--d-fg);background:#1783ff1a;border:none;padding:6px 12px;border-radius:8px;margin-bottom:22px}.hero h1[data-v-043da7f5]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-043da7f5]{color:var(--d-accent)}.hero p.lead[data-v-043da7f5]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-043da7f5]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-043da7f5]{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--d-fg-muted);background:var(--d-surface);border:.5px solid var(--d-line);border-radius:8px;padding:7px 12px}.meta-chip b[data-v-043da7f5]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-043da7f5]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-043da7f5]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-043da7f5]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-043da7f5]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-043da7f5]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-043da7f5]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-043da7f5]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-043da7f5]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-043da7f5]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-043da7f5]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-043da7f5]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-043da7f5]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-043da7f5]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-043da7f5]{color:var(--d-amber)}.stat.bad[data-v-043da7f5]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-043da7f5]{color:var(--d-red)}.stat.good[data-v-043da7f5]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-043da7f5]{color:var(--d-green)}.panel[data-v-043da7f5]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-043da7f5]{padding:22px}.panel-soft[data-v-043da7f5]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-043da7f5]{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.55;background:var(--d-surface);border:.5px solid var(--d-line);color:var(--d-fg-soft);margin:18px 0}.callout .ico[data-v-043da7f5]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-043da7f5]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-043da7f5]{background:var(--d-accent);color:#fff}.callout.warn[data-v-043da7f5]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-043da7f5]{background:var(--d-amber);color:#fff}.callout.good[data-v-043da7f5]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-043da7f5]{background:var(--d-green);color:#fff}table.dt[data-v-043da7f5]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-043da7f5]{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--d-fg-faint);font-weight:700;padding:10px 12px;border-bottom:.5px solid var(--d-line)}table.dt td[data-v-043da7f5]{padding:11px 12px;border-bottom:.5px solid var(--d-line-2);color:var(--d-fg-soft);vertical-align:middle}table.dt tr:last-child td[data-v-043da7f5]{border-bottom:none}table.dt td.tk[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-043da7f5]{display:inline-block;width:16px;height:16px;border-radius:4px;border:.5px solid rgba(0,0,0,.08);vertical-align:-3px;margin-right:8px}.palette[data-v-043da7f5]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-043da7f5]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-043da7f5]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-043da7f5]{padding:10px 12px 12px}.color-meta .cn[data-v-043da7f5]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-043da7f5]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-043da7f5]:last-child{border-bottom:none}.type-sample[data-v-043da7f5]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-043da7f5]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-043da7f5]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-043da7f5]:last-child{border-bottom:none}.space-bar[data-v-043da7f5]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-043da7f5]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-043da7f5]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-043da7f5]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-043da7f5]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-043da7f5]{border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;background:var(--d-bg);box-shadow:var(--d-shadow-sm)}.stage-bar[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:.5px solid var(--d-line);background:var(--d-surface)}.stage-bar .st[data-v-043da7f5]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-043da7f5]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-043da7f5]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-043da7f5]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-043da7f5]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-043da7f5]{display:flex;gap:6px}.tab[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 10px;border-radius:6px;color:var(--d-fg-muted);cursor:default}.tab.on[data-v-043da7f5]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-043da7f5]{padding:32px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:radial-gradient(circle at 1px 1px,rgba(0,0,0,.045) 1px,transparent 0) 0 0 / 18px 18px,var(--d-surface)}.stage.col[data-v-043da7f5]{flex-direction:column;align-items:stretch}.stage.dark[data-v-043da7f5]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-043da7f5]{width:100%;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--d-fg-faint);margin-bottom:-6px}.stage.dark .stage-label[data-v-043da7f5]{color:#6b7280}.ba[data-v-043da7f5]{display:grid;grid-template-columns:1fr 1fr;gap:0;border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;box-shadow:var(--d-shadow-sm)}.ba-col[data-v-043da7f5]{min-width:0}.ba-col+.ba-col[data-v-043da7f5]{border-left:.5px solid var(--d-line)}.ba-head[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-043da7f5]{background:var(--d-red-soft)}.ba-head.after[data-v-043da7f5]{background:var(--d-green-soft)}.ba-head .bh[data-v-043da7f5]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-043da7f5]{color:var(--d-red)}.ba-head.after .bh[data-v-043da7f5]{color:var(--d-green)}.ba-head .bh small[data-v-043da7f5]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-043da7f5]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-043da7f5]{background:#fff}.code[data-v-043da7f5]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-043da7f5]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-043da7f5]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-043da7f5]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-043da7f5]{color:#8b949e}.code .k[data-v-043da7f5]{color:#ff7b72}.code .s[data-v-043da7f5]{color:#a5d6ff}.code .p[data-v-043da7f5]{color:#79c0ff}.code .n[data-v-043da7f5]{color:#d2a8ff}.code .v[data-v-043da7f5]{color:#ffa657}.pill[data-v-043da7f5]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;border:.5px solid var(--d-line);background:var(--d-surface);color:var(--d-fg-soft)}.pill.blue[data-v-043da7f5]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-043da7f5]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-043da7f5]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-043da7f5]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-043da7f5]{font-family:JetBrains Mono,monospace}ul.clean[data-v-043da7f5]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-043da7f5]{position:relative;padding:8px 0 8px 26px;color:var(--d-fg-soft);border-bottom:.5px solid var(--d-line-2)}ul.clean li[data-v-043da7f5]:last-child{border-bottom:none}ul.clean li[data-v-043da7f5]:before{content:"";position:absolute;left:4px;top:17px;width:7px;height:7px;border-radius:50%;background:var(--d-accent)}ul.clean.check li[data-v-043da7f5]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-043da7f5]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-043da7f5]{color:var(--d-fg)}ul.clean li .path[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-043da7f5]{position:relative;margin:24px 0}.phase[data-v-043da7f5]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-043da7f5]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-043da7f5]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-043da7f5]{display:inline-block;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;color:var(--d-accent-2);background:var(--d-accent-soft);border:.5px solid var(--d-accent-bd);padding:5px 10px;border-radius:8px}.phase-tag .pe[data-v-043da7f5]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-043da7f5]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:14px;padding:18px 20px;box-shadow:var(--d-shadow-sm)}.phase-body h4[data-v-043da7f5]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-043da7f5]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-043da7f5]{margin:0}.matrix[data-v-043da7f5]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-043da7f5]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-043da7f5]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-043da7f5]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-043da7f5]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-043da7f5]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-043da7f5]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-043da7f5]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-043da7f5]{margin-top:80px;padding-top:28px;border-top:.5px solid var(--d-line);font-size:13px;color:var(--d-fg-faint);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}.kbd[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11px;background:var(--d-surface-2);border:.5px solid var(--d-line);border-radius:5px;padding:1px 6px}@media(max-width:980px){.layout[data-v-043da7f5]{grid-template-columns:1fr}.sidebar[data-v-043da7f5]{position:static;height:auto}.nav[data-v-043da7f5]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-043da7f5]{padding:40px 22px 80px}.stat-grid[data-v-043da7f5]{grid-template-columns:repeat(2,1fr)}.ba[data-v-043da7f5]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-043da7f5]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-043da7f5]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-043da7f5]{grid-template-columns:1fr}}.ds-page .p[data-v-043da7f5],.ds-page .stage.p-skin[data-v-043da7f5],.ds-page [data-p][data-v-043da7f5]{--p-font-sans: var(--font-ui);--p-font-kbd: var(--font-kbd);--p-font-mono: var(--font-mono);--p-bg: var(--color-bg);--p-surface: var(--color-surface);--p-surface-raised: var(--color-surface-raised);--p-surface-overlay: var(--color-surface-overlay);--p-surface-sunken: var(--color-surface-sunken);--p-well: var(--color-well);--p-surface-deep: var(--color-surface-deep);--p-hover: var(--color-hover);--p-text: var(--color-text);--p-text-strong: var(--color-text-strong);--p-muted: var(--muted);--p-text-muted: var(--color-text-muted);--p-text-faint: var(--color-text-faint);--p-text-on-accent: var(--color-text-on-accent);--p-line: var(--color-line);--p-line-strong: var(--color-line-strong);--p-accent: var(--color-accent);--p-accent-hover: var(--color-accent-hover);--p-accent-soft: var(--color-accent-soft);--p-user-bubble-bg: var(--color-user-bubble-bg);--p-accent-bd: var(--color-accent-bd);--p-success: var(--color-success);--p-success-soft: var(--color-success-soft);--p-success-bd: var(--color-success-bd);--p-warning: var(--color-warning);--p-warning-soft: var(--color-warning-soft);--p-warning-bd: var(--color-warning-bd);--p-danger: var(--color-danger);--p-danger-soft: var(--color-danger-soft);--p-danger-bd: var(--color-danger-bd);--p-info: var(--color-info);--p-sp-1: var(--space-1);--p-sp-2: var(--space-2);--p-sp-3: var(--space-3);--p-sp-4: var(--space-4);--p-sp-5: var(--space-5);--p-sp-6: var(--space-6);--p-sp-8: var(--space-8);--p-r-xs: var(--radius-xs);--p-r-sm: var(--radius-sm);--p-r-md: var(--radius-md);--p-r-lg: var(--radius-lg);--p-r-xl: var(--radius-xl);--p-r-composer: var(--radius-composer);--p-r-full: var(--radius-full);--p-corner-composer: var(--corner-shape-composer);--p-sh-xs: var(--shadow-xs);--p-sh-sm: var(--shadow-sm);--p-sh-menu: var(--shadow-menu);--p-sh-md: var(--shadow-md);--p-sh-input: var(--shadow-input);--p-sh-lg: var(--shadow-lg);--p-sh-xl: var(--shadow-xl);--p-font-size-xs: var(--text-xs);--p-font-size-sm: var(--text-sm);--p-font-size-base: var(--text-base);--p-font-size-md: var(--text-base);--p-font-size-lg: var(--text-lg);--p-font-size-xl: var(--text-xl);--p-font-size-2xl: var(--text-2xl);--p-leading-tight: var(--leading-tight);--p-leading-normal: var(--leading-normal);--p-leading-relaxed: var(--leading-relaxed);--p-ease: var(--ease-out);--p-ease-inout: var(--ease-in-out);--p-dur-fast: var(--duration-fast);--p-dur: var(--duration-base);--p-dur-slow: var(--duration-slow);--p-composer-focus-line: var(--color-composer-focus-line);font-family:var(--font-ui);color:var(--color-text);font-size:var(--text-base)}[data-p=dark][data-v-043da7f5]{--p-bg: #0d1117;--p-surface: #13181e;--p-surface-raised: #1c2128;--p-surface-sunken: #0d1117;--p-well: #13181e;--p-surface-deep: #0a0d12;--p-surface-overlay: #22272e;--p-hover: #ffffff0d;--p-text: #e8eaed;--p-text-strong: #ffffff;--p-muted: #727983;--p-text-muted: #9aa0a8;--p-text-faint: #6b7280;--p-line: #2d333b;--p-line-strong: #3d444d;--p-accent: #58a6ff;--p-accent-hover: #79b8ff;--p-accent-soft: rgba(88,166,255,.14);--p-accent-bd: rgba(88,166,255,.28);--p-success: #3fb950;--p-success-soft: rgba(63,185,80,.14);--p-success-bd: rgba(63,185,80,.28);--p-warning: #d29922;--p-warning-soft: rgba(210,153,34,.14);--p-warning-bd: rgba(210,153,34,.28);--p-danger: #f85149;--p-danger-soft: rgba(248,81,73,.14);--p-danger-bd: rgba(248,81,73,.28);--p-sh-sm: 0 1px 2px rgba(0,0,0,.4);--p-sh-md: 0 4px 12px rgba(0,0,0,.45);--p-sh-lg: 0 12px 32px rgba(0,0,0,.55);--p-sh-input: var(--shadow-input);--p-selection: rgba(88,166,255,.32)}.p-ic[data-v-043da7f5]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-043da7f5]{--_h: 36px;--_px: 16px;--_fs: var(--p-font-size-base);--_r: var(--p-r-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--_h);padding:0 var(--_px);border-radius:var(--_r);font-family:var(--p-font-sans);font-size:var(--_fs);font-weight:600;line-height:1;border:.5px solid transparent;cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease),transform var(--p-dur-fast) var(--p-ease)}.p-btn[data-v-043da7f5]:active{transform:scale(.98)}.p-btn[data-v-043da7f5]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft),0 0 0 1px var(--p-accent)}.p-btn .p-ic[data-v-043da7f5]{width:16px;height:16px}.p-btn.sm[data-v-043da7f5]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-043da7f5]{width:14px;height:14px}.p-btn.lg[data-v-043da7f5]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-043da7f5]{background:var(--p-accent);color:var(--p-text-on-accent);border-color:var(--p-accent);box-shadow:var(--p-sh-xs)}.p-btn.primary[data-v-043da7f5]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-043da7f5]{background:var(--p-surface-raised);color:var(--p-text);border-color:var(--p-line-strong);box-shadow:var(--p-sh-xs)}.p-btn.secondary[data-v-043da7f5]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-043da7f5]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-043da7f5]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-043da7f5]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-043da7f5]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-043da7f5]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-043da7f5],.p-btn.disabled[data-v-043da7f5]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-043da7f5]{--_s: 32px;display:inline-grid;place-items:center;width:var(--_s);height:var(--_s);flex:none;border-radius:var(--p-r-md);border:.5px solid transparent;background:transparent;color:var(--p-text-muted);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-icon-btn[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-043da7f5]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-043da7f5]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-043da7f5]{--_s: 44px}.p-icon-btn .p-ic[data-v-043da7f5]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-043da7f5]{width:20px;height:20px}.p-badge[data-v-043da7f5]{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--p-r-full);font-family:var(--p-font-sans);font-size:var(--p-font-size-xs);font-weight:600;line-height:1;border:.5px solid var(--p-line);background:var(--p-surface);color:var(--p-text);white-space:nowrap}.p-badge.sm[data-v-043da7f5]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-043da7f5]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-043da7f5]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-043da7f5]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-043da7f5]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-043da7f5]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-043da7f5]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-043da7f5]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-043da7f5]{width:12px;height:12px}.p-kbd[data-v-043da7f5]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-043da7f5]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--p-line);border-radius:var(--p-r-xs);background:transparent;color:inherit;font-family:var(--p-font-kbd);font-size:11px;line-height:1}.p-pill[data-v-043da7f5]{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border-radius:var(--p-r-full);border:.5px solid transparent;background:transparent;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-pill[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-043da7f5]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-043da7f5]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-043da7f5]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-043da7f5]{background:var(--p-surface);border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;color:var(--p-text)}.p-card.interactive[data-v-043da7f5]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-043da7f5]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-043da7f5]{display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:.5px solid var(--p-line);background:var(--p-surface)}.p-card-title[data-v-043da7f5]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text);font-family:var(--p-font-mono)}.p-card-body[data-v-043da7f5]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-043da7f5]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:.5px solid var(--p-line);background:var(--p-surface)}.p-field[data-v-043da7f5]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-043da7f5]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-043da7f5],.p-select[data-v-043da7f5],.p-textarea[data-v-043da7f5]{width:100%;height:38px;padding:0 12px;border-radius:var(--p-r-md);border:.5px solid var(--p-line-strong);background:var(--p-surface-raised);font-family:var(--p-font-sans);font-size:var(--p-font-size-base);color:var(--p-text);box-shadow:var(--p-sh-xs);transition:border-color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-textarea[data-v-043da7f5]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-043da7f5]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-043da7f5]:hover,.p-select[data-v-043da7f5]:hover,.p-textarea[data-v-043da7f5]:hover{border-color:var(--p-line-strong)}.p-input[data-v-043da7f5]:focus,.p-select[data-v-043da7f5]:focus,.p-textarea[data-v-043da7f5]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-043da7f5]::placeholder,.p-textarea[data-v-043da7f5]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-043da7f5]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-043da7f5]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-043da7f5]{width:480px;max-width:calc(100vw - 48px);background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-xl);overflow:hidden;color:var(--p-text)}.p-dialog-head[data-v-043da7f5]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-043da7f5]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-043da7f5]{font-size:var(--p-font-size-base);color:var(--p-text-muted);margin-top:4px;line-height:var(--p-leading-normal)}.p-dialog-body[data-v-043da7f5]{padding:4px 22px 18px}.p-dialog-foot[data-v-043da7f5]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-043da7f5]{display:flex;align-items:flex-start;gap:11px;width:360px;padding:13px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-md)}.p-toast .ti[data-v-043da7f5]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-043da7f5]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-043da7f5]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-043da7f5]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-043da7f5]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-043da7f5]{display:inline-flex;align-items:center;gap:8px;align-self:center;padding:4px 6px 4px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);font-size:var(--p-font-size-base);color:var(--p-text);white-space:nowrap}.p-action-toast .lk[data-v-043da7f5]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-043da7f5]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-043da7f5]{width:18px;height:18px;animation:p-spin-043da7f5 .85s linear infinite}.p-spinner.sm[data-v-043da7f5]{width:14px;height:14px}.p-spinner circle[data-v-043da7f5]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-043da7f5]{stroke:var(--p-line)}.p-spinner .arc[data-v-043da7f5]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-043da7f5{to{transform:rotate(360deg)}}.p-thinking[data-v-043da7f5]{display:inline-flex;align-items:center;gap:9px;font-size:var(--p-font-size-sm);color:var(--p-text-muted);font-family:var(--p-font-sans)}.p-bubble-user[data-v-043da7f5]{align-self:flex-end;max-width:78%;background:var(--p-user-bubble-bg);border:none;color:var(--p-text);border-radius:var(--p-r-lg);padding:10px 12px;font-size:var(--p-font-size-md);line-height:var(--p-leading-normal)}.p-msg[data-v-043da7f5]{max-width:760px;font-size:var(--p-font-size-md);line-height:var(--p-leading-relaxed);color:var(--p-text)}.p-msg p[data-v-043da7f5]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-043da7f5]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);border:0;color:var(--p-accent-hover);padding:1px 6px;border-radius:5px;font-size:.9em}.p-code[data-v-043da7f5]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:11px 13px;color:var(--p-text);overflow-x:auto}.p-action[data-v-043da7f5]{border-radius:var(--p-r-lg);overflow:hidden;border:.5px solid var(--p-line);background:var(--p-surface-raised);box-shadow:var(--p-sh-menu)}.p-action-head[data-v-043da7f5]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-043da7f5]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-043da7f5]{padding:12px 16px 0;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-action-foot[data-v-043da7f5]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-043da7f5]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-043da7f5]{display:flex;align-items:flex-start;gap:10px;padding:8px 12px;border-radius:var(--p-r-md);color:var(--p-text);font-size:var(--p-font-size-base)}.p-opt .n[data-v-043da7f5]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--p-font-size-base) * var(--p-leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--p-r-sm);background:var(--p-surface-sunken);color:var(--p-text);font-size:var(--p-font-size-xs);font-weight:500;display:inline-flex;align-items:center;justify-content:center;flex:none}.p-opt-text[data-v-043da7f5]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-043da7f5]{font-weight:500}.p-opt-text .d[data-v-043da7f5]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-043da7f5]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-043da7f5]{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--p-r-md);font-size:var(--p-font-size-base);color:var(--p-text)}.p-todo-row.done[data-v-043da7f5]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-043da7f5]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-043da7f5]{width:16px;flex:none;display:inline-flex;align-items:center;justify-content:center;user-select:none;color:var(--p-text-faint)}.p-todo-check svg[data-v-043da7f5]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-043da7f5]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-043da7f5]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-043da7f5]{color:var(--p-accent);font-weight:500}.p-dot[data-v-043da7f5]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-043da7f5]{background:var(--p-success)}.p-dot.error[data-v-043da7f5]{background:var(--p-danger)}.p-dot.running[data-v-043da7f5]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-043da7f5 1.4s ease-out infinite}@keyframes p-pulse-043da7f5{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-043da7f5]{overflow:hidden}.p-tool-group-head[data-v-043da7f5]{display:flex;align-items:center;gap:4px;padding:4px 0;cursor:pointer;border-radius:6px;font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text-faint);user-select:none;transition:color var(--p-dur) var(--p-ease)}.p-tool-group-head .tg-ic[data-v-043da7f5]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-043da7f5]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-043da7f5]{font-weight:500}.p-tool-group-head .tg-meta[data-v-043da7f5]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-043da7f5]{width:14px;height:14px;color:var(--p-text-faint);transition:transform var(--p-dur) var(--p-ease)}.p-tool-group.open .p-tool-group-head .tg-car[data-v-043da7f5]{transform:rotate(90deg)}.p-tool-row[data-v-043da7f5]{position:relative;display:flex;align-items:center;gap:4px;padding:4px 0;border-radius:6px;cursor:pointer;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text)}.p-tool-row .tr-ic[data-v-043da7f5]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-043da7f5]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-043da7f5]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-043da7f5]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-043da7f5]{font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);line-height:normal;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--p-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-faint[data-v-043da7f5]{color:var(--p-text-faint);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-chip[data-v-043da7f5]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-043da7f5]{margin-left:auto;color:var(--p-success);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add~.tr-chip[data-v-043da7f5],.p-tool-row .tr-add~.tr-add[data-v-043da7f5]{margin-left:0}.p-tool-row .tr-del[data-v-043da7f5]{color:var(--p-danger);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-bar[data-v-043da7f5]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-043da7f5]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-043da7f5]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-043da7f5]{display:flex;align-items:center;gap:8px;align-self:stretch;padding:8px 12px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);cursor:pointer}.p-agent-card .pa-ic[data-v-043da7f5]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:var(--p-surface-sunken);color:var(--p-text-muted);flex:none}.p-agent-card .pa-ic svg[data-v-043da7f5]{width:14px;height:14px}.p-agent-card .pa-main[data-v-043da7f5]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-043da7f5]{font-size:var(--p-font-size-sm);line-height:1.4;color:var(--p-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-type[data-v-043da7f5]{font-size:var(--p-font-size-xs);line-height:1.4;color:var(--p-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-ok[data-v-043da7f5]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-043da7f5]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-043da7f5]{transform:rotate(90deg)}.p-tool-detail[data-v-043da7f5]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-043da7f5]{margin-top:4px}.p-composer[data-v-043da7f5]{background:var(--p-surface-raised);border:.5px solid var(--p-line-strong);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);box-shadow:var(--p-sh-input);overflow:hidden;position:relative;z-index:1}.p-composer[data-v-043da7f5]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--p-composer-focus-line);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);opacity:0;pointer-events:none;transition:opacity var(--p-dur-slow) var(--p-ease-inout)}.p-composer[data-v-043da7f5]:focus-within:after{opacity:1}.p-composer-ta[data-v-043da7f5]{padding:14px 16px 8px;font-family:var(--p-font-sans);font-size:var(--p-font-size-md);color:var(--p-text);line-height:var(--p-leading-normal);text-autospace:normal}.p-composer-ta.ph[data-v-043da7f5]{color:var(--p-text-faint)}.p-composer-bar[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-043da7f5]{width:100%;max-width:620px;margin-top:calc(-1 * var(--space-4));display:flex;align-items:center;gap:var(--space-2);padding:calc(var(--space-4) + var(--space-2)) var(--space-2) var(--space-2);background:color-mix(in srgb,var(--color-hover) 60%,transparent);border-radius:0 0 var(--radius-2xl) var(--radius-2xl);font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);color:var(--p-text-faint);cursor:pointer}.p-composer-strip .p-ic[data-v-043da7f5]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-043da7f5],.p-composer-right[data-v-043da7f5]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-043da7f5]{border-radius:var(--p-r-full)}.p-send[data-v-043da7f5]{position:relative;width:32px;height:32px;border-radius:var(--p-r-full);display:grid;place-items:center;background:var(--p-text);color:var(--p-bg);border:none;cursor:pointer;box-shadow:var(--p-sh-xs);transition:transform var(--p-dur-fast) var(--p-ease)}.p-send[data-v-043da7f5]:after{content:"";position:absolute;inset:0;border-radius:var(--p-r-full);background:var(--p-bg);opacity:0;transition:opacity var(--p-dur-slow) var(--p-ease);pointer-events:none}.p-send[data-v-043da7f5]:hover:after{opacity:.28}.p-send[data-v-043da7f5]:active{transform:scale(.92)}.p-send .p-ic[data-v-043da7f5]{width:16px;height:16px}.p[data-v-043da7f5] ::selection,[data-p][data-v-043da7f5] ::selection{background:var(--p-selection)}.p-link[data-v-043da7f5]{color:var(--p-accent);text-decoration:none;font-family:var(--p-font-sans);transition:color var(--p-dur) var(--p-ease)}.p-link[data-v-043da7f5]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-043da7f5]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-043da7f5]{color:var(--p-text-muted)}.p-link.muted[data-v-043da7f5]:hover{color:var(--p-text)}.p-link .p-ic[data-v-043da7f5]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-043da7f5]{background:var(--color-menu-bg);border:.5px solid var(--p-line);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);padding:3.5px;min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-043da7f5]{display:flex;align-items:center;gap:7px;padding:5px 9px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-menu-item[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-043da7f5],.p-menu-item.active[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-043da7f5]{color:var(--p-danger)}.p-menu-item.danger[data-v-043da7f5]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-043da7f5]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-043da7f5]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-043da7f5]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-043da7f5]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-043da7f5]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-043da7f5]{color:var(--p-danger)}.p-menu-item.lg[data-v-043da7f5]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-043da7f5]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-043da7f5]{display:inline-flex;gap:2px;padding:2px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-sans)}.p-seg-item[data-v-043da7f5]{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-seg-item[data-v-043da7f5]:hover{color:var(--p-text)}.p-seg-item.on[data-v-043da7f5]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-043da7f5]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-043da7f5]{padding:8px 14px;font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text-muted);cursor:pointer;white-space:nowrap;border-bottom:.5px solid transparent;margin-bottom:-.5px;transition:color var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-tab[data-v-043da7f5]:hover{color:var(--p-text)}.p-tab.on[data-v-043da7f5]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-043da7f5]{position:relative;display:inline-block;width:36px;height:20px;flex:none;border-radius:var(--p-r-full);background:var(--p-line-strong);cursor:pointer;transition:background var(--p-dur) var(--p-ease)}.p-switch[data-v-043da7f5]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--p-r-full);background:var(--p-surface-raised);box-shadow:var(--p-sh-xs);transform-origin:left center;transition:transform var(--p-dur) var(--p-ease)}.p-switch[data-v-043da7f5]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-043da7f5]{background:var(--p-accent)}.p-switch.on[data-v-043da7f5]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-043da7f5]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-043da7f5]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-043da7f5]{width:17px;height:17px;flex:none;display:inline-grid;place-items:center;border:.5px solid var(--p-line-strong);border-radius:var(--p-r-sm);background:var(--p-surface-raised);color:var(--p-text-on-accent);cursor:pointer;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-check.on[data-v-043da7f5]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-043da7f5]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-043da7f5]{width:12px;height:12px}.p-avatar[data-v-043da7f5]{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--p-r-md);background:var(--p-surface-sunken);border:.5px solid var(--p-line);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:600}.p-avatar.sm[data-v-043da7f5]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-043da7f5]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-043da7f5]{width:13px;height:13px}.p-empty[data-v-043da7f5]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--p-text-muted);text-align:center}.p-empty .em-ic[data-v-043da7f5]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-043da7f5]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-043da7f5]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-043da7f5]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-043da7f5]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-043da7f5]{display:flex;align-items:center;gap:var(--space-2);width:100%;max-width:560px;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)}.p-turn-failed .tf-chip[data-v-043da7f5]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);flex:none;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger)}.p-turn-failed .tf-chip svg[data-v-043da7f5]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-043da7f5]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-043da7f5]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.p-turn-failed .tf-sub[data-v-043da7f5],.p-turn-failed .tf-meta[data-v-043da7f5]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-turn-failed .tf-meta[data-v-043da7f5]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-043da7f5]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-043da7f5]{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--p-text);color:var(--p-bg);font-size:var(--p-font-size-xs);padding:4px 8px;border-radius:var(--p-r-sm);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--p-dur-fast) var(--p-ease)}.p-tip:hover .p-tooltip[data-v-043da7f5]{opacity:1}.p-banner[data-v-043da7f5]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--p-r-md);border:.5px solid var(--p-line);background:var(--p-surface);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-banner .bn-ic[data-v-043da7f5]{width:18px;height:18px;flex:none}.p-banner.info[data-v-043da7f5]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-043da7f5]{color:var(--p-accent)}.p-banner.warning[data-v-043da7f5]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-043da7f5]{color:var(--p-warning)}.p-banner.danger[data-v-043da7f5]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-043da7f5]{color:var(--p-danger)}.p-sheet[data-v-043da7f5]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl) var(--p-r-xl) 0 0;box-shadow:var(--p-sh-xl);padding:8px 16px 20px}.p-sheet-handle[data-v-043da7f5]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-043da7f5]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-043da7f5 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-043da7f5{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-043da7f5]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-043da7f5]{flex:1;min-width:0;height:38px;display:flex;align-items:center;gap:10px;padding:0 10px 0 14px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-cmd .cmd-text[data-v-043da7f5]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-043da7f5]{margin-left:auto;flex:none;display:grid;place-items:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--p-r-sm);color:var(--p-text-faint);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-cmd .cmd-copy[data-v-043da7f5]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-043da7f5]{width:15px;height:15px}.p-topbar[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 16px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg)}.p-topbar .tb-title[data-v-043da7f5]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-043da7f5]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-043da7f5]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-043da7f5]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-043da7f5]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-043da7f5]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-043da7f5]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-043da7f5]{flex:1;min-width:0}.demo-chat[data-v-043da7f5]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-043da7f5]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-043da7f5]{grid-column:1 / -1;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--d-fg-muted)}.icon-cell[data-v-043da7f5]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:.5px solid var(--d-line);border-radius:8px;background:var(--d-surface)}.icon-cell .kw-icon[data-v-043da7f5]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-043da7f5]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-043da7f5]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-043da7f5]{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--d-fg-muted);font-family:JetBrains Mono,ui-monospace,monospace}.p-code-inline[data-v-043da7f5]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);color:var(--p-text);padding:0 5px;border-radius:var(--p-r-sm);font-size:.9em}.p-code-block[data-v-043da7f5]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;background:var(--p-surface-sunken)}.p-code-block-head[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-code-block pre[data-v-043da7f5]{margin:0;padding:12px 14px;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;color:var(--p-text);overflow-x:auto}.p-diff[data-v-043da7f5]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm)}.p-diff-head[data-v-043da7f5]{padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-diff-row[data-v-043da7f5]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-043da7f5]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-043da7f5]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-043da7f5]{color:var(--p-success)}.p-diff-row.del[data-v-043da7f5]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-043da7f5]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-043da7f5]{color:var(--p-text)}.p-field-error[data-v-043da7f5]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-043da7f5]{vertical-align:middle}.p-btn .p-spinner .track[data-v-043da7f5]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-043da7f5]{stroke:currentColor}.ds-page[data-v-043da7f5]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-043da7f5]{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-4);background:var(--color-surface);border-bottom:.5px solid var(--color-line)}.ds-back[data-v-043da7f5]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-3);border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer}.ds-back[data-v-043da7f5]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-043da7f5]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)} diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-CTUhpkDe.js b/apps/kimi-code/dist-web/assets/DesignSystemView-CTUhpkDe.js new file mode 100644 index 000000000..2b2355945 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-CTUhpkDe.js @@ -0,0 +1,13 @@ +import{M as T,aD as z,aI as q,aL as o,u as i,v as a,G as t,H as d,F as p,aX as w,bb as y,I as c,bk as f,cx as h,cy as B,cz as k,cA as A,cB as M}from"./index-D-7nOosq.js";const I={class:"ds-page"},V={class:"layout"},H={class:"content"},L={class:"content-inner"},E={id:"tokens"},D={class:"icon-sizes"},O={class:"sz"},W={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},R={class:"sz"},N={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},U={class:"sz"},P={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"icon-grid"},j={class:"icon-group-label"},K={class:"ic-name"},G={id:"primitives"},_={class:"stage-wrap"},J={class:"stage p"},Q={class:"p-pill",style:{color:"var(--p-warning)"}},Y={class:"stage-wrap"},Z={class:"stage p col"},X={class:"demo-row"},$={class:"p-btn primary disabled"},ee={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},ae={class:"stage-wrap"},te={class:"stage p col"},de={class:"demo-row"},se={class:"stage-wrap"},oe={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},ie={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ne={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},le={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},re={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ce={id:"chat"},ve={class:"stage-wrap"},fe={class:"stage p col"},pe={style:{"max-width":"560px",width:"100%"}},he={class:"stage-wrap"},ue={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ge={class:"p-composer",style:{width:"100%","max-width":"620px"}},be={class:"p-composer-bar"},me={class:"p-composer-left"},we={class:"p-pill",style:{color:"var(--p-warning)"}},ye="/repo",ke=T({__name:"DesignSystemView",emits:["close"],setup(xe,{emit:x}){const C=[{path:"/repo/apps/web/src/components/chat/TurnFilesSummary.vue",added:19,removed:4,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/composables/useFilePreview.ts",added:8,removed:1,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/components/chatTurnRendering.ts",added:0,removed:0,hasWrite:!0,statsIncomplete:!0,diff:null},{path:"/repo/apps/web/src/lib/toolDiff.ts",added:3,removed:2,hasWrite:!1,statsIncomplete:!1,diff:null}];function u(){}const S=x;function g(){S("close")}let v=null;function b(r){r.key==="Escape"&&g()}return z(()=>{document.addEventListener("keydown",b);const r=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),e=new Map;r.forEach(l=>{const s=l.getAttribute("href");if(!s)return;const m=document.getElementById(s.slice(1));m&&e.set(m,l)});let n=null;v=new IntersectionObserver(l=>{l.forEach(s=>{s.isIntersecting&&(n&&n.classList.remove("active"),n=e.get(s.target)??null,n&&n.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),e.forEach((l,s)=>v.observe(s)),r.length&&r[0].classList.add("active")}),q(()=>{document.removeEventListener("keydown",b),v&&(v.disconnect(),v=null)}),(r,e)=>(o(),i("div",I,[a("div",{class:"ds-topbar"},[a("button",{class:"ds-back",type:"button",onClick:g},"← Back"),e[0]||(e[0]=a("span",{class:"ds-topbar-title"},"Design system",-1))]),a("div",V,[e[44]||(e[44]=t('',1)),a("main",H,[a("div",L,[e[42]||(e[42]=t('
● Design System · v1.0

Kimi Web Design System

This document defines the visual language and component specification for Kimi 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/kimi-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. Kimi 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.

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)),a("section",E,[e[7]||(e[7]=t(`
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 semantic tokens. Each ships a light value in :root and a dark override in the data-color-scheme blocks — for example --color-bg is #ffffff in light and #121212 in dark; --color-accent is the brand blue (#1783ff light / #1a88ff dark). The semantic status colors (success / warning / danger / info) are independent palettes, one set each for light / dark.
bg
#ffffff / #121212
surface
#f5f5f5 / #1f1f1f
surface-sunken
#f5f5f5 / #121212
well
#f5f5f5 / #1f1f1f
surface-deep
#f5f5f5 / #0d0d0d
surface-overlay
#ffffff / rgba(255,255,255,.1)
selected
rgba(0,0,0,.05) / rgba(255,255,255,.1)
fg
rgba(0,0,0,.9) / rgba(255,255,255,.84)
fg-muted
rgba(0,0,0,.6) / rgba(255,255,255,.56)
line
rgba(0,0,0,.13) / rgba(255,255,255,.12)
subtle
rgba(0,0,0,.05) / rgba(255,255,255,.05)
accent (KMBlue)
#1783ff / #1a88ff
accent-soft
#e8f3ff / rgba(26,136,255,.1)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#f5f5f5#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-menu-bgrgba(255,255,255,.95)rgba(41,41,41,.95)Floating menu panel — frosted glass over --p-menu-backdrop blur
--color-surface-overlay#ffffffrgba(255,255,255,.1)Field-control fill on raised cards (selects, steppers) — top rung; light tops out at white (the level is carried by the border), dark steps one rung above raised. Floating layers stay at raised
--color-well#f5f5f5#1f1f1fContent well on the page (code blocks, tool-output panels, match/file lists, media thumbnails) — light reuses the sunken recess; dark lifts one rung ABOVE the page, because a true recess (#121212) vanishes into the page there
--color-surface-deep#f5f5f5#0d0d0dDeep chrome plane one step BELOW the page (panel headers, diff gutters) — dark drops under --color-bg so chrome framing stays darker than the content it frames
--color-textrgba(0,0,0,.9)rgba(255,255,255,.84)Body text / headings
--color-text-strong#000000#ffffffMax foreground emphasis — menu-row label & icon on hover
--color-text-mutedrgba(0,0,0,.6)rgba(255,255,255,.56)Secondary text / placeholder
--color-linergba(0,0,0,.13)rgba(255,255,255,.12)Divider / card border
--color-subtlergba(0,0,0,.05)rgba(255,255,255,.05)Subtle hairline — tertiary separators below --color-line (diff-gutter column rules, quiet dividers inside wells)
--color-selectedrgba(0,0,0,.05)rgba(255,255,255,.1)Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hoverrgba(0,0,0,.03)rgba(255,255,255,.05)Row hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface. The global hover rule: transparent-base controls overlay this f1 wash (hover never darkens — never sunken); filled controls use their own hover token (accent-hover, send-bg-hover)
--color-inline-code-bgrgba(0,0,0,.03)rgba(255,255,255,.1)Inline-code chip fill — fills.f1 / fills.f2; dark lifts off any dark surface (sunken == bg there)
--color-media-alpha-bg-1≈#858585≈#76797eCheckerboard 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≈#8c8f93Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#f9fbfc#0d0d0dSidebar surface — one step off --color-bg (just under white in light, one step BELOW the page in dark) so the session column reads as its own plane and never brighter than the reading surface
--color-scrimrgba(0,0,0,.4)rgba(0,0,0,.6)Modal scrim — the dark veil behind dialogs/lightboxes (mask.base; legacy hardcoded overlays can migrate here)
--color-scrim-strongrgba(0,0,0,.6)rgba(0,0,0,.75)Stronger scrim for full-screen media previews (mask.strong — the PhotoSwipe image preview backdrop)
--color-text-on-scrim#ffffffsameText drawn on the scrim (captions over the media lightbox)
--color-accent#1783ff#1a88ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Palette

The palette is the production kimi.com palette (design tokens tokens.json): neutral-gray surfaces, an alpha-based label / fill / separator ramp (labels.* / fills.* / separator.s1), the KMBlue accent, and a true neutral dark ladder (#121212 → #1f1f1f → #292929; the deep chrome plane and sidebar derive one step below at #0d0d0d — the palette has nothing darker than primary).

The ONE deliberate exception is the status hues: success / warning / danger / done keep the app's own WCAG-tuned ramp (≥4.5:1 on the neutral surfaces) — the production status colours (positiveGreen #16c456, orange #ff9500, danger red #ff3849) are too bright against it. Diff add/del bands happen to coincide (both use the production 25% fills in light, 14% in dark).

Surface usage

The surface layers each have a role — choose by "field overlay / raised layer / content well / default flat layer / sunken layer / page background / deep chrome", and avoid treating --p-surface-raised as a universal background. In dark, elevation = lighter: floating layers sit above the content, content wells sit above the page, and chrome planes (sidebar, panel headers) sit below it — never the reverse. One consequence: on the page itself, never use --color-surface-sunken for a content carrier — it equals --color-bg in dark and the fill vanishes; use --color-well. Sunken stays correct INSIDE surface / raised cards, where it is a genuine recess. Field controls (selects, steppers) on a raised card use --color-surface-overlay, the top fill rung; floating layers keep --color-surface-raised — their elevation is shadow + hairline, not a lighter fill.

TokenLightDarkUsage
--p-surface-overlay#ffffff#22272eField controls on raised cards — select, stepper (top fill rung; light = white)
--p-surface-raised#ffffff#1c2128Raised card / dialog / input (raised layer)
--p-well#f3f5f8#13181eCode block / tool output / list carrier directly on the page (content well — light: recessed, dark: one rung above the page)
--p-surface#fafbfc#13181ePanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#0d1117Recessed area INSIDE a surface / raised card — never a content carrier on the page (sunken layer)
--p-bg#ffffff#0d1117Page background
--p-surface-deep#fafbfc#0a0d12Panel header / diff gutter (deep chrome layer — below the page in dark)

Borders & hairlines

Three line tokens, three jobs: --color-line is the default structural separator, --color-subtle the tertiary separator that must stay quieter (diff-gutter column rules, quiet dividers inside wells), and --color-line-strong the edge of interactive controls (inputs, selects, secondary buttons). Width is one: 0.5px — every stroke is the same hairline, on static structural edges (card rims, plane seams, header dividers), interactive control rims and floating layers alike. Separation comes from luminance first — planes one rung apart already read as distinct in dark, so their shared edge stays a 0.5px hairline rather than a heavier border; same-rung neighbours (list rows, card head / body) are exactly where a hairline is required. In dark, drop shadows fade on near-black surfaces, so a floating layer's edge IS its hairline — never ship a shadow-only floating surface. (Legacy --line / --line2 alias --color-line / --color-subtle for one cycle; new work references the v2 names.)

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

Kimi Web uses two font tokens: --font-ui (UI and body, with Schibsted Grotesk for Latin and Noto Sans SC for Simplified Chinese) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Schibsted Grotesk + Noto Sans SC)

Body and UI use self-hosted Schibsted Grotesk for Latin text and self-hosted Noto Sans SC Variable for Simplified Chinese. Platform fonts remain as fallbacks:

--font-ui
--font-ui: "Schibsted Grotesk Variable", "Helvetica Neue", Arial,
+      "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC",
+      "Microsoft YaHei",
+      -apple-system, BlinkMacSystemFont, "Segoe UI",
+      Roboto, Ubuntu, sans-serif,
+      "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";

--font-mono · Code & monospace

Code, line numbers, diffs, and Bash commands use JetBrains Mono (a self-hosted variable font), falling back to the system monospace. Other tool labels and summaries use the UI font:

--font-mono
--font-mono: "JetBrains Mono Variable", "JetBrains Mono",
+      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

Loading strategy

FontSourceBundledUsage
JetBrains Mono@fontsource-variable/jetbrains-mono✓ self-hostedmonospace / code (--font-mono)
Schibsted Groteskprepare-fonts → app-ui/assets/fonts✓ generated + bundledUI / body / display (--font-ui, --font-display), wght 400-900, normal + italic
Noto Sans SCprepare-fonts → app-ui/assets/fonts✓ generated + bundledSimplified Chinese UI / body, wght 100–900
System UI / CJK fontsoperating systemlate fallback for UI / body
Schibsted Grotesk, Noto Sans SC, and JetBrains Mono are self-hosted. They make no external network requests and work offline; platform fonts remain as fallbacks.

Usage rules

Type scale & weight

The user font-size preference is one of four named steps (small / medium / large / xlarge, Medium default) written to data-font-scale on <html>; the step name is persisted, never a px value. The step only moves --base-font; every size token derives additively (default + shift), and line heights are locked to integer px via round(size × ratio, 1px) — never a unitless ratio.

Two token groups share the shift but keep their own ratios: --ui-* for chrome (tight, 1.40–1.50) and --md-* for Markdown content + the composer (loose, 1.56–1.63; body is anchored to the UI body size — the spec's +2px offset was dropped as a product decision — while keeping its own looser line-height ratios). T0/T1 cap at 24/22px on the top steps (built into the tokens via min() — do not remove). Use the .text-ui-* / .text-md-* utility classes; legacy aliases --ui-font-size (→ --ui-b2), --content-font-size (→ --md-b1) and the whole 6-level --text-* ramp (xs→c1, sm→b2−1px, base→b2, lg→t2, xl→t1, 2xl→t0) keep older components on the ramp. Panel titles sit at the base step (--ui-b2); dropdown menu items sit one rung below (--text-sm = b2 − 1px) — both still follow the user's font scale.

Section Title
--ui-t1 · title (cap 22)
Card title
--ui-t2 · subtitle
UI emphasis
--ui-b1 · body strong
UI control / button / form
--ui-b2 · body
Helper text / table
--ui-c1 · caption
Badge / timestamp
--ui-c2 · non-critical only
Markdown H1
--md-h1
Chat body / message bubbles / composer
--md-b1 · prose body
Quote / table
--md-b2 · secondary
Code block / inline code
--md-b3 · weak / code

The fixed product type tokens still define scale-independent defaults: transcript prose enables text-autospace: normal for mixed CJK and Latin text. Drop stray font-weight: 650 / 750; converge on 400 / 500 (regular / emphasis), with a dedicated 600 weight for sidebar section labels.

TokenValueUsage
--font-ui"Schibsted Grotesk Variable", …, "Noto Sans SC Variable", …UI & body (Schibsted Grotesk + Noto Sans SC)
--font-kbd"Schibsted Grotesk Variable", system-ui, sans-serifkeyboard shortcut keycaps
--font-monoJetBrains Mono…code, Bash commands, line numbers, diffs
data-font-scalesmall / medium / large / xlargeuser preference on <html>; sets --base-font (12–18px), Medium = 14px default
--ui-t0…--ui-c2default + --ui-shift, t0/t1 capped via min()chrome type ramp (title / subtitle / body / caption); .text-ui-* classes
--md-h1…--md-b3default + --md-shiftMarkdown ramp (headings / body / secondary / code); .text-md-* classes
--ui-font-size / --content-font-sizevar(--ui-b2) / var(--md-b1)legacy aliases kept on the ramp
--code-font-sizecalc(var(--content-font-size) - 2px)standalone code surfaces (diff view, file preview, tool cards) — one step below body, 12px @ Medium; prose-embedded code stays on the --md-* ramp
--text-xs / sm / base / lg / xl / 2xlc1 / b2−1 / b2 / t2 / t1 / t0legacy ramp, aliased into the scale
--leading-tight/normal/prose/relaxed1.25 / 1.5 / 1.6 / 1.7headings / UI / chat prose / long text
--weight-regular/option-label/medium/ui-strong400 / 475 / 500 / 525body / settings labels / emphasis / compact UI emphasis
--weight-section-label600sidebar section labels

Icon size

Icons use three size tokens uniformly. The global .p-ic default is 16px (--p-ic-md); components pick as needed, and random pixel sizes are forbidden.

TokenValueUsage
--p-ic-sm14pxsmall button, badge, menu item, inline link icon
--p-ic-md16pxdefault (button, icon button, toolbar)
--p-ic-lg20pxToast status icon, empty-state illustration

Icon

Icons always come from the centralized registry lib/icons.ts: in templates use the <Icon name size /> component (components/ui/Icon.vue); for v-html contexts (such as a tool glyph) use iconSvg(name, size). Do not hand-write <svg> — the scripts/check-style.mjs icon-from-registry rule flags stray SVGs. Every glyph shares the 24×24 source grid and currentColor (colour follows text); size uses the three tokens below, and only icons imported in lib/icons.ts are bundled by unplugin-icons at build time. Three collections feed the registry, in this order of preference: ~icons/kimi/* — Kimi Design System icons (24×24 outlined, 1.8px stroke), local SVGs under src/icons/kimi/ registered as a custom collection in the Vite config, used whenever a Kimi glyph exists for the intent; ~icons/tabler/* — Tabler Icons (MIT), for the few gaps it uniquely covers (today: the right-panel toggle); and ~icons/ri/*Remix Icon (Apache-2.0), for the remaining intents the Kimi set does not cover yet. A few glyphs are filed under their intent rather than the upstream asset name (see the lib/icons.ts header). When an icon is missing, prefer a glyph from the Kimi icon set: copy the SVG into src/icons/kimi/ (kebab-case name, monochrome currentColor) and register it — two static imports (component + ?raw string) plus one entry in ICONS; reach for Remix only when no Kimi glyph fits, and never draw paths in a component.

Size scale

`,49)),a("div",D,[a("div",O,[(o(),i("svg",W,[...e[1]||(e[1]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[2]||(e[2]=d("sm · 14",-1))]),a("div",R,[(o(),i("svg",N,[...e[3]||(e[3]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[4]||(e[4]=d("md · 16",-1))]),a("div",U,[(o(),i("svg",P,[...e[5]||(e[5]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[6]||(e[6]=d("lg · 20",-1))])]),e[8]||(e[8]=a("h4",{class:"mini"},"Icon library",-1)),e[9]||(e[9]=a("p",null,[d("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),a("code",null,"ICON_GROUPS"),d(" in "),a("code",null,"lib/icons.ts"),d(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),a("div",F,[(o(!0),i(p,null,w(f(B),([n,l])=>(o(),i(p,{key:n},[a("div",j,y(n),1),(o(!0),i(p,null,w(l,s=>(o(),i("div",{key:s,class:"icon-cell"},[c(f(h),{name:s},null,8,["name"]),a("span",K,y(s),1)]))),128))],64))),128))]),e[10]||(e[10]=t('

Do not use emoji as functional icons. The Kimi brand mark (the robot mascot logo) is a brand asset and is not part of this icon system.

A few special graphics are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <ContextRing :pct /> (the Composer context progress ring, data-driven), <AuthStateIcon kind /> (the success / expired / error colored illustrations in the login flow), <Spinner /> (loading state). Status dots (such as in the Provider list) always use CSS dots (border-radius:50%), not SVG. The scripts/check-style.mjs icon-from-registry rule exempts the above and the brand mark; all other hand-written <svg> is flagged.

Spacing

A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.

--space-1 · 4
icon gap, badge padding
--space-2 · 8
control gap, small padding
--space-3 · 12
button padding, form-item gap
--space-4 · 16
card padding, grid gap
--space-5 · 20
dialog padding
--space-6 · 24
section gap
--space-8 · 32
large section gap

Dense list (sidebar / file tree)

High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: in-row vertical padding --space-1 (4px), no margin between rows (the hover pill provides the separation); section gap (between logo / search / action buttons / group title / list) uniformly --space-2 (8px); between groups --space-2; the brand header is slightly looser at the top (--space-3). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.

Radius

Merge the existing 14 values into the nearest of 7 scale steps. Rule: the component type determines the radius, not the author's feel. The Composer shell is the sole product-specific exception: its 32px radius pairs with superellipse(1.5) so the flatter curve stays visually concentric with its controls.

xs · 4
sm · 6
md · 8
lg · 12
xl · 16
2xl · 20
composer · 32 / 1.5
full · 999
TokenValueUsageMerged from
--radius-xs4pxsmall badge, inline tag2/3/4px →
--radius-sm6pxsmall button, icon button, menu item5/6px →
--radius-md8pxbutton, input, badge, card7/8/9px →
--radius-lg12pxmenu, toast, bubble, floating card10/12px →
--radius-xl16pxcontainer baseline: dialogs, settings cards, sheets, work panel13/16px →
--radius-2xl20pxworkspace attachment card bottom (0 0 2xl 2xl) tucked under the composer18/20px →
--radius-composer32pxComposer shell, with --corner-shape-composerproduct-specific
--radius-full999pxpill badge, avatar, send button999px / 50%

Elevation & z-index

Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating 9999-style one-upping.

sm · dropdown menu / sticky
md · Toast
lg · overlay (reserved)
xl · dialog
Z-index TokenValueUsage
--z-base0normal flow
--z-sticky100sticky header / sidebar
--z-dropdown200dropdown menu
--z-overlay300overlay / bottom Sheet
--z-modal400dialog — sibling overlays tie-break by DOM order, so the global confirm (ConfirmDialogHost) mounts on demand to always land last / on top
--z-modal-dropdown500menus / popovers that open above a modal dialog (teleported to <body>, e.g. the settings SecondaryModelPicker cascade)
--z-toast600toast
--z-tooltip650tooltip bubble — transient and pointer-events none, so it sits above everything (dialogs, toasts) to stay visible anywhere
--z-max9999reserved: only this tier for extreme fallback

Motion

TokenValueUsage
--ease-outcubic-bezier(0.16, 1, 0.3, 1)enter, hover, expand
--ease-in-outcubic-bezier(0.4, 0, 0.2, 1)panel width, layout changes
--duration-fast120mspress, focus
--duration-base160mshover, show/hide
--duration-slow260msdialog, Sheet, layout
--duration-hover-intent250mshover-intent reveal gate (TOC rail)
--anim-rive-spin416.7msnew-chat / folder-plus icon: plus spin on hover
--anim-leftbar533.3mssidebar toggle icon: arrow fly-in on hover
--anim-leftbar-shrink200mssidebar toggle icon: divider shrink on hover

The --anim-* lengths are track timings ported verbatim from the designer's Rive exports, so they sit outside the --duration-* ramp on purpose — retiming the ramp must not distort them. Their interpolation stays linear because the easing is already baked into the dense keyframe stops; a token easing would double-apply. Three hover tracks use them today: the sidebar toggle shrinks its divider to half height while an arrow flies in and settles (the expand variant mirrors the track from the left), and the new-chat / folder-plus pluses do one bouncy spin. Each track is keyed to an id inside its own glyph (#bar-divider, #bar-arrow / #bar-arrow-expand, #p1, #af-p1) so every instance of the icon animates, and all revert on mouse-out. They still fall under the global reduced-motion switch below.

Reduced motion

i
Under @media (prefers-reduced-motion: reduce), all animation and transition durations drop to about 0.001ms (effectively off), and the chat working indicator's mascot renders its static fallback instead of the Rive loop. Components should not check this individually; it is handled uniformly in the global styles. The switch clears durations, not transition-delay: a hover-intent gate (the conversation TOC's 250ms reveal) decides whether hidden content appears, and clearing it would make pointer fly-bys strobe content for reduced-motion users.

Layout & breakpoints

Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.

TokenValueUsage
--p-sidebar-w264pxleft session sidebar width
--p-content-max760pxchat reading-column max width (regular chat prose)
--p-content-wide920pxwide content (settings / panel)
--p-table-max1040pxdesktop wide-table max width (see §04)
--p-table-cell-max700pxmax width of a single table column; longer cell content wraps (see §04)
--p-bp-sm640pxmobile / desktop boundary
--p-bp-md980pxnarrow / wide screen boundary
i
At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap.
',24))]),a("section",G,[e[27]||(e[27]=t(`
03

Primitives

Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — variant / size — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors.

i
For every interactive primitive, the keyboard behavior, focus, and ARIA contract are in §08 Accessibility. New primitives must ship with a keyboard model — mouse-only interaction is not enough.

Component selection guide

ScenarioUse
Primary action (submit / confirm)Button variant=primary
Secondary action / cancelButton secondary / ghost
Destructive action (delete / abort)Button danger / danger-soft
Status markerBadge
Toolbar filter / model switchPill
2–5 mutually exclusive optionsSegmentedControl
Top tabsTabs
Switch / multi-selectSwitch / Checkbox
Scrollable regions with overlay controlsScrollArea
Floating content card / list action menuCard / Menu
Inline notice / global toastBanner / Toast
Dialog / confirmation · bottom panel (mobile)Dialog / Sheet

Button

4 semantic variants × 3 sizes. The primary action primary takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses --radius-md uniformly (small size --radius-sm), weight 600, with a visible focus ring.

Variant matrix lightpreview
medium · default
small
With icon / state
Dark skin dark

API

Button.vue · usage
<Button variant="primary" size="md" :loading="submitting">Save</Button>
+    // variant: primary | secondary | ghost | danger | danger-soft
+    // size:    sm | md | lg
States

IconButton

Unified into three sizes — 26 / 32 / 44px — with the neutral --color-hover wash on hover and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.

IconButton
i
The desktop IconButton comes in sm 26 / md 32; on touch devices the tap target should be ≥ 44px, so use lg 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses lg). Icon-only buttons must also name themselves on hover: pass tooltip (usually the same text as labellabel alone only sets the aria-label); bare icon <button>/<a> triggers wrap the Tooltip component directly.

Badge · Chip · Pill

Collapsed into two kinds: Badge (status badge, with an optional status dot) and Pill (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.

Badge · status badge
Semantic variants
pendingrunningcompletedneeds confirmationfailedKIMI
With icon / small size
planpassedread-only
`,19)),a("div",_,[e[14]||(e[14]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),a("div",J,[e[12]||(e[12]=t('kimi-k2· thinking',1)),a("span",Q,[c(f(h),{name:"shield-question",size:"sm"}),e[11]||(e[11]=d("yolo",-1))]),e[13]||(e[13]=a("span",{class:"p-pill"},[a("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[a("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"})]),d("12k / 200k")],-1))])]),e[28]||(e[28]=t(`

Kbd · keyboard shortcut

Kbd renders a shortcut as keycaps — one block per key, never inline text like (⌘K). Caps are 18px tall (Badge sm rhythm): transparent ground with a 0.5px hairline edge, 11px --font-kbd (Inter + system-ui), text colour inherited from the row that carries it — the cap has no fill or colour of its own, so it follows its context (bright inside the accent-ringed recording box, quiet in a hint row). Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row), and inside dialog navigation hints.

Kbd · keycaps
KCtrlKP

Card / Surface

All cards across the site share one structurehead / body / foot — and come in two tiers by visual weight:

Operation card · compact mono head (no fill)
read_filesession.ts
The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the Swarm composite card.
Attention card · floating neutral surface (no color band)
A decision needs your confirmation
A floating neutral card — no color band. The raised surface, large radius and soft shadow lift it above the transcript; the head is a plain dark title, and the hairline footer lines up quiet text buttons leading to one solid primary action.
Activity run · a summary row expands into the folded lines
Read 2 files
Readsession.tssrc/auth34 lines
Readmiddleware.tssrc/auth58 lines

Input / Select / Textarea

Unified 38px height (32px small), --radius-md radius, --color-surface-overlay background, and a unified blue focus ring (0 0 0 3px accent-soft). Select is a custom combobox and listbox, not a native <select>; opening it centres the selected option in the scrollable menu. Open Select roots enter the dropdown layer; containing settings groups temporarily release clipping and join that layer so later sections cannot cover the menu.

Form primitives
Only letters, numbers, and hyphens are allowed.
States
Please enter a valid workspace name
Normal state · validation passed

Code / Diff

Diff controls: The non-selectable branch summary starts with a 14px branch icon, aligns to the panel header's 12px inset, uses 12px labels, and ends with a 0.5px hairline. List and tree choices use the 14px list and tree-view registry icons. Flat-list and tree-view paths use the UI font at 12px. Tree roots share the flat list's 14px content inset, then each depth advances by 12px and adds a grey indentation rule.

Diff empty state: Centre the clean-workspace message in the available panel height and lead with a quiet 32px status icon.

Diff detail body: the right-side diff detail reuses HighlightedCode unframed (the panel owns the edge and scroll) — shiki highlighting with the language inferred from the file path, an old/new line-number gutter, hunk headers as a muted band, at the shared code size --code-font-size (12px at Medium, one step below body text). The file preview's code body (text / JSON / HTML and Markdown source) renders through the same component with a per-row number gutter plus search-hit / jump-target row states.

Inline code, code blocks, and diff contents use the monospace font (--p-font-mono); diff change counts and branch summaries use the UI font. Code blocks have a filename title bar and a copy button; the action edge uses a compact 6px inset. Diffs use + / - row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.

Code / Diff
inline code
The server uses jwt.verify(token) to verify the signature, returning 401 on failure.
code block
session.ts
import { verify } from './jwt';
+
+    export function auth(token: string) {
+      return verify(token, process.env.JWT_SECRET!);
+    }
diff
session.ts · +3 -1
import { verify } from './jwt';
-const secret = 'dev-secret';
+const secret = process.env.JWT_SECRET!;
return verify(token, secret);

Dialog

One dialog primitive replaces 6 hand-written implementations: unified --radius-xl radius, --shadow-xl shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.

Dialog primitive
New chat
Create an independent Agent chat in the current workspace.
i
Size & height: Dialog offers three widths — md 440 / lg 640 / xl 760 (--p-content-max) — chosen by content weight. Height comes in two kinds: auto (default, grows with content up to max-height) and fixed (constant height min(680px, 100vh - 64px), with overflow scrolled inside the body). Content / multi-tab dialogs (settings, model picker, provider manager, folder browser) always use fixed so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep auto. Selectable controls inside Settings use 0.5px hairlines. Its navigation stays transparent on the grouped canvas — separated from the content region by the 0.5px hairline (horizontal in the stacked mobile layout) — and uses 12px labels at weight 525 with 16px registry icons; the selected tab paints the same neutral --color-hover wash as hover, with the label simply brightening to --color-text — the Kimi app settings nav's recipe (.ss-nav-item--activeFills-F1, no accent tint, no weight change); section captions use 16px UI text in --color-text. Every setting row has a plain-language description; option labels use --color-text at weight 475 with a 1px gap before that description. Chinese descriptions use “思考” and “计划模式” rather than the English terms; “skills” stays lowercase when it appears within a sentence. Every settings section puts its rows inside one rounded group with 0.5px dividers; the content region paints the flat --color-surface so each group (--color-surface-raised) reads one rung above it — never a sunken pit, which would sink the dialog's content below its chrome in dark. The font-size stepper is a compact 32px UI-font control with 12px values and custom minus and plus buttons. Its 52px desktop row centres the control with equal space above and below. Archived workspace headings reuse the sidebar’s folder-closed registry icon, and Restore actions lead with the undo icon. Archive counts use weight 500; timestamps and workspace paths use the UI font.

Dialog backdrop: Use a restrained 28% neutral overlay so the workspace remains legible without competing with the modal.

Settings regions: The settings title and close action belong to the right content region. The navigation is a separate full-height region that starts at the dialog's top edge, not content beneath a dialog-wide header.

Archived sessions: Start with the localized page title. Do not add a repeated English kicker above it.

Settings interaction: Notification labels and descriptions are not selectable; their switches remain fully interactive.

Conversation chrome: Header labels are not selectable; the rename input remains selectable and editable. Branch names start with a 14px branch icon. The overflow trigger is a compact 24px control with a 14px icon. Below a 720px header container, hide the workspace prefix and give the conversation title the available width. On macOS desktop the header doubles as the window-drag region and interactive controls opt out with no-drag; while one of its menus or a dock work panel is open every window-drag strip (chat header, sidebar header, panel header) drops the drag region so an outside press anywhere reaches the page and dismisses the overlay (window dragging is simply paused).

Session search: follows the §09 flush picker anatomy — a boxed Input under the head, and a result list that fills the body's available height and owns vertical scrolling.

Model picker: follows the §09 flush picker anatomy; the provider filter remains horizontally scrollable without showing a persistent scrollbar. Only the model list scrolls; the shortcut bar remains pinned at the bottom.

Toast

Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise. For an undoable action there is a second, lighter form — the Action toast (ActionToast.vue): a pill floating top-center just below the 48px header, carrying a one-line sentence whose actions are plain inline <button>s (styled accent by the component), plus close. Self-timed (default 8s, hover pauses); the parent re-keys to reset and wraps it in a <Transition>. First used by session archive (Undo / Settings); warnings keep the bottom-right Toast stack.

Toast
Connected to server
The local server is responding normally; you can start a new chat.
Context usage 82%
Consider running /compact to free up space.
Action toast
or view archived chats in

Spinner

Loaders fall into two categories by scenario — do not mix them:

Spinner · plain loader (default)

`,39)),a("div",Y,[e[18]||(e[18]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Spinner · common scenarios")],-1)),a("div",Z,[a("div",X,[e[17]||(e[17]=t('Loading…',2)),a("button",$,[(o(),i("svg",ee,[...e[15]||(e[15]=[a("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),a("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),e[16]||(e[16]=d("Submitting",-1))])])])]),e[29]||(e[29]=a("h4",{class:"mini"},"WorkingIndicator · 小蓝 mascot (only the chat working state)",-1)),a("div",ae,[e[20]||(e[20]=a("div",{class:"stage-bar"},[a("span",{class:"st"},[d("WorkingIndicator · chat working state only "),a("span",{class:"tag spec"},"signature")])],-1)),a("div",te,[e[19]||(e[19]=a("span",{class:"stage-label"},"Usage · only while the chat has an unfinished prompt",-1)),a("div",de,[c(k,{label:"Requesting…"}),c(k,{label:"Working…"})])])]),e[30]||(e[30]=t('
i
The chat working state is rendered uniformly by WorkingIndicator — the 小蓝 mascot (KimiMascot, the kimi.com avatar Rive asset, with a static SVG fallback under reduced motion or when the runtime fails) plus a phase label. All other loading states use the plain Spinner.

Link

Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. File links inside inline code use a 1.5px underline offset so the line stays clear of the chip background. The .muted variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.

Link · inline link
Read the full design token docs before building.View on GitHubView history

Menu / Dropdown

Desktop menus use a 3.5px panel inset. Standard items use 5px × 9px padding and a 7px icon gap. Their three-layer neutral shadow stays below 4% opacity.

Dropdown menu panel: frosted glass — the translucent --color-menu-bg fill over a blurred, saturated page backdrop (--p-menu-backdrop) — plus hairline + light shadow (--shadow-menu, a three-layer neutral ramp). This is the one place glassmorphism is the design language rather than an exception (§06); every floating menu surface (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups) uses the token pair, never ad-hoc blur values. Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. All menu actions use 13px labels at weight 475 with 16px leading icons; both share a 16px line box for vertical alignment. Menu timestamps use the UI font. On touch / mobile, use lg (≥44px row height) while keeping the same type size. A dropdown menu pops in from its trigger corner — fade plus a slight 0.97 scale over --duration-base (exit --duration-fast), the composer model dropdown's motion language; the transform origin and the nudge direction follow the anchoring, including the upward flip near the viewport edge.

Row states: hover uses the mode-aware --color-hover wash (it lightens under dark, never darkens); a leading icon sits one rung below the label (--muted), and on hover both label and icon step up to --color-text-strong, the max foreground tier. Selection keeps the accent pair (--color-accent-soft / --color-accent-hover); danger keeps its own colour.

Menu · dropdown menu
Open file
Selected item
Disabled item
Delete chat

SegmentedControl

Mutually exclusive short option groups, commonly used for 2–5 option switches such as "light / dark / follow system" or the four font-scale steps. Options may include a 14px registry icon or a colour swatch. A single raised indicator with a soft shadow (no border — the edge stays clean) slides and resizes between options using the standard motion tokens. Three sizes: md (default, settings pages), sm (compact rows), and xs (dense menus such as the composer model dropdown — 20px items, 12px labels).

SegmentedControl
LightDarkFollow system

SecondaryModelPicker

Linked model + thinking-effort picker (settings → Agent → Subagents, experimental; components/settings/SecondaryModelPicker.vue, shared by both ends). Use it whenever two choices are only valid as a pair — here an effort is meaningless without its model, and every model declares a different supported set. It is a cascading variant of the §03 Select: the trigger is the Select trigger verbatim (value renders model · effort, the unset state uses the placeholder tint), and the dropdown opens as a SINGLE-LEVEL model list (grouped by provider) on the floating menu surface (--color-menu-bg / --p-menu-backdrop / --shadow-lg). The menu teleports to <body> with position: fixed — it opens on top of the settings modal (on the --z-modal-dropdown rung), and only a body-level surface escapes the dialog's scrolling-body clip; it re-anchors to the trigger on any outside scroll and closes on window resize (the UserMenu teleport's full recipe). Hovering or clicking a model row flies its effort submenu out to the RIGHT of the row — same menu surface, anchored to the row's live position, flipping to the left only near the viewport edge per the §03 anchoring rules — with a 250ms hover-intent grace (the UserMenu flyout's recipe) so the diagonal path into the submenu doesn't collapse it. Every model row carries a trailing chevron-right affordance; clicking an effort confirms the pair and closes — one atomic write, never two staggered patches. Flyout options follow the composer's thinking-level model (segmentsFor): effort models get off + their declared levels (always-thinking ones get no off), boolean-thinking models get on/off, unsupported models get off alone; while no effort is set at all, a "Model default" entry leads (it writes the model alone — POST /config merges and cannot clear a stored effort, so the entry disappears once one is set). A configured effort the model no longer declares is appended as an extra flyout option so the current pair stays visible and re-selectable. Keyboard mirrors the Select contract (focus stays on the trigger, Esc preventDefaults so the hosting dialog does not close): ↑/↓ move within the active level (the flyout follows model moves), → opens the flyout, ← collapses it, Enter confirms, Home/End jump. ARIA: combobox trigger → dialog menu holding a model listbox plus the effort listbox flyout with option rows. The menu itself flips upward when the trigger sits near the viewport bottom.

Tabs

Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.

Tabs
GeneralAgentAdvanced

Switch

A two-state switch for settings that take effect immediately. The 36×20 track has a 0.5px hairline and full radius; its 16px knob uses 1.5px internal offsets so the visible inset remains 2px and symmetric after accounting for the border. On hover, the knob eases to an 18px rounded rectangle towards the track centre. When on, the track turns accent and the knob slides right.

Switch

Checkbox

A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.

Checkbox

Avatar

A 32px default avatar with md radius; .sm is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.

Avatar
KK

EmptyState

A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.

EmptyState
No chats yet
Click "New chat" to start a conversation with Kimi

Divider

A 0.5px hairline divider (--p-line); .p-divider-v is the vertical divider, used between inline elements.

Divider
Content above

Content below
kimi-k2thinking

Tooltip

A CSS-only hover hint, wrapped in .p-tip. Inverted background (--p-text / --p-bg), single line, no wrapping — carries only short notes.

Tooltip (hover the button)
New chat

Banner

An inline notice bar placed at the top of a content area. Three states — .info / .warning / .danger — each with a matching 18px icon.

Banner
Connected to server
Currently in yolo mode; tool calls will run automatically

Sheet / BottomSheet

A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.

BottomSheet
Choose a model
kimi-k2 · thinking
kimi-k2 · instant

Skeleton

A placeholder for loading content, using a breathing opacity animation (no gradients), following the no-gradient-text rule. Composed into titles / text lines / avatars.

Skeleton

Command Bar

An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses Button primary; the command area uses a mono light-grey background.

Command Bar
curl -fsSL https://code.kimi.com/install.sh | bash

TopBar

The application top bar. Solid by default; the .frost variant is translucent + background blur, used only for sticky navigation bars. Together with the floating menu surfaces (Menu / Dropdown), it is one of the two exceptions to the no-glassmorphism rule (see §06).

TopBar · solid / frosted glass
Solid TopBar
Frosted-glass TopBar · .frost

Find Bar · transcript search

The in-transcript find bar (Cmd/Ctrl+F), implemented by components/chat/TranscriptSearch.vue. A floating card pinned to the transcript's top-right (top: --panel-head-h + --space-3, right: --space-3 — equal inset on both axes), --z-sticky, raised surface + 0.5px hairline + --shadow-menu. One radius for both states: --radius-2xl is a full capsule at the collapsed height and a card once the footer expands — never animate between two radii.

PartRule
Input rowSearch icon (muted) + bare input — the list-style bare-input exception family (sidebar search row, inline rename), NOT the boxed Input primitive; the 38px bordered control would break the pill. Circular close IconButton sm (concentric with the capsule end); a 0.5px hairline separator before it. Height comes from the grid: 32px control (--space-8) + 2× --space-1 padding = 40px — at which --radius-2xl is exactly the half-height capsule.
Footer (results)Expands via the 0fr→1fr grid fold (--duration-slow), hairline top separator, prev/next IconButton sm left, right-aligned muted count (N/M results · --ui-font-size-sm). Only exists once a query has settled — while typing or empty, the bar stays a bare pill.
Statescollapsed (empty query) / searching (Spinner sm in the input row during the ~800ms debounce) / results / no-results (count reads "No results", nav disabled). Disabled is uniformly opacity:.5.
FocusComposer-style: a neutral hairline overlay (::after + --color-composer-focus-line) fading in on :focus-within. No accent ring.
Match inkCSS Custom Highlight API — the bar mutates no transcript DOM. All matches: --color-search-match (yellow); current: --color-search-match-current + a 2px --color-warning outline ring (a positioned overlay — highlight pseudos can't paint box outlines). Tokens live in app-ui/style.css with light/dark pairs.
KeyboardCmd/Ctrl+F opens + focuses (repeat = re-focus + select-all; hardcoded, reserved in the desktop keymap), Enter / Shift+Enter steps matches (wrapping), Esc closes from ANY control inside (container-level, so it never reaches the conversation's Esc-abort).
Matching semanticsRendered transcript DOM only (unloaded older pages are out of scope), capped at 1000 matches (count reads N/1000+). Matches span inline nodes within one block, never cross block breaks; inert and display:none content is excluded. Stepping scrolls the match's own rect into view, not its parent element.

SectionLabel

A small group title for sidebar lists, used to section the content below (such as Workspaces in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing .08em, color --color-fg-faint; left-aligned to the row's starting padding (--sb-pad-x), keeping the same indent as the group rows below. For scripts without case (such as Chinese), text-transform:uppercase simply has no effect — no special handling needed.

',55)),a("div",se,[e[26]||(e[26]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Sidebar · group title")],-1)),a("div",oe,[e[25]||(e[25]=a("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),a("div",ie,[(o(),i("svg",ne,[...e[21]||(e[21]=[a("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 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)])])),e[22]||(e[22]=d(" kimi-code-web ",-1))]),a("div",le,[(o(),i("svg",re,[...e[23]||(e[23]=[a("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 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)])])),e[24]||(e[24]=d(" playground ",-1))])])])]),a("section",ce,[e[39]||(e[39]=t('
04

Chat Interface Overhaul

The message stream is the core of Kimi Web. Tool calls render as quiet activity lines — one borderless line per call, bespoke per tool kind, auto-grouped, expanding on demand — while Question / Approval elevate to a floating neutral surface because they need a decision, and the Swarm composite keeps a card; the Composer collapses into a single rounded container.

Unified message stream

User-message bubbles follow the kimiwork production recipe (MessageItem .user-bubble): a neutral --color-user-bubble-bg fill (BubbleGray — #f5f5f5 light / #292929 dark), uniform --radius-lg corners, no border, no shadow.

Message timestamps use 12px UI text at weight 500, matching the compact metadata scale without switching to a monospace face.

The user-message metadata row sits one 8px spacing step below the bubble, so its actions and timestamp read as supporting information rather than part of the bubble edge.

Overlong user messages clamp at 10 measured lines, the tail dissolving through an alpha mask rather than a tint overlay (the translucent accent fill would double-composite); a floating pill toggle centred on the fade expands in place and collapses back, and the collapse pins the toggle itself so the reading position survives. Skill / plugin command args clamp through the same wrapper, beside the card head. Like the transcript's other disclosure controls (thinking row, turn fold, tool lines), the toggle is a bare native button carrying aria-expanded — chat-surface disclosure controls do not use the §03 Button primitive.

The floating jump-to-latest control uses 12px UI text at weight 525, led by the full down-arrow icon rather than a disclosure caret.

Thinking is an inline, borderless disclosure row in the message stream — never a side panel. The k15 bulb (the thinking registry icon) leads the row in every state; while streaming the "Thinking…" label breathes (opacity only, never a gradient shimmer) and whole elapsed seconds tick beside it, afterwards the label settles to "Thinking process" with the final span as · Ns (renderer-measured, live sessions only — history shows no seconds). Collapsed by default, it expands in place with the standard grid-rows animation and a 90° chevron rotation, and it folds itself back once the stream moves past it, even if the user expanded mid-stream. The header only animates its text colour on hover (standard duration and easing tokens), no card shell.

Conversation · 760px reading column
Please change the login endpoint to JWT and add the corresponding unit tests.
🌔Analyzing the auth module…
Read 2 files
Readsession.tssrc/auth · :12-4534 lines
12 export function verify(token: string) {
13 return jwt.verify(token, getSecret());
14 }
Readmiddleware.tssrc/auth58 lines
Editmiddleware.tssrc/auth+12−4
Search"jwt.verify"src/auth4 results

I looked at the structure of src/auth; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.

A decision needs your confirmation
How long should the JWT expiry be? Default 7 days, refresh token 30 days.
Write permission required
About to modify src/auth/middleware.ts, 42 lines changed. Allow?
Replace session with JWT signing
Refactor the auth middleware
Add unit tests

Wide markdown tables (desktop): regular chat prose stays within the 760px reading column (--p-content-max), and tables stay there too by default — an overflowing table scrolls horizontally inside its own wrapper, so the page and the chat area never scroll sideways. A clipped table shows a gradient fade at its truncated right edge, and hovering the table reveals a small widen button at its top-right corner; clicking it lets the table grow naturally with its content up to 1040px (--p-table-max), centred within the conversation pane, and clicking again restores the default width. At the default width a single column is capped at 36% of the pane; once widened the cap relaxes to 700px (--p-table-cell-max), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a widened table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.

Tool calls: quiet activity lines, bespoke per tool

High-frequency calls like read / bash / grep are "operational noise" — boxed, collapsible cards quickly drown out the conversation. Tool calls therefore render as one quiet borderless line in the message stream — never a card — and each tool kind composes that line for its own content, so the stream reads like an activity log rather than a pile of widgets. The three visual-weight tiers:

Three visual-weight tiers
① Tool line · lightest (default) — bespoke content per tool, no card chrome
Runpnpm run build && pnpm lint0.8s
② Activity run · medium (consecutive quiet activity — thinking + tool lines — folds to one smart-summary row)
Read 3 files
③ Sub Agent identity card · one per delegation — task title + agent type; the whole card opens the side panel (no in-stream expansion, never grouped)
分析双引擎架构Explore
④ Decision card · heavy (only question / approval, needs user input)
Write permission required
About to modify src/auth/middleware.ts, 42 lines changed.
',15)),a("div",ve,[e[31]||(e[31]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),a("div",fe,[a("div",pe,[c(A,{changes:C,cwd:ye,onOpenDiff:u,onOpenFile:u})])])]),e[40]||(e[40]=t('
Tool Call · quiet lines (expand on demand)
Read 2 files
Readsession.tssrc/auth · :12-4534 lines
12 export function verify(…
Readmiddleware.tssrc/auth58 lines
Editmiddleware.ts+12−4

Decision cards · Question / Approval

The two attention cards replace the composer in the dock and share one contract: a floating neutral shell (--color-surface-raised + hairline + --radius-lg + --shadow-menu), a plain dark 16px title head, and a hairline footer whose actions read in number-key order with exactly one accent primary. There is no semantic colour band — the floating card itself is the "needs a decision" signal.

Plan review · pinned option rows, second-line descriptions
按这份 plan 开始实现?
The plan markdown scrolls in a capped area; the approaches are pinned below it — label on the first line, full description always on the second. The number chip doubles as the keyboard hint.
1方案 A:静态徽章零依赖、渲染稳定,升级时需手动同步版本号。
2方案 B:动态徽章版本自动同步免维护,但要求仓库公开可访问。

Composer

Unified into a single raised container: --radius-composer (32px) with --corner-shape-composer: superellipse(1.5) and a stable 0.5px edge. Focus crossfades a low-chroma line-and-accent edge over --duration-slow with --ease-in-out, while the neutral shadow stays unchanged — there is no added halo and no layout shift. The textarea uses text-autospace: normal for mixed CJK and Latin input. Toolbar controls use a quiet 32px full-round geometry with 8px edge inset; the send button remains a standard 32px circle, with its glyph at 28px (--composer-send-icon-size, the production kimi.com size; it sits outside the --p-ic-* scale on purpose).

Fill and edge tokens: the card's fill and rest border are their own tokens — --color-composer-bg and --color-composer-line — running the kimiwork / kimi.com production input recipe (.chat-input__shell): fill = groupedBackground.secondary (#ffffff light / #1f1f1f dark), rest border = separator.s1 (13% black / 12% white), focus line = fills.f4 (25% in both schemes), and --shadow-input = effect.shadow.inputDefault (0 5px 16px -4px rgba(0,0,0,0.07), kept identical in dark — the hairline carries the edge there). Only colours sit in the tokens; the 32px superellipse shape and the focus-only edge overlay are unchanged.

Send button tokens: the send circle runs on --color-send-bg / --color-send-bg-hover / --color-send-icon (+ *-disabled, --opacity-send-disabled, --shadow-send[-hover]), following the production recipe (.chat-input__send): a neutral labels.primary fill (90% black light / 84% white dark, hover #252525 / 84.8%) with the production lift shadow (0 7px 16px -13px 38% + 0 1px 2px 7%, one step larger on hover), a groupedBackground.secondary glyph, and a disabled state of the same vocabulary — fills.f2 fill with a labels.quaternary glyph at full opacity. The button is disabled exactly when submit would no-op — an empty draft with no ready attachment (image-only sends stay enabled), an upload in flight, or the starting spinner — so disabled is a first-class persistent state, never a fade.

Layering, anchors, and motion: the dock normally stays at --z-sticky so the Latest Messages pill can remain visible above its veil. While any Composer popup is open, the dock temporarily joins --z-dropdown, ensuring permission, work-mode, and model menus always paint above that pill. The permission menu's left edge and the model menu's right edge each follow their own trigger pill. All three menus use --shadow-menu and the same trigger-corner pop motion as Session Row menus: 0.97 scale with a 2px shift toward the trigger, --duration-base on entry, and --duration-fast on exit.

Attachment strip: attachments hang inside the composer card above the textarea as two grouped rows — images/videos as shared MediaThumb rounded thumbnails, files as the shared AttachmentChip pill — the same pair the sent bubble renders, so a draft looks exactly like the sent message. File-store videos render a static play tile instead of fetching a first frame. The strip caps at two thumbnail rows and scrolls beyond that instead of pushing the input down; while overflowing, a quiet count badge pins to the bottom-left and new attachments auto-scroll into view (to the end of whichever group grew). With two or more attachments, a one-click clear-all pins to the strip's top-right corner as a quiet 22px badge (trash glyph, danger on hover). The composer's pending preview and the bubble's media clicks open the same MediaLightbox preview, which owns Escape via the shared dialog stack: images go through PhotoSwipe (@moonshot-ai/app-client's lib/mediaPreview) and zoom out of the clicked thumbnail (scrim = --color-scrim-strong, caption = --color-text-on-scrim; the slide area is inset — 24px sides matching the video modal, 56px top/bottom clearing the close button and caption — so a viewport-filling image never kisses the edges), videos keep the custom modal. Both share the --color-scrim-strong backdrop and the same close button — the raised 36px circle (.media-lightbox-close) fixed at the viewport's top-right, rendered by MediaLightbox for both (PhotoSwipe's own top bar is disabled; zoom stays on wheel / pinch / image click). ReadMedia tool cards open it too (an App-level instance fed by the openMedia chain): the image zooms out of the card's thumbnail, and videos show as a static play tile that opens the modal player — no more right-side-panel detour or inline <video>.

',11)),a("div",he,[e[38]||(e[38]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Composer")],-1)),a("div",ue,[a("div",ge,[e[36]||(e[36]=a("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),a("div",be,[a("div",me,[e[33]||(e[33]=a("button",{class:"p-icon-btn"},[a("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"})])],-1)),a("span",we,[c(f(h),{name:"shield-question",size:"sm"}),e[32]||(e[32]=d("yolo",-1))]),e[34]||(e[34]=a("span",{class:"p-pill"},[a("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[a("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"})]),d("plan")],-1))]),e[35]||(e[35]=t('
kimi-k2· thinking
',1))])]),e[37]||(e[37]=t('
kimi-code-web
',1))])]),e[41]||(e[41]=t('
i
Site-wide consistency: the composer uses one 32px superellipse shell and one 32px desktop control height. Attachment, permission, modes, compact, and model controls are all full-round and transparent at rest; hover reveals a neutral wash, open/active may use accent-soft, and Send remains the sole persistent filled control — an inverted --color-text fill with a --color-bg glyph (never the accent), disabled while the input is empty or an upload is in flight. The transparent dock floats over the transcript, while the scrolling content receives bottom padding equal to the live dock height so its final item can still clear the composer. Composer chrome is not selectable; only the message input permits text selection. Each permission mode has its own registry icon — manual hand, yolo shield-question, auto full-access — paired with the label in the pill (collapsing to the accessible icon below a 620px composer container) and leading its dropdown row in the mode's colour, with the current row's check trailing the row's end. The right toolbar is the flexible region: the model pill shrink-wraps its content, then shrinks and truncates internally only when the toolbar runs out of room. The dock's workbar above the composer carries one pill vocabulary — 32px high with --space-4 inline padding and stadium-shaped (--radius-full) corners, a --color-surface fill (one rung above the page in both schemes — sunken is degenerate in dark — the same material as the popover it opens), and the system hairline edge (0.5px at --color-line-strong, one rung up for presence; no shadow), icon + label + a count or status — for background bash tasks, background sub-agents, todos, and the goal alike; a pill toggles the shared work panel (itself at --radius-xl with the same 0.5px --color-line-strong edge outside — inner separators stay --color-line — and the menu panel's --shadow-menu), and the goal's detail (full objective, completion criterion) fills the panel body while its pause / resume / cancel controls ride the panel head (the decision cards' action vocabulary — exactly one accent primary, resume while paused; secondary pause while active; danger-soft cancel) and the meta counts (turns / tokens / time / budget) sit in a hairline footer — never a separate full-width strip.

Workspace attachment card: on the empty session, the workspace picker is a separate attachment card tucked under the composer — and the composer card itself stays complete (its own 0.5px border, --radius-composer corners with --corner-shape-composer, and shadow are never altered). The attachment lives inside the composer's padding box as the card's sibling, so its width always matches; its top --space-4 slides behind the card (the card is raised to --z-sticky), its square top edge stays hidden, and only the rounded bottom (0 0 --radius-xl --radius-xl) shows. Background --color-hover at 60% via color-mix (≈0.03 black in light, self-adapting in dark), no border, no shadow. Inside sits one quiet capsule trigger: transparent, --radius-full, 16px leading icon and 12px label at weight 475 in --color-text-muted; hover deepens to --color-selected and the label turns --color-text. The dropdown follows the §03 menu spec and is viewport-aware (flips above when more room, clamps max-height to the scrollport); at --z-dropdown it outranks both the card and the fixed click-outside backdrop (--z-sticky), which renders outside the composer because the card's container-type captures position: fixed descendants.

Responsive

See §02 --p-bp-sm for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.

i
At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen.
',5))]),e[43]||(e[43]=t('
05

Theming

Kimi Web uses one unified theme: the same components, fonts, radii, shadows, and surfaces — theming only swaps color values. Every semantic color token ships a light value in :root and a dark override in the data-color-scheme blocks; the semantic status colors (success / warning / danger) are independent palettes, one set each for light / dark.

Accent

The app has one accent: the brand blue (--color-accent, #1783ff light / #58a6ff dark). Use it sparingly — the accent is reserved for the primary action, focus rings, links, and active marks (current tab, toggles); large fills always come from the neutral surface tokens. Selection that means "where I am" (sidebar rows, list pickers) is deliberately NOT accent-tinted — it uses --color-selected so it reads as location, not as an action.

Light / dark mode

Each semantic token ships a light value in :root and a dark override in the two data-color-scheme blocks (explicit choice, or following the OS preference via prefers-color-scheme). Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.

Benefits of one theme: components, fonts, radii, and surfaces are consistent site-wide; a single accent keeps the brand identity unambiguous; light / dark mode works out of the box; semantic status colors are independently tunable.
06

Style Rules

Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning.

Rule IDWhat it detectsAction
no-gradient-textgradient text / gradient backgroundForbidden
no-glassmorphismbackdrop-filter: blur (TopBar sticky nav bar and menu surfaces via --p-menu-backdrop are the exceptions)TopBar + menus exempt
no-color-glowcolored / large-radius box-shadow glowForbidden
no-emoji-iconusing emoji as a functional icon (no exceptions). Emoji inside user content — session titles, messages — is not chrome and is out of scope (see §07 Session row's emoji icon)Forbidden
no-hardcoded-hexunregistered hex color inside a component <style>Warning
no-hardcoded-fonthard-coded font-family in a component (e.g. 'Inter') instead of var(--font-ui)Warning
radius-from-scaleradius value not in {4,6,8,12,16,20,999}Warning
z-from-scalez-index using an unregistered large numberWarning
weight-from-scalefont-weight not in {400,500}Warning

State matrix

Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. focus-visible always uses --p-focus-ring (appears only on keyboard focus, see §08); disabled is uniformly opacity:.5.

StateButtonInputCardMenu itemSwitch
default
hover
active / pressed
focus-visible
disabled
loading
selected / active
error
readonly

Chat working indicator

The chat working state ("prompt sent, turn unfinished") is a brand signature of Kimi Web, rendered uniformly by the WorkingIndicator component: the 小蓝 mascot plus a phase label — "Requesting…" until the assistant's reply starts, "Working…" once it is streaming. All other loading states (including ActivityNotice) use the plain Spinner.

Glassmorphism exemption

backdrop-filter: blur is banned site-wide, with two exceptions: the .frost variant of TopBar — only in the one place of the "sticky navigation bar", used to stay readable over scrolling content — and the floating menu surfaces (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups), which go through the --color-menu-bg / --p-menu-backdrop token pair so the recipe stays single-sourced. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under no-glassmorphism, and menu blur with ad-hoc values (anything but the token) is flagged too. Persistent panels that stay open over scrolling content (the dock work panel) deliberately stay opaque — a live backdrop blur re-samples the scrolling page every frame and janks in Chromium.
07

App Shell & Sidebar

The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions.

Layout grid

On web it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent auto track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles. (The desktop app adds a second row for its terminal panel — desktop-only, see below.)

App.vue · .app
grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;\n    /*         sidebar ↑    ↑handle  ↑conversation  ↑handle ↑right panel (auto) */
TokenValueUsage
sidebar width270px default (adjustable)expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's --p-sidebar-w (264px)
--preview-w460pxwidth of the right preview panel when open
--panel-head-h48pxunified height for all right panel heads + the conversation column head; both use a 0.5px bottom hairline
--p-bp-sm640px≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel

Sidebar alignment system (--sb-*)

All sidebar rows (group head, session row, New chat, search, and Settings buttons) share 4 custom properties. Their 16px icon slots and --sb-gap place every label on the same x-axis as the workspace name.

TokenValueUsage
--sb-inset12pxrow box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding
--sb-pad-x20pxcontent start x (= --sb-inset + 8px row padding)
--sb-gutter16pxleading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name
--sb-gap8pxgap between the icon slot and the text
i
The session title's starting x = --sb-pad-x + --sb-gutter + --sb-gap. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally.

Sidebar structure

The sidebar from top to bottom: brand header → action group → pinned head (pinned section + "Workspaces" label) → scrolling grouped list (workspace head + session rows) → user-menu footer. New chat and Search are direct sibling controls in the same grid container; the optional new-workspace action shares the first row, while Search spans the next row. A 4px gap keeps Search clear of the scroll boundary. The pinned head sits OUTSIDE the scroll container (the action-group / footer pattern — never position: sticky, which would need an opaque plate over the frosted tint), so the pinned sessions and the "Workspaces" label stay put while the workspace groups scroll beneath; the pinned section is collapsible (a chevron on its label, revealed on hover/focus and kept visible while folded; state persisted) so a long pinned set can't eat the sidebar, and it re-expands when a new session is pinned. Both pinned edges use three light near, middle and far fades across 18px, entering over 260ms only while more session content exists beyond that edge — the top seam lives at the pinned head's bottom border. The footer seam is a 0.5px hairline. Controls reuse the §03 primitives as much as possible. The sidebar sits on --color-sidebar-bg (one step off --color-bg: warm off-white just under white in light, one step BELOW the page in dark — the session column reads as its own plane, and with dark elevation = lighter the chrome never sits brighter than the conversation pane; the hairline still separates it from the pane). Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the action group stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. The search glyph has a -0.5px optical correction to align its visual centre with the label. Row hover uses --sb-hover (= the global --color-hover wash); the selected row uses the lighter --sb-selected wash derived from --color-selected — On macOS desktop the sidebar is instead frosted: the window carries a native NSVisualEffectView ('menu' vibrancy, following the in-app scheme via the nativeTheme mirror, its state pinned to inactive so the material keeps its flat pressed-down colour — ≈ #282829 dark / #E7E7E7 light — with no active/inactive drift) and the sidebar column drops --color-sidebar-bg for a single translucent --color-sidebar-tint wash that presses the pinned material one step — ≈ #282829 → ≈ #1e1e1f in dark (rgba(0,0,0,0.25)), ≈ #E7E7E7 → ≈ #f1f1f1 in light (rgba(255,255,255,0.4)) — with header and footer staying transparent so the tint reads as one uniform pane; the root chain (html/body/#app/.app) stays unpainted only under the macos-desktop + vibrancy flags — the latter is the Settings → Appearance accessibility switch (default on; persisted main-side so the window is created with the right material, and live-applied on toggle): off repaints the root chain and the sidebar falls back to opaque --color-sidebar-bg, while the traffic-light layout keeps keying off macos-desktop alone — while the conversation pane, chat header and right preview keep their own opaque surfaces. The list's hover-icon clusters (session-row kebab, group-head actions) paint NOTHING there — no plate, no wash, no blur (real backdrop blur does not even render over this window: Chromium's backdrop sampler returns a flat wash above the transparent BrowserWindow + vibrancy view). Instead the row's title/name dissolves before it ever reaches the buttons: a two-stage mask-image fade — a subtle 16px dissolve at rest, extending over the cluster zone only while the actions are revealed (row hover / keyboard focus / menu open): 34px on session rows (the pin+kebab cluster overhangs the title by ≈25px), 68px on group heads (the floating cluster is ≈60px wide). The fade is zone-based, so short rows render untouched, and text-overflow becomes clip so a long tail dissolves instead of dotting.

BlockUseNote
Brand headerlogo + name + collapse IconButton (right-aligned)on Windows / web the brand is left and the collapse IconButton sm is right-aligned inside the header; the dev-only backend version/address pill uses the UI font, not monospace; the logo is animated (a blinking eye). On macOS desktop the header is a bare drag strip (brand hidden, traffic lights + resident floating toggle over it)
New chatfull-width left-aligned button (custom)500-weight label; same rhythm as the session rows in the list (left-aligned, hover = --sb-hover). Do not use Button (centered, breaks the rhythm)
Searchbare search row (custom)500-weight label; no border, hover/focus shows the faint --color-hover wash; icon + label, with the Kbd keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. Do not use Input (the 38px bordered version is too heavy). It is a direct sibling of New chat in the action group
Section label.p-section-labeluppercase muted small titles like "Workspaces", using --weight-section-label (600)
Pinned headfixed block above the scroll container (.sessions-head): the pinned section (PinnedSessionList.vue) + the "Workspaces" section labelstays put while the workspace groups scroll; owns the top scroll-linked seam (hairline + fade, only while scrolled). The pinned section folds via its label chevron (persisted, kimi-web.pinned-collapsed) and re-expands only on an explicit pin (never on load backfill); the expanded rows are capped at 40vh with their own scroll so a long pinned set can't push the list or footer out of view
Workspace head / session rowsee next two sectionsshare --sb-* alignment
User-menu footeraccount area (components/UserMenu.vue) opening an upward §03 menupinned row under the session list, separated by a 0.5px --line hairline; trigger keeps the same list-style family as New chat (24px round avatar + nickname when signed in, user icon + sign-in hint otherwise). The menu box follows the trigger's left edge and width (ResizeObserver-tracked, so it survives a sidebar resize) and is teleported to body because the column's container-type would capture position:fixed. Rows: plan usage / theme / language are macOS-style hover flyout submenus — the parent row carries the module icon, a faint current value and a fixed chevron-right, and hovering (or moving focus to the parent row, or pressing Enter / Space / → on it) opens a teleported panel anchored to the parent menu's right edge (content-adaptive width floored by the menu's own min-width and capped at the parent menu's width; flips left near the viewport edge) with a 250ms hover-intent close grace; the usage panel shows weekly + 5h rows (percent values with severity colours), while the theme (three schemes) and language (two locales) panels move the check to the picked option without closing the menu — then the upgrade entry below the top plan level, settings (with an always-visible Kbd keycap shortcut hint on desktop) and a confirming sign-out; all menu icons come from the Kimi set
!
Why New chat / search / inline rename don't use Button / Input: they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight.

Session row

A session row is an inset rounded pill, structured as: status slot → title → time → attention Badge → hover actions (pin / archive).

PartRule
Containerpadding: 8px 8px inside the list's --sb-inset gutter, radius-sm; no fixed/min height — row height is font-driven (title line-height: --leading-tight, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover actions are absolutely positioned so they never force the row taller (no hover jitter). hover = --sb-hover (the global --color-hover wash); active = --sb-selected (75% of the global selected wash) — neutral, no accent tint, no border, no weight change
Status slot (lead)fixed --sb-gutter width; running = Spinner sm, otherwise unread = 7px accent dot
Titleflex:1 with truncation and user-select:none; double-click enters inline rename (compact input, not Input), whose text remains selectable
Emoji iconthe session icon is the title's LEADING emoji cluster (app-core splitSessionEmoji — no icon field; every client renders the title as-is). The emoji is an ordinary title character — no decoration at rest or on hover (it stays a <button> for a11y), and clicking it opens SessionEmojiPicker — a Menu-shelled panel (bare list-style search row → scrollable sections: Recently used persisted in localStorage (cap 8) + the grouped emoji dataset, with remove/random as MenuItems in the footer; a query swaps the sections for keyword-search results), teleported + fixed + --z-dropdown, popping from the trigger corner like the right-click menu. The menu's "Set Emoji…" opens the same picker and is the discoverable path. Inline rename edits the whole title — the emoji is an ordinary character in the input
Timemono xs, fg-faint; yields to the hover actions on hover
Attention BadgeBadge sm: info (needs answer) / warning (needs approval) / danger (aborted)
Hover actionsIconButton sm × 2 — pin + archive — cross-faded over the time on row hover (no kebab button). Right-clicking the row opens the full menu (copy ID / rename / emoji / fork / export / pin / archive + timestamp) anchored to the cursor, except over the inline rename input, where the native text-editing menu stays
Flat-style variant (flat list + pinned section)the sidebar's flat list rows AND — always, regardless of view mode — the pinned section's rows differ from the grouped row in three ways (all keyed off the facade projecting cwdLabel): ① no leading status slot — the title is left-aligned at the row's content edge; ② a second line under the title: folder-closed icon sm + the cwd's final directory name (- when the session has no cwd), xs faint like the time — except the icon, which takes --color-text-muted (one rung stronger, the same optical compensation as the group head's folder; the open-folder glyph's thin back-flap washed out at 14px) — rest-width tail mask fade; when the session has an associated PR (v2 git domain), a quiet chip (git-pull-request icon + #number) sits at the line's right edge, state-colored the GitHub way (open = --color-success, merged = --color-done purple, closed = faint) and opens the PR on click; ③ the first line's right side shows status — attention Badges anchored to the row's right edge, running Spinner, unread dot — INSTEAD of the time, which only renders when there is nothing to report (the Spinner yields to the attention pills: a session waiting for approval/answer never shows both); on hover the actions cross-fade IN as the whole status cluster fades OUT — pills and pin/archive never co-exist (grouped rows keep pills visible on hover). Height stays font-driven — the pill just grows the line. Grouped rows never set cwdLabel and keep the classic structure. The flat ↔ grouped switch lives in a dropdown on the SESSIONS section label (fixed list-settings icon + hover tooltip; the menu opens with a muted group label, per-view icons, and the current view checked at the row's right edge; mode persisted per device)
Archiveno confirm — the hover archive button / menu item archives immediately, then App.vue shows the §03 ActionToast (top-center) with Undo (restores the session) and Settings (opens the archived list)

Workspace group

The group head and session rows share --sb-*: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.

Show more & collapse

The "expand / collapse" controls at the bottom of each workspace group are compact list controls (same family as search, New chat, inline rename — not Buttons) sharing one row: expand (chevron-down) first, collapse (chevron-up) after a faint middot when both are present. Expanding reveals the next batch of sessions, fetching the next page from the server only when the locally loaded rows can't cover it — the control never exposes whether a reveal came from memory or the network.

PartRule
Rowa single flex row holding the controls, all content-width — hover washes just the button as a snug pill, never the full row. Font-driven height (≈32px like a session row), radius-sm; hover = --sb-hover (no text recolor); :focus-visible uses --p-focus-ring
Chevronsm (down = expand, up = collapse); the row indents by --sb-gutter + --sb-gap so the first button's chevron starts exactly at the session-title x, lining the control's leading edge up with the titles above
Labelfont-ui, text-xs, --color-text-muted; truncated
Separatorfaint middot (--color-text-faint) with --space-1 side margins, rendered only when both controls are present
Behavioreach group keeps a display cap starting at the first page; "Show more" steps it up by one batch (5) and fetches the next page only when the loaded rows fall short (busy = "Loading…", disabled); "Show less" resets the cap to the first page (view-layer trim — data is kept, no refetch). "Show more" exists while undisplayed loaded rows remain or the server has more; "Show less" appears once past the first page

ResizeHandle

A 4px grab strip layered over the 1px column border (margin: 0 -2px makes the whole 4px grabbable) with a centred 2px indicator bar. The bar stays transparent at rest and shows the neutral fills one step up the ramp — f2 on hover, f3 while the drag is live (the sidebar column is translucent on macOS, so f1 read too faint) — never the accent.

RuleValue
Width / cursor4px strip, 2px bar / col-resize mid-range; w-resize / e-resize at the drag limits (hints the direction that still resizes)
Normal / hover / dragtransparent / --color-selected (f2) / --color-line-strong (f3) — the neutral ramp one step up, never accent
Layer--z-dropdown, above pane-level sticky chrome (chat dock at --z-sticky) so the overhang stays visible and grabbable
Behaviorpanel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage

Right panel

The right panels (file preview / Diff / compaction summary / sub-agent / side chat) share one track and one head primitive.

Bottom terminal panel (desktop-only)

The native terminal (components/terminal/) sits in the conversation column's own bottom grid slot — the sidebar and the right panel span BOTH rows and keep full height (the VS Code layout: the panel belongs to the editor area, not to the whole window). Its height transitions 0 ↔ var(--terminal-h) (260px default, 120 min, 60% viewport max; persisted), squeezing the conversation column above instead of overlaying it. The panel mounts lazily on first open and then stays mounted so xterm scrollback survives a collapse.

i
One-sentence principle: the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section.
08

Accessibility (pragmatic edition)

Kimi Web is a local developer tool; it does not target a specific WCAG conformance level, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now.

i
On the "ugly" focus ring: the focus visibility required below always uses :focus-visible (not :focus). It appears only on keyboard focus; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with --p-focus-ring, not overridden per place.

1. Contrast & color

2. Keyboard operable

Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:

ControlKeyboard behavior
DialogTab cycles within the dialog (focus trap); Esc closes; focus returns to the trigger element after closing.
Menu / move the highlight, Enter selects, Esc closes.
Tabs / switch tabs (roving tabindex); only the current tab is in the Tab sequence.
Switch / Segmented / or Space / Enter to toggle.

3. Focus visibility

4. Labels & semantics

5. Target size

Desktop click targets ≥ 32px; touch devices ≥ 44px (consistent with the §01 principle and the IconButton lg tier).

6. Reduced motion

Handled uniformly in the global styles per §02's @media (prefers-reduced-motion: reduce); components do not check this individually. The chat working indicator's mascot renders its static fallback.

7. Live announcements (non-mandatory)

Screen-reader announcements are not a mandatory contract in this product. Short hints like Toast can use role="status" / aria-live; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.

Explicitly not mandatory for now: a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains.
09

Dialogs

Every overlay in the app — pickers, browsers, managers, confirmations — is built on the single §03 Dialog primitive. This chapter fixes the two layout anatomies allowed inside that frame, plus the row and footer contracts that make all dialogs read as one family. Do not hand-roll a third anatomy.

The frame (recap)

All dialogs share the §03 primitive: --radius-xl radius, --shadow-xl shadow, a restrained 28% neutral backdrop, a head (title + IconButton close), a body, and a right-aligned foot. Widths md 440 / lg 640 / xl 760 and auto / fixed height are chosen per §03. One interruptive overlay at a time; Esc closes; focus is trapped and restored. A blocking flow that must be resolved rather than dismissed (server token) uses hideClose with closeOnOverlay/closeOnEsc off — never a hand-written overlay.

Anatomy A — padded (forms & confirmations)

The default: the body carries its own padding and the caller drops content straight in. Confirmations put their Buttons in the #foot slot (right-aligned, cancel → confirm). Used by: confirm, login, status panel, server token.

Anatomy B — flush (pickers & browsers)

:padded="false" with height="fixed"; the consumer owns the zone layout inside a full-height column. The zones below are the whole vocabulary — a picker dialog composes them and adds nothing else. Used by: model picker, session search, folder browser, provider manager.

ZoneContract
SearchThe boxed §03 Input, inset 22px so its edge aligns with the head title. Autofocus on open. No leading icon, no borderless variant.
Filter chipsOptional. 28px pill: transparent + muted text by default, --color-hover on hover, --color-selected + medium --color-text when active. Horizontally scrollable with the scrollbar hidden. Never a row of Buttons.
Listflex:1, owns the vertical scrolling, padded 4px 8px so rows bleed near the dialog edge. role="listbox"; rows carry role="option" + aria-selected.
Row8px 12px padding, --radius-md. Two quiet lines: name 14/20 (medium when current) and a meta line 12/18 in --color-text-faint — provider · context · capability labels, dot-separated. No badge rows, no raw-id line (search still matches them). Trailing slot: check icon (current row only), then the star IconButton.
Row statesHover / keyboard-selected → --color-hover; current → --color-selected — a neutral "where I am" fill, never an accent tint, never an inset stroke. The star stays hidden until row hover, keyboard selection, or starred; it is always visible on touch devices and colored --star when starred.
State rowsLoading / unavailable / empty: centered on both axes, muted 14px; warning color only for the unavailable case.
Shortcut barThe footer: full-bleed, padding 8px 16px, border-top --color-line, left-aligned. Keyboard hints are Kbd keycaps + 12px --color-text-faint labels, groups separated by "·", the whole bar aria-hidden. An instructional sentence (folder browser) reuses the same bar without keycaps.

Keyboard & behavior contract

Dialog map

DialogAnatomyComposition
Model pickerflush · lg · fixedsearch + provider chips + model rows + shortcut bar
Session searchflush · lg · fixedsearch + result rows + shortcut bar
Folder browserflush · lg · fixedbreadcrumb bar + filter bar + folder rows + actions + hint bar
Provider managerflush · xl · fixedmanagement rows with inset dividers (rows are not selectable) + add section + shortcut bar
Confirm / Login / Statuspadded · md · autotitle + message or form + right-aligned foot
App update (desktop)padded · lg · autoversion title + quiet meta line (release date · current version) + height-capped scrolling what's-new list / progress bar + right-aligned action row (skip → download, later → restart) with the auto-download checkbox right-aligned on its own foot row below (a pure preference for future checks)
Server tokenpadded · md · autohideClose, no Esc/overlay close — resolved only by a valid token
Settingsflush · xl · fixedpage-like exception: side-nav region, per §03
Onboarding wizardnot a Dialogfull-page takeover (not built on §03): one centered column (brand lockup → step content → ghost actions + centered primary CTA); selectable options share the option-card pattern — 0.5px --color-line hairline, --color-accent border + --color-accent-soft fill when selected
Design intent: a picker dialog should feel like a quiet command palette — one boxed search, calm rows, a neutral "you are here" fill, and a predictable shortcut bar. Anything noisier — badge clouds, accent-selected rows, per-dialog footer inventions — is a regression to weed out.
',5))])])])]))}}),Se=M(ke,[["__scopeId","data-v-5fe218d3"]]);export{Se as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-DVONbdv-.css b/apps/kimi-code/dist-web/assets/DesignSystemView-DVONbdv-.css new file mode 100644 index 000000000..9942d27b2 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-DVONbdv-.css @@ -0,0 +1 @@ +.ds-page[data-v-5fe218d3]{--d-bg: var(--color-bg);--d-surface: var(--color-surface);--d-surface-2: var(--color-surface-sunken);--d-surface-3: var(--color-line);--d-fg: var(--color-text);--d-fg-soft: var(--color-text-muted);--d-fg-muted: var(--color-text-muted);--d-fg-faint: var(--color-text-faint);--d-line: var(--color-line);--d-line-2: var(--color-line);--d-accent: var(--color-accent);--d-accent-2: var(--color-accent-hover);--d-accent-soft: var(--color-accent-soft);--d-accent-bd: var(--color-accent-bd);--d-green: var(--color-success);--d-green-soft: var(--color-success-soft);--d-amber: var(--color-warning);--d-amber-soft: var(--color-warning-soft);--d-red: var(--color-danger);--d-red-soft: var(--color-danger-soft);--d-violet: var(--color-done);--d-code-bg: var(--color-surface-sunken);--d-sidebar: var(--color-surface);--d-shadow-sm: var(--shadow-sm);--d-shadow-md: var(--shadow-md);--d-shadow-lg: var(--shadow-lg);--sidebar-w: var(--p-sidebar-w);--content-max: var(--p-content-wide)}.ds-page[data-v-5fe218d3] *,.ds-page[data-v-5fe218d3] *:before,.ds-page[data-v-5fe218d3] *:after{box-sizing:border-box}.ds-page[data-v-5fe218d3]{scroll-behavior:smooth}.ds-page[data-v-5fe218d3]{margin:0;background:var(--d-bg);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1[data-v-5fe218d3],h2[data-v-5fe218d3],h3[data-v-5fe218d3],h4[data-v-5fe218d3]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-5fe218d3]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-5fe218d3]{color:var(--d-accent-2);text-decoration:none}a[data-v-5fe218d3]:hover{text-decoration:underline}code[data-v-5fe218d3],pre[data-v-5fe218d3],.mono[data-v-5fe218d3]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-5fe218d3]{background:var(--d-code-bg);border:.5px solid var(--d-line-2);border-radius:5px;padding:1px 6px;font-size:.88em;color:#1f2937;white-space:nowrap}.layout[data-v-5fe218d3]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-5fe218d3]{position:sticky;top:0;align-self:start;height:100vh;background:var(--d-sidebar);border-right:.5px solid var(--d-line);padding:26px 22px;overflow-y:auto}.brand[data-v-5fe218d3]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-5fe218d3]{width:26px;height:26px;border-radius:7px;flex:none;background:var(--d-fg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;letter-spacing:-.04em}.brand-name[data-v-5fe218d3]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-5fe218d3]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-5fe218d3]{margin:22px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--d-fg-faint)}.p-section-label[data-v-5fe218d3]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-5fe218d3]{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--d-fg-soft);margin:1px 0;transition:background .15s,color .15s}.nav a .num[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-5fe218d3]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-5fe218d3]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-5fe218d3]{color:var(--d-fg-soft)}.content[data-v-5fe218d3]{min-width:0}.content-inner[data-v-5fe218d3]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-5fe218d3]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-5fe218d3]{margin-top:72px}.hero[data-v-5fe218d3]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:8px;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--d-fg);background:#1783ff1a;border:none;padding:6px 12px;border-radius:8px;margin-bottom:22px}.hero h1[data-v-5fe218d3]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-5fe218d3]{color:var(--d-accent)}.hero p.lead[data-v-5fe218d3]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-5fe218d3]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--d-fg-muted);background:var(--d-surface);border:.5px solid var(--d-line);border-radius:8px;padding:7px 12px}.meta-chip b[data-v-5fe218d3]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-5fe218d3]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-5fe218d3]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-5fe218d3]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-5fe218d3]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-5fe218d3]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-5fe218d3]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-5fe218d3]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-5fe218d3]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-5fe218d3]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-5fe218d3]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-5fe218d3]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-5fe218d3]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-5fe218d3]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-5fe218d3]{color:var(--d-amber)}.stat.bad[data-v-5fe218d3]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-5fe218d3]{color:var(--d-red)}.stat.good[data-v-5fe218d3]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-5fe218d3]{color:var(--d-green)}.panel[data-v-5fe218d3]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-5fe218d3]{padding:22px}.panel-soft[data-v-5fe218d3]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-5fe218d3]{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.55;background:var(--d-surface);border:.5px solid var(--d-line);color:var(--d-fg-soft);margin:18px 0}.callout .ico[data-v-5fe218d3]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-5fe218d3]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-5fe218d3]{background:var(--d-accent);color:#fff}.callout.warn[data-v-5fe218d3]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-5fe218d3]{background:var(--d-amber);color:#fff}.callout.good[data-v-5fe218d3]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-5fe218d3]{background:var(--d-green);color:#fff}table.dt[data-v-5fe218d3]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-5fe218d3]{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--d-fg-faint);font-weight:700;padding:10px 12px;border-bottom:.5px solid var(--d-line)}table.dt td[data-v-5fe218d3]{padding:11px 12px;border-bottom:.5px solid var(--d-line-2);color:var(--d-fg-soft);vertical-align:middle}table.dt tr:last-child td[data-v-5fe218d3]{border-bottom:none}table.dt td.tk[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-5fe218d3]{display:inline-block;width:16px;height:16px;border-radius:4px;border:.5px solid rgba(0,0,0,.08);vertical-align:-3px;margin-right:8px}.palette[data-v-5fe218d3]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-5fe218d3]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-5fe218d3]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-5fe218d3]{padding:10px 12px 12px}.color-meta .cn[data-v-5fe218d3]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-5fe218d3]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-5fe218d3]:last-child{border-bottom:none}.type-sample[data-v-5fe218d3]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-5fe218d3]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-5fe218d3]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-5fe218d3]:last-child{border-bottom:none}.space-bar[data-v-5fe218d3]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-5fe218d3]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-5fe218d3]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-5fe218d3]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-5fe218d3]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-5fe218d3]{border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;background:var(--d-bg);box-shadow:var(--d-shadow-sm)}.stage-bar[data-v-5fe218d3]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:.5px solid var(--d-line);background:var(--d-surface)}.stage-bar .st[data-v-5fe218d3]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-5fe218d3]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-5fe218d3]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-5fe218d3]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-5fe218d3]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-5fe218d3]{display:flex;gap:6px}.tab[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 10px;border-radius:6px;color:var(--d-fg-muted);cursor:default}.tab.on[data-v-5fe218d3]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-5fe218d3]{padding:32px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:radial-gradient(circle at 1px 1px,rgba(0,0,0,.045) 1px,transparent 0) 0 0 / 18px 18px,var(--d-surface)}.stage.col[data-v-5fe218d3]{flex-direction:column;align-items:stretch}.stage.dark[data-v-5fe218d3]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-5fe218d3]{width:100%;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--d-fg-faint);margin-bottom:-6px}.stage.dark .stage-label[data-v-5fe218d3]{color:#6b7280}.ba[data-v-5fe218d3]{display:grid;grid-template-columns:1fr 1fr;gap:0;border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;box-shadow:var(--d-shadow-sm)}.ba-col[data-v-5fe218d3]{min-width:0}.ba-col+.ba-col[data-v-5fe218d3]{border-left:.5px solid var(--d-line)}.ba-head[data-v-5fe218d3]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-5fe218d3]{background:var(--d-red-soft)}.ba-head.after[data-v-5fe218d3]{background:var(--d-green-soft)}.ba-head .bh[data-v-5fe218d3]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-5fe218d3]{color:var(--d-red)}.ba-head.after .bh[data-v-5fe218d3]{color:var(--d-green)}.ba-head .bh small[data-v-5fe218d3]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-5fe218d3]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-5fe218d3]{background:#fff}.code[data-v-5fe218d3]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-5fe218d3]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-5fe218d3]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-5fe218d3]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-5fe218d3]{color:#8b949e}.code .k[data-v-5fe218d3]{color:#ff7b72}.code .s[data-v-5fe218d3]{color:#a5d6ff}.code .p[data-v-5fe218d3]{color:#79c0ff}.code .n[data-v-5fe218d3]{color:#d2a8ff}.code .v[data-v-5fe218d3]{color:#ffa657}.pill[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;border:.5px solid var(--d-line);background:var(--d-surface);color:var(--d-fg-soft)}.pill.blue[data-v-5fe218d3]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-5fe218d3]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-5fe218d3]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-5fe218d3]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-5fe218d3]{font-family:JetBrains Mono,monospace}ul.clean[data-v-5fe218d3]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-5fe218d3]{position:relative;padding:8px 0 8px 26px;color:var(--d-fg-soft);border-bottom:.5px solid var(--d-line-2)}ul.clean li[data-v-5fe218d3]:last-child{border-bottom:none}ul.clean li[data-v-5fe218d3]:before{content:"";position:absolute;left:4px;top:17px;width:7px;height:7px;border-radius:50%;background:var(--d-accent)}ul.clean.check li[data-v-5fe218d3]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-5fe218d3]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-5fe218d3]{color:var(--d-fg)}ul.clean li .path[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-5fe218d3]{position:relative;margin:24px 0}.phase[data-v-5fe218d3]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-5fe218d3]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-5fe218d3]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-5fe218d3]{display:inline-block;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;color:var(--d-accent-2);background:var(--d-accent-soft);border:.5px solid var(--d-accent-bd);padding:5px 10px;border-radius:8px}.phase-tag .pe[data-v-5fe218d3]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-5fe218d3]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:14px;padding:18px 20px;box-shadow:var(--d-shadow-sm)}.phase-body h4[data-v-5fe218d3]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-5fe218d3]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-5fe218d3]{margin:0}.matrix[data-v-5fe218d3]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-5fe218d3]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-5fe218d3]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-5fe218d3]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-5fe218d3]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-5fe218d3]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-5fe218d3]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-5fe218d3]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-5fe218d3]{margin-top:80px;padding-top:28px;border-top:.5px solid var(--d-line);font-size:13px;color:var(--d-fg-faint);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}.kbd[data-v-5fe218d3]{font-family:JetBrains Mono,monospace;font-size:11px;background:var(--d-surface-2);border:.5px solid var(--d-line);border-radius:5px;padding:1px 6px}@media(max-width:980px){.layout[data-v-5fe218d3]{grid-template-columns:1fr}.sidebar[data-v-5fe218d3]{position:static;height:auto}.nav[data-v-5fe218d3]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-5fe218d3]{padding:40px 22px 80px}.stat-grid[data-v-5fe218d3]{grid-template-columns:repeat(2,1fr)}.ba[data-v-5fe218d3]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-5fe218d3]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-5fe218d3]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-5fe218d3]{grid-template-columns:1fr}}.ds-page .p[data-v-5fe218d3],.ds-page .stage.p-skin[data-v-5fe218d3],.ds-page [data-p][data-v-5fe218d3]{--p-font-sans: var(--font-ui);--p-font-kbd: var(--font-kbd);--p-font-mono: var(--font-mono);--p-bg: var(--color-bg);--p-surface: var(--color-surface);--p-surface-raised: var(--color-surface-raised);--p-surface-overlay: var(--color-surface-overlay);--p-surface-sunken: var(--color-surface-sunken);--p-well: var(--color-well);--p-surface-deep: var(--color-surface-deep);--p-hover: var(--color-hover);--p-text: var(--color-text);--p-text-strong: var(--color-text-strong);--p-muted: var(--muted);--p-text-muted: var(--color-text-muted);--p-text-faint: var(--color-text-faint);--p-text-on-accent: var(--color-text-on-accent);--p-line: var(--color-line);--p-line-strong: var(--color-line-strong);--p-accent: var(--color-accent);--p-accent-hover: var(--color-accent-hover);--p-accent-soft: var(--color-accent-soft);--p-user-bubble-bg: var(--color-user-bubble-bg);--p-accent-bd: var(--color-accent-bd);--p-success: var(--color-success);--p-success-soft: var(--color-success-soft);--p-success-bd: var(--color-success-bd);--p-warning: var(--color-warning);--p-warning-soft: var(--color-warning-soft);--p-warning-bd: var(--color-warning-bd);--p-danger: var(--color-danger);--p-danger-soft: var(--color-danger-soft);--p-danger-bd: var(--color-danger-bd);--p-info: var(--color-info);--p-sp-1: var(--space-1);--p-sp-2: var(--space-2);--p-sp-3: var(--space-3);--p-sp-4: var(--space-4);--p-sp-5: var(--space-5);--p-sp-6: var(--space-6);--p-sp-8: var(--space-8);--p-r-xs: var(--radius-xs);--p-r-sm: var(--radius-sm);--p-r-md: var(--radius-md);--p-r-lg: var(--radius-lg);--p-r-xl: var(--radius-xl);--p-r-composer: var(--radius-composer);--p-r-full: var(--radius-full);--p-corner-composer: var(--corner-shape-composer);--p-sh-xs: var(--shadow-xs);--p-sh-sm: var(--shadow-sm);--p-sh-menu: var(--shadow-menu);--p-sh-md: var(--shadow-md);--p-sh-input: var(--shadow-input);--p-sh-lg: var(--shadow-lg);--p-sh-xl: var(--shadow-xl);--p-font-size-xs: var(--text-xs);--p-font-size-sm: var(--text-sm);--p-font-size-base: var(--text-base);--p-font-size-md: var(--text-base);--p-font-size-lg: var(--text-lg);--p-font-size-xl: var(--text-xl);--p-font-size-2xl: var(--text-2xl);--p-leading-tight: var(--leading-tight);--p-leading-normal: var(--leading-normal);--p-leading-relaxed: var(--leading-relaxed);--p-ease: var(--ease-out);--p-ease-inout: var(--ease-in-out);--p-dur-fast: var(--duration-fast);--p-dur: var(--duration-base);--p-dur-slow: var(--duration-slow);--p-composer-focus-line: var(--color-composer-focus-line);font-family:var(--font-ui);color:var(--color-text);font-size:var(--text-base)}[data-p=dark][data-v-5fe218d3]{--p-bg: #0d1117;--p-surface: #13181e;--p-surface-raised: #1c2128;--p-surface-sunken: #0d1117;--p-well: #13181e;--p-surface-deep: #0a0d12;--p-surface-overlay: #22272e;--p-hover: #ffffff0d;--p-text: #e8eaed;--p-text-strong: #ffffff;--p-muted: #727983;--p-text-muted: #9aa0a8;--p-text-faint: #6b7280;--p-line: #2d333b;--p-line-strong: #3d444d;--p-accent: #58a6ff;--p-accent-hover: #79b8ff;--p-accent-soft: rgba(88,166,255,.14);--p-accent-bd: rgba(88,166,255,.28);--p-success: #3fb950;--p-success-soft: rgba(63,185,80,.14);--p-success-bd: rgba(63,185,80,.28);--p-warning: #d29922;--p-warning-soft: rgba(210,153,34,.14);--p-warning-bd: rgba(210,153,34,.28);--p-danger: #f85149;--p-danger-soft: rgba(248,81,73,.14);--p-danger-bd: rgba(248,81,73,.28);--p-sh-sm: 0 1px 2px rgba(0,0,0,.4);--p-sh-md: 0 4px 12px rgba(0,0,0,.45);--p-sh-lg: 0 12px 32px rgba(0,0,0,.55);--p-sh-input: var(--shadow-input);--p-selection: rgba(88,166,255,.32)}.p-ic[data-v-5fe218d3]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-5fe218d3]{--_h: 36px;--_px: 16px;--_fs: var(--p-font-size-base);--_r: var(--p-r-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--_h);padding:0 var(--_px);border-radius:var(--_r);font-family:var(--p-font-sans);font-size:var(--_fs);font-weight:600;line-height:1;border:.5px solid transparent;cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease),transform var(--p-dur-fast) var(--p-ease)}.p-btn[data-v-5fe218d3]:active{transform:scale(.98)}.p-btn[data-v-5fe218d3]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft),0 0 0 1px var(--p-accent)}.p-btn .p-ic[data-v-5fe218d3]{width:16px;height:16px}.p-btn.sm[data-v-5fe218d3]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-5fe218d3]{width:14px;height:14px}.p-btn.lg[data-v-5fe218d3]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-5fe218d3]{background:var(--p-accent);color:var(--p-text-on-accent);border-color:var(--p-accent);box-shadow:var(--p-sh-xs)}.p-btn.primary[data-v-5fe218d3]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-5fe218d3]{background:var(--p-surface-raised);color:var(--p-text);border-color:var(--p-line-strong);box-shadow:var(--p-sh-xs)}.p-btn.secondary[data-v-5fe218d3]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-5fe218d3]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-5fe218d3]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-5fe218d3]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-5fe218d3]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-5fe218d3]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-5fe218d3]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-5fe218d3],.p-btn.disabled[data-v-5fe218d3]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-5fe218d3]{--_s: 32px;display:inline-grid;place-items:center;width:var(--_s);height:var(--_s);flex:none;border-radius:var(--p-r-md);border:.5px solid transparent;background:transparent;color:var(--p-text-muted);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-icon-btn[data-v-5fe218d3]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-5fe218d3]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-5fe218d3]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-5fe218d3]{--_s: 44px}.p-icon-btn .p-ic[data-v-5fe218d3]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-5fe218d3]{width:20px;height:20px}.p-badge[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--p-r-full);font-family:var(--p-font-sans);font-size:var(--p-font-size-xs);font-weight:600;line-height:1;border:.5px solid var(--p-line);background:var(--p-surface);color:var(--p-text);white-space:nowrap}.p-badge.sm[data-v-5fe218d3]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-5fe218d3]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-5fe218d3]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-5fe218d3]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-5fe218d3]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-5fe218d3]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-5fe218d3]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-5fe218d3]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-5fe218d3]{width:12px;height:12px}.p-kbd[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-5fe218d3]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--p-line);border-radius:var(--p-r-xs);background:transparent;color:inherit;font-family:var(--p-font-kbd);font-size:11px;line-height:1}.p-pill[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border-radius:var(--p-r-full);border:.5px solid transparent;background:transparent;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-pill[data-v-5fe218d3]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-5fe218d3]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-5fe218d3]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-5fe218d3]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-5fe218d3]{background:var(--p-surface);border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;color:var(--p-text)}.p-card.interactive[data-v-5fe218d3]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-5fe218d3]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-5fe218d3]{display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:.5px solid var(--p-line);background:var(--p-surface)}.p-card-title[data-v-5fe218d3]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text);font-family:var(--p-font-mono)}.p-card-body[data-v-5fe218d3]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-5fe218d3]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:.5px solid var(--p-line);background:var(--p-surface)}.p-field[data-v-5fe218d3]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-5fe218d3]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-5fe218d3],.p-select[data-v-5fe218d3],.p-textarea[data-v-5fe218d3]{width:100%;height:38px;padding:0 12px;border-radius:var(--p-r-md);border:.5px solid var(--p-line-strong);background:var(--p-surface-raised);font-family:var(--p-font-sans);font-size:var(--p-font-size-base);color:var(--p-text);box-shadow:var(--p-sh-xs);transition:border-color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-textarea[data-v-5fe218d3]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-5fe218d3]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-5fe218d3]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-5fe218d3]:hover,.p-select[data-v-5fe218d3]:hover,.p-textarea[data-v-5fe218d3]:hover{border-color:var(--p-line-strong)}.p-input[data-v-5fe218d3]:focus,.p-select[data-v-5fe218d3]:focus,.p-textarea[data-v-5fe218d3]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-5fe218d3]::placeholder,.p-textarea[data-v-5fe218d3]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-5fe218d3]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-5fe218d3]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-5fe218d3]{width:480px;max-width:calc(100vw - 48px);background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-xl);overflow:hidden;color:var(--p-text)}.p-dialog-head[data-v-5fe218d3]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-5fe218d3]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-5fe218d3]{font-size:var(--p-font-size-base);color:var(--p-text-muted);margin-top:4px;line-height:var(--p-leading-normal)}.p-dialog-body[data-v-5fe218d3]{padding:4px 22px 18px}.p-dialog-foot[data-v-5fe218d3]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-5fe218d3]{display:flex;align-items:flex-start;gap:11px;width:360px;padding:13px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-md)}.p-toast .ti[data-v-5fe218d3]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-5fe218d3]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-5fe218d3]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-5fe218d3]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-5fe218d3]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:8px;align-self:center;padding:4px 6px 4px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);font-size:var(--p-font-size-base);color:var(--p-text);white-space:nowrap}.p-action-toast .lk[data-v-5fe218d3]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-5fe218d3]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-5fe218d3]{width:18px;height:18px;animation:p-spin-5fe218d3 .85s linear infinite}.p-spinner.sm[data-v-5fe218d3]{width:14px;height:14px}.p-spinner circle[data-v-5fe218d3]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-5fe218d3]{stroke:var(--p-line)}.p-spinner .arc[data-v-5fe218d3]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-5fe218d3{to{transform:rotate(360deg)}}.p-thinking[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:9px;font-size:var(--p-font-size-sm);color:var(--p-text-muted);font-family:var(--p-font-sans)}.p-bubble-user[data-v-5fe218d3]{align-self:flex-end;max-width:78%;background:var(--p-user-bubble-bg);border:none;color:var(--p-text);border-radius:var(--p-r-lg);padding:10px 12px;font-size:var(--p-font-size-md);line-height:var(--p-leading-normal)}.p-msg[data-v-5fe218d3]{max-width:760px;font-size:var(--p-font-size-md);line-height:var(--p-leading-relaxed);color:var(--p-text)}.p-msg p[data-v-5fe218d3]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-5fe218d3]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);border:0;color:var(--p-accent-hover);padding:1px 6px;border-radius:5px;font-size:.9em}.p-code[data-v-5fe218d3]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:11px 13px;color:var(--p-text);overflow-x:auto}.p-action[data-v-5fe218d3]{border-radius:var(--p-r-lg);overflow:hidden;border:.5px solid var(--p-line);background:var(--p-surface-raised);box-shadow:var(--p-sh-menu)}.p-action-head[data-v-5fe218d3]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-5fe218d3]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-5fe218d3]{padding:12px 16px 0;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-action-foot[data-v-5fe218d3]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-5fe218d3]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-5fe218d3]{display:flex;align-items:flex-start;gap:10px;padding:8px 12px;border-radius:var(--p-r-md);color:var(--p-text);font-size:var(--p-font-size-base)}.p-opt .n[data-v-5fe218d3]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--p-font-size-base) * var(--p-leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--p-r-sm);background:var(--p-surface-sunken);color:var(--p-text);font-size:var(--p-font-size-xs);font-weight:500;display:inline-flex;align-items:center;justify-content:center;flex:none}.p-opt-text[data-v-5fe218d3]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-5fe218d3]{font-weight:500}.p-opt-text .d[data-v-5fe218d3]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-5fe218d3]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-5fe218d3]{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--p-r-md);font-size:var(--p-font-size-base);color:var(--p-text)}.p-todo-row.done[data-v-5fe218d3]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-5fe218d3]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-5fe218d3]{width:16px;flex:none;display:inline-flex;align-items:center;justify-content:center;user-select:none;color:var(--p-text-faint)}.p-todo-check svg[data-v-5fe218d3]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-5fe218d3]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-5fe218d3]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-5fe218d3]{color:var(--p-accent);font-weight:500}.p-dot[data-v-5fe218d3]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-5fe218d3]{background:var(--p-success)}.p-dot.error[data-v-5fe218d3]{background:var(--p-danger)}.p-dot.running[data-v-5fe218d3]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-5fe218d3 1.4s ease-out infinite}@keyframes p-pulse-5fe218d3{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-5fe218d3]{overflow:hidden}.p-tool-group-head[data-v-5fe218d3]{display:flex;align-items:center;gap:4px;padding:4px 0;cursor:pointer;border-radius:6px;font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text-faint);user-select:none;transition:color var(--p-dur) var(--p-ease)}.p-tool-group-head .tg-ic[data-v-5fe218d3]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-5fe218d3]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-5fe218d3]{font-weight:500}.p-tool-group-head .tg-meta[data-v-5fe218d3]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-5fe218d3]{width:14px;height:14px;color:var(--p-text-faint);transition:transform var(--p-dur) var(--p-ease)}.p-tool-group.open .p-tool-group-head .tg-car[data-v-5fe218d3]{transform:rotate(90deg)}.p-tool-row[data-v-5fe218d3]{position:relative;display:flex;align-items:center;gap:4px;padding:4px 0;border-radius:6px;cursor:pointer;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text)}.p-tool-row .tr-ic[data-v-5fe218d3]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-5fe218d3]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-5fe218d3]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-5fe218d3]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-5fe218d3]{font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);line-height:normal;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--p-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-faint[data-v-5fe218d3]{color:var(--p-text-faint);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-chip[data-v-5fe218d3]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-5fe218d3]{margin-left:auto;color:var(--p-success);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add~.tr-chip[data-v-5fe218d3],.p-tool-row .tr-add~.tr-add[data-v-5fe218d3]{margin-left:0}.p-tool-row .tr-del[data-v-5fe218d3]{color:var(--p-danger);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-bar[data-v-5fe218d3]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-5fe218d3]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-5fe218d3]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-5fe218d3]{display:flex;align-items:center;gap:8px;align-self:stretch;padding:8px 12px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);cursor:pointer}.p-agent-card .pa-ic[data-v-5fe218d3]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:var(--p-surface-sunken);color:var(--p-text-muted);flex:none}.p-agent-card .pa-ic svg[data-v-5fe218d3]{width:14px;height:14px}.p-agent-card .pa-main[data-v-5fe218d3]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-5fe218d3]{font-size:var(--p-font-size-sm);line-height:1.4;color:var(--p-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-type[data-v-5fe218d3]{font-size:var(--p-font-size-xs);line-height:1.4;color:var(--p-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-ok[data-v-5fe218d3]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-5fe218d3]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-5fe218d3]{transform:rotate(90deg)}.p-tool-detail[data-v-5fe218d3]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-5fe218d3]{margin-top:4px}.p-composer[data-v-5fe218d3]{background:var(--p-surface-raised);border:.5px solid var(--p-line-strong);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);box-shadow:var(--p-sh-input);overflow:hidden;position:relative;z-index:1}.p-composer[data-v-5fe218d3]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--p-composer-focus-line);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);opacity:0;pointer-events:none;transition:opacity var(--p-dur-slow) var(--p-ease-inout)}.p-composer[data-v-5fe218d3]:focus-within:after{opacity:1}.p-composer-ta[data-v-5fe218d3]{padding:14px 16px 8px;font-family:var(--p-font-sans);font-size:var(--p-font-size-md);color:var(--p-text);line-height:var(--p-leading-normal);text-autospace:normal}.p-composer-ta.ph[data-v-5fe218d3]{color:var(--p-text-faint)}.p-composer-bar[data-v-5fe218d3]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-5fe218d3]{width:100%;max-width:620px;margin-top:calc(-1 * var(--space-4));display:flex;align-items:center;gap:var(--space-2);padding:calc(var(--space-4) + var(--space-2)) var(--space-2) var(--space-2);background:color-mix(in srgb,var(--color-hover) 60%,transparent);border-radius:0 0 var(--radius-2xl) var(--radius-2xl);font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);color:var(--p-text-faint);cursor:pointer}.p-composer-strip .p-ic[data-v-5fe218d3]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-5fe218d3],.p-composer-right[data-v-5fe218d3]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-5fe218d3]{border-radius:var(--p-r-full)}.p-send[data-v-5fe218d3]{position:relative;width:32px;height:32px;border-radius:var(--p-r-full);display:grid;place-items:center;background:var(--p-text);color:var(--p-bg);border:none;cursor:pointer;box-shadow:var(--p-sh-xs);transition:transform var(--p-dur-fast) var(--p-ease)}.p-send[data-v-5fe218d3]:after{content:"";position:absolute;inset:0;border-radius:var(--p-r-full);background:var(--p-bg);opacity:0;transition:opacity var(--p-dur-slow) var(--p-ease);pointer-events:none}.p-send[data-v-5fe218d3]:hover:after{opacity:.28}.p-send[data-v-5fe218d3]:active{transform:scale(.92)}.p-send .p-ic[data-v-5fe218d3]{width:16px;height:16px}.p[data-v-5fe218d3] ::selection,[data-p][data-v-5fe218d3] ::selection{background:var(--p-selection)}.p-link[data-v-5fe218d3]{color:var(--p-accent);text-decoration:none;font-family:var(--p-font-sans);transition:color var(--p-dur) var(--p-ease)}.p-link[data-v-5fe218d3]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-5fe218d3]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-5fe218d3]{color:var(--p-text-muted)}.p-link.muted[data-v-5fe218d3]:hover{color:var(--p-text)}.p-link .p-ic[data-v-5fe218d3]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-5fe218d3]{background:var(--color-menu-bg);border:.5px solid var(--p-line);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);padding:3.5px;min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-5fe218d3]{display:flex;align-items:center;gap:7px;padding:5px 9px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-menu-item[data-v-5fe218d3]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-5fe218d3],.p-menu-item.active[data-v-5fe218d3]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-5fe218d3]{color:var(--p-danger)}.p-menu-item.danger[data-v-5fe218d3]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-5fe218d3]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-5fe218d3]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-5fe218d3]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-5fe218d3]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-5fe218d3]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-5fe218d3]{color:var(--p-danger)}.p-menu-item.lg[data-v-5fe218d3]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-5fe218d3]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-5fe218d3]{display:inline-flex;gap:2px;padding:2px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-sans)}.p-seg-item[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-seg-item[data-v-5fe218d3]:hover{color:var(--p-text)}.p-seg-item.on[data-v-5fe218d3]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-5fe218d3]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-5fe218d3]{padding:8px 14px;font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text-muted);cursor:pointer;white-space:nowrap;border-bottom:.5px solid transparent;margin-bottom:-.5px;transition:color var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-tab[data-v-5fe218d3]:hover{color:var(--p-text)}.p-tab.on[data-v-5fe218d3]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-5fe218d3]{position:relative;display:inline-block;width:36px;height:20px;flex:none;border-radius:var(--p-r-full);background:var(--p-line-strong);cursor:pointer;transition:background var(--p-dur) var(--p-ease)}.p-switch[data-v-5fe218d3]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--p-r-full);background:var(--p-surface-raised);box-shadow:var(--p-sh-xs);transform-origin:left center;transition:transform var(--p-dur) var(--p-ease)}.p-switch[data-v-5fe218d3]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-5fe218d3]{background:var(--p-accent)}.p-switch.on[data-v-5fe218d3]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-5fe218d3]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-5fe218d3]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-5fe218d3]{width:17px;height:17px;flex:none;display:inline-grid;place-items:center;border:.5px solid var(--p-line-strong);border-radius:var(--p-r-sm);background:var(--p-surface-raised);color:var(--p-text-on-accent);cursor:pointer;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-check.on[data-v-5fe218d3]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-5fe218d3]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-5fe218d3]{width:12px;height:12px}.p-avatar[data-v-5fe218d3]{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--p-r-md);background:var(--p-surface-sunken);border:.5px solid var(--p-line);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:600}.p-avatar.sm[data-v-5fe218d3]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-5fe218d3]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-5fe218d3]{width:13px;height:13px}.p-empty[data-v-5fe218d3]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--p-text-muted);text-align:center}.p-empty .em-ic[data-v-5fe218d3]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-5fe218d3]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-5fe218d3]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-5fe218d3]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-5fe218d3]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-5fe218d3]{display:flex;align-items:center;gap:var(--space-2);width:100%;max-width:560px;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)}.p-turn-failed .tf-chip[data-v-5fe218d3]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);flex:none;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger)}.p-turn-failed .tf-chip svg[data-v-5fe218d3]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-5fe218d3]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-5fe218d3]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.p-turn-failed .tf-sub[data-v-5fe218d3],.p-turn-failed .tf-meta[data-v-5fe218d3]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-turn-failed .tf-meta[data-v-5fe218d3]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-5fe218d3]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-5fe218d3]{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--p-text);color:var(--p-bg);font-size:var(--p-font-size-xs);padding:4px 8px;border-radius:var(--p-r-sm);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--p-dur-fast) var(--p-ease)}.p-tip:hover .p-tooltip[data-v-5fe218d3]{opacity:1}.p-banner[data-v-5fe218d3]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--p-r-md);border:.5px solid var(--p-line);background:var(--p-surface);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-banner .bn-ic[data-v-5fe218d3]{width:18px;height:18px;flex:none}.p-banner.info[data-v-5fe218d3]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-5fe218d3]{color:var(--p-accent)}.p-banner.warning[data-v-5fe218d3]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-5fe218d3]{color:var(--p-warning)}.p-banner.danger[data-v-5fe218d3]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-5fe218d3]{color:var(--p-danger)}.p-sheet[data-v-5fe218d3]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl) var(--p-r-xl) 0 0;box-shadow:var(--p-sh-xl);padding:8px 16px 20px}.p-sheet-handle[data-v-5fe218d3]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-5fe218d3]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-5fe218d3 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-5fe218d3{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-5fe218d3]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-5fe218d3]{flex:1;min-width:0;height:38px;display:flex;align-items:center;gap:10px;padding:0 10px 0 14px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-cmd .cmd-text[data-v-5fe218d3]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-5fe218d3]{margin-left:auto;flex:none;display:grid;place-items:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--p-r-sm);color:var(--p-text-faint);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-cmd .cmd-copy[data-v-5fe218d3]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-5fe218d3]{width:15px;height:15px}.p-topbar[data-v-5fe218d3]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 16px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg)}.p-topbar .tb-title[data-v-5fe218d3]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-5fe218d3]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-5fe218d3]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-5fe218d3]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-5fe218d3]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-5fe218d3]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-5fe218d3]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-5fe218d3]{flex:1;min-width:0}.demo-chat[data-v-5fe218d3]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-5fe218d3]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-5fe218d3]{grid-column:1 / -1;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--d-fg-muted)}.icon-cell[data-v-5fe218d3]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:.5px solid var(--d-line);border-radius:8px;background:var(--d-surface)}.icon-cell .kw-icon[data-v-5fe218d3]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-5fe218d3]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-5fe218d3]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-5fe218d3]{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--d-fg-muted);font-family:JetBrains Mono,ui-monospace,monospace}.p-code-inline[data-v-5fe218d3]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);color:var(--p-text);padding:0 5px;border-radius:var(--p-r-sm);font-size:.9em}.p-code-block[data-v-5fe218d3]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;background:var(--p-surface-sunken)}.p-code-block-head[data-v-5fe218d3]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-code-block pre[data-v-5fe218d3]{margin:0;padding:12px 14px;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;color:var(--p-text);overflow-x:auto}.p-diff[data-v-5fe218d3]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm)}.p-diff-head[data-v-5fe218d3]{padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-diff-row[data-v-5fe218d3]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-5fe218d3]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-5fe218d3]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-5fe218d3]{color:var(--p-success)}.p-diff-row.del[data-v-5fe218d3]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-5fe218d3]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-5fe218d3]{color:var(--p-text)}.p-field-error[data-v-5fe218d3]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-5fe218d3]{vertical-align:middle}.p-btn .p-spinner .track[data-v-5fe218d3]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-5fe218d3]{stroke:currentColor}.ds-page[data-v-5fe218d3]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-5fe218d3]{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-4);background:var(--color-surface);border-bottom:.5px solid var(--color-line)}.ds-back[data-v-5fe218d3]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-3);border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer}.ds-back[data-v-5fe218d3]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-5fe218d3]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)} diff --git a/apps/kimi-code/dist-web/assets/Tooltip-CPKMqLZA.js b/apps/kimi-code/dist-web/assets/Tooltip-DbYQWF1U.js similarity index 98% rename from apps/kimi-code/dist-web/assets/Tooltip-CPKMqLZA.js rename to apps/kimi-code/dist-web/assets/Tooltip-DbYQWF1U.js index e6d65f8eb..2977411a4 100644 --- a/apps/kimi-code/dist-web/assets/Tooltip-CPKMqLZA.js +++ b/apps/kimi-code/dist-web/assets/Tooltip-DbYQWF1U.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-HRJ6xRtC.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-D-7nOosq.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/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-D_3zPyPt.js b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-C0Afmuc1.js similarity index 86% rename from apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-D_3zPyPt.js rename to apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-C0Afmuc1.js index f2f785dd2..e0a31a7b0 100644 --- a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-D_3zPyPt.js +++ b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-C0Afmuc1.js @@ -1 +1 @@ -import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-hIDvr-8C.js";import{p as f}from"./chunk-JWPE2WC7-DTx-f56M.js";import{_ as n,l as o}from"./mermaid.core-Cahi9cr1.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram}; +import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-JQ2kJR9W.js";import{p as f}from"./chunk-JWPE2WC7-Dsg3gA8l.js";import{_ as n,l as o}from"./mermaid.core-CJB1tAev.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-BIlq342y.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram}; diff --git a/apps/kimi-code/dist-web/assets/arc-E_7M-TWh.js b/apps/kimi-code/dist-web/assets/arc-IkhU3FHH.js similarity index 98% rename from apps/kimi-code/dist-web/assets/arc-E_7M-TWh.js rename to apps/kimi-code/dist-web/assets/arc-IkhU3FHH.js index 0992f956d..2c68be080 100644 --- a/apps/kimi-code/dist-web/assets/arc-E_7M-TWh.js +++ b/apps/kimi-code/dist-web/assets/arc-IkhU3FHH.js @@ -1 +1 @@ -import{G as ln,H as un,I as N,J as I,K as J,L as an,M as y,N as tn,O as j,P as _,Q as rn,R as o,S as on,T as sn,V as fn}from"./mermaid.core-Cahi9cr1.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,q,O,v,R,K,u){var D=q-l,i=O-h,n=K-v,d=u-R,a=d*D-n*i;if(!(a*ar*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(Ly?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(Ly?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.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))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=e}),(function(A,G,N){var v=N(0);function h(){}for(var i in v)h[i]=v[i];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,A.exports=h}),(function(A,G,N){function v(h,i){h==null&&i==null?(this.x=0,this.y=0):(this.x=h,this.y=i)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(0),r=N(7),a=N(3),f=N(1),e=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[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 a){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,C=0;C-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(w,1),g.target!=g.source&&g.target.edges.splice(P,1);var S=g.source.owner.getEdges().indexOf(g);if(S==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,C=this.getNodes(),S=C.length,w=0;wT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?d=C[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(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,C,S,w,P,B,U=this.nodes,V=U.length,M=0;MC&&(l=C),Tw&&(g=w),dC&&(l=C),Tw&&(g=w),d=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var v,h=N(1);function i(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),f=this.add(r,a);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,a,f,e,u){if(f==null&&e==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=f,e=a,f=r;var t=e.getOwner(),s=u.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,e,u);if(f.isInterGraph=!0,f.source=e,f.target=u,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}},i.prototype.remove=function(r){if(r instanceof v){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(a.getEdges());for(var e,u=f.length,t=0;t=r.getRight()?a[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(a[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(a[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var u=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(u=1);var t=u*a[0],s=a[1]/u;a[0]t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(eu)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(fu?(a[0]=l,a[1]=T,n=!0):(a[0]=c,a[1]=o,n=!0):p===y&&(f>u?(a[0]=s,a[1]=o,n=!0):(a[0]=g,a[1]=T,n=!0)),-m===y?u>f?(a[2]=B,a[3]=U,E=!0):(a[2]=P,a[3]=w,E=!0):m===y&&(u>f?(a[2]=S,a[3]=w,E=!0):(a[2]=V,a[3]=U,E=!0)),n&&E)return!1;if(f>u?e>t?(I=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(I=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,R=f+-C/y,a[0]=R,a[1]=W;break;case 2:R=g,W=e+d*y,a[0]=R,a[1]=W;break;case 3:W=T,R=f+C/y,a[0]=R,a[1]=W;break;case 4:R=l,W=e+-d*y,a[0]=R,a[1]=W;break}if(!E)switch(O){case 1:Q=w,x=u+-_/y,a[2]=x,a[3]=Q;break;case 2:x=V,Q=t+M*y,a[2]=x,a[3]=Q;break;case 3:Q=U,x=u+_/y,a[2]=x,a[3]=Q;break;case 4:x=B,Q=t+-M*y,a[2]=x,a[3]=Q;break}}return!1},h.getCardinalDirection=function(i,r,a){return i>r?a:1+a%4},h.getIntersection=function(i,r,a,f){if(f==null)return this.getIntersection2(i,r,a);var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=void 0,d=void 0,C=void 0,S=void 0,w=void 0,P=void 0,B=void 0,U=void 0,V=void 0;return C=s-u,w=e-t,B=t*u-e*s,S=T-c,P=o-l,U=l*c-o*T,V=C*P-S*w,V===0?null:(g=(w*U-P*B)/V,d=(S*B-C*U)/V,new v(g,d))},h.angleOfVector=function(i,r,a,f){var e=void 0;return i!==a?(e=Math.atan((f-r)/(a-i)),a=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,A.exports=h}),(function(A,G,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=v}),(function(A,G,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,A.exports=v}),(function(A,G,N){var v=(function(){function e(u,t){for(var s=0;s"u"?"undefined":v(i);return i==null||r!="object"&&r!="function"},A.exports=h}),(function(A,G,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(C.push(w[0]);C.length>0&&c;){var P=C[0];C.splice(0,1),d.add(P);for(var B=P.getEdges(),g=0;g-1&&w.splice(_,1)}d=new Set,S=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(U,1);var V=S.getNeighborsList();V.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},A.exports=v}),(function(A,G,N){var v=N(5);function h(i,r){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(i){this.lworldOrgX=i},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(i){this.lworldExtX=i},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(i){this.lworldExtY=i},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},h.prototype.transformX=function(i){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/a),r},h.prototype.transformY=function(i){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/a),r},h.prototype.inverseTransformX=function(i){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/a),r},h.prototype.inverseTransformY=function(i){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/a),r},h.prototype.inverseTransformPoint=function(i){var r=new v(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=h}),(function(A,G,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);si.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.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%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oC||d>C)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(C=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.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||C>=g[0].length)){for(var S=0;Se}}]),a})();A.exports=r}),(function(A,G,N){function v(){}v.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 i=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 Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),a=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+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(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[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(r[Nt]):0)+(Nt!==J+1?Math.abs(r[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=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),wt=this.s[ut]/Et,Ot=it/Et;this.s[ut]=Et,ut!==J&&(it=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(i)?(r=i/h,r=Math.abs(h)*Math.sqrt(1+r*r)):i!=0?(r=h/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=v}),(function(A,G,N){var v=(function(){function r(a,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=a,this.sequence2=f,this.match_score=e,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;a--){var f=this.listeners[a];f.event===i&&f.callback===r&&this.listeners.splice(a,1)}},h.emit=function(i,r){for(var a=0;a{var G={45:((i,r,a)=>{var f={};f.layoutBase=a(551),f.CoSEConstants=a(806),f.CoSEEdge=a(767),f.CoSEGraph=a(880),f.CoSEGraphManager=a(578),f.CoSELayout=a(765),f.CoSENode=a(991),f.ConstraintHandler=a(902),i.exports=f}),806:((i,r,a)=>{var f=a(551).FDLayoutConstants;function e(){}for(var u in f)e[u]=f[u];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,i.exports=e}),767:((i,r,a)=>{var f=a(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),880:((i,r,a)=>{var f=a(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),578:((i,r,a)=>{var f=a(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),765:((i,r,a)=>{var f=a(551).FDLayout,e=a(578),u=a(880),t=a(991),s=a(767),o=a(806),c=a(902),l=a(551).FDLayoutConstants,T=a(551).LayoutConstants,g=a(551).Point,d=a(551).PointD,C=a(551).DimensionD,S=a(551).Layout,w=a(551).Integer,P=a(551).IGeometry,B=a(551).LGraph,U=a(551).Transform,V=a(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var _ in f)M[_]=f[_];M.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},M.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},M.prototype.newNode=function(n){return new t(this.graphManager,n)},M.prototype.newEdge=function(n){return new s(null,null,n)},M.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)},M.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},M.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.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 E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.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 E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});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},M.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()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),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,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var O=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(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*D.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=D[tt],D[tt]=D[H],D[H]=k;return D},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(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.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(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.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:D.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.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 X=function(H,k){var tt=[],ht=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),tt[Nt].push(wt))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=n.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;Rm&&(m=Math.floor(O.y)),I=Math.floor(O.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var O=0;O1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var ht=Math.abs(m-p)/X,J=D;rt!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;M.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},M.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;pE&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[R]=[]),E[R]=E[R].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[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 X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,O=m.labelMarginLeft,R=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,O,R)})},M.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},M.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,O=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(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),O;return IR&&(R=$.getWidth())});var W=I/y,x=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return R>rt&&(rt=R),rt+=m*2,rt},M.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(D){return D.rect.width*D.rect.height},W=function(D,H){return R(H)-R(D)};n.sort(function($,D){var H=W;return O.idealRowWidth?(H=I,H($.id,D.id)):H($,D)});for(var x=0,Q=0,z=0;z0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,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(E)},M.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var O=n.rowWidth[I];if(O+n.horizontalPadding+E<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-O>=E+n.horizontalPadding?W=(n.height+R)/(O+E+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,R=0;RO&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I0)for(var rt=O;rt<=R;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k{var f=a(551).FDLayoutNode,e=a(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.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*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.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){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?C[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){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?C[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var At=function(){var ot=dt.shift(),Lt=Y.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}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(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:C[g.get(j.top)]-C[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,Y){m[Y]=[F.position.x,F.position.y],y[Y]=[d[g.get(F.nodeId)],C[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;Y[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).x,Y[et].forEach(function(pt){m[F]=[At,C[g.get(pt)]],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},K=0;K0?At=d[g.get(dt.values().next().value)]:At=V(j).y,q[et].forEach(function(pt){m[F]=[d[g.get(pt)],At],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,Y){var Z={x:d[g.get(F.nodeId)],y:C[g.get(F.nodeId)]},K=F.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(F,Y){d[Y]+=mt.x}),C.forEach(function(F,Y){C[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,C[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=C[g.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){R.has(at)||(C[g.get(at)]=q)})},Ft=0;Ft{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(45);return h})()})})(he)),he.exports}var pr=se.exports,De;function yr(){return De||(De=1,(function(L,b){(function(G,N){L.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,f=Array(a>1?a-1:0),e=1;e{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),C;!(l=(C=d.next()).done)&&(c.push(C.value),!(o&&c.length===o));l=!0);}catch(S){T=!0,g=S}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")}})(),e=a(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var O=0;O1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),B),U},u.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,C=!1,S=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var B=P.value,U=f(B,2),V=U[0],M=U[1],_=o.cy.getElementById(V);if(_){var n=_.boundingBox(),E=s.xCoords[M]-n.w/2,p=s.xCoords[M]+n.w/2,m=s.yCoords[M]-n.h/2,y=s.yCoords[M]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){C=!0,S=x}finally{try{!d&&w.return&&w.return()}finally{if(C)throw S}}var I=t.x-(l+c)/2,O=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+O})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=X),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)})}}},u.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,C=void 0,S=void 0,w=void 0,P=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;VC&&(l=C),Tw&&(g=w),d{var f=a(548),e=a(140).CoSELayout,u=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,c=a(140).layoutBase.FDLayoutConstants,l=a(140).CoSEConstants,T=function(d,C){var S=d.cy,w=d.eles,P=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,_={};d.randomize&&(U=C.nodeIndexes,V=C.xCoords,M=C.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(S,w),m=function W(x,Q,z,X){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/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 O=new e,R=O.newGraphManager();return m(R.addRoot(),f.getTopMostNodes(P),O,d),y(O,R,B),I(O,d),O.runLayout(),_};i.exports={coseLayout:T}}),212:((i,r,a)=>{var f=(function(){function d(C,S){for(var w=0;w0)if(p){var I=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(P,w.eles,I),M.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(o(w))}),w.quality=="default"||w.quality=="proof"){var O=P.collection();if(w.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},X=[];if(M.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),_.splice(X[$],1)}}M.forEach(function(vt,it){w.eles=vt,V.push(l(w,U[it])),t.relocateComponent(_[it],V[it],w)})}else M.forEach(function(vt,it){t.relocateComponent(_[it],U[it],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=U[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[it].xCoords[wt]-Ot.boundingbox().w/2,y:U[it].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[it].xCoords,U[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[it][Ot.id()]&&Et.nodes.push({x:V[it][Ot.id()].getLeft(),y:V[it][Ot.id()].getTop(),width:V[it][Ot.id()].getWidth(),height:V[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[it].xCoords,U[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[it].xCoords[Rt]),Ut.push(U[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[it].xCoords,U[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[it].xCoords[Ht]),Pt.push(U[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[it][mt.id()]&&V[it][Dt.id()]&&Et.edges.push({startX:V[it][mt.id()].getCenterX(),startY:V[it][mt.id()].getCenterY(),endX:V[it][Dt.id()].getCenterX(),endY:V[it][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,it){var ut=vt.xCoords.map(function(wt){return wt+tt[it].dx}),Et=vt.yCoords.map(function(wt){return wt+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(it){var ut=V[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(_[0],V[0],w)):t.relocateComponent(_[0],U[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,wt=void 0,Ot=it.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(S,w,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})();i.exports=g}),657:((i,r,a)=>{var f=a(548),e=a(140).layoutBase.Matrix,u=a(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,C=new Map,S=new Map,w=[],P=[],B=[],U=[],V=[],M=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,O=o.nodeSeparation,R=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=w[nt],lt=0;ltdt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?w[Y].push(S.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=C.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=S.get(q):K=q,w[Z].push(K),w[C.get(K)].push(Y)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(F){it=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=C.size;var mt=void 0;if(E>2){R=E{var f=a(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),i.exports=e}),140:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(579);return h})()})})(se)),se.exports}var mr=yr();const Er=cr(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:gt(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:gt(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:gt(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},oe={L:gt((L,b)=>L-b+2,"L"),R:gt((L,b)=>L-2,"R"),T:gt((L,b)=>L-b+2,"T"),B:gt((L,b)=>L-2,"B")},Tr=gt(function(L){return Wt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=gt(function(L){const b=L;return b==="L"||b==="R"||b==="T"||b==="B"},"isArchitectureDirection"),Wt=gt(function(L){const b=L;return b==="L"||b==="R"},"isArchitectureDirectionX"),qt=gt(function(L){const b=L;return b==="T"||b==="B"},"isArchitectureDirectionY"),Te=gt(function(L,b){const A=Wt(L)&&qt(b),G=qt(L)&&Wt(b);return A||G},"isArchitectureDirectionXY"),Nr=gt(function(L){const b=L[0],A=L[1],G=Wt(b)&&qt(A),N=qt(b)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=gt(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(L,b){const A=`${L}${b}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=gt(function([L,b],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[L+(G==="L"?-1:1),b+(N==="T"?1:-1)]:[L+(G==="L"?-1:1),b]:Wt(N)?[L+(N==="L"?1:-1),b+(G==="T"?1:-1)]:[L,b+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=gt(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=gt(function(L,b){return Te(L,b)?"bend":Wt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=gt(function(L){return L.type==="service"},"isArchitectureService"),Or=gt(function(L){return L.type==="junction"},"isArchitectureJunction"),be=gt(L=>L.data(),"edgeData"),ie=gt(L=>L.data(),"nodeData"),Dr=ar.architecture,Pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}static{gt(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:L,icon:b,in:A,title:G,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[A]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:b,iconText:N,title:G,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:L,in:b}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(b!==void 0){if(L===b)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[b]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:b,in:A,title:G}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:b,title:G,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:b,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(A)}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[b]===void 0&&this.groups[b]===void 0)throw new Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,f=this.nodes[b].in;if(h&&a&&f&&a==f)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&a&&f&&a==f)throw new Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:h,rhsId:b,rhsDir:G,rhsInto:v,rhsGroup:i,title:r};this.edges.push(e),this.nodes[L]&&this.nodes[b]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const b=new Set;L.members.forEach(A=>{if(this.registeredIds[A]!=="node")throw new Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(b.has(A))throw new Error(`align ${L.direction} lists [${A}] more than once`);b.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},b=Object.entries(this.nodes).reduce((i,[r,a])=>(i[r]=a.edges.reduce((f,e)=>{const u=this.getNode(e.lhsId)?.in,t=this.getNode(e.rhsId)?.in;if(u&&t&&u!==t){const s=Ar(e.lhsDir,e.rhsDir);s!=="bend"&&(L[u]??={},L[u][t]=s,L[t]??={},L[t][u]=s)}if(e.lhsId===r){const s=pe(e.lhsDir,e.rhsDir);s&&(f[s]=e.rhsId)}else{const s=pe(e.rhsDir,e.lhsDir);s&&(f[s]=e.lhsId)}return f},{}),i),{}),A=Object.keys(b)[0],G={[A]:1},N=Object.keys(b).reduce((i,r)=>r===A?i:{...i,[r]:1},{}),v=gt(i=>{const r={[i]:[0,0]},a=[i];for(;a.length>0;){const f=a.shift();if(f){G[f]=1,delete N[f];const e=b[f],[u,t]=r[f];Object.entries(e).forEach(([s,o])=>{G[o]||(r[o]=Cr([u,t],s),a.push(o))})}}return r},"BFS"),h=[v(A)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:b,spatialMaps:h,groupAlignments:L}}return this.dataStructures}setElementForId(L,b){this.elements[L]=b}getElementById(L){return this.elements[L]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(L){return this.getConfig()[L]}},xr=gt((L,b)=>{ke(L,b),L.groups.map(A=>b.addGroup(A)),L.services.map(A=>b.addService({...A,type:"service"})),L.junctions.map(A=>b.addJunction({...A,type:"junction"})),L.edges.map(A=>b.addEdge(A)),L.alignments?.map(A=>b.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ge={parser:{yy:void 0},parse:gt(async L=>{const b=await fr("architecture",L);Se.debug(b);const A=Ge.parser?.yy;if(!(A instanceof Pe))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.");xr(b,A)},"parse")},Ir=gt(L=>` +import{p as ke}from"./chunk-JWPE2WC7-Dsg3gA8l.js";import{_ as gt,F as Ze,ad as qe,l as Se,b as Qe,a as Je,o as Ke,p as je,g as _e,s as tr,q as er,B as rr,z as ir,D as ar,c as me,a$ as Ee,ai as ve,i as nr,d as or,r as sr,aj as hr,b7 as lr}from"./mermaid.core-CJB1tAev.js";import{p as fr}from"./cynefin-VYW2F7L2-BIlq342y.js";import{c as Fe}from"./cytoscape.esm-OyMbaexL.js";import{g as cr}from"./_commonjsHelpers-CqkleIqs.js";import"./index-D-7nOosq.js";var se={exports:{}},he={exports:{}},le={exports:{}},gr=le.exports,Me;function ur(){return Me||(Me=1,(function(L,b){(function(G,N){L.exports=N()})(gr,function(){return(function(A){var G={};function N(v){if(G[v])return G[v].exports;var h=G[v]={i:v,l:!1,exports:{}};return A[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=G,N.i=function(v){return v},N.d=function(v,h,i){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:i})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(A,G,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,A.exports=v}),(function(A,G,N){var v=N(2),h=N(8),i=N(9);function r(f,e,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var a in v)r[a]=v[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.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"},r.prototype.getOtherEndInGraph=function(f,e){for(var u=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(u.getOwner()==e)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},r.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=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.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=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r}),(function(A,G,N){function v(h){this.vGraphObject=h}A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(13),r=N(0),a=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.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 i(s.x,s.y,o.width,o.height):this.rect=new i}e.prototype=Object.create(v.prototype);for(var u in v)e[u]=v[u];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.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},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.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},e.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},e.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},e.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))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=e}),(function(A,G,N){var v=N(0);function h(){}for(var i in v)h[i]=v[i];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,A.exports=h}),(function(A,G,N){function v(h,i){h==null&&i==null?(this.x=0,this.y=0):(this.x=h,this.y=i)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(0),r=N(7),a=N(3),f=N(1),e=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[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 a){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,C=0;C-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(w,1),g.target!=g.source&&g.target.edges.splice(P,1);var S=g.source.owner.getEdges().indexOf(g);if(S==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,C=this.getNodes(),S=C.length,w=0;wT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?d=C[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(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,C,S,w,P,B,U=this.nodes,V=U.length,M=0;MC&&(l=C),Tw&&(g=w),dC&&(l=C),Tw&&(g=w),d=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var v,h=N(1);function i(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),f=this.add(r,a);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,a,f,e,u){if(f==null&&e==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=f,e=a,f=r;var t=e.getOwner(),s=u.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,e,u);if(f.isInterGraph=!0,f.source=e,f.target=u,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}},i.prototype.remove=function(r){if(r instanceof v){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(a.getEdges());for(var e,u=f.length,t=0;t=r.getRight()?a[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(a[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(a[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var u=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(u=1);var t=u*a[0],s=a[1]/u;a[0]t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(eu)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(fu?(a[0]=l,a[1]=T,n=!0):(a[0]=c,a[1]=o,n=!0):p===y&&(f>u?(a[0]=s,a[1]=o,n=!0):(a[0]=g,a[1]=T,n=!0)),-m===y?u>f?(a[2]=B,a[3]=U,E=!0):(a[2]=P,a[3]=w,E=!0):m===y&&(u>f?(a[2]=S,a[3]=w,E=!0):(a[2]=V,a[3]=U,E=!0)),n&&E)return!1;if(f>u?e>t?(I=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(I=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,R=f+-C/y,a[0]=R,a[1]=W;break;case 2:R=g,W=e+d*y,a[0]=R,a[1]=W;break;case 3:W=T,R=f+C/y,a[0]=R,a[1]=W;break;case 4:R=l,W=e+-d*y,a[0]=R,a[1]=W;break}if(!E)switch(O){case 1:Q=w,x=u+-_/y,a[2]=x,a[3]=Q;break;case 2:x=V,Q=t+M*y,a[2]=x,a[3]=Q;break;case 3:Q=U,x=u+_/y,a[2]=x,a[3]=Q;break;case 4:x=B,Q=t+-M*y,a[2]=x,a[3]=Q;break}}return!1},h.getCardinalDirection=function(i,r,a){return i>r?a:1+a%4},h.getIntersection=function(i,r,a,f){if(f==null)return this.getIntersection2(i,r,a);var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=void 0,d=void 0,C=void 0,S=void 0,w=void 0,P=void 0,B=void 0,U=void 0,V=void 0;return C=s-u,w=e-t,B=t*u-e*s,S=T-c,P=o-l,U=l*c-o*T,V=C*P-S*w,V===0?null:(g=(w*U-P*B)/V,d=(S*B-C*U)/V,new v(g,d))},h.angleOfVector=function(i,r,a,f){var e=void 0;return i!==a?(e=Math.atan((f-r)/(a-i)),a=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,A.exports=h}),(function(A,G,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=v}),(function(A,G,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,A.exports=v}),(function(A,G,N){var v=(function(){function e(u,t){for(var s=0;s"u"?"undefined":v(i);return i==null||r!="object"&&r!="function"},A.exports=h}),(function(A,G,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(C.push(w[0]);C.length>0&&c;){var P=C[0];C.splice(0,1),d.add(P);for(var B=P.getEdges(),g=0;g-1&&w.splice(_,1)}d=new Set,S=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(U,1);var V=S.getNeighborsList();V.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},A.exports=v}),(function(A,G,N){var v=N(5);function h(i,r){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(i){this.lworldOrgX=i},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(i){this.lworldExtX=i},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(i){this.lworldExtY=i},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},h.prototype.transformX=function(i){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/a),r},h.prototype.transformY=function(i){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/a),r},h.prototype.inverseTransformX=function(i){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/a),r},h.prototype.inverseTransformY=function(i){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/a),r},h.prototype.inverseTransformPoint=function(i){var r=new v(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=h}),(function(A,G,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);si.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.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%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oC||d>C)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(C=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.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||C>=g[0].length)){for(var S=0;Se}}]),a})();A.exports=r}),(function(A,G,N){function v(){}v.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 i=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 Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),a=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+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(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[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(r[Nt]):0)+(Nt!==J+1?Math.abs(r[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=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),wt=this.s[ut]/Et,Ot=it/Et;this.s[ut]=Et,ut!==J&&(it=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(i)?(r=i/h,r=Math.abs(h)*Math.sqrt(1+r*r)):i!=0?(r=h/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=v}),(function(A,G,N){var v=(function(){function r(a,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=a,this.sequence2=f,this.match_score=e,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;a--){var f=this.listeners[a];f.event===i&&f.callback===r&&this.listeners.splice(a,1)}},h.emit=function(i,r){for(var a=0;a{var G={45:((i,r,a)=>{var f={};f.layoutBase=a(551),f.CoSEConstants=a(806),f.CoSEEdge=a(767),f.CoSEGraph=a(880),f.CoSEGraphManager=a(578),f.CoSELayout=a(765),f.CoSENode=a(991),f.ConstraintHandler=a(902),i.exports=f}),806:((i,r,a)=>{var f=a(551).FDLayoutConstants;function e(){}for(var u in f)e[u]=f[u];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,i.exports=e}),767:((i,r,a)=>{var f=a(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),880:((i,r,a)=>{var f=a(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),578:((i,r,a)=>{var f=a(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),765:((i,r,a)=>{var f=a(551).FDLayout,e=a(578),u=a(880),t=a(991),s=a(767),o=a(806),c=a(902),l=a(551).FDLayoutConstants,T=a(551).LayoutConstants,g=a(551).Point,d=a(551).PointD,C=a(551).DimensionD,S=a(551).Layout,w=a(551).Integer,P=a(551).IGeometry,B=a(551).LGraph,U=a(551).Transform,V=a(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var _ in f)M[_]=f[_];M.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},M.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},M.prototype.newNode=function(n){return new t(this.graphManager,n)},M.prototype.newEdge=function(n){return new s(null,null,n)},M.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)},M.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},M.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.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 E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.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 E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});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},M.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()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),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,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var O=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(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*D.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=D[tt],D[tt]=D[H],D[H]=k;return D},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(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.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(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.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:D.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.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 X=function(H,k){var tt=[],ht=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),tt[Nt].push(wt))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=n.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;Rm&&(m=Math.floor(O.y)),I=Math.floor(O.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var O=0;O1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var ht=Math.abs(m-p)/X,J=D;rt!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;M.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},M.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;pE&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[R]=[]),E[R]=E[R].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[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 X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,O=m.labelMarginLeft,R=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,O,R)})},M.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},M.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,O=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(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),O;return IR&&(R=$.getWidth())});var W=I/y,x=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return R>rt&&(rt=R),rt+=m*2,rt},M.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(D){return D.rect.width*D.rect.height},W=function(D,H){return R(H)-R(D)};n.sort(function($,D){var H=W;return O.idealRowWidth?(H=I,H($.id,D.id)):H($,D)});for(var x=0,Q=0,z=0;z0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,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(E)},M.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var O=n.rowWidth[I];if(O+n.horizontalPadding+E<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-O>=E+n.horizontalPadding?W=(n.height+R)/(O+E+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,R=0;RO&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I0)for(var rt=O;rt<=R;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k{var f=a(551).FDLayoutNode,e=a(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.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*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.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){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?C[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){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?C[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var At=function(){var ot=dt.shift(),Lt=Y.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}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(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:C[g.get(j.top)]-C[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,Y){m[Y]=[F.position.x,F.position.y],y[Y]=[d[g.get(F.nodeId)],C[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;Y[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).x,Y[et].forEach(function(pt){m[F]=[At,C[g.get(pt)]],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},K=0;K0?At=d[g.get(dt.values().next().value)]:At=V(j).y,q[et].forEach(function(pt){m[F]=[d[g.get(pt)],At],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,Y){var Z={x:d[g.get(F.nodeId)],y:C[g.get(F.nodeId)]},K=F.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(F,Y){d[Y]+=mt.x}),C.forEach(function(F,Y){C[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,C[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=C[g.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){R.has(at)||(C[g.get(at)]=q)})},Ft=0;Ft{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(45);return h})()})})(he)),he.exports}var pr=se.exports,De;function yr(){return De||(De=1,(function(L,b){(function(G,N){L.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,f=Array(a>1?a-1:0),e=1;e{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),C;!(l=(C=d.next()).done)&&(c.push(C.value),!(o&&c.length===o));l=!0);}catch(S){T=!0,g=S}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")}})(),e=a(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var O=0;O1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),B),U},u.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,C=!1,S=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var B=P.value,U=f(B,2),V=U[0],M=U[1],_=o.cy.getElementById(V);if(_){var n=_.boundingBox(),E=s.xCoords[M]-n.w/2,p=s.xCoords[M]+n.w/2,m=s.yCoords[M]-n.h/2,y=s.yCoords[M]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){C=!0,S=x}finally{try{!d&&w.return&&w.return()}finally{if(C)throw S}}var I=t.x-(l+c)/2,O=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+O})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=X),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)})}}},u.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,C=void 0,S=void 0,w=void 0,P=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;VC&&(l=C),Tw&&(g=w),d{var f=a(548),e=a(140).CoSELayout,u=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,c=a(140).layoutBase.FDLayoutConstants,l=a(140).CoSEConstants,T=function(d,C){var S=d.cy,w=d.eles,P=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,_={};d.randomize&&(U=C.nodeIndexes,V=C.xCoords,M=C.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(S,w),m=function W(x,Q,z,X){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/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 O=new e,R=O.newGraphManager();return m(R.addRoot(),f.getTopMostNodes(P),O,d),y(O,R,B),I(O,d),O.runLayout(),_};i.exports={coseLayout:T}}),212:((i,r,a)=>{var f=(function(){function d(C,S){for(var w=0;w0)if(p){var I=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(P,w.eles,I),M.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(o(w))}),w.quality=="default"||w.quality=="proof"){var O=P.collection();if(w.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},X=[];if(M.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),_.splice(X[$],1)}}M.forEach(function(vt,it){w.eles=vt,V.push(l(w,U[it])),t.relocateComponent(_[it],V[it],w)})}else M.forEach(function(vt,it){t.relocateComponent(_[it],U[it],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=U[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[it].xCoords[wt]-Ot.boundingbox().w/2,y:U[it].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[it].xCoords,U[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[it][Ot.id()]&&Et.nodes.push({x:V[it][Ot.id()].getLeft(),y:V[it][Ot.id()].getTop(),width:V[it][Ot.id()].getWidth(),height:V[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[it].xCoords,U[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[it].xCoords[Rt]),Ut.push(U[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[it].xCoords,U[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[it].xCoords[Ht]),Pt.push(U[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[it][mt.id()]&&V[it][Dt.id()]&&Et.edges.push({startX:V[it][mt.id()].getCenterX(),startY:V[it][mt.id()].getCenterY(),endX:V[it][Dt.id()].getCenterX(),endY:V[it][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,it){var ut=vt.xCoords.map(function(wt){return wt+tt[it].dx}),Et=vt.yCoords.map(function(wt){return wt+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(it){var ut=V[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(_[0],V[0],w)):t.relocateComponent(_[0],U[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,wt=void 0,Ot=it.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(S,w,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})();i.exports=g}),657:((i,r,a)=>{var f=a(548),e=a(140).layoutBase.Matrix,u=a(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,C=new Map,S=new Map,w=[],P=[],B=[],U=[],V=[],M=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,O=o.nodeSeparation,R=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=w[nt],lt=0;ltdt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?w[Y].push(S.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=C.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=S.get(q):K=q,w[Z].push(K),w[C.get(K)].push(Y)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(F){it=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=C.size;var mt=void 0;if(E>2){R=E{var f=a(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),i.exports=e}),140:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(579);return h})()})})(se)),se.exports}var mr=yr();const Er=cr(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:gt(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:gt(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:gt(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},oe={L:gt((L,b)=>L-b+2,"L"),R:gt((L,b)=>L-2,"R"),T:gt((L,b)=>L-b+2,"T"),B:gt((L,b)=>L-2,"B")},Tr=gt(function(L){return Wt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=gt(function(L){const b=L;return b==="L"||b==="R"||b==="T"||b==="B"},"isArchitectureDirection"),Wt=gt(function(L){const b=L;return b==="L"||b==="R"},"isArchitectureDirectionX"),qt=gt(function(L){const b=L;return b==="T"||b==="B"},"isArchitectureDirectionY"),Te=gt(function(L,b){const A=Wt(L)&&qt(b),G=qt(L)&&Wt(b);return A||G},"isArchitectureDirectionXY"),Nr=gt(function(L){const b=L[0],A=L[1],G=Wt(b)&&qt(A),N=qt(b)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=gt(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(L,b){const A=`${L}${b}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=gt(function([L,b],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[L+(G==="L"?-1:1),b+(N==="T"?1:-1)]:[L+(G==="L"?-1:1),b]:Wt(N)?[L+(N==="L"?1:-1),b+(G==="T"?1:-1)]:[L,b+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=gt(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=gt(function(L,b){return Te(L,b)?"bend":Wt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=gt(function(L){return L.type==="service"},"isArchitectureService"),Or=gt(function(L){return L.type==="junction"},"isArchitectureJunction"),be=gt(L=>L.data(),"edgeData"),ie=gt(L=>L.data(),"nodeData"),Dr=ar.architecture,Pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}static{gt(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:L,icon:b,in:A,title:G,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[A]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:b,iconText:N,title:G,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:L,in:b}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(b!==void 0){if(L===b)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[b]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:b,in:A,title:G}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:b,title:G,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:b,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(A)}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[b]===void 0&&this.groups[b]===void 0)throw new Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,f=this.nodes[b].in;if(h&&a&&f&&a==f)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&a&&f&&a==f)throw new Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:h,rhsId:b,rhsDir:G,rhsInto:v,rhsGroup:i,title:r};this.edges.push(e),this.nodes[L]&&this.nodes[b]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const b=new Set;L.members.forEach(A=>{if(this.registeredIds[A]!=="node")throw new Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(b.has(A))throw new Error(`align ${L.direction} lists [${A}] more than once`);b.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},b=Object.entries(this.nodes).reduce((i,[r,a])=>(i[r]=a.edges.reduce((f,e)=>{const u=this.getNode(e.lhsId)?.in,t=this.getNode(e.rhsId)?.in;if(u&&t&&u!==t){const s=Ar(e.lhsDir,e.rhsDir);s!=="bend"&&(L[u]??={},L[u][t]=s,L[t]??={},L[t][u]=s)}if(e.lhsId===r){const s=pe(e.lhsDir,e.rhsDir);s&&(f[s]=e.rhsId)}else{const s=pe(e.rhsDir,e.lhsDir);s&&(f[s]=e.lhsId)}return f},{}),i),{}),A=Object.keys(b)[0],G={[A]:1},N=Object.keys(b).reduce((i,r)=>r===A?i:{...i,[r]:1},{}),v=gt(i=>{const r={[i]:[0,0]},a=[i];for(;a.length>0;){const f=a.shift();if(f){G[f]=1,delete N[f];const e=b[f],[u,t]=r[f];Object.entries(e).forEach(([s,o])=>{G[o]||(r[o]=Cr([u,t],s),a.push(o))})}}return r},"BFS"),h=[v(A)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:b,spatialMaps:h,groupAlignments:L}}return this.dataStructures}setElementForId(L,b){this.elements[L]=b}getElementById(L){return this.elements[L]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(L){return this.getConfig()[L]}},xr=gt((L,b)=>{ke(L,b),L.groups.map(A=>b.addGroup(A)),L.services.map(A=>b.addService({...A,type:"service"})),L.junctions.map(A=>b.addJunction({...A,type:"junction"})),L.edges.map(A=>b.addEdge(A)),L.alignments?.map(A=>b.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ge={parser:{yy:void 0},parse:gt(async L=>{const b=await fr("architecture",L);Se.debug(b);const A=Ge.parser?.yy;if(!(A instanceof Pe))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.");xr(b,A)},"parse")},Ir=gt(L=>` .edge { stroke-width: ${L.archEdgeWidth}; stroke: ${L.archEdgeColor}; diff --git a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-CpvS2-LC.js b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-BNXb88Fr.js similarity index 99% rename from apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-CpvS2-LC.js rename to apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-BNXb88Fr.js index 76eb15c0b..6e3062b78 100644 --- a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-CpvS2-LC.js +++ b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-BNXb88Fr.js @@ -1,4 +1,4 @@ -import{g as de}from"./chunk-5VM5RSS4-CfD0Yt-O.js";import{aA as pe,aB as Kt,aC as fe,aD as xe,aE as ye,aF as be,aG as we,aH as me,aI as Se,aJ as Le,aK as ke,aL as ve,aM as Ee,aN as _e,aO as Te,aP as De,aQ as Be,aR as Ne,aS as Ie,aT as Ce,aU as Oe,aV as Re,aW as Ae,aX as ze,aY as Me,_ as g,z as rt,d as D,e as Pe,l as k,q as Fe,t as We,c as R,aZ as Ye,a7 as He,a8 as Ke,a3 as Ue,a_ as M,a$ as kt,b0 as Q,as as Xe,y as $,k as Ve,b1 as je,i as Ct,b2 as Ot,b3 as Ge}from"./mermaid.core-Cahi9cr1.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-Bob_1R_C.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";function Je(e){return Array.isArray(e)}function Qe(e){if(pe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(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(fe(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]"?er(i,e):xt(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 xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){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:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=m);return p},"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],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:g(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:g(function(m,p,x,L,E,o,F){var f=o.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: ",o[f-1]),L.setHierarchy(o[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: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:L.getLogger().debug("Rule: link: ",o[f],m),this.$={edgeTypeStr:o[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const C=parseInt(o[f]),Z=L.generateId();this.$={id:Z,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[f-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),gt=L.edgeStrToThickness(o[f-1].edgeTypeStr),O=L.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:gt,pattern:O,directions:o[f].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:L.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),L.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[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(u,[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(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[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(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,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(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,p){if(p.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=p,x}},"parseError"),parse:g(function(m){var p=this,x=[0],L=[],E=[null],o=[],F=this.table,f="",C=0,Z=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=p.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,pt,J={},st,G,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?ft="Parse error on line "+(C+1)+`: +import{g as de}from"./chunk-5VM5RSS4-yyj9cAyF.js";import{aA as pe,aB as Kt,aC as fe,aD as xe,aE as ye,aF as be,aG as we,aH as me,aI as Se,aJ as Le,aK as ke,aL as ve,aM as Ee,aN as _e,aO as Te,aP as De,aQ as Be,aR as Ne,aS as Ie,aT as Ce,aU as Oe,aV as Re,aW as Ae,aX as ze,aY as Me,_ as g,z as rt,d as D,e as Pe,l as k,q as Fe,t as We,c as R,aZ as Ye,a7 as He,a8 as Ke,a3 as Ue,a_ as M,a$ as kt,b0 as Q,as as Xe,y as $,k as Ve,b1 as je,i as Ct,b2 as Ot,b3 as Ge}from"./mermaid.core-CJB1tAev.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-xkK6nTGq.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";function Je(e){return Array.isArray(e)}function Qe(e){if(pe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(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(fe(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]"?er(i,e):xt(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 xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){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:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=m);return p},"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],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:g(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:g(function(m,p,x,L,E,o,F){var f=o.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: ",o[f-1]),L.setHierarchy(o[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: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:L.getLogger().debug("Rule: link: ",o[f],m),this.$={edgeTypeStr:o[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const C=parseInt(o[f]),Z=L.generateId();this.$={id:Z,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[f-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),gt=L.edgeStrToThickness(o[f-1].edgeTypeStr),O=L.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:gt,pattern:O,directions:o[f].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:L.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),L.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[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(u,[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(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[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(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,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(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,p){if(p.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=p,x}},"parseError"),parse:g(function(m){var p=this,x=[0],L=[],E=[null],o=[],F=this.table,f="",C=0,Z=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=p.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,pt,J={},st,G,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?ft="Parse error on line "+(C+1)+`: `+O.showPosition()+` Expecting `+it.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ft="Parse error on line "+(C+1)+": Unexpected "+(P==at?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ft,{text:O.match,token:this.terminals_[P]||P,line:O.yylineno,loc:dt,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+P);switch(H[0]){case 1:x.push(P),E.push(O.yytext),o.push(O.yylloc),x.push(H[1]),P=null,Z=O.yyleng,f=O.yytext,C=O.yylineno,dt=O.yylloc;break;case 2:if(G=this.productions_[H[1]][1],J.$=E[E.length-G],J._$={first_line:o[o.length-(G||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(G||1)].first_column,last_column:o[o.length-1].last_column},ge&&(J._$.range=[o[o.length-(G||1)].range[0],o[o.length-1].range[1]]),pt=this.performAction.apply(J,[f,Z,C,j.yy,H[1],E,o].concat(gt)),typeof pt<"u")return pt;G&&(x=x.slice(0,-1*G*2),E=E.slice(0,-1*G),o=o.slice(0,-1*G)),x.push(this.productions_[H[1]][0]),E.push(J.$),o.push(J._$),It=F[x[x.length-2]][x[x.length-1]],x.push(It);break;case 3:return!0}}return!0},"parse")},N=(function(){var T={EOF:1,parseError:g(function(p,x){if(this.yy.parser)this.yy.parser.parseError(p,x);else throw new Error(p)},"parseError"),setInput:g(function(m,p){return this.yy=p||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:g(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var p=m.match(/(?:\r\n?|\n).*/g);return p?(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:g(function(m){var p=m.length,x=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;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),x.length-1&&(this.yylineno-=x.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:x?(x.length===L.length?this.yylloc.first_column:0)+L[L.length-x.length].length-x[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-p]),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(m){this.unput(this.match.slice(m))},"less"),pastInput:g(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:g(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:g(function(){var m=this.pastInput(),p=new Array(m.length+1).join("-");return m+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-BvJQmgsI.js b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-CUyKVoVi.js similarity index 99% rename from apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-BvJQmgsI.js rename to apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-CUyKVoVi.js index 1603c8fa7..c44d1d792 100644 --- a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-BvJQmgsI.js +++ b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-CUyKVoVi.js @@ -1,4 +1,4 @@ -import{g as Oe,d as Re}from"./chunk-32BRIVSS-DAsxL712.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-Cahi9cr1.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.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-32BRIVSS-DUDRPqmY.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-CJB1tAev.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.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/kimi-code/dist-web/assets/channel-Bob_1R_C.js b/apps/kimi-code/dist-web/assets/channel-Bob_1R_C.js deleted file mode 100644 index 58164dadd..000000000 --- a/apps/kimi-code/dist-web/assets/channel-Bob_1R_C.js +++ /dev/null @@ -1 +0,0 @@ -import{U as a,C as n}from"./mermaid.core-Cahi9cr1.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/kimi-code/dist-web/assets/channel-xkK6nTGq.js b/apps/kimi-code/dist-web/assets/channel-xkK6nTGq.js new file mode 100644 index 000000000..3838ae216 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/channel-xkK6nTGq.js @@ -0,0 +1 @@ +import{U as a,C as n}from"./mermaid.core-CJB1tAev.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-B47YykJY.js b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-DsAC7dRk.js similarity index 67% rename from apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-B47YykJY.js rename to apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-DsAC7dRk.js index 6bf4b6afd..09a3ced2a 100644 --- a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-B47YykJY.js +++ b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-DsAC7dRk.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-Cahi9cr1.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-CJB1tAev.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/kimi-code/dist-web/assets/chunk-32BRIVSS-DAsxL712.js b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-DUDRPqmY.js similarity index 96% rename from apps/kimi-code/dist-web/assets/chunk-32BRIVSS-DAsxL712.js rename to apps/kimi-code/dist-web/assets/chunk-32BRIVSS-DUDRPqmY.js index 6d983def1..24d8ca128 100644 --- a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-DAsxL712.js +++ b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-DUDRPqmY.js @@ -1 +1 @@ -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-Cahi9cr1.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,g as c,x as d,m as e,w as f,h as g,y as h}; +import{_ as i,d as l,n as d,j as o}from"./mermaid.core-CJB1tAev.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,g as c,x as d,m as e,w as f,h as g,y as h}; diff --git a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CfD0Yt-O.js b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-yyj9cAyF.js similarity index 83% rename from apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CfD0Yt-O.js rename to apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-yyj9cAyF.js index 6cf4f3ebb..5798bdcab 100644 --- a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CfD0Yt-O.js +++ b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-yyj9cAyF.js @@ -1,4 +1,4 @@ -import{_ as e}from"./mermaid.core-Cahi9cr1.js";var l=e(()=>` +import{_ as e}from"./mermaid.core-CJB1tAev.js";var l=e(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; diff --git a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DGM3fHaz.js b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-BCWDroXJ.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DGM3fHaz.js rename to apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-BCWDroXJ.js index 011f432c9..e9fc77468 100644 --- a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DGM3fHaz.js +++ b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-BCWDroXJ.js @@ -1,4 +1,4 @@ -import{g as te}from"./chunk-XXDRQBXY-BmzWd-kT.js";import{s as ee}from"./chunk-VR4S4FIN-he8WxbY-.js";import{_ as f,l as _,c as $,x as se,y as ie,a as re,b as ae,g as ne,s as oe,o as le,p as ce,a9 as he,k as j,q as ue,d as bt,a5 as de}from"./mermaid.core-Cahi9cr1.js";import{f as fe}from"./chunk-32BRIVSS-DAsxL712.js";var vt=(function(){var t=f(function(V,a,d,r){for(d=d||{},r=V.length;r--;d[V[r]]=a);return d},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],k=[1,21],u=[1,22],L=[1,23],I=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],w=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[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],xt=[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,d,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,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],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{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(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[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(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,d){if(d.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=d,r}},"parseError"),parse:f(function(a){var d=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){r.length=r.length-2*N,E.length=E.length-N,i.length=i.length-N}f(Zt,"popStack");function Lt(){var N;return N=g.pop()||b.lex()||Q,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=d.symbols_[N]||N),N}f(Lt,"lex");for(var A,W,R,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?R=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),R=B[W]&&B[W][A]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`: +import{g as te}from"./chunk-XXDRQBXY-5rh7CWvm.js";import{s as ee}from"./chunk-VR4S4FIN-CEH7JYJn.js";import{_ as f,l as _,c as $,x as se,y as ie,a as re,b as ae,g as ne,s as oe,o as le,p as ce,a9 as he,k as j,q as ue,d as bt,a5 as de}from"./mermaid.core-CJB1tAev.js";import{f as fe}from"./chunk-32BRIVSS-DUDRPqmY.js";var vt=(function(){var t=f(function(V,a,d,r){for(d=d||{},r=V.length;r--;d[V[r]]=a);return d},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],k=[1,21],u=[1,22],L=[1,23],I=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],w=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[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],xt=[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,d,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,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],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{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(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[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(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,d){if(d.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=d,r}},"parseError"),parse:f(function(a){var d=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){r.length=r.length-2*N,E.length=E.length-N,i.length=i.length-N}f(Zt,"popStack");function Lt(){var N;return N=g.pop()||b.lex()||Q,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=d.symbols_[N]||N),N}f(Lt,"lex");for(var A,W,R,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?R=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),R=B[W]&&B[W][A]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`: `+b.showPosition()+` Expecting `+dt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":mt="Parse error on line "+(Y+1)+": Unexpected "+(A==Q?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[A]||A,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: "+W+", token: "+A);switch(R[0]){case 1:r.push(A),E.push(b.yytext),i.push(b.yylloc),r.push(R[1]),A=null,K=b.yyleng,l=b.yytext,Y=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[R[1]][1],X.$=E[E.length-G],X._$={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&&(X._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(X,[l,K,Y,U.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(X.$),i.push(X._$),It=B[r[r.length-2]][r[r.length-1]],r.push(It);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(d,r){if(this.yy.parser)this.yy.parser.parseError(d,r);else throw new Error(d)},"parseError"),setInput:f(function(a,d){return this.yy=d||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 d=a.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),a},"input"),unput:f(function(a){var d=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=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===g.length?this.yylloc.first_column:0)+g[g.length-r.length].length-r[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),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(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-DTx-f56M.js b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-Dsg3gA8l.js similarity index 71% rename from apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-DTx-f56M.js rename to apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-Dsg3gA8l.js index fe5afe2af..ef3bb13e5 100644 --- a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-DTx-f56M.js +++ b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-Dsg3gA8l.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-Cahi9cr1.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-CJB1tAev.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/kimi-code/dist-web/assets/chunk-MOJQB5TN-hIDvr-8C.js b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-JQ2kJR9W.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-hIDvr-8C.js rename to apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-JQ2kJR9W.js index c181e41d2..ca6d13d0a 100644 --- a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-hIDvr-8C.js +++ b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-JQ2kJR9W.js @@ -1,4 +1,4 @@ -import{_ as p,l as w,F as L,z as E,q as I,W as X,e as q,i as H,c as G}from"./mermaid.core-Cahi9cr1.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,G()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),I(),w.debug("[Railroad] Database cleared")},"clear"),W=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),_=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,` +import{_ as p,l as w,F as L,z as E,q as I,W as X,e as q,i as H,c as G}from"./mermaid.core-CJB1tAev.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,G()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),I(),w.debug("[Railroad] Database cleared")},"clear"),W=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),_=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,` `),w.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ee=p(()=>N,"getAccDescription"),te=W,re=_,ie={clear:U,setTitle:W,getTitle:_,addRule:j,getRules:K,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:V,getAccDescription:ee,setDiagramTitle:te,getDiagramTitle:re},g={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),B=p(e=>e?Object.keys(e).every(i=>i==="railroad"||oe.has(i)):!1,"isRailroadStyleOptions"),le=p(e=>e?"railroad"in e&&e.railroad?e.railroad:B(e)?e:{}:{},"extractRailroadOverrides"),se=p(e=>{if(!e||B(e))return{};const{railroad:i,svgId:a,theme:r,look:t,...n}=e;return n},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ne.test(a)?a:i},"sanitizeColorValue"),Y=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ae.test(a)?a:i},"sanitizeFontFamilyValue"),S=p((e,i)=>{const a=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(a)&&a>=0?a:i},"sanitizeNumberValue"),de=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ce=p(e=>{const i=Y(e.fontFamily,g.fontFamily),a=de(e.fontSize)??g.fontSize;return{...g,fontFamily:i,fontSize:a,terminalFill:m(e.secondBkg??e.secondaryColor,g.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,g.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,g.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,g.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,g.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,g.nonTerminalTextColor),lineColor:m(e.lineColor,g.lineColor),markerFill:m(e.lineColor,g.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,g.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,g.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,g.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,g.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,g.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,g.ruleNameColor)}},"buildThemeDefaults"),M=p(e=>{const i=E(),a={...X(),...i.themeVariables??{},...se(e)},r=ce(a),t={...i.railroad??{},...le(e)};return{compactMode:t.compactMode??r.compactMode,padding:S(t.padding,r.padding),verticalSeparation:S(t.verticalSeparation,r.verticalSeparation),horizontalSeparation:S(t.horizontalSeparation,r.horizontalSeparation),arcRadius:S(t.arcRadius,r.arcRadius),fontSize:S(t.fontSize,r.fontSize),fontFamily:Y(t.fontFamily,r.fontFamily),terminalFill:m(t.terminalFill,r.terminalFill),terminalStroke:m(t.terminalStroke,r.terminalStroke),terminalTextColor:m(t.terminalTextColor,r.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:m(t.lineColor,r.lineColor),strokeWidth:S(t.strokeWidth,r.strokeWidth),markerFill:m(t.markerFill,r.markerFill),commentFill:m(t.commentFill,r.commentFill),commentStroke:m(t.commentStroke,r.commentStroke),commentTextColor:m(t.commentTextColor,r.commentTextColor),specialFill:m(t.specialFill,r.specialFill),specialStroke:m(t.specialStroke,r.specialStroke),ruleNameColor:m(t.ruleNameColor,r.ruleNameColor),showMarkers:t.showMarkers??r.showMarkers,markerRadius:S(t.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),ue=p(e=>{const{fontFamily:i,fontSize:a,terminalFill:r,terminalStroke:t,terminalTextColor:n,nonTerminalFill:h,nonTerminalStroke:s,nonTerminalTextColor:o,lineColor:u,strokeWidth:c,markerFill:d,commentFill:x,commentStroke:l,commentTextColor:f,specialFill:y,specialStroke:v,ruleNameColor:C}=M(e);return` .railroad-diagram { font-family: ${i}; diff --git a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BHZEnq1y.js b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-Df2V79id.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BHZEnq1y.js rename to apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-Df2V79id.js index d7e08f4d7..b0c5afb3c 100644 --- a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BHZEnq1y.js +++ b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-Df2V79id.js @@ -1 +1 @@ -import{_ as u,l as i}from"./mermaid.core-Cahi9cr1.js";import{i as m,G as y}from"./graph-DOmOIIwC.js";import{b as _,m as X}from"./map-DxJ2ADlA.js";var j=4;function p(e){return _(e,j)}function C(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:F(e),edges:M(e)};return m(e.graph())||(r.value=p(e.graph())),r}function F(e){return X(e.nodes(),function(r){var n=e.node(r),s=e.parent(r),t={v:r};return m(n)||(t.value=n),m(s)||(t.parent=s),t})}function M(e){return X(e.edges(),function(r){var n=e.edge(r),s={v:r.v,w:r.w};return m(r.name)||(s.name=r.name),m(n)||(s.value=n),s})}var c=new Map,w=new Map,A=new Map,J=u(()=>{w.clear(),A.clear(),c.clear()},"clear"),v=u((e,r)=>{const n=w.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),R=u((e,r)=>{const n=w.get(r)||[];return i.info("Descendants of ",r," is ",n),i.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||v(e.v,r)||v(e.w,r)||n.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),b=u((e,r,n,s)=>{i.warn("Copying children of ",e,"root",s,"data",r.node(e),s);const t=r.children(e)||[];e!==s&&t.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",t),t.forEach(o=>{if(r.children(o).length>0)b(o,r,n,s);else{const l=r.node(o);i.info("cp ",o," to ",s," with parent ",e),n.setNode(o,l),s!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o))),e!==s&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",s,"data",r.node(e),s),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==s,"node!==clusterId",o!==e));const f=r.edges(o);i.debug("Copying Edges",f),f.forEach(a=>{i.info("Edge",a);const d=r.edge(a.v,a.w,a.name);i.info("Edge data",d,s);try{if(R(a,s)){const g=w.get(s)||[],E=g.includes(a.v)||v(a.v,s)||a.v===s,x=g.includes(a.w)||v(a.w,s)||a.w===s;if(E&&x)i.info("Copying as ",a.v,a.w,d,a.name),n.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else{const N=E?s:a.v,h=x?s:a.w;i.info("Rebinding cross-boundary edge as ",N,h,d,a.name),r.setEdge(N,h,d,a.name)}}else i.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",s," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=u((e,r)=>{const n=r.children(e);let s=[...n];for(const t of n)A.set(t,e),s=[...s,...O(t,r)];return s},"extractDescendants"),P=u((e,r,n)=>{const s=e.edges().filter(a=>a.v===r||a.w===r),t=e.edges().filter(a=>a.v===n||a.w===n),o=s.map(a=>({v:a.v===r?n:a.v,w:a.w===r?r:a.w})),l=t.map(a=>({v:a.v,w:a.w}));return o.filter(a=>l.some(d=>a.v===d.v&&a.w===d.w))},"findCommonEdges"),D=u((e,r,n)=>{const s=r.children(e);if(i.trace("Searching children of id ",e,s),s.length<1)return e;let t;for(const o of s){const l=D(o,r,n),f=P(r,n,l);if(l)if(f.length>0)t=l;else return l}return t},"findNonClusterChild"),S=u(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),U=u((e,r)=>{if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),w.set(n,O(n,e)),c.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const s=e.children(n),t=e.edges();s.length>0?(i.debug("Cluster identified",n,w),t.forEach(o=>{const l=v(o.v,n),f=v(o.w,n);l^f&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",w.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,w)});for(let n of c.keys()){const s=c.get(n).id,t=e.parent(s);t!==n&&c.has(t)&&!c.get(t).externalConnections&&(c.get(n).id=t);const o=e.edges().some(l=>l.v===n);if(s&&c.get(n)?.externalConnections&&o&&L(e,s,n)){const l=T(e,n,e.parent(s));l&&(c.get(n).id=l)}}e.edges().forEach(function(n){const s=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let t=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),t=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),t!==n.v){const l=e.parent(t);c.get(l).externalConnections=!0,s.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);c.get(l).externalConnections=!0,s.toCluster=n.w}i.warn("Fix Replacing with XXX",t,o,n.name),e.setEdge(t,o,s,n.name)}}),i.warn("Adjusted Graph",C(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=u((e,r)=>{if(i.warn("extractor - ",r,C(e),e.children("D")),r>10){i.error("Bailing out");return}let n=e.nodes(),s=!1;for(const t of n){const o=e.children(t);s=s||o.length>0}if(!s){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,r);for(const t of n)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if(c.get(t)?.clusterData?.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const o=c.get(t).clusterData.dir,l=new y({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,l,t);const f=e.node(t)||{};e.setNode(t,{...f,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:l}),i.warn("Subgraph for cluster with explicit dir created:",t,C(l))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(t)?.clusterData?.dir&&(l=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,l));const f=new y({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,f,t);const a=e.node(t)||{};e.setNode(t,{...a,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:f}),i.debug("Old graph after copy",C(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(const t of n){const o=e.node(t);i.warn(" Now next level",t,o),o?.clusterNode&&k(o.graph,r+1)}},"extractor"),B=u((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(s=>{const t=e.children(s),o=B(e,t);n=[...n,...o]}),n},"sorter"),W=u(e=>B(e,e.children()),"sortNodesByHierarchy"),L=u((e,r,n)=>{let s=e.parent(r);for(;s&&s!==n;){const t=c.get(s);if(t&&!t.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),T=u((e,r,n)=>{const s=e.children(r)??[];for(const t of s){if(t===n||v(t,n))continue;const o=D(t,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{U as a,c as b,J as c,D as f,W as s,C as w}; +import{_ as u,l as i}from"./mermaid.core-CJB1tAev.js";import{i as m,G as y}from"./graph-DOmOIIwC.js";import{b as _,m as X}from"./map-DxJ2ADlA.js";var j=4;function p(e){return _(e,j)}function C(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:F(e),edges:M(e)};return m(e.graph())||(r.value=p(e.graph())),r}function F(e){return X(e.nodes(),function(r){var n=e.node(r),s=e.parent(r),t={v:r};return m(n)||(t.value=n),m(s)||(t.parent=s),t})}function M(e){return X(e.edges(),function(r){var n=e.edge(r),s={v:r.v,w:r.w};return m(r.name)||(s.name=r.name),m(n)||(s.value=n),s})}var c=new Map,w=new Map,A=new Map,J=u(()=>{w.clear(),A.clear(),c.clear()},"clear"),v=u((e,r)=>{const n=w.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),R=u((e,r)=>{const n=w.get(r)||[];return i.info("Descendants of ",r," is ",n),i.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||v(e.v,r)||v(e.w,r)||n.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),b=u((e,r,n,s)=>{i.warn("Copying children of ",e,"root",s,"data",r.node(e),s);const t=r.children(e)||[];e!==s&&t.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",t),t.forEach(o=>{if(r.children(o).length>0)b(o,r,n,s);else{const l=r.node(o);i.info("cp ",o," to ",s," with parent ",e),n.setNode(o,l),s!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o))),e!==s&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",s,"data",r.node(e),s),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==s,"node!==clusterId",o!==e));const f=r.edges(o);i.debug("Copying Edges",f),f.forEach(a=>{i.info("Edge",a);const d=r.edge(a.v,a.w,a.name);i.info("Edge data",d,s);try{if(R(a,s)){const g=w.get(s)||[],E=g.includes(a.v)||v(a.v,s)||a.v===s,x=g.includes(a.w)||v(a.w,s)||a.w===s;if(E&&x)i.info("Copying as ",a.v,a.w,d,a.name),n.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else{const N=E?s:a.v,h=x?s:a.w;i.info("Rebinding cross-boundary edge as ",N,h,d,a.name),r.setEdge(N,h,d,a.name)}}else i.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",s," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=u((e,r)=>{const n=r.children(e);let s=[...n];for(const t of n)A.set(t,e),s=[...s,...O(t,r)];return s},"extractDescendants"),P=u((e,r,n)=>{const s=e.edges().filter(a=>a.v===r||a.w===r),t=e.edges().filter(a=>a.v===n||a.w===n),o=s.map(a=>({v:a.v===r?n:a.v,w:a.w===r?r:a.w})),l=t.map(a=>({v:a.v,w:a.w}));return o.filter(a=>l.some(d=>a.v===d.v&&a.w===d.w))},"findCommonEdges"),D=u((e,r,n)=>{const s=r.children(e);if(i.trace("Searching children of id ",e,s),s.length<1)return e;let t;for(const o of s){const l=D(o,r,n),f=P(r,n,l);if(l)if(f.length>0)t=l;else return l}return t},"findNonClusterChild"),S=u(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),U=u((e,r)=>{if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),w.set(n,O(n,e)),c.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const s=e.children(n),t=e.edges();s.length>0?(i.debug("Cluster identified",n,w),t.forEach(o=>{const l=v(o.v,n),f=v(o.w,n);l^f&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",w.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,w)});for(let n of c.keys()){const s=c.get(n).id,t=e.parent(s);t!==n&&c.has(t)&&!c.get(t).externalConnections&&(c.get(n).id=t);const o=e.edges().some(l=>l.v===n);if(s&&c.get(n)?.externalConnections&&o&&L(e,s,n)){const l=T(e,n,e.parent(s));l&&(c.get(n).id=l)}}e.edges().forEach(function(n){const s=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let t=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),t=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),t!==n.v){const l=e.parent(t);c.get(l).externalConnections=!0,s.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);c.get(l).externalConnections=!0,s.toCluster=n.w}i.warn("Fix Replacing with XXX",t,o,n.name),e.setEdge(t,o,s,n.name)}}),i.warn("Adjusted Graph",C(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=u((e,r)=>{if(i.warn("extractor - ",r,C(e),e.children("D")),r>10){i.error("Bailing out");return}let n=e.nodes(),s=!1;for(const t of n){const o=e.children(t);s=s||o.length>0}if(!s){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,r);for(const t of n)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if(c.get(t)?.clusterData?.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const o=c.get(t).clusterData.dir,l=new y({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,l,t);const f=e.node(t)||{};e.setNode(t,{...f,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:l}),i.warn("Subgraph for cluster with explicit dir created:",t,C(l))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(t)?.clusterData?.dir&&(l=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,l));const f=new y({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,f,t);const a=e.node(t)||{};e.setNode(t,{...a,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:f}),i.debug("Old graph after copy",C(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(const t of n){const o=e.node(t);i.warn(" Now next level",t,o),o?.clusterNode&&k(o.graph,r+1)}},"extractor"),B=u((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(s=>{const t=e.children(s),o=B(e,t);n=[...n,...o]}),n},"sorter"),W=u(e=>B(e,e.children()),"sortNodesByHierarchy"),L=u((e,r,n)=>{let s=e.parent(r);for(;s&&s!==n;){const t=c.get(s);if(t&&!t.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),T=u((e,r,n)=>{const s=e.children(r)??[];for(const t of s){if(t===n||v(t,n))continue;const o=D(t,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{U as a,c as b,J as c,D as f,W as s,C as w}; diff --git a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DjiRieSh.js b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-B4q9plWN.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DjiRieSh.js rename to apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-B4q9plWN.js index e4a150ebe..2943bac3e 100644 --- a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DjiRieSh.js +++ b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-B4q9plWN.js @@ -1,4 +1,4 @@ -import{g as tt}from"./chunk-5VM5RSS4-CfD0Yt-O.js";import{g as st}from"./chunk-XXDRQBXY-BmzWd-kT.js";import{s as it}from"./chunk-VR4S4FIN-he8WxbY-.js";import{_ as f,l as Ie,c as F,v as at,x as nt,y as Oe,d as de,a5 as rt,b as ut,a as lt,s as ct,g as ot,o as ht,p as dt,k as I,q as pt,r as At,i as ft,a6 as G}from"./mermaid.core-Cahi9cr1.js";import{f as gt}from"./chunk-32BRIVSS-DAsxL712.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],n=[1,20],r=[1,41],c=[1,26],u=[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],ne=[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],re=[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,l,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:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.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:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.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:l.addMember(e[s-1],l.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.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.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.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.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:n,38:22,42:r,43:23,46:c,48:u,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:n,42:r,46:c,48:u,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:n,38:22,42:r,43:23,46:c,48:u,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:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{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(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[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:r,43:23,48:u,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:ne},{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(re,[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:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},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(re,[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:ne},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],l=[],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=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.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-5VM5RSS4-yyj9cAyF.js";import{g as st}from"./chunk-XXDRQBXY-5rh7CWvm.js";import{s as it}from"./chunk-VR4S4FIN-CEH7JYJn.js";import{_ as f,l as Ie,c as F,v as at,x as nt,y as Oe,d as de,a5 as rt,b as ut,a as lt,s as ct,g as ot,o as ht,p as dt,k as I,q as pt,r as At,i as ft,a6 as G}from"./mermaid.core-CJB1tAev.js";import{f as gt}from"./chunk-32BRIVSS-DUDRPqmY.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],n=[1,20],r=[1,41],c=[1,26],u=[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],ne=[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],re=[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,l,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:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.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:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.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:l.addMember(e[s-1],l.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.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.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.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.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:n,38:22,42:r,43:23,46:c,48:u,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:n,42:r,46:c,48:u,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:n,38:22,42:r,43:23,46:c,48:u,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:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{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(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[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:r,43:23,48:u,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:ne},{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(re,[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:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},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(re,[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:ne},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],l=[],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=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.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 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),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===l.length?this.yylloc.first_column:0)+l[l.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/kimi-code/dist-web/assets/chunk-VR4S4FIN-he8WxbY-.js b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CEH7JYJn.js similarity index 87% rename from apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-he8WxbY-.js rename to apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CEH7JYJn.js index 0fd0e5f39..2d8f67ed1 100644 --- a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-he8WxbY-.js +++ b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CEH7JYJn.js @@ -1 +1 @@ -import{_ as a,e as w,l as x}from"./mermaid.core-Cahi9cr1.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-CJB1tAev.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/kimi-code/dist-web/assets/chunk-XXDRQBXY-BmzWd-kT.js b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-5rh7CWvm.js similarity index 72% rename from apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BmzWd-kT.js rename to apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-5rh7CWvm.js index d22960aaf..146d77322 100644 --- a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BmzWd-kT.js +++ b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-5rh7CWvm.js @@ -1 +1 @@ -import{_ as a,d as o}from"./mermaid.core-Cahi9cr1.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-CJB1tAev.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/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-ClMG95L0.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-ClMG95L0.js new file mode 100644 index 000000000..75377c626 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-ClMG95L0.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-B4q9plWN.js";import{_ as i}from"./mermaid.core-CJB1tAev.js";import"./chunk-5VM5RSS4-yyj9cAyF.js";import"./chunk-XXDRQBXY-5rh7CWvm.js";import"./chunk-VR4S4FIN-CEH7JYJn.js";import"./chunk-32BRIVSS-DUDRPqmY.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var f={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{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-FzVd5qC_.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-FzVd5qC_.js deleted file mode 100644 index 51d71a408..000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-FzVd5qC_.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DjiRieSh.js";import{_ as i}from"./mermaid.core-Cahi9cr1.js";import"./chunk-5VM5RSS4-CfD0Yt-O.js";import"./chunk-XXDRQBXY-BmzWd-kT.js";import"./chunk-VR4S4FIN-he8WxbY-.js";import"./chunk-32BRIVSS-DAsxL712.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var f={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{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-ClMG95L0.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-ClMG95L0.js new file mode 100644 index 000000000..75377c626 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-ClMG95L0.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-B4q9plWN.js";import{_ as i}from"./mermaid.core-CJB1tAev.js";import"./chunk-5VM5RSS4-yyj9cAyF.js";import"./chunk-XXDRQBXY-5rh7CWvm.js";import"./chunk-VR4S4FIN-CEH7JYJn.js";import"./chunk-32BRIVSS-DUDRPqmY.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var f={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{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-FzVd5qC_.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-FzVd5qC_.js deleted file mode 100644 index 51d71a408..000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-FzVd5qC_.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DjiRieSh.js";import{_ as i}from"./mermaid.core-Cahi9cr1.js";import"./chunk-5VM5RSS4-CfD0Yt-O.js";import"./chunk-XXDRQBXY-BmzWd-kT.js";import"./chunk-VR4S4FIN-he8WxbY-.js";import"./chunk-32BRIVSS-DAsxL712.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var f={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{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B4N3AGR7.js b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-TWQPJk-P.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B4N3AGR7.js rename to apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-TWQPJk-P.js index e161ae8ee..7c650885b 100644 --- a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B4N3AGR7.js +++ b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-TWQPJk-P.js @@ -1 +1 @@ -import{_ as V,l as k,d as lt}from"./mermaid.core-Cahi9cr1.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-HRJ6xRtC.js";var Z={exports:{}},$={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})])})})(Z)),Z.exports}var yt=vt();const Et=gt(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=lt("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=>{k.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){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.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"),Ot=Lt;export{Ot as render}; +import{_ as V,l as k,d as lt}from"./mermaid.core-CJB1tAev.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-D-7nOosq.js";var Z={exports:{}},$={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})])})})(Z)),Z.exports}var yt=vt();const Et=gt(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=lt("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=>{k.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){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.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"),Ot=Lt;export{Ot as render}; diff --git a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-C5gNr-Q4.js b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BIlq342y.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-C5gNr-Q4.js rename to apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BIlq342y.js index c74a442cc..465b4ad85 100644 --- a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-C5gNr-Q4.js +++ b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BIlq342y.js @@ -1,4 +1,4 @@ -import{bR as et}from"./index-HRJ6xRtC.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../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})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(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})(Ac||(Ac={})),(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})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.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 A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(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 A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(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 A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(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 A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(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 A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(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 A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(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 Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(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"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(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"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(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"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(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=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=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=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.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=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.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.")}},Ku=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(Ke.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()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(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(Hi.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 ki(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 ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,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;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.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;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.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;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.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 A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(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 A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(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})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(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})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(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&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(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})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(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})(Yc||(Yc={})),(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})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.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})(Jc||(Jc={})),(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"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(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 A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.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&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(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 A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(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"})(sf||(sf={})),(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"})(of||(of={})),(function(e){function t(r){const n=r;return A.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})(lf||(lf={})),(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&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(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&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(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&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(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 A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[` +import{bR as et}from"./index-D-7nOosq.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../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})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(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})(Ac||(Ac={})),(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})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.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 A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(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 A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(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 A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(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 A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(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 A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(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 A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(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 Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(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"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(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"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(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"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(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=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=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=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.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=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.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.")}},Ku=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(Ke.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()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(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(Hi.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 ki(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 ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,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;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.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;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.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;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.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 A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(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 A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(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})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(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})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(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&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(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})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(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})(Yc||(Yc={})),(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})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.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})(Jc||(Jc={})),(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"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(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 A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.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&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(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 A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(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"})(sf||(sf={})),(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"})(of||(of={})),(function(e){function t(r){const n=r;return A.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})(lf||(lf={})),(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&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(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&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(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&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(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 A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[` `,`\r `,"\r"],(function(e){function t(s,o,l,u){return new lh(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return!!(A.defined(o)&&A.string(o.uri)&&(A.undefined(o.languageId)||A.string(o.languageId))&&A.uinteger(o.lineCount)&&A.func(o.getText)&&A.func(o.positionAt)&&A.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=a(o,(f,d)=>{let m=f.range.start.line-d.range.start.line;return m===0?f.range.start.character-d.range.start.character:m}),c=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],m=s.offsetAt(d.range.start),g=s.offsetAt(d.range.end);if(g<=c)l=l.substring(0,m)+d.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,u=s.slice(0,l),c=s.slice(l);a(u,o),a(c,o);let f=0,d=0,m=0;for(;f({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).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("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` +import{p as xt}from"./chunk-JWPE2WC7-Dsg3gA8l.js";import{s as gt,g as $t,p as bt,o as wt,a as Ct,b as vt,_ as s,l as O,F as Dt,e as kt,q as Tt,B as U,z as Q,D as At,W as ot}from"./mermaid.core-CJB1tAev.js";import{p as Bt}from"./cynefin-VYW2F7L2-BIlq342y.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).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("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` .cynefinDomain { stroke: none; } diff --git a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CDFnWuZ_.js b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-D8gdq5tS.js similarity index 97% rename from apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CDFnWuZ_.js rename to apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-D8gdq5tS.js index f6280a8f8..b6eae6b18 100644 --- a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CDFnWuZ_.js +++ b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-D8gdq5tS.js @@ -1,4 +1,4 @@ -import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-BHZEnq1y.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-Cahi9cr1.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,m,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==m&&r.add(i),n!==m&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,m=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(m,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}case"top":default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",m=0,c={})=>{const r=s.x,f=s.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};case"top":default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const m=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),m.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},y=Z(s,n,r,i.start,o),X=ee(n,y,t,p.width??0),S=te(n,X,y,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,m,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX +import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-Df2V79id.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-CJB1tAev.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,m,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==m&&r.add(i),n!==m&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,m=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(m,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}case"top":default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",m=0,c={})=>{const r=s.x,f=s.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};case"top":default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const m=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),m.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},y=Z(s,n,r,i.start,o),X=ee(n,y,t,p.width??0),S=te(n,X,y,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,m,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX Node.id = `,d,` data=`,u.height,` Parent cluster`,c.height),t.setNode(c.id,u),t.parent(d)||(l.trace("Setting parent",d,c.id),t.setParent(d,c.id,u))}if(l.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),e?.clusterNode){l.info("Cluster identified XBX",d,e.width,t.node(d));const{ranksep:u,nodesep:x}=t.graph();e.graph.setGraph({...e.graph.graph(),ranksep:u+25,nodesep:x});const N=await T(n,e.graph,g,m,t.node(d),o),M=N.elem;W(e,M),e.diff=N.diff||0,l.info("New compound node after recursive render XAX",d,"width",e.width,"height",e.height),$(M,e)}else t.children(d).length>0?(l.trace("Cluster - the non recursive path XBX",d,e.id,e,e.width,"Graph:",t),l.trace(P(e.id,t)),E.set(e.id,{id:P(e.id,t),node:e})):(l.trace("Node - the non recursive path XAX",d,n,t.node(d),r),await j(n,t.node(d),{config:o,dir:r}))})),await w(async()=>{const d=t.edges().map(async function(e){const u=t.edge(e.v,e.w,e.name);if(l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.info("Fix",E,"ids:",e.v,e.w,"Translating: ",E.get(e.v),E.get(e.w)),p&&u.selfLoop){if(u.selfLoop.order!==1)return;const x=u.id;u.id=u.selfLoop.id,await G(i,u),u.id=x;return}await G(i,u)});await Promise.all(d)},"processEdges")(),l.info("Graph before layout:",JSON.stringify(I(t))),l.info("############################################# XXX"),l.info("### Layout ### XXX"),l.info("############################################# XXX"),U(t),l.info("Graph after layout:",JSON.stringify(I(t)));let X=0,{subGraphTitleTotalMargin:S}=q(o);await Promise.all(A(t).map(async function(d){const e=t.node(d);if(l.info("Position XBX => "+d+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode)e.y+=S,l.info("A tainted cluster node XBX1",d,e.id,e.width,e.height,e.x,e.y,t.parent(d)),E.get(e.id).node=e,R(e);else if(t.children(d).length>0){l.info("A pure cluster node XBX1",d,e.id,e.x,e.y,e.width,e.height,t.parent(d)),e.height+=S,t.node(e.parentId);const u=e?.padding/2||0,x=e?.labelBBox?.height||0,N=x-u||0;l.debug("OffsetY",N,"labelHeight",x,"halfPadding",u),await F(h,e),E.get(e.id).node=e}else{const u=t.node(e.parentId);e.y+=S/2,l.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",u,u?.offsetY,e),R(e)}}));const b=S/2;return ne(t,b,{mergeSelfLoops:p}).forEach(function({edge:d,start:e,end:u}){l.info("Edge "+e+" -> "+u+": "+JSON.stringify(d),d),d.points.forEach(k=>k.y+=b);const x=t.node(e),N=t.node(u),M=z(a,d,E,g,x,N,m);K(d,M)}),t.nodes().forEach(function(d){const e=t.node(d);l.info(d,e.type,e.diff),e.isGroup&&(X=e.diff)}),l.warn("Returning from recursive render XAX",f,X),{elem:f,diff:X}},"recursiveRender"),le=w(async(s,t)=>{const g=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:s.direction,nodesep:s.config?.nodeSpacing||s.config?.flowchart?.nodeSpacing||s.nodeSpacing,ranksep:s.config?.rankSpacing||s.config?.flowchart?.rankSpacing||s.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),m=t.select("g");v(m,s.markers,s.type,s.diagramId),D(),H(),Y(),O(),s.nodes.forEach(o=>{g.setNode(o.id,{...o}),o.parentId&&g.setParent(o.id,o.parentId)}),l.debug("Edges:",s.edges),s.edges.forEach(o=>{if(o.start===o.end){const r=o.start,f=r+"---"+r+"---1",h=r+"---"+r+"---2",a=g.node(r);g.setNode(f,{domId:f,id:f,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),g.setParent(f,a.parentId),g.setNode(h,{domId:h,id:h,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),g.setParent(h,a.parentId);const i=structuredClone(o),n=structuredClone(o),p=structuredClone(o),y=structuredClone(o);n.originalEdge=i,n.selfLoop={id:i.id,order:0},p.originalEdge=i,p.selfLoop={id:i.id,order:1},y.originalEdge=i,y.selfLoop={id:i.id,order:2},n.label="",n.arrowTypeEnd="none",n.endLabelLeft="",n.endLabelRight="",n.startLabelLeft="",n.id=r+"-cyclic-special-1",p.startLabelRight="",p.startLabelLeft="",p.endLabelLeft="",p.endLabelRight="",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=r+"-cyclic-special-mid",y.label="",y.startLabelRight="",y.startLabelLeft="",y.arrowTypeStart="none",a.isGroup&&(n.fromCluster=r,y.toCluster=r),y.id=r+"-cyclic-special-2",y.arrowTypeStart="none",g.setEdge(r,f,n,r+"-cyclic-special-0"),g.setEdge(f,h,p,r+"-cyclic-special-1"),g.setEdge(h,r,y,r+"-cyclic-special-2")}else g.setEdge(o.start,o.end,{...o},o.id)}),l.warn("Graph at first:",JSON.stringify(I(g))),J(g),l.warn("Graph after XAX:",JSON.stringify(I(g)));const c=_();await T(m,g,s.type,s.diagramId,void 0,c)},"render");export{ne as getEdgesToRender,le as render}; diff --git a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-Cqley8W-.js b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-D2bRXH1a.js similarity index 98% rename from apps/kimi-code/dist-web/assets/diagram-FQU43EPY-Cqley8W-.js rename to apps/kimi-code/dist-web/assets/diagram-FQU43EPY-D2bRXH1a.js index 8c54a47a8..f0cf49a25 100644 --- a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-Cqley8W-.js +++ b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-D2bRXH1a.js @@ -1,3 +1,3 @@ -import{p as re}from"./chunk-JWPE2WC7-DTx-f56M.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,A as xe,q as fe,B as ge,z as M,D as he,i as y,w as P,ak as pe}from"./mermaid.core-Cahi9cr1.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var T="position frame",$="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=G(i,n.dataEntities,t);e=v(e,{$kind:T,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 L(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(L,"calculateEntityVisualProps");function G(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-JWPE2WC7-Dsg3gA8l.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,A as xe,q as fe,B as ge,z as M,D as he,i as y,w as P,ak as pe}from"./mermaid.core-CJB1tAev.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-BIlq342y.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var T="position frame",$="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=G(i,n.dataEntities,t);e=v(e,{$kind:T,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 L(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(L,"calculateEntityVisualProps");function G(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(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:$,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={[T]:V,[S]:J},Be={[$]: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=D(),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 De=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}=D(),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"),Te={draw:De},$e=o(e=>"","getStyles"),Ne=$e,Ue={parser:Ee,db:F,renderer:Te,styles:Ne};export{Ue as diagram}; diff --git a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-jJWknpV7.js b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-BF9x_uf7.js similarity index 97% rename from apps/kimi-code/dist-web/assets/diagram-G47NLZAW-jJWknpV7.js rename to apps/kimi-code/dist-web/assets/diagram-G47NLZAW-BF9x_uf7.js index 4cfba9e28..646a85161 100644 --- a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-jJWknpV7.js +++ b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-BF9x_uf7.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-DTx-f56M.js";import{_ as w,W as ge,z as te,B as Q,F as ye,e as Se,l as ee,be as B,d as j,b as ve,a as xe,o as be,p as we,g as Ce,s as Te,D as Le,bf as $e,q as Ae}from"./mermaid.core-Cahi9cr1.js";import{s as Fe}from"./chunk-VR4S4FIN-he8WxbY-.js";import{p as Ne}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Me(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(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function We(e){for(var a=this,n=Ee(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 Ee(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 Re(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*qe(){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;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function Ge(){return ae(this).eachBefore(je)}function Xe(e){return e.children}function Ye(e){return Array.isArray(e)?e[1]:null}function je(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:We,ancestors:Re,descendants:He,leaves:Ie,links:Oe,copy:Ge,[Symbol.iterator]:qe};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Je(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 Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(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(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(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(oe,"buildHierarchy");var lt=w((e,a)=>{me(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 h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))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.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,W=10,G=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*W:960,x=o.nodeHeight?o.nodeHeight*W:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().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]),N=K().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]),$=K().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]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+W:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?W:0).paddingRight(t=>t.children&&t.children.length>0?W:0).paddingBottom(t=>t.children&&t.children.length>0?W:0).round(!0)(E),he=ne.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.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;":""),R.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),R.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=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),R.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("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=j(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&R.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?u(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:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,Y=V.selectAll(".treemapLeafGroup").data(le).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})`);Y.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),Y.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)),Y.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: ${de}px;fill:`+$(t.data.name)+";",f=B({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=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(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: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` +import{p as me}from"./chunk-JWPE2WC7-Dsg3gA8l.js";import{_ as w,W as ge,z as te,B as Q,F as ye,e as Se,l as ee,be as B,d as j,b as ve,a as xe,o as be,p as we,g as Ce,s as Te,D as Le,bf as $e,q as Ae}from"./mermaid.core-CJB1tAev.js";import{s as Fe}from"./chunk-VR4S4FIN-CEH7JYJn.js";import{p as Ne}from"./cynefin-VYW2F7L2-BIlq342y.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Me(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(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function We(e){for(var a=this,n=Ee(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 Ee(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 Re(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*qe(){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;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function Ge(){return ae(this).eachBefore(je)}function Xe(e){return e.children}function Ye(e){return Array.isArray(e)?e[1]:null}function je(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:We,ancestors:Re,descendants:He,leaves:Ie,links:Oe,copy:Ge,[Symbol.iterator]:qe};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Je(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 Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(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(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(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(oe,"buildHierarchy");var lt=w((e,a)=>{me(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 h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))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.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,W=10,G=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*W:960,x=o.nodeHeight?o.nodeHeight*W:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().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]),N=K().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]),$=K().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]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+W:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?W:0).paddingRight(t=>t.children&&t.children.length>0?W:0).paddingBottom(t=>t.children&&t.children.length>0?W:0).round(!0)(E),he=ne.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.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;":""),R.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),R.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=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),R.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("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=j(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&R.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?u(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:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,Y=V.selectAll(".treemapLeafGroup").data(le).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})`);Y.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),Y.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)),Y.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: ${de}px;fill:`+$(t.data.name)+";",f=B({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=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(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: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-iqDRMohg.js b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-DUn2m-AO.js similarity index 93% rename from apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-iqDRMohg.js rename to apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-DUn2m-AO.js index fc3f9fa4b..bc899383c 100644 --- a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-iqDRMohg.js +++ b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-DUn2m-AO.js @@ -1,4 +1,4 @@ -import{p as B}from"./chunk-JWPE2WC7-DTx-f56M.js";import{_ as b,B as u,F as $,e as C,l as m,b as S,a as D,o as T,p as z,g as F,s as P,z as E,D as A,q as W}from"./mermaid.core-Cahi9cr1.js";import{p as _}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var N=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{B(t,e);let r=-1,o=[],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 o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-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),M(e,r)},"parse")},I=b((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const s of e){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.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(s.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(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:t}={})=>{const e=u(q,t);return` +import{p as B}from"./chunk-JWPE2WC7-Dsg3gA8l.js";import{_ as b,B as u,F as $,e as C,l as m,b as S,a as D,o as T,p as z,g as F,s as P,z as E,D as A,q as W}from"./mermaid.core-CJB1tAev.js";import{p as _}from"./cynefin-VYW2F7L2-BIlq342y.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var N=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{B(t,e);let r=-1,o=[],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 o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-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),M(e,r)},"parse")},I=b((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const s of e){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.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(s.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(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:t}={})=>{const e=u(q,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DSnuTLFG.js b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-BOIp7TNe.js similarity index 96% rename from apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DSnuTLFG.js rename to apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-BOIp7TNe.js index 7a0f11d80..dd7fa5554 100644 --- a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DSnuTLFG.js +++ b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-BOIp7TNe.js @@ -1,4 +1,4 @@ -import{I as X}from"./chunk-2Q5K7J3B-B47YykJY.js";import{p as O}from"./chunk-JWPE2WC7-DTx-f56M.js";import{o as G,b as Y,s as F,p as P,g as j,a as q,_ as f,B as A,l as D,F as Z,e as U,z as N,q as J,i as K,ai as Q,D as ee,aj as te}from"./mermaid.core-Cahi9cr1.js";import{p as ne}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(` +import{I as X}from"./chunk-2Q5K7J3B-DsAC7dRk.js";import{p as O}from"./chunk-JWPE2WC7-Dsg3gA8l.js";import{o as G,b as Y,s as F,p as P,g as j,a as q,_ as f,B as A,l as D,F as Z,e as U,z as N,q as J,i as K,ai as Q,D as ee,aj as te}from"./mermaid.core-CJB1tAev.js";import{p as ne}from"./cynefin-VYW2F7L2-BIlq342y.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(` `),t=new Map;let r=-1;for(const[s,o]of e.entries())if(o.trim()==="treeView-beta"){r=s;break}if(r===-1)return{text:n,lineMap:t};const i=[];for(let s=r+1;s({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=f(()=>{x.reset(),J()},"clear"),se=f(()=>x.records.stack[0],"getRoot"),ae=f(()=>x.records.cnt,"getCount"),ce=ee.treeView,le=f(()=>A(ce,N().treeView),"getConfig"),de=f((n,e,t,r,i,a)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const c={id:x.records.cnt++,level:n,name:e,nodeType:t,icon:i,cssClass:r,description:a,children:[]};x.records.stack[x.records.stack.length-1].children.push(c),x.records.stack.push(c)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:q,getAccDescription:j,getDiagramTitle:P,setAccDescription:F,setAccTitle:Y,setDiagramTitle:G},I=he,pe=f(n=>{O(n,I);for(const e of n.nodes){const t=typeof e.indent=="number"?e.indent:0;let r=e.name;const i=r.endsWith("/");i&&(r=r.slice(0,-1));const a=i?"directory":"file",c=e.classAnnotation||void 0,l=e.iconAnnotation,s=l!==void 0?l||"none":void 0,o=e.descAnnotation||void 0,h=o?K(o,N()):void 0;I.addNode(t,r,a,c,s,h)}},"populate"),fe={parse:f(async n=>{const{text:e,lineMap:t}=R(n);try{const r=await ne("treeView",e);D.debug(r),pe(r)}catch(r){throw t.size>0&&r instanceof Error&&(r.message=M(r.message,t)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};function z(n,e){const t=e?.filenameIcons?.[n];if(t)return t;const r=n.lastIndexOf(".");if(r>0){const i=n.substring(r).toLowerCase(),a=e?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}f(z,"detectIcon");function C(n,e){return n.includes(":")?n:n in b.icons||!e?`${b.prefix}:${n}`:`${e}:${n}`}f(C,"qualifyIcon");function B(n,e){if(n.icon!=="none"){if(n.icon)return C(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){const t=z(n.name,e);if(t==="none")return;if(t)return C(t,e.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}f(B,"getNodeIcon");te([{name:b.prefix,icons:b}]);var y=14,ge=4,ue=16,H=f((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),we=f(async(n,e,t,r)=>{const i=new Set,a=f(s=>{const o=B(s,t);o&&i.add(o),s.children.forEach(a)},"collect");if(a(e),i.size===0)return;const c=await Promise.all([...i].map(async s=>({icon:s,svg:await Q(s,{height:y,width:y})}))),l=n.append("defs");for(const{icon:s,svg:o}of c)l.append("g").attr("id",H(r,s)).html(o)},"injectIconDefs"),me=f((n,e,t,r,i,a)=>{const c=r.append("g");let l="treeView-node-label";t.nodeType==="directory"&&(l+=" treeView-node-dir"),t.cssClass&&(l+=` ${t.cssClass}`);const s=y+ge,o=B(t,i),h=o!==void 0;o&&c.append("use").attr("xlink:href",`#${H(a,o)}`).attr("x",n+i.paddingX).attr("y",e+i.paddingY).attr("class","treeView-node-icon");const p=c.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:d,width:w}=p.node().getBBox(),g=d+i.paddingY*2,m=n+i.paddingX+(h?s:0);p.attr("x",m),p.attr("y",e+g/2);const u=m+w,v=w+i.paddingX*2+(h?s:0);return t.BBox={x:n,y:e,width:v,height:g},t.cssClass?.split(/\s+/).includes("highlight")&&c.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:c,labelRightEdge:u,centerY:e+g/2}},"positionLabel"),T=f((n,e,t,r,i,a)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),xe=f((n,e,t,r)=>{let i=0,a=0;const c=[],l=f((h,p,d,w)=>{const g=w*(d.rowIndent+d.paddingX),m=me(g,i,p,h,d,r);c.push(m);const{height:u,width:v}=p.BBox;T(h,g-d.rowIndent,i+u/2,g,i+u/2,d.lineThickness),a=Math.max(a,g+v),i+=u},"drawNode"),s=f((h,p=0)=>{l(n,h,t,p),h.children.forEach(m=>{s(m,p+1)});const{x:d,y:w,height:g}=h.BBox;if(h.children.length){const{y:m,height:u}=h.children[h.children.length-1].BBox;T(n,d+t.paddingX,w+g,d+t.paddingX,m+u/2+t.lineThickness/2,t.lineThickness)}},"processNode");s(e);const o=c.filter(h=>h.node.description);if(o.length>0){const p=Math.max(...c.map(d=>d.labelRightEdge))+ue;for(const d of o){const g=d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",d.centerY).node().getBBox();a=Math.max(a,p+g.width+t.paddingX)}}for(const h of c)if(h.node.cssClass?.split(/\s+/).includes("highlight")){const p=h.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const d=a-h.node.BBox.x+8;p.attr("width",d),a=Math.max(a,h.node.BBox.x+d+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),ve=f(async(n,e,t,r)=>{D.debug(`Rendering treeView diagram `+n);const i=r.db,a=i.getRoot(),c=i.getConfig(),l=Z(e);await we(l,a,c,e);const s=l.append("g");s.attr("class","tree-view");const{totalHeight:o,totalWidth:h}=xe(s,a,c,e);l.attr("viewBox",`-${c.lineThickness/2} 0 ${h} ${o}`),U(l,o,h,c.useMaxWidth)},"draw"),be={draw:ve},Ie=be,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ye=f(({treeView:n})=>{const{labelFontSize:e,labelColor:t,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:c,highlightStroke:l}=A(Ce,n);return` diff --git a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-lGPhYqjp.js b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-CFwFRAWa.js similarity index 95% rename from apps/kimi-code/dist-web/assets/diagram-WEI45ONY-lGPhYqjp.js rename to apps/kimi-code/dist-web/assets/diagram-WEI45ONY-CFwFRAWa.js index 9b7db5b49..b2a80168d 100644 --- a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-lGPhYqjp.js +++ b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-CFwFRAWa.js @@ -1,4 +1,4 @@ -import{p as k}from"./chunk-JWPE2WC7-DTx-f56M.js";import{s as R,g as F,p as I,o as _,a as D,b as E,_ as c,F as z,q as P,B as y,z as C,D as G,l as B,W,e as V}from"./mermaid.core-Cahi9cr1.js";import{p as H}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:m},x=structuredClone(w),j=G.radar,q=c(()=>y({...j,...C().radar}),"getConfig"),b=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),X=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(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=c(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=c(()=>{P(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((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 V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"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}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;ry({...j,...C().radar}),"getConfig"),b=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),X=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(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=c(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=c(()=>{P(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((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 V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"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}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;r{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; +import{g as l,r as m,d as n}from"./chunk-MOJQB5TN-JQ2kJR9W.js";import{p}from"./chunk-JWPE2WC7-Dsg3gA8l.js";import{_ as t,l as o}from"./mermaid.core-CJB1tAev.js";import{M as u,a as f}from"./cynefin-VYW2F7L2-BIlq342y.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; diff --git a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-MX1lpdtV.js b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DVzumNgk.js similarity index 99% rename from apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-MX1lpdtV.js rename to apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DVzumNgk.js index 54e42e292..317317275 100644 --- a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-MX1lpdtV.js +++ b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DVzumNgk.js @@ -1,4 +1,4 @@ -import{g as Mt}from"./chunk-XXDRQBXY-BmzWd-kT.js";import{s as Bt}from"./chunk-VR4S4FIN-he8WxbY-.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,o as Gt,p as Kt,c as it,l as V,q as Ut,r as Zt,t as jt,u as Wt,v as qt,x as Qt,d as Xt,y as Ht}from"./mermaid.core-Cahi9cr1.js";import{c as Jt}from"./channel-Bob_1R_C.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var _t=(function(){var e=l(function(I,n,c,o){for(c=c||{},o=I.length;o--;c[I[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],S=[1,19],q=[1,28],M=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[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,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],Q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],gt=[66,67,68,69,70],bt=[1,85],kt=[1,84],mt=[1,82],Et=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],X=[1,93],H=[1,92],J=[1,91],U=[19,58],Tt=[1,102],Ot=[1,101],ht=[19,58,61,63],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,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType: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:73,$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",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"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],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,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 68: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 80:case 81:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82: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 67:case 70:this.$=t[s];break;case 66:this.$=t[s-1]+t[s];break;case 69:t[s-2].push(t[s]),this.$=t[s-2];break;case 71:this.$=t[s].replace(/"/g,"");break;case 72:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79: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:S,43:q,44:M,48:D,50:R,51:T,52:C},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:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:nt,67:at,68:ct,69:ot,70: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:N},{16:47,40:O,41:N},{16:48,40:O,41:N},e(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(Y,[2,77]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},e(Q,[2,37]),e(Q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:nt,67:at,68:ct,69:ot,70: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],59:[1,78]},{21:[1,79]},{64:80,66:nt,67:at,68:ct,69:ot,70:lt},e(gt,[2,78]),e(gt,[2,79]),{6:bt,10:kt,39:81,42:mt,47:Et},{40:[1,86],41:[1,87]},e(St,[2,43],{46:88,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:A}),{6:bt,10:kt,39:89,42:mt,47:Et},{14:90,40:X,50:H,73:J},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:98,57:99,60:100,62:Tt,63:Ot}),e([19,58,62,63],[2,67]),{58:[2,66]},e(i,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(Q,[2,39]),e(Q,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,80]),e(i,[2,81]),e(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(i,[2,15]),e(U,[2,62],{57:110,61:[1,111],63:Ot}),e(U,[2,63]),e(ht,[2,68]),e(U,[2,71]),e(ht,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},e(St,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:X,50:H,73:J},{16:116,40:O,41:N},{14:117,40:X,50:H,73:J},e(i,[2,13]),e(U,[2,64]),{60:118,62:Tt},{19:[1,119]},e(i,[2,20]),e(i,[2,23],{17:[1,120],42:A}),e(i,[2,11]),{13:[1,121],42:A},e(i,[2,10]),e(ht,[2,69]),e(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:X,50:H,73:J},{19:[1,125]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},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,Nt=0,Dt=2,At=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 It(){var b;return b=r.pop()||_.lex()||At,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(It,"lex");for(var g,v,k,ft,w={},et,E,Rt,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),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-XXDRQBXY-5rh7CWvm.js";import{s as Bt}from"./chunk-VR4S4FIN-CEH7JYJn.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,o as Gt,p as Kt,c as it,l as V,q as Ut,r as Zt,t as jt,u as Wt,v as qt,x as Qt,d as Xt,y as Ht}from"./mermaid.core-CJB1tAev.js";import{c as Jt}from"./channel-xkK6nTGq.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.js";var _t=(function(){var e=l(function(I,n,c,o){for(c=c||{},o=I.length;o--;c[I[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],S=[1,19],q=[1,28],M=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[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,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],Q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],gt=[66,67,68,69,70],bt=[1,85],kt=[1,84],mt=[1,82],Et=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],X=[1,93],H=[1,92],J=[1,91],U=[19,58],Tt=[1,102],Ot=[1,101],ht=[19,58,61,63],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,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType: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:73,$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",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"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],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,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 68: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 80:case 81:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82: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 67:case 70:this.$=t[s];break;case 66:this.$=t[s-1]+t[s];break;case 69:t[s-2].push(t[s]),this.$=t[s-2];break;case 71:this.$=t[s].replace(/"/g,"");break;case 72:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79: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:S,43:q,44:M,48:D,50:R,51:T,52:C},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:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:nt,67:at,68:ct,69:ot,70: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:N},{16:47,40:O,41:N},{16:48,40:O,41:N},e(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(Y,[2,77]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},e(Q,[2,37]),e(Q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:nt,67:at,68:ct,69:ot,70: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],59:[1,78]},{21:[1,79]},{64:80,66:nt,67:at,68:ct,69:ot,70:lt},e(gt,[2,78]),e(gt,[2,79]),{6:bt,10:kt,39:81,42:mt,47:Et},{40:[1,86],41:[1,87]},e(St,[2,43],{46:88,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:A}),{6:bt,10:kt,39:89,42:mt,47:Et},{14:90,40:X,50:H,73:J},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:98,57:99,60:100,62:Tt,63:Ot}),e([19,58,62,63],[2,67]),{58:[2,66]},e(i,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(Q,[2,39]),e(Q,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,80]),e(i,[2,81]),e(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(i,[2,15]),e(U,[2,62],{57:110,61:[1,111],63:Ot}),e(U,[2,63]),e(ht,[2,68]),e(U,[2,71]),e(ht,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},e(St,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:X,50:H,73:J},{16:116,40:O,41:N},{14:117,40:X,50:H,73:J},e(i,[2,13]),e(U,[2,64]),{60:118,62:Tt},{19:[1,119]},e(i,[2,20]),e(i,[2,23],{17:[1,120],42:A}),e(i,[2,11]),{13:[1,121],42:A},e(i,[2,10]),e(ht,[2,69]),e(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:X,50:H,73:J},{19:[1,125]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},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,Nt=0,Dt=2,At=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 It(){var b;return b=r.pop()||_.lex()||At,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(It,"lex");for(var g,v,k,ft,w={},et,E,Rt,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),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==At?"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,Nt=_.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,Nt,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._$),Rt=Z[o[o.length-2]][o[o.length-1]],o.push(Rt);break;case 3:return!0}}return!0},"parse")},vt=(function(){var I={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/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BJ9xq3_H.js b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CzI-GKO4.js similarity index 99% rename from apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BJ9xq3_H.js rename to apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CzI-GKO4.js index fe7e7dec9..c717156e9 100644 --- a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BJ9xq3_H.js +++ b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CzI-GKO4.js @@ -1,4 +1,4 @@ -import{g as He}from"./chunk-5VM5RSS4-CfD0Yt-O.js";import{g as Xe}from"./chunk-XXDRQBXY-BmzWd-kT.js";import{s as Qe}from"./chunk-VR4S4FIN-he8WxbY-.js";import{_ as b,b6 as Ze,X as Oe,l as Z,c as g1,v as Je,x as $e,y as ie,b as et,s as tt,o as st,a as it,g as rt,p as at,k as nt,Y as ut,Z as ot,bo as lt,r as te,d as se,a5 as ct,q as ht,b8 as dt,t as pt}from"./mermaid.core-Cahi9cr1.js";import{f as ft}from"./chunk-32BRIVSS-DAsxL712.js";import{c as gt}from"./channel-Bob_1R_C.js";var bt="flowchart-",At=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=et,this.setAccDescription=tt,this.setDiagramTitle=st,this.getAccTitle=it,this.getAccDescription=rt,this.getDiagramTitle=at,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 nt.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={},A){if(!e||e.trim().length===0)return;let n;if(A!==void 0){let k;A.includes(` +import{g as He}from"./chunk-5VM5RSS4-yyj9cAyF.js";import{g as Xe}from"./chunk-XXDRQBXY-5rh7CWvm.js";import{s as Qe}from"./chunk-VR4S4FIN-CEH7JYJn.js";import{_ as b,b6 as Ze,X as Oe,l as Z,c as g1,v as Je,x as $e,y as ie,b as et,s as tt,o as st,a as it,g as rt,p as at,k as nt,Y as ut,Z as ot,bo as lt,r as te,d as se,a5 as ct,q as ht,b8 as dt,t as pt}from"./mermaid.core-CJB1tAev.js";import{f as ft}from"./chunk-32BRIVSS-DUDRPqmY.js";import{c as gt}from"./channel-xkK6nTGq.js";var bt="flowchart-",At=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=et,this.setAccDescription=tt,this.setDiagramTitle=st,this.getAccTitle=it,this.getAccDescription=rt,this.getDiagramTitle=at,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 nt.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={},A){if(!e||e.trim().length===0)return;let n;if(A!==void 0){let k;A.includes(` `)?k=A+` `:k=`{ `+A+` diff --git a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-UHBCrlBo.js b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-B2lfrNfh.js similarity index 99% rename from apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-UHBCrlBo.js rename to apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-B2lfrNfh.js index 13998c2fc..7552e3c8e 100644 --- a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-UHBCrlBo.js +++ b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-B2lfrNfh.js @@ -1,4 +1,4 @@ -import{bg as on,bh as On,bi as cn,bj as un,bk as ln,bl as ue,bm as Hn,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bn as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-Cahi9cr1.js";import{g as oe}from"./_commonjsHelpers-CqkleIqs.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-DHRafvZW.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-HRJ6xRtC.js";import"./defaultLocale-DX6XiGOO.js";function nr(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 rr(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 ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=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=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(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,gr,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>mr?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 yr(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(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(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,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(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());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(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=nt(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 br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(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 zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(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),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(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());Rt.range;const Sr=nt(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());Sr.range;const kt=nt(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:nt(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=nt(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:nt(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 _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,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,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(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 Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.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=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.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=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.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 ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(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 wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({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 Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(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/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"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(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={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 L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"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],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={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(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];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:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},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(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: +import{bg as on,bh as On,bi as cn,bj as un,bk as ln,bl as ue,bm as Hn,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bn as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-CJB1tAev.js";import{g as oe}from"./_commonjsHelpers-CqkleIqs.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-DH49UJnN.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-D-7nOosq.js";import"./defaultLocale-DX6XiGOO.js";function nr(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 rr(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 ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=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=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(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,gr,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>mr?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 yr(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(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(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,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(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());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(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=nt(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 br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(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 zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(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),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(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());Rt.range;const Sr=nt(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());Sr.range;const kt=nt(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:nt(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=nt(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:nt(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 _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,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,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(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 Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.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=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.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=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.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 ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(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 wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({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 Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(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/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"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(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={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 L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"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],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={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(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];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:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},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(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: `+H.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.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},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,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 c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;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),b.length-1&&(this.yylineno-=b.length-1);var I=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:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),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(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BO6zli_L.js b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-D7UBC8np.js similarity index 99% rename from apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BO6zli_L.js rename to apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-D7UBC8np.js index d319a6d09..131bb5638 100644 --- a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BO6zli_L.js +++ b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-D7UBC8np.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-B47YykJY.js";import{p as he}from"./chunk-JWPE2WC7-DTx-f56M.js";import{p as $e,o as fe,s as ge,g as ue,a as ye,b as xe,_ as h,z as J,l as w,d as me,c as W,y as pe,A as be,q as we,k as B,B as ke,D as ve,E as Ce}from"./mermaid.core-Cahi9cr1.js";import{p as Ee}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.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 le(()=>{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"),Re=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"),Ie=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:Re,branch:Ie,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)=>{he(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(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(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"),Ue=h(e=>e.branch,"parseCheckout"),Ke=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,R=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=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=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-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),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{I as le}from"./chunk-2Q5K7J3B-DsAC7dRk.js";import{p as he}from"./chunk-JWPE2WC7-Dsg3gA8l.js";import{p as $e,o as fe,s as ge,g as ue,a as ye,b as xe,_ as h,z as J,l as w,d as me,c as W,y as pe,A as be,q as we,k as B,B as ke,D as ve,E as Ce}from"./mermaid.core-CJB1tAev.js";import{p as Ee}from"./cynefin-VYW2F7L2-BIlq342y.js";import"./index-D-7nOosq.js";import"./_commonjsHelpers-CqkleIqs.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 le(()=>{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"),Re=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"),Ie=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:Re,branch:Ie,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)=>{he(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(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(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"),Ue=h(e=>e.branch,"parseCheckout"),Ke=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,R=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=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=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-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),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+R} ${s-i/2-L/2},${x-R} ${t.posWithOffset-i/2-L},${x-c-R} diff --git a/apps/kimi-code/dist-web/assets/index-V37-dq86.js b/apps/kimi-code/dist-web/assets/index-BZFTzQ6y.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-V37-dq86.js rename to apps/kimi-code/dist-web/assets/index-BZFTzQ6y.js index 45e88f965..2fcf7105a 100644 --- a/apps/kimi-code/dist-web/assets/index-V37-dq86.js +++ b/apps/kimi-code/dist-web/assets/index-BZFTzQ6y.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-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.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-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.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-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.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-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]); -import{bR as c}from"./index-HRJ6xRtC.js";var Ft=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,to=Object.getOwnPropertyNames,no=Object.prototype.hasOwnProperty,an=(e,t)=>{let n={};for(var r in e)Ft(n,r,{get:e[r],enumerable:!0});return Ft(n,Symbol.toStringTag,{value:"Module"}),n},ro=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=to(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=eo(t,a))||r.enumerable});return e},Sr=(e,t,n)=>(ro(e,t,"default"),n);const Ne=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>c(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.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-Dqspr-GT.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-Ve4PFQV2.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"],import:(()=>c(()=>import("./bat-BkioyH1T.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-BIv1doCn.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-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-MRO5bC_T.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:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-D53aC0YG.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([21,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([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>c(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{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([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{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([41,42])))},{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([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-C5YyOfLZ.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([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{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([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{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([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CzTSHFRz.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([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{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([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,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-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>c(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{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-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{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([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-DjAJT7YJ.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([37,26])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-KW6xsasC.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([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,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-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-IF9eRakj.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([71,72])))},{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([73,37,26])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-Cz2AlsmD.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:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,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"],import:(()=>c(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Dd19v3D-.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([76,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([77,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-Dspwwk_N.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([78,1,2,3,79])))},{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-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-C151Ov-r.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([83,84])))},{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([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>c(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{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([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-CnnmHF94.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([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{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([94,11,3,2,25,26,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-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{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-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>c(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-BQ8w6xss.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-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,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([100,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"),[]))}],at=Object.fromEntries(Ne.map(e=>[e.id,e.import])),lt=Object.fromEntries(Ne.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ut={...at,...lt},ct=[{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-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-D87Tk5Gz.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-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DWedfzmr.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-D4h5O-jR.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-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-D4_iv3hh.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-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-L9t79GZl.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"),[]))}],dt=Object.fromEntries(ct.map(e=>[e.id,e.import]));var ln=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function io(){return 2147483648}function oo(){return typeof performance<"u"?performance.now():Date.now()}const so=(e,t)=>e+(t-e%t)%t;async function ao(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=io();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 y=Math.min(E,so(Math.max(h,g),65536));if(s(y))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 y="";for(;m>10,56320|I&1023)}}return y}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:oo,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 lo=Object.defineProperty,uo=(e,t,n)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>uo(e,typeof t!="symbol"?t+"":t,n);let D=null;function co(e){throw new ln(e.UTF8ToString(e.getLastOnigError()))}class pt{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=pt._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 ht=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 ln("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new pt(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(ht,"LAST_ID",0);P(ht,"_sharedPtr",0);P(ht,"_sharedPtrInUse",!1);let Lr=ht;class po{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new ln("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)),ho(r)?r=await r.instantiator(n):fo(r)?r=await r.default(n):(mo(r)&&(r=r.data),go(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await yo(r)(n):r=await Eo(r)(n):_o(r)?r=await Lt(r)(n):r instanceof WebAssembly.Module?r=await Lt(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Lt(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Fe=t(),Fe}function Lt(e){return t=>WebAssembly.instantiate(e,t)}function yo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Eo(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Rr;function bo(e){Rr=e}function wo(){return Rr}async function un(e){return e&&await ft(e),{createScanner(t){return new po(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Lr(t)}}}const vo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:un,getDefaultWasmLoader:wo,loadWasm:ft,setDefaultWasmLoader:bo},Symbol.toStringTag,{value:"Module"}));var Ir=an({});Sr(Ir,vo);var L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Co(e){return cn(e)}function cn(e){return Array.isArray(e)?Ao(e):e instanceof RegExp?e:typeof e=="object"?ko(e):e}function Ao(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function Pr(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Pr(e.substring(0,e.length-1)):e.substr(~t+1)}var Rt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,je=class{static hasCaptures(e){return e===null?!1:(Rt.lastIndex=0,Rt.test(e))}static replaceCaptures(e,t,n){return e.replace(Rt,(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 Or(e,t){return et?1:0}function xr(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=>So(e.parent,i.parentScopes));return r?new Vr(r.fontStyle,r.foreground,r.background):null}},It=class Ke{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ke(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&&!Lo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Lo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Vr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ro(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 Io(E,b,i,l,u,p)}}return n}var Io=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 To(e,t){e.sort((l,u)=>{let p=Or(l.scope,u.scope);return p!==0||(p=xr(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 Po(t),s=new Vr(n,o.getId(r),o.getId(i)),a=new xo(new jt(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)}},xo=class Ht{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(Ht._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 Ht(this._mainRule.clone(),jt.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 Ze(e,t){const n=[],r=Do(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(Mn(i)){const l=[];do l.push(i),i=r.next();while(Mn(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 Mn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Do(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 Mr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Vo=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))}},$o=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 Vo;for(const n of e)Mo(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 Mo(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?Qe({baseGrammar:o,selfGrammar:i},r):Wt(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 Wt(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];et([r],t,n)}}function Qe(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&et(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&et(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function et(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Tr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&et(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Gr(o);switch(s.kind){case 0:Qe({...t,selfGrammar:t.baseGrammar},n);break;case 1:Qe(t,n);break;case 2:Wt(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?Wt(s.ruleName,l,n):Qe(l,n)}else s.kind===4?n.add(new No(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Go=class{kind=0},Bo=class{kind=1},Uo=class{constructor(e){this.ruleName=e}kind=2},Fo=class{constructor(e){this.scopeName=e}kind=3},jo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gr(e){if(e==="$base")return new Go;if(e==="$self")return new Bo;const t=e.indexOf("#");if(t===-1)return new Fo(e);if(t===0)return new Uo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new jo(n,r)}}var Ho=/\\(\d+)/,Gn=/\\(\d+)/g,Wo=-1,Br=-2;var Ve=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=je.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=je.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Pr(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:je.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:je.replaceCaptures(this._contentName,e,t)}},zo=class extends Ve{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!")}},qo=class extends Ve{_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}},Bn=class extends Ve{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}},zt=class extends Ve{_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}},tt=class extends Ve{_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,Br),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}},Ur=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new zo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new qo(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Tr({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Bn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new tt(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 zt(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 Gn.lastIndex=0,this.source.replace(Gn,(i,o)=>Dr(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 Un(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 Un(e,r,this._items.map(i=>i.ruleId))}},Un=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)Ft(n,r,{get:e[r],enumerable:!0});return Ft(n,Symbol.toStringTag,{value:"Module"}),n},ro=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=to(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=eo(t,a))||r.enumerable});return e},Sr=(e,t,n)=>(ro(e,t,"default"),n);const Ne=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>c(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.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-Dqspr-GT.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-Ve4PFQV2.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"],import:(()=>c(()=>import("./bat-BkioyH1T.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-BIv1doCn.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-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-MRO5bC_T.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:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-D53aC0YG.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([21,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([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>c(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{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([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{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([41,42])))},{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([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-C5YyOfLZ.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([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{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([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{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([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CzTSHFRz.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([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{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([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,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-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>c(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{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-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{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([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-DjAJT7YJ.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([37,26])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-KW6xsasC.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([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,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-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-IF9eRakj.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([71,72])))},{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([73,37,26])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-Cz2AlsmD.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:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,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"],import:(()=>c(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Dd19v3D-.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([76,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([77,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-Dspwwk_N.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([78,1,2,3,79])))},{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-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-C151Ov-r.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([83,84])))},{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([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>c(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{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([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-CnnmHF94.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([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{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([94,11,3,2,25,26,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-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{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-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>c(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-BQ8w6xss.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-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,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([100,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"),[]))}],at=Object.fromEntries(Ne.map(e=>[e.id,e.import])),lt=Object.fromEntries(Ne.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ut={...at,...lt},ct=[{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-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-D87Tk5Gz.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-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DWedfzmr.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-D4h5O-jR.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-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-D4_iv3hh.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-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-L9t79GZl.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"),[]))}],dt=Object.fromEntries(ct.map(e=>[e.id,e.import]));var ln=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function io(){return 2147483648}function oo(){return typeof performance<"u"?performance.now():Date.now()}const so=(e,t)=>e+(t-e%t)%t;async function ao(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=io();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 y=Math.min(E,so(Math.max(h,g),65536));if(s(y))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 y="";for(;m>10,56320|I&1023)}}return y}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:oo,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 lo=Object.defineProperty,uo=(e,t,n)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>uo(e,typeof t!="symbol"?t+"":t,n);let D=null;function co(e){throw new ln(e.UTF8ToString(e.getLastOnigError()))}class pt{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=pt._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 ht=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 ln("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new pt(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(ht,"LAST_ID",0);P(ht,"_sharedPtr",0);P(ht,"_sharedPtrInUse",!1);let Lr=ht;class po{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new ln("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)),ho(r)?r=await r.instantiator(n):fo(r)?r=await r.default(n):(mo(r)&&(r=r.data),go(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await yo(r)(n):r=await Eo(r)(n):_o(r)?r=await Lt(r)(n):r instanceof WebAssembly.Module?r=await Lt(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Lt(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Fe=t(),Fe}function Lt(e){return t=>WebAssembly.instantiate(e,t)}function yo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Eo(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Rr;function bo(e){Rr=e}function wo(){return Rr}async function un(e){return e&&await ft(e),{createScanner(t){return new po(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Lr(t)}}}const vo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:un,getDefaultWasmLoader:wo,loadWasm:ft,setDefaultWasmLoader:bo},Symbol.toStringTag,{value:"Module"}));var Ir=an({});Sr(Ir,vo);var L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Co(e){return cn(e)}function cn(e){return Array.isArray(e)?Ao(e):e instanceof RegExp?e:typeof e=="object"?ko(e):e}function Ao(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function Pr(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Pr(e.substring(0,e.length-1)):e.substr(~t+1)}var Rt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,je=class{static hasCaptures(e){return e===null?!1:(Rt.lastIndex=0,Rt.test(e))}static replaceCaptures(e,t,n){return e.replace(Rt,(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 Or(e,t){return et?1:0}function xr(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=>So(e.parent,i.parentScopes));return r?new Vr(r.fontStyle,r.foreground,r.background):null}},It=class Ke{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ke(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&&!Lo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Lo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Vr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ro(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 Io(E,b,i,l,u,p)}}return n}var Io=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 To(e,t){e.sort((l,u)=>{let p=Or(l.scope,u.scope);return p!==0||(p=xr(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 Po(t),s=new Vr(n,o.getId(r),o.getId(i)),a=new xo(new jt(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)}},xo=class Ht{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(Ht._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 Ht(this._mainRule.clone(),jt.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 Ze(e,t){const n=[],r=Do(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(Mn(i)){const l=[];do l.push(i),i=r.next();while(Mn(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 Mn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Do(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 Mr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Vo=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))}},$o=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 Vo;for(const n of e)Mo(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 Mo(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?Qe({baseGrammar:o,selfGrammar:i},r):Wt(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 Wt(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];et([r],t,n)}}function Qe(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&et(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&et(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function et(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Tr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&et(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Gr(o);switch(s.kind){case 0:Qe({...t,selfGrammar:t.baseGrammar},n);break;case 1:Qe(t,n);break;case 2:Wt(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?Wt(s.ruleName,l,n):Qe(l,n)}else s.kind===4?n.add(new No(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Go=class{kind=0},Bo=class{kind=1},Uo=class{constructor(e){this.ruleName=e}kind=2},Fo=class{constructor(e){this.scopeName=e}kind=3},jo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gr(e){if(e==="$base")return new Go;if(e==="$self")return new Bo;const t=e.indexOf("#");if(t===-1)return new Fo(e);if(t===0)return new Uo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new jo(n,r)}}var Ho=/\\(\d+)/,Gn=/\\(\d+)/g,Wo=-1,Br=-2;var Ve=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=je.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=je.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Pr(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:je.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:je.replaceCaptures(this._contentName,e,t)}},zo=class extends Ve{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!")}},qo=class extends Ve{_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}},Bn=class extends Ve{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}},zt=class extends Ve{_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}},tt=class extends Ve{_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,Br),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}},Ur=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new zo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new qo(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Tr({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Bn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new tt(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 zt(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 Gn.lastIndex=0,this.source.replace(Gn,(i,o)=>Dr(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 Un(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 Un(e,r,this._items.map(i=>i.ruleId))}},Un=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 Tt(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(qt.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/},Ko=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])=>Dr(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])}},Fn=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function jr(e,t,n,r,i,o,s,a){const l=t.content.length;let u=!1,p=-1;if(s){const h=Qo(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 Fn(i,!0);f()}return new Fn(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===Wo){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 y=i;if(i=i.parent,p=y.getAnchorPos(),!b&&y.getEnterPos()===r){i=y,o.produce(i,l),u=!0;return}}else{const g=e.getRule(E);o.produce(i,m[0].start);const y=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 zt){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&&y.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(g instanceof tt){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&&y.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 Qo(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 tt&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:p}=es(l.rule,e,l.stack.endRule,n,r===s),d=u.findNextMatchSync(t,r,p);if(d){if(d.ruleId!==Br){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=Yo(e,t,n,r,i,o),a=e.getInjections();if(a.length===0)return s;const l=Zo(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=y.captureIndices,u=y.ruleId,p=m.priority,a===i))break}return l?{priorityMatch:p===-1,captureIndices:l,matchedRuleId:u}:null}function Hr(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function es(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),y=b.pushAttributed(g,e),w=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,y),A=e.createOnigString(a.substring(0,h.end));jr(e,A,n&&h.start===0,h.start,w,i,!1,0),Mr(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 ts(b,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var ts=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ns(e,t,n,r,i,o,s,a){return new is(e,t,n,r,i,o,s,a)}function jn(e,t,n,r,i){const o=Ze(t,nt),s=Ur.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 nt(e,t){if(t.length{for(let i=n;in&&e.substr(0,n)===t&&e[n]==="."}var is=class{constructor(e,t,n,r,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Xo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Hn(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Ze(l,nt);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)jn(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&&jn(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]=Hn(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=Ur.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Xt.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 Xt(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 ss(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=jr(this,o,i,0,t,a,!0,r);return Mr(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Hn(e,t){return e=Co(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=It.push(i,o.scopeNames),r=new K(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new K(null,new It(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new It(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}},Xt=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))}},os=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ze(n,nt).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ze(n,nt).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}},ss=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)}},Kt=Xt.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 Wr(e){return Array.isArray(e)?e:[e]}async function dn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function $e(e){return!e||["plaintext","txt","text","plain"].includes(e)}function pn(e){return e==="ansi"||$e(e)}function Me(e){return e==="none"}function hn(e){return Me(e)}const us=/(\r?\n)/g;function Ge(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(us);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"?Wn.light:Wn.dark),n||(n=t.type==="light"?zn.light:zn.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,qn,{enumerable:!1,writable:!1,value:!0}),t}async function zr(e){return[...new Set((await Promise.all(e.filter(t=>!pn(t)).map(async t=>await dn(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function qr(e){return(await Promise.all(e.map(async t=>hn(t)?null:mt(await dn(t))))).filter(t=>!!t)}function Xr(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 L(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var cs=class extends ls{_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=mt(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=Ye.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Xr(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 L(`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))}},ds=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 gt(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 L("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(mt),i=new cs(new ds(e.engine,n),r,n,e.langAlias);let o;function s(y){return Xr(y,e.langAlias)}function a(y){b();const w=i.getGrammar(typeof y=="string"?y:y.name);if(!w)throw new L(`Language \`${y}\` not found, you may need to load it first`);return w}function l(y){if(y==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const w=i.getTheme(y);if(!w)throw new L(`Theme \`${y}\` not found, you may need to load it first`);return w}function u(y){b();const w=l(y);return o!==y&&(i.setTheme(w),o=y),{theme:w,colorMap:i.getColorMap()}}function p(){return b(),i.getLoadedThemes()}function d(){return b(),i.getLoadedLanguages()}function f(...y){b(),i.loadLanguages(y.flat(1))}async function h(...y){return f(await zr(y))}function m(...y){b();for(const w of y.flat(1))i.loadTheme(w)}async function E(...y){return b(),m(await qr(y))}function b(){if(t)throw new L("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 ps=gt;async function fn(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([qr(e.themes||[]),zr(e.langs||[]),e.engine]);return gt({...e,themes:t,langs:n,engine:r})}const hs=fn,Kr=new WeakMap;function _t(e,t){Kr.set(e,t)}function Te(e){return Kr.get(e)}var yt=class Qr{_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 Qr(Object.fromEntries(Wr(n).map(r=>[r,Kt])),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 fs(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function fs(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 ms(e,t){if(!(e instanceof yt))throw new L("Invalid grammar state");return e.getInternalStack(t)}const gs=/,/,_s=/ /;function Jr(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if($e(e.resolveLangAlias(n.lang||"text"))||Me(r))return Ge(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 L(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new L(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Zr(t,s,i,o,n)}function Yr(...e){if(e.length===2)return Te(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if($e(i)||Me(o))throw new L("Plain language does not have grammar state");if(i==="ansi")throw new L("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new yt(mn(n,l,s,a,r).stateStack,l.name,s.name)}function Zr(e,t,n,r,i){const o=mn(e,t,n,r,i),s=new yt(o.stateStack,t.name,n.name);return _t(o.tokens,s),o.tokens}function mn(e,t,n,r,i){const o=Ie(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=i,u=Ge(e);let p=i.grammarState?ms(i.grammarState,n.name)??Kt:i.grammarContextCode!=null?mn(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Kt,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,y,w;l&&l!=="tokenType"&&(g=t.tokenizeLine(E,p,a),y=g.tokens,w=0);const A=t.tokenizeLine2(E,p,a),k=A.tokens.length/2;for(let I=0;ISt.trim());break;case"object":he=Q.scope;break;default:continue}Nn.push({settings:Q,selectors:he.map(St=>St.split(_s))})}q.explanation=[];let Vn=0;for(;M+Vn({scopeName:t}))}function Es(e,t){const n=[];for(let r=0,i=t.length;r=0&&i>=0;)Xn(e[r],n[i])&&(r-=1),i-=1;return r===-1}function ws(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const s of i)if(bs(s,t,n)){r.push(o);break}return r}function gn(e,t,n,r=Jr){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=vs(...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:y,...w}=m[p][f];h.variants[i[E].color]=w}),h})),l=o[0].state?new yt(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return l&&_t(a,l),a}function vs(...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"&&Rs.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Qn,Ps);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Qn.test(o)){let s=o.replace(Ls,Ts);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=_n}return new i(r,t)}function Ts(e){return"-"+e.toLowerCase()}function Ps(e){return e.charAt(1).toUpperCase()}const Os=ei([ti,ks,ii,oi,si],"html"),ai=ei([ti,Ss,ii,oi,si],"svg"),Jn={}.hasOwnProperty;function xs(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Jn.call(i,e)){const l=String(i[e]);s=Jn.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 Ds=/["&'<>`]/g,Ns=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Vs=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,$s=/[|\\{}()[\]^$+*?.]/g,Yn=new WeakMap;function Ms(e,t){if(e=e.replace(t.subset?Gs(t.subset):Ds,r),t.subset||t.escapeOnly)return e;return e.replace(Ns,n).replace(Vs,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 Gs(e){let t=Yn.get(e);return t||(t=Bs(e),Yn.set(e,t)),t}function Bs(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:"€"},zs=["cent","copy","divide","gt","lt","not","para","times"],li={}.hasOwnProperty,Zt={};let He;for(He in Ot)li.call(Ot,He)&&(Zt[Ot[He]]=He);const qs=/[^\dA-Za-z]/;function Xs(e,t,n,r){const i=String.fromCharCode(e);if(li.call(Zt,i)){const o=Zt[i],s="&"+o;return n&&Ws.includes(o)&&!zs.includes(o)&&(!r||t&&t!==61&&qs.test(String.fromCharCode(t)))?s:s+";"}return""}function Ks(e,t,n){let r=Fs(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Xs(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Hs(e,t,n.omitOptionalSemicolons);o.length|^->||--!>|"],Ys=["<",">"];function Zs(e,t,n,r){return r.settings.bogusComments?"":"";function i(o){return ye(o,Object.assign({},r.settings.characterReferences,{subset:Ys}))}}function ea(e,t,n,r){return""}function Zn(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 ta(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function na(e){return e.join(" ").trim()}const ra=/[ \t\n\f\r]/g;function yn(e){return typeof e=="object"?e.type==="text"?er(e.value):!1:er(e)}function er(e){return e.replace(ra,"")===""}const x=ci(1),ui=ci(-1),ia=[];function ci(e){return t;function t(n,r,i){const o=n?n.children:ia;let s=(r||0)+e,a=o[s];if(!i)for(;a&&yn(a);)s+=e,a=o[s];return a}}const oa={}.hasOwnProperty;function di(e){return t;function t(n,r,i){return oa.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const En=di({body:aa,caption:xt,colgroup:xt,dd:da,dt:ca,head:xt,html:sa,li:ua,optgroup:pa,option:ha,p:la,rp:tr,rt:tr,tbody:ma,td:nr,tfoot:ga,th:nr,thead:fa,tr:_a});function xt(e,t,n){const r=x(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&yn(r.value.charAt(0)))}function sa(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function aa(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function la(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 ua(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="li"}function ca(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function da(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function tr(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function pa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function ha(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function fa(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ma(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ga(e,t,n){return!x(n,t)}function _a(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function nr(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ya=di({body:wa,colgroup:va,head:ba,html:Ea,tbody:Ca});function Ea(e){const t=x(e,-1);return!t||t.type!=="comment"}function ba(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 wa(e){const t=x(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&yn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function va(e,t,n){const r=ui(n,t),i=x(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&En(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Ca(e,t,n){const r=ui(n,t),i=x(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&En(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const We={name:[[` \f\r &/=>`.split(""),` diff --git a/apps/kimi-code/dist-web/assets/index-D-7nOosq.js b/apps/kimi-code/dist-web/assets/index-D-7nOosq.js new file mode 100644 index 000000000..f2c6fdf4b --- /dev/null +++ b/apps/kimi-code/dist-web/assets/index-D-7nOosq.js @@ -0,0 +1,638 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-CJB1tAev.js","assets/_commonjsHelpers-CqkleIqs.js","assets/CodeBlockNode-BAtAs_qm.js","assets/safeRaf-DGuzXxDK.js","assets/index5-Cn2jfVMX.js","assets/index11-Ci8_PlMN.js","assets/DesignSystemView-CTUhpkDe.js","assets/DesignSystemView-DVONbdv-.css","assets/rive-CeXCFBdn.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.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Dg(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const An={},Id=[],wr=()=>{},xS=()=>!1,Fp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Bg=e=>e.startsWith("onUpdate:"),to=Object.assign,I8=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},pR=Object.prototype.hasOwnProperty,Kn=(e,t)=>pR.call(e,t),jt=Array.isArray,Ld=e=>c1(e)==="[object Map]",Ac=e=>c1(e)==="[object Set]",k7=e=>c1(e)==="[object Date]",hR=e=>c1(e)==="[object RegExp]",un=e=>typeof e=="function",ro=e=>typeof e=="string",lr=e=>typeof e=="symbol",Zn=e=>e!==null&&typeof e=="object",L8=e=>(Zn(e)||un(e))&&un(e.then)&&un(e.catch),SS=Object.prototype.toString,c1=e=>SS.call(e),mR=e=>c1(e).slice(8,-1),Hg=e=>c1(e)==="[object Object]",zg=e=>ro(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,oc=Dg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wg=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},gR=/-\w/g,_s=Wg(e=>e.replace(gR,t=>t.slice(1).toUpperCase())),vR=/\B([A-Z])/g,Bi=Wg(e=>e.replace(vR,"-$1").toLowerCase()),Ug=Wg(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fh=Wg(e=>e?`on${Ug(e)}`:""),Es=(e,t)=>!Object.is(e,t),$d=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},jg=e=>{const t=parseFloat(e);return isNaN(t)?e:t},cm=e=>{const t=ro(e)?Number(e):NaN;return isNaN(t)?e:t};let b7;const Vg=()=>b7||(b7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),yR="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",kR=Dg(yR);function Zt(e){if(jt(e)){const t={};for(let n=0;n{if(n){const o=n.split(CR);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Re(e){let t="";if(ro(e))t=e;else if(jt(e))for(let n=0;nsa(n,t))}const TS=e=>!!(e&&e.__v_isRef===!0),N=e=>ro(e)?e:e==null?"":jt(e)||Zn(e)&&(e.toString===SS||!un(e.toString))?TS(e)?N(e.value):JSON.stringify(e,ES,2):String(e),ES=(e,t)=>TS(t)?ES(e,t.value):Ld(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[Dv(o,i)+" =>"]=s,n),{})}:Ac(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Dv(n))}:lr(t)?Dv(t):Zn(t)&&!jt(t)&&!Hg(t)?String(t):t,Dv=(e,t="")=>{var n;return lr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function TR(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ks;class IS{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&&ks&&(ks.active?(this.parent=ks,this.index=(ks.scopes||(ks.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(ks===this)ks=this.prevScope;else{let t=ks;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(Nf){let t=Nf;for(Nf=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;$f;){let t=$f;for($f=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 NS(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function FS(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),F8(o),IR(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function A4(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(RS(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function RS(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ip)||(e.globalVersion=ip,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!A4(e))))return;e.flags|=2;const t=e.dep,n=ho,o=jr;ho=e,jr=!0;try{NS(e);const s=e.fn(e._value);(t.version===0||Es(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ho=n,jr=o,FS(e),e.flags&=-3}}function F8(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)F8(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function IR(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function kje(e,t){e.effect instanceof dm&&(e=e.effect.fn);const n=new dm(e);t&&to(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function bje(e){e.effect.stop()}let jr=!0;const OS=[];function wl(){OS.push(jr),jr=!1}function _l(){const e=OS.pop();jr=e===void 0?!0:e}function C7(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ho;ho=void 0;try{t()}finally{ho=n}}}let ip=0;class LR{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 Zg{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(!ho||!jr||ho===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ho)n=this.activeLink=new LR(ho,this),ho.deps?(n.prevDep=ho.depsTail,ho.depsTail.nextDep=n,ho.depsTail=n):ho.deps=ho.depsTail=n,PS(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=ho.depsTail,n.nextDep=void 0,ho.depsTail.nextDep=n,ho.depsTail=n,ho.deps===n&&(ho.deps=o)}return n}trigger(t){this.version++,ip++,this.notify(t)}notify(t){$8();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{N8()}}}function PS(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)PS(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const fm=new WeakMap,sc=Symbol(""),M4=Symbol(""),rp=Symbol("");function ii(e,t,n){if(jr&&ho){let o=fm.get(e);o||fm.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new Zg),s.map=o,s.key=n),s.track()}}function Zl(e,t,n,o,s,i){const r=fm.get(e);if(!r){ip++;return}const l=a=>{a&&a.trigger()};if($8(),t==="clear")r.forEach(l);else{const a=jt(e),u=a&&zg(n);if(a&&n==="length"){const c=Number(o);r.forEach((d,f)=>{(f==="length"||f===rp||!lr(f)&&f>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get(rp)),t){case"add":a?u&&l(r.get("length")):(l(r.get(sc)),Ld(e)&&l(r.get(M4)));break;case"delete":a||(l(r.get(sc)),Ld(e)&&l(r.get(M4)));break;case"set":Ld(e)&&l(r.get(sc));break}}N8()}function $R(e,t){const n=fm.get(e);return n&&n.get(t)}function Jc(e){const t=Pn(e);return t===e?t:(ii(t,"iterate",rp),tr(e)?t:t.map(Kr))}function Gg(e){return ii(e=Pn(e),"iterate",rp),e}function ml(e,t){return ia(e)?Xd(Wa(e)?Kr(t):t):Kr(t)}const NR={__proto__:null,[Symbol.iterator](){return Hv(this,Symbol.iterator,e=>ml(this,e))},concat(...e){return Jc(this).concat(...e.map(t=>jt(t)?Jc(t):t))},entries(){return Hv(this,"entries",e=>(e[1]=ml(this,e[1]),e))},every(e,t){return Hl(this,"every",e,t,void 0,arguments)},filter(e,t){return Hl(this,"filter",e,t,n=>n.map(o=>ml(this,o)),arguments)},find(e,t){return Hl(this,"find",e,t,n=>ml(this,n),arguments)},findIndex(e,t){return Hl(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Hl(this,"findLast",e,t,n=>ml(this,n),arguments)},findLastIndex(e,t){return Hl(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Hl(this,"forEach",e,t,void 0,arguments)},includes(...e){return zv(this,"includes",e)},indexOf(...e){return zv(this,"indexOf",e)},join(e){return Jc(this).join(e)},lastIndexOf(...e){return zv(this,"lastIndexOf",e)},map(e,t){return Hl(this,"map",e,t,void 0,arguments)},pop(){return G1(this,"pop")},push(...e){return G1(this,"push",e)},reduce(e,...t){return w7(this,"reduce",e,t)},reduceRight(e,...t){return w7(this,"reduceRight",e,t)},shift(){return G1(this,"shift")},some(e,t){return Hl(this,"some",e,t,void 0,arguments)},splice(...e){return G1(this,"splice",e)},toReversed(){return Jc(this).toReversed()},toSorted(e){return Jc(this).toSorted(e)},toSpliced(...e){return Jc(this).toSpliced(...e)},unshift(...e){return G1(this,"unshift",e)},values(){return Hv(this,"values",e=>ml(this,e))}};function Hv(e,t,n){const o=Gg(e),s=o[t]();return o!==e&&!tr(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const FR=Array.prototype;function Hl(e,t,n,o,s,i){const r=Gg(e),l=r!==e&&!tr(e),a=r[t];if(a!==FR[t]){const d=a.apply(e,i);return l?Kr(d):d}let u=n;r!==e&&(l?u=function(d,f){return n.call(this,ml(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 w7(e,t,n,o){const s=Gg(e),i=s!==e&&!tr(e);let r=n,l=!1;s!==e&&(i?(l=o.length===0,r=function(u,c,d){return l&&(l=!1,u=ml(e,u)),n.call(this,u,ml(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?ml(e,a):a}function zv(e,t,n){const o=Pn(e);ii(o,"iterate",rp);const s=o[t](...n);return(s===-1||s===!1)&&Jg(n[0])?(n[0]=Pn(n[0]),o[t](...n)):s}function G1(e,t,n=[]){wl(),$8();const o=Pn(e)[t].apply(e,n);return N8(),_l(),o}const RR=Dg("__proto__,__v_isRef,__isVue"),DS=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(lr));function OR(e){lr(e)||(e=String(e));const t=Pn(this);return ii(t,"has",e),t.hasOwnProperty(e)}class BS{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?VS:jS:i?US:WS).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=jt(t);if(!s){let a;if(r&&(a=NR[n]))return a;if(n==="hasOwnProperty")return OR}const l=Reflect.get(t,n,Xo(t)?t:o);if((lr(n)?DS.has(n):RR(n))||(s||ii(t,"get",n),i))return l;if(Xo(l)){const a=r&&zg(n)?l:l.value;return s&&Zn(a)?E4(a):a}return Zn(l)?s?E4(l):Go(l):l}}class HS extends BS{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const r=jt(t)&&zg(n);if(!this._isShallow){const u=ia(i);if(!tr(o)&&!ia(o)&&(i=Pn(i),o=Pn(o)),!r&&Xo(i)&&!Xo(o))return u||(i.value=o),!0}const l=r?Number(n)e,P0=e=>Reflect.getPrototypeOf(e);function zR(e,t,n){return function(...o){const s=this.__v_raw,i=Pn(s),r=Ld(i),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=s[e](...o),c=n?T4:t?Xd:Kr;return!t&&ii(i,"iterate",a?M4:sc),to(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 D0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function WR(e,t){const n={get(s){const i=this.__v_raw,r=Pn(i),l=Pn(s);e||(Es(s,l)&&ii(r,"get",s),ii(r,"get",l));const{has:a}=P0(r),u=t?T4:e?Xd:Kr;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&&ii(Pn(s),"iterate",sc),s.size},has(s){const i=this.__v_raw,r=Pn(i),l=Pn(s);return e||(Es(s,l)&&ii(r,"has",s),ii(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=Pn(l),u=t?T4:e?Xd:Kr;return!e&&ii(a,"iterate",sc),l.forEach((c,d)=>s.call(i,u(c),u(d),r))}};return to(n,e?{add:D0("add"),set:D0("set"),delete:D0("delete"),clear:D0("clear")}:{add(s){const i=Pn(this),r=P0(i),l=Pn(s),a=!t&&!tr(s)&&!ia(s)?l:s;return r.has.call(i,a)||Es(s,a)&&r.has.call(i,s)||Es(l,a)&&r.has.call(i,l)||(i.add(a),Zl(i,"add",a,a)),this},set(s,i){!t&&!tr(i)&&!ia(i)&&(i=Pn(i));const r=Pn(this),{has:l,get:a}=P0(r);let u=l.call(r,s);u||(s=Pn(s),u=l.call(r,s));const c=a.call(r,s);return r.set(s,i),u?Es(i,c)&&Zl(r,"set",s,i):Zl(r,"add",s,i),this},delete(s){const i=Pn(this),{has:r,get:l}=P0(i);let a=r.call(i,s);a||(s=Pn(s),a=r.call(i,s)),l&&l.call(i,s);const u=i.delete(s);return a&&Zl(i,"delete",s,void 0),u},clear(){const s=Pn(this),i=s.size!==0,r=s.clear();return i&&Zl(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=zR(s,e,t)}),n}function Yg(e,t){const n=WR(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(Kn(n,s)&&s in o?n:o,s,i)}const UR={get:Yg(!1,!1)},jR={get:Yg(!1,!0)},VR={get:Yg(!0,!1)},qR={get:Yg(!0,!0)},WS=new WeakMap,US=new WeakMap,jS=new WeakMap,VS=new WeakMap;function KR(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Go(e){return ia(e)?e:Xg(e,!1,PR,UR,WS)}function qS(e){return Xg(e,!1,BR,jR,US)}function E4(e){return Xg(e,!0,DR,VR,jS)}function Cje(e){return Xg(e,!0,HR,qR,VS)}function Xg(e,t,n,o,s){if(!Zn(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=KR(mR(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 ia(e)?Wa(e.__v_raw):!!(e&&e.__v_isReactive)}function ia(e){return!!(e&&e.__v_isReadonly)}function tr(e){return!!(e&&e.__v_isShallow)}function Jg(e){return e?!!e.__v_raw:!1}function Pn(e){const t=e&&e.__v_raw;return t?Pn(t):e}function kt(e){return!Kn(e,"__v_skip")&&Object.isExtensible(e)&&AS(e,"__v_skip",!0),e}const Kr=e=>Zn(e)?Go(e):e,Xd=e=>Zn(e)?E4(e):e;function Xo(e){return e?e.__v_isRef===!0:!1}function Z(e){return KS(e,!1)}function Xr(e){return KS(e,!0)}function KS(e,t){return Xo(e)?e:new ZR(e,t)}class ZR{constructor(t,n){this.dep=new Zg,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Pn(t),this._value=n?t:Kr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||tr(t)||ia(t);t=o?t:Pn(t),Es(t,n)&&(this._rawValue=t,this._value=o?t:Kr(t),this.dep.trigger())}}function GR(e){e.dep&&e.dep.trigger()}function p(e){return Xo(e)?e.value:e}function Rh(e){return un(e)?e():p(e)}const YR={get:(e,t,n)=>t==="__v_raw"?e:p(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return Xo(s)&&!Xo(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function ZS(e){return Wa(e)?e:new Proxy(e,YR)}class XR{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Zg,{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 JR(e){return new XR(e)}function wje(e){const t=jt(e)?new Array(e.length):{};for(const n in e)t[n]=GS(e,n);return t}class QR{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=lr(n)?n:String(n),this._raw=Pn(t);let s=!0,i=t;if(!jt(t)||lr(this._key)||!zg(this._key))do s=!Jg(i)||tr(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=p(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Xo(this._raw[this._key])){const n=this._object[this._key];if(Xo(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return $R(this._raw,this._key)}}class eO{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 _je(e,t,n){return Xo(e)?e:un(e)?new eO(e):Zn(e)&&arguments.length>1?GS(e,t,n):Z(e)}function GS(e,t,n){return new QR(e,t,n)}class tO{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Zg(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ip-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&ho!==this)return $S(this,!0),!0}get value(){const t=this.dep.track();return RS(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function nO(e,t,n=!1){let o,s;return un(e)?o=e:(o=e.get,s=e.set),new tO(o,s,n)}const xje={GET:"get",HAS:"has",ITERATE:"iterate"},Sje={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},B0={},pm=new WeakMap;let La;function Aje(){return La}function oO(e,t=!1,n=La){if(n){let o=pm.get(n);o||pm.set(n,o=[]),o.push(e)}}function sO(e,t,n=An){const{immediate:o,deep:s,once:i,scheduler:r,augmentJob:l,call:a}=n,u=g=>s?g:tr(g)||s===!1||s===0?Gl(g,1):Gl(g);let c,d,f,h,m=!1,v=!1;if(Xo(e)?(d=()=>e.value,m=tr(e)):Wa(e)?(d=()=>u(e),m=!0):jt(e)?(v=!0,m=e.some(g=>Wa(g)||tr(g)),d=()=>e.map(g=>{if(Xo(g))return g.value;if(Wa(g))return u(g);if(un(g))return a?a(g,2):g()})):un(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){wl();try{f()}finally{_l()}}const g=La;La=c;try{return a?a(e,3,[h]):e(h)}finally{La=g}}:d=wr,t&&s){const g=d,x=s===!0?1/0:s;d=()=>Gl(g(),x)}const k=Kg(),w=()=>{c.stop(),k&&k.active&&I8(k.effects,c)};if(i&&t){const g=t;t=(...x)=>{const S=g(...x);return w(),S}}let b=v?new Array(e.length).fill(B0):B0;const _=g=>{if(!(!(c.flags&1)||!c.dirty&&!g))if(t){const x=c.run();if(g||s||m||(v?x.some((S,T)=>Es(S,b[T])):Es(x,b))){f&&f();const S=La;La=c;try{const T=[x,b===B0?void 0:v&&b[0]===B0?[]:b,h];b=x,a?a(t,3,T):t(...T)}finally{La=S}}}else c.run()};return l&&l(_),c=new dm(d),c.scheduler=r?()=>r(_,!1):_,h=g=>oO(g,!1,c),f=c.onStop=()=>{const g=pm.get(c);if(g){if(a)a(g,4);else for(const x of g)x();pm.delete(c)}},t?o?_(!0):b=c.run():r?r(_.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function Gl(e,t=1/0,n){if(t<=0||!Zn(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Xo(e))Gl(e.value,t,n);else if(jt(e))for(let o=0;o{Gl(o,t,n)});else if(Hg(e)){for(const o in e)Gl(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Gl(e[o],t,n)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const YS=[];function iO(e){YS.push(e)}function rO(){YS.pop()}function Mje(e,t){}const Tje={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"},lO={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 Rp(e,t,n,o){try{return o?e(...o):e()}catch(s){f1(s,t,n)}}function xr(e,t,n,o){if(un(e)){const s=Rp(e,t,n,o);return s&&L8(s)&&s.catch(i=>{f1(i,t,n)}),s}if(jt(e)){const s=[];for(let i=0;i>>1,s=yi[o],i=lp(s);i=lp(n)?yi.push(e):yi.splice(uO(t),0,e),e.flags|=1,JS()}}function JS(){hm||(hm=XS.then(QS))}function mm(e){jt(e)?Nd.push(...e):$a&&e.id===-1?$a.splice(dd+1,0,e):e.flags&1||(Nd.push(e),e.flags|=1),JS()}function _7(e,t,n=fl+1){for(;nlp(n)-lp(o));if(Nd.length=0,$a){$a.push(...t);return}for($a=t,dd=0;dd<$a.length;dd++){const n=$a[dd];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}$a=null,dd=0}}const lp=e=>e.id==null?e.flags&2?-1:1/0:e.id;function QS(e){try{for(fl=0;flfd.emit(s,...i)),H0=[]):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=>{eA(i,t)}),setTimeout(()=>{fd||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,H0=[])},3e3)):H0=[]}let Ks=null,Qg=null;function ap(e){const t=Ks;return Ks=e,Qg=e&&e.type.__scopeId||null,t}function Eje(e){Qg=e}function Ije(){Qg=null}const Lje=e=>me;function me(e,t=Ks,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&wm(-1);const i=ap(t);let r;try{r=e(...s)}finally{ap(i),o._d&&wm(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function Bn(e,t){if(Ks===null)return e;const n=Bp(Ks),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&un(t)?t.call(o&&o.proxy):t}}function $je(){return!!(ds()||ic)}const cO=Symbol.for("v-scx"),dO=()=>nn(cO);function I4(e,t){return Op(e,null,t)}function Nje(e,t){return Op(e,null,{flush:"post"})}function fO(e,t){return Op(e,null,{flush:"sync"})}function Je(e,t,n){return Op(e,t,n)}function Op(e,t,n=An){const{immediate:o,deep:s,flush:i,once:r}=n,l=to({},n),a=t&&o||!t&&i!=="post";let u;if(fc){if(i==="sync"){const h=dO();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=wr,h.resume=wr,h.pause=wr,h}}const c=Vs;l.call=(h,m,v)=>xr(h,c,m,v);let d=!1;i==="post"?l.scheduler=h=>{os(h,c&&c.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(h,m)=>{m?h():R8(h)}),l.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=sO(e,t,l);return fc&&(u?u.push(f):a&&f()),f}function pO(e,t,n){const o=this.proxy,s=ro(e)?e.includes(".")?tA(o,e):()=>o[e]:e.bind(o,o);let i;un(t)?i=t:(i=t.handler,n=t);const r=h1(this),l=Op(s,i.bind(o),n);return r(),l}function tA(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,Vu=e=>e&&(e.disabled||e.disabled===""),hO=e=>e&&(e.defer||e.defer===""),x7=e=>typeof SVGElement<"u"&&e instanceof SVGElement,S7=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,L4=(e,t)=>{const n=e&&e.to;return ro(n)?t?t(n):null:n},mO={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,r,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:m,createText:v,createComment:k,parentNode:w}}=u,b=Vu(t.props);let{dynamicChildren:_}=t;const g=(T,A,E)=>{T.shapeFlag&16&&c(T.children,A,E,s,i,r,l,a)},x=(T=t)=>{const A=Vu(T.props),E=T.target=L4(T.props,m),P=$4(E,T,v,h);E&&(r!=="svg"&&x7(E)?r="svg":r!=="mathml"&&S7(E)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(E),A||(g(T,E,P),pf(T,!1)))},S=T=>{const A=()=>{if(Aa.get(T)===A){if(Aa.delete(T),Vu(T.props)){const E=w(T.el)||n;g(T,E,T.anchor),pf(T,!0)}x(T)}};Aa.set(T,A),os(A,i)};if(e==null){const T=t.el=v(""),A=t.anchor=v("");if(h(T,n,o),h(A,n,o),hO(t.props)||i&&i.pendingBranch){S(t);return}b&&(g(t,n,A),pf(t,!0)),x()}else{t.el=e.el;const T=t.anchor=e.anchor,A=Aa.get(e);if(A){A.flags|=8,Aa.delete(e),S(t);return}t.targetStart=e.targetStart;const E=t.target=e.target,P=t.targetAnchor=e.targetAnchor,D=Vu(e.props),I=D?n:E,$=D?T:P;if(r==="svg"||x7(E)?r="svg":(r==="mathml"||S7(E))&&(r="mathml"),_?(f(e.dynamicChildren,_,I,s,i,r,l),V8(e,t,!0)):a||d(e,t,I,$,s,i,r,l,!1),b)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):z0(t,n,T,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const B=L4(t.props,m);B&&(t.target=B,z0(t,B,null,u,0))}else D&&z0(t,E,P,u,1);pf(t,b)}},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,h=Vu(f),m=i||!h,v=Aa.get(e);if(v&&(v.flags|=8,Aa.delete(e)),d&&(s(u),s(c)),i&&s(a),!v&&(h||d)&&r&16)for(let k=0;k{e.isMounted=!0}),Vn(()=>{e.isUnmounting=!0}),e}const fr=[Function,Array],iA={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:fr,onEnter:fr,onAfterEnter:fr,onEnterCancelled:fr,onBeforeLeave:fr,onLeave:fr,onAfterLeave:fr,onLeaveCancelled:fr,onBeforeAppear:fr,onAppear:fr,onAfterAppear:fr,onAppearCancelled:fr},rA=e=>{const t=e.subTree;return t.component?rA(t.component):t},vO={name:"BaseTransition",props:iA,setup(e,{slots:t}){const n=ds(),o=sA();return()=>{const s=t.default&&O8(t.default(),!0),i=s&&s.length?lA(s):n.subTree?ee():void 0;if(!i)return;const r=Pn(e),{mode:l}=r;if(o.isLeaving)return Wv(i);const a=A7(i);if(!a)return Wv(i);let u=up(a,r,o,n,d=>u=d);a.type!==rs&&Za(a,u);let c=n.subTree&&A7(n.subTree);if(c&&c.type!==rs&&!Br(c,a)&&rA(n).type!==rs){let d=up(c,r,o,n);if(Za(c,d),l==="out-in"&&a.type!==rs)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Wv(i);l==="in-out"&&a.type!==rs?d.delayLeave=(f,h,m)=>{const v=aA(o,c);v[String(c.key)]=c,f[yr]=()=>{h(),f[yr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{m(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function lA(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==rs){t=n;break}}return t}const yO=vO;function aA(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 up(e,t,n,o,s){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:m,onLeaveCancelled:v,onBeforeAppear:k,onAppear:w,onAfterAppear:b,onAppearCancelled:_}=t,g=String(e.key),x=aA(n,e),S=(E,P)=>{E&&xr(E,o,9,P)},T=(E,P)=>{const D=P[1];S(E,P),jt(E)?E.every(I=>I.length<=1)&&D():E.length<=1&&D()},A={mode:r,persisted:l,beforeEnter(E){let P=a;if(!n.isMounted)if(i)P=k||a;else return;E[yr]&&E[yr](!0);const D=x[g];D&&Br(e,D)&&D.el[yr]&&D.el[yr](),S(P,[E])},enter(E){if(x[g]===e)return;let P=u,D=c,I=d;if(!n.isMounted)if(i)P=w||u,D=b||c,I=_||d;else return;let $=!1;E[Y1]=H=>{$||($=!0,H?S(I,[E]):S(D,[E]),A.delayedLeave&&A.delayedLeave(),E[Y1]=void 0)};const B=E[Y1].bind(null,!1);P?T(P,[E,B]):B()},leave(E,P){const D=String(e.key);if(E[Y1]&&E[Y1](!0),n.isUnmounting)return P();S(f,[E]);let I=!1;E[yr]=B=>{I||(I=!0,P(),B?S(v,[E]):S(m,[E]),E[yr]=void 0,x[D]===e&&delete x[D])};const $=E[yr].bind(null,!1);x[D]=e,h?T(h,[E,$]):$()},clone(E){const P=up(E,t,n,o,s);return s&&s(P),P}};return A}function Wv(e){if(Pp(e))return e=ra(e),e.children=null,e}function A7(e){if(!Pp(e))return oA(e.type)&&e.children?lA(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&&un(n.default))return n.default()}}function Za(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Za(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 O8(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 M7(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const vm=new WeakMap;function Fd(e,t,n,o,s=!1){if(jt(e)){e.forEach((v,k)=>Fd(v,t&&(jt(t)?t[k]:t),n,o,s));return}if(na(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Fd(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?Bp(o.component):o.el,r=s?null:i,{i:l,r:a}=e,u=t&&t.r,c=l.refs===An?l.refs={}:l.refs,d=l.setupState,f=Pn(d),h=d===An?xS:v=>M7(c,v)?!1:Kn(f,v),m=(v,k)=>!(k&&M7(c,k));if(u!=null&&u!==a){if(T7(t),ro(u))c[u]=null,h(u)&&(d[u]=null);else if(Xo(u)){const v=t;m(u,v.k)&&(u.value=null),v.k&&(c[v.k]=null)}}if(un(a)){wl();try{Rp(a,l,12,[r,c])}finally{_l()}}else{const v=ro(a),k=Xo(a);if(v||k){const w=()=>{if(e.f){const b=v?h(a)?d[a]:c[a]:m()||!e.k?a.value:c[e.k];if(s)jt(b)&&I8(b,i);else if(jt(b))b.includes(i)||b.push(i);else if(v)c[a]=[i],h(a)&&(d[a]=c[a]);else{const _=[i];m(a,e.k)&&(a.value=_),e.k&&(c[e.k]=_)}}else v?(c[a]=r,h(a)&&(d[a]=r)):k&&(m(a,e.k)&&(a.value=r),e.k&&(c[e.k]=r))};if(r){const b=()=>{w(),vm.delete(e)};b.id=-1,vm.set(e,b),os(b,n)}else T7(e),w()}}}function T7(e){const t=vm.get(e);t&&(t.flags|=8,vm.delete(e))}let E7=!1;const Qc=()=>{E7||(console.error("Hydration completed but contains mismatches."),E7=!0)},bO=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",CO=e=>e.namespaceURI.includes("MathML"),W0=e=>{if(e.nodeType===1){if(bO(e))return"svg";if(CO(e))return"mathml"}},kd=e=>e.nodeType===8;function wO(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:r,remove:l,insert:a,createComment:u}}=e,c=(_,g)=>{if(!g.hasChildNodes()){n(null,_,g),gm(),g._vnode=_;return}d(g.firstChild,_,null,null,null),gm(),g._vnode=_},d=(_,g,x,S,T,A=!1)=>{A=A||!!g.dynamicChildren;const E=kd(_)&&_.data==="[",P=()=>v(_,g,x,S,T,E),{type:D,ref:I,shapeFlag:$,patchFlag:B}=g;let H=_.nodeType;g.el=_,B===-2&&(A=!1,g.dynamicChildren=null);let O=null;switch(D){case Ua:H!==3?g.children===""?(a(g.el=s(""),r(_),_),O=_):O=P():(_.data!==g.children&&(Qc(),_.data=g.children),O=i(_));break;case rs:b(_)?(O=i(_),w(g.el=_.content.firstChild,_,x)):H!==8||E?O=P():O=i(_);break;case Od:if(E&&(_=i(_),H=_.nodeType),H===1||H===3){O=_;const F=!g.children.length;for(let U=0;U{A=A||!!g.dynamicChildren;const{type:E,dynamicProps:P,props:D,patchFlag:I,shapeFlag:$,dirs:B,transition:H}=g,O=E==="input"||E==="option",F=!!P;if(O||F||I!==-1){B&&hl(g,null,x,"created");let U=!1;if(b(_)){U=TA(null,H)&&x&&x.vnode.props&&x.vnode.props.appear;const W=_.content.firstChild;if(U){const K=W.getAttribute("class");K&&(W.$cls=K),H.beforeEnter(W)}w(W,_,x),g.el=_=W}if($&16&&!(D&&(D.innerHTML||D.textContent))){let W=h(_.firstChild,g,_,x,S,T,A);for(W&&!Oh(_,1)&&Qc();W;){const K=W;W=W.nextSibling,l(K)}}else if($&8){let W=g.children;W[0]===` +`&&(_.tagName==="PRE"||_.tagName==="TEXTAREA")&&(W=W.slice(1));const{textContent:K}=_;K!==W&&K!==W.replace(/\r\n|\r/g,` +`)&&(Oh(_,0)||Qc(),_.textContent=g.children)}if(D){if(O||F||!A||I&48){const W=_.tagName.includes("-");for(const K in D)(O&&(K.endsWith("value")||K==="indeterminate")||Fp(K)&&!oc(K)||K[0]==="."||W&&!oc(K)||P&&P.includes(K))&&o(_,K,null,D[K],void 0,x)}else if(D.onClick)o(_,"onClick",null,D.onClick,void 0,x);else if(I&4&&Wa(D.style))for(const W in D.style)D.style[W]}let z;(z=D&&D.onVnodeBeforeMount)&&Fi(z,x,g),B&&hl(g,null,x,"beforeMount"),((z=D&&D.onVnodeMounted)||B||U)&&$A(()=>{z&&Fi(z,x,g),U&&H.enter(_),B&&hl(g,null,x,"mounted")},S)}return _.nextSibling},h=(_,g,x,S,T,A,E)=>{E=E||!!g.dynamicChildren;const P=g.children,D=P.length;let I=!1;for(let $=0;${const{slotScopeIds:E}=g;E&&(T=T?T.concat(E):E);const P=r(_),D=h(i(_),g,P,x,S,T,A);return D&&kd(D)&&D.data==="]"?i(g.anchor=D):(Qc(),a(g.anchor=u("]"),P,D),D)},v=(_,g,x,S,T,A)=>{if(xO(_,g)||Qc(),g.el=null,A){const D=k(_);for(;;){const I=i(_);if(I&&I!==D)l(I);else break}}const E=i(_),P=r(_);return l(_),n(null,g,P,E,x,S,W0(P),T),x&&(x.vnode.el=g.el,n2(x,g.el)),E},k=(_,g="[",x="]")=>{let S=0;for(;_;)if(_=i(_),_&&kd(_)&&(_.data===g&&S++,_.data===x)){if(S===0)return i(_);S--}return _},w=(_,g,x)=>{const S=g.parentNode;S&&S.replaceChild(_,g);let T=x;for(;T;)T.vnode.el===g&&(T.vnode.el=T.subTree.el=_),T=T.parent},b=_=>_.nodeType===1&&_.tagName==="TEMPLATE";return[c,d]}const ym="data-allow-mismatch",_O={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Oh(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(ym);)e=e.parentElement;return D8(e&&e.getAttribute(ym),t)}function D8(e,t){if(e==null)return!1;if(e==="")return!0;{const n=e.split(",");return t===0&&n.includes("children")?!0:n.includes(_O[t])}}function xO(e,t){return Oh(e.parentElement,1)||SO(e)||AO(t)}function SO(e){return e.nodeType===1&&D8(e.getAttribute(ym),1)}function AO({props:e}){const t=e&&e[ym];return typeof t=="string"&&D8(t,1)}const MO=Vg().requestIdleCallback||(e=>setTimeout(e,1)),TO=Vg().cancelIdleCallback||(e=>clearTimeout(e)),Rje=(e=1e4)=>t=>{const n=MO(t,{timeout:e});return()=>TO(n)};function EO(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(EO(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},Pje=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},Dje=(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 IO(e,t){if(kd(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(kd(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const na=e=>!!e.type.__asyncLoader;function zr(e){un(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,h()),h=()=>{let m;return u||(m=u=t().catch(v=>{if(v=v instanceof Error?v:new Error(String(v)),a)return new Promise((k,w)=>{a(v,()=>k(f()),()=>w(v),d+1)});throw v}).then(v=>m!==u&&u?u:(v&&(v.__esModule||v[Symbol.toStringTag]==="Module")&&(v=v.default),c=v,v)))};return et({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,v,k){let w=!1;(v.bu||(v.bu=[])).push(()=>w=!0);const b=()=>{w||k()},_=i?()=>{const g=i(b,x=>IO(m,x));g&&(v.bum||(v.bum=[])).push(g)}:b;c?_():h().then(()=>!v.isUnmounted&&_())},get __asyncResolved(){return c},setup(){const m=Vs;if(P8(m),c)return()=>U0(c,m);const v=x=>{u=null,f1(x,m,13,!o)};if(l&&m.suspense||fc)return h().then(x=>()=>U0(x,m)).catch(x=>(v(x),()=>o?j(o,{error:x}):null));const k=Z(!1),w=Z(),b=Z(!!s);let _,g;return bn(()=>{_!=null&&clearTimeout(_),g!=null&&clearTimeout(g)}),s&&(g=setTimeout(()=>{m.isUnmounted||(b.value=!1)},s)),r!=null&&(_=setTimeout(()=>{if(!m.isUnmounted&&!k.value&&!w.value){const x=new Error(`Async component timed out after ${r}ms.`);v(x),w.value=x}},r)),h().then(()=>{m.isUnmounted||(k.value=!0,m.parent&&Pp(m.parent.vnode)&&m.parent.update())}).catch(x=>{if(m.isUnmounted){u=null;return}v(x),w.value=x}),()=>{if(k.value&&c)return U0(c,m);if(w.value&&o)return j(o,{error:w.value});if(n&&!b.value)return U0(n,m)}}})}function U0(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,r=j(e,o,s);return r.ref=n,r.ce=i,delete t.vnode.ce,r}const Pp=e=>e.type.__isKeepAlive,LO={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=ds(),o=n.ctx;if(!o.renderer)return()=>{const b=t.default&&t.default();return b&&b.length===1?b[0]:b};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=(b,_,g,x,S)=>{const T=b.component;u(b,_,g,0,l),a(T.vnode,b,_,g,T,l,x,b.slotScopeIds,S),os(()=>{T.isDeactivated=!1,T.a&&$d(T.a);const A=b.props&&b.props.onVnodeMounted;A&&Fi(A,T.parent,b)},l)},o.deactivate=b=>{const _=b.component;bm(_.m),bm(_.a),u(b,f,null,1,l),os(()=>{_.da&&$d(_.da);const g=b.props&&b.props.onVnodeUnmounted;g&&Fi(g,_.parent,b),_.isDeactivated=!0},l)};function h(b){Uv(b),c(b,n,l,!0)}function m(b){s.forEach((_,g)=>{const x=z4(na(_)?_.type.__asyncResolved||{}:_.type);x&&!b(x)&&v(g)})}function v(b){const _=s.get(b);_&&(!r||!Br(_,r))?h(_):r&&Uv(r),s.delete(b),i.delete(b)}Je(()=>[e.include,e.exclude],([b,_])=>{b&&m(g=>hf(b,g)),_&&m(g=>!hf(_,g))},{flush:"post",deep:!0});let k=null;const w=()=>{k!=null&&(Cm(n.subTree.type)?os(()=>{s.set(k,j0(n.subTree))},n.subTree.suspense):s.set(k,j0(n.subTree)))};return dn(w),Dp(w),Vn(()=>{s.forEach(b=>{const{subTree:_,suspense:g}=n,x=j0(_);if(b.type===x.type&&b.key===x.key){Uv(x);const S=x.component.da;S&&os(S,g);return}h(b)})}),()=>{if(k=null,!t.default)return r=null;const b=t.default(),_=b[0];if(b.length>1)return r=null,b;if(!Ga(_)||!(_.shapeFlag&4)&&!(_.shapeFlag&128))return r=null,_;let g=j0(_);if(g.type===rs)return r=null,g;const x=g.type,S=z4(na(g)?g.type.__asyncResolved||{}:x),{include:T,exclude:A,max:E}=e;if(T&&(!S||!hf(T,S))||A&&S&&hf(A,S))return g.shapeFlag&=-257,r=g,_;const P=g.key==null?x:g.key,D=s.get(P);return g.el&&(g=ra(g),_.shapeFlag&128&&(_.ssContent=g)),k=P,D?(g.el=D.el,g.component=D.component,g.transition&&Za(g,g.transition),g.shapeFlag|=512,i.delete(P),i.add(P)):(i.add(P),E&&i.size>parseInt(E,10)&&v(i.values().next().value)),g.shapeFlag|=256,r=g,Cm(_.type)?_:g}}},Bje=LO;function hf(e,t){return jt(e)?e.some(n=>hf(n,t)):ro(e)?e.split(",").includes(t):hR(e)?(e.lastIndex=0,e.test(t)):!1}function $O(e,t){uA(e,"a",t)}function NO(e,t){uA(e,"da",t)}function uA(e,t,n=Vs){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(e2(t,o,n),n){let s=n.parent;for(;s&&s.parent;)Pp(s.parent.vnode)&&FO(o,t,n,s),s=s.parent}}function FO(e,t,n,o){const s=e2(t,e,o,!0);bn(()=>{I8(o[t],s)},n)}function Uv(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function j0(e){return e.shapeFlag&128?e.ssContent:e}function e2(e,t,n=Vs,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{wl();const l=h1(n),a=xr(t,n,e,r);return l(),_l(),a});return o?s.unshift(i):s.push(i),i}}const aa=e=>(t,n=Vs)=>{(!fc||e==="sp")&&e2(e,(...o)=>t(...o),n)},RO=aa("bm"),dn=aa("m"),cA=aa("bu"),Dp=aa("u"),Vn=aa("bum"),bn=aa("um"),OO=aa("sp"),PO=aa("rtg"),DO=aa("rtc");function BO(e,t=Vs){e2("ec",e,t)}const B8="components",HO="directives";function zO(e,t){return H8(B8,e,!0,t)||e}const dA=Symbol.for("v-ndc");function bs(e){return ro(e)?H8(B8,e,!1)||e:e||dA}function Hje(e){return H8(HO,e)}function H8(e,t,n=!0,o=!1){const s=Ks||Vs;if(s){const i=s.type;if(e===B8){const l=z4(i,!1);if(l&&(l===t||l===_s(t)||l===Ug(_s(t))))return i}const r=I7(s[e]||i[e],t)||I7(s.appContext[e],t);return!r&&o?i:r}}function I7(e,t){return e&&(e[t]||e[_s(t)]||e[Ug(_s(t))])}function pt(e,t,n,o){let s;const i=n&&n[o],r=jt(e);if(r||ro(e)){const l=r&&Wa(e);let a=!1,u=!1;l&&(a=!tr(e),u=ia(e),e=Gg(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(Ks.ce||Ks.parent&&na(Ks.parent)&&Ks.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),y(),he(Pe,null,[j("slot",n,o&&o())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),y();const r=i&&z8(i(n)),l=n.key||r&&r.key,a=he(Pe,{key:(l&&!lr(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 z8(e){return e.some(t=>Ga(t)?!(t.type===rs||t.type===Pe&&!z8(t.children)):!0)?e:null}function zje(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:Fh(o)]=e[o];return n}const N4=e=>e?DA(e)?Bp(e):N4(e.parent):null,Ff=to(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=>N4(e.parent),$root:e=>N4(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>W8(e),$forceUpdate:e=>e.f||(e.f=()=>{R8(e.update)}),$nextTick:e=>e.n||(e.n=yt.bind(e.proxy)),$watch:e=>pO.bind(e)}),jv=(e,t)=>e!==An&&!e.__isScriptSetup&&Kn(e,t),F4={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(jv(o,t))return r[t]=1,o[t];if(s!==An&&Kn(s,t))return r[t]=2,s[t];if(Kn(i,t))return r[t]=3,i[t];if(n!==An&&Kn(n,t))return r[t]=4,n[t];R4&&(r[t]=0)}}const u=Ff[t];let c,d;if(u)return t==="$attrs"&&ii(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==An&&Kn(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,Kn(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return jv(s,t)?(s[t]=n,!0):o!==An&&Kn(o,t)?(o[t]=n,!0):Kn(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!==An&&l[0]!=="$"&&Kn(e,l)||jv(t,l)||Kn(i,l)||Kn(o,l)||Kn(Ff,l)||Kn(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Kn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},WO=to({},F4,{get(e,t){if(t!==Symbol.unscopables)return F4.get(e,t,e)},has(e,t){return t[0]!=="_"&&!kR(t)}});function Wje(){return null}function Uje(){return null}function jje(e){}function Vje(e){}function qje(){return null}function Kje(){}function Zje(e,t){return null}function Gje(){return pA().slots}function p1(){return pA().attrs}function pA(e){const t=ds();return t.setupContext||(t.setupContext=zA(t))}function cp(e){return jt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Yje(e,t){const n=cp(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?jt(s)||un(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 Xje(e,t){return!e||!t?e||t:jt(e)&&jt(t)?e.concat(t):to({},cp(e),cp(t))}function Jje(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Qje(e){const t=ds(),n=fc;let o=e();fp(),n&&Pd(!1);const s=()=>{h1(t),n&&Pd(!0)},i=()=>{ds()!==t&&t.scope.off(),fp(),n&&Pd(!1)};return L8(o)&&(o=o.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),r})),[o,()=>{s(),Promise.resolve().then(i)}]}let R4=!0;function UO(e){const t=W8(e),n=e.proxy,o=e.ctx;R4=!1,t.beforeCreate&&L7(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:m,activated:v,deactivated:k,beforeDestroy:w,beforeUnmount:b,destroyed:_,unmounted:g,render:x,renderTracked:S,renderTriggered:T,errorCaptured:A,serverPrefetch:E,expose:P,inheritAttrs:D,components:I,directives:$,filters:B}=t;if(u&&jO(u,o,null),r)for(const F in r){const U=r[F];un(U)&&(o[F]=U.bind(n))}if(s){const F=s.call(n,n);Zn(F)&&(e.data=Go(F))}if(R4=!0,i)for(const F in i){const U=i[F],z=un(U)?U.bind(n,n):un(U.get)?U.get.bind(n,n):wr,W=!un(U)&&un(U.set)?U.set.bind(n):wr,K=R({get:z,set:W});Object.defineProperty(o,F,{enumerable:!0,configurable:!0,get:()=>K.value,set:V=>K.value=V})}if(l)for(const F in l)hA(l[F],o,n,F);if(a){const F=un(a)?a.call(n):a;Reflect.ownKeys(F).forEach(U=>{Ln(U,F[U])})}c&&L7(c,e,"c");function O(F,U){jt(U)?U.forEach(z=>F(z.bind(n))):U&&F(U.bind(n))}if(O(RO,d),O(dn,f),O(cA,h),O(Dp,m),O($O,v),O(NO,k),O(BO,A),O(DO,S),O(PO,T),O(Vn,b),O(bn,g),O(OO,E),jt(P))if(P.length){const F=e.exposed||(e.exposed={});P.forEach(U=>{Object.defineProperty(F,U,{get:()=>n[U],set:z=>n[U]=z,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===wr&&(e.render=x),D!=null&&(e.inheritAttrs=D),I&&(e.components=I),$&&(e.directives=$),E&&P8(e)}function jO(e,t,n=wr){jt(e)&&(e=O4(e));for(const o in e){const s=e[o];let i;Zn(s)?"default"in s?i=nn(s.from||o,s.default,!0):i=nn(s.from||o):i=nn(s),Xo(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[o]=i}}function L7(e,t,n){xr(jt(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function hA(e,t,n,o){let s=o.includes(".")?tA(n,o):()=>n[o];if(ro(e)){const i=t[e];un(i)&&Je(s,i)}else if(un(e))Je(s,e.bind(n));else if(Zn(e))if(jt(e))e.forEach(i=>hA(i,t,n,o));else{const i=un(e.handler)?e.handler.bind(n):t[e.handler];un(i)&&Je(s,i,e)}}function W8(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=>km(a,u,r,!0)),km(a,t,r)),Zn(t)&&i.set(t,a),a}function km(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&km(e,i,n,!0),s&&s.forEach(r=>km(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=VO[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const VO={data:$7,props:N7,emits:N7,methods:mf,computed:mf,beforeCreate:mi,created:mi,beforeMount:mi,mounted:mi,beforeUpdate:mi,updated:mi,beforeDestroy:mi,beforeUnmount:mi,destroyed:mi,unmounted:mi,activated:mi,deactivated:mi,errorCaptured:mi,serverPrefetch:mi,components:mf,directives:mf,watch:KO,provide:$7,inject:qO};function $7(e,t){return t?e?function(){return to(un(e)?e.call(this,this):e,un(t)?t.call(this,this):t)}:t:e}function qO(e,t){return mf(O4(e),O4(t))}function O4(e){if(jt(e)){const t={};for(let n=0;n{let c,d=An,f;return fO(()=>{const h=e[s];Es(c,h)&&(c=h,u())}),{get(){return a(),n.get?n.get(c):c},set(h){const m=n.set?n.set(h):h;if(!Es(m,c)&&!(d!==An&&Es(h,d)))return;const v=o.vnode.props,k=!!(v&&(t in v||s in v||i in v)&&(`onUpdate:${t}`in v||`onUpdate:${s}`in v||`onUpdate:${i}`in v));k||(c=h,u()),o.emit(`update:${t}`,m),Es(h,d)&&(Es(h,m)&&!Es(m,f)||k&&d!==An&&!Es(m,c))&&u(),d=h,f=m}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||An:l,done:!1}:{done:!0}}}},l}const gA=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${_s(t)}Modifiers`]||e[`${Bi(t)}Modifiers`];function YO(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||An;let s=n;const i=t.startsWith("update:"),r=i&&gA(o,t.slice(7));r&&(r.trim&&(s=n.map(c=>ro(c)?c.trim():c)),r.number&&(s=n.map(jg)));let l,a=o[l=Fh(t)]||o[l=Fh(_s(t))];!a&&i&&(a=o[l=Fh(Bi(t))]),a&&xr(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,xr(u,e,6,s)}}const XO=new WeakMap;function vA(e,t,n=!1){const o=n?XO:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let r={},l=!1;if(!un(e)){const a=u=>{const c=vA(u,t,!0);c&&(l=!0,to(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(Zn(e)&&o.set(e,null),null):(jt(i)?i.forEach(a=>r[a]=null):to(r,i),Zn(e)&&o.set(e,r),r)}function t2(e,t){return!e||!Fp(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Kn(e,t[0].toLowerCase()+t.slice(1))||Kn(e,Bi(t))||Kn(e,t))}function Ph(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:h,ctx:m,inheritAttrs:v}=e,k=ap(e);let w,b;try{if(n.shapeFlag&4){const g=s||o,x=g;w=Di(u.call(x,g,c,d,h,f,m)),b=l}else{const g=t;w=Di(g.length>1?g(d,{attrs:l,slots:r,emit:a}):g(d,null)),b=t.props?l:QO(l)}}catch(g){Rf.length=0,f1(g,e,1),w=j(rs)}let _=w;if(b&&v!==!1){const g=Object.keys(b),{shapeFlag:x}=_;g.length&&x&7&&(i&&g.some(Bg)&&(b=eP(b,i)),_=ra(_,b,!1,!0))}return n.dirs&&(_=ra(_,null,!1,!0),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&Za(_,n.transition),w=_,ap(k),w}function JO(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||Fp(n))&&((t||(t={}))[n]=e[n]);return t},eP=(e,t)=>{const n={};for(const o in e)(!Bg(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function tP(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?F7(o,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;dObject.create(kA),CA=e=>Object.getPrototypeOf(e)===kA;function nP(e,t,n,o=!1){const s={},i=bA();e.propsDefaults=Object.create(null),wA(e,t,s,i);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=o?s:qS(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function oP(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:r}}=e,l=Pn(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,h]=_A(d,t,!0);to(r,f),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!a)return Zn(e)&&o.set(e,Id),Id;if(jt(i))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",j8=e=>jt(e)?e.map(Di):[Di(e)],iP=(e,t,n)=>{if(t._n)return t;const o=me((...s)=>j8(t(...s)),n);return o._c=!1,o},xA=(e,t,n)=>{const o=e._ctx;for(const s in e){if(U8(s))continue;const i=e[s];if(un(i))t[s]=iP(s,i,o);else if(i!=null){const r=j8(i);t[s]=()=>r}}},SA=(e,t)=>{const n=j8(t);e.slots.default=()=>n},AA=(e,t,n)=>{for(const o in t)(n||!U8(o))&&(e[o]=t[o])},rP=(e,t,n)=>{const o=e.slots=bA();if(e.vnode.shapeFlag&32){const s=t._;s?(AA(o,t,n),n&&AS(o,"_",s,!0)):xA(t,o)}else t&&SA(e,t)},lP=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,r=An;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:AA(s,t,n):(i=!t.$stable,xA(t,s)),r=t}else t&&(SA(e,t),r={default:1});if(i)for(const l in s)!U8(l)&&r[l]==null&&delete s[l]},os=$A;function aP(e){return MA(e)}function uP(e){return MA(e,wO)}function MA(e,t){const n=Vg();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:h=wr,insertStaticContent:m}=e,v=(G,Y,fe,we=null,ge=null,Q=null,te=void 0,ce=null,ue=!!Y.dynamicChildren)=>{if(G===Y)return;G&&!Br(G,Y)&&(we=Ie(G),V(G,ge,Q,!0),G=null),Y.patchFlag===-2&&(ue=!1,Y.dynamicChildren=null);const{type:Se,ref:ze,shapeFlag:_e}=Y;switch(Se){case Ua:k(G,Y,fe,we);break;case rs:w(G,Y,fe,we);break;case Od:G==null&&b(Y,fe,we,te);break;case Pe:I(G,Y,fe,we,ge,Q,te,ce,ue);break;default:_e&1?x(G,Y,fe,we,ge,Q,te,ce,ue):_e&6?$(G,Y,fe,we,ge,Q,te,ce,ue):(_e&64||_e&128)&&Se.process(G,Y,fe,we,ge,Q,te,ce,ue,ve)}ze!=null&&ge?Fd(ze,G&&G.ref,Q,Y||G,!Y):ze==null&&G&&G.ref!=null&&Fd(G.ref,null,Q,G,!0)},k=(G,Y,fe,we)=>{if(G==null)o(Y.el=l(Y.children),fe,we);else{const ge=Y.el=G.el;Y.children!==G.children&&u(ge,Y.children)}},w=(G,Y,fe,we)=>{G==null?o(Y.el=a(Y.children||""),fe,we):Y.el=G.el},b=(G,Y,fe,we)=>{[G.el,G.anchor]=m(G.children,Y,fe,we,G.el,G.anchor)},_=({el:G,anchor:Y},fe,we)=>{let ge;for(;G&&G!==Y;)ge=f(G),o(G,fe,we),G=ge;o(Y,fe,we)},g=({el:G,anchor:Y})=>{let fe;for(;G&&G!==Y;)fe=f(G),s(G),G=fe;s(Y)},x=(G,Y,fe,we,ge,Q,te,ce,ue)=>{if(Y.type==="svg"?te="svg":Y.type==="math"&&(te="mathml"),G==null)S(Y,fe,we,ge,Q,te,ce,ue);else{const Se=G.el&&G.el._isVueCE?G.el:null;try{Se&&Se._beginPatch(),E(G,Y,ge,Q,te,ce,ue)}finally{Se&&Se._endPatch()}}},S=(G,Y,fe,we,ge,Q,te,ce)=>{let ue,Se;const{props:ze,shapeFlag:_e,transition:Ee,dirs:it}=G;if(ue=G.el=r(G.type,Q,ze&&ze.is,ze),_e&8?c(ue,G.children):_e&16&&A(G.children,ue,null,we,ge,Vv(G,Q),te,ce),it&&hl(G,null,we,"created"),T(ue,G,G.scopeId,te,we),ze){for(const Oe in ze)Oe!=="value"&&!oc(Oe)&&i(ue,Oe,null,ze[Oe],Q,we);"value"in ze&&i(ue,"value",null,ze.value,Q),(Se=ze.onVnodeBeforeMount)&&Fi(Se,we,G)}it&&hl(G,null,we,"beforeMount");const Fe=TA(ge,Ee);Fe&&Ee.beforeEnter(ue),o(ue,Y,fe),((Se=ze&&ze.onVnodeMounted)||Fe||it)&&os(()=>{try{Se&&Fi(Se,we,G),Fe&&Ee.enter(ue),it&&hl(G,null,we,"mounted")}finally{}},ge)},T=(G,Y,fe,we,ge)=>{if(fe&&h(G,fe),we)for(let Q=0;Q{for(let Se=ue;Se{const ce=Y.el=G.el;let{patchFlag:ue,dynamicChildren:Se,dirs:ze}=Y;ue|=G.patchFlag&16;const _e=G.props||An,Ee=Y.props||An;let it;if(fe&&Iu(fe,!1),(it=Ee.onVnodeBeforeUpdate)&&Fi(it,fe,Y,G),ze&&hl(Y,G,fe,"beforeUpdate"),fe&&Iu(fe,!0),Se&&(!G.dynamicChildren||G.dynamicChildren.length!==Se.length)&&(ue=0,te=!1,Se=null),(_e.innerHTML&&Ee.innerHTML==null||_e.textContent&&Ee.textContent==null)&&c(ce,""),Se?P(G.dynamicChildren,Se,ce,fe,we,Vv(Y,ge),Q):te||U(G,Y,ce,null,fe,we,Vv(Y,ge),Q,!1),ue>0){if(ue&16)D(ce,_e,Ee,fe,ge);else if(ue&2&&_e.class!==Ee.class&&i(ce,"class",null,Ee.class,ge),ue&4&&i(ce,"style",_e.style,Ee.style,ge),ue&8){const Fe=Y.dynamicProps;for(let Oe=0;Oe{it&&Fi(it,fe,Y,G),ze&&hl(Y,G,fe,"updated")},we)},P=(G,Y,fe,we,ge,Q,te)=>{for(let ce=0;ce{if(Y!==fe){if(Y!==An)for(const Q in Y)!oc(Q)&&!(Q in fe)&&i(G,Q,Y[Q],null,ge,we);for(const Q in fe){if(oc(Q))continue;const te=fe[Q],ce=Y[Q];te!==ce&&Q!=="value"&&i(G,Q,ce,te,ge,we)}"value"in fe&&i(G,"value",Y.value,fe.value,ge)}},I=(G,Y,fe,we,ge,Q,te,ce,ue)=>{const Se=Y.el=G?G.el:l(""),ze=Y.anchor=G?G.anchor:l("");let{patchFlag:_e,dynamicChildren:Ee,slotScopeIds:it}=Y;it&&(ce=ce?ce.concat(it):it),G==null?(o(Se,fe,we),o(ze,fe,we),A(Y.children||[],fe,ze,ge,Q,te,ce,ue)):_e>0&&_e&64&&Ee&&G.dynamicChildren&&G.dynamicChildren.length===Ee.length?(P(G.dynamicChildren,Ee,fe,ge,Q,te,ce),(Y.key!=null||ge&&Y===ge.subTree)&&V8(G,Y,!0)):U(G,Y,fe,ze,ge,Q,te,ce,ue)},$=(G,Y,fe,we,ge,Q,te,ce,ue)=>{Y.slotScopeIds=ce,G==null?Y.shapeFlag&512?ge.ctx.activate(Y,fe,we,te,ue):B(Y,fe,we,ge,Q,te,ue):H(G,Y,ue)},B=(G,Y,fe,we,ge,Q,te)=>{const ce=G.component=PA(G,we,ge);if(Pp(G)&&(ce.ctx.renderer=ve),BA(ce,!1,te),ce.asyncDep){if(ge&&ge.registerDep(ce,O,te),!G.el){const ue=ce.subTree=j(rs);w(null,ue,Y,fe),G.placeholder=ue.el}}else O(ce,G,Y,fe,ge,Q,te)},H=(G,Y,fe)=>{const we=Y.component=G.component;if(tP(G,Y,fe))if(we.asyncDep&&!we.asyncResolved){F(we,Y,fe);return}else we.next=Y,we.update();else Y.el=G.el,we.vnode=Y},O=(G,Y,fe,we,ge,Q,te)=>{const ce=()=>{if(G.isMounted){let{next:_e,bu:Ee,u:it,parent:Fe,vnode:Oe}=G;{const Yt=EA(G);if(Yt){_e&&(_e.el=Oe.el,F(G,_e,te)),Yt.asyncDep.then(()=>{os(()=>{G.isUnmounted||Se()},ge)});return}}let Ge=_e,at;Iu(G,!1),_e?(_e.el=Oe.el,F(G,_e,te)):_e=Oe,Ee&&$d(Ee),(at=_e.props&&_e.props.onVnodeBeforeUpdate)&&Fi(at,Fe,_e,Oe),Iu(G,!0);const Tt=Ph(G),Bt=G.subTree;G.subTree=Tt,v(Bt,Tt,d(Bt.el),Ie(Bt),G,ge,Q),_e.el=Tt.el,Ge===null&&n2(G,Tt.el),it&&os(it,ge),(at=_e.props&&_e.props.onVnodeUpdated)&&os(()=>Fi(at,Fe,_e,Oe),ge)}else{let _e;const{el:Ee,props:it}=Y,{bm:Fe,m:Oe,parent:Ge,root:at,type:Tt}=G,Bt=na(Y);if(Iu(G,!1),Fe&&$d(Fe),!Bt&&(_e=it&&it.onVnodeBeforeMount)&&Fi(_e,Ge,Y),Iu(G,!0),Ee&&ye){const Yt=()=>{G.subTree=Ph(G),ye(Ee,G.subTree,G,ge,null)};Bt&&Tt.__asyncHydrate?Tt.__asyncHydrate(Ee,G,Yt):Yt()}else{at.ce&&at.ce._hasShadowRoot()&&at.ce._injectChildStyle(Tt,G.parent?G.parent.type:void 0);const Yt=G.subTree=Ph(G);v(null,Yt,fe,we,G,ge,Q),Y.el=Yt.el}if(Oe&&os(Oe,ge),!Bt&&(_e=it&&it.onVnodeMounted)){const Yt=Y;os(()=>Fi(_e,Ge,Yt),ge)}(Y.shapeFlag&256||Ge&&na(Ge.vnode)&&Ge.vnode.shapeFlag&256)&&G.a&&os(G.a,ge),G.isMounted=!0,Y=fe=we=null}};G.scope.on();const ue=G.effect=new dm(ce);G.scope.off();const Se=G.update=ue.run.bind(ue),ze=G.job=ue.runIfDirty.bind(ue);ze.i=G,ze.id=G.uid,ue.scheduler=()=>R8(ze),Iu(G,!0),Se()},F=(G,Y,fe)=>{Y.component=G;const we=G.vnode.props;G.vnode=Y,G.next=null,oP(G,Y.props,we,fe),lP(G,Y.children,fe),wl(),_7(G),_l()},U=(G,Y,fe,we,ge,Q,te,ce,ue=!1)=>{const Se=G&&G.children,ze=G?G.shapeFlag:0,_e=Y.children,{patchFlag:Ee,shapeFlag:it}=Y;if(Ee>0){if(Ee&128){W(Se,_e,fe,we,ge,Q,te,ce,ue);return}else if(Ee&256){z(Se,_e,fe,we,ge,Q,te,ce,ue);return}}it&8?(ze&16&&le(Se,ge,Q),_e!==Se&&c(fe,_e)):ze&16?it&16?W(Se,_e,fe,we,ge,Q,te,ce,ue):le(Se,ge,Q,!0):(ze&8&&c(fe,""),it&16&&A(_e,fe,we,ge,Q,te,ce,ue))},z=(G,Y,fe,we,ge,Q,te,ce,ue)=>{G=G||Id,Y=Y||Id;const Se=G.length,ze=Y.length,_e=Math.min(Se,ze);let Ee;for(Ee=0;Ee<_e;Ee++){const it=Y[Ee]=ue?Kl(Y[Ee]):Di(Y[Ee]);v(G[Ee],it,fe,null,ge,Q,te,ce,ue)}Se>ze?le(G,ge,Q,!0,!1,_e):A(Y,fe,we,ge,Q,te,ce,ue,_e)},W=(G,Y,fe,we,ge,Q,te,ce,ue)=>{let Se=0;const ze=Y.length;let _e=G.length-1,Ee=ze-1;for(;Se<=_e&&Se<=Ee;){const it=G[Se],Fe=Y[Se]=ue?Kl(Y[Se]):Di(Y[Se]);if(Br(it,Fe))v(it,Fe,fe,null,ge,Q,te,ce,ue);else break;Se++}for(;Se<=_e&&Se<=Ee;){const it=G[_e],Fe=Y[Ee]=ue?Kl(Y[Ee]):Di(Y[Ee]);if(Br(it,Fe))v(it,Fe,fe,null,ge,Q,te,ce,ue);else break;_e--,Ee--}if(Se>_e){if(Se<=Ee){const it=Ee+1,Fe=itEe)for(;Se<=_e;)V(G[Se],ge,Q,!0),Se++;else{const it=Se,Fe=Se,Oe=new Map;for(Se=Fe;Se<=Ee;Se++){const en=Y[Se]=ue?Kl(Y[Se]):Di(Y[Se]);en.key!=null&&Oe.set(en.key,Se)}let Ge,at=0;const Tt=Ee-Fe+1;let Bt=!1,Yt=0;const Sn=new Array(Tt);for(Se=0;Se=Tt){V(en,ge,Q,!0);continue}let Cn;if(en.key!=null)Cn=Oe.get(en.key);else for(Ge=Fe;Ge<=Ee;Ge++)if(Sn[Ge-Fe]===0&&Br(en,Y[Ge])){Cn=Ge;break}Cn===void 0?V(en,ge,Q,!0):(Sn[Cn-Fe]=Se+1,Cn>=Yt?Yt=Cn:Bt=!0,v(en,Y[Cn],fe,null,ge,Q,te,ce,ue),at++)}const on=Bt?cP(Sn):Id;for(Ge=on.length-1,Se=Tt-1;Se>=0;Se--){const en=Fe+Se,Cn=Y[en],Mn=Y[en+1],We=en+1{const{el:Q,type:te,transition:ce,children:ue,shapeFlag:Se}=G;if(Se&6){K(G.component.subTree,Y,fe,we);return}if(Se&128){G.suspense.move(Y,fe,we);return}if(Se&64){te.move(G,Y,fe,ve);return}if(te===Pe){o(Q,Y,fe);for(let _e=0;_ece.enter(Q),ge));else{const{leave:_e,delayLeave:Ee,afterLeave:it}=ce,Fe=()=>{G.ctx.isUnmounted?s(Q):o(Q,Y,fe)},Oe=()=>{const Ge=Q._isLeaving||!!Q[yr];Q._isLeaving&&Q[yr](!0),ce.persisted&&!Ge?Fe():_e(Q,()=>{Fe(),it&&it()})};Ee?Ee(Q,Fe,Oe):Oe()}else o(Q,Y,fe)},V=(G,Y,fe,we=!1,ge=!1)=>{const{type:Q,props:te,ref:ce,children:ue,dynamicChildren:Se,shapeFlag:ze,patchFlag:_e,dirs:Ee,cacheIndex:it,memo:Fe}=G;if(_e===-2&&(ge=!1),ce!=null&&(wl(),Fd(ce,null,fe,G,!0),_l()),it!=null&&(Y.renderCache[it]=void 0),ze&256){Y.ctx.deactivate(G);return}const Oe=ze&1&&Ee,Ge=!na(G);let at;if(Ge&&(at=te&&te.onVnodeBeforeUnmount)&&Fi(at,Y,G),ze&6)X(G.component,fe,we);else{if(ze&128){G.suspense.unmount(fe,we);return}Oe&&hl(G,null,Y,"beforeUnmount"),ze&64?G.type.remove(G,Y,fe,ve,we):Se&&!Se.hasOnce&&(Q!==Pe||_e>0&&_e&64)?le(Se,Y,fe,!1,!0):(Q===Pe&&_e&384||!ge&&ze&16)&&le(ue,Y,fe),we&&ie(G)}const Tt=Fe!=null&&it==null;(Ge&&(at=te&&te.onVnodeUnmounted)||Oe||Tt)&&os(()=>{at&&Fi(at,Y,G),Oe&&hl(G,null,Y,"unmounted"),Tt&&(G.el=null)},fe)},ie=G=>{const{type:Y,el:fe,anchor:we,transition:ge}=G;if(Y===Pe){ne(fe,we);return}if(Y===Od){g(G);return}const Q=()=>{s(fe),ge&&!ge.persisted&&ge.afterLeave&&ge.afterLeave()};if(G.shapeFlag&1&&ge&&!ge.persisted){const{leave:te,delayLeave:ce}=ge,ue=()=>te(fe,Q);ce?ce(G.el,Q,ue):ue()}else Q()},ne=(G,Y)=>{let fe;for(;G!==Y;)fe=f(G),s(G),G=fe;s(Y)},X=(G,Y,fe)=>{const{bum:we,scope:ge,job:Q,subTree:te,um:ce,m:ue,a:Se}=G;bm(ue),bm(Se),we&&$d(we),ge.stop(),Q&&(Q.flags|=8,V(te,G,Y,fe)),ce&&os(ce,Y),os(()=>{G.isUnmounted=!0},Y)},le=(G,Y,fe,we=!1,ge=!1,Q=0)=>{for(let te=Q;te{if(G.shapeFlag&6)return Ie(G.component.subTree);if(G.shapeFlag&128)return G.suspense.next();const Y=f(G.anchor||G.el),fe=Y&&Y[nA];return fe?f(fe):Y};let de=!1;const pe=(G,Y,fe)=>{let we;G==null?Y._vnode&&(V(Y._vnode,null,null,!0),we=Y._vnode.component):v(Y._vnode||null,G,Y,null,null,null,fe),Y._vnode=G,de||(de=!0,_7(we),gm(),de=!1)},ve={p:v,um:V,m:K,r:ie,mt:B,mc:A,pc:U,pbc:P,n:Ie,o:e};let oe,ye;return t&&([oe,ye]=t(ve)),{render:pe,hydrate:oe,createApp:GO(pe,oe)}}function Vv({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 TA(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function V8(e,t,n=!1){const o=e.children,s=t.children;if(jt(o)&&jt(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 EA(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:EA(t)}function bm(e){if(e)for(let t=0;te.__isSuspense;let D4=0;const dP={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,r,l,a,u){if(e==null)fP(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}pP(e,t,n,o,s,r,l,a,u)}},hydrate:hP,normalize:mP},tVe=dP;function dp(e,t){const n=e.props&&e.props[t];un(n)&&n()}function fP(e,t,n,o,s,i,r,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=LA(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?(dp(e,"onPending"),dp(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,i,r),Rd(f,e.ssFallback)):f.resolve(!1,!0)}function pP(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,h=t.ssFallback,{activeBranch:m,pendingBranch:v,isInFallback:k,isHydrating:w}=d;if(v)d.pendingBranch=f,Br(v,f)?(a(v,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():k&&(w||(a(m,h,n,o,s,null,i,r,l),Rd(d,h)))):(d.pendingId=D4++,w?(d.isHydrating=!1,d.activeBranch=v):u(v,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(m,h,n,o,s,null,i,r,l),Rd(d,h))):m&&Br(m,f)?(a(m,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(m&&Br(m,f))a(m,f,n,o,s,d,i,r,l),Rd(d,f);else if(dp(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=D4++,a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0)d.resolve();else{const{timeout:b,pendingId:_}=d;b>0?setTimeout(()=>{d.pendingId===_&&d.fallback(h)},b):b===0&&d.fallback(h)}}function LA(e,t,n,o,s,i,r,l,a,u,c=!1){const{p:d,m:f,um:h,n:m,o:{parentNode:v,remove:k}}=u;let w;const b=gP(e);b&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const _=e.props?cm(e.props.timeout):void 0,g=i,x={vnode:e,parent:t,parentComponent:n,namespace:r,container:o,hiddenContainer:s,deps:0,pendingId:D4++,timeout:typeof _=="number"?_:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(S=!1,T=!1){const{vnode:A,activeBranch:E,pendingBranch:P,pendingId:D,effects:I,parentComponent:$,container:B,isInFallback:H}=x;let O=!1;if(x.isHydrating)x.isHydrating=!1;else if(!S){O=E&&P.transition&&P.transition.mode==="out-in";let z=!1;O&&(E.transition.afterLeave=()=>{D===x.pendingId&&(f(P,B,i===g&&!z?m(E):i,0),mm(I),H&&A.ssFallback&&(A.ssFallback.el=null))}),E&&!x.isFallbackMountPending&&(v(E.el)===B&&(i=m(E),z=!0),h(E,$,x,!0),!O&&H&&A.ssFallback&&os(()=>A.ssFallback.el=null,x)),O||f(P,B,i,0)}x.isFallbackMountPending=!1,Rd(x,P),x.pendingBranch=null,x.isInFallback=!1;let F=x.parent,U=!1;for(;F;){if(F.pendingBranch){F.effects.push(...I),U=!0;break}F=F.parent}!U&&!O&&mm(I),x.effects=[],b&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!T&&t.resolve()),dp(A,"onResolve")},fallback(S){if(!x.pendingBranch)return;const{vnode:T,activeBranch:A,parentComponent:E,container:P,namespace:D}=x;dp(T,"onFallback");const I=m(A),$=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,S,P,I,E,null,D,l,a),Rd(x,S))},B=S.transition&&S.transition.mode==="out-in";B&&(x.isFallbackMountPending=!0,A.transition.afterLeave=$),x.isInFallback=!0,h(A,E,null,!0),B||$()},move(S,T,A){x.activeBranch&&f(x.activeBranch,S,T,A),x.container=S},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(S,T,A){const E=!!x.pendingBranch;E&&x.deps++;const P=S.vnode.el;S.asyncDep.catch(D=>{f1(D,S,0)}).then(D=>{if(S.isUnmounted||x.isUnmounted||x.pendingId!==S.suspenseId)return;fp(),S.asyncResolved=!0;const{vnode:I}=S;B4(S,D,!1),P&&(I.el=P);const $=!P&&S.subTree.el;T(S,I,v(P||S.subTree.el),P?null:m(S.subTree),x,r,A),$&&(I.placeholder=null,k($)),n2(S,I.el),E&&--x.deps===0&&x.resolve()})},unmount(S,T){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,S,T),x.pendingBranch&&h(x.pendingBranch,n,S,T)}};return x}function hP(e,t,n,o,s,i,r,l,a){const u=t.suspense=LA(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 mP(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=O7(o?n.default:n),e.ssFallback=o?O7(n.fallback):j(rs)}function O7(e){let t;if(un(e)){const n=dc&&e._c;n&&(e._d=!1,y()),e=e(),n&&(e._d=!0,t=ri,NA())}return jt(e)&&(e=JO(e)),e=Di(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function $A(e,t){t&&t.pendingBranch?jt(e)?t.effects.push(...e):t.effects.push(e):mm(e)}function Rd(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,n2(o,s))}function gP(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Pe=Symbol.for("v-fgt"),Ua=Symbol.for("v-txt"),rs=Symbol.for("v-cmt"),Od=Symbol.for("v-stc"),Rf=[];let ri=null;function y(e=!1){Rf.push(ri=e?null:[])}function NA(){Rf.pop(),ri=Rf[Rf.length-1]||null}let dc=1;function wm(e,t=!1){dc+=e,e<0&&ri&&t&&(ri.hasOnce=!0)}function FA(e){return e.dynamicChildren=dc>0?ri||Id:null,NA(),dc>0&&ri&&ri.push(e),e}function M(e,t,n,o,s,i){return FA(C(e,t,n,o,s,i,!0))}function he(e,t,n,o,s){return FA(j(e,t,n,o,s,!0))}function Ga(e){return e?e.__v_isVNode===!0:!1}function Br(e,t){return e.type===t.type&&e.key===t.key}function nVe(e){}const RA=({key:e})=>e??null,Dh=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ro(e)||Xo(e)||un(e)?{i:Ks,r:e,k:t,f:!!n}:e:null);function C(e,t=null,n=null,o=0,s=null,i=e===Pe?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&RA(t),ref:t&&Dh(t),scopeId:Qg,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:Ks};return l?(_m(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=ro(n)?8:16),dc>0&&!r&&ri&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&ri.push(a),a}const j=vP;function vP(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===dA)&&(e=rs),Ga(e)){const l=ra(e,t,!0);return n&&_m(l,n),dc>0&&!i&&ri&&(l.shapeFlag&6?ri[ri.indexOf(e)]=l:ri.push(l)),l.patchFlag=-2,l}if(wP(e)&&(e=e.__vccOpts),t){t=OA(t);let{class:l,style:a}=t;l&&!ro(l)&&(t.class=Re(l)),Zn(a)&&(Jg(a)&&!jt(a)&&(a=to({},a)),t.style=Zt(a))}const r=ro(e)?1:Cm(e)?128:oA(e)?64:Zn(e)?4:un(e)?2:0;return C(e,t,n,o,s,r,i,!0)}function OA(e){return e?Jg(e)||CA(e)?to({},e):e:null}function ra(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:r,children:l,transition:a}=e,u=t?zn(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&RA(u),ref:t&&t.ref?n&&i?jt(i)?i.concat(Dh(t)):[i,Dh(t)]:Dh(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!==Pe?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&&ra(e.ssContent),ssFallback:e.ssFallback&&ra(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Za(c,a.clone(c)),c}function qe(e=" ",t=0){return j(Ua,null,e,t)}function iu(e,t){const n=j(Od,null,e);return n.staticCount=t,n}function ee(e="",t=!1){return t?(y(),he(rs,null,e)):j(rs,null,e)}function Di(e){return e==null||typeof e=="boolean"?j(rs):jt(e)?j(Pe,null,e.slice()):Ga(e)?Kl(e):j(Ua,null,String(e))}function Kl(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ra(e)}function _m(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(jt(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),_m(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!CA(t)?t._ctx=Ks:s===3&&Ks&&(Ks.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(un(t)){if(o&65){_m(e,{default:t});return}t={default:t,_ctx:Ks},n=32}else t=String(t),o&64?(n=16,t=[qe(t)]):n=8;e.children=t,e.shapeFlag|=n}function zn(...e){const t={};for(let n=0;nVs||Ks;let xm,Pd;{const e=Vg(),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)}};xm=t("__VUE_INSTANCE_SETTERS__",n=>Vs=n),Pd=t("__VUE_SSR_SETTERS__",n=>fc=n)}const h1=e=>{const t=Vs;return xm(e),e.scope.on(),()=>{e.scope.off(),xm(t)}},fp=()=>{Vs&&Vs.scope.off(),xm(null)};function DA(e){return e.vnode.shapeFlag&4}let fc=!1;function BA(e,t=!1,n=!1){t&&Pd(t);const{props:o,children:s}=e.vnode,i=DA(e);nP(e,o,i,t),rP(e,s,n||t);const r=i?bP(e,t):void 0;return t&&Pd(!1),r}function bP(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,F4);const{setup:o}=n;if(o){wl();const s=e.setupContext=o.length>1?zA(e):null,i=h1(e),r=Rp(o,e,0,[e.props,s]),l=L8(r);if(_l(),i(),(l||e.sp)&&!na(e)&&P8(e),l){if(r.then(fp,fp),t)return r.then(a=>{B4(e,a,t)}).catch(a=>{f1(a,e,0)});e.asyncDep=r}else B4(e,r,t)}else HA(e,t)}function B4(e,t,n){un(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Zn(t)&&(e.setupState=ZS(t)),HA(e,n)}let Sm,H4;function oVe(e){Sm=e,H4=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,WO))}}const sVe=()=>!Sm;function HA(e,t,n){const o=e.type;if(!e.render){if(!t&&Sm&&!o.render){const s=o.template||W8(e).template;if(s){const{isCustomElement:i,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,u=to(to({isCustomElement:i,delimiters:l},r),a);o.render=Sm(s,u)}}e.render=o.render||wr,H4&&H4(e)}{const s=h1(e);wl();try{UO(e)}finally{_l(),s()}}}const CP={get(e,t){return ii(e,"get",""),e[t]}};function zA(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,CP),slots:e.slots,emit:e.emit,expose:t}}function Bp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ZS(kt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ff)return Ff[n](e)},has(t,n){return n in t||n in Ff}})):e.proxy}function z4(e,t=!0){return un(e)?e.displayName||e.name:e.name||t&&e.__name}function wP(e){return un(e)&&"__vccOpts"in e}const R=(e,t)=>nO(e,t,fc);function tn(e,t,n){try{wm(-1);const o=arguments.length;return o===2?Zn(t)&&!jt(t)?Ga(t)?j(e,null,[t]):j(e,t):j(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Ga(n)&&(n=[n]),j(e,t,n))}finally{wm(1)}}function iVe(){}function rVe(e,t,n,o){const s=n[o];if(s&&_P(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function _P(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&ri&&ri.push(e),!0}const xP="3.5.39",lVe=wr,aVe=lO,uVe=fd,cVe=eA,SP={createComponentInstance:PA,setupComponent:BA,renderComponentRoot:Ph,setCurrentRenderingInstance:ap,isVNode:Ga,normalizeVNode:Di,getComponentPublicInstance:Bp,ensureValidVNode:z8,pushWarningContext:iO,popWarningContext:rO},dVe=SP,fVe=null,pVe=null,hVe=null;/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let W4;const P7=typeof window<"u"&&window.trustedTypes;if(P7)try{W4=P7.createPolicy("vue",{createHTML:e=>e})}catch{}const WA=W4?e=>W4.createHTML(e):e=>e,AP="http://www.w3.org/2000/svg",MP="http://www.w3.org/1998/Math/MathML",jl=typeof document<"u"?document:null,D7=jl&&jl.createElement("template"),TP={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"?jl.createElementNS(AP,e):t==="mathml"?jl.createElementNS(MP,e):n?jl.createElement(e,{is:n}):jl.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>jl.createTextNode(e),createComment:e=>jl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>jl.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{D7.innerHTML=WA(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=D7.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]}},va="transition",X1="animation",Jd=Symbol("_vtc"),UA={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},jA=to({},iA,UA),EP=e=>(e.displayName="Transition",e.props=jA,e),as=EP((e,{slots:t})=>tn(yO,VA(e),t)),Lu=(e,t=[])=>{jt(e)?e.forEach(n=>n(...t)):e&&e(...t)},B7=e=>e?jt(e)?e.some(t=>t.length>1):e.length>1:!1;function VA(e){const t={};for(const I in e)I in UA||(t[I]=e[I]);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:h=`${n}-leave-to`}=e,m=IP(s),v=m&&m[0],k=m&&m[1],{onBeforeEnter:w,onEnter:b,onEnterCancelled:_,onLeave:g,onLeaveCancelled:x,onBeforeAppear:S=w,onAppear:T=b,onAppearCancelled:A=_}=t,E=(I,$,B,H)=>{I._enterCancelled=H,Ma(I,$?c:l),Ma(I,$?u:r),B&&B()},P=(I,$)=>{I._isLeaving=!1,Ma(I,d),Ma(I,h),Ma(I,f),$&&$()},D=I=>($,B)=>{const H=I?T:b,O=()=>E($,I,B);Lu(H,[$,O]),H7(()=>{Ma($,I?a:i),dl($,I?c:l),B7(H)||z7($,o,v,O)})};return to(t,{onBeforeEnter(I){Lu(w,[I]),dl(I,i),dl(I,r)},onBeforeAppear(I){Lu(S,[I]),dl(I,a),dl(I,u)},onEnter:D(!1),onAppear:D(!0),onLeave(I,$){I._isLeaving=!0;const B=()=>P(I,$);dl(I,d),I._enterCancelled?(dl(I,f),U4(I)):(U4(I),dl(I,f)),H7(()=>{I._isLeaving&&(Ma(I,d),dl(I,h),B7(g)||z7(I,o,k,B))}),Lu(g,[I,B])},onEnterCancelled(I){E(I,!1,void 0,!0),Lu(_,[I])},onAppearCancelled(I){E(I,!0,void 0,!0),Lu(A,[I])},onLeaveCancelled(I){P(I),Lu(x,[I])}})}function IP(e){if(e==null)return null;if(Zn(e))return[qv(e.enter),qv(e.leave)];{const t=qv(e);return[t,t]}}function qv(e){return cm(e)}function dl(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Jd]||(e[Jd]=new Set)).add(t)}function Ma(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Jd];n&&(n.delete(t),n.size||(e[Jd]=void 0))}function H7(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let LP=0;function z7(e,t,n,o){const s=e._endId=++LP,i=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:r,timeout:l,propCount:a}=qA(e,t);if(!r)return o();const u=r+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=h=>{h.target===e&&++c>=a&&d()};setTimeout(()=>{c(n[m]||"").split(", "),s=o(`${va}Delay`),i=o(`${va}Duration`),r=W7(s,i),l=o(`${X1}Delay`),a=o(`${X1}Duration`),u=W7(l,a);let c=null,d=0,f=0;t===va?r>0&&(c=va,d=r,f=i.length):t===X1?u>0&&(c=X1,d=u,f=a.length):(d=Math.max(r,u),c=d>0?r>u?va:X1:null,f=c?c===va?i.length:a.length:0);const h=c===va&&/\b(?:transform|all)(?:,|$)/.test(o(`${va}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function W7(e,t){for(;e.lengthU7(n)+U7(e[o])))}function U7(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function U4(e){return(e?e.ownerDocument:document).body.offsetHeight}function $P(e,t,n){const o=e[Jd];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Am=Symbol("_vod"),q8=Symbol("_vsh"),qs={name:"show",beforeMount(e,{value:t},{transition:n}){e[Am]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):J1(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),J1(e,!0),o.enter(e)):o.leave(e,()=>{J1(e,!1)}):J1(e,t))},beforeUnmount(e,{value:t}){J1(e,t)}};function J1(e,t){e.style.display=t?e[Am]:"none",e[q8]=!t}function NP(){qs.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const KA=Symbol("");function mVe(e){const t=ds();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Mm(i,s))},o=()=>{const s=e(t.proxy);t.ce?Mm(t.ce,s):j4(t.subTree,s),n(s)};cA(()=>{mm(o)}),dn(()=>{Je(o,wr,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),bn(()=>s.disconnect())})}function j4(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{j4(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Mm(e.el,t);else if(e.type===Pe)e.children.forEach(n=>j4(n,t));else if(e.type===Od){let{el:n,anchor:o}=e;for(;n&&(Mm(n,t),n!==o);)n=n.nextSibling}}function Mm(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const i=TR(t[s]);n.setProperty(`--${s}`,i),o+=`--${s}: ${i};`}n[KA]=o}}const FP=/(?:^|;)\s*display\s*:/;function RP(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&&gf(o,l,"")}else for(const r in t)n[r]==null&&gf(o,r,"");for(const r in n){r==="display"&&(i=!0);const l=n[r];l!=null?PP(e,r,!ro(t)&&t?t[r]:void 0,l)||gf(o,r,l):gf(o,r,"")}}else if(s){if(t!==n){const r=o[KA];r&&(n+=";"+r),o.cssText=n,i=FP.test(n)}}else t&&e.removeAttribute("style");Am in e&&(e[Am]=i?o.display:"",e[q8]&&(o.display="none"))}const j7=/\s*!important$/;function gf(e,t,n){if(jt(n))n.forEach(o=>gf(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=OP(e,t);j7.test(n)?e.setProperty(Bi(o),n.replace(j7,""),"important"):e[o]=n}}const V7=["Webkit","Moz","ms"],Kv={};function OP(e,t){const n=Kv[t];if(n)return n;let o=_s(t);if(o!=="filter"&&o in e)return Kv[t]=o;o=Ug(o);for(let s=0;sZv||(UP.then(()=>Zv=0),Zv=Date.now());function VP(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(jt(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,qP=(e,t,n,o,s,i)=>{const r=s==="svg";t==="class"?$P(e,o,r):t==="style"?RP(e,n,o):Fp(t)?Bg(t)||BP(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):KP(e,t,o,r))?(Z7(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&K7(e,t,o,r,i,t!=="value")):e._isVueCE&&(ZP(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ro(o)))?Z7(e,_s(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),K7(e,t,o,r))};function KP(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Y7(t)&&un(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 Y7(t)&&ro(n)?!1:t in e}function ZP(e,t){const n=e._def.props;if(!n)return!1;const o=_s(t);return Array.isArray(n)?n.some(s=>_s(s)===o):Object.keys(n).some(s=>_s(s)===o)}const X7={};function GP(e,t,n){let o=et(e,t);Hg(o)&&(o=to({},o,t));class s extends K8{constructor(r){super(o,r,n)}}return s.def=o,s}const gVe=((e,t)=>GP(e,t,dD)),YP=typeof HTMLElement<"u"?HTMLElement:class{};class K8 extends YP{constructor(t,n={},o=Im){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!==Im?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(to({},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 K8){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,yt(()=>{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&&!jt(i))for(const a in i){const u=i[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=cm(this._props[a])),(l||(l=Object.create(null)))[_s(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)Kn(this,o)||Object.defineProperty(this,o,{get:()=>p(n[o])})}_resolveProps(t){const{props:n}=t,o=jt(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(_s))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):X7;const s=_s(t);n&&this._numberProps&&this._numberProps[s]&&(o=cm(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===X7?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),cD(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=j(this._def,to(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,Hg(r[0])?to({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),QP=JP({name:"TransitionGroup",props:to({},jA,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ds(),o=sA();let s,i;return Dp(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!oD(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(eD),s.forEach(tD);const l=s.filter(nD);U4(n.vnode.el),l.forEach(a=>{const u=a.el,c=u.style;dl(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Tm]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Tm]=null,Ma(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=Pn(e),l=VA(r);let a=r.tag||Pe;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}=qA(o);return i.removeChild(o),r}const Ya=e=>{const t=e.props["onUpdate:modelValue"]||!1;return jt(t)?n=>$d(t,n):t};function sD(e){e.target.composing=!0}function Q7(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const _r=Symbol("_assign");function ek(e,t,n){return t&&(e=e.trim()),n&&(e=jg(e)),e}const ai={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[_r]=Ya(s);const i=o||s.props&&s.props.type==="number";Yl(e,t?"change":"input",r=>{r.target.composing||e[_r](ek(e.value,n,i))}),(n||i)&&Yl(e,"change",()=>{e.value=ek(e.value,n,i)}),t||(Yl(e,"compositionstart",sD),Yl(e,"compositionend",Q7),Yl(e,"change",Q7))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},r){if(e[_r]=Ya(r),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?jg(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)}},Em={deep:!0,created(e,t,n){e[_r]=Ya(n),Yl(e,"change",()=>{const o=e._modelValue,s=Qd(e),i=e.checked,r=e[_r];if(jt(o)){const l=qg(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(Ac(o)){const l=new Set(o);i?l.add(s):l.delete(s),r(l)}else r(QA(e,i))})},mounted:tk,beforeUpdate(e,t,n){e[_r]=Ya(n),tk(e,t,n)}};function tk(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(jt(t))s=qg(t,o.props.value)>-1;else if(Ac(t))s=t.has(o.props.value);else{if(t===n)return;s=sa(t,QA(e,!0))}e.checked!==s&&(e.checked=s)}const JA={created(e,{value:t},n){e.checked=sa(t,n.props.value),e[_r]=Ya(n),Yl(e,"change",()=>{e[_r](Qd(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[_r]=Ya(o),t!==n&&(e.checked=sa(t,o.props.value))}},V4={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=Ac(t);Yl(e,"change",()=>{const i=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?jg(Qd(r)):Qd(r));e[_r](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,yt(()=>{e._assigning=!1})}),e[_r]=Ya(o)},mounted(e,{value:t}){nk(e,t)},beforeUpdate(e,t,n){e[_r]=Ya(n)},updated(e,{value:t}){e._assigning||nk(e,t)}};function nk(e,t){const n=e.multiple,o=jt(t);if(!(n&&!o&&!Ac(t))){for(let s=0,i=e.options.length;sString(u)===String(l)):r.selected=qg(t,l)>-1}else r.selected=t.has(l);else if(sa(Qd(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qd(e){return"_value"in e?e._value:e.value}function QA(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const iD={created(e,t,n){V0(e,t,n,null,"created")},mounted(e,t,n){V0(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){V0(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){V0(e,t,n,o,"updated")}};function eM(e,t){switch(e){case"SELECT":return V4;case"TEXTAREA":return ai;default:switch(t){case"checkbox":return Em;case"radio":return JA;default:return ai}}}function V0(e,t,n,o,s){const r=eM(e.tagName,n.props&&n.props.type)[s];r&&r(e,t,n,o)}function rD(){ai.getSSRProps=({value:e})=>({value:e}),JA.getSSRProps=({value:e},t)=>{if(t.props&&sa(t.props.value,e))return{checked:!0}},Em.getSSRProps=({value:e},t)=>{if(jt(e)){if(t.props&&qg(e,t.props.value)>-1)return{checked:!0}}else if(Ac(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},iD.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=eM(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const lD=["ctrl","shift","alt","meta"],aD={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)=>lD.some(n=>e[`${n}Key`]&&!t.includes(n))},It=(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||uD[r]===i))return e(s)}))},tM=to({patchProp:qP},TP);let Of,ok=!1;function nM(){return Of||(Of=aP(tM))}function oM(){return Of=ok?Of:uP(tM),ok=!0,Of}const cD=((...e)=>{nM().render(...e)}),kVe=((...e)=>{oM().hydrate(...e)}),Im=((...e)=>{const t=nM().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=iM(o);if(!s)return;const i=t._component;!un(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,sM(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t}),dD=((...e)=>{const t=oM().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=iM(o);if(s)return n(s,!0,sM(s))},t});function sM(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function iM(e){return ro(e)?document.querySelector(e):e}let sk=!1;const bVe=()=>{sk||(sk=!0,rD(),NP())};/*! + * shared v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function fD(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const Lm=typeof window<"u",ru=(e,t=!1)=>t?Symbol.for(e):Symbol(e),pD=(e,t,n)=>hD({l:e,k:t,s:n}),hD=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ls=e=>typeof e=="number"&&isFinite(e),rM=e=>G8(e)==="[object Date]",e1=e=>G8(e)==="[object RegExp]",o2=e=>$n(e)&&Object.keys(e).length===0,us=Object.assign,mD=Object.create,io=(e=null)=>mD(e);let ik;const Xu=()=>ik||(ik=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:io());function rk(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function gD(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const vD=/^\s*javascript\s*(?::|�*58;?|�*3a;?|:?)/i,yD=/^(?:href|src|action|formaction)$/i;function Z8(e){return vD.test(e)}function kD(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`${o}="${lk(o,s)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(n,o,s)=>`${o}='${lk(o,s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),e=e.replace(/(\s+(?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi,(n,o,s)=>Z8(s)?`${o}about:blank`:n),e}const CD=Object.prototype.hasOwnProperty;function br(e,t){return CD.call(e,t)}const Uo=Array.isArray,xo=e=>typeof e=="function",zt=e=>typeof e=="string",Un=e=>typeof e=="boolean",qn=e=>e!==null&&typeof e=="object",wD=e=>qn(e)&&xo(e.then)&&xo(e.catch),lM=Object.prototype.toString,G8=e=>lM.call(e),$n=e=>G8(e)==="[object Object]",_D=e=>e==null?"":Uo(e)||$n(e)&&e.toString===lM?JSON.stringify(e,null,2):String(e);function Y8(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}const q0=e=>!qn(e)||Uo(e);function Bh(e,t){if(q0(e)||q0(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__"&&(qn(o[i])&&!qn(s[i])&&(s[i]=Array.isArray(o[i])?[]:io()),q0(s[i])||q0(o[i])?s[i]=o[i]:n.push({src:o[i],des:s[i]}))})}}/*! + * message-compiler v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function xD(e,t,n){return{line:e,column:t,offset:n}}function q4(e,t,n){return{start:e,end:t}}const Xn={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},SD=17;function s2(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 AD(e){throw e}const rl=" ",MD="\r",ni=` +`,TD="\u2028",ED="\u2029";function ID(e){const t=e;let n=0,o=1,s=1,i=0;const r=T=>t[T]===MD&&t[T+1]===ni,l=T=>t[T]===ni,a=T=>t[T]===ED,u=T=>t[T]===TD,c=T=>r(T)||l(T)||a(T)||u(T),d=()=>n,f=()=>o,h=()=>s,m=()=>i,v=T=>r(T)||a(T)||u(T)?ni:t[T],k=()=>v(n),w=()=>v(n+i);function b(){return i=0,c(n)&&(o++,s=0),r(n)&&n++,n++,s++,t[n]}function _(){return r(n+i)&&i++,i++,t[n+i]}function g(){n=0,o=1,s=1,i=0}function x(T=0){i=T}function S(){const T=n+i;for(;T!==n;)b();i=0}return{index:d,line:f,column:h,peekOffset:m,charAt:v,currentChar:k,currentPeek:w,next:b,peek:_,reset:g,resetPeek:x,skipToPeek:S}}const zl=void 0,LD=".",ak="'",$D="tokenizer";function ND(e,t={}){const n=t.location!==!1,o=ID(e),s=()=>o.index(),i=()=>xD(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(Q,te,ce,...ue){const Se=u();if(te.column+=ce,te.offset+=ce,c){const ze=n?q4(Se.startLoc,te):null,_e=s2(Q,ze,{domain:$D,args:ue});c(_e)}}function f(Q,te,ce){Q.endLoc=i(),Q.currentType=te;const ue={type:te};return n&&(ue.loc=q4(Q.startLoc,Q.endLoc)),ce!=null&&(ue.value=ce),ue}const h=Q=>f(Q,13);function m(Q,te){return Q.currentChar()===te?(Q.next(),te):(d(Xn.EXPECTED_TOKEN,i(),0,te),"")}function v(Q){let te="";for(;Q.currentPeek()===rl||Q.currentPeek()===ni;)te+=Q.currentPeek(),Q.peek();return te}function k(Q){const te=v(Q);return Q.skipToPeek(),te}function w(Q){if(Q===zl)return!1;const te=Q.charCodeAt(0);return te>=97&&te<=122||te>=65&&te<=90||te===95}function b(Q){if(Q===zl)return!1;const te=Q.charCodeAt(0);return te>=48&&te<=57}function _(Q,te){const{currentType:ce}=te;if(ce!==2)return!1;v(Q);const ue=w(Q.currentPeek());return Q.resetPeek(),ue}function g(Q,te){const{currentType:ce}=te;if(ce!==2)return!1;v(Q);const ue=Q.currentPeek()==="-"?Q.peek():Q.currentPeek(),Se=b(ue);return Q.resetPeek(),Se}function x(Q,te){const{currentType:ce}=te;if(ce!==2)return!1;v(Q);const ue=Q.currentPeek()===ak;return Q.resetPeek(),ue}function S(Q,te){const{currentType:ce}=te;if(ce!==7)return!1;v(Q);const ue=Q.currentPeek()===".";return Q.resetPeek(),ue}function T(Q,te){const{currentType:ce}=te;if(ce!==8)return!1;v(Q);const ue=w(Q.currentPeek());return Q.resetPeek(),ue}function A(Q,te){const{currentType:ce}=te;if(!(ce===7||ce===11))return!1;v(Q);const ue=Q.currentPeek()===":";return Q.resetPeek(),ue}function E(Q,te){const{currentType:ce}=te;if(ce!==9)return!1;const ue=()=>{const ze=Q.currentPeek();return ze==="{"?w(Q.peek()):ze==="@"||ze==="|"||ze===":"||ze==="."||ze===rl||!ze?!1:ze===ni?(Q.peek(),ue()):D(Q,!1)},Se=ue();return Q.resetPeek(),Se}function P(Q){v(Q);const te=Q.currentPeek()==="|";return Q.resetPeek(),te}function D(Q,te=!0){const ce=(Se=!1,ze="")=>{const _e=Q.currentPeek();return _e==="{"||_e==="@"||!_e?Se:_e==="|"?!(ze===rl||ze===ni):_e===rl?(Q.peek(),ce(!0,rl)):_e===ni?(Q.peek(),ce(!0,ni)):!0},ue=ce();return te&&Q.resetPeek(),ue}function I(Q,te){const ce=Q.currentChar();return ce===zl?zl:te(ce)?(Q.next(),ce):null}function $(Q){const te=Q.charCodeAt(0);return te>=97&&te<=122||te>=65&&te<=90||te>=48&&te<=57||te===95||te===36}function B(Q){return I(Q,$)}function H(Q){const te=Q.charCodeAt(0);return te>=97&&te<=122||te>=65&&te<=90||te>=48&&te<=57||te===95||te===36||te===45}function O(Q){return I(Q,H)}function F(Q){const te=Q.charCodeAt(0);return te>=48&&te<=57}function U(Q){return I(Q,F)}function z(Q){const te=Q.charCodeAt(0);return te>=48&&te<=57||te>=65&&te<=70||te>=97&&te<=102}function W(Q){return I(Q,z)}function K(Q){let te="",ce="";for(;te=U(Q);)ce+=te;return ce}function V(Q){let te="";for(;;){const ce=Q.currentChar();if(ce==="\\"){const ue=Q.peek();ue==="{"||ue==="}"||ue==="@"||ue==="|"||ue==="\\"?(te+=ce+ue,Q.next(),Q.next()):(Q.resetPeek(),te+=ce,Q.next())}else{if(ce==="{"||ce==="}"||ce==="@"||ce==="|"||!ce)break;if(ce===rl||ce===ni)if(D(Q))te+=ce,Q.next();else{if(P(Q))break;te+=ce,Q.next()}else te+=ce,Q.next()}}return te}function ie(Q){k(Q);let te="",ce="";for(;te=O(Q);)ce+=te;const ue=Q.currentChar();if(ue&&ue!=="}"&&ue!==zl&&ue!==rl&&ue!==ni&&ue!==" "){const Se=ve(Q);return d(Xn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ce+Se),ce+Se}return Q.currentChar()===zl&&d(Xn.UNTERMINATED_CLOSING_BRACE,i(),0),ce}function ne(Q){k(Q);let te="";return Q.currentChar()==="-"?(Q.next(),te+=`-${K(Q)}`):te+=K(Q),Q.currentChar()===zl&&d(Xn.UNTERMINATED_CLOSING_BRACE,i(),0),te}function X(Q){return Q!==ak&&Q!==ni}function le(Q){k(Q),m(Q,"'");let te="",ce="";for(;te=I(Q,X);)te==="\\"?ce+=Ie(Q):ce+=te;const ue=Q.currentChar();return ue===ni||ue===zl?(d(Xn.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),ue===ni&&(Q.next(),m(Q,"'")),ce):(m(Q,"'"),ce)}function Ie(Q){const te=Q.currentChar();switch(te){case"\\":case"'":return Q.next(),`\\${te}`;case"u":return de(Q,te,4);case"U":return de(Q,te,6);default:return d(Xn.UNKNOWN_ESCAPE_SEQUENCE,i(),0,te),""}}function de(Q,te,ce){m(Q,te);let ue="";for(let Se=0;Se{const ue=Q.currentChar();return ue==="{"||ue==="@"||ue==="|"||ue==="("||ue===")"||!ue||ue===rl?ce:(ce+=ue,Q.next(),te(ce))};return te("")}function G(Q){k(Q);const te=m(Q,"|");return k(Q),te}function Y(Q,te){let ce=null;switch(Q.currentChar()){case"{":return te.braceNest>=1&&d(Xn.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),Q.next(),ce=f(te,2,"{"),k(Q),te.braceNest++,ce;case"}":return te.braceNest>0&&te.currentType===2&&d(Xn.EMPTY_PLACEHOLDER,i(),0),Q.next(),ce=f(te,3,"}"),te.braceNest--,te.braceNest>0&&k(Q),te.inLinked&&te.braceNest===0&&(te.inLinked=!1),ce;case"@":return te.braceNest>0&&d(Xn.UNTERMINATED_CLOSING_BRACE,i(),0),ce=fe(Q,te)||h(te),te.braceNest=0,ce;default:{let Se=!0,ze=!0,_e=!0;if(P(Q))return te.braceNest>0&&d(Xn.UNTERMINATED_CLOSING_BRACE,i(),0),ce=f(te,1,G(Q)),te.braceNest=0,te.inLinked=!1,ce;if(te.braceNest>0&&(te.currentType===4||te.currentType===5||te.currentType===6))return d(Xn.UNTERMINATED_CLOSING_BRACE,i(),0),te.braceNest=0,we(Q,te);if(Se=_(Q,te))return ce=f(te,4,ie(Q)),k(Q),ce;if(ze=g(Q,te))return ce=f(te,5,ne(Q)),k(Q),ce;if(_e=x(Q,te))return ce=f(te,6,le(Q)),k(Q),ce;if(!Se&&!ze&&!_e)return ce=f(te,12,ve(Q)),d(Xn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ce.value),k(Q),ce;break}}return ce}function fe(Q,te){const{currentType:ce}=te;let ue=null;const Se=Q.currentChar();switch((ce===7||ce===8||ce===11||ce===9)&&(Se===ni||Se===rl)&&d(Xn.INVALID_LINKED_FORMAT,i(),0),Se){case"@":return Q.next(),ue=f(te,7,"@"),te.inLinked=!0,ue;case".":return k(Q),Q.next(),f(te,8,".");case":":return k(Q),Q.next(),f(te,9,":");default:return P(Q)?(ue=f(te,1,G(Q)),te.braceNest=0,te.inLinked=!1,ue):S(Q,te)||A(Q,te)?(k(Q),fe(Q,te)):T(Q,te)?(k(Q),f(te,11,oe(Q))):E(Q,te)?(k(Q),Se==="{"?Y(Q,te)||ue:f(te,10,ye(Q))):(ce===7&&d(Xn.INVALID_LINKED_FORMAT,i(),0),te.braceNest=0,te.inLinked=!1,we(Q,te))}}function we(Q,te){let ce={type:13};if(te.braceNest>0)return Y(Q,te)||h(te);if(te.inLinked)return fe(Q,te)||h(te);switch(Q.currentChar()){case"{":return Y(Q,te)||h(te);case"}":return d(Xn.UNBALANCED_CLOSING_BRACE,i(),0),Q.next(),f(te,3,"}");case"@":return fe(Q,te)||h(te);default:{if(P(Q))return ce=f(te,1,G(Q)),te.braceNest=0,te.inLinked=!1,ce;if(D(Q))return f(te,0,V(Q));break}}return ce}function ge(){const{currentType:Q,offset:te,startLoc:ce,endLoc:ue}=a;return a.lastType=Q,a.lastOffset=te,a.lastStartLoc=ce,a.lastEndLoc=ue,a.offset=s(),a.startLoc=i(),o.currentChar()===zl?f(a,13):we(o,a)}return{nextToken:ge,currentOffset:s,currentPosition:i,context:u}}const FD="parser",RD=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,OD=/\\([\\@{}|])/g;function PD(e,t){return t}function DD(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 BD(e={}){const t=e.location!==!1,{onError:n}=e;function o(w,b,_,g,...x){const S=w.currentPosition();if(S.offset+=g,S.column+=g,n){const T=t?q4(_,S):null,A=s2(b,T,{domain:FD,args:x});n(A)}}function s(w,b,_){const g={type:w};return t&&(g.start=b,g.end=b,g.loc={start:_,end:_}),g}function i(w,b,_,g){t&&(w.end=b,w.loc&&(w.loc.end=_))}function r(w,b){const _=w.context(),g=s(3,_.offset,_.startLoc);return g.value=b.replace(OD,PD),i(g,w.currentOffset(),w.currentPosition()),g}function l(w,b){const _=w.context(),{lastOffset:g,lastStartLoc:x}=_,S=s(5,g,x);return S.index=parseInt(b,10),w.nextToken(),i(S,w.currentOffset(),w.currentPosition()),S}function a(w,b){const _=w.context(),{lastOffset:g,lastStartLoc:x}=_,S=s(4,g,x);return S.key=b,w.nextToken(),i(S,w.currentOffset(),w.currentPosition()),S}function u(w,b){const _=w.context(),{lastOffset:g,lastStartLoc:x}=_,S=s(9,g,x);return S.value=b.replace(RD,DD),w.nextToken(),i(S,w.currentOffset(),w.currentPosition()),S}function c(w){const b=w.nextToken(),_=w.context(),{lastOffset:g,lastStartLoc:x}=_,S=s(8,g,x);return b.type!==11?(o(w,Xn.UNEXPECTED_EMPTY_LINKED_MODIFIER,_.lastStartLoc,0),S.value="",i(S,g,x),{nextConsumeToken:b,node:S}):(b.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,ll(b)),S.value=b.value||"",i(S,w.currentOffset(),w.currentPosition()),{node:S})}function d(w,b){const _=w.context(),g=s(7,_.offset,_.startLoc);return g.value=b,i(g,w.currentOffset(),w.currentPosition()),g}function f(w){const b=w.context(),_=s(6,b.offset,b.startLoc);let g=w.nextToken();if(g.type===8){const x=c(w);_.modifier=x.node,g=x.nextConsumeToken||w.nextToken()}switch(g.type!==9&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(g)),g=w.nextToken(),g.type===2&&(g=w.nextToken()),g.type){case 10:g.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(g)),_.key=d(w,g.value||"");break;case 4:g.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(g)),_.key=a(w,g.value||"");break;case 5:g.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(g)),_.key=l(w,g.value||"");break;case 6:g.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(g)),_.key=u(w,g.value||"");break;default:{o(w,Xn.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const x=w.context(),S=s(7,x.offset,x.startLoc);return S.value="",i(S,x.offset,x.startLoc),_.key=S,i(_,x.offset,x.startLoc),{nextConsumeToken:g,node:_}}}return i(_,w.currentOffset(),w.currentPosition()),{node:_}}function h(w){const b=w.context(),_=b.currentType===1?w.currentOffset():b.offset,g=b.currentType===1?b.endLoc:b.startLoc,x=s(2,_,g);x.items=[];let S=null;do{const E=S||w.nextToken();switch(S=null,E.type){case 0:E.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(E)),x.items.push(r(w,E.value||""));break;case 5:E.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(E)),x.items.push(l(w,E.value||""));break;case 4:E.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(E)),x.items.push(a(w,E.value||""));break;case 6:E.value==null&&o(w,Xn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ll(E)),x.items.push(u(w,E.value||""));break;case 7:{const P=f(w);x.items.push(P.node),S=P.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const T=b.currentType===1?b.lastOffset:w.currentOffset(),A=b.currentType===1?b.lastEndLoc:w.currentPosition();return i(x,T,A),x}function m(w,b,_,g){const x=w.context();let S=g.items.length===0;const T=s(1,b,_);T.cases=[],T.cases.push(g);do{const A=h(w);S||(S=A.items.length===0),T.cases.push(A)}while(x.currentType!==13);return S&&o(w,Xn.MUST_HAVE_MESSAGES_IN_PLURAL,_,0),i(T,w.currentOffset(),w.currentPosition()),T}function v(w){const b=w.context(),{offset:_,startLoc:g}=b,x=h(w);return b.currentType===13?x:m(w,_,g,x)}function k(w){const b=ND(w,us({},e)),_=b.context(),g=s(0,_.offset,_.startLoc);return t&&g.loc&&(g.loc.source=w),g.body=v(b),e.onCacheKey&&(g.cacheKey=e.onCacheKey(w)),_.currentType!==13&&o(b,Xn.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,w[_.offset]||""),i(g,b.currentOffset(),b.currentPosition()),g}return{parse:k}}function ll(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 HD(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function uk(e,t){for(let n=0;nck(n)),e}function ck(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(v,k){r.code+=v}function u(v,k=!0){const w=k?o:"";a(s?w+" ".repeat(v):w)}function c(v=!0){const k=++r.indentLevel;v&&u(k)}function d(v=!0){const k=--r.indentLevel;v&&u(k)}function f(){u(r.indentLevel)}return{context:l,push:a,indent:c,deindent:d,newline:f,helper:v=>`_${v}`,needIndent:()=>r.needIndent}}function jD(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),t1(e,t.key),t.modifier?(e.push(", "),t1(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function VD(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=UD(e,{filename:o,breakLineCode:s,needIndent:i});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(i),r.length>0&&(l.push(`const { ${Y8(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),t1(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 GD(e,t={}){const n=us({},t),o=!!n.jit,s=!!n.minify,i=n.optimize==null?!0:n.optimize,l=BD(n).parse(e);return o?(i&&WD(l),s&&pd(l),{ast:l,code:""}):(zD(l,n),ZD(l,n))}/*! + * core-base v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function YD(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Xu().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Xu().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function bl(e){return qn(e)&&J8(e)===0&&(br(e,"b")||br(e,"body"))}const aM=["b","body"];function XD(e){return lu(e,aM)}const uM=["c","cases"];function JD(e){return lu(e,uM,[])}const cM=["s","static"];function QD(e){return lu(e,cM)}const dM=["i","items"];function eB(e){return lu(e,dM,[])}const fM=["t","type"];function J8(e){return lu(e,fM)}const pM=["v","value"];function K0(e,t){const n=lu(e,pM);if(n!=null)return n;throw pp(t)}const hM=["m","modifier"];function tB(e){return lu(e,hM)}const mM=["k","key"];function nB(e){const t=lu(e,mM);if(t)return t;throw pp(6)}function lu(e,t,n){for(let o=0;ooB(n,e)}function oB(e,t){const n=XD(t);if(n==null)throw pp(0);if(J8(n)===1){const i=JD(n);return e.plural(i.reduce((r,l)=>[...r,dk(e,l)],[]))}else return dk(e,n)}function dk(e,t){const n=QD(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=eB(t).reduce((s,i)=>[...s,K4(e,i)],[]);return e.normalize(o)}}function K4(e,t){const n=J8(t);switch(n){case 3:return K0(t,n);case 9:return K0(t,n);case 4:{const o=t;if(br(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(br(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw pp(n)}case 5:{const o=t;if(br(o,"i")&&ls(o.i))return e.interpolate(e.list(o.i));if(br(o,"index")&&ls(o.index))return e.interpolate(e.list(o.index));throw pp(n)}case 6:{const o=t,s=tB(o),i=nB(o);return e.linked(K4(e,i),s?K4(e,s):void 0,e.type)}case 7:return K0(t,n);case 8:return K0(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const sB=e=>e;let Z0=io();function iB(e,t={}){let n=!1;const o=t.onError||AD;return t.onError=s=>{n=!0,o(s)},{...GD(e,t),detectError:n}}function rB(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&zt(e)){Un(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||sB)(e),s=Z0[o];if(s)return s;const{ast:i,detectError:r}=iB(e,{...t,location:!1,jit:!0}),l=Gv(i);return r?l:Z0[o]=l}else{const n=e.cacheKey;if(n){const o=Z0[n];return o||(Z0[n]=Gv(e))}else return Gv(e)}}let hp=null;function lB(e){hp=e}function aB(e,t,n){hp&&hp.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const uB=cB("function:translate");function cB(e){return t=>hp&&hp.emit(e,t)}const Jl={INVALID_ARGUMENT:SD,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},dB=24;function Ql(e){return s2(e,null,void 0)}function Q8(e,t){return t.locale!=null?fk(t.locale):fk(e.locale)}let Yv;function fk(e){if(zt(e))return e;if(xo(e)){if(e.resolvedOnce&&Yv!=null)return Yv;if(e.constructor.name==="Function"){const t=e();if(wD(t))throw Ql(Jl.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Yv=t}else throw Ql(Jl.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ql(Jl.NOT_SUPPORT_LOCALE_TYPE)}function fB(e,t,n){return[...new Set([n,...Uo(t)?t:qn(t)?Object.keys(t):zt(t)?[t]:[n]])]}function Z4(e,t,n){const o=zt(n)?n:mp,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let i=s.__localeChainCache.get(o);if(!i){i=[];let r=[n];for(;Uo(r);)r=pk(i,r,t);const l=Uo(t)||!$n(t)?t:t.default?t.default:null;r=zt(l)?[l]:l,Uo(r)&&pk(i,r,!1),s.__localeChainCache.set(o,i)}return i}function pk(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=kB(r),r===!1))return!1;f[1]()}};function h(){const m=e[n+1];if(o===5&&m==="'"||o===6&&m==='"')return n++,l="\\"+m,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&h())){if(a=yB(i),d=au[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 hk=new Map;function CB(e,t){return qn(e)?e[t]:null}function wB(e,t){if(!qn(e))return null;let n=hk.get(t);if(n||(n=bB(t),n&&hk.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 xB(){return{upper:(e,t)=>t==="text"&&zt(e)?e.toUpperCase():t==="vnode"&&qn(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&zt(e)?e.toLowerCase():t==="vnode"&&qn(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&zt(e)?mk(e):t==="vnode"&&qn(e)&&"__v_isVNode"in e?mk(e.children):e}}let vM;function SB(e){vM=e}let yM;function AB(e){yM=e}let kM;function MB(e){kM=e}let bM=null;const TB=e=>{bM=e},EB=()=>bM;let CM=null;const gk=e=>{CM=e},IB=()=>CM;let vk=0;function LB(e={}){const t=xo(e.onWarn)?e.onWarn:fD,n=zt(e.version)?e.version:_B,o=zt(e.locale)||xo(e.locale)?e.locale:mp,s=xo(o)?mp:o,i=Uo(e.fallbackLocale)||$n(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,r=$n(e.messages)?e.messages:Xv(s),l=$n(e.datetimeFormats)?e.datetimeFormats:Xv(s),a=$n(e.numberFormats)?e.numberFormats:Xv(s),u=us(io(),e.modifiers,xB()),c=e.pluralRules||io(),d=xo(e.missing)?e.missing:null,f=Un(e.missingWarn)||e1(e.missingWarn)?e.missingWarn:!0,h=Un(e.fallbackWarn)||e1(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,v=!!e.unresolving,k=xo(e.postTranslation)?e.postTranslation:null,w=$n(e.processor)?e.processor:null,b=Un(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter,g=xo(e.messageCompiler)?e.messageCompiler:vM,x=xo(e.messageResolver)?e.messageResolver:yM||CB,S=xo(e.localeFallbacker)?e.localeFallbacker:kM||fB,T=qn(e.fallbackContext)?e.fallbackContext:void 0,A=e,E=qn(A.__datetimeFormatters)?A.__datetimeFormatters:new Map,P=qn(A.__numberFormatters)?A.__numberFormatters:new Map,D=qn(A.__meta)?A.__meta:{};vk++;const I={version:n,cid:vk,locale:o,fallbackLocale:i,messages:r,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:h,fallbackFormat:m,unresolving:v,postTranslation:k,processor:w,warnHtmlMessage:b,escapeParameter:_,messageCompiler:g,messageResolver:x,localeFallbacker:S,fallbackContext:T,onWarn:t,__meta:D};return I.datetimeFormats=l,I.numberFormats=a,I.__datetimeFormatters=E,I.__numberFormatters=P,__INTLIFY_PROD_DEVTOOLS__&&aB(I,n,D),I}const Xv=e=>({[e]:io()});function ey(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 Q1(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function $B(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function NB(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{wM.includes(a)?r[a]=n[a]:i[a]=n[a]}),zt(o)?i.locale=o:$n(o)&&(r=o),$n(s)&&(r=s),[i.key||"",l,i,r]}function kk(e,t,n){const o=e;for(const s in n){const i=`${t}__${s}`;o.__datetimeFormatters.has(i)&&o.__datetimeFormatters.delete(i)}}function bk(e,...t){const{numberFormats:n,unresolving:o,fallbackLocale:s,onWarn:i,localeFallbacker:r}=e,{__numberFormatters:l}=e;if(!ls(t[0]))return $m;const[a,u,c,d]=Y4(...t),f=Un(c.missingWarn)?c.missingWarn:e.missingWarn;Un(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const h=!!c.part,m=Q8(e,c),v=r(e,s,m);if(!zt(a)||a===""){const S=new Intl.NumberFormat(m.replace(/!/g,""),d);return h?S.formatToParts(u):S.format(u)}let k={},w,b=null;const _="number format";for(let S=0;S{_M.includes(a)?r[a]=n[a]:i[a]=n[a]}),zt(o)?i.locale=o:$n(o)&&(r=o),$n(s)&&(r=s),[i.key||"",l,i,r]}function Ck(e,t,n){const o=e;for(const s in n){const i=`${t}__${s}`;o.__numberFormatters.has(i)&&o.__numberFormatters.delete(i)}}const FB=e=>e,RB=e=>"",OB="text",PB=e=>e.length===0?"":Y8(e),DB=_D;function Jv(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function BB(e){const t=ls(e.pluralIndex)?e.pluralIndex:-1;return ls(e.named?.count)?e.named.count:ls(e.named?.n)?e.named.n:t}function HB(e={}){const t=e.locale,n=BB(e),o=zt(t)&&xo(e.pluralRules?.[t])?e.pluralRules[t]:Jv,s=o===Jv?void 0:Jv,i=w=>w[o(n,w.length,s)],r=e.list||[],l=w=>r[w],a=e.named||io();ls(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const u=w=>a[w];function c(w,b){const _=xo(e.messages)?e.messages(w,!!b):qn(e.messages)?e.messages[w]:!1;return _||(e.parent?e.parent.message(w):RB)}const d=w=>e.modifiers?e.modifiers[w]:FB,f=xo(e.processor?.normalize)?e.processor.normalize:PB,h=xo(e.processor?.interpolate)?e.processor.interpolate:DB,m=zt(e.processor?.type)?e.processor.type:OB,k={list:l,named:u,plural:i,linked:(w,...b)=>{const[_,g]=b;let x="text",S="";b.length===1?qn(_)?(S=_.modifier||S,x=_.type||x):zt(_)&&(S=_||S):b.length===2&&(zt(_)&&(S=_||S),zt(g)&&(x=g||x));const T=c(w,!0)(k),A=T===""||T===void 0?w:T,E=x==="vnode"&&Uo(A)&&S?A[0]:A;return S?d(S)(E,x):E},message:c,type:m,interpolate:h,normalize:f,values:us(io(),r,a)};return k}const wk=()=>"",kr=e=>xo(e);function _k(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:i,fallbackLocale:r,messages:l}=e,[a,u]=X4(...t),c=Un(u.missingWarn)?u.missingWarn:e.missingWarn,d=Un(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=Un(u.escapeParameter)?u.escapeParameter:e.escapeParameter,h=!!u.resolvedMessage,m=zt(u.default)||Un(u.default)?Un(u.default)?i?a:()=>a:u.default:n?i?a:()=>a:null,v=n||m!=null&&(zt(m)||xo(m)),k=Q8(e,u);f&&zB(u);let[w,b,_]=h?[a,k,l[k]||io()]:xM(e,a,k,r,d,c),g=w,x=a;if(!h&&!(zt(g)||bl(g)||kr(g))&&v&&(g=m,x=g),!h&&(!(zt(g)||bl(g)||kr(g))||!zt(b)))return s?i2:a;let S=!1;const T=()=>{S=!0},A=kr(g)?g:SM(e,a,b,g,x,T);if(S)return g;const E=jB(e,b,_,u),P=HB(E),D=WB(e,A,P);let I=o?o(D,a):D;if(f&&zt(I)&&(I=bD(I)),__INTLIFY_PROD_DEVTOOLS__){const $={timestamp:Date.now(),key:zt(a)?a:kr(g)?g.key:"",locale:b||(kr(g)?g.locale:""),format:zt(g)?g:kr(g)?g.source:"",message:I};$.meta=us({},e.__meta,EB()||{}),uB($)}return I}function zB(e){Uo(e.list)?e.list=e.list.map(t=>zt(t)?rk(t):t):qn(e.named)&&Object.keys(e.named).forEach(t=>{zt(e.named[t])&&(e.named[t]=rk(e.named[t]))})}function xM(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,h=null;const m="translate";for(let v=0;vo);return u.locale=n,u.key=t,u}const a=r(o,UB(e,n,s,o,l,i));return a.locale=n,a.key=t,a.source=o,a}function WB(e,t,n){return t(n)}function X4(...e){const[t,n,o]=e,s=io();if(!zt(t)&&!ls(t)&&!kr(t)&&!bl(t))throw Ql(Jl.INVALID_ARGUMENT);const i=ls(t)?String(t):(kr(t),t);return ls(n)?s.plural=n:zt(n)?s.default=n:$n(n)&&!o2(n)?s.named=n:Uo(n)&&(s.list=n),ls(o)?s.plural=o:zt(o)?s.default=o:$n(o)&&us(s,o),[i,s]}function UB(e,t,n,o,s,i){return{locale:t,key:n,warnHtmlMessage:s,onError:r=>{throw i&&i(r),r},onCacheKey:r=>pD(t,n,r)}}function jB(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:(h,m)=>{let v=r(n,h);if(v==null&&(c||m)){const[k,,w]=xM(c||e,h,t,l,a,u);v=k??r(w,h)}if(zt(v)||bl(v)){let k=!1;const b=SM(e,h,t,v,h,()=>{k=!0});return k?wk:b}else return kr(v)?v:wk}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),ls(o.plural)&&(f.pluralIndex=o.plural),f}YD();/*! + * vue-i18n v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */const VB="11.4.6";function qB(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Xu().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Xu().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Xu().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Xu().__INTLIFY_PROD_DEVTOOLS__=!1)}const _i={UNEXPECTED_RETURN_TYPE:dB,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 Hi(e,...t){return s2(e,null,void 0)}const J4=ru("__translateVNode"),Q4=ru("__datetimeParts"),e3=ru("__numberParts"),AM=ru("__setPluralRules"),MM=ru("__injectWithOption"),bd=ru("__dispose");function gp(e){if(!qn(e)||bl(e))return e;for(const t in e)if(br(e,t))if(!t.includes("."))qn(e[t])&&gp(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(),Bh(u,r[a])):Bh(u,r)}else zt(l)&&Bh(JSON.parse(l),r)}),s==null&&i)for(const l in r)br(r,l)&&gp(r[l]);return r}function TM(e){return e.type}function EM(e,t,n){let o=qn(t.messages)?t.messages:io();"__i18nGlobal"in n&&(o=ty(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(qn(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(qn(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function xk(e){return j(Ua,null,e,0)}function vp(){return ds()}const Sk="__INTLIFY_META__",Ak=()=>[],KB=()=>!1;let Mk=0;function Tk(e){return((t,n,o,s)=>e(n,o,vp()||void 0,s))}const ZB=()=>{const e=vp();let t=null;return e&&(t=TM(e)[Sk])?{[Sk]:t}:null};function Nm(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,i=Lm?Z:Xr;let r=Un(e.inheritLocale)?e.inheritLocale:!0;const l=i(t&&r?t.locale.value:zt(e.locale)?e.locale:mp),a=i(t&&r?t.fallbackLocale.value:zt(e.fallbackLocale)||Uo(e.fallbackLocale)||$n(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=i(ty(l.value,e)),c=i($n(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=i($n(e.numberFormats)?e.numberFormats:{[l.value]:{}});let f=t?t.missingWarn:Un(e.missingWarn)||e1(e.missingWarn)?e.missingWarn:!0,h=t?t.fallbackWarn:Un(e.fallbackWarn)||e1(e.fallbackWarn)?e.fallbackWarn:!0,m=t?t.fallbackRoot:Un(e.fallbackRoot)?e.fallbackRoot:!0,v=!!e.fallbackFormat,k=xo(e.missing)?e.missing:null,w=xo(e.missing)?Tk(e.missing):null,b=xo(e.postTranslation)?e.postTranslation:null,_=t?t.warnHtmlMessage:Un(e.warnHtmlMessage)?e.warnHtmlMessage:!0,g=!!e.escapeParameter;const x=t?t.modifiers:$n(e.modifiers)?e.modifiers:{};let S=e.pluralRules||t&&t.pluralRules,T;T=(()=>{o&&gk(null);const _e={version:VB,locale:l.value,fallbackLocale:a.value,messages:u.value,modifiers:x,pluralRules:S,missing:w===null?void 0:w,missingWarn:f,fallbackWarn:h,fallbackFormat:v,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:_,escapeParameter:g,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};_e.datetimeFormats=c.value,_e.numberFormats=d.value,_e.__datetimeFormatters=$n(T)?T.__datetimeFormatters:void 0,_e.__numberFormatters=$n(T)?T.__numberFormatters:void 0;const Ee=LB(_e);return o&&gk(Ee),Ee})(),Q1(T,l.value,a.value);function E(){return[l.value,a.value,u.value,c.value,d.value]}const P=R({get:()=>l.value,set:_e=>{T.locale=_e,l.value=_e}}),D=R({get:()=>a.value,set:_e=>{T.fallbackLocale=_e,a.value=_e,Q1(T,l.value,_e)}}),I=R(()=>u.value),$=R(()=>c.value),B=R(()=>d.value);function H(){return xo(b)?b:null}function O(_e){b=_e,T.postTranslation=_e}function F(){return k}function U(_e){_e!==null&&(w=Tk(_e)),k=_e,T.missing=w}const z=(_e,Ee,it,Fe,Oe,Ge)=>{E();let at;try{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=t?IB():void 0),at=_e(T)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=void 0)}if(it!=="translate exists"&&ls(at)&&at===i2||it==="translate exists"&&!at){const[Tt,Bt]=Ee();return t&&m?Fe(t):Oe(Tt)}else{if(Ge(at))return at;throw Hi(_i.UNEXPECTED_RETURN_TYPE)}};function W(..._e){return z(Ee=>Reflect.apply(_k,null,[Ee,..._e]),()=>X4(..._e),"translate",Ee=>Reflect.apply(Ee.t,Ee,[..._e]),Ee=>Ee,Ee=>zt(Ee))}function K(..._e){const[Ee,it,Fe]=_e;if(Fe&&!qn(Fe))throw Hi(_i.INVALID_ARGUMENT);return W(Ee,it,us({resolvedMessage:!0},Fe||{}))}function V(..._e){return z(Ee=>Reflect.apply(yk,null,[Ee,..._e]),()=>G4(..._e),"datetime format",Ee=>Reflect.apply(Ee.d,Ee,[..._e]),()=>$m,Ee=>zt(Ee)||Uo(Ee))}function ie(..._e){return z(Ee=>Reflect.apply(bk,null,[Ee,..._e]),()=>Y4(..._e),"number format",Ee=>Reflect.apply(Ee.n,Ee,[..._e]),()=>$m,Ee=>zt(Ee)||Uo(Ee))}function ne(_e){return _e.map(Ee=>zt(Ee)||ls(Ee)||Un(Ee)?xk(String(Ee)):Ee)}const le={normalize:ne,interpolate:_e=>_e,type:"vnode"};function Ie(..._e){return z(Ee=>{let it;const Fe=Ee;try{Fe.processor=le,it=Reflect.apply(_k,null,[Fe,..._e])}finally{Fe.processor=null}return it},()=>X4(..._e),"translate",Ee=>Ee[J4](..._e),Ee=>[xk(Ee)],Ee=>Uo(Ee))}function de(..._e){return z(Ee=>Reflect.apply(bk,null,[Ee,..._e]),()=>Y4(..._e),"number format",Ee=>Ee[e3](..._e),Ak,Ee=>zt(Ee)||Uo(Ee))}function pe(..._e){return z(Ee=>Reflect.apply(yk,null,[Ee,..._e]),()=>G4(..._e),"datetime format",Ee=>Ee[Q4](..._e),Ak,Ee=>zt(Ee)||Uo(Ee))}function ve(_e){S=_e,T.pluralRules=S}function oe(_e,Ee){return z(()=>{if(!_e)return!1;const it=zt(Ee)?Ee:l.value,Fe=zt(Ee)?[it]:Z4(T,a.value,it);for(let Oe=0;Oe[_e],"translate exists",it=>Reflect.apply(it.te,it,[_e,Ee]),KB,it=>Un(it))}function ye(_e){let Ee=null;const it=Z4(T,a.value,l.value);for(let Fe=0;Fe{r&&(l.value=_e,T.locale=_e,Q1(T,l.value,a.value))}),Je(t.fallbackLocale,_e=>{r&&(a.value=_e,T.fallbackLocale=_e,Q1(T,l.value,a.value))}));const ze={id:Mk,locale:P,fallbackLocale:D,get inheritLocale(){return r},set inheritLocale(_e){r=_e,_e&&t&&(l.value=t.locale.value,a.value=t.fallbackLocale.value,Q1(T,l.value,a.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:I,get modifiers(){return x},get pluralRules(){return S||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(_e){f=_e,T.missingWarn=f},get fallbackWarn(){return h},set fallbackWarn(_e){h=_e,T.fallbackWarn=h},get fallbackRoot(){return m},set fallbackRoot(_e){m=_e},get fallbackFormat(){return v},set fallbackFormat(_e){v=_e,T.fallbackFormat=v},get warnHtmlMessage(){return _},set warnHtmlMessage(_e){_=_e,T.warnHtmlMessage=_e},get escapeParameter(){return g},set escapeParameter(_e){g=_e,T.escapeParameter=_e},t:W,getLocaleMessage:Y,setLocaleMessage:fe,mergeLocaleMessage:we,getPostTranslationHandler:H,setPostTranslationHandler:O,getMissingHandler:F,setMissingHandler:U,[AM]:ve};return ze.datetimeFormats=$,ze.numberFormats=B,ze.rt=K,ze.te=oe,ze.tm=G,ze.d=V,ze.n=ie,ze.getDateTimeFormat=ge,ze.setDateTimeFormat=Q,ze.mergeDateTimeFormat=te,ze.getNumberFormat=ce,ze.setNumberFormat=ue,ze.mergeNumberFormat=Se,ze[MM]=n,ze[J4]=Ie,ze[Q4]=pe,ze[e3]=de,ze}function GB(e){const t=zt(e.locale)?e.locale:mp,n=zt(e.fallbackLocale)||Uo(e.fallbackLocale)||$n(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=xo(e.missing)?e.missing:void 0,s=Un(e.silentTranslationWarn)||e1(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=Un(e.silentFallbackWarn)||e1(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=Un(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,a=$n(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=xo(e.postTranslation)?e.postTranslation:void 0,d=zt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,h=Un(e.sync)?e.sync:!0;let m=e.messages;if($n(e.sharedMessages)){const x=e.sharedMessages;m=Object.keys(x).reduce((T,A)=>{const E=T[A]||(T[A]={});return us(E,x[A]),T},m||{})}const{__i18n:v,__root:k,__injectWithOption:w}=e,b=e.datetimeFormats,_=e.numberFormats,g=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:g,datetimeFormats:b,numberFormats:_,missing:o,missingWarn:s,fallbackWarn:i,fallbackRoot:r,fallbackFormat:l,modifiers:a,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:h,__i18n:v,__root:k,__injectWithOption:w}}function t3(e={}){const t=Nm(GB(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 Un(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=Un(s)?!s:s},get silentFallbackWarn(){return Un(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=Un(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 YB(e,t,n){return{beforeCreate(){const o=vp();if(!o)throw Hi(_i.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=Ek(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=t3(i);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=Ek(e,s);else{this.$i18n=t3({__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&&EM(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=vp();if(!o)throw Hi(_i.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 Ek(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[AM](t.pluralizationRules||e.pluralizationRules);const n=ty(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 ny={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function XB({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pe?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},io())}function IM(){return Pe}const JB=et({name:"i18n-t",props:us({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ls(e)||!isNaN(e)}},ny),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||Nt({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=zt(e.plural)?+e.plural:e.plural);const c=XB(t,a);return s[J4](e.keypath,c,u)},r=us(io(),o),l=zt(e.tag)||qn(e.tag)?e.tag:IM();return qn(l)?tn(l,r,{default:i}):tn(l,r,i())}}}),Ik=JB;function QB(e){return Uo(e)&&!zt(e[0])}function LM(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),zt(e.format)?u.key=e.format:qn(e.format)&&(zt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((h,m)=>n.includes(m)?us(io(),h,{[m]:e.format[m]}):h,io()));const d=o(e.value,u,c);let f=[u.key];return Uo(d)?f=d.map((h,m)=>{const v=s[h.type],k=v?v({[h.type]:h.value,index:m,parts:d}):[h.value];return QB(k)&&(k[0].key=`${h.type}-${m}`),k}):zt(d)&&(f=[d]),f},l=us(io(),i),a=zt(e.tag)||qn(e.tag)?e.tag:IM();return qn(a)?tn(a,l,{default:r}):tn(a,l,r())}}const eH=et({name:"i18n-n",props:us({value:{type:Number,required:!0},format:{type:[String,Object]}},ny),setup(e,t){const n=e.i18n||Nt({useScope:e.scope,__useComponent:!0});return LM(e,t,_M,(...o)=>n[e3](...o))}}),Lk=eH;function tH(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 nH(e){const t=r=>{const{instance:l,value:a}=r;if(!l||!l.$)throw Hi(_i.UNEXPECTED_ERROR);const u=tH(e,l.$),c=$k(a);return[Reflect.apply(u.t,u,[...Nk(c)]),u]};return{created:(r,l)=>{const[a,u]=t(l);Lm&&(r.__i18nWatcher=Je(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=u,r.textContent=a},unmounted:r=>{Lm&&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=$k(l);r.textContent=Reflect.apply(a.t,a,[...Nk(u)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function $k(e){if(zt(e))return{path:e};if($n(e)){if(!("path"in e))throw Hi(_i.REQUIRED_VALUE,"path");return e}else throw Hi(_i.INVALID_VALUE)}function Nk(e){const{path:t,locale:n,args:o,choice:s,plural:i}=e,r={},l=o||{};return zt(n)&&(r.locale=n),ls(s)&&(r.plural=s),ls(i)&&(r.plural=i),[t,l,r]}function oH(e,t,...n){const o=$n(n[0])?n[0]:{};(Un(o.globalInstall)?o.globalInstall:!0)&&([Ik.name,"I18nT"].forEach(i=>e.component(i,Ik)),[Lk.name,"I18nN"].forEach(i=>e.component(i,Lk)),[Ok.name,"I18nD"].forEach(i=>e.component(i,Ok))),e.directive("t",nH(t))}const sH=ru("global-vue-i18n");function iH(e={}){const t=__VUE_I18N_LEGACY_API__&&Un(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Un(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,i]=rH(e,t),r=ru("");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),$n(f[0])){const v=f[0];c.__composerExtend=v.__composerExtend,c.__vueI18nExtend=v.__vueI18nExtend}let h=null;!t&&n&&(h=pH(d,c.global)),__VUE_I18N_FULL_INSTALL__&&oH(d,c,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(YB(i,i.__composer,c));const m=d.unmount;d.unmount=()=>{h&&h(),c.dispose(),m()}},get global(){return i},dispose(){s.stop()},__instances:o,__getInstance:l,__setInstance:a,__deleteInstance:u};return c}function Nt(e={}){const t=vp();if(t==null)throw Hi(_i.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Hi(_i.NOT_INSTALLED);const n=lH(t),o=uH(n),s=TM(t),i=aH(e,s);if(i==="global")return EM(o,e,s),o;if(i==="parent"){let a=Fk(n,t,e.__useComponent);return a==null&&(a=o),a}if(i==="isolated"){if(n.mode!=="composition")throw Hi(_i.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,u=us({},e),c=Fk(n,t);u.__root=c||o;const d=Nm(u);return a.__composerExtend&&(d[bd]=a.__composerExtend(d)),Kg()&&d1(()=>{const h=d[bd];h&&(h(),delete d[bd])}),d}const r=n;let l=r.__getInstance(t);if(l==null){const a=us({},e);"__i18n"in s&&(a.__i18n=s.__i18n),o&&(a.__root=o),l=Nm(a),r.__composerExtend&&(l[bd]=r.__composerExtend(l)),dH(r,t,l),r.__setInstance(t,l)}return l}function rH(e,t){const n=ER(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>t3(e)):n.run(()=>Nm(e));if(o==null)throw Hi(_i.UNEXPECTED_ERROR);return[n,o]}function lH(e){const t=nn(e.isCE?sH:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Hi(e.isCE?_i.NOT_INSTALLED_WITH_PROVIDE:_i.UNEXPECTED_ERROR);return t}function aH(e,t){return o2(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function uH(e){return e.mode==="composition"?e.global:e.global.__composer}function Fk(e,t,n=!1){let o=null;const s=t.root;let i=cH(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[MM]&&(o=null))}if(o!=null||s===i)break;i=i.parent}return o}function cH(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function dH(e,t,n){dn(()=>{},t),bn(()=>{const o=n;e.__deleteInstance(t);const s=o[bd];s&&(s(),delete o[bd])},t)}const fH=["locale","fallbackLocale","availableLocales"],Rk=["t","rt","d","n","tm","te"];function pH(e,t){const n=Object.create(null);return fH.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i)throw Hi(_i.UNEXPECTED_ERROR);const r=Xo(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,Rk.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i||!i.value)throw Hi(_i.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,i)}),()=>{delete e.config.globalProperties.$i18n,Rk.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const hH=et({name:"i18n-d",props:us({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},ny),setup(e,t){const n=e.i18n||Nt({useScope:e.scope,__useComponent:!0});return LM(e,t,wM,(...o)=>n[Q4](...o))}}),Ok=hH;qB();SB(rB);AB(wB);MB(Z4);if(__INTLIFY_PROD_DEVTOOLS__){const e=Xu();e.__INTLIFY__=!0,lB(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const mH={preview:"Preview",confirm:"Confirm",cancel:"Cancel",close:"Close",dismiss:"Dismiss",loading:"Loading",copy:"Copy"},gH={authBannerMessage:"Not signed in · Sign in to Kimi Code to start a conversation",authBannerLogin:"Sign in",connecting:"Connecting…",internalBuildBanner:"Internal testing only",menuFile:"File",menuEdit:"Edit",menuView:"View",menuHelp:"Help",applicationMenu:"Application menu"},vH={workspaceMeta:"workspace · {branch}",sessionsHeader:"sessions",workspaces:"Workspaces",viewSwitcher:"View options",viewGroup:"View",viewFlat:"Flat list",viewGrouped:"Group by workspace",collapseAll:"Collapse all workspaces",expandAll:"Expand all workspaces",newSession:"New Session",newChat:"New Session",newWorkspace:"New Workspace",dropToAddWorkspace:"Drop to add workspace",emptyState:"No sessions yet · click New Session to start",options:"Options",rename:"Rename",setEmoji:"Set Emoji…",sessionEmojiTitle:"Pick an emoji",removeEmoji:"Remove emoji",randomEmoji:"Random",searchEmoji:"Search emoji",recentEmojis:"Recently used",noEmojiResults:"No matching emoji",emojiGroupFaces:"Smileys & People",emojiGroupNature:"Animals & Nature",emojiGroupFood:"Food & Drink",emojiGroupActivity:"Activities & Travel",emojiGroupObjects:"Objects & Work",emojiGroupSymbols:"Symbols & Status",copyPath:"Copy path",copySessionId:"Copy session ID",copied:"Copied ✓",copyFailed:"Copy failed",archive:"Archive",archiveToastUndo:"Undo",archiveToastMid:"or view archived chats in",archiveToastSettings:"Settings",archiveToastTail:"",fork:"Fork session",export:"Export session",pin:"Pin",unpin:"Unpin",pinned:"Pinned",collapsePinned:"Collapse pinned",expandPinned:"Expand pinned",delete:"Delete",removeWorkspace:"Remove workspace",brand:"Kimi Code",signedIn:"Signed in",signOut:"Sign out",notSignedIn:"Not signed in",signIn:"Sign in",defaultUserName:"Kimi User",upgrade:"Upgrade",logoutConfirmTitle:"Sign out",logoutConfirmMessage:"Are you sure you want to sign out?",language:"Language",backendTitle:"Backend {backend} · {endpoint} — click to switch",noSessions:"No conversations yet",allPinned:"{count} conversations pinned",showMore:"Show more",loadMore:"Load more",showLess:"Show less",loadingMore:"Loading…",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",searchPlaceholder:"Search sessions",search:"Search",searchHint:"↑↓ navigate · ↵ open · Esc close",searchHintSelect:"navigate",searchHintOpen:"open",searchHintClose:"close",searchClear:"Clear search",searchNoResults:"No matching sessions",searchEmpty:"No sessions yet",update:"Upgrade",updateAvailable:"v{version} available",updateDownloading:"Downloading… {percent}%",updateReady:"v{version} ready",updateDone:"Restart",updateFailed:"Download failed",updateRetry:"Retry",updateDownloadNow:"Download & Update",updateSkip:"Skip This Version",updateRestartNow:"Restart Now",updateRestartLater:"Later",updateReleaseDate:"Released {date}",updateCurrentVersion:"Current v{version}",updateWhatsNew:"What’s new",updateBackground:"Download in Background",updateAutoDownload:"Automatically download and install updates"},yH={switcherTitle:"Switch workspace",switchTooltip:"Switch workspace",eyebrow:"Workspace",branchLabel:"branch: {branch}",noBranch:"no branch",sessionCount:"{count} session | {count} sessions",allWorkspaces:"All workspaces",currentWorkspace:"Current workspace only",addWorkspace:"Add workspace…",noWorkspace:"No workspace",deleteHasSessions:"This workspace still has sessions — archive them before deleting it",removeWorkspaceConfirm:'Remove workspace "{name}"?',swarmEnableTitle:"Enable swarm mode?",swarmEnableConfirm:"The agent will run multiple sub-agents in parallel.",goalStartTitle:"Start goal?",goalStartConfirm:'"{objective}" — the agent will run autonomously toward it.',scopeCurrent:"this workspace",scopeAll:"all workspaces",newInGroup:"New session in this workspace",addTitle:"Add workspace",pathLabel:"Path",pathPlaceholder:"/absolute/path/to/project",recentLabel:"Recent folders",add:"Add",cancel:"Cancel",addHint:"Paste an absolute folder path, or pick a recent one.",addFailed:"Couldn't open this folder. Check the path and try again.",requiredTitle:"Choose a workspace first",requiredMessage:"Pick a folder to use as your workspace before sending a message.",openThisFolder:"Open this folder",up:"Up",browsing:"Browsing…",filterPlaceholder:"Filter subfolders…",searchPlaceholder:"Fuzzy-search under this folder…",searching:"Searching…",pasteToggle:"Enter an absolute path",noFilterMatch:"No subfolders match “{q}”",noSubfolders:"No subfolders here",browseHint:'Click a folder to enter it, then "Open this folder" to add it as a workspace.',attentionTitle:"{count} item needs your attention | {count} items need your attention",awaitingAnswer:"Answer",awaitingAnswerTitle:"A question is waiting for your answer",awaitingPermission:"Approve",awaitingPermissionTitle:"An action is waiting for your approval",aborted:"Failed",abortedTitle:"This session's latest turn ended on an error"},kH={jumpToLatestAria:"Jump to latest message",toc:"Conversation outline",newMessages:"Latest messages",loading:"Loading…",starting:"Starting conversation…",requesting:"Requesting…",working:"Working…",workingRetry:"Model request failed — retrying ({n}/{max})…",emptyWorkspaceHint:"Send in {name}",switchWorkspace:"Switch workspace",addWorkspace:"New workspace",moreWorkspaces:"More workspaces ({count})",pickFolder:"Choose folder…",compacting:"Compacting context…",compactedPlain:"Context compacted",compactedAuto:"Context auto-compacted",compactedTokens:" ({before} → {after} tokens)",viewSummary:"View summary",summaryTitle:"Compaction summary",activatedSkill:"Activated skill: {name}",undo:"Undo",undoTooltip:"Undo edit",undoConfirm:"Undo last message?",escUndoHintPre:"Press",escUndoHintPost:"again to undo",undone:"Undone — the message is back in the composer",turnInterrupted:"Manually stopped",turnFailed:"Model request failed — this turn was interrupted",turnFailedMaxSteps:"Step limit reached — this turn was interrupted",turnFailedResume:"Continue",turnFailedResumeText:"Continue",yesterday:"Yesterday",loadOlder:"Load earlier messages",loadingOlder:"Loading earlier messages…",widenTable:"Widen table",restoreTableWidth:"Restore default width",cron:{fired:"Scheduled reminder fired",missed:"Missed scheduled reminders",job:"job {id}",oneShot:"one-shot",coalesced:"{n} fires coalesced",missedCount:"{n} missed",finalDelivery:"final delivery",expand:"Show more",collapse:"Show less"},fold:{worked:"Worked {duration}",workedUnknown:"Work details"},turnFiles:{titleOne:"{number} file changed",titleOther:"{number} files changed",more:"{number} more files",moreOne:"1 more file",showLess:"Show less",diffTitle:"Changes this turn",diffUnavailable:"This file’s changes can’t be shown line by line",openFile:"Open file"},goal:{continuation:"Goal continuation"},notification:{kindTask:"Background task",kindSubagent:"Subagent",title:{completed:"{kind} completed",failed:"{kind} failed",timed_out:"{kind} timed out",killed:"{kind} killed",lost:"{kind} lost",info:"{kind} notification"},status:{completed:"completed",failed:"failed",timed_out:"timed out",killed:"killed",lost:"lost",info:"info"},groupTitle:"{n} notifications",copyPath:"Copy path",copied:"Copied",rawPayload:"Raw payload",fields:{type:"Type",source:"Source",severity:"Severity"}},userMessage:{expand:"Show more",collapse:"Show less"},search:{placeholder:"Search chat…",searching:"Searching…",results:"{current}/{total} results",resultsCapped:"{current}/{total}+ results",noResults:"No results",previous:"Previous match",next:"Next match",close:"Close search"}},bH={connectionConnected:"Connected",connectionConnecting:"Connecting…",connectionDisconnected:"Disconnected",ctxTooltip:"Used {used} / {max} tokens ({pct}%)",modelLabel:"Model",permissionManual:"Manual",permissionAuto:"Auto",permissionYolo:"YOLO",permissionManualDesc:"Ask for approval on every tool action",permissionAutoDesc:"Fully autonomous — agent decides everything without asking",permissionYoloDesc:"Auto-approve tool actions, but agent may still ask questions",planLabel:"Plan",planDesc:"Have the agent make a plan before changing files",planOn:"on",planOff:"off",planTooltip:"Toggle plan mode (research before editing)",modesLabel:"Mode",goalLabel:"Goal",goalDesc:"Track one objective until it is complete",swarmLabel:"Swarm",swarmDesc:"Run parallel agents for broader exploration",modeOff:"Off",goalPlaceholder:"What should the agent achieve?",goalStart:"Start",goalPause:"Pause",goalResume:"Resume",goalCancel:"Cancel",goalCancelConfirm:"Cancel this goal? It cannot be resumed afterwards.",goalCancelConfirmYes:"Yes",goalCancelConfirmNo:"No",goalDoneWhen:"Done when",goalStatusActive:"Active",goalStatusPaused:"Paused",goalStatusBlocked:"Blocked",goalStatusComplete:"Complete",modeNotSupported:"Not supported",thinkingLabel:"Thinking",thinkingTooltip:"Toggle thinking mode",thinkingOn:"On",thinkingOff:"Off",cacheNote:"Note: Switching models or thinking effort invalidates the existing prompt cache. Start a new chat to avoid extra token costs.",starredModels:"Starred",moreModels:"More models…",statusPanelTitle:"Session status",statusPanelClose:"Close",statusModel:"Model",statusThinking:"Thinking",statusPermission:"Permission",statusPlanMode:"Plan mode",statusSwarmMode:"Swarm mode",swarmOn:"on",swarmOff:"off",statusContext:"Context",statusCost:"Cost",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"Running…",activityAwaitingApproval:"Awaiting approval",activityAwaitingQuestion:"Awaiting answer",interrupt:"Interrupt",runningShort:"in progress"},CH={placeholder:"Type a message…",send:"Send ↵",queueLabel:"Queue",placeholderRunning:"Press Enter to queue · Ctrl+S to inject into the running turn",starting:"Sending…",queueAutoDrain:"sends automatically when the current turn ends",queueNext:"Up next",queueDragTitle:"Drag to reorder",editQueued:"Edit (load back into the input)",queuedAttachments:"attachment ×{n}",queuedHasImage:"Contains {n} image(s) — remove only, not editable",attachmentImage:"Image",attachmentVideo:"Video",attachmentFile:"File",attachmentOpenUnsupported:"Can’t open {name} — this file type isn’t supported",dropToAttach:"Drop files to attach",remove:"Remove",removeNamed:"Remove {name}",clearAll:"Clear all attachments",attachmentCount:"{n} attachments",uploading:"Uploading",uploadFailed:"Upload failed",attachFile:"Attach file",previewAttachment:"Preview {name}",interrupt:"Interrupt",interruptTitle:"Interrupt current operation",expandTitle:"Expand input for multi-line editing",collapseTitle:"Collapse input",emptyConversationTitle:"Kimi Code",emptyConversation:"No messages yet — type below to start the conversation",upgradeBanner:"Upgrade your Kimi account to use Kimi Code",quickStartPlaceholder:"Type a message to start a new conversation…",thinkingSuffix:" · thinking",thinkingSuffixEffort:" · {level}"},wH={title:"Sign in to Kimi Code",close:"Close (Esc)",starting:"Starting sign-in flow…",lead:"Click the button below to sign in from a new browser tab.",authorizeInBrowser:"Sign in via browser",orDivider:"or",fallbackPrefix:"On another device? Open ",fallbackSuffix:" and enter the device code:",copy:"Copy",copied:"Copied",copyLink:"Copy link",waitingAuth:"Waiting for sign-in",waitingAutoClose:"Waiting for sign-in, closes automatically…",success:"Signed in",successHint:"Loading, will close automatically…",expiredTitle:"Device code expired",expiredHint:"Please restart the sign-in flow",retry:"Retry",closeBtn:"Close",errorTitle:"The current version does not support login yet",errorHint:"Please upgrade kimi-code and try again",pollErrorTitle:"Lost connection",pollErrorHint:"Sign-in polling failed repeatedly. Check the kimi-code process and try again.",action:"Sign in",requiredTitle:"Sign in required",requiredMessage:"Sign in to your Kimi account and set up a model to start chatting.",goToLogin:"Sign in",upgradeRequiredTitle:"Upgrade required",upgradeRequiredMessage:"Your account is on the free plan. Upgrade to a membership to start chatting with Kimi models."},_H={title:"Provider management",loading:"Loading providers…",unavailable:"Provider management is not available yet",empty:"No providers yet",status:{connected:"Connected",error:"Error",unconfigured:"Not configured"},keySet:"key set",keyNotSet:"key not set",managedBadge:"OAuth",modelCount:"{count} models",confirmDelete:"Confirm delete?",refresh:"Refresh",delete:"Delete",refreshTitle:"Refresh {type}",deleteTitle:"Delete {type}",loginKimi:"Sign in to Kimi",loginAnthropic:"Sign in to Anthropic",addProvider:"Add provider",added:"Provider added",enterApiKey:"Enter API Key",optional:"Optional",apiKeyRequired:"API Key cannot be empty",fieldId:"Name",fieldType:"API Protocol",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"Signed in with OAuth",apiKeySet:"Set — enter a new key to replace",showApiKey:"Show API key",hideApiKey:"Hide API key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"Models",colModelId:"Model ID",colContext:"Context",colDisplayName:"Display name",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"Optional",noModels:"No models",addModel:"Add model",removeModel:"Remove model",fieldDefaultModel:"Default model",save:"Save",saved:"Provider saved",deleteProvider:"Delete provider",deleteConfirm:"Delete {id} and its {count} models?",deleteConfirmYes:"Delete",managedHint:"Managed providers sign in and out on the Account tab",unsavedGuard:"You have unsaved changes.",guardStay:"Keep editing",guardDiscard:"Discard",add:"Add",catalog:{sourceCatalog:"From directory",sourceManual:"Manual",sourceRegistry:"Registry",registryHint:"Import providers and models from an api.json registry; re-importing the same URL refreshes it",registryUrlLabel:"Registry URL",registryImported:"{count} providers imported",searchPlaceholder:"Search providers",loading:"Loading directory…",loadError:"Failed to load the directory. Check your network and retry.",retry:"Retry",empty:"No matching providers",rejected:"Not importable",rejectReason:{"unknown-explicit-type":"Unsupported protocol","proprietary-sdk":"Proprietary SDK — cannot be imported","empty-base-url":"Blank base URL","placeholder-base-url":"Endpoint contains an env placeholder"},backToList:"Back to directory",willImport:"{count} models will be imported from the directory",overwriteWarning:"A provider with this name already exists; importing overwrites its config and models",importAction:"Import"},error:{idRequired:"Name cannot be empty",idInvalid:'Name must start with a letter or digit and may only contain letters, digits, "-", "_" and spaces',apiKeyRequired:"API Key cannot be empty",baseUrlRequired:"Base URL cannot be empty",registryUrlRequired:"Registry URL cannot be empty",modelRequired:"Model ID cannot be empty",contextSizeRequired:"Max context size cannot be empty",contextSizeInvalid:"Max context size must be a positive integer"},hintClose:"Close"},xH={dialogLabel:"Switch model",title:"Switch model",close:"Close (Esc)",allTab:"All",providerTabs:"Model providers",searchPlaceholder:"Search models or providers…",clearSearch:"Clear search",loading:"Loading models…",unavailable:"Model list is unavailable",contextSuffix:"{size} ctx",capabilityImageInput:"Image input",capabilityVideoInput:"Video input",capabilityToolUse:"Tool use",capabilityThinking:"Thinking",capabilityAlwaysThinking:"Always thinking",emptyNoModels:"No models available",emptyNoMatch:"No matching models",starTitle:"Add to favorites",unstarTitle:"Remove from favorites",hintNavigate:"Navigate",hintSelect:"Select",hintClose:"Close"},SH={justNow:"just now"},AH={title:{shell:"Run command?",diff:"Apply changes?",file:"Write file?",fileop:"File operation?",url:"Fetch URL?",search:"Search?",invocation:"Invoke?",todo:"Update todo?",plan_review:"Ready to build with this plan?",generic:"Approve action?"},subagentBadge:"sub agent · {name}",danger:"Danger: {detail}",searchQueryLabel:"query",searchScope:"scope: {scope}",feedbackPlaceholder:"Explain why you are rejecting… (Enter to submit, Esc to cancel)",feedbackHint:"Enter to submit · Esc to cancel",approve:"Approve",approveSession:"Approve for session",reject:"Reject",feedback:"Feedback",feedbackSubmit:"Reject with feedback",feedbackCancel:"Cancel",approvePlan:"Approve plan",revise:"Revise",rejectAndExit:"Reject and Exit",expandPlan:"Expand",collapsePlan:"Collapse"},MH={back:"‹ Previous question",nextQuestion:"Next question ›",otherDefault:"Other…",submit:"Submit",dismiss:"Dismiss",minimize:"Minimize",expand:"Expand",hint:"↑↓ to choose · Enter to confirm"},TH={tag:"tasks",summary:"{run} running · {done} done",copy:"Copy",calling:"Calling {label}",fieldTask:"Task",fieldOutput:"Output",fieldProgress:"Progress",fieldResult:"Result",moreLines:"… ({count} more)",copied:"Copied",stop:"stop",defaultDescription:"Background task",dockTasks:"Background tasks",dockBash:"Bash",dockSubagent:"Sub Agent",dockTodos:"Todos",running:"running",closePanel:"Close panel",timingRunning:"Running · {time}",timingDone:"Done · {sec}s",emptyTasks:"No background tasks running",emptyBash:"No bash tasks running",emptySubagent:"No sub agent tasks running",emptyTodo:"No todos yet",openTab:"Open the tasks tab",openDetail:"Open",collapse:"Collapse",expand:"Expand",transcriptLoadError:"Failed to load this sub agent’s conversation."},EH={panelTitle:"Thinking",streaming:"Thinking…",close:"Close"},IH={title:"Changes",branch:"branch",aheadTitle:"ahead of remote",behindTitle:"behind remote",fileCountOne:"{number} file",fileCountOther:"{number} files",empty:"No git changes",clean:"Working tree clean, no changes",back:"Back",loading:"Loading diff…",noDiff:"No line changes for this file",emptyFile:"Empty file",list:"List",tree:"Tree",close:"Close"},LH={},$H={empty:"Select a file on the left to preview",loading:"Loading…",lineCount:"{count} lines",copy:"Copy",copied:"Copied",copyPath:"Copy path",openInEditor:"Open",reveal:"Reveal",download:"Download",close:"Close",search:"Search",prevMatch:"Previous match",nextMatch:"Next match",htmlMode:"HTML preview mode",markdownMode:"Markdown preview mode",preview:"Preview",source:"Source",imageFit:"Image sizing",fit:"Fit",actual:"Actual",pdfNoPreview:"This PDF cannot be embedded here. Download it to view.",imageNoPreview:"Image file · {mime} · {size} · preview unavailable",binaryNoPreview:"Binary file · {mime} · {size} bytes · preview unavailable",unknownType:"unknown type",copyCode:"Copy code",enlargeImage:"Enlarge image",errors:{emptyPath:"File path is empty",unsupportedPath:"URLs and remote paths cannot be previewed",outsideWorkspace:"Only files inside the current workspace can be previewed",isDirectory:"Select a file instead of a directory",notFound:"File no longer exists or was moved",tooLarge:"File is too large to preview",loadFailed:"Unable to read this file"}},NH={searching:"Searching…",noMatch:"No matches"},FH={dismiss:"Close",errorLabel:"Error",noteLabel:"Note",agentWarningFallback:"agent warning",unhandledEvent:"Unhandled event: {type}",agentError:{title:"Model request failed",connection:"Cannot connect to the model service",auth:"Model authentication failed",rateLimit:"Model rate limit reached",overloaded:"Model overloaded",filtered:"Response filtered by the provider",api:"Model API error",contextOverflow:"Context size exceeded"},details:{cause:"Cause",code:"Error code",connection:"Connection",contentType:"Content type",details:"Server details",duration:"Duration",endpoint:"Endpoint",errorName:"Error type",message:"Message",operation:"Operation",phase:"Failure phase",request:"Request",requestId:"Request ID",responsePreview:"Response preview",sessionId:"Session ID",stack:"Stack",status:"HTTP status",timeout:"Timeout",timestamp:"Time"},daemonApiTitle:"Kimi server returned an error",daemonNetworkMessage:"Web did not receive a response from the Kimi server. Check that it is still running, or refresh the page.",daemonNetworkTitle:"Cannot connect to Kimi server",diagnostics:"Diagnostics",hideDetails:"Hide details",operationFailedMessage:"The last operation did not finish. Try again later.",operationFailedTitle:"Operation failed",sessionSnapshotMessage:"Web could not load the current conversation. Check that the Kimi server is still running, or refresh the page.",sessionSnapshotTitle:"Cannot load current conversation",showDetails:"Show details",copyDetails:"Copy diagnostics",copied:"Copied",wsTitle:"Realtime connection error",goal:{alreadyExists:"This session already has an active goal. Cancel it before starting a new one.",notFound:"No goal to act on — it may have already finished or been cancelled.",statusInvalid:"The current goal state does not allow this action.",notResumable:"This goal cannot be resumed (it may be cancelled or completed).",objectiveTooLong:"The objective is too long. Please shorten it and try again."}},RH={new:{desc:"Create a new session"},clear:{desc:"Clear and start a new session"},login:{desc:"Sign in to Kimi in the browser"},plan:{desc:"Toggle plan mode on/off"},swarm:{desc:"Toggle swarm mode; /swarm runs a task in swarm"},goal:{desc:"Create/control a goal: /goal , /goal pause{'|'}resume{'|'}cancel"},btw:{desc:"Side chat: /btw asks a forked side session"},yolo:{desc:"Auto-approve tool actions; the agent may still ask questions"},auto:{desc:"Fully autonomous — the agent never asks questions"},thinking:{desc:"Set the thinking level"},compact:{desc:"Compact the conversation history"},fork:{desc:"Fork this session into a new one"},export:{desc:"Download this session and troubleshooting logs as a ZIP",noSession:"Open a session before exporting it."},status:{desc:"View session status"},undo:{desc:"Undo the last message"}},OH={label:{read:"Read",bash:"Run",edit:"Edit",write:"Write",grep:"Search",glob:"Find",ls:"List",web_fetch:"Fetch",search:"Search",todo:"Todo",task:"Task",swarm:"Swarm",ask_user:"Question",plan:"Plan",goal_create:"Start Goal",goal_get:"Read Goal",goal_budget:"Set Goal Budget",goal_update:"Update Goal"},swarm:{progress:"{done} / {total}",runningSub:"{count} in progress",doneSub:"{completed} completed · {failed} failed",phaseQueued:"Queued",phaseWorking:"Working",phaseSuspended:"Suspended",phaseCompleted:"Completed",phaseFailed:"Failed",waiting:"Waiting for subagents…"},chip:{lines:"{count} lines",results:"{count} results",files:"{count} files",edited:"edited",created:"created",todos:"{count} items"},disclosure:{expand:"Expand details",collapse:"Collapse details"},output:{waiting:"Waiting for output…",empty:"No output",saved:"Saved result"},plan:{review:{pending:"Pending review",approved:"Approved",rejected:"Rejected",cancelled:"Cancelled"},selectedOption:"Selected",feedback:"Feedback"},summary:{inScope:"{value} in {scope}"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"Status: {status}",budget:"{value} {unit}",turns:"{value} turns",tokens:"{value} tokens",milliseconds:"{value} ms",seconds:"{value} sec",minutes:"{value} min",hours:"{value} hr"},group:{countOther:"{count} tool call | {count} tool calls",typed:{read:{done:"Read {count} file | Read {count} files"},bash:{done:"Ran {count} command | Ran {count} commands"},grep:{done:"Searched {count} pattern | Searched {count} patterns"},search:{done:"Ran {count} web search | Ran {count} web searches"},glob:{done:"Matched {count} file pattern | Matched {count} file patterns"},ls:{done:"Listed {count} directory | Listed {count} directories"},web_fetch:{done:"Fetched {count} page | Fetched {count} pages"},edit:{done:"Made {count} edit | Made {count} edits"},write:{done:"Wrote {count} file | Wrote {count} files"}}},activity:{failedClause:" ({count} failed)",liveDonePrefix:"",busy:"Working…",doing:{read:"Reading {subject}",bash:"Running {subject}",grep:"Searching {subject}",search:"Searching {subject}",glob:"Matching {subject}",ls:"Listing {subject}",web_fetch:"Fetching {subject}",edit:"Editing {subject}",write:"Writing {subject}"}},ask:{dismissed:"Dismissed",answer:"{count} answer",answers:"{count} answers",answered:"Answered",more:"(+{count} more)",collected:"Collected your answers",question:"{count} question",questions:"{count} questions",freeInput:"(free text)",unanswered:"No answer"}},PH={resizeHandleAria:"Resize sidebar width",resizePreviewAria:"Resize preview panel width",detailPanelAria:"Detail panel"},DH={openSwitcher:"Switch session / workspace",openSettings:"Session settings",settingsTitle:"Session settings",groupSession:"Current session",groupApp:"App preferences",sheetLabel:"Sheet",closeSheet:"Close",tapToCycle:"tap to cycle",running:"running",idle:"idle",sessionCount:"{n} sessions",newSession:"New session",permManualSub:"confirm every tool",permAutoSub:"fully autonomous, never asks",permYoloSub:"auto-approve tools, may still ask",planModeSub:"Plan mode",swarmModeSub:"Swarm mode",archivedSessions:"Archived sessions",archivedSessionsSub:"Browse and restore archived sessions",archivedBack:"Back"},BH={colorSchemeLabel:"Appearance",light:"Moon bright",dark:"Moon dark",system:"System"},HH={continue:"Continue",back:"Back",skip:"Skip",welcome:{title:"Welcome to Kimi Code",subtitle:"The AI coding workbench for professional developers",languageLabel:"Language",themeLabel:"Appearance"},login:{title:"Configure Model",subtitle:"Choose the model service that powers Kimi Code. You can change it later in Settings",kimiTitle:"Sign in with Kimi",kimiHint:"Ready out of the box with Kimi membership benefits",recommended:"Recommended",customProviderTitle:"Add a custom provider",customProviderHint:"Bring your own API key for OpenAI-compatible and other services",loggedInTitle:"Logged in with Kimi",loggedInHint:"Your model service is ready to use",finish:"Finish",skip:"Skip for now"}},zH={title:"Settings",internalTest:"Internal Test",close:"Close (Esc)",tabs:{general:"General",agent:"Agent",account:"Account",providers:"Providers",advanced:"Advanced",archived:"Archived",shortcuts:"Hotkeys"},appearance:"Appearance",notifications:"Notifications",notifyEnabled:"System notifications",notifyEnabledHint:"Send a system notification when a turn completes, needs an answer, or needs approval",notifySound:"Notification sound",notifySoundHint:"Play the system sound with notifications",notifyDenied:"Blocked in browser settings",notifyTitle:"Kimi Code · Turn finished",notifyQuestionTitle:"Kimi Code · Needs answer",notifyApprovalTitle:"Kimi Code · Approval required",notifyFallback:"View result",notifyQuestionFallback:"A question is waiting for your answer",notifyApprovalFallback:"A tool needs your approval",account:"Account",signedIn:"Signed in",signedOutHint:"Sign in to view your account and model access",planUsage:{title:"Plan Usage",retry:"Retry",loadFailed:"Failed to load",empty:"No usage data yet",weekLimit:"Weekly limit",genericLimit:"Limit",hourLimit:"{n}h limit",dayLimit:"{n}d limit",minuteLimit:"{n}m limit",resetsIn:"resets in {duration}",resetDone:"reset",durationDay:"{n}d",durationHour:"{n}h",durationMinute:"{n}m",durationSecond:"{n}s",usedPct:"{pct}% used",boosterTitle:"Booster",boosterBalance:"Balance",monthlyUsed:"Used this month",monthlyLimit:"Monthly limit",unlimited:"Unlimited",freeTitle:"Free account",freeHint:"Upgrade to a membership to use Kimi models and see plan usage"},colorSchemeHint:"Choose the app’s light or dark appearance",appIcon:"Dock icon",appIconHint:"Choose the icon shown in the Dock",appIconDefault:"Default",appIconBlack:"Black",uiFontSize:"Font size",uiFontSizeHint:"Adjust interface and message text size",vibrancy:"Frosted sidebar",vibrancyHint:"Use the native macOS frosted-glass material behind the sidebar — turn it off if the translucency is hard to read",languageHint:"Choose the interface language",defaultOpenInApp:"Default open-in app",defaultOpenInAppHint:"App used when opening files and folders from the header menu",openWith:"Open with",agentDefaults:"Agent defaults",saving:"Saving",defaultModel:"Default model",defaultModelHint:"New sessions prefer this model",noDefaultModel:"No default model",defaultPermission:"Default permission",defaultPermissionHint:"Only affects newly-created sessions",defaultThinking:"Thinking by default",defaultThinkingHint:"Whether new sessions start with thinking enabled",defaultPlanMode:"Plan mode by default",defaultPlanModeHint:"Whether new sessions start in plan mode",secondaryModelSection:"Subagents",secondaryModel:"Subagent model",secondaryModelHint:"Model and thinking effort that subagents use by default",secondaryModelEffort:"Thinking effort",noSecondaryModel:"Not set (inherit primary)",secondaryModelEffortAuto:"Model default",telemetry:"Improve product with usage data",telemetryHint:"When on, we collect anonymous interaction data (such as clicks, interruptions, and feature usage) to improve the product experience. You can turn it off at any time.",telemetryRestartHint:"Takes effect after restarting the service.",credentialReady:"Credential configured",credentialMissing:"Missing credential",configUnavailable:"The server did not return config yet. These settings are unavailable.",versionAndUpdates:"Version & updates",appVersion:"App version",appVersionHint:"The running app’s version and build time",checkUpdate:"Check for updates",checkUpdateHint:"Manually check whether a new version is available",checkUpdateBtn:"Check now",updateChecking:"Checking…",updateCheckLatest:"You’re on the latest version",updateCheckAvailable:"Version {version} is available — download it from the update entry in the sidebar",updateCheckUnsupported:"This build does not support update checks",updateCheckFailed:"Check failed. Please try again later.",updateCheckAvailableAuto:"Version {version} found — downloading in the background",updateCheckDownloaded:"Version {version} is ready — restart from the update entry in the sidebar",autoDownloadUpdate:"Auto-download updates",autoDownloadUpdateHint:"Download new versions in the background and install them on the next restart",privacy:"Data & privacy",diagnostics:"Diagnostics",build:"Build",serverVersion:"Server version",serverAddress:"Server address",serverAddressHint:"The address of the connected server",serverVersionHint:"The version of the connected service",exportLog:"Troubleshooting log",exportLogHint:"Export the troubleshooting log collected by the app",logHint:"Enable with ?debug=1 to capture",exportLogBtn:"Export log",archivedTitle:"Archived sessions",archivedDesc:"Browse archived sessions, see their workspace path, name, and archive time, and restore them to the session list.",archivedSearch:"Search archived sessions",archivedAllWorkspaces:"All workspaces",archivedSortLabel:"Sort by",archivedSortArchived:"Archive time",archivedSortCreated:"Created time",archivedSortName:"Name",archivedRestore:"Restore",archivedEmpty:"No archived sessions yet",archivedNoMatch:"No matching archived sessions",archivedSessionsCount:"{count} sessions",archivedAt:"Archived {time}",archivedLoadMore:"Load more",archivedLoading:"Loading…",archivedLoadingAll:"Loading all archived sessions…"},WH={openInEditor:"Open in editor",openInEditorShort:"Open",openInApp:"Open in {app}",chooseOpenApp:"Choose application",copyAll:"Copy all as Markdown",copyFinalSummary:"Copy final summary",copied:"Copied",lastUsed:"Last used",copyPath:"Copy path",changed:"{n} changed",gitTooltip:"Open Files > Changed",detached:"detached",openPr:"Open pull request",prStatusOpen:"open",prStatusClosed:"closed",prStatusMerged:"merged",prStatusDraft:"draft",prStatusUnknown:"unknown",options:"Options",copySessionId:"Copy session ID",renameSession:"Rename",forkSession:"Fork session",archiveSession:"Archive",exportSession:"Export session",devBadge:"Running in development mode"},UH={title:"Side chat",subtitle:"forked from this session",empty:"Ask a quick question on the side — it shares this session’s context.",placeholder:"Ask the side chat…",send:"Send"},jH={actions:{summonApp:{label:"Show App Window",desc:"Bring the app window to the foreground from anywhere"},newSession:{label:"New Session",desc:"Start a new session in the current workspace"},searchSessions:{label:"Search Chats",desc:"Open the session search dialog"},archiveSession:{label:"Archive Chat",desc:"Archive the current chat right away"},toggleSideChat:{label:"Toggle Side Chat",desc:"Open or close the /btw side chat"},toggleSidebar:{label:"Toggle Sidebar",desc:"Collapse or expand the session sidebar"},openFolder:{label:"Open Folder",desc:"Add a workspace folder with the native picker"},openInDefaultApp:{label:"Open in App",desc:"Open the workspace in your default editor/terminal"},openSettings:{label:"Open Settings",desc:"Show or hide the settings dialog"},toggleTerminal:{label:"Toggle Terminal",desc:"Show or hide the bottom terminal panel"},send:{label:"Send Message",desc:"Send the composer input"},newline:{label:"Newline",desc:"Insert a newline in the composer"}},searchPlaceholder:"Search shortcuts",unassigned:"Unassigned",unassign:"Unassign shortcut",edit:"Edit shortcut",reset:"Reset to default",resetAll:"Reset all to defaults",recording:"Press the new shortcut…",invalid:"This key combination can’t be used as a shortcut",notGlobal:"This key combination can’t be registered as a system-wide shortcut",globalTaken:"This shortcut is already taken by the system or another app",reserved:"Reserved by the system menu",reservedSteer:"Reserved for steer (Ctrl/Cmd+S)",reservedFind:"Reserved for transcript find (Ctrl/Cmd+F)",conflict:"Already used by “{action}”",customBadge:"Custom"},VH={panelAria:"Terminal",toolbarAria:"Terminal tabs",resizeAria:"Resize terminal panel height",toggle:"Toggle terminal",newTab:"New terminal",closeTab:"Close terminal",restartTab:"Restart terminal",collapse:"Collapse terminal panel",empty:"No terminal yet — click to start one",processExited:"[process exited]",processExitedWithCode:"[process exited with code {code}]"},qH={common:mH,app:gH,sidebar:vH,workspace:yH,conversation:kH,status:bH,composer:CH,login:wH,providers:_H,model:xH,sessions:SH,approval:AH,question:MH,tasks:TH,thinking:EH,diff:IH,fileTree:LH,filePreview:$H,mention:NH,warnings:FH,commands:RH,tools:OH,layout:PH,mobile:DH,theme:BH,onboarding:HH,settings:zH,header:WH,sideChat:UH,shortcuts:jH,terminal:VH},KH={preview:"预览",confirm:"确认",cancel:"取消",close:"关闭",dismiss:"关闭",loading:"加载中",copy:"复制"},ZH={authBannerMessage:"未登录 · 需要登录 Kimi Code 才能开始对话",authBannerLogin:"登录",connecting:"连接中…",internalBuildBanner:"仅供内部测试",menuFile:"文件",menuEdit:"编辑",menuView:"视图",menuHelp:"帮助",applicationMenu:"应用菜单"},GH={workspaceMeta:"workspace · {branch}",sessionsHeader:"会话",workspaces:"工作区",viewSwitcher:"视图选项",viewGroup:"视图",viewFlat:"平铺列表",viewGrouped:"按工作区分组",collapseAll:"折叠全部工作区",expandAll:"展开全部工作区",newSession:"新建会话",newChat:"新建会话",newWorkspace:"新建工作区",dropToAddWorkspace:"松开鼠标添加工作区",emptyState:"还没有会话 · 点击 新建会话 开始",options:"选项",rename:"重命名",setEmoji:"设置 Emoji…",sessionEmojiTitle:"选择 Emoji",removeEmoji:"移除 Emoji",randomEmoji:"随机",searchEmoji:"搜索 Emoji",recentEmojis:"最近使用",noEmojiResults:"没有匹配的 Emoji",emojiGroupFaces:"笑脸与人物",emojiGroupNature:"动物与自然",emojiGroupFood:"美食饮品",emojiGroupActivity:"活动与出行",emojiGroupObjects:"物品与工作",emojiGroupSymbols:"符号与状态",copyPath:"复制路径",copySessionId:"复制 Session ID",copied:"已复制 ✓",copyFailed:"复制失败",archive:"归档",archiveToastUndo:"撤销",archiveToastMid:"或到",archiveToastSettings:"设置",archiveToastTail:"查看已归档的会话",fork:"分叉会话",export:"导出会话",pin:"置顶",unpin:"取消置顶",pinned:"置顶",collapsePinned:"折叠置顶区",expandPinned:"展开置顶区",delete:"删除",removeWorkspace:"移除工作区",brand:"Kimi Code",signedIn:"已登录",signOut:"退出登录",notSignedIn:"未登录",signIn:"登录",defaultUserName:"Kimi 用户",upgrade:"升级",logoutConfirmTitle:"退出登录",logoutConfirmMessage:"确定要退出当前账号吗?",language:"语言",backendTitle:"后端 {backend} · {endpoint} — 点击切换",noSessions:"暂无对话",allPinned:"有 {count} 条对话被置顶",showMore:"展开更多",loadMore:"加载更多",showLess:"收起",loadingMore:"加载中…",collapseSidebar:"收起侧边栏",expandSidebar:"展开侧边栏",searchPlaceholder:"搜索会话",search:"搜索",searchHint:"↑↓ 选择 · ↵ 打开 · Esc 关闭",searchHintSelect:"选择",searchHintOpen:"打开",searchHintClose:"关闭",searchClear:"清除搜索",searchNoResults:"没有匹配的会话",searchEmpty:"暂无会话",update:"更新",updateAvailable:"发现新版本 v{version}",updateDownloading:"下载中… {percent}%",updateReady:"v{version} 已就绪",updateDone:"重启并更新",updateFailed:"下载失败",updateRetry:"重试",updateDownloadNow:"下载并更新",updateSkip:"本次跳过",updateRestartNow:"立即重启",updateRestartLater:"下次启动",updateReleaseDate:"发布于 {date}",updateCurrentVersion:"当前版本 v{version}",updateWhatsNew:"更新内容",updateBackground:"后台下载",updateAutoDownload:"以后自动下载并安装更新"},YH={switcherTitle:"切换工作区",switchTooltip:"切换工作区",eyebrow:"工作区",branchLabel:"分支: {branch}",noBranch:"无分支",sessionCount:"{count} 个会话",allWorkspaces:"全部工作区",currentWorkspace:"仅当前工作区",addWorkspace:"添加工作区…",noWorkspace:"暂无工作区",deleteHasSessions:"工作区内还有会话,请先归档这些会话再删除",removeWorkspaceConfirm:"移除工作区「{name}」?",swarmEnableTitle:"启用 swarm 模式?",swarmEnableConfirm:"Agent 将并行运行多个子 agent。",goalStartTitle:"启动 goal?",goalStartConfirm:"「{objective}」——Agent 将自主执行。",scopeCurrent:"当前工作区",scopeAll:"全部工作区",newInGroup:"在此工作区新建会话",addTitle:"添加工作区",pathLabel:"路径",pathPlaceholder:"/项目的绝对路径",recentLabel:"最近的文件夹",add:"添加",cancel:"取消",addHint:"粘贴一个绝对路径,或从最近用过的文件夹中选择。",addFailed:"无法打开此文件夹,请检查路径后重试。",requiredTitle:"请先选择工作空间",requiredMessage:"发送消息前,需要先选择一个文件夹作为工作区。",openThisFolder:"打开此文件夹",up:"上一级",browsing:"加载中…",filterPlaceholder:"过滤子文件夹…",searchPlaceholder:"在此目录下模糊搜索…",searching:"搜索中…",pasteToggle:"直接输入绝对路径",noFilterMatch:"没有匹配「{q}」的子文件夹",noSubfolders:"此处没有子文件夹",browseHint:'点击文件夹进入,再点"打开此文件夹"将其添加为工作区。',attentionTitle:"{count} 项待处理",awaitingAnswer:"待回答",awaitingAnswerTitle:"有提问等待你回答",awaitingPermission:"待授权",awaitingPermissionTitle:"有操作等待你授权",aborted:"失败",abortedTitle:"此会话的上一轮对话因错误中断"},XH={jumpToLatestAria:"跳到最新消息",toc:"对话目录",newMessages:"最新消息",loading:"加载中…",starting:"正在创建对话…",requesting:"请求中…",working:"工作中…",workingRetry:"模型请求失败,正在重试(第 {n}/{max} 次)…",emptyWorkspaceHint:"在 {name} 中发送",switchWorkspace:"切换工作区",addWorkspace:"添加工作区",moreWorkspaces:"更多工作区 ({count})",pickFolder:"选择文件夹…",compacting:"正在压缩上下文…",compactedPlain:"上下文已压缩",compactedAuto:"已自动压缩上下文",compactedTokens:"({before} → {after} tokens)",viewSummary:"查看摘要",summaryTitle:"压缩摘要",activatedSkill:"已激活技能: {name}",undo:"撤销",undoTooltip:"撤回编辑",undoConfirm:"撤销上一条消息?",escUndoHintPre:"再按",escUndoHintPost:"撤销本条",undone:"已撤销,原文已放回输入框",turnInterrupted:"已手动终止",turnFailed:"模型请求失败,本轮对话已中断",turnFailedMaxSteps:"达到本轮步数上限,对话已中断",turnFailedResume:"继续",turnFailedResumeText:"继续",yesterday:"昨天",loadOlder:"加载更早的消息",loadingOlder:"正在加载更早的消息…",widenTable:"加宽表格",restoreTableWidth:"恢复默认宽度",cron:{fired:"定时任务已触发",missed:"错过的定时提醒",job:"任务 {id}",oneShot:"单次",coalesced:"已合并 {n} 次触发",missedCount:"错过 {n} 次",finalDelivery:"最后一次投递",expand:"展开",collapse:"收起"},fold:{worked:"已工作 {duration}",workedUnknown:"工作过程"},turnFiles:{titleOne:"{number} 个文件已修改",titleOther:"{number} 个文件已修改",more:"还有 {number} 个文件",moreOne:"还有 1 个文件",showLess:"收起",diffTitle:"本次改动",diffUnavailable:"此文件的改动无法逐项展示",openFile:"打开文件"},goal:{continuation:"目标续跑"},notification:{kindTask:"后台任务",kindSubagent:"子代理",title:{completed:"{kind}完成",failed:"{kind}失败",timed_out:"{kind}超时",killed:"{kind}被终止",lost:"{kind}丢失",info:"{kind}通知"},status:{completed:"完成",failed:"失败",timed_out:"超时",killed:"已终止",lost:"丢失",info:"信息"},groupTitle:"{n} 条通知",copyPath:"复制路径",copied:"已复制",rawPayload:"原始 payload",fields:{type:"类型",source:"来源",severity:"严重度"}},userMessage:{expand:"展开",collapse:"收起"},search:{placeholder:"搜索对话…",searching:"搜索中…",results:"{current}/{total} 条结果",resultsCapped:"{current}/{total}+ 条结果",noResults:"无结果",previous:"上一个匹配",next:"下一个匹配",close:"关闭搜索"}},JH={connectionConnected:"已连接",connectionConnecting:"连接中…",connectionDisconnected:"未连接",ctxTooltip:"使用 {used} / {max} tokens ({pct}%)",modelLabel:"模型",permissionManual:"逐条确认",permissionAuto:"完全自主",permissionYolo:"自动通过",permissionManualDesc:"每个工具操作都需要你手动确认",permissionAutoDesc:"完全自主运行,智能体自己做决定,不再询问",permissionYoloDesc:"自动批准工具操作,但遇到关键问题仍会询问",planLabel:"计划",planDesc:"先让智能体梳理计划,再修改文件",planOn:"开",planOff:"关",planTooltip:"切换计划模式(先调研再修改)",modesLabel:"模式",goalLabel:"目标",goalDesc:"持续跟踪一个目标,直到任务完成",swarmLabel:"Swarm",swarmDesc:"并行运行多个智能体,适合大范围探索",modeOff:"未启用",goalPlaceholder:"让智能体完成什么目标?",goalStart:"开始",goalPause:"暂停",goalResume:"继续",goalCancel:"取消",goalCancelConfirm:"是否需要取消当前目标?取消后将无法恢复。",goalCancelConfirmYes:"是",goalCancelConfirmNo:"否",goalDoneWhen:"完成条件",goalStatusActive:"进行中",goalStatusPaused:"已暂停",goalStatusBlocked:"已阻塞",goalStatusComplete:"已完成",modeNotSupported:"暂不支持",thinkingLabel:"思考",thinkingTooltip:"切换思考模式",thinkingOn:"开",thinkingOff:"关",cacheNote:"提示:切换模型或思考程度会使已有的提示词缓存失效。建议新建会话,避免额外的 token 消耗。",starredModels:"收藏",moreModels:"更多模型…",statusPanelTitle:"会话状态",statusPanelClose:"关闭",statusModel:"模型",statusThinking:"思考强度",statusPermission:"权限",statusPlanMode:"计划模式",statusSwarmMode:"Swarm 模式",swarmOn:"开",swarmOff:"关",statusContext:"上下文",statusCost:"花费",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"运行中…",activityAwaitingApproval:"等待批准",activityAwaitingQuestion:"等待回答",interrupt:"中断",runningShort:"进行中"},QH={placeholder:"输入消息…",send:"发送 ↵",queueLabel:"队列",placeholderRunning:"输入会加入队列 · Ctrl+S 立即插入运行中的回合",starting:"正在发送…",queueAutoDrain:"当前回合结束后自动逐条发送",queueNext:"下一条",queueDragTitle:"拖拽排序",editQueued:"编辑(载入到输入框)",queuedAttachments:"附件 ×{n}",queuedHasImage:"包含 {n} 张图片 — 只能移除,不能编辑",attachmentImage:"图片",attachmentVideo:"视频",attachmentFile:"文件",attachmentOpenUnsupported:"无法打开 {name}:暂不支持此文件类型",dropToAttach:"松开鼠标添加附件",remove:"移除",removeNamed:"移除 {name}",clearAll:"清空全部附件",attachmentCount:"共 {n} 个附件",uploading:"上传中",uploadFailed:"上传失败",attachFile:"添加附件",previewAttachment:"预览 {name}",interrupt:"中断",interruptTitle:"中断当前操作",expandTitle:"展开输入框进行多行编辑",collapseTitle:"收起输入框",emptyConversationTitle:"Kimi Code",emptyConversation:"还没有消息 —— 在下方输入开始对话",upgradeBanner:"升级你的 Kimi 账户来使用 Kimi Code",quickStartPlaceholder:"输入消息开始新对话…",thinkingSuffix:" · 思考",thinkingSuffixEffort:" · {level}"},ez={title:"登录 Kimi Code",close:"关闭 (Esc)",starting:"正在启动登录流程…",lead:"点击下方按钮,在新标签页中完成登录。",authorizeInBrowser:"在浏览器中登录",orDivider:"或者",fallbackPrefix:"换个设备?在浏览器打开 ",fallbackSuffix:" 输入设备码:",copy:"复制",copied:"已复制",copyLink:"复制链接",waitingAuth:"等待登录",waitingAutoClose:"等待登录,完成后自动关闭…",success:"已登录",successHint:"正在加载,稍后自动关闭…",expiredTitle:"设备码已过期",expiredHint:"请重新开始登录流程",retry:"重试",closeBtn:"关闭",errorTitle:"当前版本暂不支持登录",errorHint:"请升级 kimi-code 后重试",pollErrorTitle:"连接已断开",pollErrorHint:"登录轮询连续失败,请检查 kimi-code 进程后重试",action:"登录",requiredTitle:"请先登录",requiredMessage:"登录 Kimi 账号并配置模型后,才能开始对话。",goToLogin:"去登录",upgradeRequiredTitle:"请升级会员",upgradeRequiredMessage:"当前为免费账户,升级会员后即可使用 Kimi 模型开始对话。"},tz={title:"供应商管理",loading:"加载提供商中…",unavailable:"暂不支持提供商管理",empty:"暂无提供商",status:{connected:"已连接",error:"错误",unconfigured:"未配置"},keySet:"key 已设置",keyNotSet:"未设置 key",managedBadge:"OAuth",modelCount:"{count} 个模型",confirmDelete:"确认删除?",refresh:"刷新",delete:"删除",refreshTitle:"刷新 {type}",deleteTitle:"删除 {type}",loginKimi:"登录 Kimi",loginAnthropic:"登录 Anthropic",addProvider:"添加供应商",added:"已添加",enterApiKey:"填写 API Key",optional:"可选",apiKeyRequired:"API Key 不能为空",fieldId:"名称",fieldType:"API 协议",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"OAuth 托管登录",apiKeySet:"已设置,输入以更换",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"模型",colModelId:"模型 ID",colContext:"上下文",colDisplayName:"显示名",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"可选",noModels:"暂无模型",addModel:"添加模型",removeModel:"移除模型",fieldDefaultModel:"默认模型",save:"保存",saved:"已保存",deleteProvider:"删除供应商",deleteConfirm:"确认删除 {id} 及其 {count} 个模型?",deleteConfirmYes:"确认删除",managedHint:"托管供应商在账户页登录 / 登出",unsavedGuard:"有未保存的修改。",guardStay:"继续编辑",guardDiscard:"丢弃",add:"添加",catalog:{sourceCatalog:"从目录添加",sourceManual:"手动添加",sourceRegistry:"注册表",registryHint:"从 api.json 注册表导入供应商与模型;同一 URL 重复导入即为刷新",registryUrlLabel:"注册表 URL",registryImported:"已导入 {count} 个供应商",searchPlaceholder:"搜索供应商",loading:"加载目录中…",loadError:"目录加载失败,请检查网络后重试",retry:"重试",empty:"没有匹配的供应商",rejected:"不可导入",rejectReason:{"unknown-explicit-type":"协议不受支持","proprietary-sdk":"私有协议,无法导入","empty-base-url":"Base URL 为空","placeholder-base-url":"端点包含环境变量占位符"},backToList:"返回目录列表",willImport:"将从目录导入 {count} 个模型",overwriteWarning:"已存在同名供应商,导入将覆盖其配置与模型",importAction:"导入"},error:{idRequired:"名称不能为空",idInvalid:'名称需以字母或数字开头,只能包含字母、数字、"-"、"_" 和空格',apiKeyRequired:"API Key 不能为空",baseUrlRequired:"Base URL 不能为空",registryUrlRequired:"注册表 URL 不能为空",modelRequired:"模型 ID 不能为空",contextSizeRequired:"上下文长度不能为空",contextSizeInvalid:"上下文长度需为正整数"},hintClose:"关闭"},nz={dialogLabel:"切换模型",title:"切换模型",close:"关闭 (Esc)",allTab:"全部",providerTabs:"模型提供商",searchPlaceholder:"搜索模型或提供商…",clearSearch:"清除搜索",loading:"加载模型中…",unavailable:"暂无可用模型列表",contextSuffix:"{size} ctx",capabilityImageInput:"图片输入",capabilityVideoInput:"视频输入",capabilityToolUse:"工具调用",capabilityThinking:"思考",capabilityAlwaysThinking:"始终思考",emptyNoModels:"暂无可用模型",emptyNoMatch:"无匹配模型",starTitle:"添加到收藏",unstarTitle:"取消收藏",hintNavigate:"导航",hintSelect:"选择",hintClose:"关闭"},oz={justNow:"刚刚"},sz={title:{shell:"运行命令?",diff:"应用修改?",file:"写入文件?",fileop:"文件操作?",url:"抓取 URL?",search:"搜索?",invocation:"调用?",todo:"更新 todo?",plan_review:"按这份 plan 开始实现?",generic:"批准操作?"},subagentBadge:"子 agent · {name}",danger:"危险: {detail}",searchQueryLabel:"查询",searchScope:"范围:{scope}",feedbackPlaceholder:"说明拒绝原因… (Enter 提交, Esc 取消)",feedbackHint:"Enter 提交 · Esc 取消",approve:"批准",approveSession:"本会话内批准",reject:"拒绝",feedback:"反馈",feedbackSubmit:"提交并拒绝",feedbackCancel:"取消",approvePlan:"批准 plan",revise:"修改",rejectAndExit:"拒绝并退出",expandPlan:"放大",collapsePlan:"还原"},iz={back:"‹ 上一题",nextQuestion:"下一题 ›",otherDefault:"其他…",submit:"提交",dismiss:"放弃",minimize:"最小化",expand:"展开",hint:"↑↓ 选择 · Enter 确认"},rz={tag:"任务",summary:"{run} 运行中 · {done} 完成",copy:"复制",calling:"调用 {label}",fieldTask:"任务",fieldOutput:"输出",fieldProgress:"进度",fieldResult:"结果",moreLines:"…(还有 {count} 行)",copied:"已复制",stop:"stop",defaultDescription:"后台任务",dockTasks:"后台任务",dockBash:"后台 Bash",dockSubagent:"子 Agent",dockTodos:"待办",running:"运行中",closePanel:"关闭面板",timingRunning:"运行中 · {time}",timingDone:"完成 · {sec}s",emptyTasks:"暂无后台任务",emptyBash:"暂无后台 Bash 任务",emptySubagent:"暂无子 Agent 任务",emptyTodo:"暂无待办事项",openTab:"查看全部后台任务",openDetail:"查看",collapse:"折叠",expand:"展开",transcriptLoadError:"无法加载这个子 Agent 的对话。"},lz={panelTitle:"思考过程",streaming:"思考中…",close:"关闭"},az={title:"改动",branch:"分支",aheadTitle:"领先远程",behindTitle:"落后远程",fileCountOne:"{number} 个文件",fileCountOther:"{number} 个文件",empty:"无 git 改动",clean:"工作区干净,无改动",back:"返回",loading:"正在加载 diff…",noDiff:"该文件没有行级改动",emptyFile:"空文件",list:"列表",tree:"树形",close:"关闭"},uz={},cz={empty:"选择左侧文件预览",loading:"加载中…",lineCount:"{count} 行",copy:"复制",copied:"已复制",copyPath:"复制路径",openInEditor:"打开",reveal:"显示",download:"下载",close:"关闭",search:"搜索",prevMatch:"上一个匹配",nextMatch:"下一个匹配",htmlMode:"HTML 预览模式",markdownMode:"Markdown 预览模式",preview:"预览",source:"源码",imageFit:"图片缩放",fit:"适应",actual:"原始",pdfNoPreview:"无法内嵌预览此 PDF,可以下载后查看",imageNoPreview:"图片文件 · {mime} · {size} · 暂不预览",binaryNoPreview:"二进制文件 · {mime} · {size} 字节 · 暂不预览",unknownType:"未知类型",copyCode:"复制代码",enlargeImage:"放大图片",errors:{emptyPath:"文件路径为空",unsupportedPath:"不支持预览 URL 或远程路径",outsideWorkspace:"只能预览当前 workspace 内的文件",isDirectory:"请选择具体文件,而不是目录",notFound:"文件不存在或已被移动",tooLarge:"文件过大,暂不支持预览",loadFailed:"无法读取这个文件"}},dz={searching:"搜索中…",noMatch:"无匹配"},fz={dismiss:"关闭",errorLabel:"错误",noteLabel:"提示",agentWarningFallback:"agent 警告",unhandledEvent:"未处理的事件:{type}",agentError:{title:"模型请求失败",connection:"无法连接模型服务",auth:"模型认证失败",rateLimit:"模型请求被限流",overloaded:"模型服务过载",filtered:"响应被提供方过滤",api:"模型接口返回错误",contextOverflow:"上下文超出模型限制"},details:{cause:"底层原因",code:"错误码",connection:"连接状态",contentType:"响应类型",details:"服务端详情",duration:"耗时",endpoint:"请求地址",errorName:"错误类型",message:"错误信息",operation:"操作",phase:"失败阶段",request:"请求",requestId:"Request ID",responsePreview:"响应预览",sessionId:"Session ID",stack:"堆栈",status:"HTTP 状态",timeout:"超时设置",timestamp:"时间"},daemonApiTitle:"Kimi 服务器返回错误",daemonNetworkMessage:"Web 没有拿到 Kimi 服务器的响应。请确认它仍在运行,或刷新页面重试。",daemonNetworkTitle:"无法连接到 Kimi 服务器",diagnostics:"诊断信息",hideDetails:"收起详情",operationFailedMessage:"刚才的操作没有完成,请稍后重试。",operationFailedTitle:"操作失败",sessionSnapshotMessage:"Web 没能加载当前会话内容。请确认 Kimi 服务器仍在运行,或刷新页面重试。",sessionSnapshotTitle:"无法加载当前会话内容",showDetails:"查看详情",copyDetails:"复制诊断信息",copied:"已复制",wsTitle:"实时连接出错",goal:{alreadyExists:"当前会话已有一个进行中的目标,请先取消它再创建新目标。",notFound:"没有找到可操作的目标,可能它已经结束或被取消。",statusInvalid:"当前目标状态不支持这个操作。",notResumable:"这个目标无法恢复(可能已取消或已完成)。",objectiveTooLong:"目标描述太长了,请精简后重试。"}},pz={new:{desc:"创建新会话"},clear:{desc:"清空并新建会话"},login:{desc:"在浏览器中登录 Kimi"},plan:{desc:"切换计划模式 开/关"},swarm:{desc:"切换 swarm 模式;/swarm <任务> 直接在 swarm 下执行"},goal:{desc:"创建/控制目标:/goal <目标>、/goal pause{'|'}resume{'|'}cancel"},btw:{desc:"侧边聊天:/btw <问题> 向 fork 的侧边会话提问"},yolo:{desc:"自动批准工具操作,Agent 仍可能提问"},auto:{desc:"完全自主,Agent 不再提问"},thinking:{desc:"设置思考强度"},compact:{desc:"压缩会话历史"},fork:{desc:"把当前会话 fork 出一个新会话"},export:{desc:"将当前会话和排障日志下载为 ZIP 压缩包",noSession:"请先打开一个会话再导出。"},status:{desc:"查看会话状态"},undo:{desc:"撤销上一条消息"}},hz={label:{read:"读取",bash:"运行",edit:"编辑",write:"写入",grep:"搜索",glob:"查找",ls:"列目录",web_fetch:"抓取",search:"搜索",todo:"待办",task:"任务",swarm:"Swarm",ask_user:"提问",plan:"计划",goal_create:"启动目标",goal_get:"读取目标",goal_budget:"设置目标预算",goal_update:"更新目标"},swarm:{progress:"{done} / {total}",runningSub:"{count} 个进行中",doneSub:"完成 {completed} · 失败 {failed}",phaseQueued:"排队",phaseWorking:"运行中",phaseSuspended:"暂停",phaseCompleted:"完成",phaseFailed:"失败",waiting:"等待子任务加入…"},chip:{lines:"{count} 行",results:"{count} 结果",files:"{count} 个文件",edited:"已编辑",created:"已创建",todos:"{count} 项"},disclosure:{expand:"展开详情",collapse:"收起详情"},output:{waiting:"等待输出…",empty:"(无输出)",saved:"已保存的结果"},plan:{review:{pending:"待确认",approved:"已通过",rejected:"已拒绝",cancelled:"已取消"},selectedOption:"已选择",feedback:"反馈"},summary:{inScope:"{value} 在 {scope} 中"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"状态:{status}",budget:"{value} {unit}",turns:"{value} 轮",tokens:"{value} token",milliseconds:"{value} 毫秒",seconds:"{value} 秒",minutes:"{value} 分钟",hours:"{value} 小时"},group:{countOther:"执行了 {count} 次工具调用",typed:{read:{done:"读取了 {count} 个文件"},bash:{done:"运行了 {count} 条命令"},grep:{done:"搜索了 {count} 个模式"},search:{done:"网络搜索了 {count} 次"},glob:{done:"找了 {count} 次文件"},ls:{done:"列出了 {count} 个目录"},web_fetch:{done:"抓取了 {count} 个页面"},edit:{done:"编辑了 {count} 处"},write:{done:"写入了 {count} 个文件"}}},activity:{failedClause:"({count} 失败)",liveDonePrefix:"已",busy:"正在执行…",doing:{read:"正在读取 {subject}",bash:"正在运行 {subject}",grep:"正在搜索 {subject}",search:"正在搜索 {subject}",glob:"正在匹配 {subject}",ls:"正在列出 {subject}",web_fetch:"正在抓取 {subject}",edit:"正在编辑 {subject}",write:"正在写入 {subject}"}},ask:{dismissed:"已忽略",answer:"{count} 个回答",answers:"{count} 个回答",answered:"已回答",more:"(还有 {count} 个)",collected:"已收集回答",question:"{count} 个问题",questions:"{count} 个问题",freeInput:"(自由输入)",unanswered:"未作答"}},mz={resizeHandleAria:"调整侧栏宽度",resizePreviewAria:"调整预览面板宽度",detailPanelAria:"详情面板"},gz={openSwitcher:"切换会话 / 工作区",openSettings:"会话设置",settingsTitle:"会话设置",groupSession:"当前会话",groupApp:"应用偏好",sheetLabel:"面板",closeSheet:"关闭",tapToCycle:"点击切换",running:"运行中",idle:"空闲",sessionCount:"{n} 个会话",newSession:"新建会话",permManualSub:"每个工具都确认",permAutoSub:"完全自主,不再提问",permYoloSub:"自动批准工具,仍可能提问",planModeSub:"计划模式",swarmModeSub:"Swarm 模式",archivedSessions:"已归档会话",archivedSessionsSub:"查看并恢复已归档会话",archivedBack:"返回"},vz={colorSchemeLabel:"外观",light:"月之亮面",dark:"月之暗面",system:"跟随系统"},yz={continue:"继续",back:"上一步",skip:"跳过",welcome:{title:"欢迎使用 Kimi Code",subtitle:"为专业开发者打造的 AI 编程工作台",languageLabel:"语言",themeLabel:"外观"},login:{title:"选择配置模型",subtitle:"选择驱动 Kimi Code 的模型服务,之后可在「设置」中更改。",kimiTitle:"登录 Kimi 账号",kimiHint:"使用 Kimi 会员权益,开箱即用",recommended:"推荐",customProviderTitle:"添加自定义供应商",customProviderHint:"使用自己的 API Key,接入 OpenAI 兼容等模型服务",loggedInTitle:"已登录 Kimi 账号",loggedInHint:"模型服务已就绪,可以开始使用",finish:"完成",skip:"跳过,稍后再说"}},kz={title:"设置",internalTest:"内部测试",close:"关闭 (Esc)",tabs:{general:"通用",agent:"Agent",account:"账户",providers:"供应商",advanced:"高级",archived:"已归档",shortcuts:"快捷键"},appearance:"外观",notifications:"通知",notifyEnabled:"系统通知",notifyEnabledHint:"回合完成、待回答或待审批时发送系统通知",notifySound:"通知提示音",notifySoundHint:"系统通知随附提示音",notifyDenied:"已在浏览器设置中被阻止",notifyTitle:"Kimi Code · 回合完成",notifyQuestionTitle:"Kimi Code · 待回答",notifyApprovalTitle:"Kimi Code · 等待审批",notifyFallback:"点击查看结果",notifyQuestionFallback:"有提问等待你回答",notifyApprovalFallback:"有工具等待你审批",account:"账户",signedIn:"已登录",signedOutHint:"登录后可查看账户和模型权益",planUsage:{title:"套餐用量",retry:"重试",loadFailed:"加载失败",empty:"暂无用量数据",weekLimit:"每周限额",genericLimit:"限额",hourLimit:"{n} 小时限额",dayLimit:"{n} 天限额",minuteLimit:"{n} 分钟限额",resetsIn:"{duration}后重置",resetDone:"已重置",durationDay:"{n} 天",durationHour:"{n} 小时",durationMinute:"{n} 分钟",durationSecond:"{n} 秒",usedPct:"已用 {pct}%",boosterTitle:"加油包",boosterBalance:"余额",monthlyUsed:"本月已用",monthlyLimit:"每月上限",unlimited:"不限",freeTitle:"免费账户",freeHint:"升级会员后即可使用 Kimi 模型并查看套餐用量"},colorSchemeHint:"选择应用的明暗外观",appIcon:"程序坞图标",appIconHint:"选择程序坞中显示的图标",appIconDefault:"默认",appIconBlack:"黑色",uiFontSize:"字体大小",uiFontSizeHint:"调整界面和消息文字大小",vibrancy:"毛玻璃侧栏",vibrancyHint:"在侧栏使用 macOS 原生毛玻璃材质——如果半透明影响阅读可以关闭",languageHint:"选择界面显示语言",defaultOpenInApp:"默认打开应用",defaultOpenInAppHint:"从顶栏菜单打开文件和文件夹时默认使用的应用",openWith:"打开方式",agentDefaults:"Agent 默认值",saving:"保存中",defaultModel:"默认模型",defaultModelHint:"新会话会优先使用这个模型",noDefaultModel:"未设置默认模型",defaultPermission:"默认权限",defaultPermissionHint:"只影响之后新建的会话",defaultThinking:"默认开启思考",defaultThinkingHint:"新会话默认是否开启思考",defaultPlanMode:"默认计划模式",defaultPlanModeHint:"新会话默认进入计划模式",secondaryModelSection:"子智能体",secondaryModel:"子智能体模型",secondaryModelHint:"子智能体默认使用的模型与思考强度",secondaryModelEffort:"思考强度",noSecondaryModel:"未设置(跟随主模型)",secondaryModelEffortAuto:"模型默认",telemetry:"使用数据改进产品",telemetryHint:"开启后,我们会收集您的匿名交互数据(如点击、打断、功能使用等),用于改进产品体验。您可以随时关闭。",telemetryRestartHint:"更改后需重启服务生效。",credentialReady:"凭据已配置",credentialMissing:"缺少凭据",configUnavailable:"当前服务端没有返回 config,设置项暂不可用。",versionAndUpdates:"版本与更新",appVersion:"应用版本",appVersionHint:"当前应用的版本号和构建时间",checkUpdate:"检查更新",checkUpdateHint:"手动检查是否有新版本",checkUpdateBtn:"立即检查",updateChecking:"检查中…",updateCheckLatest:"已是最新版本",updateCheckAvailable:"发现新版本 {version},可从侧边栏的更新入口下载",updateCheckUnsupported:"当前构建不支持检查更新",updateCheckFailed:"检查失败,请稍后重试",updateCheckAvailableAuto:"发现新版本 {version},正在后台下载",updateCheckDownloaded:"新版本 {version} 已就绪,可从侧边栏的更新入口重启安装",autoDownloadUpdate:"自动下载更新",autoDownloadUpdateHint:"发现新版本时在后台自动下载,重启后完成安装",privacy:"数据与隐私",diagnostics:"诊断",build:"构建",serverVersion:"服务端版本",serverAddress:"服务器地址",serverAddressHint:"当前连接的服务器地址",serverVersionHint:"当前连接服务的版本",exportLog:"故障排查日志",exportLogHint:"导出已采集的故障排查日志",logHint:"加 ?debug=1 开启采集",exportLogBtn:"导出日志",archivedTitle:"已归档会话",archivedDesc:"查看已归档会话,确认其所属工作区路径、会话名称和归档时间,并可恢复到会话列表。",archivedSearch:"搜索已归档会话",archivedAllWorkspaces:"所有工作区",archivedSortLabel:"排序方式",archivedSortArchived:"归档时间",archivedSortCreated:"创建时间",archivedSortName:"按字母顺序",archivedRestore:"恢复",archivedEmpty:"还没有归档的会话",archivedNoMatch:"没有匹配的已归档会话",archivedSessionsCount:"{count} 个会话",archivedAt:"归档于 {time}",archivedLoadMore:"加载更多",archivedLoading:"加载中…",archivedLoadingAll:"正在加载全部归档会话…"},bz={openInEditor:"在编辑器中打开",openInEditorShort:"打开",openInApp:"用 {app} 打开",chooseOpenApp:"选择应用",copyAll:"复制全部对话为 Markdown",copyFinalSummary:"仅复制最终总结",copied:"已复制",lastUsed:"上次使用",copyPath:"复制路径",changed:"{n} 处改动",gitTooltip:"打开「文件 > 改动」",detached:"游离",openPr:"打开 Pull Request",prStatusOpen:"已打开",prStatusClosed:"已关闭",prStatusMerged:"已合并",prStatusDraft:"草稿",prStatusUnknown:"未知",options:"选项",copySessionId:"复制 Session ID",renameSession:"重命名",forkSession:"分叉会话",archiveSession:"归档",exportSession:"导出会话",devBadge:"开发环境运行中"},Cz={title:"侧边聊天",subtitle:"从当前会话 fork",empty:"在侧边随手问一句 —— 它共享当前会话的上下文。",placeholder:"问问侧边聊天…",send:"发送"},wz={actions:{summonApp:{label:"显示应用窗口",desc:"从任意位置将应用窗口唤起到前台"},newSession:{label:"新建会话",desc:"在当前工作区开始一个新会话"},searchSessions:{label:"搜索会话",desc:"打开会话搜索弹窗"},archiveSession:{label:"归档任务",desc:"立即归档当前聊天"},toggleSideChat:{label:"侧边聊天",desc:"打开或关闭 /btw 侧边聊天"},toggleSidebar:{label:"展开/收起侧边栏",desc:"收起或展开会话侧边栏"},openFolder:{label:"打开文件夹",desc:"通过系统原生选择器添加工作目录"},openInDefaultApp:{label:"在默认应用中打开",desc:"在默认编辑器或终端中打开当前工作目录"},openSettings:{label:"打开设置",desc:"显示或隐藏设置窗口"},toggleTerminal:{label:"切换终端",desc:"显示或隐藏底部终端面板"},send:{label:"发送消息",desc:"发送输入框中的内容"},newline:{label:"换行",desc:"在输入框中插入换行"}},searchPlaceholder:"搜索快捷键",unassigned:"未分配",unassign:"取消分配",edit:"编辑快捷键",reset:"恢复默认",resetAll:"全部恢复默认",recording:"按下新的快捷键…",invalid:"该按键组合不能用作快捷键",notGlobal:"该按键组合无法注册为系统级快捷键",globalTaken:"该快捷键已被系统或其他应用占用",reserved:"系统菜单已占用该快捷键",reservedSteer:"steer 固定快捷键(Ctrl/Cmd+S),不可占用",reservedFind:"对话搜索固定快捷键(Ctrl/Cmd+F),不可占用",conflict:"已被「{action}」占用",customBadge:"自定义"},_z={panelAria:"终端",toolbarAria:"终端标签页",resizeAria:"调整终端面板高度",toggle:"切换终端",newTab:"新建终端",closeTab:"关闭终端",restartTab:"重启终端",collapse:"收起终端面板",empty:"还没有终端,点击新建一个",processExited:"[进程已退出]",processExitedWithCode:"[进程已退出,退出码 {code}]"},xz={common:KH,app:ZH,sidebar:GH,workspace:YH,conversation:XH,status:JH,composer:QH,login:ez,providers:tz,model:nz,sessions:oz,approval:sz,question:iz,tasks:rz,thinking:lz,diff:az,fileTree:uz,filePreview:cz,mention:dz,warnings:fz,commands:pz,tools:hz,layout:mz,mobile:gz,theme:vz,onboarding:yz,settings:kz,header:bz,sideChat:Cz,shortcuts:wz,terminal:_z},Sz={en:qH,zh:xz},Az="kimi-locale";function $M(){let e=null;try{e=globalThis.localStorage?.getItem(Az)??null}catch{e=null}return e==="en"||e==="zh"?e:globalThis.navigator?.language?.toLowerCase().startsWith("zh")?"zh":"en"}function Mz(e){const t=e.locale??$M();return iH({legacy:!1,locale:t,fallbackLocale:"en",messages:Sz})}const NM=Symbol("KimiI18n"),Tz={t:e=>e};function m1(){const e=nn(NM,null);if(e)return e;try{const t=Nt();return{t:(n,o)=>t.t(n,o),locale:t.locale.value}}catch{return Tz}}const ya=6,ka=8,Ez=150,Iz=et({__name:"TooltipBubble",props:{target:{default:null},delegate:{default:null},text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=e,n=Z(),o=Z(!1),s=Z(!1),i=Z({maxWidth:`${t.maxWidth}px`});let r,l=null,a;function u(){if(t.target)return t.target;const T=t.delegate;return T?T.firstElementChild??T:null}function c(T){const A=n.value;if(!A)return;const E=T.getBoundingClientRect(),P=A.offsetWidth,D=A.offsetHeight,I=window.innerWidth,$=window.innerHeight;let B=t.placement;B==="top"&&E.top-ya-D$-ka?B="top":B==="left"&&E.left-ya-PI-ka&&(B="left");let H=0,O=0;B==="top"?(H=E.top-ya-D,O=E.left+E.width/2-P/2):B==="bottom"?(H=E.bottom+ya,O=E.left+E.width/2-P/2):B==="left"?(H=E.top+E.height/2-D/2,O=E.left-ya-P):(H=E.top+E.height/2-D/2,O=E.right+ya),O=Math.min(Math.max(O,ka),I-ka-P),H=Math.min(Math.max(H,ka),$-ka-D),i.value={maxWidth:`${t.maxWidth}px`,top:`${Math.round(H)}px`,left:`${Math.round(O)}px`}}function d(){if(!t.text)return;const T=u();T&&(window.clearTimeout(r),r=window.setTimeout(()=>{o.value=!0,s.value=!1,yt(()=>{c(T),s.value=!0})},Ez))}function f(){window.clearTimeout(r),o.value=!1,s.value=!1}function h(){d()}function m(){f()}function v(T){return T instanceof Element?T.closest(".ui-tip"):null}function k(T){const A=t.delegate;if(!A)return;if(v(T.target)!==A){f();return}const E=T.relatedTarget;E instanceof Element&&A.contains(E)&&v(E)===A||d()}function w(T){const A=t.delegate;if(!A)return;const E=T.relatedTarget;E instanceof Element&&A.contains(E)||f()}function b(T){v(T.target)===t.delegate&&d()}function _(){f()}function g(){l&&(t.delegate?(l.removeEventListener("mouseover",k),l.removeEventListener("mouseout",w),l.removeEventListener("focusin",b),l.removeEventListener("focusout",_)):(l.removeEventListener("mouseenter",h),l.removeEventListener("mouseleave",m),l.removeEventListener("focusin",h),l.removeEventListener("focusout",m)),l=null)}function x(){g(),a?.disconnect(),a=void 0;const T=t.target??t.delegate;T&&(l=T,t.delegate?(T.addEventListener("mouseover",k),T.addEventListener("mouseout",w),T.addEventListener("focusin",b),T.addEventListener("focusout",_),a=new MutationObserver(()=>{o.value&&f()}),a.observe(T,{childList:!0})):(T.addEventListener("mouseenter",h),T.addEventListener("mouseleave",m),T.addEventListener("focusin",h),T.addEventListener("focusout",m)))}Je(()=>[t.target,t.delegate],()=>{f(),x()});function S(){o.value&&f()}return dn(()=>{x(),window.addEventListener("scroll",S,!0),window.addEventListener("resize",S)}),Vn(()=>{window.clearTimeout(r),a?.disconnect(),g(),window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S)}),(T,A)=>o.value?(y(),he(Zr,{key:0,to:"body"},[C("div",{ref_key:"bubble",ref:n,class:Re(["ui-tip__bubble",{positioned:s.value}]),style:Zt([i.value,{"--tip-lines":e.maxLines}]),role:"tooltip"},N(e.text),7)])):ee("",!0)}}),ft=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},FM=ft(Iz,[["__scopeId","data-v-93bacf6d"]]),Lz=["type","disabled","aria-label"],$z=et({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},tooltip:{},type:{default:"button"}},setup(e,{expose:t}){const n=Z();return t({el:n}),(o,s)=>(y(),M("button",{ref_key:"el",ref:n,class:Re(["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),e.tooltip?(y(),he(FM,{key:0,target:n.value??null,text:e.tooltip},null,8,["target","text"])):ee("",!0)],10,Lz))}}),gn=ft($z,[["__scopeId","data-v-2cbeca98"]]),RM=Symbol("IconResolver"),Nz={sm:14,md:16,lg:20},Te=et({__name:"Icon",props:{name:{},size:{default:"md"},label:{}},setup(e){const t=e,n=nn(RM,()=>{}),o=R(()=>n(t.name)),s=R(()=>Nz[t.size]);return(i,r)=>o.value?(y(),he(bs(o.value),{key:0,class:"kw-icon",width:s.value,height:s.value,"aria-label":e.label,"aria-hidden":e.label?void 0:!0},null,8,["width","height","aria-label","aria-hidden"])):ee("",!0)}}),Fz={class:"ui-action-toast-host"},Rz={class:"ui-action-toast__body"},Oz=et({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=m1();let i=null,r=0,l=0;function a(d){i=setTimeout(()=>o("dismiss"),d),r=Date.now()+d}function u(){i!==null&&(clearTimeout(i),i=null,l=Math.max(0,r-Date.now()))}function c(){i===null&&a(l)}return a(n.duration),bn(()=>{i!==null&&clearTimeout(i)}),(d,f)=>(y(),M("div",Fz,[C("div",{class:"ui-action-toast",role:"status",onPointerenter:u,onPointerleave:c},[C("span",Rz,[xn(d.$slots,"default")]),j(gn,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??p(s)("common.dismiss"),tooltip:e.dismissLabel??p(s)("common.dismiss"),onClick:f[0]||(f[0]=h=>o("dismiss"))},{default:me(()=>[j(Te,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],32)]))}}),Pz=ft(Oz,[["__scopeId","data-v-e84c8ca2"]]),Dz={key:0,width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",stroke:"var(--color-success)","stroke-width":"2","aria-hidden":"true"},Bz={key:1,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-danger)","stroke-width":"1.5","aria-hidden":"true"},Hz={key:2,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-warning)","stroke-width":"1.5","aria-hidden":"true"},Dd=et({__name:"AuthStateIcon",props:{kind:{}},setup(e){return(t,n)=>e.kind==="success"?(y(),M("svg",Dz,[...n[0]||(n[0]=[C("circle",{cx:"18",cy:"18",r:"15"},null,-1),C("polyline",{points:"10,18 15,24 26,12"},null,-1)])])):e.kind==="expired"?(y(),M("svg",Bz,[...n[1]||(n[1]=[C("circle",{cx:"14",cy:"14",r:"12"},null,-1),C("line",{x1:"14",y1:"8",x2:"14",y2:"15"},null,-1),C("circle",{cx:"14",cy:"19",r:"1.2",fill:"var(--color-danger)"},null,-1)])])):(y(),M("svg",Hz,[...n[2]||(n[2]=[C("path",{d:"M14 3 L26 24 H2 Z"},null,-1),C("line",{x1:"14",y1:"12",x2:"14",y2:"18"},null,-1),C("circle",{cx:"14",cy:"21.5",r:"1",fill:"var(--color-warning)"},null,-1)])]))}}),zz={key:0,class:"ui-badge__dot","aria-hidden":"true"},Wz=et({__name:"Badge",props:{variant:{default:"neutral"},size:{default:"md"},dot:{type:Boolean}},setup(e){return(t,n)=>(y(),M("span",{class:Re(["ui-badge",[`ui-badge--${e.variant}`,`ui-badge--${e.size}`]])},[e.dot?(y(),M("span",zz)):ee("",!0),xn(t.$slots,"default",{},void 0,!0)],2))}}),Vr=ft(Wz,[["__scopeId","data-v-d879fe18"]]),Uz={class:"ui-banner__icon","aria-hidden":"true"},jz={class:"ui-banner__text"},Vz=et({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(y(),M("div",{class:Re(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[C("span",Uz,[xn(t.$slots,"icon",{},()=>[e.variant==="info"?(y(),he(Te,{key:0,name:"info",size:"md"})):(y(),he(Te,{key:1,name:"alert-triangle",size:"md"}))],!0)]),C("span",jz,[xn(t.$slots,"default",{},void 0,!0)])],2))}}),qu=ft(Vz,[["__scopeId","data-v-6d739c6d"]]),qz=["aria-label"],Kz=et({__name:"Spinner",props:{size:{default:"md"},label:{}},setup(e){const{t}=m1(),n=Z(null);let o,s;function i(){const r=n.value;if(r){if(s?.matches){o?.cancel(),o=void 0;return}o||(o=r.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:850,iterations:1/0}),o.startTime=0)}}return dn(()=>{const r=n.value;!r||typeof r.animate!="function"||(s=window.matchMedia("(prefers-reduced-motion: reduce)"),s.addEventListener("change",i),i())}),Vn(()=>{s?.removeEventListener("change",i),s=void 0,o?.cancel(),o=void 0}),(r,l)=>(y(),M("span",{ref_key:"boxRef",ref:n,class:Re(["ui-spinner",`ui-spinner--${e.size}`]),role:"status","aria-label":e.label??p(t)("common.loading")},[...l[0]||(l[0]=[C("svg",{class:"ui-spinner__svg",viewBox:"0 0 24 24","aria-hidden":"true"},[C("circle",{class:"ui-spinner__track",cx:"12",cy:"12",r:"9"}),C("circle",{class:"ui-spinner__arc",cx:"12",cy:"12",r:"9"})],-1)])],10,qz))}}),Ao=ft(Kz,[["__scopeId","data-v-0b81b1b5"]]),Zz=["type","disabled"],Gz={class:"ui-button__content"},Yz=et({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},loading:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(y(),M("button",{class:Re(["ui-button",[`ui-button--${e.variant}`,`ui-button--${e.size}`,{"is-loading":e.loading}]]),type:e.type,disabled:e.disabled||e.loading},[e.loading?(y(),he(Ao,{key:0,size:"sm",class:"ui-button__spinner"})):ee("",!0),C("span",Gz,[xn(t.$slots,"default",{},void 0,!0)])],10,Zz))}}),Rt=ft(Yz,[["__scopeId","data-v-01b5ec22"]]),Xz={key:0,class:"ui-card__head"},Jz={class:"ui-card__body"},Qz={key:1,class:"ui-card__foot"},eW=et({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(y(),M("div",{class:Re(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(y(),M("div",Xz,[xn(t.$slots,"head",{},void 0,!0)])):ee("",!0),C("div",Jz,[xn(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(y(),M("div",Qz,[xn(t.$slots,"foot",{},void 0,!0)])):ee("",!0)],2))}}),tW=ft(eW,[["__scopeId","data-v-fbd05138"]]),nW=["checked","disabled"],oW={class:"ui-check__box","aria-hidden":"true"},sW={key:0,class:"ui-check__label"},iW=et({__name:"Checkbox",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(y(),M("label",{class:Re(["ui-check",{"is-on":e.modelValue,"is-disabled":e.disabled}])},[C("input",{class:"ui-check__input",type:"checkbox",checked:e.modelValue,disabled:e.disabled,onChange:s[0]||(s[0]=i=>n("update:modelValue",i.target.checked))},null,40,nW),C("span",oW,[e.modelValue?(y(),he(Te,{key:0,name:"check",size:"md"})):ee("",!0)]),o.$slots.default?(y(),M("span",sW,[xn(o.$slots,"default",{},void 0,!0)])):ee("",!0)],2))}}),rW=ft(iW,[["__scopeId","data-v-d4bf4026"]]),lW={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},aW=["stroke-dasharray","stroke-dashoffset"],Qv=7,uW=et({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*Qv;return(o,s)=>(y(),M("svg",lW,[C("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:Qv,fill:"none","stroke-width":"2.5"}),C("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:Qv,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,aW)]))}}),cW=ft(uW,[["__scopeId","data-v-de787cf2"]]),Ci=Z(0),dW=["aria-label"],fW={key:0,class:"ui-dialog__head"},pW={class:"ui-dialog__titles"},hW={key:0,class:"ui-dialog__title"},mW={key:1,class:"ui-dialog__desc"},gW={class:"ui-dialog__body"},vW={key:1,class:"ui-dialog__foot"},yW='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',kW=et({__name:"Dialog",props:{open:{type:Boolean},title:{},ariaLabel:{},description:{},closeOnOverlay:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},size:{default:"md"},height:{default:"auto"},padded:{type:Boolean,default:!0},hideClose:{type:Boolean},level:{default:"raised"},initialFocus:{}},emits:["update:open","close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=m1(),i=Z(null);let r=null;function l(){o("update:open",!1),o("close")}function a(){return i.value?Array.from(i.value.querySelectorAll(yW)):[]}function u(){const{initialFocus:f}=n;return f?typeof f=="function"?f()??null:typeof f=="string"?i.value?.querySelector(f)??null:i.value?.contains(f)?f:null:null}function c(f){if(!n.open)return;if(f.key==="Escape"&&n.closeOnEsc){f.preventDefault(),l();return}if(f.key!=="Tab")return;const h=a(),m=h[0],v=h[h.length-1];if(!m||!v){f.preventDefault(),i.value?.focus();return}const k=document.activeElement;f.shiftKey&&k===m?(f.preventDefault(),v.focus()):!f.shiftKey&&k===v&&(f.preventDefault(),m.focus())}function d(f){n.closeOnOverlay&&f.target===f.currentTarget&&l()}return Je(()=>n.open,async f=>{if(f){Ci.value+=1,r=document.activeElement,await yt();const h=u(),m=a();(h??m[0]??i.value)?.focus()}else Ci.value=Math.max(0,Ci.value-1),r instanceof HTMLElement&&(r.focus(),r=null)},{immediate:!0}),typeof window<"u"&&window.addEventListener("keydown",c),Vn(()=>{typeof window<"u"&&window.removeEventListener("keydown",c),n.open&&(Ci.value=Math.max(0,Ci.value-1),r instanceof HTMLElement&&r.focus())}),(f,h)=>(y(),he(Zr,{to:"body"},[e.open?(y(),M("div",{key:0,class:"ui-dialog__overlay",onMousedown:d},[C("div",{ref_key:"panel",ref:i,class:Re(["ui-dialog",[`ui-dialog--${e.size}`,{"ui-dialog--flush":!e.padded,"ui-dialog--fixed-height":e.height==="fixed","ui-dialog--grouped":e.level==="grouped"}]]),role:"dialog","aria-modal":"true","aria-label":e.ariaLabel??e.title,tabindex:"-1"},[e.title||f.$slots.head?(y(),M("div",fW,[xn(f.$slots,"head",{},()=>[C("div",pW,[e.title?(y(),M("div",hW,N(e.title),1)):ee("",!0),e.description?(y(),M("div",mW,N(e.description),1)):ee("",!0)])],!0),e.hideClose?ee("",!0):(y(),he(gn,{key:0,class:"ui-dialog__close",size:"sm",label:p(s)("common.close"),tooltip:p(s)("common.close"),onClick:l},{default:me(()=>[j(Te,{name:"close",size:"md"})]),_:1},8,["label","tooltip"]))])):ee("",!0),C("div",gW,[xn(f.$slots,"default",{},void 0,!0)]),f.$slots.foot?(y(),M("div",vW,[xn(f.$slots,"foot",{},void 0,!0)])):ee("",!0)],10,dW)],32)):ee("",!0)]))}}),ua=ft(kW,[["__scopeId","data-v-ebbc1a68"]]),bW={class:"ui-empty"},CW={key:0,class:"ui-empty__icon","aria-hidden":"true"},wW={key:1,class:"ui-empty__title"},_W={key:2,class:"ui-empty__hint"},xW=et({__name:"EmptyState",props:{title:{},hint:{}},setup(e){return(t,n)=>(y(),M("div",bW,[t.$slots.icon?(y(),M("span",CW,[xn(t.$slots,"icon",{},void 0,!0)])):ee("",!0),e.title?(y(),M("div",wW,N(e.title),1)):ee("",!0),e.hint?(y(),M("div",_W,N(e.hint),1)):ee("",!0),xn(t.$slots,"default",{},void 0,!0)]))}}),SW=ft(xW,[["__scopeId","data-v-6da80932"]]),AW={key:0,class:"ui-field__label"},MW={key:1,class:"ui-field__error"},TW={key:2,class:"ui-field__hint"},EW=et({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(y(),M("div",{class:Re(["ui-field",{"has-error":!!e.error}])},[e.label?(y(),M("label",AW,N(e.label),1)):ee("",!0),xn(t.$slots,"default",{},void 0,!0),e.error?(y(),M("span",MW,N(e.error),1)):e.hint?(y(),M("span",TW,N(e.hint),1)):ee("",!0)],2))}}),IW=ft(EW,[["__scopeId","data-v-a8de5f7f"]]),LW=["type","value","placeholder","disabled","readonly"],$W=et({__name:"Input",props:{modelValue:{},size:{default:"md"},type:{default:"text"},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue","focus","blur"],setup(e,{expose:t,emit:n}){const o=n,s=Z();function i(a){o("update:modelValue",a.target.value)}function r(){s.value?.focus()}function l(){s.value?.select()}return t({focus:r,select:l,el:s}),(a,u)=>(y(),M("input",{ref_key:"el",ref:s,class:Re(["ui-input",[`ui-input--${e.size}`,{"has-error":e.error}]]),type:e.type,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:i,onFocus:u[0]||(u[0]=c=>a.$emit("focus",c)),onBlur:u[1]||(u[1]=c=>a.$emit("blur",c))},null,42,LW))}}),js=ft($W,[["__scopeId","data-v-f1cdf732"]]),NW={class:"ui-kbd"},FW=et({__name:"Kbd",props:{keys:{}},setup(e){return(t,n)=>(y(),M("span",NW,[(y(!0),M(Pe,null,pt(e.keys,o=>(y(),M("kbd",{key:o,class:"ui-kbd__key"},N(o),1))),128))]))}}),oa=ft(FW,[["__scopeId","data-v-04b30ce2"]]),RW=["role"],OW=et({__name:"Menu",props:{role:{default:"menu"}},setup(e,{expose:t}){const n=Z();return t({el:n}),(o,s)=>(y(),M("div",{ref_key:"el",ref:n,class:"ui-menu",role:e.role},[xn(o.$slots,"default",{},void 0,!0)],8,RW))}}),Cl=ft(OW,[["__scopeId","data-v-9be2c64a"]]),PW={key:0,class:"ui-menu-sep",role:"separator"},DW=["role","disabled"],BW=et({__name:"MenuItem",props:{active:{type:Boolean},danger:{type:Boolean},disabled:{type:Boolean},separator:{type:Boolean},size:{default:"md"},role:{default:"menuitem"}},emits:["click"],setup(e){return(t,n)=>e.separator?(y(),M("div",PW)):(y(),M("button",{key:1,class:Re(["ui-menu-item",[`ui-menu-item--${e.size}`,{"is-active":e.active,"is-danger":e.danger}]]),type:"button",role:e.role,disabled:e.disabled,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[xn(t.$slots,"default",{},void 0,!0)],10,DW))}}),hn=ft(BW,[["__scopeId","data-v-3866cadb"]]),HW=et({__name:"Tooltip",props:{text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=Z();return(n,o)=>(y(),M(Pe,null,[C("span",{ref_key:"trigger",ref:t,class:"ui-tip"},[xn(n.$slots,"default",{},void 0,!0)],512),j(FM,{delegate:t.value??null,text:e.text,placement:e.placement,"max-width":e.maxWidth,"max-lines":e.maxLines},null,8,["delegate","text","placement","max-width","max-lines"])],64))}}),pn=ft(HW,[["__scopeId","data-v-414bd903"]]),zW={class:"ui-panel-header__title"},WW={key:0,class:"ui-panel-header__sub"},UW=et({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{},closeIcon:{default:"close"},wrap:{type:Boolean}},emits:["close"],setup(e){const{t}=m1();return(n,o)=>(y(),M("div",{class:Re(["ui-panel-header",{wrap:e.wrap}])},[C("span",zW,N(e.title),1),j(pn,{text:e.subtitle},{default:me(()=>[e.subtitle?(y(),M("span",WW,N(e.subtitle),1)):ee("",!0)]),_:1},8,["text"]),xn(n.$slots,"default",{},void 0,!0),e.closable?(y(),he(gn,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel??p(t)("common.close"),tooltip:e.closeLabel??p(t)("common.close"),onClick:o[0]||(o[0]=s=>n.$emit("close"))},{default:me(()=>[j(Te,{name:e.closeIcon,size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])):ee("",!0)],2))}}),pc=ft(UW,[["__scopeId","data-v-eb14b05d"]]),jW=["disabled","aria-pressed"],VW=et({__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?(y(),M("button",{key:0,class:Re(["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,jW)):(y(),M("span",{key:1,class:Re(["ui-pill",{"is-active":e.active}])},[xn(t.$slots,"default",{},void 0,!0)],2))}}),G0=ft(VW,[["__scopeId","data-v-fe6a2873"]]),qW=et({__name:"ScrollArea",props:{orientation:{default:"vertical"},hideDelay:{default:600}},setup(e,{expose:t}){const n=e,o=Z(null),s=Z(null),i=Z(!1),r=Z({overflow:!1,size:0,offset:0}),l=Z({overflow:!1,size:0,offset:0}),a=Z(null);let u=null,c=null,d=null;const f=R(()=>({overflowX:n.orientation==="vertical"?"hidden":"auto",overflowY:n.orientation==="horizontal"?"hidden":"auto"})),h=R(()=>({height:`${r.value.size}px`,transform:`translateY(${r.value.offset}px)`})),m=R(()=>({width:`${l.value.size}px`,transform:`translateX(${l.value.offset}px)`}));function v(E,P,D){if(!(P>E+1)||E<=0)return{overflow:!1,size:0,offset:0};const $=Math.max(0,E-4),B=Math.min($,Math.max(24,$*E/P)),H=Math.max(0,$-B),O=Math.max(1,P-E);return{overflow:!0,size:B,offset:H*D/O}}function k(){const E=s.value;if(!E)return;const P=v(E.clientHeight,E.scrollHeight,E.scrollTop),D=v(E.clientWidth,E.scrollWidth,E.scrollLeft);(P.overflow!==r.value.overflow||P.size!==r.value.size||P.offset!==r.value.offset)&&(r.value=P),(D.overflow!==l.value.overflow||D.size!==l.value.size||D.offset!==l.value.offset)&&(l.value=D)}function w(){u!==null&&clearTimeout(u),u=null}function b(){w(),i.value=!0}function _(){w(),!(a.value||o.value?.matches(":hover, :focus-within"))&&(u=setTimeout(()=>{i.value=!1,u=null},n.hideDelay))}function g(){k(),b(),_()}function x(E,P){const D=s.value;D&&(P.preventDefault(),b(),a.value={axis:E,pointerId:P.pointerId,startPointer:E==="vertical"?P.clientY:P.clientX,startScroll:E==="vertical"?D.scrollTop:D.scrollLeft},P.currentTarget.setPointerCapture(P.pointerId))}function S(E){const P=a.value,D=s.value;if(!P||P.pointerId!==E.pointerId||!D)return;const I=P.axis==="vertical"?E.clientY:E.clientX,$=P.axis==="vertical"?D.clientHeight:D.clientWidth,B=P.axis==="vertical"?D.scrollHeight:D.scrollWidth,H=P.axis==="vertical"?r.value.size:l.value.size,O=Math.max(1,$-4-H),F=(I-P.startPointer)*(B-$)/O;P.axis==="vertical"?D.scrollTop=P.startScroll+F:D.scrollLeft=P.startScroll+F}function T(E){!a.value||a.value.pointerId!==E.pointerId||(a.value=null,_())}function A(){const E=s.value;if(!(!E||!c))for(const P of E.children)c.observe(P)}return dn(async()=>{await yt();const E=s.value;E&&(c=new ResizeObserver(k),c.observe(E),A(),d=new MutationObserver(()=>{A(),k()}),d.observe(E,{childList:!0,subtree:!0,characterData:!0}),k())}),Vn(()=>{w(),c?.disconnect(),d?.disconnect()}),t({viewport:s,updateMetrics:k}),(E,P)=>(y(),M("div",{ref_key:"root",ref:o,class:"ui-scroll-area",onPointerenter:b,onPointerleave:_,onFocusin:b,onFocusout:_},[C("div",{ref_key:"viewport",ref:s,class:"ui-scroll-area__viewport",style:Zt(f.value),tabindex:"0",onScroll:g},[xn(E.$slots,"default",{},void 0,!0)],36),r.value.overflow&&n.orientation!=="horizontal"?(y(),M("div",{key:0,class:Re(["ui-scroll-area__bar ui-scroll-area__bar--vertical",{"is-visible":i.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Zt(h.value),onPointerdown:P[0]||(P[0]=D=>x("vertical",D)),onPointermove:S,onPointerup:T,onPointercancel:T},null,36)],2)):ee("",!0),l.value.overflow&&n.orientation!=="vertical"?(y(),M("div",{key:1,class:Re(["ui-scroll-area__bar ui-scroll-area__bar--horizontal",{"is-visible":i.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Zt(m.value),onPointerdown:P[1]||(P[1]=D=>x("horizontal",D)),onPointermove:S,onPointerup:T,onPointercancel:T},null,36)],2)):ee("",!0)],544))}}),Pk=ft(qW,[["__scopeId","data-v-9c504ebc"]]),KW=["aria-selected","onClick"],ZW=et({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=Z(null),i=Z([]),r=Z(!1),l=Z({});let a=null;function u(d,f){d instanceof HTMLElement&&(i.value[f]=d)}async function c(){await yt();const d=n.options.findIndex(h=>h.value===n.modelValue),f=i.value[d];f&&(l.value={width:`${f.offsetWidth}px`,height:`${f.offsetHeight}px`,transform:`translate(${f.offsetLeft}px, ${f.offsetTop}px)`},r.value=!0)}return Je(()=>[n.modelValue,n.options.length],c,{immediate:!0}),dn(()=>{a=new ResizeObserver(()=>c()),s.value&&a.observe(s.value);for(const d of i.value)a.observe(d);c()}),Vn(()=>a?.disconnect()),(d,f)=>(y(),M("div",{ref_key:"root",ref:s,class:Re(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[C("span",{class:Re(["ui-seg__indicator",{"is-ready":r.value}]),style:Zt(l.value),"aria-hidden":"true"},null,6),(y(!0),M(Pe,null,pt(e.options,(h,m)=>(y(),M("button",{key:h.value,ref_for:!0,ref:v=>u(v,m),class:Re(["ui-seg__item",{"is-on":h.value===e.modelValue}]),type:"button",role:"tab","aria-selected":h.value===e.modelValue,onClick:v=>o("update:modelValue",h.value)},[h.icon?(y(),he(Te,{key:0,class:"ui-seg__icon",name:h.icon,size:"sm"},null,8,["name"])):ee("",!0),h.swatch?(y(),M("span",{key:1,class:"ui-seg__swatch",style:Zt({backgroundColor:h.swatch})},null,4)):ee("",!0),qe(" "+N(h.label),1)],10,KW))),128))],2))}}),wi=ft(ZW,[["__scopeId","data-v-27f5a180"]]),GW=["aria-expanded","disabled"],YW=["src"],XW={class:"ui-select__value-text"},JW={key:0,class:"ui-select__group"},QW=["aria-selected","disabled","onMouseenter","onClick"],eU=["src"],tU=et({inheritAttrs:!1,__name:"Select",props:{modelValue:{},options:{},placeholder:{default:""},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=p1(),i=Z(null),r=Z(null),l=Z(null),a=Z([]),u=Z(!1),c=Z(-1),d=`ui-select-${Math.random().toString(36).slice(2,9)}`,f=R(()=>n.options.findIndex(A=>String(A.value)===String(n.modelValue??""))),h=R(()=>n.options[f.value]),m=R(()=>h.value?.label??n.placeholder);function v(A,E){a.value[E]=A instanceof HTMLElement?A:null}function k(){const A=l.value,E=a.value[c.value];!A||!E||(A.scrollTop=E.offsetTop-(A.clientHeight-E.offsetHeight)/2)}function w(){n.disabled||u.value||(u.value=!0,c.value=f.value>=0?f.value:n.options.findIndex(A=>!A.disabled),yt(k))}function b({restoreFocus:A=!1}={}){u.value&&(u.value=!1,A&&yt(()=>r.value?.focus()))}function _(){u.value?b():w()}function g(A){A.disabled||(String(A.value)!==String(n.modelValue??"")&&o("update:modelValue",A.value),b({restoreFocus:!0}))}function x(A){if(u.value||w(),n.options.length===0)return;let E=c.value;for(let P=0;PP.disabled?-1:D).filter(P=>P>=0);c.value=A.key==="Home"?E[0]??-1:E.at(-1)??-1,yt(k)}}function T(A){i.value?.contains(A.target)||b()}return dn(()=>document.addEventListener("pointerdown",T)),bn(()=>document.removeEventListener("pointerdown",T)),(A,E)=>(y(),M("div",{ref_key:"rootRef",ref:i,class:Re(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error,"is-open":u.value,"is-disabled":e.disabled}]])},[C("button",zn({ref_key:"triggerRef",ref:r},p(s),{class:"ui-select__trigger",type:"button",role:"combobox","aria-controls":d,"aria-expanded":u.value,"aria-haspopup":"listbox",disabled:e.disabled,onClick:_,onKeydown:S}),[C("span",{class:Re(["ui-select__value",{"is-placeholder":!h.value}])},[h.value?.icon?(y(),M("img",{key:0,class:"ui-select__icon",src:h.value.icon,alt:""},null,8,YW)):ee("",!0),C("span",XW,N(m.value),1)],2),j(Te,{class:"ui-select__chevron",name:"chevron-down",size:"sm"})],16,GW),u.value?(y(),M("div",{key:0,id:d,ref_key:"listRef",ref:l,class:"ui-select__menu",role:"listbox"},[(y(!0),M(Pe,null,pt(e.options,(P,D)=>(y(),M(Pe,{key:`${P.group??""}:${P.value}`},[P.group&&P.group!==e.options[D-1]?.group?(y(),M("div",JW,N(P.group),1)):ee("",!0),C("button",{ref_for:!0,ref:I=>v(I,D),class:Re(["ui-select__option",{"is-selected":D===f.value,"is-active":D===c.value}]),type:"button",role:"option","aria-selected":D===f.value,disabled:P.disabled,onMouseenter:I=>c.value=D,onClick:I=>g(P)},[j(Te,{class:"ui-select__check",name:"check",size:"sm"}),P.icon?(y(),M("img",{key:0,class:"ui-select__icon ui-select__icon--option",src:P.icon,alt:""},null,8,eU)):ee("",!0),C("span",null,N(P.label),1)],42,QW)],64))),128))],512)):ee("",!0)],2))}}),n3=ft(tU,[["__scopeId","data-v-63f5dcbc"]]),nU=et({__name:"StatusDot",props:{status:{}},setup(e){const t=e;function n(s){switch(s){case"ok":case"done":case"completed":case"success":return"ok";case"error":case"failed":case"danger":return"error";case"running":case"working":case"in_progress":case"active":return"running";case"suspended":return"suspended";default:return"idle"}}const o=R(()=>n(t.status));return(s,i)=>(y(),M("span",{class:Re(["kw-dot",`kw-dot--${o.value}`]),"aria-hidden":"true"},null,2))}}),hc=ft(nU,[["__scopeId","data-v-b282847b"]]),oU=["aria-checked","aria-label","disabled"],sU=et({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(y(),M("button",{class:Re(["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]=[C("span",{class:"ui-switch__thumb"},null,-1)])],10,oU))}}),ed=ft(sU,[["__scopeId","data-v-2fc56545"]]),iU={class:"ui-toast__icon","aria-hidden":"true"},rU={class:"ui-toast__body"},lU={class:"ui-toast__title"},aU={key:0,class:"ui-toast__msg"},uU=et({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{}},emits:["dismiss"],setup(e){const{t}=m1();return(n,o)=>(y(),M("div",{class:Re(["ui-toast",`ui-toast--${e.variant}`])},[C("span",iU,[xn(n.$slots,"icon",{},()=>[e.variant==="success"?(y(),he(Te,{key:0,name:"check"})):e.variant==="danger"?(y(),he(Te,{key:1,name:"close"})):e.variant==="warning"?(y(),he(Te,{key:2,name:"alert-triangle"})):(y(),he(Te,{key:3,name:"info"}))],!0)]),C("div",rU,[C("div",lU,N(e.title),1),e.message?(y(),M("div",aU,N(e.message),1)):ee("",!0),xn(n.$slots,"default",{},void 0,!0)]),j(gn,{class:"ui-toast__close",size:"sm",label:e.dismissLabel??p(t)("common.dismiss"),tooltip:e.dismissLabel??p(t)("common.dismiss"),onClick:o[0]||(o[0]=s=>n.$emit("dismiss"))},{default:me(()=>[j(Te,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],2))}}),cU=ft(uU,[["__scopeId","data-v-62bc76d1"]]),dU=100;function Ar(){let e=!1,t=0;function n(){e=!0,t=0}function o(){e=!1,t=Date.now()}function s(){e=!1,t=0}function i(r){return e||r.isComposing||r.keyCode===229||Date.now()-t{typeof window<"u"&&(window.removeEventListener("focusin",s,!0),window.removeEventListener("focusout",s,!0))}),{handleCompositionStart:n,handleCompositionEnd:o,resetComposition:s,isComposingKeyEvent:i}}function Cd(e,t,n="/api/v1"){return`${e}${n}${t.startsWith("/")?t:`/${t}`}`}function fU(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()}const oy={};class wd 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 Wl 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}}class sy extends Error{size;limit;constructor(t){super(`file too large to preview: ${t.size} bytes (limit ${t.limit})`),this.name="FileTooLargeError",this.size=t.size,this.limit=t.limit}}function Us(e){return e instanceof wd||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function iy(e){return e instanceof Wl||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}function pU(e){return e instanceof sy||typeof e=="object"&&e!==null&&e.name==="FileTooLargeError"&&typeof e.limit=="number"}const hU=40922;function mU(e){return Us(e)&&e.code===hU}const hd=3e4,Y0=5*6e4,OM="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Dk=500,PM=40101;function Bk(e,t){for(const[n,o]of Object.entries(t))if(o!==void 0)if(Array.isArray(o))for(const s of o)s!==void 0&&e.append(n,String(s));else e.set(n,String(o))}function X0(e=hd){try{return AbortSignal.timeout(e)}catch{return}}function gU(e,t){let n="",o=e;for(let s=0;sOM[n%32]).join("")}function J0(){return`${gU(Date.now(),10)}${vU(16)}`}function yU(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 e9(e){try{const t=await e.text();return t?t.length>Dk?`${t.slice(0,Dk)}...`:t:void 0}catch{return}}class Hk{constructor(t){this.opts=t,this.tracer=t.tracer??oy}tracer;async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t,n,o){let s=Cd(this.opts.origin,t,this.opts.restBasePath);if(n){const c=new URLSearchParams;Bk(c,n);const d=c.toString();d&&(s=`${s}?${d}`)}const i=J0(),r={"X-Request-Id":i};this.addClientHeaders(r);const l=Date.now();this.tracer.restRequest?.({method:"GET",path:t,url:s,requestId:i});let a;try{a=await fetch(s,{method:"GET",headers:r,signal:X0()})}catch(c){throw this.tracer.restFailure?.({method:"GET",path:t,requestId:i,phase:"fetch",durationMs:Date.now()-l,error:c}),new Wl({message:`Network error calling GET ${t}`,cause:c,method:"GET",path:t,url:s,requestId:i,phase:"fetch",timeoutMs:hd,timestamp:Date.now(),durationMs:Date.now()-l})}if(a.ok){this.tracer.restResponse?.({method:"GET",path:t,requestId:i,status:a.status,durationMs:Date.now()-l,code:0,msg:""});const c=Number(a.headers.get("content-length")??0);if(o?.maxBytes!==void 0&&c>o.maxBytes)throw a.body?.cancel(),new sy({size:c,limit:o.maxBytes});return a.blob()}let u;try{u=await a.clone().json()}catch{}throw this.checkAuthRequired(a,u?.code??0),this.tracer.restResponse?.({method:"GET",path:t,requestId:i,status:a.status,durationMs:Date.now()-l,code:u?.code??a.status,msg:u?.msg??a.statusText,envelopeRequestId:u?.request_id}),new wd({code:u?.code??a.status,msg:u?.msg??a.statusText,requestId:u?.request_id??i,details:u?.details,timestamp:Date.now(),durationMs:Date.now()-l})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async postZip(t,n,o){const s="POST",i=Cd(this.opts.origin,t,this.opts.restBasePath),r=J0(),l={"X-Request-Id":r,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(l);const a=Date.now();this.tracer.restRequest?.({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:X0(Y0)})}catch(h){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:h}),new Wl({message:`Network error calling ${s} ${t}`,cause:h,method:s,path:t,url:i,requestId:r,phase:"fetch",timeoutMs:Y0,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 h;try{h=await u.clone().json()}catch{}if(this.checkAuthRequired(u,h?.code??0),!u.ok||h!==void 0&&h.code!==0){const k=h?.code??u.status,w=h?.msg??u.statusText;throw this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:k,msg:w,envelopeRequestId:h?.request_id}),new wd({code:k,msg:w,requestId:h?.request_id??r,details:h?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const m=u.clone(),v=new TypeError(`Expected application/zip, received ${c??"no content type"}`);throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:v}),new Wl({message:`Invalid ZIP response from ${s} ${t}`,cause:v,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:Y0,status:u.status,statusText:u.statusText,contentType:c,bodyPreview:await e9(m),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await u.blob()}catch(h){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:h}),new Wl({message:`Failed to read ZIP response from ${s} ${t}`,cause:h,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:Y0,status:u.status,statusText:u.statusText,contentType:c,timestamp:Date.now(),durationMs:Date.now()-a})}return this.tracer.restResponse?.({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=Cd(this.opts.origin,t,this.opts.restBasePath),s=J0(),i={"X-Request-Id":s};this.addClientHeaders(i);const r=Date.now();this.tracer.restRequest?.({method:"POST",path:t,url:o,requestId:s,body:yU(n)});let l;try{l=await fetch(o,{method:"POST",headers:i,body:n,signal:X0()})}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:c}),new Wl({message:`Network error calling POST ${t}`,cause:c,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:hd,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const u=l.clone();try{a=await l.json()}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:c}),new Wl({message:`Failed to parse JSON response from POST ${t}`,cause:c,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:hd,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await e9(u),timestamp:Date.now(),durationMs:Date.now()-r})}if(this.tracer.restResponse?.({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 wd({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=Cd(this.opts.origin,n,this.opts.restBasePath);if(s){const h=new URLSearchParams;Bk(h,s);const m=h.toString();m&&(r=`${r}?${m}`)}const l=J0(),a={"X-Request-Id":l};this.addClientHeaders(a),o!==void 0&&(a["Content-Type"]="application/json; charset=utf-8");const u=Date.now();this.tracer.restRequest?.({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:X0()})}catch(h){throw this.tracer.restFailure?.({method:t,path:n,requestId:l,phase:"fetch",durationMs:Date.now()-u,error:h}),new Wl({message:`Network error calling ${t} ${n}`,cause:h,method:t,path:n,url:r,requestId:l,phase:"fetch",timeoutMs:hd,timestamp:Date.now(),durationMs:Date.now()-u})}let d;const f=c.clone();try{const h=await c.text();d=c.status===204&&h===""?{code:0,msg:"",data:null,request_id:l}:JSON.parse(h)}catch(h){throw this.tracer.restFailure?.({method:t,path:n,requestId:l,phase:"parse",durationMs:Date.now()-u,status:c.status,error:h}),new Wl({message:`Failed to parse JSON response from ${t} ${n}`,cause:h,method:t,path:n,url:r,requestId:l,phase:"parse",timeoutMs:hd,status:c.status,statusText:c.statusText,contentType:c.headers.get("content-type")??void 0,bodyPreview:await e9(f),timestamp:Date.now(),durationMs:Date.now()-u})}if(this.tracer.restResponse?.({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 wd({code:d.code,msg:typeof d.msg=="string"&&d.msg.length>0?d.msg:`HTTP ${c.status}${c.statusText?` ${c.statusText}`:""}`,requestId:d.request_id??l,details:d.details,timestamp:Date.now(),durationMs:Date.now()-u});return d.data}addClientHeaders(t){const n=this.opts.credentialStore?.getToken();n!==void 0&&(t.Authorization=`Bearer ${n}`);const o=this.opts.identity;o!==void 0&&(t["X-Kimi-Client-Id"]=o.clientId,t["X-Kimi-Client-Name"]=o.clientName,t["X-Kimi-Client-Version"]=o.clientVersion,t["X-Kimi-Client-Ui-Mode"]=o.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===PM)&&this.opts.credentialStore?.markAuthRequired?.()}}function DM(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 o3(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function Fr(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:DM(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 kU(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:"",pullRequest:e.git===void 0?void 0:e.git.pull_request,usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id.length>0?e.workspace.id:void 0}}function Pf(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function zk(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}}function ry(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:zk(e.source)};case"video":return{type:"video",source:zk(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 s3(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(ry),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function BM(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},{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 bU(e){return{content:e.content.map(BM),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,swarm_mode:e.swarmMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function CU(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function HM(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 wU(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function _U(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(wU),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function zM(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(_U),createdAt:e.created_at}}function xU(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 SU(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=xU(o);return{answers:t,method:e.method,note:e.note}}function Hh(e,t){return{id:e.id,agentId:e.agent_id??t,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,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,model:e.model,thinkingEffort:e.thinking_effort,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,swarmIndex:e.swarm_index,runInBackground:e.run_in_background??(e.kind==="subagent"?!0:void 0)}}function Wk(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 ba(e,t){const n=e[t];return typeof n=="string"?n:void 0}function td(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function pr(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function WM(e){if(!e||typeof e!="object")return null;const t=e,n=ba(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:ba(t,"goalId")??ba(t,"goal_id")??"goal",objective:ba(t,"objective")??"",completionCriterion:ba(t,"completionCriterion")??ba(t,"completion_criterion"),status:n,turnsUsed:td(t,"turnsUsed")??td(t,"turns_used")??0,tokensUsed:td(t,"tokensUsed")??td(t,"tokens_used")??0,wallClockMs:td(t,"wallClockMs")??td(t,"wall_clock_ms")??0,terminalReason:ba(t,"terminalReason")??ba(t,"terminal_reason"),budget:{tokenBudget:pr(s,"tokenBudget")??pr(s,"token_budget"),remainingTokens:pr(s,"remainingTokens")??pr(s,"remaining_tokens"),turnBudget:pr(s,"turnBudget")??pr(s,"turn_budget"),remainingTurns:pr(s,"remainingTurns")??pr(s,"remaining_turns"),wallClockBudgetMs:pr(s,"wallClockBudgetMs")??pr(s,"wall_clock_budget_ms"),remainingWallClockMs:pr(s,"remainingWallClockMs")??pr(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function AU(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:Fr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:Fr(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:Pf(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:Pf(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:DM(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=WM(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:s3(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(ry),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:HM(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:zM(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:Hh(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:i3(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 MU(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}}function nd(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 Uk(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 i3(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,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,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 TU(e){return e.session_id}function EU(e){return e.seq}function IU(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}const LU={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function $U(e,t){switch(t.op){case"reset":return NU(e,t);case"turn.upsert":return RU(e,t.turn);case"step.upsert":return PU(e,t.turnId,t.step);case"frame.upsert":return BU(e,t);case"append":return zU(e,t);case"marker.upsert":return Vk(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return Vk(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return jU(e,t.task);case"interaction.upsert":return VU(e,t.interaction);case"attachment.upsert":return KU(e,t.attachment);case"todo.upsert":return GU(e,t.todo);case"prompt.upsert":return XU(e,t.prompt);case"meta.merge":return ej(e,t.meta);case"items.remove":return UU(e,t.ids)}}function NU(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 jk(e,t){return{...e,kind:"turn",steps:[...t]}}function UM(e){return{kind:"turn",turnId:e,ordinal:IU(e),state:"running",origin:{kind:"other"},steps:[]}}function FU(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function n1(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function ly(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 r2(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function RU(e,t){const n=n1(e,t.turnId);return n?OU(n,t)?{state:e,changed:!1}:{state:{...e,items:r2(e.items,t.turnId,o=>jk(t,o.steps))},changed:!0}:{state:{...e,items:ly(e.items,jk(t,[]))},changed:!0}}function OU(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&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function PU(e,t,n){const o=n1(e,t)??UM(t),s=o.steps.findIndex(u=>u.stepId===n.stepId);let i,r=!0;if(s>=0){const u=o.steps[s];u&&DU(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=n1(e,t)?r2(e.items,t,()=>l):ly(e.items,l);return{state:{...e,items:a},changed:!0}}function DU(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 BU(e,t){const n=n1(e,t.turnId)??UM(t.turnId),o=n.steps.find(c=>c.stepId===t.stepId)??FU(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&&HU(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=n1(e,t.turnId)?r2(e.items,t.turnId,()=>a):ly(e.items,a);return{state:{...e,items:u},changed:!0}}function HU(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:!1}function zU(e,t){if(t.target.type==="task")return WU(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=n1(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=jM(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:r2(e.items,n,()=>d)},changed:!0}}function WU(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=jM(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 jM(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 Vk(e,t,n,o){if(e.items.some(i=>r3(i)===n)){let i=!1;const r=e.items.map(l=>r3(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 r3(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function UU(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(r3(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 jU(e,t){const n=e.tasks.get(t.taskId);if(n&&QU(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 VU(e,t){const n=e.interactions.get(t.interactionId);if(n&&qU(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 qU(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function KU(e,t){const n=e.attachments.get(t.attachmentId);if(n&&ZU(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 ZU(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function GU(e,t){const n=e.todos.get(t.todoId);if(n&&YU(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 YU(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function XU(e,t){const n=e.prompts.get(t.promptId);if(n&&JU(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 JU(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 QU(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 ej(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,swarm:t.modes.swarm===null?void 0:t.modes.swarm??e.meta.modes?.swarm}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.swarm===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 tj{constructor(t){this.agentId=t}#e=LU;#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=$U(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}}}function ct(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 Bd extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class VM extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const qM={};function Xa(e){return qM}function KM(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 l3(e,t){return typeof t=="bigint"?t.toString():t}function l2(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ay(e){return e==null}function uy(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function nj(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let s=(o.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(o)){const a=o.match(/\d?e-(\d?)/);a?.[1]&&(s=Number.parseInt(a[1]))}const i=n>s?n:s,r=Number.parseInt(e.toFixed(i).replace(".","")),l=Number.parseInt(t.toFixed(i).replace(".",""));return r%l/10**i}const qk=Symbol("evaluating");function Jn(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==qk)return o===void 0&&(o=qk,o=n()),o},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function Mc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function uu(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function Kk(e){return JSON.stringify(e)}function oj(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ZM="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function yp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const sj=l2(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function o1(e){if(yp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(yp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function GM(e){return o1(e)?{...e}:Array.isArray(e)?[...e]:e}const ij=new Set(["string","number","symbol"]);function s1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cu(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function Jt(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 rj(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const lj={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 aj(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=uu(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 Mc(this,"shape",r),r},checks:[]});return cu(e,i)}function uj(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=uu(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 Mc(this,"shape",r),r},checks:[]});return cu(e,i)}function cj(e,t){if(!o1(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=uu(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Mc(this,"shape",i),i}});return cu(e,s)}function dj(e,t){if(!o1(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=uu(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Mc(this,"shape",o),o}});return cu(e,n)}function fj(e,t){const n=uu(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Mc(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return cu(e,n)}function pj(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=uu(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 Mc(this,"shape",a),a},checks:[]});return cu(t,r)}function hj(e,t,n){const o=uu(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 Mc(this,"shape",i),i}});return cu(t,o)}function _d(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 Q0(e){return typeof e=="string"?e:e?.message}function Ja(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const s=Q0(e.inst?._zod.def?.error?.(e))??Q0(t?.error?.(e))??Q0(n.customError?.(e))??Q0(n.localeError?.(e))??"Invalid input";o.message=s}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function cy(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function kp(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const YM=(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,l3,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},XM=ct("$ZodError",YM),JM=ct("$ZodError",YM,{Parent:Error});function mj(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 gj(e,t=n=>n.message){const n={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(r=>o({issues:r}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let r=n,l=0;for(;l(t,n,o,s)=>{const i=o?Object.assign(o,{async:!1}):{async:!1},r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise)throw new Bd;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Ja(a,i,Xa())));throw ZM(l,s?.callee),l}return r.value},fy=e=>async(t,n,o,s)=>{const i=o?Object.assign(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=>Ja(a,i,Xa())));throw ZM(l,s?.callee),l}return r.value},a2=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 Bd;return i.issues.length?{success:!1,error:new(e??XM)(i.issues.map(r=>Ja(r,s,Xa())))}:{success:!0,data:i.value}},vj=a2(JM),u2=e=>async(t,n,o)=>{const s=o?Object.assign(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=>Ja(r,s,Xa())))}:{success:!0,data:i.value}},yj=u2(JM),kj=e=>(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return dy(e)(t,n,s)},bj=e=>(t,n,o)=>dy(e)(t,n,o),Cj=e=>async(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fy(e)(t,n,s)},wj=e=>async(t,n,o)=>fy(e)(t,n,o),_j=e=>(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return a2(e)(t,n,s)},xj=e=>(t,n,o)=>a2(e)(t,n,o),Sj=e=>async(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return u2(e)(t,n,s)},Aj=e=>async(t,n,o)=>u2(e)(t,n,o),Mj=/^[cC][^\s-]{8,}$/,Tj=/^[0-9a-z]+$/,Ej=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ij=/^[0-9a-vA-V]{20}$/,Lj=/^[A-Za-z0-9]{27}$/,$j=/^[a-zA-Z0-9_-]{21}$/,Nj=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Fj=/^([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})$/,Zk=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)$/,Rj=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Oj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Pj(){return new RegExp(Oj,"u")}const Dj=/^(?:(?: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])$/,Bj=/^(([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}|:))$/,Hj=/^((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])$/,zj=/^(([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])$/,Wj=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,QM=/^[A-Za-z0-9_-]*$/,Uj=/^\+[1-9]\d{6,14}$/,eT="(?:(?:\\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])))",jj=new RegExp(`^${eT}$`);function tT(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 Vj(e){return new RegExp(`^${tT(e)}$`)}function qj(e){const t=tT({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(`^${eT}T(?:${o})$`)}const Kj=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Zj=/^-?\d+$/,nT=/^-?\d+(?:\.\d+)?$/,Gj=/^(?:true|false)$/i,Yj=/^[^A-Z]*$/,Xj=/^[^a-z]*$/,qi=ct("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),oT={number:"number",bigint:"bigint",object:"date"},sT=ct("$ZodCheckLessThan",(e,t)=>{qi.init(e,t);const n=oT[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{qi.init(e,t);const n=oT[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})}}),Jj=ct("$ZodCheckMultipleOf",(e,t)=>{qi.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):nj(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})}}),Qj=ct("$ZodCheckNumberFormat",(e,t)=>{qi.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=lj[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=Zj)}),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})}}),eV=ct("$ZodCheckMaxLength",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!ay(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=cy(s);o.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),tV=ct("$ZodCheckMinLength",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!ay(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=cy(s);o.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),nV=ct("$ZodCheckLengthEquals",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!ay(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=cy(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})}}),c2=ct("$ZodCheckStringFormat",(e,t)=>{var n,o;qi.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=()=>{})}),oV=ct("$ZodCheckRegex",(e,t)=>{c2.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})}}),sV=ct("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Yj),c2.init(e,t)}),iV=ct("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xj),c2.init(e,t)}),rV=ct("$ZodCheckIncludes",(e,t)=>{qi.init(e,t);const n=s1(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})}}),lV=ct("$ZodCheckStartsWith",(e,t)=>{qi.init(e,t);const n=new RegExp(`^${s1(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})}}),aV=ct("$ZodCheckEndsWith",(e,t)=>{qi.init(e,t);const n=new RegExp(`.*${s1(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})}}),uV=ct("$ZodCheckOverwrite",(e,t)=>{qi.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class cV{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 dV={major:4,minor:3,patch:6},No=ct("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=dV;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=_d(r),c;for(const d of l){if(d._zod.def.when){if(!d._zod.def.when(r))continue}else if(u)continue;const f=r.issues.length,h=d._zod.check(r);if(h instanceof Promise&&a?.async===!1)throw new Bd;if(c||h instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await h,r.issues.length!==f&&(u||(u=_d(r,f)))});else{if(r.issues.length===f)continue;u||(u=_d(r,f))}}return c?c.then(()=>r):r},i=(r,l,a)=>{if(_d(r))return r.aborted=!0,r;const u=s(l,o,a);if(u instanceof Promise){if(a.async===!1)throw new Bd;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 Bd;return a.then(u=>s(u,o,l))}return s(a,o,l)}}Jn(e,"~standard",()=>({validate:s=>{try{const i=vj(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return yj(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),py=ct("$ZodString",(e,t)=>{No.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Kj(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}}),Mo=ct("$ZodStringFormat",(e,t)=>{c2.init(e,t),py.init(e,t)}),fV=ct("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Fj),Mo.init(e,t)}),pV=ct("$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=Zk(o))}else t.pattern??(t.pattern=Zk());Mo.init(e,t)}),hV=ct("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rj),Mo.init(e,t)}),mV=ct("$ZodURL",(e,t)=>{Mo.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),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})}}}),gV=ct("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Pj()),Mo.init(e,t)}),vV=ct("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$j),Mo.init(e,t)}),yV=ct("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Mj),Mo.init(e,t)}),kV=ct("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Tj),Mo.init(e,t)}),bV=ct("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ej),Mo.init(e,t)}),CV=ct("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ij),Mo.init(e,t)}),wV=ct("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Lj),Mo.init(e,t)}),_V=ct("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qj(t)),Mo.init(e,t)}),xV=ct("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=jj),Mo.init(e,t)}),SV=ct("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Vj(t)),Mo.init(e,t)}),AV=ct("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Nj),Mo.init(e,t)}),MV=ct("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Dj),Mo.init(e,t),e._zod.bag.format="ipv4"}),TV=ct("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bj),Mo.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})}}}),EV=ct("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Hj),Mo.init(e,t)}),IV=ct("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=zj),Mo.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 rT(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const LV=ct("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Wj),Mo.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{rT(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function $V(e){if(!QM.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return rT(n)}const NV=ct("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=QM),Mo.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{$V(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),FV=ct("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Uj),Mo.init(e,t)});function RV(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 OV=ct("$ZodJWT",(e,t)=>{Mo.init(e,t),e._zod.check=n=>{RV(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),lT=ct("$ZodNumber",(e,t)=>{No.init(e,t),e._zod.pattern=e._zod.bag.pattern??nT,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}}),PV=ct("$ZodNumberFormat",(e,t)=>{Qj.init(e,t),lT.init(e,t)}),DV=ct("$ZodBoolean",(e,t)=>{No.init(e,t),e._zod.pattern=Gj,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}}),BV=ct("$ZodUnknown",(e,t)=>{No.init(e,t),e._zod.parse=n=>n}),HV=ct("$ZodNever",(e,t)=>{No.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Gk(e,t,n){e.issues.length&&t.issues.push(...xd(n,e.issues)),t.value[n]=e.value}const zV=ct("$ZodArray",(e,t)=>{No.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;rGk(u,n,r))):Gk(a,n,r)}return i.length?Promise.all(i).then(()=>n):n}});function Fm(e,t,n,o,s){if(e.issues.length){if(s&&!(n in o))return;t.issues.push(...xd(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function aT(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=rj(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function uT(e,t,n,o,s,i){const r=[],l=s.keySet,a=s.catchall._zod,u=a.def.type,c=a.optout==="optional";for(const d in t){if(l.has(d))continue;if(u==="never"){r.push(d);continue}const f=a.run({value:t[d],issues:[]},o);f instanceof Promise?e.push(f.then(h=>Fm(h,n,d,t,c))):Fm(f,n,d,t,c)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const WV=ct("$ZodObject",(e,t)=>{if(No.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=l2(()=>aT(t));Jn(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=yp,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 h=d[f],m=h._zod.optout==="optional",v=h._zod.run({value:u[f],issues:[]},a);v instanceof Promise?c.push(v.then(k=>Fm(k,l,f,u,m))):Fm(v,l,f,u,m)}return i?uT(c,u,l,a,o.value,e):c.length?Promise.all(c).then(()=>l):l}}),UV=ct("$ZodObjectJIT",(e,t)=>{WV.init(e,t);const n=e._zod.parse,o=l2(()=>aT(t)),s=f=>{const h=new cV(["shape","payload","ctx"]),m=o.value,v=_=>{const g=Kk(_);return`shape[${g}]._zod.run({ value: input[${g}], issues: [] }, ctx)`};h.write("const input = payload.value;");const k=Object.create(null);let w=0;for(const _ of m.keys)k[_]=`key_${w++}`;h.write("const newResult = {};");for(const _ of m.keys){const g=k[_],x=Kk(_),T=f[_]?._zod?.optout==="optional";h.write(`const ${g} = ${v(_)};`),T?h.write(` + if (${g}.issues.length) { + if (${x} in input) { + payload.issues = payload.issues.concat(${g}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${x}, ...iss.path] : [${x}] + }))); + } + } + + if (${g}.value === undefined) { + if (${x} in input) { + newResult[${x}] = undefined; + } + } else { + newResult[${x}] = ${g}.value; + } + + `):h.write(` + if (${g}.issues.length) { + payload.issues = payload.issues.concat(${g}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${x}, ...iss.path] : [${x}] + }))); + } + + if (${g}.value === undefined) { + if (${x} in input) { + newResult[${x}] = undefined; + } + } else { + newResult[${x}] = ${g}.value; + } + + `)}h.write("payload.value = newResult;"),h.write("return payload;");const b=h.compile();return(_,g)=>b(f,_,g)};let i;const r=yp,l=!qM.jitless,u=l&&sj.value,c=t.catchall;let d;e._zod.parse=(f,h)=>{d??(d=o.value);const m=f.value;return r(m)?l&&u&&h?.async===!1&&h.jitless!==!0?(i||(i=s(t.shape)),f=i(f,h),c?uT([],m,f,h,d,e):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function Yk(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=>!_d(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=>Ja(r,o,Xa())))}),t)}const cT=ct("$ZodUnion",(e,t)=>{No.init(e,t),Jn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Jn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Jn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Jn(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${s.map(i=>uy(i.source)).join("|")})$`)}});const n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return o(s,i);let r=!1;const l=[];for(const a of t.options){const u=a._zod.run({value:s.value,issues:[]},i);if(u instanceof Promise)l.push(u),r=!0;else{if(u.issues.length===0)return u;l.push(u)}}return r?Promise.all(l).then(a=>Yk(a,s,e,i)):Yk(l,s,e,i)}}),jV=ct("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,cT.init(e,t);const n=e._zod.parse;Jn(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=l2(()=>{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(!yp(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?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:r,path:[t.discriminator],inst:e}),s)}}),VV=ct("$ZodIntersection",(e,t)=>{No.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])=>Xk(n,a,u)):Xk(n,i,r)}});function a3(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(o1(e)&&o1(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=a3(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}),_d(e))return e;const r=a3(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 qV=ct("$ZodRecord",(e,t)=>{No.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!o1(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.valueType._zod.run({value:s[u],issues:[]},o);c instanceof Promise?i.push(c.then(d=>{d.issues.length&&n.issues.push(...xd(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...xd(u,c.issues)),n.value[u]=c.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__")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"&&nT.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=>Ja(d,o,Xa())),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(...xd(l,d.issues)),n.value[a.value]=d.value})):(c.issues.length&&n.issues.push(...xd(l,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),KV=ct("$ZodEnum",(e,t)=>{No.init(e,t);const n=KM(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>ij.has(typeof s)).map(s=>typeof s=="string"?s1(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}}),ZV=ct("$ZodLiteral",(e,t)=>{if(No.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"?s1(o):o?s1(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}}),GV=ct("$ZodTransform",(e,t)=>{No.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new VM(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));if(s instanceof Promise)throw new Bd;return n.value=s,n}});function Jk(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const dT=ct("$ZodOptional",(e,t)=>{No.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Jn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Jn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${uy(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>Jk(i,n.value)):Jk(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),YV=ct("$ZodExactOptional",(e,t)=>{dT.init(e,t),Jn(e._zod,"values",()=>t.innerType._zod.values),Jn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),XV=ct("$ZodNullable",(e,t)=>{No.init(e,t),Jn(e._zod,"optin",()=>t.innerType._zod.optin),Jn(e._zod,"optout",()=>t.innerType._zod.optout),Jn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${uy(n.source)}|null)$`):void 0}),Jn(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)}),JV=ct("$ZodDefault",(e,t)=>{No.init(e,t),e._zod.optin="optional",Jn(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=>Qk(i,t)):Qk(s,t)}});function Qk(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const QV=ct("$ZodPrefault",(e,t)=>{No.init(e,t),e._zod.optin="optional",Jn(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))}),eq=ct("$ZodNonOptional",(e,t)=>{No.init(e,t),Jn(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=>eb(i,e)):eb(s,e)}});function eb(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 tq=ct("$ZodCatch",(e,t)=>{No.init(e,t),Jn(e._zod,"optin",()=>t.innerType._zod.optin),Jn(e._zod,"optout",()=>t.innerType._zod.optout),Jn(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=>Ja(r,o,Xa()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Ja(i,o,Xa()))},input:n.value}),n.issues=[]),n)}}),nq=ct("$ZodPipe",(e,t)=>{No.init(e,t),Jn(e._zod,"values",()=>t.in._zod.values),Jn(e._zod,"optin",()=>t.in._zod.optin),Jn(e._zod,"optout",()=>t.out._zod.optout),Jn(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=>eh(r,t.in,o)):eh(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>eh(i,t.out,o)):eh(s,t.out,o)}});function eh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const oq=ct("$ZodReadonly",(e,t)=>{No.init(e,t),Jn(e._zod,"propValues",()=>t.innerType._zod.propValues),Jn(e._zod,"values",()=>t.innerType._zod.values),Jn(e._zod,"optin",()=>t.innerType?._zod?.optin),Jn(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(tb):tb(s)}});function tb(e){return e.value=Object.freeze(e.value),e}const sq=ct("$ZodCustom",(e,t)=>{qi.init(e,t),No.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=>nb(i,n,o,e));nb(s,n,o,e)}});function nb(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(kp(s))}}var ob;class iq{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 rq(){return new iq}(ob=globalThis).__zod_globalRegistry??(ob.__zod_globalRegistry=rq());const vf=globalThis.__zod_globalRegistry;function lq(e,t){return new e({type:"string",...Jt(t)})}function aq(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Jt(t)})}function sb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Jt(t)})}function uq(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Jt(t)})}function cq(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Jt(t)})}function dq(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Jt(t)})}function fq(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Jt(t)})}function pq(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Jt(t)})}function hq(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Jt(t)})}function mq(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Jt(t)})}function gq(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Jt(t)})}function vq(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Jt(t)})}function yq(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Jt(t)})}function kq(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Jt(t)})}function bq(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Jt(t)})}function Cq(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Jt(t)})}function wq(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Jt(t)})}function _q(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Jt(t)})}function xq(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Jt(t)})}function Sq(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Jt(t)})}function Aq(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Jt(t)})}function Mq(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Jt(t)})}function Tq(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Jt(t)})}function Eq(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Jt(t)})}function Iq(e,t){return new e({type:"string",format:"date",check:"string_format",...Jt(t)})}function Lq(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Jt(t)})}function $q(e,t){return new e({type:"string",format:"duration",check:"string_format",...Jt(t)})}function Nq(e,t){return new e({type:"number",checks:[],...Jt(t)})}function Fq(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Jt(t)})}function Rq(e,t){return new e({type:"boolean",...Jt(t)})}function Oq(e){return new e({type:"unknown"})}function Pq(e,t){return new e({type:"never",...Jt(t)})}function ib(e,t){return new sT({check:"less_than",...Jt(t),value:e,inclusive:!1})}function t9(e,t){return new sT({check:"less_than",...Jt(t),value:e,inclusive:!0})}function rb(e,t){return new iT({check:"greater_than",...Jt(t),value:e,inclusive:!1})}function n9(e,t){return new iT({check:"greater_than",...Jt(t),value:e,inclusive:!0})}function lb(e,t){return new Jj({check:"multiple_of",...Jt(t),value:e})}function fT(e,t){return new eV({check:"max_length",...Jt(t),maximum:e})}function Rm(e,t){return new tV({check:"min_length",...Jt(t),minimum:e})}function pT(e,t){return new nV({check:"length_equals",...Jt(t),length:e})}function Dq(e,t){return new oV({check:"string_format",format:"regex",...Jt(t),pattern:e})}function Bq(e){return new sV({check:"string_format",format:"lowercase",...Jt(e)})}function Hq(e){return new iV({check:"string_format",format:"uppercase",...Jt(e)})}function zq(e,t){return new rV({check:"string_format",format:"includes",...Jt(t),includes:e})}function Wq(e,t){return new lV({check:"string_format",format:"starts_with",...Jt(t),prefix:e})}function Uq(e,t){return new aV({check:"string_format",format:"ends_with",...Jt(t),suffix:e})}function g1(e){return new uV({check:"overwrite",tx:e})}function jq(e){return g1(t=>t.normalize(e))}function Vq(){return g1(e=>e.trim())}function qq(){return g1(e=>e.toLowerCase())}function Kq(){return g1(e=>e.toUpperCase())}function Zq(){return g1(e=>oj(e))}function Gq(e,t,n){return new e({type:"array",element:t,...Jt(n)})}function Yq(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Jt(n)})}function Xq(e){const t=Jq(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(kp(o,n.value,t._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(kp(s))}},e(n.value,n)));return t}function Jq(e,t){const n=new qi({check:"custom",...Jt(t)});return n._zod.check=e,n}function hT(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??vf,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 cs(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,h=t.processors[s.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);h(e,t,f,c)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),cs(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"&&gi(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&r.schema._prefault&&((o=r.schema).default??(o.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function mT(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??(m=>m);if(d)return{ref:f(d)};const h=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=h,{defId:h,ref:`${f("__shared")}#/${l}/${h}`}}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 gT(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=r=>{const l=e.seen.get(r);if(l.ref===null)return;const a=l.def??l.schema,u={...a},c=l.ref;if(l.ref=null,c){o(c);const f=e.seen.get(c),h=f.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(h)):Object.assign(a,h),Object.assign(a,u),r._zod.parent===c)for(const v in a)v==="$ref"||v==="allOf"||v in u||delete a[v];if(h.$ref&&f.def)for(const v in a)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(a[v])===JSON.stringify(f.def[v])&&delete a[v]}const d=r._zod.parent;if(d&&d!==c){o(d);const f=e.seen.get(d);if(f?.schema.$ref&&(a.$ref=f.schema.$ref,f.def))for(const h in a)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(a[h])===JSON.stringify(f.def[h])&&delete a[h]}e.override({zodSchema:r,jsonSchema:a,path:l.path??[]})};for(const r of[...e.seen.entries()].reverse())o(r[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 r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(r)}Object.assign(s,n.def??n.schema);const i=e.external?.defs??{};for(const r of e.seen.entries()){const l=r[1];l.def&&l.defId&&(i[l.defId]=l.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:Om(t,"input",e.processors),output:Om(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function gi(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 gi(o.element,n);if(o.type==="set")return gi(o.valueType,n);if(o.type==="lazy")return gi(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 gi(o.innerType,n);if(o.type==="intersection")return gi(o.left,n)||gi(o.right,n);if(o.type==="record"||o.type==="map")return gi(o.keyType,n)||gi(o.valueType,n);if(o.type==="pipe")return gi(o.in,n)||gi(o.out,n);if(o.type==="object"){for(const s in o.shape)if(gi(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(gi(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(gi(s,n))return!0;return!!(o.rest&&gi(o.rest,n))}return!1}const Qq=(e,t={})=>n=>{const o=hT({...n,processors:t});return cs(e,o),mT(o,e),gT(o,e)},Om=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},r=hT({...s??{},target:i,io:t,processors:n});return cs(e,r),mT(r,e),gT(r,e)},eK={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tK=(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=eK[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}))])}},nK=(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",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c),typeof i=="number"&&(s.minimum=i,typeof c=="number"&&t.target!=="draft-04"&&(c>=i?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof r=="number"&&(s.maximum=r,typeof u=="number"&&t.target!=="draft-04"&&(u<=r?delete s.maximum:delete s.exclusiveMaximum)),typeof a=="number"&&(s.multipleOf=a)},oK=(e,t,n,o)=>{n.type="boolean"},sK=(e,t,n,o)=>{n.not={}},iK=(e,t,n,o)=>{},rK=(e,t,n,o)=>{const s=e._zod.def,i=KM(s.entries);i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),n.enum=i},lK=(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},aK=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},uK=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},cK=(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=cs(i.element,t,{...o,path:[...o.path,"items"]})},dK=(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]=cs(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=cs(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},fK=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,r=s.options.map((l,a)=>cs(l,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=r:n.anyOf=r},pK=(e,t,n,o)=>{const s=e._zod.def,i=cs(s.left,t,{...o,path:[...o.path,"allOf",0]}),r=cs(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},hK=(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=cs(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=cs(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=cs(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)}},mK=(e,t,n,o)=>{const s=e._zod.def,i=cs(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"}]},gK=(e,t,n,o)=>{const s=e._zod.def;cs(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},vK=(e,t,n,o)=>{const s=e._zod.def;cs(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},yK=(e,t,n,o)=>{const s=e._zod.def;cs(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)))},kK=(e,t,n,o)=>{const s=e._zod.def;cs(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},bK=(e,t,n,o)=>{const s=e._zod.def,i=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;cs(i,t,o);const r=t.seen.get(e);r.ref=i},CK=(e,t,n,o)=>{const s=e._zod.def;cs(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},vT=(e,t,n,o)=>{const s=e._zod.def;cs(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},wK=ct("ZodISODateTime",(e,t)=>{_V.init(e,t),Ro.init(e,t)});function _K(e){return Eq(wK,e)}const xK=ct("ZodISODate",(e,t)=>{xV.init(e,t),Ro.init(e,t)});function SK(e){return Iq(xK,e)}const AK=ct("ZodISOTime",(e,t)=>{SV.init(e,t),Ro.init(e,t)});function MK(e){return Lq(AK,e)}const TK=ct("ZodISODuration",(e,t)=>{AV.init(e,t),Ro.init(e,t)});function EK(e){return $q(TK,e)}const IK=(e,t)=>{XM.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>gj(e,n)},flatten:{value:n=>mj(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,l3,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,l3,2)}},isEmpty:{get(){return e.issues.length===0}}})},Mr=ct("ZodError",IK,{Parent:Error}),LK=dy(Mr),$K=fy(Mr),NK=a2(Mr),FK=u2(Mr),RK=kj(Mr),OK=bj(Mr),PK=Cj(Mr),DK=wj(Mr),BK=_j(Mr),HK=xj(Mr),zK=Sj(Mr),WK=Aj(Mr),Fo=ct("ZodType",(e,t)=>(No.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Om(e,"input"),output:Om(e,"output")}}),e.toJSONSchema=Qq(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(uu(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>cu(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>LK(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>NK(e,n,o),e.parseAsync=async(n,o)=>$K(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>FK(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>RK(e,n,o),e.decode=(n,o)=>OK(e,n,o),e.encodeAsync=async(n,o)=>PK(e,n,o),e.decodeAsync=async(n,o)=>DK(e,n,o),e.safeEncode=(n,o)=>BK(e,n,o),e.safeDecode=(n,o)=>HK(e,n,o),e.safeEncodeAsync=async(n,o)=>zK(e,n,o),e.safeDecodeAsync=async(n,o)=>WK(e,n,o),e.refine=(n,o)=>e.check(OZ(n,o)),e.superRefine=n=>e.check(PZ(n)),e.overwrite=n=>e.check(g1(n)),e.optional=()=>cb(e),e.exactOptional=()=>_Z(e),e.nullable=()=>db(e),e.nullish=()=>cb(db(e)),e.nonoptional=n=>EZ(e,n),e.array=()=>Wn(e),e.or=n=>hZ([e,n]),e.and=n=>vZ(e,n),e.transform=n=>fb(e,CZ(n)),e.default=n=>AZ(e,n),e.prefault=n=>TZ(e,n),e.catch=n=>LZ(e,n),e.pipe=n=>fb(e,n),e.readonly=()=>FZ(e),e.describe=n=>{const o=e.clone();return vf.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return vf.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return vf.get(e);const o=e.clone();return vf.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),yT=ct("_ZodString",(e,t)=>{py.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>tK(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Dq(...o)),e.includes=(...o)=>e.check(zq(...o)),e.startsWith=(...o)=>e.check(Wq(...o)),e.endsWith=(...o)=>e.check(Uq(...o)),e.min=(...o)=>e.check(Rm(...o)),e.max=(...o)=>e.check(fT(...o)),e.length=(...o)=>e.check(pT(...o)),e.nonempty=(...o)=>e.check(Rm(1,...o)),e.lowercase=o=>e.check(Bq(o)),e.uppercase=o=>e.check(Hq(o)),e.trim=()=>e.check(Vq()),e.normalize=(...o)=>e.check(jq(...o)),e.toLowerCase=()=>e.check(qq()),e.toUpperCase=()=>e.check(Kq()),e.slugify=()=>e.check(Zq())}),UK=ct("ZodString",(e,t)=>{py.init(e,t),yT.init(e,t),e.email=n=>e.check(aq(jK,n)),e.url=n=>e.check(pq(VK,n)),e.jwt=n=>e.check(Tq(rZ,n)),e.emoji=n=>e.check(hq(qK,n)),e.guid=n=>e.check(sb(ab,n)),e.uuid=n=>e.check(uq(th,n)),e.uuidv4=n=>e.check(cq(th,n)),e.uuidv6=n=>e.check(dq(th,n)),e.uuidv7=n=>e.check(fq(th,n)),e.nanoid=n=>e.check(mq(KK,n)),e.guid=n=>e.check(sb(ab,n)),e.cuid=n=>e.check(gq(ZK,n)),e.cuid2=n=>e.check(vq(GK,n)),e.ulid=n=>e.check(yq(YK,n)),e.base64=n=>e.check(Sq(oZ,n)),e.base64url=n=>e.check(Aq(sZ,n)),e.xid=n=>e.check(kq(XK,n)),e.ksuid=n=>e.check(bq(JK,n)),e.ipv4=n=>e.check(Cq(QK,n)),e.ipv6=n=>e.check(wq(eZ,n)),e.cidrv4=n=>e.check(_q(tZ,n)),e.cidrv6=n=>e.check(xq(nZ,n)),e.e164=n=>e.check(Mq(iZ,n)),e.datetime=n=>e.check(_K(n)),e.date=n=>e.check(SK(n)),e.time=n=>e.check(MK(n)),e.duration=n=>e.check(EK(n))});function bt(e){return lq(UK,e)}const Ro=ct("ZodStringFormat",(e,t)=>{Mo.init(e,t),yT.init(e,t)}),jK=ct("ZodEmail",(e,t)=>{hV.init(e,t),Ro.init(e,t)}),ab=ct("ZodGUID",(e,t)=>{fV.init(e,t),Ro.init(e,t)}),th=ct("ZodUUID",(e,t)=>{pV.init(e,t),Ro.init(e,t)}),VK=ct("ZodURL",(e,t)=>{mV.init(e,t),Ro.init(e,t)}),qK=ct("ZodEmoji",(e,t)=>{gV.init(e,t),Ro.init(e,t)}),KK=ct("ZodNanoID",(e,t)=>{vV.init(e,t),Ro.init(e,t)}),ZK=ct("ZodCUID",(e,t)=>{yV.init(e,t),Ro.init(e,t)}),GK=ct("ZodCUID2",(e,t)=>{kV.init(e,t),Ro.init(e,t)}),YK=ct("ZodULID",(e,t)=>{bV.init(e,t),Ro.init(e,t)}),XK=ct("ZodXID",(e,t)=>{CV.init(e,t),Ro.init(e,t)}),JK=ct("ZodKSUID",(e,t)=>{wV.init(e,t),Ro.init(e,t)}),QK=ct("ZodIPv4",(e,t)=>{MV.init(e,t),Ro.init(e,t)}),eZ=ct("ZodIPv6",(e,t)=>{TV.init(e,t),Ro.init(e,t)}),tZ=ct("ZodCIDRv4",(e,t)=>{EV.init(e,t),Ro.init(e,t)}),nZ=ct("ZodCIDRv6",(e,t)=>{IV.init(e,t),Ro.init(e,t)}),oZ=ct("ZodBase64",(e,t)=>{LV.init(e,t),Ro.init(e,t)}),sZ=ct("ZodBase64URL",(e,t)=>{NV.init(e,t),Ro.init(e,t)}),iZ=ct("ZodE164",(e,t)=>{FV.init(e,t),Ro.init(e,t)}),rZ=ct("ZodJWT",(e,t)=>{OV.init(e,t),Ro.init(e,t)}),kT=ct("ZodNumber",(e,t)=>{lT.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>nK(e,o,s),e.gt=(o,s)=>e.check(rb(o,s)),e.gte=(o,s)=>e.check(n9(o,s)),e.min=(o,s)=>e.check(n9(o,s)),e.lt=(o,s)=>e.check(ib(o,s)),e.lte=(o,s)=>e.check(t9(o,s)),e.max=(o,s)=>e.check(t9(o,s)),e.int=o=>e.check(ub(o)),e.safe=o=>e.check(ub(o)),e.positive=o=>e.check(rb(0,o)),e.nonnegative=o=>e.check(n9(0,o)),e.negative=o=>e.check(ib(0,o)),e.nonpositive=o=>e.check(t9(0,o)),e.multipleOf=(o,s)=>e.check(lb(o,s)),e.step=(o,s)=>e.check(lb(o,s)),e.finite=()=>e;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 Ut(e){return Nq(kT,e)}const lZ=ct("ZodNumberFormat",(e,t)=>{PV.init(e,t),kT.init(e,t)});function ub(e){return Fq(lZ,e)}const aZ=ct("ZodBoolean",(e,t)=>{DV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>oK(e,n,o)});function Hp(e){return Rq(aZ,e)}const uZ=ct("ZodUnknown",(e,t)=>{BV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>iK()});function Cs(){return Oq(uZ)}const cZ=ct("ZodNever",(e,t)=>{HV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>sK(e,n,o)});function dZ(e){return Pq(cZ,e)}const fZ=ct("ZodArray",(e,t)=>{zV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>cK(e,n,o,s),e.element=t.element,e.min=(n,o)=>e.check(Rm(n,o)),e.nonempty=n=>e.check(Rm(1,n)),e.max=(n,o)=>e.check(fT(n,o)),e.length=(n,o)=>e.check(pT(n,o)),e.unwrap=()=>e.element});function Wn(e,t){return Gq(fZ,e,t)}const pZ=ct("ZodObject",(e,t)=>{UV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>dK(e,n,o,s),Jn(e,"shape",()=>t.shape),e.keyof=()=>So(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Cs()}),e.loose=()=>e.clone({...e._zod.def,catchall:Cs()}),e.strict=()=>e.clone({...e._zod.def,catchall:dZ()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>cj(e,n),e.safeExtend=n=>dj(e,n),e.merge=n=>fj(e,n),e.pick=n=>aj(e,n),e.omit=n=>uj(e,n),e.partial=(...n)=>pj(CT,e,n[0]),e.required=(...n)=>hj(wT,e,n[0])});function $t(e,t){const n={type:"object",shape:e??{},...Jt(t)};return new pZ(n)}const bT=ct("ZodUnion",(e,t)=>{cT.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>fK(e,n,o,s),e.options=t.options});function hZ(e,t){return new bT({type:"union",options:e,...Jt(t)})}const mZ=ct("ZodDiscriminatedUnion",(e,t)=>{bT.init(e,t),jV.init(e,t)});function du(e,t,n){return new mZ({type:"union",options:t,discriminator:e,...Jt(n)})}const gZ=ct("ZodIntersection",(e,t)=>{VV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>pK(e,n,o,s)});function vZ(e,t){return new gZ({type:"intersection",left:e,right:t})}const yZ=ct("ZodRecord",(e,t)=>{qV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>hK(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function hy(e,t,n){return new yZ({type:"record",keyType:e,valueType:t,...Jt(n)})}const u3=ct("ZodEnum",(e,t)=>{KV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>rK(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 u3({...t,checks:[],...Jt(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 u3({...t,checks:[],...Jt(s),entries:i})}});function So(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new u3({type:"enum",entries:n,...Jt(t)})}const kZ=ct("ZodLiteral",(e,t)=>{ZV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>lK(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 mn(e,t){return new kZ({type:"literal",values:Array.isArray(e)?e:[e],...Jt(t)})}const bZ=ct("ZodTransform",(e,t)=>{GV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>uK(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new VM(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(kp(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(kp(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function CZ(e){return new bZ({type:"transform",transform:e})}const CT=ct("ZodOptional",(e,t)=>{dT.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>vT(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function cb(e){return new CT({type:"optional",innerType:e})}const wZ=ct("ZodExactOptional",(e,t)=>{YV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>vT(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function _Z(e){return new wZ({type:"optional",innerType:e})}const xZ=ct("ZodNullable",(e,t)=>{XV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>mK(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function db(e){return new xZ({type:"nullable",innerType:e})}const SZ=ct("ZodDefault",(e,t)=>{JV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>vK(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function AZ(e,t){return new SZ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():GM(t)}})}const MZ=ct("ZodPrefault",(e,t)=>{QV.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>yK(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function TZ(e,t){return new MZ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():GM(t)}})}const wT=ct("ZodNonOptional",(e,t)=>{eq.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>gK(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function EZ(e,t){return new wT({type:"nonoptional",innerType:e,...Jt(t)})}const IZ=ct("ZodCatch",(e,t)=>{tq.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>kK(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function LZ(e,t){return new IZ({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const $Z=ct("ZodPipe",(e,t)=>{nq.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>bK(e,n,o,s),e.in=t.in,e.out=t.out});function fb(e,t){return new $Z({type:"pipe",in:e,out:t})}const NZ=ct("ZodReadonly",(e,t)=>{oq.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>CK(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function FZ(e){return new NZ({type:"readonly",innerType:e})}const RZ=ct("ZodCustom",(e,t)=>{sq.init(e,t),Fo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>aK(e,n)});function OZ(e,t={}){return Yq(RZ,e,t)}function PZ(e){return Xq(e)}const mc=bt().min(1),my=bt().min(1),zp=bt().min(1),gc=bt().min(1),ar=bt().min(1),DZ=/^[A-Za-z0-9._-]{1,128}$/;function BZ(e){return DZ.test(e)&&e!=="."&&e!==".."}const _T=du("kind",[$t({kind:mn("user"),payload:Cs().optional()}),$t({kind:mn("cron"),taskId:gc.optional(),payload:Cs().optional()}),$t({kind:mn("task"),taskId:gc,payload:Cs().optional()}),$t({kind:mn("hook"),payload:Cs().optional()}),$t({kind:mn("compaction"),payload:Cs().optional()}),$t({kind:mn("side"),payload:Cs().optional()}),$t({kind:mn("other"),payload:Cs().optional()})]),HZ=$t({inputTokens:Ut().optional(),outputTokens:Ut().optional(),cachedTokens:Ut().optional(),cost:Ut().optional()}),Df=$t({inputOther:Ut(),output:Ut(),inputCacheRead:Ut(),inputCacheCreation:Ut()}),zZ=$t({llmFirstTokenLatencyMs:Ut().optional(),llmStreamDurationMs:Ut().optional(),llmRequestBuildMs:Ut().optional(),llmServerFirstTokenMs:Ut().optional(),llmServerDecodeMs:Ut().optional(),llmClientConsumeMs:Ut().optional()}),WZ=$t({failedAttempt:Ut(),nextAttempt:Ut(),maxAttempts:Ut(),delayMs:Ut(),errorName:bt(),errorMessage:bt(),statusCode:Ut().optional()}),xT=So(["queued","running","completed","failed","cancelled"]),UZ=So(["running","completed","interrupted","failed"]),jZ=$t({kind:mn("text"),frameId:zp,role:So(["assistant","user"]),text:bt(),attachmentIds:Wn(bt()).optional(),taskId:gc.optional()}),VZ=$t({kind:mn("thinking"),frameId:zp,text:bt()}),qZ=$t({agentId:ar,role:So(["child","member"]).optional()}),KZ=$t({kind:So(["stdout","stderr","progress","status","custom"]),text:bt().optional(),percent:Ut().optional(),customKind:bt().optional(),customData:Cs().optional()}),ZZ=$t({kind:mn("tool"),frameId:zp,toolCallId:bt(),name:bt(),view:bt().optional(),state:So(["running","done","error"]),input:Cs().optional(),output:Cs().optional(),display:Cs().optional(),error:bt().optional(),inputText:bt().optional(),progress:KZ.optional(),taskId:gc.optional(),approvalId:bt().optional(),todoId:bt().optional(),agentRefs:Wn(qZ).optional()}),gy=$t({interactionId:bt(),interactionKind:So(["approval","question"]),toolCallId:bt().optional(),state:So(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Cs().optional(),response:Cs().optional()}),GZ=$t({kind:mn("notice"),frameId:zp,level:So(["error","warning","info"]),source:bt().optional(),message:bt(),detail:Cs().optional()}),ST=du("kind",[jZ,VZ,ZZ,GZ]),AT=$t({kind:mn("step"),stepId:my,turnId:mc,ordinal:Ut().int(),state:UZ,frames:Wn(ST),startedAt:bt().optional(),endedAt:bt().optional(),usage:Df.optional(),finishReason:bt().optional(),timing:zZ.optional(),retry:WZ.optional(),endReason:bt().optional(),endMessage:bt().optional()}),MT=$t({kind:mn("turn"),turnId:mc,ordinal:Ut().int(),state:xT,origin:_T,prompt:bt().optional(),attachmentIds:Wn(bt()).optional(),steps:Wn(AT),startedAt:bt().optional(),endedAt:bt().optional(),usage:HZ.optional(),durationMs:Ut().optional(),error:bt().optional()}),TT=$t({kind:mn("marker"),markerId:bt(),marker:bt(),payload:Cs().optional(),at:bt().optional()}),ET=$t({kind:mn("taskref"),refId:bt(),taskId:gc,at:bt().optional()}),IT=du("kind",[MT,TT,ET]),vy=$t({taskId:gc,kind:So(["shell","subagent","tool","other"]),state:So(["running","completed","failed","timed_out","killed","lost"]),detached:Hp(),description:bt().optional(),agentId:ar.optional(),outputTail:bt(),startedAt:bt().optional(),endedAt:bt().optional(),resultSummary:bt().optional(),error:bt().optional(),stateReason:bt().optional(),usage:Df.optional()}),YZ=$t({objective:bt(),status:So(["active","paused","blocked","complete"]),completionCriterion:bt().optional(),budgetUsed:Ut().optional(),budgetLimit:Ut().optional()}),XZ=$t({plan:$t({reviewPath:bt().optional(),version:Ut().optional()}).optional(),swarm:$t({trigger:bt().optional()}).optional()}),JZ=$t({plan:$t({reviewPath:bt().optional(),version:Ut().optional()}).nullable().optional(),swarm:$t({trigger:bt().optional()}).nullable().optional()}),QZ=du("kind",[$t({kind:mn("idle")}),$t({kind:mn("running"),turnId:Ut(),step:Ut(),stepId:bt(),since:Ut()}),$t({kind:mn("streaming"),turnId:Ut(),step:Ut(),stepId:bt(),stream:So(["assistant","thinking","tool_call"]),toolCallId:bt().optional(),toolName:bt().optional(),since:Ut()}),$t({kind:mn("tool_call"),turnId:Ut(),step:Ut(),toolCallId:bt(),name:bt(),since:Ut()}),$t({kind:mn("retrying"),turnId:Ut(),step:Ut(),stepId:bt(),failedAttempt:Ut(),nextAttempt:Ut(),maxAttempts:Ut(),delayMs:Ut(),errorName:bt().optional(),statusCode:Ut().optional(),since:Ut()}),$t({kind:mn("awaiting_approval"),turnId:Ut(),step:Ut().optional(),approval:Cs().optional(),since:Ut()}),$t({kind:mn("interrupted"),turnId:Ut(),step:Ut().optional(),reason:So(["aborted","max_steps","error"]),message:bt().optional(),at:Ut()}),$t({kind:mn("ended"),turnId:Ut(),reason:So(["completed","cancelled","failed","blocked"]),durationMs:Ut().optional(),at:Ut()})]),eG=$t({byModel:hy(bt(),Df).optional(),currentTurn:Df.optional(),total:Df.optional()}),tG=$t({model:bt().optional(),thinkingEffort:bt().optional(),usage:eG.optional(),contextTokens:Ut().optional(),maxContextTokens:Ut().optional(),contextUsage:Ut().optional(),permission:So(["manual","yolo","auto"]).optional(),phase:QZ.optional()}),yy=$t({goal:YZ.optional(),modes:XZ.optional(),activity:So(["idle","turn","disposing","unknown"]).optional(),agent:tG.optional()}),nG=yy.extend({modes:JZ.optional()}),d2=$t({attachmentId:bt(),mediaType:bt(),name:bt().optional(),size:Ut().optional(),source:du("kind",[$t({kind:mn("url"),url:bt()}),$t({kind:mn("file"),fileId:bt()})]).optional(),placeholder:bt().optional()}),oG=$t({title:bt(),status:So(["pending","in_progress","done"])}),ky=$t({todoId:bt(),items:Wn(oG),updatedAt:bt().optional()}),by=$t({promptId:bt(),status:So(["running","queued","blocked","completed","failed","aborted"]),userMessageId:bt().optional(),content:Cs().optional(),createdAt:bt(),finishedAt:bt().optional(),steeredAt:bt().optional()}),LT=$t({items:Wn(IT),tasks:Wn(vy),interactions:Wn(gy).default([]),attachments:Wn(d2).default([]),todos:Wn(ky).default([]),prompts:Wn(by).default([]),meta:yy,hasMoreOlder:Hp().optional()}),sG=MT.omit({steps:!0}),iG=AT.omit({frames:!0}),rG=du("type",[$t({type:mn("frame"),turnId:mc,stepId:my,frameId:zp}),$t({type:mn("task"),taskId:gc})]),Cy=du("op",[$t({op:mn("reset"),agentId:ar,snapshot:LT}),$t({op:mn("turn.upsert"),turn:sG}),$t({op:mn("step.upsert"),turnId:mc,step:iG}),$t({op:mn("frame.upsert"),turnId:mc,stepId:my,frame:ST}),$t({op:mn("append"),target:rG,offset:Ut().int().nonnegative(),text:bt()}),$t({op:mn("marker.upsert"),item:TT,beforeTurn:Ut().int().optional()}),$t({op:mn("taskref.upsert"),item:ET,beforeTurn:Ut().int().optional()}),$t({op:mn("task.upsert"),task:vy}),$t({op:mn("interaction.upsert"),interaction:gy}),$t({op:mn("attachment.upsert"),attachment:d2}),$t({op:mn("todo.upsert"),todo:ky}),$t({op:mn("prompt.upsert"),prompt:by}),$t({op:mn("meta.merge"),meta:nG}),$t({op:mn("items.remove"),ids:Wn(bt())})]);$t({agentId:ar,ops:Wn(Cy)});const lG=So(["off","turn","block","delta"]),i1=Ut().int().nonnegative(),aG=hy(bt(),lG);$t({session_id:bt().min(1),transcript:aG,transcript_since:hy(bt(),i1).optional()});$t({agent_id:ar,before_turn:bt().min(1).optional(),after_turn:bt().min(1).optional(),page_size:Ut().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"]}),BZ(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const uG=$t({agentId:ar,type:So(["main","sub","independent"]).optional(),parentAgentId:ar.optional(),label:bt().optional(),createdAt:bt().optional(),disposedAt:bt().optional()}),cG=$t({agent_id:ar,items:Wn(IT),has_more:Hp(),tasks:Wn(vy),interactions:Wn(gy).default([]),attachments:Wn(d2).default([]),todos:Wn(ky).default([]),prompts:Wn(by).default([]),meta:yy,agents:Wn(uG),pending_interactions:Wn(bt()),seq:i1.optional()});$t({agent_id:ar,batches:Wn($t({seq:i1,ops:Wn(Cy)})),latest_seq:i1,complete:Hp()});const dG=$t({turn_id:mc,ordinal:Ut().int(),state:xT,origin:_T,prompt:bt(),attachment_ids:Wn(bt()).optional(),started_at:bt().optional()});$t({agents:Wn($t({agent_id:ar,messages:Wn(dG),attachments:Wn(d2).default([])}))});const fG=$t({state:So(["pending","approved","rejected","cancelled"]),selected_option:bt().optional(),feedback:bt().optional()}),pG=$t({tool_call_id:bt(),turn_id:mc,source:So(["interaction","display","output"]),plan:bt(),path:bt().optional(),options:Wn($t({label:bt(),description:bt().optional()})).optional(),review:fG.optional()});$t({agent_id:ar,plans:Wn(pG)});const hG=$t({agent_id:ar,snapshot:LT,has_more_older:Hp(),seq:i1.optional()}),mG=$t({agent_id:ar,ops:Wn(Cy),seq:i1.optional()}),$T=hG.extend({type:mn("transcript.reset")}),NT=mG.extend({type:mn("transcript.ops")});du("type",[$T,NT]);const pb=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"]),gG=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"]),vG=new Set(["server_hello","ack","ping","resync_required","error","pong"]),yG=new Set(["assistant.delta","thinking.delta"]);function kG(e,t){if(vG.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return yG.has(o)?bG(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?gG.has(o)?{route:"protocol"}:pb.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:pb.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function bG(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"}const CG="kimi-code.bearer.",wG=3e4;class _G{constructor(t){this.opts=t,this.tracer=t.tracer??oy}ws=null;connected=!1;closed=!1;subscriptions=new Map;transcriptSubscriptions=new Map;sideChannelAgents=new Map;pendingSubscriptions=[];terminalAttachments=new Map;msgSeq=0;clientHelloId=null;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;tracer;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),this.tracer.wsEvent?.({kind:"lifecycle",event:"connect",detail:{url:this.opts.wsUrl,attempt:this.reconnectAttempts}});const t=this.opts.credentialStore?.getToken(),n=t!==void 0?[`${CG}${t}`]:void 0,o=new WebSocket(this.opts.wsUrl,n);this.ws=o,o.onopen=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"open"})},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));this.tracer.wsEvent?.({kind:"in",frame:i}),this.handleFrame(i)}catch(i){this.tracer.wsEvent?.({kind:"lifecycle",event:"parse-error",detail:{error:String(i)}}),this.opts.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"error"}),this.opts.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"close",detail:s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0}),this.connected=!1,this.ws=null,this.opts.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,this.tracer.wsEvent?.({kind:"lifecycle",event:"reconnect-scheduled",detail:{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,...o!==void 0?{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}:{}}})}markSideChannelAgent(t,n){if(!this.opts.mainAgentOnly)return;let o=this.sideChannelAgents.get(t);if(o===void 0&&(o=new Set,this.sideChannelAgents.set(t,o)),o.has(n))return;o.add(n);const s=this.subscriptions.get(t);this.connected&&s!==void 0&&this.sendSubscribe([t],{[t]:s})}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=nh(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(nh(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(nh(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,wG),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.opts.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=$T.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.opts.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.opts.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=NT.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.opts.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.opts.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.opts.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.opts.handlers.onRawAgentEvent?this.opts.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.opts.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":n.id===this.clientHelloId&&(this.clientHelloId=null,n.code===0&&this.opts.handlers.onReplayComplete?.());break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,r=n.seq,l=nh(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.opts.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.opts.handlers.onTerminalExit?.(s,i,l);break}default:{this.trackCursor(n);const s=n.type,i=kG(s,n.payload);if(i.route==="protocol"){this.opts.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.opts.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.opts.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.opts.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const s of this.pendingSubscriptions)this.subscriptions.set(s.sessionId,s.cursor),t.includes(s.sessionId)||t.push(s.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[s,i]of this.subscriptions.entries())n[s]=i;const o=this.nextId();this.clientHelloId=o,this.send({type:"client_hello",id:o,payload:{client_id:this.opts.clientId,subscriptions:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}});for(const[s,i]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(s,i.agentId,i.sinceSeq);for(const s of this.terminalAttachments.values())this.sendTerminalAttach(s.sessionId,s.terminalId,s.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}})}rawAgentFilter(t){return Object.fromEntries(t.map(n=>[n,["main",...this.sideChannelAgents.get(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)),this.tracer.wsEvent?.({kind:"out",frame:t})}catch{}}nextId(){return`c_${++this.msgSeq}`}}function nh(e,t){return`${e}\0${t}`}async function xG(e,t,n){const o=await e.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=cG.parse(o),i={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};return{agentId:s.agent_id,...i,agents:s.agents,pendingInteractions:s.pending_interactions,...s.seq!==void 0?{seq:s.seq}:{}}}const o9=10485760,SG=40001;function AG(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 hb(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 s9(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 mb(e){return e==="auto_compact"||e==="manual_compact"}class MG{constructor(t){this.opts=t,this.tracer=t.tracer??oy,this.http=new Hk({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore}),this.httpV2=new Hk({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore,restBasePath:"/api/v2"})}http;httpV2;tracer;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,experimentalFlags:t.experimental_flags??{},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(Fr),hasMore:o.has_more}}async listSessionsV2(t){const n={sort:t?.sort,page_size:t?.pageSize,page_token:t?.pageToken,"meta.updated_after":t?.updatedAfter,"meta.archived":t?.archived===void 0?void 0:String(t.archived),include:t?.include,"workspace.id":t?.workspaceIds,"activity.status":t?.statuses},o=await this.httpV2.get("/sessions",n);return{items:o.items,hasMore:o.has_more,nextPageToken:o.next_page_token}}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 Fr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return Fr(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.swarmMode!==void 0&&(s.swarm_mode=n.swarmMode),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),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return Fr(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,swarmMode:n.swarm_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 WM(n)}async getSessionPlans(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript/plan`,{agent_id:n.agentId,tool_call_id:n.toolCallId});return o.plans.map(s=>({agentId:o.agent_id,toolCallId:s.tool_call_id,turnId:s.turn_id,source:s.source,plan:s.plan,...s.path!==void 0?{path:s.path}:{},...s.options!==void 0?{options:s.options.map(i=>({label:i.label,...i.description!==void 0?{description:i.description}:{}}))}:{},...s.review!==void 0?{review:{state:s.review.state,...s.review.selected_option!==void 0?{selectedOption:s.review.selected_option}:{},...s.review.feedback!==void 0?{feedback:s.review.feedback}:{}}}:{}}))}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 Fr(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(s3),hasMore:s.has_more}}async getSessionSnapshot(t){const n=Date.now();this.tracer.traceKeyEvent?.("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:Fr(o.session),messages:o.messages.items.map(s3),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(HM),pendingQuestions:o.pending_questions.map(zM),subagents:(o.subagents??[]).map(i=>Hh(i,i.id))};return this.tracer.traceKeyEvent?.("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw this.tracer.traceKeyEvent?.("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...hb(o)}),o}}async getSessionTranscript(t,n){return xG(this.http,t,n)}async exportSession(t,n,o){const s=n===void 0?0:new TextEncoder().encode(n).byteLength,i=n===void 0||n.length===0?0:n.split(` +`).length,r=`/sessions/${encodeURIComponent(t)}/export`,l={web_log_bytes:s,web_log_entries:i},a=o?.desktop===!0;let u;try{u=await this.http.postZip(r,{web_log:n,...a?{desktop:!0}:{}},l)}catch(d){if(a&&Us(d)&&d.code===SG)u=await this.http.postZip(r,{web_log:n},l);else throw d}const c=`${t}.zip`;return{blob:u.blob,fileName:AG(u.contentDisposition,c)}}async submitPrompt(t,n){const o=Date.now();this.tracer.traceKeyEvent?.("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`,bU(n));return this.tracer.traceKeyEvent?.("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 this.tracer.traceKeyEvent?.("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,...hb(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 Fr(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 Fr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(Fr)}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)}`,CU(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)}`,SU(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(i=>Hh(i))}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 Hh(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(s9)}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 s9(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return s9(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}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source}))}async activateSkill(t,n,o,s){const i={};o!==void 0&&o.length>0&&(i.args=o),s!==void 0&&s.length>0&&(i.attachments=s.map(BM));const r=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,i);return{activated:r.activated,skillName:r.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(Wk)])):void 0;return{items:s.items.map(Wk),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,truncated:o.truncated??!1}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Cd(this.opts.origin,`/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(Pf)}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 Pf(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 Pf(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 listModels(){return(await this.http.get("/models")).items.map(MU)}async listProviders(){return(await this.http.get("/providers")).items.map(nd)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=nd(n);return n.api_key!==void 0?{...o,apiKey:n.api_key}:o}async addProvider(t){const n={id:t.id??"",type:t.type,models:(t.models??[]).map(s=>{const i={model:s.model,max_context_size:s.maxContextSize};return s.displayName!==void 0&&(i.display_name=s.displayName),s.capabilities!==void 0&&(i.capabilities=s.capabilities),s.maxOutputSize!==void 0&&(i.max_output_size=s.maxOutputSize),s.supportEfforts!==void 0&&(i.support_efforts=s.supportEfforts),s.adaptiveThinking!==void 0&&(i.adaptive_thinking=s.adaptiveThinking),i})};t.apiKey!==void 0&&(n.api_key=t.apiKey),t.baseUrl!==void 0&&(n.base_url=t.baseUrl),t.defaultModel!==void 0&&(n.default_model=t.defaultModel);const o=await this.http.post("/providers",n);return nd(o)}async updateProvider(t,n){const o={type:n.type,models:(n.models??[]).map(i=>{const r={model:i.model,max_context_size:i.maxContextSize};return i.displayName!==void 0&&(r.display_name=i.displayName),i.capabilities!==void 0&&(r.capabilities=i.capabilities),i.maxOutputSize!==void 0&&(r.max_output_size=i.maxOutputSize),i.supportEfforts!==void 0&&(r.support_efforts=i.supportEfforts),i.adaptiveThinking!==void 0&&(r.adaptive_thinking=i.adaptiveThinking),r})};n.newId!==void 0&&(o.new_id=n.newId),n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.defaultModel!==void 0&&(o.default_model=n.defaultModel);const s=await this.http.put(`/providers/${encodeURIComponent(t)}`,o);return{provider:nd(s.provider)}}async deleteProvider(t){return await this.http.delete(`/providers/${encodeURIComponent(t)}`),{deleted:t}}async listCatalogProviders(){return(await this.http.get("/catalog/providers")).items.map(Uk)}async getCatalogProvider(t){const n=await this.http.get(`/catalog/providers/${encodeURIComponent(t)}`);return Uk(n)}async importCatalogProvider(t){const n={catalog_id:t.catalogId};t.apiKey!==void 0&&(n.api_key=t.apiKey),t.baseUrl!==void 0&&(n.base_url=t.baseUrl),t.id!==void 0&&(n.id=t.id);const o=await this.http.post("/providers:import_catalog",n);return{provider:nd(o.provider),modelsImported:o.models_imported}}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(nd),modelsImported:o.models_imported}}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return i9(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return i9(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return i9(t)}async getConfig(){const t=await this.http.get("/config");return i3(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",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",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 i3(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 getUsage(){const t=await this.http.get("/oauth/usage");if(t.kind==="error")return{kind:"error",message:t.message,status:t.status};const n=o=>({name:o.name,window:o.window,used:o.used,limit:o.limit,resetAt:o.reset_at});return{kind:"ok",summary:t.summary===null?null:n(t.summary),limits:t.limits.map(n),extraUsage:t.extra_usage===null?null:{balanceCents:t.extra_usage.balance_cents,totalCents:t.extra_usage.total_cents,monthlyChargeLimitEnabled:t.extra_usage.monthly_charge_limit_enabled,monthlyChargeLimitCents:t.extra_usage.monthly_charge_limit_cents,monthlyUsedCents:t.extra_usage.monthly_used_cents,currency:t.extra_usage.currency}}}async getUserInfo(){return this.http.get("/oauth/userinfo")}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 Cd(this.opts.origin,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}async readHostFileContent(t){const n=await this.http.getBlob("/fs:content",{path:t},{maxBytes:o9});if(n.size>o9)throw new sy({size:n.size,limit:o9});const o=n.type,s=!TG(o),i=o||(s?"application/octet-stream":"text/plain");if(s){const l=await EG(n);return{path:t,content:l,encoding:"base64",mime:i,isBinary:!0,size:n.size}}const r=await n.text();return{path:t,content:r,encoding:"utf-8",mime:i,isBinary:!1,size:n.size}}connectEvents(t){const n=fU(this.opts.origin,this.opts.identity.clientId),o=this.opts.projectorFactory(),s=new _G({wsUrl:n,clientId:this.opts.identity.clientId,tracer:this.tracer,credentialStore:this.opts.credentialStore,mainAgentOnly:this.opts.mainAgentOnly,handlers:{onWireEvent:i=>{const r=TU(i),l=EU(i),a=AU(i);a.type==="historyCompacted"&&!mb(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 h=u?.turnId,m=f.type==="assistantDelta"&&typeof h=="number"&&typeof c=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:h,offset:c,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!mb(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:m})}},onResync:(i,r,l)=>{o.reset(i),t.onResync(i,r,l)},onConnectionState:i=>{t.onConnectionChange(i)},onReplayComplete:()=>{t.onReplayComplete?.()},onError:(i,r,l)=>{t.onError(i,r,l)},onTerminalOutput:(i,r,l,a)=>{t.onTerminalOutput?.(i,r,l,a)},onTerminalExit:(i,r,l)=>{t.onTerminalExit?.(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)??!0}});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,r){s.markSideChannelAgent(i,r),o.markSideChannelAgent(r)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function i9(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 TG(e){const t=e.toLowerCase().split(";")[0].trim();return t===""||t==="text/plain"||t.startsWith("text/")?!0:/(json|xml|javascript|typescript|x-yaml|yaml|svg|x-sh|x-python|markdown|csv|html|css)$/.test(t)}function EG(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=()=>{const s=String(o.result);t(s.slice(s.indexOf(",")+1))},o.onerror=()=>n(o.error),o.readAsDataURL(e)})}function IG(){return window.kimiDesktop}function FT(e,t,n){const o=n.length===0?void 0:n.length===1?n[0]:n;try{IG()?.log?.(e,t,o)}catch{}}function gl(e,...t){console.warn(e,...t),FT("warn",e,t)}function Xl(e,...t){console.error(e,...t),FT("error",e,t)}const LG={multiedit:"multi_edit",multiedits:"multi_edit",shell:"bash",run:"bash",exec:"bash",ripgrep:"grep",rg:"grep",find:"glob",fetch:"web_fetch",webfetch:"web_fetch",url_fetch:"web_fetch",urlfetch:"web_fetch",list:"ls",listdir:"ls",list_dir:"ls",todowrite:"todo",todo_write:"todo",todoread:"todo",todolist:"todo",todo_list:"todo",agent:"task",subagent:"task",websearch:"search",web_search:"search",create_goal:"creategoal",get_goal:"getgoal",set_goal_budget:"setgoalbudget",update_goal:"updategoal"};function Gs(e){const t=(e??"").trim().toLowerCase().replace(/[\s-]+/g,"_");return LG[t]??t}const $G={read:"tools.label.read",bash:"tools.label.bash",edit:"tools.label.edit",multi_edit:"tools.label.edit",write:"tools.label.write",grep:"tools.label.grep",glob:"tools.label.glob",ls:"tools.label.ls",web_fetch:"tools.label.web_fetch",search:"tools.label.search",todo:"tools.label.todo",task:"tools.label.task",agentswarm:"tools.label.swarm",askuserquestion:"tools.label.ask_user",exitplanmode:"tools.label.plan",creategoal:"tools.label.goal_create",getgoal:"tools.label.goal_get",setgoalbudget:"tools.label.goal_budget",updategoal:"tools.label.goal_update"};function RT(e,t){const n=$G[Gs(t)];return n?e(n):t}const OT=80;function NG(e,t=OT){const n=e.trim();return n.length>t?n.slice(0,t-1)+"…":n}function FG(e,t){const n=e.trim();return!!(n===""||n==="{}"||n==="[]"||n==="null"||t&&Object.keys(t).length===0)}function RG(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function En(e){return typeof e=="string"&&e.length>0?e:void 0}function Ta(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function OG(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}function r9(e){return En(e.path)??En(e.file_path)??En(e.filePath)??En(e.filename)}const PG={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"};function DG(e,t){const n=En(t);if(!n)return;const o=PG[n];return o?e(o):n}function BG(e,t){const n=Ta(t.value),o=En(t.unit);if(!(n===void 0||!o))switch(o){case"turns":return e("tools.goal.turns",{value:n});case"tokens":return e("tools.goal.tokens",{value:n});case"milliseconds":return e("tools.goal.milliseconds",{value:n});case"seconds":return e("tools.goal.seconds",{value:n});case"minutes":return e("tools.goal.minutes",{value:n});case"hours":return e("tools.goal.hours",{value:n});default:return e("tools.goal.budget",{value:n,unit:o})}}function wy(e,t,n,o=!1){const s=(i,r=OT)=>o?i.trim():NG(i,r);try{const i=RG(n);if(!o&&FG(n,i))return"";const r=()=>s(n.replace(/^·\s*/,""));if(!i)return r();switch(Gs(t)){case"read":{const l=r9(i);if(!l)return r();const a=Ta(i.offset)??Ta(i.line_start)??Ta(i.start_line),u=Ta(i.limit)??Ta(i.length),c=Ta(i.line_end)??Ta(i.end_line)??(a!==void 0&&u!==void 0?a+u:void 0);return s(a!==void 0&&c!==void 0?`${l}:${a}-${c}`:a!==void 0?`${l}:${a}`:l)}case"write":{const l=r9(i);return l?s(`${l} ${e("tools.chip.created")}`):r()}case"edit":case"multi_edit":{const l=r9(i);return l?s(l):r()}case"bash":{const l=En(i.command)??En(i.cmd)??En(i.script);return l?l.trim():r()}case"grep":case"search":{const l=En(i.pattern)??En(i.query)??En(i.regex),a=En(i.path)??En(i.glob)??En(i.include);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):r()}case"glob":{const l=En(i.pattern)??En(i.glob)??En(i.query),a=En(i.path)??En(i.cwd);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):En(i.path)?s(En(i.path)):r()}case"ls":{const l=En(i.path)??En(i.dir)??En(i.directory)??En(i.cwd);return l?s(l):r()}case"web_fetch":{const l=En(i.url)??En(i.uri);return l?s(OG(l)):r()}case"todo":case"task":{const l=En(i.description)??En(i.title)??En(i.prompt)??En(i.name)??En(i.subagent_type);if(l)return s(l);const a=Array.isArray(i.todos)?i.todos:Array.isArray(i.items)?i.items:void 0;return a?s(e("tools.chip.todos",{count:a.length})):r()}case"creategoal":{if(o)return r();const l=En(i.objective),a=En(i.completionCriterion);return l&&a?s(e("tools.goal.objectiveWithCriterion",{objective:l,criterion:a})):l?s(l):r()}case"getgoal":return o?r():"";case"setgoalbudget":{if(o)return r();const l=BG(e,i);return l?s(l):r()}case"updategoal":{if(o)return r();const l=DG(e,i.status);return l?s(e("tools.goal.status",{status:l})):r()}default:return r()}}catch{return n}}function HG(e,t){try{switch(Gs(t.name)){case"bash":return t.timing?t.timing:"";case"read":{if(t.output&&t.output.length>0){const n=t.output.length;return e("tools.chip.lines",{count:n})}return""}case"edit":case"multi_edit":case"write":{if(t.output){for(const o of t.output){const s=o.match(/\+(\d+).*[-−](\d+)/);if(s)return`+${s[1]} −${s[2]}`}const n=t.output.find(o=>/\d+/.test(o));if(n){const o=n.match(/\+(\d+)/),s=n.match(/[-−](\d+)/);if(o||s)return`${o?`+${o[1]}`:""} ${s?`−${s[1]}`:""}`.trim()}if(t.status!=="error")return e("tools.chip.edited")}return""}case"grep":case"search":return t.output&&t.output.length>0?e("tools.chip.results",{count:t.output.length}):"";default:return""}}catch{return""}}const zG="main",WG=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 pl(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 UG(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}}function gb(){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,retryActive:!1}}function _o(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Ts(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function hr(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function jG(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,o=n&&typeof n=="object"?n:{},s=_o(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const i=_o(t,"goalId")??_o(t,"goal_id")??"goal",r=_o(t,"objective")??"";return{goalId:i,objective:r,completionCriterion:_o(t,"completionCriterion")??_o(t,"completion_criterion"),status:s,turnsUsed:Ts(t,"turnsUsed")??Ts(t,"turns_used")??0,tokensUsed:Ts(t,"tokensUsed")??Ts(t,"tokens_used")??0,wallClockMs:Ts(t,"wallClockMs")??Ts(t,"wall_clock_ms")??0,terminalReason:_o(t,"terminalReason")??_o(t,"terminal_reason"),budget:{tokenBudget:hr(o,"tokenBudget")??hr(o,"token_budget"),remainingTokens:hr(o,"remainingTokens")??hr(o,"remaining_tokens"),turnBudget:hr(o,"turnBudget")??hr(o,"turn_budget"),remainingTurns:hr(o,"remainingTurns")??hr(o,"remaining_turns"),wallClockBudgetMs:hr(o,"wallClockBudgetMs")??hr(o,"wall_clock_budget_ms"),remainingWallClockMs:hr(o,"remainingWallClockMs")??hr(o,"remaining_wall_clock_ms"),overBudget:o.overBudget===!0||o.over_budget===!0}}}function Ku(e,t,n,o,s){if(typeof o!="string"||o.length===0)return null;const r={...t.subagentMeta.get(o)??{id:o,agentId:o,sessionId:n,kind:"subagent",description:e("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},...s,id:o,sessionId:n,kind:"subagent"};return t.subagentMeta.set(o,r),r}function VG(e,t,n){if(t==="turn.step.started")return null;if(t==="tool.use"||t==="tool.call.started"){const o=_o(n,"name")??_o(n,"toolName")??"tool",s=RT(e,qG(o)),i=KG(e,o,n.args??n.input);return i?`Calling ${s}: ${i}`:`Calling ${s}`}if(t==="tool.progress"){const o=n.update;if(o&&typeof o=="object"){const i=_o(o,"text");if(i)return l9(i);const r=_o(o,"message");if(r)return l9(r)}const s=_o(n,"message");if(s)return l9(s)}return null}function qG(e){return e.replace(/_\d+$/,"")}const vb=2e3;function l9(e){return e.length>vb?`${e.slice(0,vb)}…`:e}function KG(e,t,n){if(n==null)return"";const o=typeof n=="string"?n:JSON.stringify(n);return wy(e,t,o)}function ZG(e,t,n,o,s,i,r){if(r.has(o)&&s==="turn.step.started")return[];if(s==="assistant.delta"){const d=_o(i,"delta");if(!d)return[];const f=t.subagentMeta.get(o),h=Ku(e,t,n,o,{status:"running",subagentPhase:"working",startedAt:f?.startedAt??new Date().toISOString()}),m=[];return h&&m.push({type:"taskCreated",sessionId:n,task:h}),m.push({type:"taskProgress",sessionId:n,taskId:o,outputChunk:d,stream:"stdout",kind:"text"}),m}const l=VG(e,s,i);if(l===null||l.length===0)return[];const a=t.subagentMeta.get(o),u=Ku(e,t,n,o,{status:"running",subagentPhase:"working",startedAt:a?.startedAt??new Date().toISOString()}),c=[];return u&&c.push({type:"taskCreated",sessionId:n,task:u}),c.push({type:"taskProgress",sessionId:n,taskId:o,outputChunk:l,stream:"stdout"}),c}function $u(e){return{...e,content:e.content.map(t=>({...t}))}}function yb(e,t,n){const o={id:pl("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(o),o}function GG(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 kb(e){return Array.isArray(e)?e.map(t=>ry(t)):[]}function bb(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 YG(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 XG(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 Cb(e,t){e.messages.find(n=>n.id===t)}function JG(e,t,n,o,s,i){const r={id:pl("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 ef(e,t){return e.messages.find(n=>n.id===t)}function wb(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 QG(e){const{t}=e,n=new Map,o=new Set;function s(f){let h=n.get(f);return h||(h=gb(),n.set(f,h)),h}function i(f){n.set(f,gb())}function r(f){o.add(f)}function l(f,h){const m=s(f);m.currentPromptId=h}function a(f,h){i(f);const m=s(f),v=h.promptId??pl("pr_");m.currentPromptId=v,m.turnPromptId.set(h.turnId,v);const k=yb(m,f,v);h.thinkingText.length>0&&k.content.push({type:"thinking",thinking:h.thinkingText}),h.assistantText.length>0&&k.content.push({type:"text",text:h.assistantText});for(const w of h.runningTools){const b=typeof w.lastProgress?.text=="string"&&w.lastProgress.text.length>0?[w.lastProgress.text]:void 0;k.content.push({type:"toolUse",toolCallId:w.toolCallId,toolName:w.name,input:w.args??{},outputLines:b}),m.toolStartTimes.set(w.toolCallId,Date.now())}return m.currentAssistantMsgId=k.id,m.turnTextLen=h.assistantText.length,m.turnThinkLen=h.thinkingText.length,[{type:"messageCreated",message:$u(k)}]}function u(f,h,m,v){try{return d(f,h,m,v)}catch(k){return Xl("[agentProjector] Error projecting event:",f,k instanceof Error?k.message:k),[]}}function c(f,h){return h===void 0?"append":hf?"gap":"append"}function d(f,h,m,v){const k=s(m),w=h,b=[],_=w?.agentId;if(typeof _=="string"&&_!==zG){const g=o.has(_);if(f==="prompt.submitted"){if(!g)return[];const x=w?.promptId,S=w?.userMessageId;if(!x||!S)return[];const T=kb(w?.content);return T.length===0?[]:[{type:"messageCreated",agentId:_,message:{id:S,sessionId:m,role:"user",content:T,createdAt:typeof w?.createdAt=="string"?w.createdAt:new Date().toISOString(),promptId:x}}]}if(g&&(f==="thinking.delta"||f==="assistant.delta")){const x=w?.delta??"";return x?[{type:"agentDelta",sessionId:m,agentId:_,delta:{[f==="thinking.delta"?"thinking":"text"]:x}}]:[]}if(g&&f==="turn.ended")return[{type:"agentTurnEnded",sessionId:m,agentId:_,reason:w?.reason}];if(WG.has(f))return ZG(t,k,m,_,f,w??{},o)}switch(f){case"session.meta.updated":{const g=w?.patch?.title??w?.title,x=w?.patch?.lastPrompt,S={};typeof g=="string"&&g.length>0&&(S.title=g),typeof x=="string"&&(S.lastPrompt=x),(S.title!==void 0||S.lastPrompt!==void 0)&&b.push({type:"sessionMetaUpdated",sessionId:m,...S});break}case"prompt.submitted":{const g=w?.promptId,x=w?.userMessageId;if(!g||!x)break;const S=kb(w?.content);if(S.length===0)break;k.currentPromptId=g;const T=GG(k,m,g,x,S,typeof w?.createdAt=="string"?w.createdAt:new Date().toISOString());b.push({type:"messageCreated",message:$u(T),...typeof _=="string"?{agentId:_}:{}});break}case"turn.started":{const g=w?.turnId,x=k.currentPromptId??pl("pr_");k.currentPromptId=x,g!==void 0&&k.turnPromptId.set(g,x),k.turnTextLen=0,k.turnThinkLen=0;const S=w?.origin;if(S&&typeof S=="object"&&S.kind==="system_trigger"&&S.name==="goal_continuation"){const T={id:g!==void 0?`goal_cont_${g}`:pl("goal_"),sessionId:m,role:"user",content:[{type:"text",text:_o(w??{},"prompt")??""}],createdAt:new Date().toISOString(),metadata:{origin:S}};k.messages.push(T),b.push({type:"turnActiveChanged",sessionId:m,active:!0}),b.push({type:"messageCreated",message:$u(T)});break}b.push({type:"turnActiveChanged",sessionId:m,active:!0});break}case"turn.step.started":{const g=w?.turnId;k.retryActive&&(k.retryActive=!1,b.push({type:"turnRetry",sessionId:m,retry:void 0}));let x=k.turnPromptId.get(g)??k.currentPromptId;if(x||(x=pl("pr_"),k.currentPromptId=x,g!==void 0&&k.turnPromptId.set(g,x)),k.turnTextLen=0,k.turnThinkLen=0,k.retryReuseMsgId!==void 0){const T=k.retryReuseMsgId;if(k.retryReuseMsgId=void 0,ef(k,T)!==void 0){k.currentAssistantMsgId=T;break}}const S=yb(k,m,x);k.currentAssistantMsgId=S.id,b.push({type:"messageCreated",message:$u(S)});break}case"thinking.delta":{const g=k.currentAssistantMsgId;if(!g)break;const x=w?.delta??"";if(!x)break;v?.offset===0&&k.turnThinkLen>0&&(k.turnThinkLen=0);const S=c(k.turnThinkLen,v?.offset);if(S==="skip")break;if(S==="gap"){b.push({type:"historyCompacted",sessionId:m,beforeSeq:0,reason:"delta_gap"});break}const T=bb(k,g,"thinking",x);if(T<0)break;k.turnThinkLen+=x.length,b.push({type:"assistantDelta",sessionId:m,messageId:g,contentIndex:T,delta:{thinking:x}});break}case"assistant.delta":{const g=k.currentAssistantMsgId;if(!g)break;const x=w?.delta??"";if(!x)break;v?.offset===0&&k.turnTextLen>0&&(k.turnTextLen=0);const S=c(k.turnTextLen,v?.offset);if(S==="skip")break;if(S==="gap"){b.push({type:"historyCompacted",sessionId:m,beforeSeq:0,reason:"delta_gap"});break}const T=bb(k,g,"text",x);if(T<0)break;k.turnTextLen+=x.length,b.push({type:"assistantDelta",sessionId:m,messageId:g,contentIndex:T,delta:{text:x}});break}case"tool.use":case"tool.call.started":{const g=k.currentAssistantMsgId,x=w?.turnId,S=k.turnPromptId.get(x)??k.currentPromptId;if(!g||!S)break;const T=w?.toolCallId,A=w?.name??w?.toolName??"",E=w?.args??w?.input??{};YG(k,g,T,A,E);const P=ef(k,g);P&&P.content.length-1,k.toolStartTimes.set(T,Date.now()),P&&b.push({type:"messageUpdated",sessionId:m,messageId:g,content:P.content.map(D=>({...D})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const g=w?.toolCallId,x=XG(w??{});g&&x&&b.push({type:"toolOutput",sessionId:m,toolCallId:g,outputChunk:x.outputChunk,stream:x.stream});break}case"tool.result":{const g=w?.turnId;let x=k.turnPromptId.get(g)??k.currentPromptId;x||(x=pl("pr_"),k.currentPromptId=x,g!==void 0&&k.turnPromptId.set(g,x));const S=w?.toolCallId,T=w?.output,A=w?.isError??!1;k.toolStartTimes.get(S)??Date.now(),k.toolStartTimes.delete(S);const E=JG(k,m,S,T,A,x);b.push({type:"messageCreated",message:$u(E)}),k.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const g=k.currentAssistantMsgId,x=UG(w?.usage);if(k.totalInput+=x.input,k.totalOutput+=x.output,k.totalCacheRead+=x.cacheRead,k.totalCacheCreate+=x.cacheCreate,g){Cb(k,g);const S=ef(k,g);S&&b.push({type:"messageUpdated",sessionId:m,messageId:g,content:S.content.map(T=>({...T})),status:"completed"})}break}case"agent.status.updated":{w?.model&&(k.model=w.model),w?.contextTokens!==void 0&&(k.contextTokens=w.contextTokens),w?.maxContextTokens!==void 0&&(k.contextLimit=w.maxContextTokens);const g=w?.phase;g!=null&&g.kind==="retrying"?(k.retryActive=!0,b.push({type:"turnRetry",sessionId:m,retry:{failedAttempt:Ts(g,"failedAttempt")??0,nextAttempt:Ts(g,"nextAttempt")??0,maxAttempts:Ts(g,"maxAttempts")??0,delayMs:Ts(g,"delayMs")??0,errorName:_o(g,"errorName"),statusCode:Ts(g,"statusCode"),turnId:Ts(g,"turnId")}})):k.retryActive&&g!==void 0&&g!==null&&typeof g.kind=="string"&&(k.retryActive=!1,b.push({type:"turnRetry",sessionId:m,retry:void 0})),b.push({type:"sessionUsageUpdated",sessionId:m,usage:wb(k),model:k.model||void 0,swarmMode:w?.swarmMode===!0?!0:w?.swarmMode===!1?!1:void 0,planMode:w?.planMode===!0?!0:w?.planMode===!1?!1:void 0,thinking:typeof w?.thinkingEffort=="string"&&w.thinkingEffort.length>0?w.thinkingEffort:void 0});break}case"turn.ended":{const g=k.currentAssistantMsgId,x=w?.reason??"completed",S=Ts(w??{},"durationMs"),T=w?.turnId,A=(T!==void 0?k.turnPromptId.get(T):void 0)??k.currentPromptId;if(b.push({type:"turnActiveChanged",sessionId:m,active:!1,reason:w?.reason,promptId:A}),g){Cb(k,g);const P=ef(k,g);P&&b.push({type:"messageUpdated",sessionId:m,messageId:g,content:P.content.map(D=>({...D})),status:x==="failed"||x==="blocked"?"error":"completed",durationMs:S})}k.turnCount++;const E=wb(k);b.push({type:"sessionUsageUpdated",sessionId:m,usage:E}),k.currentAssistantMsgId=void 0,k.currentPromptId=void 0,k.turnTextLen=0,k.turnThinkLen=0,k.retryReuseMsgId=void 0;break}case"prompt.completed":{const g=w?.promptId;typeof g=="string"&&g.length>0&&b.push({type:"promptCompleted",sessionId:m,promptId:g,reason:w?.reason??"completed"});break}case"prompt.aborted":{const g=w?.promptId;typeof g=="string"&&g.length>0&&b.push({type:"promptAborted",sessionId:m,promptId:g});break}case"turn.step.retrying":{k.retryActive=!0,b.push({type:"turnRetry",sessionId:m,retry:{failedAttempt:Ts(w??{},"failedAttempt")??0,nextAttempt:Ts(w??{},"nextAttempt")??0,maxAttempts:Ts(w??{},"maxAttempts")??0,delayMs:Ts(w??{},"delayMs")??0,errorName:_o(w??{},"errorName"),statusCode:Ts(w??{},"statusCode"),turnId:typeof w?.turnId=="number"?w.turnId:void 0}});const g=k.currentAssistantMsgId;if(g!==void 0){const x=ef(k,g);x!==void 0&&(x.content=x.content.filter(S=>S.type!=="text"&&S.type!=="thinking"&&S.type!=="toolUse"),b.push({type:"messageUpdated",sessionId:m,messageId:g,content:x.content.map(S=>({...S})),status:"pending"}),k.retryReuseMsgId=g)}k.turnTextLen=0,k.turnThinkLen=0,k.toolStartTimes.clear();break}case"turn.step.interrupted":{k.currentAssistantMsgId=void 0,k.retryReuseMsgId=void 0;break}case"subagent.spawned":{const g=typeof w?.subagentId=="string"&&w.subagentId.length>0?w.subagentId:pl("task_"),x={id:g,agentId:g,sessionId:m,kind:"subagent",description:typeof w?.description=="string"?w.description:w?.subagentName??t("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof w?.subagentName=="string"?w.subagentName:void 0,model:typeof w?.model=="string"&&w.model.length>0?w.model:void 0,thinkingEffort:typeof w?.thinkingEffort=="string"&&w.thinkingEffort.length>0?w.thinkingEffort:void 0,parentToolCallId:typeof w?.parentToolCallId=="string"?w.parentToolCallId:void 0,swarmIndex:typeof w?.swarmIndex=="number"?w.swarmIndex:void 0,runInBackground:w?.runInBackground===!0};k.subagentMeta.set(x.id,x),b.push({type:"taskCreated",sessionId:m,task:x});break}case"subagent.started":{const g=Ku(t,k,m,w?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});g&&b.push({type:"taskCreated",sessionId:m,task:g});break}case"subagent.suspended":{const g=Ku(t,k,m,w?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof w?.reason=="string"?w.reason:void 0});g&&b.push({type:"taskCreated",sessionId:m,task:g});break}case"subagent.completed":{const g=typeof w?.resultSummary=="string"?w.resultSummary:void 0,x=Ku(t,k,m,w?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),outputPreview:g});x&&b.push({type:"taskCreated",sessionId:m,task:x}),b.push({type:"taskCompleted",sessionId:m,taskId:w?.subagentId??"",status:"completed",outputPreview:g});break}case"subagent.failed":{const g=typeof w?.error=="string"?w.error:void 0,x=Ku(t,k,m,w?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),outputPreview:g});x&&b.push({type:"taskCreated",sessionId:m,task:x}),b.push({type:"taskCompleted",sessionId:m,taskId:w?.subagentId??"",status:"failed",outputPreview:g});break}case"error":{b.push({type:"unknown",raw:{_agentError:!0,code:w?.code,message:w?.message,name:w?.name,details:w?.details,retryable:w?.retryable}});break}case"task.notified":{const g=_o(w??{},"notificationType"),x=_o(w??{},"sourceKind"),S=_o(w??{},"sourceId");if(!g||!x||!S)break;const T=g.startsWith("task.")?g.slice(5):g,A=`task:${S}:${T}`,E=H=>H.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"),P=_o(w??{},"title")??"",D=_o(w??{},"severity")??"",I=_o(w??{},"body")??"",$=` +`+(P!==""?`Title: ${E(P)} +`:"")+(D!==""?`Severity: ${E(D)} +`:"")+(I!==""?`${E(I)} +`:"")+"",B={id:`task_ntf_${A}`,sessionId:m,role:"user",content:[{type:"text",text:$}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:S,status:T,notificationId:A}}};k.messages.push(B),b.push({type:"messageCreated",message:$u(B)});break}case"warning":{b.push({type:"unknown",raw:{_agentWarning:!0,message:w?.message}});break}case"task.started":case"background.task.started":{const g=w?.info??{},x=typeof g.startedAt=="number"?new Date(g.startedAt).toISOString():void 0,S=typeof g.taskId=="string"?g.taskId:typeof g.taskId=="number"?String(g.taskId):pl("task_"),T=typeof g.description=="string"?g.description:typeof g.command=="string"?g.command:t("tasks.defaultDescription");if(g.kind==="agent"){const E=typeof g.agentId=="string"&&g.agentId.length>0?g.agentId:void 0;if(E!==void 0){const P=Ku(t,k,m,E,{description:T,backgroundTaskId:S,runInBackground:!0});P&&b.push({type:"taskCreated",sessionId:m,task:P})}else b.push({type:"taskCreated",sessionId:m,task:{id:S,sessionId:m,kind:"subagent",description:T,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,subagentPhase:"queued",runInBackground:!0}});break}const A=typeof g.command=="string"?g.command:void 0;b.push({type:"taskCreated",sessionId:m,task:{id:S,sessionId:m,kind:"bash",description:T,command:A,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,outputPreview:A!==void 0?`$ ${A}`:void 0}});break}case"task.terminated":case"background.task.terminated":{const g=w?.info??{},x=g.status==="failed"||typeof g.exitCode=="number"&&g.exitCode!==0;b.push({type:"taskCompleted",sessionId:m,taskId:typeof g.taskId=="string"?g.taskId:typeof g.taskId=="number"?String(g.taskId):"",status:x?"failed":"completed"});break}case"compaction.completed":{const g=w?.result??{};b.push({type:"compactionCompleted",sessionId:m,tokensBefore:typeof g.tokensBefore=="number"?g.tokensBefore:void 0,tokensAfter:typeof g.tokensAfter=="number"?g.tokensAfter:void 0,summary:typeof g.summary=="string"?g.summary:void 0}),b.push({type:"historyCompacted",sessionId:m,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{b.push({type:"compactionStarted",sessionId:m,trigger:w?.trigger==="manual"?"manual":"auto",instruction:typeof w?.instruction=="string"?w.instruction:void 0});break}case"compaction.cancelled":{b.push({type:"compactionCancelled",sessionId:m});break}case"goal.updated":{const g=jG(w?.snapshot??null);b.push({type:"goalUpdated",sessionId:m,goal:g?.status==="complete"?null:g});break}case"cron.fired":{const g=w?.origin,x=_o(w??{},"prompt");if(g&&typeof g=="object"&&g.kind==="cron_job"&&x){const S={id:pl("cron_"),sessionId:m,role:"user",content:[{type:"text",text:x}],createdAt:new Date().toISOString(),metadata:{origin:g}};k.messages.push(S),b.push({type:"messageCreated",message:$u(S)})}break}}return b}return{project:u,bindNextPromptId:l,seedInFlight:a,reset:i,markSideChannelAgent:r}}function eY(e){return new MG({origin:e.origin,identity:e.identity,tracer:e.tracer,credentialStore:e.credentialStore,projectorFactory:()=>QG({t:e.t}),mainAgentOnly:e.mainAgentOnly})}const PT="kimiWeb.compaction",tY={t:e=>e},nY="kimiWeb.optimisticUserMessage",_b="Sub Agent";function yf(e,t,n=e.length){for(let o=0;o=0;s--){const i=o[s];if(i.role!=="assistant")continue;if(!i.content.some(u=>u.type==="thinking"&&u.startedAt!==void 0&&u.durationMs===void 0))return;const l=[...i.content];yf(l,n);const a=[...o];a[s]={...i,content:l},e.messagesBySession[t]=a;return}}function Sb(e){const t=Date.parse(e);return Number.isNaN(t)?Date.now():t}function oY(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},turnEndedPromptIdBySession:{},turnErrorBySession:{},turnRetryBySession:{},compactionBySession:{},warnings:[]}}function sY(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},turnEndedPromptIdBySession:{...e.turnEndedPromptIdBySession},turnErrorBySession:{...e.turnErrorBySession},turnRetryBySession:{...e.turnRetryBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function iY(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 od(e,t){const n=new Date().toISOString();e.sessions=e.sessions.map(o=>o.id===t&&n>o.updatedAt?{...o,updatedAt:n}:o)}function Ca(e,t){return t.seq>(e.lastSeqBySession[t.sessionId]??0)}function Ab(e){return e.role==="user"&&e.metadata?.[nY]===!0}function rY(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function lY(e){return e.metadata?.origin?.kind==="system_trigger"}function aY(e,t){const n=t.userMessageId??t.id;for(let s=e.length-1;s>=0;s--){const i=e[s];if(Ab(i)&&i.userMessageId===n)return s}const o=t.promptId;if(o!==void 0)for(let s=e.length-1;s>=0;s--){const i=e[s];if(Ab(i)&&i.promptId===o)return s}return-1}function uY(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 cY={"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 dY(e,t){const 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?cY[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function fY(e,t,n,o=tY){const s=sY(e);switch(iY(s,n.sessionId,n.seq),t.type){case"sessionCreated":{s.sessions.some(r=>r.id===t.session.id)||(s.sessions=[t.session,...s.sessions]);break}case"sessionUpdated":{s.sessions=s.sessions.map(i=>i.id===t.session.id?{...t.session,pullRequest:i.pullRequest}:i);break}case"sessionDeleted":{const i=t.sessionId;s.sessions=s.sessions.filter(r=>r.id!==i),delete s.messagesBySession[i],delete s.tasksBySession[i],delete s.goalBySession[i],delete s.approvalsBySession[i],delete s.questionsBySession[i],delete s.lastSeqBySession[i],delete s.turnActiveBySession[i],delete s.turnEndedPromptIdBySession[i],delete s.turnErrorBySession[i],delete s.turnRetryBySession[i],s.activeSessionId===i&&(s.activeSessionId=void 0);break}case"sessionWorkChanged":{if(!Ca(e,n))break;let i;s.sessions=s.sessions.map(r=>r.id!==t.sessionId?r:(i=t.pendingInteraction??(t.busy?r.pendingInteraction:"none"),{...r,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?r.mainTurnActive:!1),pendingInteraction:i,lastTurnReason:t.lastTurnReason})),i==="none"?(delete s.approvalsBySession[t.sessionId],delete s.questionsBySession[t.sessionId]):i==="question"&&delete s.approvalsBySession[t.sessionId],t.mainTurnActive===!0?s.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&(e.turnActiveBySession[t.sessionId]&&od(s,t.sessionId),delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId]);break}case"sessionMetaUpdated":{s.sessions=s.sessions.map(i=>i.id===t.sessionId?{...i,title:t.title??i.title,lastPrompt:t.lastPrompt??i.lastPrompt}:i);break}case"sessionUsageUpdated":{s.sessions=s.sessions.map(i=>{if(i.id!==t.sessionId)return i;const r=t.model&&t.model.length>0?t.model:i.model;return{...i,usage:t.usage,model:r}});break}case"historyCompacted":break;case"compactionStarted":{s.compactionBySession={...s.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const i=t.sessionId,r=s.compactionBySession[i],{[i]:l,...a}=s.compactionBySession;if(s.compactionBySession=a,Object.prototype.hasOwnProperty.call(s.messagesBySession,i)){const u=s.messagesBySession[i]??[],c=`compaction_${i}_${n.seq}`;if(!u.some(d=>d.id===c)){const d={trigger:r?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};s.messagesBySession[i]=[...u,{id:c,sessionId:i,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[PT]:d}}]}}break}case"compactionCancelled":{const{[t.sessionId]:i,...r}=s.compactionBySession;s.compactionBySession=r;break}case"messageCreated":{const i=t.message.sessionId,r=s.messagesBySession[i]??[];if(!r.some(a=>a.id===t.message.id)){if(t.message.role==="user"&&!rY(t.message)&&!lY(t.message)){const a=aY(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,userMessageId:t.message.userMessageId??t.message.id,metadata:{...t.message.metadata,...c.metadata}},s.messagesBySession[i]=u;break}}s.messagesBySession[i]=[...r,t.message]}break}case"messageUpdated":{const i=t.sessionId,r=s.messagesBySession[i]??[];s.messagesBySession[i]=r.map(l=>{if(l.id!==t.messageId)return l;const a=t.content.map((c,d)=>{const f=l.content[d];return c.type==="thinking"&&f?.type==="thinking"?{...c,startedAt:f.startedAt,durationMs:f.durationMs}:c}),u=Date.now();return yf(a,u,a.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&yf(a,u),{...l,content:a,durationMs:t.durationMs??l.durationMs}});break}case"assistantDelta":{const i=t.sessionId,r=s.messagesBySession[i]??[];s.messagesBySession[i]=r.map(l=>{if(l.id!==t.messageId)return l;const a=[...l.content],u=t.contentIndex,c=a.length<=u;for(;a.length<=u;)a.push({type:"text",text:""});const d=a[u];let f;return t.delta.text!==void 0?d.type==="text"&&!c?f={type:"text",text:d.text+t.delta.text}:(f={type:"text",text:t.delta.text},yf(a,Date.now(),u)):t.delta.thinking!==void 0?d.type==="thinking"?f={type:"thinking",thinking:d.thinking+t.delta.thinking,signature:d.signature,startedAt:d.startedAt,durationMs:d.durationMs}:(f={type:"thinking",thinking:t.delta.thinking,startedAt:new Date().toISOString()},yf(a,Date.now(),u)):f=d,a[u]=f,{...l,content:a}});break}case"toolOutput":{const i=t.sessionId,r=s.messagesBySession[i]??[];s.messagesBySession[i]=uY(r,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const i=t.sessionId,r=s.approvalsBySession[i]??[];r.some(u=>u.approvalId===t.approval.approvalId)||(s.approvalsBySession[i]=[...r,t.approval],Ca(e,n)&&(xb(s,i,Sb(t.approval.createdAt)),od(s,i)));const a=t.approval.display;a?.kind==="plan_review"&&typeof a.plan=="string"&&a.plan.length>0&&(s.planReviewByToolCallId={...s.planReviewByToolCallId,[t.approval.toolCallId]:{plan:a.plan,path:typeof a.path=="string"?a.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const i=t.sessionId,r=t.approvalId,l=s.approvalsBySession[i]??[];s.approvalsBySession[i]=l.filter(a=>a.approvalId!==r);break}case"questionRequested":{const i=t.sessionId,r=s.questionsBySession[i]??[];r.some(a=>a.questionId===t.question.questionId)||(s.questionsBySession[i]=[...r,t.question],Ca(e,n)&&(xb(s,i,Sb(t.question.createdAt)),od(s,i)));break}case"questionAnswered":case"questionDismissed":{const i=t.sessionId,r=t.questionId,l=s.questionsBySession[i]??[];s.questionsBySession[i]=l.filter(a=>a.questionId!==r);break}case"taskCreated":{const i=t.sessionId,r=s.tasksBySession[i]??[],l=r.findIndex(a=>a.id===t.task.id);if(l===-1)s.tasksBySession[i]=[...r,t.task];else{const a=[...r],u=r[l];a[l]={...t.task,outputLines:u.outputLines,text:u.text,description:t.task.description===_b&&u.description!==_b?u.description:t.task.description,swarmIndex:t.task.swarmIndex??u.swarmIndex,parentToolCallId:t.task.parentToolCallId??u.parentToolCallId,subagentType:t.task.subagentType??u.subagentType,model:t.task.model??u.model,thinkingEffort:t.task.thinkingEffort??u.thinkingEffort,runInBackground:t.task.runInBackground??u.runInBackground,backgroundTaskId:t.task.backgroundTaskId??u.backgroundTaskId,agentId:t.task.agentId??u.agentId},s.tasksBySession[i]=a}break}case"taskProgress":{const i=t.sessionId,r=s.tasksBySession[i]??[];s.tasksBySession[i]=r.map(l=>{if(l.id!==t.taskId)return l;if(l.kind==="subagent"&&t.kind==="text")return{...l,text:(l.text??"")+t.outputChunk};const a=l.outputLines??[];if(a.at(-1)===t.outputChunk)return l;const u=[...a,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?u:u.slice(-40)}});break}case"taskCompleted":{const i=t.sessionId,r=s.tasksBySession[i]??[];s.tasksBySession[i]=r.map(l=>l.id!==t.taskId?l:{...l,status:t.status,outputPreview:t.outputPreview,outputBytes:t.outputBytes});break}case"goalUpdated":{const i=t.sessionId;s.goalVersionBySession[i]=(s.goalVersionBySession[i]??0)+1,t.goal===null||t.goal.status==="complete"?delete s.goalBySession[i]:s.goalBySession[i]=t.goal;break}case"configChanged":{s.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":{t.reason==="blocked"&&Ca(e,n)&&od(s,t.sessionId);break}case"promptAborted":{if(t.promptId===e.turnEndedPromptIdBySession[t.sessionId])break;Ca(e,n)&&od(s,t.sessionId);break}case"turnActiveChanged":{if(!Ca(e,n))break;s.sessions=s.sessions.map(i=>i.id===t.sessionId?{...i,mainTurnActive:t.active}:i),t.active?(s.turnActiveBySession[t.sessionId]=!0,delete s.turnEndedPromptIdBySession[t.sessionId],delete s.turnErrorBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId]):(delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],t.promptId!==void 0&&(s.turnEndedPromptIdBySession[t.sessionId]=t.promptId),od(s,t.sessionId));break}case"turnRetry":{if(!Ca(e,n))break;t.retry===void 0?delete s.turnRetryBySession[t.sessionId]:s.turnRetryBySession[t.sessionId]=t.retry;break}case"unknown":{const i=t.raw;if(!(i&&i._noop===!0))if(i&&i._agentError){if(Ca(e,n)){if(n.sessionId!==void 0){const r=i.details??{};s.turnErrorBySession[n.sessionId]={code:i.code,message:i.message,name:i.name,retryable:i.retryable,statusCode:typeof r.statusCode=="number"?r.statusCode:void 0,requestId:typeof r.requestId=="string"?r.requestId:void 0}}(n.sessionId===void 0||n.sessionId!==e.activeSessionId)&&(s.warnings=[...s.warnings,dY(i,o.t)])}}else if(i&&i._agentWarning){const r=i.message??i.code??o.t("warnings.agentWarningFallback");s.warnings=[...s.warnings,`${o.t("warnings.noteLabel")}: ${r}`]}else{const r=i?.type??"(unknown)";s.warnings=[...s.warnings,o.t("warnings.unhandledEvent",{type:r})]}break}}return s}function pY(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n\s*\/dev\/(?:sd|nvme|disk|hd)/,detail:"> /dev/…"},{pattern:/:\(\)\s*\{/,detail:"fork bomb"},{pattern:/\bgit\s+push\b[^|;&]*(?:--force(?:-with-lease)?\b|\s-f\b)/,detail:"git push --force"},{pattern:/\bchmod\s+(?:-[a-zA-Z]+\s+)*777\b/,detail:"chmod 777"},{pattern:/\b(?:curl|wget)\b[^|;&]*\|\s*(?:sudo\s+)?(?:ba|z)?sh\b/,detail:"curl | sh"},{pattern:/\b(?:shutdown|reboot|poweroff|halt)\b/,detail:"shutdown / reboot"}];function DT(e){const t=e.replace(/"[^"]*"|'[^']*'/g," ");for(const{pattern:n,detail:o}of hY)if(n.test(t))return o}const BT="kimiWeb.taskNotification",mY=/]*)>([\s\S]*?)<\/notification>/g,gY=/([\w-]+)="([^"]*)"/g,vY=/]*)>[\s\S]*?<\/output-file>/,yY=/^Title: (.*)$/m,kY=/^Severity: (.*)$/m;function c3(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function Mb(e){const t={};for(const n of e.matchAll(gY))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=c3(n[2]));return t}function bY(e,t,n){const o=Mb(e),s=yY.exec(t)?.[1]?.trim()??"",i=kY.exec(t)?.[1]?.trim()??"";let r=t.split(` +`).filter(c=>!c.startsWith("Title: ")&&!c.startsWith("Severity: ")).join(` +`);const l=r.search(/^<\w/m);l!==-1&&(r=r.slice(0,l)),r=r.trim();const a=vY.exec(t),u=a?(()=>{const c=Mb(a[1]??""),d=Number(c.bytes);return c.path!==void 0&&c.path!==""?{path:c.path,bytes:Number.isFinite(d)?d:void 0}:void 0})():void 0;return{id:o.id??"",category:o.category??"",type:o.type??"",sourceKind:o.source_kind??"",sourceId:o.source_id??"",agentId:o.agent_id,title:c3(s),severity:i,body:c3(r),outputFile:u,raw:n}}function CY(e){if(!e.includes("Tb||i>Tb||(s+1)*(i+1)>xY)return null;const r=Array.from({length:s+1},()=>Array.from({length:i+1},()=>0));for(let h=1;h<=s;h++)for(let m=1;m<=i;m++)r[h][m]=n[h-1]===o[m-1]?r[h-1][m-1]+1:Math.max(r[h-1][m],r[h][m-1]);const l=[];let a=s,u=i;for(;a>0||u>0;)a>0&&u>0&&n[a-1]===o[u-1]?(l.push({type:"context",text:n[a-1]}),a--,u--):u>0&&(a===0||r[a][u-1]>=r[a-1][u])?(l.push({type:"add",text:o[u-1]}),u--):(l.push({type:"del",text:n[a-1]}),a--);l.reverse();const c=[];let d=1,f=1;for(const h of l)h.type==="context"?(c.push({type:"context",text:h.text,oldNo:d,newNo:f}),d++,f++):h.type==="add"?(c.push({type:"add",text:h.text,newNo:f}),f++):(c.push({type:"del",text:h.text,oldNo:d}),d++);return c}const Eb=500;function Pm(e,t){const n=[],o=Sl(e),s=Sl(t),i=Math.min(o.length,Eb),r=Math.min(s.length,Eb);for(let l=1;l<=i;l++)n.push({type:"del",text:o[l-1],oldNo:l});o.length>i&&n.push({type:"context",text:`… ${o.length-i} more lines …`});for(let l=1;l<=r;l++)n.push({type:"add",text:s[l-1],newNo:l});return s.length>r&&n.push({type:"context",text:`… ${s.length-r} more lines …`}),n}function HT(e){let t=0,n=0;for(const o of e)o.type==="add"?t++:o.type==="del"&&n++;return{added:t,removed:n}}const SY=/^read[_-]?media(?:file)?$/i,AY=/^data:([^;]+);base64,(.*)$/s,MY=/^<(image|video|audio)\s+path="([^"]+)">$/,TY=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,EY=/Mime type:\s*([^.\s]+)/i,IY=/Size:\s*(\d+)\s*bytes/i,LY=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,$Y="Image compressed to fit model limits:",NY=/Image compressed to fit model limits:[\s\S]*?<\/system>/g;function FY(e){return e.includes($Y)?e.replace(NY,""):e}function RY(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function Ib(e){const t=TY.exec(e.trim());return t?{kind:t[1],path:RY(t[2])}:null}const zT=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,OY=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function d3(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),o=n>0?t.slice(0,n):t;return zT.test(o)?o:void 0}const PY=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function Lb(e){const t=PY.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",o=OY.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:o!==void 0&&zT.test(o)?o:void 0}}function DY(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 BY(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 HY(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 zY(e,t){if(!SY.test(e))return;const n=BY(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 h=d.text,m=MY.exec(h);m&&(s=m[1],o=m[2]);const v=EY.exec(h);v?.[1]&&(i=v[1]);const k=IY.exec(h);k?.[1]&&(r=Number(k[1]));const w=LY.exec(h);w?.[1]&&w[2]&&(l=`${w[1]}x${w[2]}`);continue}const f=HY(d);f&&(a=f)}if(a===null)return;const u=AY.exec(a.url);return u?.[1]&&(i=u[1]),u?.[2]&&(r=DY(u[2])),{kind:a.kind??s??"image",url:a.url,path:o,fileId:a.url.startsWith("ms://")&&o!==void 0?d3(o):void 0,mimeType:i,bytes:Number.isFinite(r)?r:void 0,dimensions:l}}function WT(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 WY(e,t){if(Gs(e)==="task")for(const n of t??[]){const o=/^agent_id:\s*(\S+)\s*$/.exec(n);if(o?.[1])return o[1]}}function UY(e){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,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,swarmIndex:e.swarmIndex}}function jY(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:o,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,i=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&i!==void 0){const r=r1(s,i)??Pm(s,i);return{kind:"diff",path:o,diff:r}}return{kind:"diff",path:o,diff:[]}}if(n==="file_io"){const o=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:o,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=r1(t.before,t.after)??Pm(t.before,t.after);return{kind:"diff",path:o,diff:r}}const i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:o,detail:i}}if(n==="shell"||n==="command"){const o=typeof t.command=="string"?t.command:e.action;return{kind:"shell",command:o,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:DT(o)}}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 VY(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):qY(e)}function qY(e){const t=e.split(` +`);return t.length>=2&&t[0]?.startsWith(""?t.slice(1,-1).join(` +`):e}function KY(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function ZY(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` +`);return VY(t)}function GY(e,t){const n=e.metadata?.origin??{},o=ZY(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 YY(e,t,n){const{text:o,cron:s}=GY(e,n);return{id:e.id,role:"cron",no:t,text:o,createdAt:e.createdAt,cron:s}}function XY(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 JY(e){return e.metadata?.origin?.kind==="compaction_summary"}function QY(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function eX(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 tX(e){const t=[];for(const n of e){const o=t.at(-1);n.type==="text"&&o?.type==="text"?o.text+=n.text:n.type==="thinking"&&o?.type==="thinking"?o.thinking+=n.thinking:n.type==="thinking"?t.push({type:"thinking",thinking:n.thinking}):t.push({...n})}return JSON.stringify(t)}function UT(e,t,n,o=!0,s={},i={},r){const l=[];let a=r?.startNo??1;const u=r?.collect,c=new Map;for(const v of t)c.set(v.toolCallId,v);let d=null;function f(v=!1){if(!d)return;const k=d;if(d=null,!v&&k.blocks.length===0&&k.textParts.length===0&&k.thinkingParts.length===0&&k.tools.length===0)return;if(!v||!o)for(let b=0;bS.kind==="tool"&&S.tool.id===g.id);x&&x.kind==="tool"&&(x.tool=g)}const w={id:k.id,role:"assistant",no:a++,text:k.textParts.join(` +`),thinking:k.thinkingParts.length>0?k.thinkingParts.join(` +`):void 0,tools:k.tools.length>0?k.tools:void 0,blocks:k.blocks.length>0?k.blocks:void 0,approval:k.approval,approvalId:k.approvalId,durationMs:k.durationMs,createdAt:k.createdAt,endedAt:k.endedAt,goalContinuation:k.goalContinuation};l.push(w),u?.(w,k.sources)}function h(v,k){let w=null;for(const b of k)if(b.type==="text"){if(b.text){w==="text"?v.textParts[v.textParts.length-1]+=b.text:v.textParts.push(b.text);const _=v.blocks.at(-1);_&&_.kind==="text"?_.text+=(w==="text"?"":` +`)+b.text:v.blocks.push({kind:"text",text:b.text}),w="text"}}else if(b.type==="thinking"){if(b.thinking){w==="thinking"?v.thinkingParts[v.thinkingParts.length-1]+=b.thinking:v.thinkingParts.push(b.thinking);const _=v.blocks.at(-1);if(_&&_.kind==="thinking"){_.thinking+=(w==="thinking"?"":` +`)+b.thinking;const g=[_.startedAt,b.startedAt].filter(T=>T!==void 0).sort()[0],x=_.startedAt!==void 0&&_.durationMs===void 0||b.startedAt!==void 0&&b.durationMs===void 0,S=[_,b].flatMap(T=>T.startedAt!==void 0&&T.durationMs!==void 0?[Date.parse(T.startedAt)+T.durationMs]:[]);_.startedAt=g,_.durationMs=!x&&g!==void 0&&S.length>0?Math.max(...S)-Date.parse(g):void 0}else v.blocks.push({kind:"thinking",thinking:b.thinking,startedAt:b.startedAt,durationMs:b.durationMs});w="thinking"}}else if(b.type==="toolUse"){w=null;const _=c.get(b.toolCallId),g=b.toolName==="ExitPlanMode"?i[b.toolCallId]:void 0,x={id:b.toolCallId,name:b.toolName,arg:typeof b.input=="string"?b.input:JSON.stringify(b.input),agentId:Gs(b.toolName)==="task"?b.agentRefs?.find(S=>S.role!=="member")?.agentId??b.agentRefs?.[0]?.agentId:void 0,status:"running",output:b.outputLines,plan:g,planPath:b.toolName==="ExitPlanMode"?g?.path??s[b.toolCallId]?.path:void 0};v.tools.push(x),v.blocks.push({kind:"tool",tool:x}),_&&(v.approval=jY(_),v.approvalId=_.approvalId)}else if(b.type==="toolResult"){w=null;const _=v.tools.findIndex(g=>g.id===b.toolCallId);if(_!==-1){const g=v.tools[_],x=WT(b.output),S={...g,status:b.isError?"error":"ok",output:x,media:b.isError?void 0:zY(g.name,b.output),agentId:g.agentId??WY(g.name,x)};S.name==="ExitPlanMode"&&!S.planPath&&(S.planPath=eX(S.output)),v.tools[_]=S;const T=v.blocks.find(A=>A.kind==="tool"&&A.tool.id===b.toolCallId);T&&T.kind==="tool"&&(T.tool=S)}}else w=null}function m(v){if(v.type==="image"||v.type==="video"){const k=v.type,w=v.source;if(w.kind==="url")return{url:w.url,kind:k};if(w.kind==="base64")return{url:`data:${w.mediaType};base64,${w.data}`,kind:k};if(w.kind==="file"&&n)return{url:n(w.fileId),kind:k,fileId:w.fileId}}if(v.type==="file"&&n){if(v.mediaType.startsWith("image/"))return{url:n(v.fileId),kind:"image",fileId:v.fileId};if(v.mediaType.startsWith("video/"))return{url:n(v.fileId),kind:"video",fileId:v.fileId}}}for(const v of e){if(v.role==="system")continue;if(JY(v)){f();const g=v.metadata?.[PT],x={id:v.id,role:"compaction",no:a,text:v.content.filter(S=>S.type==="text").map(S=>S.text).join(` +`),compaction:{trigger:g?.trigger,tokensBefore:g?.tokensBefore,tokensAfter:g?.tokensAfter}};l.push(x),u?.(x,[v]);continue}if(v.role==="user"){const g=KY(v),x=v.metadata?.origin?.kind,S=x==="skill_activation"&&v.metadata?.origin?.trigger!=="user-slash";if(g===void 0&&(x==="injection"||S))continue;if(g===void 0&&(x==="task"||x==="background_task"||x==="task_notification")){const $=v.content.filter(O=>O.type==="text").map(O=>O.text).join(` +`),B=wY(v.metadata),H=B!==void 0?[B]:CY($);if(H.length>0){d??={id:v.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[v],createdAt:v.createdAt};for(const O of H)d.blocks.push({kind:"notification",notification:{...O,createdAt:v.createdAt}})}continue}if(f(),g!==void 0){const $=YY(v,a++,g);l.push($),u?.($,[v]);continue}if(x==="system_trigger"&&v.metadata?.origin?.name==="goal_continuation"){d={id:v.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[v],createdAt:v.createdAt,goalContinuation:!0};continue}if(!XY(v))continue;const T=v.metadata?.origin,A=T?.kind==="skill_activation"&&T?.trigger==="user-slash",E=T?.kind==="plugin_command"&&T?.trigger==="user-slash",P=[],D=[];for(const $ of v.content){if($.type==="text")if(A){const H=Ib($.text);if(H&&(H.kind==="video"||H.kind==="image")&&n){const F=d3(H.path);if(F){D.push({url:n(F),kind:H.kind,fileId:F});continue}}const O=Lb($.text);O&&D.push({kind:"file",url:O.fileId&&n?n(O.fileId):"",fileId:O.fileId,name:O.name,mediaType:O.mediaType,size:O.size})}else if(E)P.push(T.commandArgs??"");else{const H=Ib($.text);if(H&&(H.kind==="video"||H.kind==="image")&&n){const U=d3(H.path);if(U){D.push({url:n(U),kind:H.kind,fileId:U});continue}}const O=Lb($.text);if(O){D.push({kind:"file",url:O.fileId&&n?n(O.fileId):"",fileId:O.fileId,name:O.name,mediaType:O.mediaType,size:O.size});continue}const F=FY($.text);if(F!==$.text&&F.trim().length===0)continue;P.push(F)}const B=m($);if(B){D.push({url:B.url,kind:B.kind,name:$.type==="file"?$.name:void 0,fileId:B.fileId});continue}$.type==="file"&&n&&D.push({kind:"file",url:n($.fileId),fileId:$.fileId,name:$.name,mediaType:$.mediaType||void 0,size:$.size})}const I={id:v.id,role:"user",no:a++,text:A?T?.skillArgs??"":P.join(` +`),attachments:D.length>0?D:void 0,skillActivation:A?{name:T.skillName,args:T.skillArgs}:void 0,pluginCommand:E?{pluginId:T.pluginId,commandName:T.commandName,args:T.commandArgs}:void 0,createdAt:v.createdAt};l.push(I),u?.(I,[v]);continue}if(v.role==="tool"){d&&(d.sources.push(v),h(d,v.content),d.endedAt=v.createdAt);continue}const k=v.promptId;QY(d,k)?d!==null&&d.promptId===void 0&&k!==void 0&&(d.promptId=k):(f(),d={id:v.id,promptId:k,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[],durationMs:v.durationMs,createdAt:v.createdAt});const b=d;if(b===null)continue;const _=tX(v.content);b.promptId!==void 0&&b.seenSigs.has(_)||(b.seenSigs.add(_),b.sources.push(v),v.durationMs!==void 0&&(b.durationMs=v.durationMs),h(b,v.content),v.id!==b.id&&(b.endedAt=v.createdAt))}return f(!0),l}function nX(e,t,n){const o=e.items.filter(u=>u.kind==="turn"),s=o[0]?.turnId,i=o.length===1?s:void 0,r=new Map(e.tasks.map(u=>[u.taskId,u])),l=e.items.flatMap(u=>u.kind==="turn"?oX(u,e.attachments,r,u.turnId===s?n?.createdAt:void 0,u.turnId===i?n?.disposedAt:void 0):[]),a=e.meta.activity==="turn";return UT(l,[],t,a).map(iX)}function oX(e,t,n,o,s){const i=[],r=new Map(t.map(d=>[d.attachmentId,d])),l=rX([e.startedAt,...e.steps.map(d=>d.startedAt),o])??"",a=$b(e.endedAt)??$b(s),u=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const d=[{type:"text",text:e.prompt}];for(const f of e.attachmentIds??[]){const h=lX(r.get(f));h!==void 0&&d.push(h)}i.push({id:`${e.turnId}:input`,sessionId:"",role:"user",content:d,createdAt:l,promptId:u,metadata:e.origin.kind==="task"&&e.prompt.includes("f.role==="assistant");d>=0&&(i[d]={...i[d],durationMs:c})}return i}function sX(e,t,n){const[o="",...s]=t.split(` +`),i=n?.state??"info";return{id:`task:${e}:${i}`,category:"task",type:`task.${i}`,sourceKind:n?.kind==="subagent"?"subagent":"background_task",sourceId:e,agentId:n?.agentId,title:o.trim(),severity:i==="completed"?"info":"warning",body:s.join(` +`).trim(),raw:t}}function iX(e){if(e.createdAt!==""&&e.endedAt!=="")return e;const t={...e};return t.createdAt===""&&delete t.createdAt,t.endedAt===""&&delete t.endedAt,t}function rX(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 Fb=6e3,f3=256*1024,aX=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;function Rb(e,t){return t===0?e:e-1}function uX(e,t){const n=Sl(t),o=[];let s=0;for(const i of e){if(i.type==="hunk"){const r=aX.exec(i.text);if(!r)return null;const l=Rb(Number(r[1]),r[2]===void 0?1:Number(r[2])),a=Rb(Number(r[3]),r[4]===void 0?1:Number(r[4]));if(an.length)return null;for(;s=n.length||n[s]!==i.text)return null;s++,i.type==="context"&&o.push(i.text)}for(;sf3||Sl(n).length>Fb)return null;const o=uX(e,n);return o===null||o.length>f3||Sl(o).length>Fb?null:{before:o,after:n}}const dX=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function fX(e){return dX.has(e.type)}const pX=50,hX=100,p3=32*1024,mX={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,pX)},cancelTask(e){clearTimeout(e)}};function gX(e,t,n={}){const o=n.scheduler??mX,s=Math.max(1,Math.floor(n.maxItemsPerSlice??hX)),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)},h=()=>{r===i.length?(i.length=0,r=0):r>=1024&&(i.splice(0,r),r=0)};let m;const v=()=>{if(c||l!==null||a!==null||d()===0)return;const w=++u,b=()=>{w===u&&m()};l=o.requestFrame(b),a=o.requestTask(b)};m=()=>{f();let w=0;for(;!c&&w{if(!c){if(t(w)){const b=i.length>r?i.at(-1):void 0,_=b===void 0?void 0:n.coalesce?.(b,w);_===void 0?i.push(w):i[i.length-1]=_,v();return}if(d()===0){e(w);return}i.push(w),m()}});return k.flush=()=>{if(!c){for(f();!c&&r{if(c||d()===0)return;let b=r;for(let _=r;_{c||(c=!0,f(),i.length=0,r=0)},k}function h3(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 vX(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,o=h3(t);if(n===void 0||o===void 0||n.kind!==o.kind||o.value.length<=p3)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 yX(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,o=t.meta.stream,s=h3(e.appEvent),i=h3(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>p3)return;const r=s.value+i.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:r}:{thinking:r}},meta:{...t.meta,stream:{...n}}}}function kX(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function bX(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"||Gs(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:kX(a.status)}]:[]})}}return[]}function CX(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 wX(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&&CX(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}function Ob(e){return e?e.split(` +`).map(t=>t.trimEnd()).filter(Boolean).at(-1)??"":""}function _X(e){return e.suspendedReason||Ob(e.text)||Ob(e.outputLines?.join(` +`))||e.summary||""}function xX(e){return e.suspendedReason?e.suspendedReason:e.text?e.text:e.outputLines&&e.outputLines.length>0?e.outputLines.join(` +`):e.summary??""}function SX(e){return e==="completed"?"completed":e==="failed"||e==="aborted"?"failed":"working"}function Pb(e,t){return{id:e.agentId??e.item??`result-${t}`,agentId:e.agentId,name:e.item??`subagent ${t+1}`,activity:e.body.split(` +`)[0]??"",phase:SX(e.outcome),body:e.body}}function AX(e,t){return!!(t.agentId&&e.agentId===t.agentId||t.item&&e.name.includes(t.item))}function MX(e,t){const n=e.map(s=>({id:s.id,agentId:s.agentId,name:s.name,activity:_X(s),phase:s.phase,body:xX(s)}));if(!t)return n;const o=t.subagents.filter(s=>(s.outcome==="aborted"||s.state==="not_started")&&!e.some(i=>AX(i,s))).map((s,i)=>Pb(s,i));return n.length>0?[...n,...o]:t.subagents.map((s,i)=>Pb(s,i))}const TX=["queued","working","suspended","completed","failed"];function jT(e){return e.status==="completed"?"completed":e.status==="failed"||e.status==="cancelled"?"failed":e.subagentPhase?e.subagentPhase:"working"}function EX(){return{queued:0,working:0,suspended:0,completed:0,failed:0}}function IX(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.swarmIndex===void 0)continue;const o=n.parentToolCallId??"swarm",s=t.get(o)??[];s.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:jT(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex}),t.set(o,s)}return[...t.entries()].map(([n,o])=>{const s=o.toSorted((r,l)=>r.swarmIndex-l.swarmIndex||r.id.localeCompare(l.id)),i=EX();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)?.swarmIndex??0,i=o.members.at(0)?.swarmIndex??0;return s!==i?s-i:n.id.localeCompare(o.id)})}function LX(e){let t=0,n=0;for(const o of e){n+=o.members.length;for(const s of TX)(s==="completed"||s==="failed")&&(t+=o.counts[s])}return{done:t,total:n}}function $X(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,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:jT(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,o)}for(const[n,o]of t)t.set(n,o.toSorted((s,i)=>s.swarmIndex-i.swarmIndex||s.id.localeCompare(i.id)));return t}function _y(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function VT(e){for(const t of["path","file_path","filePath","filename"]){const n=e[t];if(typeof n=="string"&&n.length>0)return n}}const kf=100*1024;function qT(e){const t=Gs(e.name);if(t!=="edit"&&t!=="multi_edit")return null;const n=_y(e.arg);if(!n)return null;if(t==="edit"){if(n.replace_all===!0)return null;const l=typeof n.old_string=="string"?n.old_string:void 0,a=typeof n.new_string=="string"?n.new_string:void 0;return l===void 0||a===void 0||l.length>kf||a.length>kf?null:r1(l,a)}const o=Array.isArray(n.edits)?n.edits:void 0;if(!o||o.length===0)return null;const s=[];let i=0,r=0;for(const l of o){if(!l||typeof l!="object")return null;const a=l;if(a.replace_all===!0)return null;const u=typeof a.old_string=="string"?a.old_string:void 0,c=typeof a.new_string=="string"?a.new_string:void 0;if(u===void 0||c===void 0||u.length>kf||c.length>kf)return null;const d=r1(u,c);if(d===null)return null;s.length>0&&s.push({type:"hunk",text:"···"});for(const f of d)s.push({...f,oldNo:f.oldNo!==void 0?f.oldNo+i:void 0,newNo:f.newNo!==void 0?f.newNo+r:void 0});i+=Sl(u).length,r+=Sl(c).length}return s}const NX=5e3;function FX(e){if(Gs(e.name)!=="write")return null;const t=_y(e.arg);return!t||typeof t.content!="string"||t.content.length>kf||t.content.split(` +`).length>NX?null:{content:t.content,path:VT(t)}}function Db(e){const t=_y(e.arg);return t?VT(t):void 0}function KT(){let e=[],t=null,n=null,o=null,s,i=!0;const r=new WeakMap,l=a=>{const{messages:u,approvals:c}=a,d=a.sessionActive??!0,f=a.planReviewByToolCallId??{},h=a.plansByToolCallId??{},m=(T,A)=>r.set(T,A);let v=n!==null;if(v){const T=n,A=Object.keys(f);v=A.length===Object.keys(T).length&&A.every(E=>f[E]===T[E])}let k=o!==null;if(k){const T=o,A=Object.keys(h);k=A.length===Object.keys(T).length&&A.every(E=>h[E]===T[E])}const w=e.length>0&&c===t&&v&&k&&a.getFileUrl===s;let b=0,_=0,g=1;if(w){let T=-1;for(let A=e.length-1;A>=0;A--)if(e[A].role==="assistant"){T=A;break}for(let A=0;A0?[...e.slice(0,b),...x]:x;return e=S,t=c,n={...f},o={...h},s=a.getFileUrl,i=d,S};return l.reset=()=>{e=[],t=null,n=null,o=null,s=void 0,i=!0},l}const ZT=["light","dark","system"],RX=["small","medium","large","xlarge"],a9="medium",GT="kimi-web.color-scheme",m3="kimi-web.font-scale",Bb="kimi-web.ui-font-size";function g3(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function xy(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function OX(e){try{globalThis.localStorage.removeItem(e)}catch{}}function PX(){const e=g3(GT);return e&&ZT.includes(e)?e:"system"}const oh={light:"#ffffff",dark:"#121212"};function DX(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"?oh.dark:e==="light"?oh.light:null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?oh.dark:oh.light;o.setAttribute("content",n??i)})}function YT(e){return RX.includes(e)}function BX(e){return e<=13?"small":e<=15?"medium":e<=17?"large":"xlarge"}function HX(){const e=g3(m3);if(e==="xxlarge")return"xlarge";if(e!==null)return YT(e)?e:a9;const t=g3(Bb);if(t===null)return a9;const n=Number(t),o=Number.isFinite(n)?BX(n):a9;return xy(m3,o),OX(Bb),o}function zX(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=e)}const Sy=Z(PX()),Ay=Z(HX());let Hb=!1;function WX(){Hb||(Hb=!0,Je(Sy,DX,{immediate:!0}),Je(Ay,zX,{immediate:!0}))}function UX(e){ZT.includes(e)&&(Sy.value=e,xy(GT,e))}function jX(e){YT(e)&&(Ay.value=e,xy(m3,e))}function XT(){return WX(),{colorScheme:Sy,fontScale:Ay,setColorScheme:UX,setFontScale:jX}}const sh=Z(!1);let zb=!1;function u9(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function f2(){return!zb&&typeof window<"u"&&typeof document<"u"&&(zb=!0,sh.value=u9(),new MutationObserver(()=>{sh.value=u9()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{sh.value=u9()})),sh}const VX=Symbol("KimiWebClientFacade"),qX="modulepreload",KX=function(e){return"/"+e},Wb={},jo=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=KX(u),u in Wb)return;Wb[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":qX,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,m)=>{f.addEventListener("load",h),f.addEventListener("error",()=>m(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)})};function vc(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`}const JT=new Set(["read","bash","grep","search","glob","ls","web_fetch","edit","write"]);function QT(e){const t=Gs(e);return t==="multi_edit"?"edit":t}function eE(e){const t=[],n=new Map;for(const o of e){if(o.kind==="thinking")continue;const s=QT(o.tool.name);let i=n.get(s);i||(i={count:0,errors:0},n.set(s,i),t.push(s)),i.count++,o.tool.status==="error"&&i.errors++}return{order:t,byKind:n}}function tE(e,t,n){return JT.has(t)?e(`tools.group.typed.${t}.done`,{count:n}):e("tools.group.countOther",{count:n})}function nE(e,t){return{text:e("tools.activity.failedClause",{count:t}),tone:"danger"}}function oE(e){return e.map(t=>t.fragments.map(n=>n.text).join("")).join(" · ")}function ZX(e,t,n={}){const{order:o,byKind:s}=eE(t),i=[];let r=!1;for(const l of o){const a=s.get(l);if(!a)continue;const u=[{text:tE(e,l,a.count),tone:"normal"}];a.errors>0&&(r=!0,u.push(nE(e,a.errors))),i.push({fragments:u})}if(n.durationMs!==void 0){const l=vc(n.durationMs);l&&i.push({fragments:[{text:l,tone:"faint"}]})}return{clauses:i,plain:oE(i),hasError:r}}function GX(e,t){if(t.kind==="thinking")return{fragments:[{text:e("thinking.streaming"),tone:"normal"}]};const n=QT(t.tool.name);let o=wy(e,t.tool.name,t.tool.arg);if(n==="write"&&o){const i=e("tools.chip.created");o.endsWith(i)&&(o=o.slice(0,o.length-i.length).trimEnd())}return{fragments:[{text:o&&JT.has(n)?e(`tools.activity.doing.${n}`,{subject:o}):e("tools.activity.busy"),tone:"normal"}]}}function YX(e,t,n){const o=t.filter(c=>c!==n&&!(c.kind==="tool"&&c.tool.status==="running")),{order:s,byKind:i}=eE(o),r=e("tools.activity.liveDonePrefix"),l=[];for(const c of s){const d=i.get(c);if(!d)continue;const f=[{text:`${r}${tE(e,c,d.count)}`,tone:"faint"}];d.errors>0&&f.push(nE(e,d.errors)),l.push({fragments:f})}const a=n===null?null:GX(e,n),u=a?[a,...l]:l;return{current:a,done:l,plain:oE(u)}}async function Zs(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 XX(e)}function XX(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 JX={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"},QX={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function eJ(e){const t=e?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!t)return;const n=QX[t];if(n)return n;const o=t.lastIndexOf(".");if(!(o<=0))return JX[t.slice(o+1)]}const tJ="kimi_desktop",nJ="platform",Ub="kimi-desktop",jb="kimi-desktop-platform";function oJ(){let e=!1,t=null;try{const n=new URLSearchParams(window.location.search);n.has(tJ)?(sessionStorage.setItem(Ub,"1"),e=!0):e=e||sessionStorage.getItem(Ub)==="1";const o=n.get(nJ);o?(sessionStorage.setItem(jb,o),t=o):t=sessionStorage.getItem(jb)}catch{}return{isDesktop:e,platform:t}}const v3=oJ(),Wp=v3.isDesktop,rc=v3.isDesktop&&v3.platform==="darwin",sJ=["faces","nature","food","activity","objects","symbols"],iJ=[["😀","faces","grinning smile happy 笑 开心"],["😄","faces","smile happy joy 笑 开心 高兴"],["😁","faces","grin beaming 咧嘴笑 开心"],["😂","faces","joy laugh tears 笑哭 爆笑"],["🤣","faces","rofl laugh rolling 笑翻 爆笑"],["😊","faces","blush shy happy 微笑 害羞"],["😉","faces","wink 眨眼"],["😍","faces","heart eyes love 爱心眼 喜欢 爱"],["🥰","faces","smiling hearts love 爱心 喜欢"],["😘","faces","kiss 飞吻 亲亲"],["😋","faces","yum tongue 好吃 馋"],["🤪","faces","zany crazy 鬼脸 疯"],["🤔","faces","thinking hmm consider 思考 想"],["🤨","faces","skeptical eyebrow 怀疑 挑眉"],["😐","faces","neutral meh 面无表情 无语"],["😑","faces","expressionless 面无表情 无语"],["🙄","faces","eye roll 翻白眼 无语"],["😶","faces","no mouth silent 无言 沉默"],["🫡","faces","salute 敬礼 收到"],["🤫","faces","shush quiet 嘘 安静"],["🤭","faces","oops giggle 捂嘴 偷笑"],["😴","faces","sleeping sleepy 睡觉 困"],["😪","faces","sleepy tired 困 疲惫"],["😷","faces","mask sick 口罩 生病"],["🤒","faces","sick fever 生病 发烧"],["🤕","faces","hurt bandage 受伤"],["🤢","faces","nauseated 恶心"],["🤯","faces","mind blown explode 震惊 爆炸"],["🥳","faces","party celebrate 庆祝 派对"],["🤩","faces","star struck 星星眼 激动"],["😎","faces","cool sunglasses 酷 墨镜"],["🥸","faces","disguise 伪装 假扮"],["🤓","faces","nerd geek 书呆子 学霸"],["😢","faces","cry sad 哭 难过"],["😭","faces","sob cry loudly 大哭 痛哭"],["😤","faces","triumph huff 哼 生气"],["😡","faces","angry rage mad 生气 愤怒"],["🤬","faces","swearing cursing 骂人 爆粗"],["😱","faces","scream fear 尖叫 害怕"],["😨","faces","fearful 害怕 恐惧"],["🥵","faces","hot heat 热 出汗"],["🥶","faces","cold freezing 冷 冻"],["🥴","faces","woozy drunk 晕 醉"],["😇","faces","angel innocent 天使 无辜"],["🙃","faces","upside down silly 倒脸 哭笑不得"],["💀","faces","skull dead 骷髅 笑死"],["👻","faces","ghost 鬼 幽灵"],["👍","faces","thumbs up like good 赞 好"],["👎","faces","thumbs down dislike 踩 差"],["👏","faces","clap applause 鼓掌 厉害"],["🙌","faces","raise hands celebrate 举手 庆祝"],["🙏","faces","pray thanks please 拜托 感谢 祈祷"],["💪","faces","muscle strong flex 加油 强壮 肌肉"],["👀","faces","eyes look watch 看 围观 眼睛"],["🤝","faces","handshake deal 握手 合作"],["✌️","faces","victory peace 胜利 耶"],["👋","faces","wave hello bye 挥手 你好 再见"],["🤞","faces","crossed fingers luck 祈祷 好运"],["👌","faces","ok okay 好的 可以"],["🫶","faces","heart hands love 比心 爱心"],["✍️","faces","writing hand 写字 记录"],["🧠","faces","brain smart 大脑 聪明"],["🦾","faces","mechanical arm 机械臂 力量"],["👤","faces","person user profile 个人 用户"],["👥","faces","people team group 团队 多人"],["🐶","nature","dog puppy 狗 小狗"],["🐱","nature","cat kitten 猫 小猫"],["🐭","nature","mouse rat 老鼠"],["🐹","nature","hamster 仓鼠"],["🐰","nature","rabbit bunny 兔子"],["🦊","nature","fox 狐狸"],["🐻","nature","bear 熊"],["🐼","nature","panda 熊猫"],["🐨","nature","koala 考拉"],["🐯","nature","tiger 老虎"],["🦁","nature","lion 狮子"],["🐮","nature","cow 牛"],["🐷","nature","pig 猪"],["🐸","nature","frog 青蛙"],["🐵","nature","monkey 猴子"],["🐔","nature","chicken 鸡"],["🐧","nature","penguin 企鹅"],["🐦","nature","bird 鸟"],["🐣","nature","chick hatching 小鸡 孵化"],["🦆","nature","duck 鸭子"],["🦉","nature","owl 猫头鹰"],["🐝","nature","bee 蜜蜂"],["🐛","nature","bug caterpillar 虫子 毛虫"],["🦋","nature","butterfly 蝴蝶"],["🐌","nature","snail slow 蜗牛 慢"],["🐢","nature","turtle slow 乌龟 慢"],["🐍","nature","snake 蛇"],["🐙","nature","octopus 章鱼"],["🦑","nature","squid 鱿鱼"],["🦐","nature","shrimp 虾"],["🦀","nature","crab 螃蟹"],["🐠","nature","tropical fish 鱼 热带鱼"],["🐳","nature","whale 鲸鱼"],["🦈","nature","shark 鲨鱼"],["🐊","nature","crocodile 鳄鱼"],["🦄","nature","unicorn 独角兽"],["🐴","nature","horse 马"],["🐑","nature","sheep 羊 绵羊"],["🐐","nature","goat 山羊"],["🦜","nature","parrot 鹦鹉"],["🌸","nature","blossom flower sakura 樱花 花"],["🌹","nature","rose flower 玫瑰 花"],["🌻","nature","sunflower 向日葵"],["🌷","nature","tulip 郁金香"],["🌱","nature","seedling sprout 发芽 幼苗"],["🌲","nature","tree evergreen 树 松树"],["🌳","nature","deciduous tree 树 大树"],["🌵","nature","cactus 仙人掌"],["🍀","nature","clover luck 四叶草 幸运"],["🍁","nature","maple leaf autumn 枫叶 秋天"],["🍄","nature","mushroom 蘑菇"],["🌈","nature","rainbow 彩虹"],["☀️","nature","sun sunny 太阳 晴"],["🌙","nature","moon crescent 月亮"],["⭐","nature","star 星星"],["🌟","nature","glowing star 星星 闪亮"],["☁️","nature","cloud 云"],["⛅","nature","partly cloudy 多云"],["🌧️","nature","rain rainy 下雨"],["❄️","nature","snowflake snow 雪 雪花"],["⛄","nature","snowman 雪人"],["⚡","nature","lightning bolt 闪电"],["🔥","nature","fire hot 火 燃"],["🌊","nature","wave ocean sea 海浪"],["🏔️","nature","mountain snow 雪山 山"],["☕","food","coffee 咖啡"],["🍵","food","tea 茶"],["🧋","food","bubble tea boba 奶茶"],["🥛","food","milk 牛奶"],["🍺","food","beer 啤酒"],["🍷","food","wine 红酒"],["🥂","food","champagne cheers 香槟 干杯"],["🥤","food","cup straw soda 饮料 可乐"],["🧃","food","juice box 果汁"],["🍎","food","apple 苹果"],["🍊","food","orange tangerine 橙子 橘子"],["🍋","food","lemon 柠檬"],["🍉","food","watermelon 西瓜"],["🍓","food","strawberry 草莓"],["🍑","food","peach 桃子"],["🥭","food","mango 芒果"],["🍍","food","pineapple 菠萝"],["🥝","food","kiwi 猕猴桃"],["🍇","food","grapes 葡萄"],["🍒","food","cherries 樱桃"],["🥑","food","avocado 牛油果"],["🥦","food","broccoli 西兰花"],["🌽","food","corn 玉米"],["🌶️","food","hot pepper spicy 辣椒 辣"],["🍔","food","burger hamburger 汉堡"],["🍟","food","fries 薯条"],["🍕","food","pizza 披萨"],["🌭","food","hot dog 热狗"],["🥪","food","sandwich 三明治"],["🌮","food","taco 墨西哥卷"],["🍜","food","ramen noodles 拉面 面条"],["🍝","food","spaghetti pasta 意面"],["🍣","food","sushi 寿司"],["🍱","food","bento 便当"],["🥟","food","dumpling 饺子"],["🍚","food","rice 米饭"],["🍞","food","bread 面包"],["🥐","food","croissant 可颂 牛角包"],["🧀","food","cheese 奶酪 芝士"],["🍳","food","cooking egg 煎蛋 做饭"],["🍦","food","ice cream 冰淇淋"],["🍰","food","cake 蛋糕"],["🎂","food","birthday cake 生日蛋糕"],["🍫","food","chocolate 巧克力"],["🍩","food","donut doughnut 甜甜圈"],["🍪","food","cookie 饼干"],["🍭","food","lollipop 棒棒糖"],["⚽","activity","soccer football 足球"],["🏀","activity","basketball 篮球"],["🏈","activity","american football 橄榄球"],["⚾","activity","baseball 棒球"],["🎾","activity","tennis 网球"],["🏐","activity","volleyball 排球"],["🏓","activity","ping pong 乒乓球"],["🏸","activity","badminton 羽毛球"],["🥊","activity","boxing 拳击"],["⛳","activity","golf 高尔夫"],["🎣","activity","fishing 钓鱼"],["🏊","activity","swim 游泳"],["🏄","activity","surf 冲浪"],["🚴","activity","cycling 骑行"],["🏋️","activity","weightlifting gym 举重 健身"],["🧘","activity","yoga meditation 瑜伽 冥想"],["🎮","activity","video game controller 游戏 游戏机"],["🎲","activity","dice 骰子"],["🎯","activity","target bullseye 目标 靶心"],["🎳","activity","bowling 保龄球"],["🎰","activity","slot machine 老虎机"],["♟️","activity","chess 国际象棋 棋"],["🎸","activity","guitar 吉他"],["🎹","activity","piano keyboard 钢琴"],["🥁","activity","drum 鼓"],["🎤","activity","microphone sing 麦克风 唱歌"],["🎧","activity","headphones 耳机"],["🎬","activity","clapper movie 电影 拍摄"],["🎨","activity","art palette paint 画画 艺术"],["🎭","activity","theater masks 戏剧 面具"],["🎪","activity","circus 马戏团"],["🎡","activity","ferris wheel 摩天轮"],["✈️","activity","airplane travel flight 飞机 旅行"],["🚗","activity","car drive 汽车 车"],["🚕","activity","taxi 出租车"],["🚌","activity","bus 公交车"],["🚑","activity","ambulance 救护车"],["🚒","activity","fire engine 消防车"],["🚀","activity","rocket launch ship 火箭 发射"],["🛸","activity","ufo flying saucer 飞碟"],["🚲","activity","bicycle bike 自行车"],["🛴","activity","scooter 滑板车"],["🚄","activity","bullet train 高铁 动车"],["🚢","activity","ship 船 轮船"],["⛵","activity","sailboat 帆船"],["🏠","activity","house home 房子 家"],["🏢","activity","office building 公司 办公楼"],["🏥","activity","hospital 医院"],["🏫","activity","school 学校"],["🏖️","activity","beach vacation 海滩 度假"],["⛺","activity","camping tent 露营 帐篷"],["🌋","activity","volcano 火山"],["🗺️","activity","map world 地图"],["🧭","activity","compass 指南针"],["💻","objects","laptop computer 电脑 笔记本"],["🖥️","objects","desktop computer 台式机 电脑"],["⌨️","objects","keyboard 键盘"],["🖱️","objects","computer mouse 鼠标"],["📱","objects","phone mobile 手机"],["🔋","objects","battery 电池"],["🔌","objects","plug electric 插头"],["💾","objects","floppy save 软盘 保存"],["📀","objects","cd disc 光盘"],["🎥","objects","movie camera 摄像机"],["📷","objects","camera 相机"],["🔭","objects","telescope 望远镜"],["📡","objects","satellite antenna 卫星 天线"],["🌐","objects","globe web internet 网络 全球 互联网"],["🕯️","objects","candle 蜡烛"],["💡","objects","bulb idea light 灯泡 点子"],["🔦","objects","flashlight 手电筒"],["📁","objects","folder 文件夹"],["📂","objects","open folder 文件夹 打开"],["🗂️","objects","card index archive 归档 索引"],["📅","objects","calendar date 日历 日期"],["📌","objects","pin pushpin 图钉 置顶"],["📍","objects","round pin location 定位 位置"],["📎","objects","paperclip attachment 回形针 附件"],["✂️","objects","scissors cut 剪刀 剪切"],["📏","objects","ruler 尺子"],["📝","objects","memo note write 备忘 记录"],["✏️","objects","pencil edit write 铅笔 编辑"],["📄","objects","document page 文档 文件"],["📃","objects","page curl 文档 文件"],["📑","objects","bookmark tabs 标签页 文档"],["📚","objects","books 书 书籍"],["📖","objects","open book 打开的书 阅读"],["🔖","objects","bookmark 书签"],["🏷️","objects","label tag 标签"],["📊","objects","bar chart stats 图表 统计"],["📈","objects","chart up growth 上涨 增长"],["📉","objects","chart down 下跌 下降"],["🔍","objects","search magnifier 搜索 查找"],["🔎","objects","search magnifier right 搜索 查找"],["🔒","objects","lock locked 锁 锁定"],["🔓","objects","unlock open 解锁"],["🔑","objects","key 钥匙 密钥"],["🔧","objects","wrench tool 扳手 工具"],["🔨","objects","hammer 锤子"],["🛠️","objects","tools hammer wrench 工具 修理"],["🧰","objects","toolbox 工具箱 工具"],["🪛","objects","screwdriver 螺丝刀 工具"],["🔩","objects","nut and bolt screw 螺母 螺栓"],["🏗️","objects","building construction crane 施工 建造"],["⚙️","objects","gear settings 齿轮 设置"],["🧲","objects","magnet 磁铁"],["⚗️","objects","alembic 蒸馏器 实验"],["🧪","objects","test tube experiment 实验 试管"],["🔬","objects","microscope science 显微镜 科学"],["🤖","objects","robot bot 机器人"],["👾","objects","alien monster game 外星人 游戏"],["💣","objects","bomb 炸弹"],["🧨","objects","firecracker 爆竹"],["🗑️","objects","trash delete 垃圾桶 删除"],["🧹","objects","broom clean 扫帚 清理"],["🧻","objects","toilet paper 纸巾"],["🧽","objects","sponge 海绵"],["📦","objects","package box 包裹 箱子"],["✉️","objects","envelope mail 邮件 信封"],["📮","objects","mailbox postbox 邮箱"],["📧","objects","email mail 邮件"],["📥","objects","inbox tray receive 收件箱 接收"],["📤","objects","outbox tray send 发件箱 发送"],["📞","objects","telephone receiver call phone 电话 通话"],["💬","objects","speech balloon chat message bubble 聊天 对话 气泡 消息"],["💭","objects","thought balloon thinking 思考 想法 气泡"],["📣","objects","megaphone announcement 喇叭 公告"],["📢","objects","loudspeaker broadcast 广播 喇叭 通知"],["🚨","objects","police light alert emergency 警报 告警 紧急"],["🗳️","objects","ballot box vote 投票箱 投票"],["🔗","objects","link chain 链接 连接"],["🧩","objects","puzzle piece plugin 拼图 插件"],["🪄","objects","magic wand 魔法 魔杖"],["🛡️","objects","shield security 盾牌 安全"],["⚔️","objects","crossed swords 交叉剑 战斗"],["💳","objects","credit card 信用卡"],["💰","objects","money bag 钱袋 钱"],["🧾","objects","receipt 收据 小票"],["📿","objects","prayer beads 念珠"],["💍","objects","ring 戒指"],["👑","objects","crown 皇冠"],["🎩","objects","top hat 礼帽"],["🎒","objects","backpack 背包 书包"],["👓","objects","glasses 眼镜"],["🌂","objects","umbrella 雨伞"],["🕰️","objects","mantel clock 座钟"],["⌚","objects","watch 手表"],["⏱️","objects","stopwatch 秒表"],["🧯","objects","fire extinguisher 灭火器"],["🩹","objects","bandage patch fix 创可贴 补丁 修复"],["🎓","objects","graduation cap study learn 毕业 学习"],["🎫","objects","ticket 票 门票 工单"],["✅","symbols","check done complete 完成 对勾"],["✔️","symbols","checkmark correct 对勾 正确"],["❌","symbols","cross x wrong 错误 叉"],["❓","symbols","question help 问题 问号"],["❔","symbols","white question 问题 问号"],["❗","symbols","exclamation important 感叹号 重要"],["❕","symbols","white exclamation 感叹号"],["⚠️","symbols","warning caution 警告 注意"],["🚧","symbols","construction wip 施工 进行中"],["🚫","symbols","prohibited no 禁止"],["💥","symbols","boom explosion 爆炸"],["✨","symbols","sparkles shiny 闪亮 星星"],["🎉","symbols","tada party celebrate 庆祝 撒花"],["🎊","symbols","confetti party 庆祝 彩带"],["🏆","symbols","trophy champion 奖杯 冠军"],["🥇","symbols","gold medal first 金牌 第一"],["🥈","symbols","silver medal second 银牌 第二"],["🥉","symbols","bronze medal third 铜牌 第三"],["🎖️","symbols","military medal 勋章"],["🚩","symbols","red flag mark 红旗 标记"],["🏁","symbols","checkered flag finish 终点 完成"],["⏳","symbols","hourglass time waiting 沙漏 时间"],["⌛","symbols","hourglass done 沙漏 时间"],["🕐","symbols","clock one time 时钟 一点"],["⏰","symbols","alarm clock 闹钟"],["🔔","symbols","bell notification 铃铛 通知"],["🔕","symbols","bell slash mute 静音 免打扰"],["🕹️","symbols","joystick game 摇杆 游戏"],["🔴","symbols","red circle record 红圆 录制"],["🟢","symbols","green circle online 绿圆 在线"],["🟡","symbols","yellow circle 黄圆"],["🟠","symbols","orange circle 橙圆"],["🔵","symbols","blue circle 蓝圆"],["🟣","symbols","purple circle 紫圆"],["⚫","symbols","black circle 黑圆"],["⚪","symbols","white circle 白圆"],["🟥","symbols","red square 红方"],["🟩","symbols","green square 绿方"],["🟦","symbols","blue square 蓝方"],["🔺","symbols","red triangle up 三角 上"],["🔻","symbols","triangle down 三角 下"],["🔸","symbols","diamond orange 菱形"],["🔹","symbols","diamond blue 菱形"],["💠","symbols","diamond dot 菱形 花"],["🔶","symbols","diamond orange big 菱形"],["🔷","symbols","diamond blue big 菱形"],["▶️","symbols","play 播放"],["⏸️","symbols","pause 暂停"],["⏹️","symbols","stop 停止"],["⏺️","symbols","record 录制"],["⏩","symbols","fast forward 快进"],["⏪","symbols","rewind 快退"],["🔀","symbols","shuffle 随机 打乱"],["🔁","symbols","repeat 重复 循环"],["🔂","symbols","repeat one 单曲循环"],["🔄","symbols","refresh sync 刷新 同步"],["🔃","symbols","reload 重载"],["➕","symbols","plus add 加 新增"],["➖","symbols","minus 减"],["➗","symbols","divide 除"],["✖️","symbols","multiply 乘"],["💲","symbols","dollar money 美元 钱"],["™️","symbols","trademark 商标"],["©️","symbols","copyright 版权"],["®️","symbols","registered 注册商标"],["↔️","symbols","left right arrow 左右箭头"],["⬆️","symbols","up arrow 上箭头"],["⬇️","symbols","down arrow 下箭头"],["➡️","symbols","right arrow 右箭头"],["⬅️","symbols","left arrow 左箭头"],["🔙","symbols","back 返回"],["🔜","symbols","soon 很快"],["🔝","symbols","top 置顶 顶部"],["💤","symbols","zzz sleep 睡觉"],["🆕","symbols","new 新 新品"],["🆒","symbols","cool 酷"],["🆓","symbols","free 免费"],["🆗","symbols","ok 可以"],["🆙","symbols","up 提升"],["🆚","symbols","vs versus 对比"],["♾️","symbols","infinity 无限"],["💯","symbols","hundred perfect 满分 一百"],["💢","symbols","anger 生气"],["♨️","symbols","hot springs 温泉"],["🚸","symbols","children crossing 注意儿童"],["🔞","symbols","no one under eighteen 十八禁"],["📵","symbols","no mobile phones 禁止手机"],["❤️","symbols","red heart love 红心 爱"],["🧡","symbols","orange heart 橙心"],["💛","symbols","yellow heart 黄心"],["💚","symbols","green heart 绿心"],["💙","symbols","blue heart 蓝心"],["💜","symbols","purple heart 紫心"],["🖤","symbols","black heart 黑心"],["🤍","symbols","white heart 白心"],["🤎","symbols","brown heart 棕心"],["💔","symbols","broken heart 心碎"],["💕","symbols","two hearts 双心 爱心"],["💖","symbols","sparkling heart 闪亮的心"],["💗","symbols","growing heart 心动"]],sE=iJ.map(([e,t,n])=>({emoji:e,group:t,keywords:n}));function rJ(e,t=24){const n=e.trim().toLowerCase();if(!n)return[];const o=[];for(const s of sE)if((s.keywords.includes(n)||s.emoji===n)&&(o.push(s.emoji),o.length>=t))break;return o}const lJ=8;function aJ(e,t,n=lJ){return[t,...e.filter(o=>o!==t)].slice(0,n)}function uJ(e,t){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}}function Al(e){if(e>=1024*1024)return`${Vb(e/(1024*1024))}M`;if(e>=1024){const t=e/1024;return`${t>=100?Math.round(t):Vb(t)}k`}return String(e)}function Vb(e){const t=e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function v1(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const cJ=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function Pr(e){const t=e.replaceAll("\\","/"),n=cJ.test(t),o=t.replace(/\/+$/,"");return n?o.toLowerCase():o}function dJ(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:o,sessionsHasMoreByWorkspace:s}=e,i=new Set(o.map(Pr)),r=new Map;for(const f of t){const h=Pr(f.root);i.has(h)||r.has(h)||r.set(h,{...f})}for(const f of n){const h=f.cwd;if(!h)continue;const m=Pr(h);i.has(m)||r.has(m)||r.set(m,{id:f.workspaceId??h,root:h,name:v1(h),sessionCount:0})}const l=new Map;for(const f of t){const h=Pr(f.root);l.has(h)||l.set(h,f.id)}const a=new Map;for(const f of n){const h=l.get(Pr(f.cwd))??f.workspaceId??f.cwd;a.set(h,(a.get(h)??0)+1)}const u=[];for(const f of t){const h=Pr(f.root);!i.has(h)&&!u.includes(h)&&u.push(h)}const c=[...r.keys()].filter(f=>!u.includes(f));c.sort((f,h)=>r.get(f).root.localeCompare(r.get(h).root));const d=[];for(const f of[...u,...c]){const h=r.get(f),m=a.get(h.id)??a.get(h.root)??0,v=s[h.id]===!1?m:Math.max(h.sessionCount,m);d.push({...h,sessionCount:v})}return d}function fJ(e,t){if(e===void 0||e.length===0)return;const n=t?.find(o=>o.id===e)??t?.find(o=>o.model===e);return n?.displayName||n?.model||(e.includes("/")?e.split("/").pop():e)}function pJ(e){if(!(e===void 0||e.length===0||e==="off"||e==="on"))return e}function p2(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 iE(e){return e?.supportEfforts??[]}function hJ(e){return e[Math.floor(e.length/2)]}function bp(e){if(p2(e)==="unsupported")return"off";const t=iE(e);return t.length>0?e?.defaultEffort??hJ(t):"on"}function Up(e){const t=iE(e),n=p2(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function y3(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function mJ(e){return e!=="off"}function gJ(e,t){return Up(e).includes(t)}function My(e,t){return t==="off"?"off":t==="on"?bp(e):t}function Dm(e,t){return t??bp(e)}function vJ(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 yJ(e,t,n){return!n||e===void 0?t:bp(e)}let kJ=0;function k3(e,t){const n=++kJ;return e.pendingThinkingBySession[t]=n,n}function vl(e,t,n){return n===void 0||e.pendingThinkingBySession[t]!==n?!1:(delete e.pendingThinkingBySession[t],!0)}function rE(e,t,n){e.pendingThinkingBySession[t]===void 0&&(e.thinkingBySession[t]=n)}function lE(){return window.kimiDesktop}function ih(){return typeof lE()?.getPathForFile=="function"}function aE(e){const t=lE()?.getPathForFile;if(typeof t!="function")return null;try{return t(e)}catch{return null}}function c9(e){return Array.from(e.dataTransfer?.items??[]).some(t=>t.kind==="file"&&t.type==="")}function b3(e,t=aE){const n=Array.from(e.dataTransfer?.items??[]);if(n.length===0)return{files:Array.from(e.dataTransfer?.files??[]),folderPaths:[]};const o=[],s=[],i=new Set;for(const r of n){if(r.kind!=="file")continue;const l=r.getAsFile();if(l)if(r.webkitGetAsEntry()?.isDirectory===!0){const a=t(l);if(!a||i.has(a))continue;i.add(a),s.push(a)}else o.push(l)}return{files:o,folderPaths:s}}function bJ(e,t=aE){return b3(e,t).folderPaths}const CJ=/([\s\S]*?)<\/summary>/,wJ=/([\s\S]*?)<\/resume_hint>/,d9=/]*)>|<\/subagent>/g,_J="",qb=/(completed|failed|aborted):\s*(\d+)/g,Kb=/([a-z_]+)="([^"]*)"/g;function xJ(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function SJ(e){const t={};Kb.lastIndex=0;let n;for(;(n=Kb.exec(e))!==null;)t[n[1]]=xJ(n[2]);return t}function AJ(e){const t={completed:0,failed:0,aborted:0};qb.lastIndex=0;let n;for(;(n=qb.exec(e))!==null;){const o=n[1];t[o]=Number(n[2])}return t}function MJ(e,t){const n=SJ(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function TJ(e){const t=[],n=[];d9.lastIndex=0;let o;for(;(o=d9.exec(e))!==null;)if(o[0]===_J){if(n.length===0)continue;const s=n.pop();s&&n.length===0&&t.push(MJ(s.attrs,e.slice(s.bodyStart,o.index)))}else n.length===0?n.push({attrs:o[1]??"",bodyStart:d9.lastIndex}):n.push(null);return t}function EJ(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` +`):e;if(!t.includes(""))return null;const n=CJ.exec(t)?.[1]?.trim()??"",{completed:o,failed:s,aborted:i}=AJ(n),r=wJ.exec(t)?.[1]?.trim(),l=TJ(t),a=o+s+i;return{summary:n,completed:o,failed:s,aborted:i,total:a>0?a:l.length,subagents:l,resumeHint:r}}const IJ=/^[A-Za-z]:[\\/]/;function Zb(e){return IJ.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function h2(e,t){if(!t)return null;const n=c=>c.replace(/\\/g,"/"),o=n(e);let s=n(t);s.length>1&&(s=s.replace(/\/+$/,""));const i=Zb(s)||Zb(o),r=i?s.toLowerCase():s,l=i?o.toLowerCase():o,a=r.endsWith("/")?r:`${r}/`;if(l!==r&&!l.startsWith(a))return null;const u=l===r?"":o.slice(a.length);return u.split("/").includes("..")?null:u||null}const Bf="application/x-kimi-session-row";function LJ(e,t){return e.includes(t)?e:[...e,t]}function uE(e,t){return e.includes(t)?e.filter(n=>n!==t):e}function cE(e,t){const n=new Set(e);return[...e,...t.filter(o=>!n.has(o))]}function $J(e,t){const n=new Set(t),o=new Map,s=[];for(const r of e)n.has(r.id)?o.set(r.id,r):s.push(r);const i=[];for(const r of t){const l=o.get(r);l!==void 0&&i.push(l)}return{pinned:i,unpinned:s}}function NJ(e,t,n,o){const s=e.filter(r=>r!==t),i=n===null?-1:s.indexOf(n);return i===-1?[...s,t]:(s.splice(o==="before"?i:i+1,0,t),s)}function FJ(e,t,n){return e.find(o=>o.window?.duration===t&&o.window?.unit===n)}const RJ=30;function OJ(e){return e!==void 0&&e0?(l.push(t("settings.planUsage.durationDay",{n:s})),l.push(t("settings.planUsage.durationHour",{n:i})),l.push(t("settings.planUsage.durationMinute",{n:r}))):i>0?(l.push(t("settings.planUsage.durationHour",{n:i})),l.push(t("settings.planUsage.durationMinute",{n:r}))):r>0?l.push(t("settings.planUsage.durationMinute",{n:r})):l.push(t("settings.planUsage.durationSecond",{n:o})),t("settings.planUsage.resetsIn",{duration:l.join(" ")})}function C3(e,t){if(t<=0)return"ok";const n=e/t;return n>=.85?"danger":n>=.5?"warn":"ok"}function Wh(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}function PJ(e,t){const n=(e/100).toFixed(2);switch(t.toUpperCase()){case"CNY":return{symbol:"¥",number:n};case"USD":return{symbol:"$",number:n};default:return{symbol:"",number:`${n} ${t}`}}}const DJ=["kimi","openai","openai_responses","anthropic","google-genai","vertexai"];function rh(){return{model:"",maxContextSize:"",displayName:"",capabilities:["tool_use","thinking"],supportEfforts:[],adaptiveThinking:!0}}function w3(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:"",capabilities:Array.isArray(s.capabilities)?s.capabilities.filter(i=>typeof i=="string"):[],supportEfforts:Array.isArray(s.supportEfforts)?s.supportEfforts.filter(i=>typeof i=="string"):[],...typeof s.adaptiveThinking=="boolean"?{adaptiveThinking:s.adaptiveThinking}:{}})}return n}const pE=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function BJ(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!pE.test(n))return"idInvalid";if(t.requireApiKey===!0&&e.apiKey.trim()==="")return"apiKeyRequired";if(t.requireBaseUrl===!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 hE(e){return e.map(t=>{const n=t.displayName.trim();return{model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),...t.capabilities.length>0?{capabilities:[...t.capabilities]}:{},...t.supportEfforts.length>0?{supportEfforts:[...t.supportEfforts]}:{},...t.adaptiveThinking!==void 0?{adaptiveThinking:t.adaptiveThinking}:{},...n===""?{}:{displayName:n}}})}function HJ(e){const t=e.apiKey.trim(),n=e.baseUrl.trim();return{id:e.id.trim(),type:e.type,models:hE(e.models),...t===""?{}:{apiKey:t},...n===""?{}:{baseUrl:n}}}function zJ(e,t,n){const o=hE(e.models),s=e.id.trim(),i=e.apiKey.trim(),r=e.baseUrl.trim(),l=n?.existingDefaultModel?.trim()??"",a=l.indexOf("/")>=0?l.slice(l.indexOf("/")+1):l;return{...t!==void 0&&s!==""&&s!==t.id?{newId:s}:{},type:e.type,models:o,...i===""&&n?.includeBlankApiKey!==!0?{}:{apiKey:i},...r===""?{}:{baseUrl:r},...a!==""&&o.some(u=>u.model===a)?{defaultModel:a}:{}}}function mE(e){return e.id==="managed:kimi-code"&&e.type==="kimi"}const WJ=/^(\d+)\t(.*)$/;function UJ(e){const t=e.at(-1)===""?e.slice(0,-1):e;if(t.length===0)return null;const n=[],o=[];for(const s of t){const i=WJ.exec(s);if(!i)return null;o.push(Number(i[1])),n.push(i[2]??"")}return{contents:n,lineNumbers:o}}function gE(e,t){for(const n of e.stateMachineNames){const o=(e.stateMachineInputs(n)??[]).find(s=>s.name===t);if(o!==void 0)return o}return null}function jJ(e,t){const n=gE(e,t);return n!==null&&typeof n.fire=="function"?(n.fire(),!0):!1}function Gb(e,t,n){const o=gE(e,t);return o!==null&&typeof o.value==typeof n?(o.value=n,!0):!1}const VJ={"&":"&","<":"<",">":">",'"':""","'":"'"};function Yb(e){return e.replace(/[&<>"']/g,t=>VJ[t]??t)}function qJ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function KJ(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 Xb(o,n*2);const i=o.toLowerCase().indexOf(s.toLowerCase());if(i<0)return Xb(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 zs="kimi-web.server-credential",ZJ="token",GJ=10080*60*1e3;let yl;const _3=new Set;function YJ(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(ZJ);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 x3(e){return{version:1,credential:e,expiresAt:Date.now()+GJ}}function XJ(e){return JSON.stringify(e)}function Ty(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 S3(e){globalThis.localStorage?.setItem(zs,XJ(e))}function JJ(){try{const e=globalThis.localStorage?.getItem(zs);if(e){const n=Ty(e);if(n===void 0){const o=x3(e);let s=!1;try{S3(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(zs)===e&&globalThis.localStorage?.removeItem(zs),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(zs)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(zs),globalThis.localStorage?.getItem(zs)===e&&globalThis.localStorage?.removeItem(zs);return}const t=globalThis.sessionStorage?.getItem(zs);if(t){const n=x3(t);let o=!1;try{S3(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(zs),o=!0}catch{}return o?n:void 0}return}catch{return}}function QJ(){const e=YJ();return e?(vE(e),!0):(yl=JJ(),yl!==void 0)}function eQ(){if(yl!==void 0){if(yl.expiresAt<=Date.now()){tQ(yl);return}return yl.credential}}function tQ(e){yl=void 0;try{globalThis.sessionStorage?.removeItem(zs);const t=globalThis.localStorage?.getItem(zs),n=t==null?void 0:Ty(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(zs)}catch{}}function vE(e){const t=x3(e);yl=t;try{S3(t)}catch{}try{globalThis.sessionStorage?.removeItem(zs)}catch{}}function nQ(){const e=yl;yl=void 0;try{const t=globalThis.localStorage?.getItem(zs),o=(t==null?void 0:Ty(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(zs),globalThis.sessionStorage?.removeItem(zs)}catch{}}function oQ(e){return _3.add(e),()=>{_3.delete(e)}}function sQ(){nQ();for(const e of _3)try{e()}catch{}}let Jb;function iQ(e){if(typeof Intl.Segmenter=="function")return Jb??=new Intl.Segmenter("und",{granularity:"grapheme"}),Jb.segment(e)}const rQ=/\p{Emoji_Presentation}/u,lQ=/\p{Regional_Indicator}/u,aQ=/\p{Extended_Pictographic}/u,uQ="️";function cQ(e){return rQ.test(e)||lQ.test(e)?!0:aQ.test(e)&&e.includes(uQ)}function yE(e){const t=iQ(e)?.[Symbol.iterator]().next().value;if(t===void 0||!cQ(t.segment))return{emoji:null,rest:e};const n=e.slice(t.index+t.segment.length).replace(/^\s+/,"");return{emoji:t.segment,rest:n}}function dQ(e,t){const{rest:n}=yE(e),o=t?.trim()??"";return o?n?`${o} ${n}`:o:n}const A3="/sessions/";function Qb(e){const{pathname:t}=e;if(!t.startsWith(A3))return;const n=t.slice(A3.length);if(!(!n||n.includes("/")))try{const o=decodeURIComponent(n);return o.length>0?o:void 0}catch{return}}function fQ(e){return e===void 0||e.length===0?"/":`${A3}${encodeURIComponent(e)}`}function kE(e){const t=!e.renaming&&(e.questionCount>0||e.pendingInteraction==="question"),n=!e.renaming&&(e.approvalCount>0||e.pendingInteraction==="approval"),o=!e.renaming&&!e.busy&&e.pendingInteraction!=="question"&&e.pendingInteraction!=="approval"&&e.questionCount===0&&e.approvalCount===0&&e.lastTurnReason==="failed",s=e.busy&&!t&&!n,i=e.busy||e.unread||t||n||o;return{showQuestionBadge:t,showApprovalBadge:n,showAbortedBadge:o,showBusySpinner:s,hasStatus:i}}const bE=[{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:"/swarm",desc:"commands.swarm.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 pQ(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 Bm="skill:";function hQ(e){return e.startsWith(Bm)?e.slice(Bm.length):e}function CE(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${Bm}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...bE,...t]}function mQ(e,t=bE){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 gQ(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.flatMap(r=>r.role==="user"&&r.promptId!==void 0?[r.promptId]:[])),i=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||o.has(r.id)||r.role==="user"&&(r.userMessageId!==void 0&&o.has(r.userMessageId)||r.promptId!==void 0&&s.has(r.promptId)))});return i.length>0?[...i,...t]:t}function vQ(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 cn={permission:"kimi-web.permission",activeWorkspace:"kimi-active-workspace",planMode:"kimi-web.plan-mode",swarmMode:"kimi-web.swarm-mode",goalMode:"kimi-web.goal-mode",fontScale:"kimi-web.font-scale",starredModels:"kimi-web.starred-models",unread:"kimi-web.unread",onboarded:"kimi-web.onboarded",colorScheme:"kimi-web.color-scheme",hiddenWorkspaces:"kimi-web.hidden-workspaces",collapsedWorkspaces:"kimi-web.collapsed-workspaces",workspaceOrder:"kimi-web.workspace-order",pinnedSessions:"kimi-web.pinned-sessions",pinnedCollapsed:"kimi-web.pinned-collapsed",workspaceNameOverrides:"kimi-web.workspace-name-overrides",notifyEnabled:"kimi-web.notify-enabled",notifySound:"kimi-web.notify-sound",inputHistory:"kimi-web.input-history",locale:"kimi-locale",clientId:"kimi-web.client-id",debug:"kimi-web.debug",openInDefaultTarget:"kimi-web.open-in.default-target",openInLastTarget:"kimi-web.open-in.last-target",sidebarCollapsed:"kimi-web.sidebar-collapsed",sidebarWidth:"kimi-web.sidebar-width",sidebarViewMode:"kimi-web.sidebar-view-mode",shortcutOverrides:"kimi-web.shortcut-overrides",dockIconChoice:"kimi-web.dock-icon-choice",updateSkippedVersion:"kimi-web.update-skipped-version",codeFont:"kimi-web.code-font",contentAlign:"kimi-web.content-align",theme:"kimi-web.theme",thinking:"kimi-web.thinking",accent:"kimi-web.accent",notifyOnComplete:"kimi-web.notify-on-complete",notifyOnQuestion:"kimi-web.notify-on-question",notifyOnApproval:"kimi-web.notify-on-approval",soundOnComplete:"kimi-web.sound-on-complete"};function eC(e){return`kimi-web.draft.${e&&e.length>0?e:"__new__"}`}function ui(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Ls(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function ur(e){try{globalThis.localStorage.removeItem(e)}catch{}}function y1(e){const t=ui(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function Tc(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function Ey(){const e=ui(cn.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 Iy(e){const n={...Ey()};for(const[o,s]of Object.entries(e))s?n[o]=!0:delete n[o];Ls(cn.unread,JSON.stringify(n))}function yQ(){const e=y1(cn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function p9(e){Tc(cn.collapsedWorkspaces,Array.from(e))}function kQ(){return y1(cn.pinnedCollapsed)===!0}function M3(e){Tc(cn.pinnedCollapsed,e)}function bQ(){return ui(cn.sidebarViewMode)==="flat"?"flat":"grouped"}function CQ(e){Ls(cn.sidebarViewMode,e)}function wQ(){const e=y1(cn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function wE(e){Tc(cn.workspaceOrder,Array.from(e))}function _E(){const e=y1(cn.pinnedSessions);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function k1(e){Tc(cn.pinnedSessions,Array.from(e))}function lh(){const e=y1(cn.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 tC(e){Tc(cn.workspaceNameOverrides,e)}function nC(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":"failed":a.subagentPhase,completedAt:a.completedAt??u.completedAt,outputPreview:u.outputPreview??a.outputPreview,outputBytes:u.outputBytes??a.outputBytes,model:a.model??u.model,thinkingEffort:a.thinkingEffort??u.thinkingEffort}});return[...e.filter(a=>!i.has(a.id)),...r]}function _Q(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,model:r.model??l.model,thinkingEffort:r.thinkingEffort??l.thinkingEffort}:r}),i=t.filter(r=>!o.has(r.id));return i.length===0?s:[...s,...i]}function xQ(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function SQ(e,t=xQ()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyF"||e.key.toLowerCase()==="f")&&!e.defaultPrevented}const AQ=new Map([["ς","σ"],["ß","ss"],["ſ","s"],["ff","ff"],["fi","fi"],["fl","fl"],["ffi","ffi"],["ffl","ffl"],["ſt","st"],["st","st"],["ʼn","ʼn"],["µ","μ"],["K","k"],["Å","å"],["Ω","ω"]]);function MQ(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function TQ(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;roC(c.text)),o="\0";let s="";const i=[];for(let c=0;c0&&e[c].gapBefore&&(s+=o),i[c]=s.length,s+=n[c].folded;const r=LQ(oC(t).folded);if(r===null)return;const l=new RegExp(r,"g");function a(c){let d=0,f=i.length-1,h=0;for(;d<=f;){const m=d+f>>1;i[m]<=c?(h=m,d=m+1):f=m-1}return h}let u;for(;;){const c=l.exec(s);if(c===null)return;const d=c.index,f=d+c[0].length-1,h=a(d),m=a(f),v=n[h].map[d-i[h]],k=n[m].map[f-i[m]],w={startSeg:h,startOffset:v.start,endSeg:m,endOffset:k.start+k.length};u!==void 0&&u.startSeg===w.startSeg&&u.startOffset===w.startOffset&&u.endSeg===w.endSeg&&u.endOffset===w.endOffset||(u=w,yield w)}}const IQ=/[.*+?^${}()|[\]\\]/g;function LQ(e){const t=[];let n=0;for(;n=OQ)return{ranges:a,truncated:!0};a.push(f)}}return{ranges:a,truncated:!1}}const xE="kimi-transcript-search",T3="kimi-transcript-search-current";function SE(){return globalThis.CSS?.highlights??null}function h9(e,t){const n=SE(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){E3();return}const s=new o;for(const r of e)s.add(r);n.set(xE,s);const i=e[t];if(i!==void 0){const r=new o;r.add(i),n.set(T3,r)}else n.delete(T3)}function E3(){const e=SE();e?.delete(xE),e?.delete(T3)}function DQ(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function BQ(e,t=DQ()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyA"||e.key.toLowerCase()==="a")&&!e.defaultPrevented}function HQ(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement&&(e.isContentEditable||e.closest("input, textarea")!==null)}function zQ(e,t){return typeof Element>"u"||!(e instanceof Element)?null:e.closest(t)}function iC(e){e.ownerDocument.getSelection()?.selectAllChildren(e)}const WQ=`https://www.kimi.com/code?from=${Wp?"kimi_code_desktop":"kimi_code_web"}`;function jp(){window.open(WQ,"_blank","noopener")}function UQ(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 jQ(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 AE(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=si.id===t)){const i=e.find(r=>r.id===t);i&&(s[o-1]=i)}return s}const KQ={class:"sd-body"},ZQ={class:"sd-search"},GQ=["aria-label"],YQ=["aria-selected","onClick","onMousemove"],XQ={class:"sd-meta"},JQ=["innerHTML"],QQ={class:"sd-time"},eee=["innerHTML"],tee=["innerHTML"],nee={key:1,class:"sd-empty"},oee={class:"sd-foot","aria-hidden":"true"},see={class:"sd-hint"},iee={class:"sd-hint"},ree={class:"sd-hint"},lee=200,aee=et({__name:"SearchSessionsDialog",props:{sessions:{},activeId:{}},emits:["select","close"],setup(e,{emit:t}){const{t:n}=Nt(),o=e,s=t,i=Z(!0),r=Z(""),l=Z(null),a=Z(null),u=R(()=>{const S=r.value.trim().toLowerCase(),T=[];for(const A of o.sessions){const E=A.title??"",P=A.lastPrompt??"",D=A.workspaceName??"",I=S.length>0&&E.toLowerCase().includes(S),$=S.length>0&&P.toLowerCase().includes(S),B=S.length>0&&D.toLowerCase().includes(S);if(!(S.length>0&&!I&&!$&&!B)&&(T.push({session:A,inTitle:I,inWorkspace:B,snippetText:P?KJ(P,r.value):""}),T.length>=lee))break}return T}),c=Z(0);Je(r,()=>{c.value=0});function d(S){const T=u.value.length;return T===0?0:Math.max(0,Math.min(T-1,S))}async function f(){await yt(),a.value?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})}function h(S){c.value=d(c.value+S),f()}function m(S){s("select",S),s("close")}function v(){r.value="",l.value?.focus()}function k(){const S=u.value[c.value];S&&m(S.session.id)}function w(){return l.value?.el??null}const{handleCompositionStart:b,handleCompositionEnd:_,isComposingKeyEvent:g}=Ar();function x(S){if(g(S)){S.key==="Escape"&&S.stopPropagation();return}S.key==="ArrowDown"?(S.preventDefault(),h(1)):S.key==="ArrowUp"?(S.preventDefault(),h(-1)):S.key==="Enter"&&(S.preventDefault(),k())}return dn(()=>{l.value?.focus()}),(S,T)=>(y(),he(p(ua),{open:i.value,"onUpdate:open":T[1]||(T[1]=A=>i.value=A),title:p(n)("sidebar.searchPlaceholder"),size:"lg",height:"fixed",padded:!1,"initial-focus":w,onClose:T[2]||(T[2]=A=>s("close"))},{default:me(()=>[C("div",KQ,[C("div",ZQ,[j(p(js),{ref_key:"inputRef",ref:l,modelValue:r.value,"onUpdate:modelValue":T[0]||(T[0]=A=>r.value=A),placeholder:p(n)("sidebar.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:x,onCompositionstart:p(b),onCompositionend:p(_)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),j(p(pn),{text:p(n)("sidebar.searchClear")},{default:me(()=>[C("button",{type:"button",class:Re(["search-clear",{"is-on":r.value.length>0}]),tabindex:"-1","aria-label":p(n)("sidebar.searchClear"),onClick:v},[j(p(Te),{name:"close",size:"sm"})],10,GQ)]),_:1},8,["text"])]),C("div",{ref_key:"listRef",ref:a,class:"sd-list",role:"listbox"},[u.value.length>0?(y(!0),M(Pe,{key:0},pt(u.value,(A,E)=>(y(),M("button",{key:A.session.id,class:Re(["sd-row",{on:E===c.value,active:A.session.id===e.activeId}]),role:"option","aria-selected":E===c.value,onClick:P=>m(A.session.id),onMousemove:P=>c.value=E},[C("span",XQ,[j(p(Te),{class:"sd-folder",name:"folder-closed",size:"sm"}),C("span",{class:"sd-ws",innerHTML:p(f9)(A.session.workspaceName??A.session.workspaceId??"",A.inWorkspace?r.value:"")},null,8,JQ),C("span",QQ,N(A.session.time),1)]),C("span",{class:"sd-title",innerHTML:p(f9)(A.session.title,A.inTitle?r.value:"")},null,8,eee),A.snippetText?(y(),M("span",{key:0,class:"sd-snippet",innerHTML:p(f9)(A.snippetText,r.value)},null,8,tee)):ee("",!0)],42,YQ))),128)):(y(),M("div",nee,[j(p(SW),{title:r.value.trim()?p(n)("sidebar.searchNoResults"):p(n)("sidebar.searchEmpty")},{icon:me(()=>[j(p(Te),{name:"search",size:"lg"})]),_:1},8,["title"])]))],512),C("div",oee,[C("span",see,[j(p(oa),{keys:["↑","↓"]}),qe(N(p(n)("sidebar.searchHintSelect")),1)]),T[3]||(T[3]=C("span",{class:"sd-dot"},"·",-1)),C("span",iee,[j(p(oa),{keys:["Enter"]}),qe(N(p(n)("sidebar.searchHintOpen")),1)]),T[4]||(T[4]=C("span",{class:"sd-dot"},"·",-1)),C("span",ree,[j(p(oa),{keys:["Esc"]}),qe(N(p(n)("sidebar.searchHintClose")),1)])])])]),_:1},8,["open","title"]))}}),uee=ft(aee,[["__scopeId","data-v-d69c7a8c"]]);var cee=Object.create,Ly=Object.defineProperty,dee=Object.getOwnPropertyDescriptor,ME=Object.getOwnPropertyNames,fee=Object.getPrototypeOf,pee=Object.prototype.hasOwnProperty,TE=(e,t)=>function(){return t||(0,e[ME(e)[0]])((t={exports:{}}).exports,t),t.exports},EE=e=>{let t={};for(var n in e)Ly(t,n,{get:e[n],enumerable:!0});return t},hee=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=ME(t),i=0,r=s.length,l;it[a]).bind(null,l),enumerable:!(o=dee(t,l))||o.enumerable});return e},IE=(e,t,n)=>(n=e!=null?cee(fee(e)):{},hee(Ly(n,"default",{value:e,enumerable:!0}),e));function mee(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 gee(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function vee(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 yee(e,t,n){return(n.xhtmlOut?`
+`:`
+`)+`
+
    +`}function kee(){return`
+
+`}function bee(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 Cee(){return`
  • +`}function wee(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 _ee(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=vee,e.renderer.rules.footnote_block_open=yee,e.renderer.rules.footnote_block_close=kee,e.renderer.rules.footnote_open=bee,e.renderer.rules.footnote_close=Cee,e.renderer.rules.footnote_anchor=wee,e.renderer.rules.footnote_caption=gee,e.renderer.rules.footnote_anchor_name=mee;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 h;for(h=d+2;h=f||l.src.charCodeAt(++h)!==58)return!1;if(c)return!0;h++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const m=l.src.slice(d+2,h-2);l.env.footnotes.refs[`:${m}`]=-1;const v=new l.Token("footnote_reference_open","",1);v.meta={label:m},v.level=l.level++,l.tokens.push(v);const k=l.bMarks[a],w=l.tShift[a],b=l.sCount[a],_=l.parentType,g=h,x=l.sCount[a]+h-(l.bMarks[a]+l.tShift[a]);let S=x;for(;h=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 h=l.env.footnotes.list.length,m=[];l.md.inline.parse(l.src.slice(d,f),l.md,l.env,m);const v=l.push("footnote_ref","",0);v.meta={id:h},l.env.footnotes.list[h]={content:l.src.slice(d,f),tokens:m}}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 h;l.env.footnotes.refs[`:${f}`]<0?(h=l.env.footnotes.list.length,l.env.footnotes.list[h]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=h):h=l.env.footnotes.refs[`:${f}`];const m=l.env.footnotes.list[h].count;l.env.footnotes.list[h].count++;const v=l.push("footnote_ref","",0);v.meta={id:h,subId:m,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(m){return m.type==="footnote_reference_open"?(d=!0,u=[],c=m.meta.label,!1):m.type==="footnote_reference_close"?(d=!1,f[":"+c]=u,!1):(d&&u.push(m),!d)}),!l.env.footnotes.list))return;const h=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let m=0,v=h.length;m0?h[m].count:1;for(let _=0;_?@[\]^_`{|}~-])/g;function Mee(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 Iee(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(v,k){k=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},k),v.core.ruler.after("inline","github-task-lists",function(w){for(var b=w.tokens,_=0,g=2;g=0;b--)if(v[b].level===w)return b;return-1}function s(v,k){return d(v[k])&&f(v[k-1])&&h(v[k-2])&&m(v[k])}function i(v,k,w,b){var _=w.idPrefix+k;v.children[0].content=v.children[0].content.slice(3),v.children.unshift(l(_,b)),v.children.push(a(b)),v.children.unshift(r(v,_,w,b)),w.divWrap&&(v.children.unshift(u(w,b)),v.children.push(c(b)))}function r(v,k,w,b){var _=new b("checkbox_input","input",0);return _.attrs=[["type","checkbox"],["id",k]],/^\[[xX]\][ \u00A0]/.test(v.content)===!0&&_.attrs.push(["checked","true"]),w.disabled===!0&&_.attrs.push(["disabled","true"]),_}function l(v,k){var w=new k("label_open","label",1);return w.attrs=[["for",v]],w}function a(v){return new v("label_close","label",-1)}function u(v,k){var w=new k("checkbox_open","div",0);return w.attrs=[["class",v.divClass]],w}function c(v){return new v("checkbox_close","div",-1)}function d(v){return v.type==="inline"}function f(v){return v.type==="paragraph_open"}function h(v){return v.type==="list_item_open"}function m(v){return/^\[[xX \u00A0]\][ \u00A0]/.test(v.content)}})}),Nee=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))),Fee=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),m9;const Ree=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]]),Oee=(m9=String.fromCodePoint)!==null&&m9!==void 0?m9: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 Pee(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ree.get(e))!==null&&t!==void 0?t:e}var Is;(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"})(Is||(Is={}));const Dee=32;var Ba;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ba||(Ba={}));function I3(e){return e>=Is.ZERO&&e<=Is.NINE}function Bee(e){return e>=Is.UPPER_A&&e<=Is.UPPER_F||e>=Is.LOWER_A&&e<=Is.LOWER_F}function Hee(e){return e>=Is.UPPER_A&&e<=Is.UPPER_Z||e>=Is.LOWER_A&&e<=Is.LOWER_Z||I3(e)}function zee(e){return e===Is.EQUALS||Hee(e)}var Ms;(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"})(Ms||(Ms={}));var Ra;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ra||(Ra={}));var Wee=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Ms.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ra.Strict}startEntity(e){this.decodeMode=e,this.state=Ms.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ms.EntityStart:return e.charCodeAt(t)===Is.NUM?(this.state=Ms.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ms.NamedEntity,this.stateNamedEntity(e,t));case Ms.NumericStart:return this.stateNumericStart(e,t);case Ms.NumericDecimal:return this.stateNumericDecimal(e,t);case Ms.NumericHex:return this.stateNumericHex(e,t);case Ms.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Dee)===Is.LOWER_X?(this.state=Ms.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ms.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===Is.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ra.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]&Ba.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]&~Ba.VALUE_LENGTH:o[e+1],n),t===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case Ms.NamedEntity:return this.result!==0&&(this.decodeMode!==Ra.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ms.NumericDecimal:return this.emitNumericEntity(0,2);case Ms.NumericHex:return this.emitNumericEntity(0,3);case Ms.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ms.EntityStart:return 0}}};function LE(e){let t="";const n=new Wee(e,o=>t+=Oee(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 Uee(e,t,n,o){const s=(t&Ba.BRANCH_LENGTH)>>7,i=t&Ba.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 jee=LE(Nee);LE(Fee);function $y(e,t=Ra.Legacy){return jee(e,t)}var Vee=IE($ee());const rC={};function qee(e){let t=rC[e];if(t)return t;t=rC[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})}m2.defaultChars=";/?:@&=+$,#";m2.componentChars="";var L3=m2;const lC={};function Kee(e){let t=lC[e];if(t)return t;t=lC[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=Kee(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}g2.defaultChars=";/?:@&=+$,-_.!~*'()#";g2.componentChars="-_.!~*'()";var $E=g2;function Ny(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 Hm(){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 Zee=/^([a-z0-9.+-]+:)/i,Gee=/:[0-9]*$/,Yee=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Xee=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` +`," "]),Jee=["'"].concat(Xee),aC=["%","/","?",";","#"].concat(Jee),uC=["/","?","#"],Qee=255,cC=/^[+a-z0-9A-Z_-]{0,63}$/,ete=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,dC={javascript:!0,"javascript:":!0},fC={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function tte(e,t){if(e&&e instanceof Hm)return e;const n=new Hm;return n.parse(e,t),n}Hm.prototype.parse=function(e,t){let n,o,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const u=Yee.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=Zee.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&&dC[r])&&(i=i.substr(2),this.slashes=!0)),!dC[r]&&(s||r&&!fC[r])){let u=-1;for(let m=0;m127?b+="x":b+=w[_];if(!b.match(cC)){const _=m.slice(0,v),g=m.slice(v+1),x=w.match(ete);x&&(_.push(x[1]),g.unshift(x[2])),g.length&&(i=g.join(".")+i),this.hostname=_.join(".");break}}}}this.hostname.length>Qee&&(this.hostname=""),h&&(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),fC[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Hm.prototype.parseHost=function(e){let t=Gee.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 Fy=tte,NE=EE({decode:()=>L3,encode:()=>$E,format:()=>Ny,parse:()=>Fy}),FE=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,RE=/[\0-\x1F\x7F-\x9F]/,nte=/[\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]/,OE=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,ote=/[\$\+<->\^`\|~\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]/,PE=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ste=EE({Any:()=>FE,Cc:()=>RE,Cf:()=>nte,P:()=>OE,S:()=>ote,Z:()=>PE}),ite=Object.defineProperty,DE=e=>{let t={};for(var n in e)ite(t,n,{get:e[n],enumerable:!0});return t},ws=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}`}},rte=DE({arrayReplaceAt:()=>pte,assign:()=>dte,countLines:()=>Wo,escapeHtml:()=>wte,escapeRE:()=>xte,fromCodePoint:()=>wp,has:()=>cte,isMdAsciiPunct:()=>Um,isPunctChar:()=>Wm,isPunctCode:()=>$3,isSpace:()=>fte,isString:()=>ate,isValidEntityCode:()=>y2,isWhiteSpace:()=>Cp,lib:()=>Ste,mdurl:()=>NE,normalizeReference:()=>v2,ucmicro:()=>zm,unescapeAll:()=>_p,unescapeMd:()=>vte});const zm=ste;function lte(e){return Object.prototype.toString.call(e)}function ate(e){return lte(e)==="[object String]"}const ute=Object.prototype.hasOwnProperty;function cte(e,t){return ute.call(e,t)}function dte(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 fte(e){return e===9||e===32}function Cp(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 Wm(e){return zm.P.test(e)||zm.S.test(e)}const pC=new Map;function $3(e){if(Um(e))return!0;if(e>=0&&e<128)return!1;const t=pC.get(e);if(t!==void 0)return t;const n=Wm(String.fromCharCode(e));return pC.set(e,n),n}function Um(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 v2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function pte(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function y2(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 wp(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 BE=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,hte=new RegExp(`${BE.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),mte=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function gte(e,t){if(t.charCodeAt(0)===35&&mte.test(t)){const o=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return y2(o)?wp(o):e}const n=$y(e);return n!==e?n:e}function vte(e){return e.includes("\\")?e.replace(BE,"$1"):e}function _p(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(hte,(t,n,o)=>n||gte(t,o))}const yte=/[&<>"]/,kte=/[&<>"]/g,bte={"&":"&","<":"<",">":">",'"':"""};function Cte(e){return bte[e]}function wte(e){return yte.test(e)?e.replace(kte,Cte):e}const _te=/[.?*+^$[\]\\(){}|-]/g;function xte(e){return e.replace(_te,"\\$&")}const Ste={mdurl:NE,ucmicro:zm};function Wo(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` +`,n+1))!==-1;)t++;return t}const Ate=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,Mte=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,Tte=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,Ry=["references","footnotes","abbreviations","abbr","abbrs"],Oy=Symbol.for("markdown-it-ts.global-state"),Py=Object.prototype.hasOwnProperty;function hC(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 ja(e){if(Array.isArray(e))return e.map(t=>ja(t));if(Wr(e)){const t={};for(const n of Object.keys(e))t[n]=ja(e[n]);return t}return e}function jm(e){return Array.isArray(e)?e.map((t,n)=>String(n)):Wr(e)?Object.keys(e):[]}function N3(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)?!N3(s[r],HE(o.value,r)):!0)}}function la(e){const t=Dy(e);if(t){for(const n of Ry){const o=t.snapshot[n];if(!o){delete e[n];continue}if(o.ownedKeys){Ite(e,n,o);continue}o.existed?e[n]=Ete(e[n],o.value):delete e[n]}delete e[Oy]}}function g9(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 F3=Symbol.for("markdown-it-ts.diagnostics");function qp(e,t){if(e)try{const n=e[F3];if(n&&typeof n=="object")return n;if(!t)return;const o={};return e[F3]=o,o}catch{return}}function Vl(e){return qp(e,!1)}function $te(e){if(e)try{const t=e[F3];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function vi(e){$te(e)}function tf(e,t){const n=qp(e,!0);n&&(n.stockFast=t)}function ss(e,t){const n=qp(e,!0);n&&(n.strategy=t)}function v9(e,t){const n=qp(e,!0);n&&(n.chunk=t)}function zE(e,t){const n=qp(e,!0);n&&(n.unbounded=t)}function Nte(e){const t={};e=e||{},t.src_Any=FE.source,t.src_Cc=RE.source,t.src_Z=PE.source,t.src_P=OE.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 R3(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function k2(e){return Object.prototype.toString.call(e)}function Fte(e){return k2(e)==="[object String]"}function Rte(e){return k2(e)==="[object Object]"}function Ote(e){return k2(e)==="[object RegExp]"}function mC(e){return k2(e)==="[object Function]"}function Pte(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const WE={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Dte(e){return Object.keys(e||{}).reduce(function(t,n){return t||WE.hasOwnProperty(n)},!1)}const Bte={"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}}},Hte="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]",zte="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Wte(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function gC(){return function(e,t){t.normalize(e)}}function Vm(e){const t=e.re=Nte(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Hte),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,Rte(a)){Ote(a.validate)?u.validate=Wte(a.validate):mC(a.validate)?u.validate=a.validate:i(l,a),mC(a.normalize)?u.normalize=a.normalize:a.normalize?i(l,a):u.normalize=gC();return}if(Fte(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:gC()};const r=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(Pte).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 UE(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 cr(e,t){if(!(this instanceof cr))return new cr(e,t);t||Dte(e)&&(t=e,e={}),this.__opts__=R3({},WE,t),this.__schemas__=R3({},Bte,e),this.__compiled__={},this.__tlds__=zte,this.__tlds_replaced__=!1,this.re={},Vm(this)}cr.prototype.add=function(t,n){return this.__schemas__[t]=n,Vm(this),this};cr.prototype.set=function(t){return this.__opts__=R3(this.__opts__,t),this};cr.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)};cr.prototype.pretest=function(t){return this.re.pretest.test(t)};cr.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0};cr.prototype.match=function(t){const n=[],o=[],s=[],i=[];let r,l,a;function u(f,h){return f?h?f.index!==h.index?f.index=h.lastIndex?f:h:f:h}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]]],h=u(u(f[0],f[1]),f[2]);if(!h)break;if(h===f[0]?c[0]++:h===f[1]?c[1]++:c[2]++,h.index{const d=/^xn--/,f=/[^\0-\x7F]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=35,k=Math.floor,w=String.fromCharCode;function b(H){throw new RangeError(m[H])}function _(H,O){const F=[];let U=H.length;for(;U--;)F[U]=O(H[U]);return F}function g(H,O){const F=H.split("@");let U="";F.length>1&&(U=F[0]+"@",H=F[1]),H=H.replace(h,".");const z=_(H.split("."),O).join(".");return U+z}function x(H){const O=[];let F=0;const U=H.length;for(;F=55296&&z<=56319&&FString.fromCodePoint(...H),T=function(H){return H>=48&&H<58?26+(H-48):H>=65&&H<91?H-65:H>=97&&H<123?H-97:36},A=function(H,O){return H+22+75*(H<26)-((O!=0)<<5)},E=function(H,O,F){let U=0;for(H=F?k(H/700):H>>1,H+=k(H/O);H>v*26>>1;U+=36)H=k(H/v);return k(U+(v+1)*H/(H+38))},P=function(H){const O=[],F=H.length;let U=0,z=128,W=72,K=H.lastIndexOf("-");K<0&&(K=0);for(let V=0;V=128&&b("not-basic"),O.push(H.charCodeAt(V));for(let V=K>0?K+1:0;V=F&&b("invalid-input");const Ie=T(H.charCodeAt(V++));Ie>=36&&b("invalid-input"),Ie>k((2147483647-U)/X)&&b("overflow"),U+=Ie*X;const de=le<=W?1:le>=W+26?26:le-W;if(Iek(2147483647/pe)&&b("overflow"),X*=pe}const ne=O.length+1;W=E(U-ie,ne,ie==0),k(U/ne)>2147483647-z&&b("overflow"),z+=k(U/ne),U%=ne,O.splice(U++,0,z)}return String.fromCodePoint(...O)},D=function(H){const O=[];H=x(H);const F=H.length;let U=128,z=0,W=72;for(const ie of H)ie<128&&O.push(w(ie));const K=O.length;let V=K;for(K&&O.push("-");V=U&&Xk((2147483647-z)/ne)&&b("overflow"),z+=(ie-U)*ne,U=ie;for(const X of H)if(X2147483647&&b("overflow"),X===U){let le=z;for(let Ie=36;;Ie+=36){const de=Ie<=W?1:Ie>=W+26?26:Ie-W;if(le32))return i;if(o===41){if(r===0)break;r--}s++}return t===s||r!==0||(i.str=_p(e.slice(t,s)),i.pos=s,i.ok=!0),i}var qE=zy;const Uh=-2;function jte(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=jte(l,t,a,n);if(f!==Uh)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 Kte(e,t,n){const o=b2(e,t);o<0?jy(e,[t,n]):e.attrs[o][1]=`${e.attrs[o][1]} ${n}`}var Zte=DE({attrGet:()=>qte,attrIndex:()=>b2,attrJoin:()=>Kte,attrPush:()=>jy,attrSet:()=>Vte,parseLinkDestination:()=>zy,parseLinkLabel:()=>Wy,parseLinkTitle:()=>Uy});function Gte(e){return e.includes("\r")||e.includes("\0")}function ZE(e){return typeof e=="string"?e:e.toString()}function Yte(e){if(e.inlineMode){const t=new ws("inline","",0);t.content=ZE(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 Xte=/^([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])?)*)$/,Jte=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Qte(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(Jte.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(Xte.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 GE=Qte;function ene(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 YE=ene;function vC(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 h=u>0&&!e[u-1].open?i[u-1]+1:0;i[r]=r-u+h,i[u]=h,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 tne(e){const t=e.tokens_meta,n=e.tokens_meta.length;vC(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?XE:JE,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 h=o[u];c?(h.type="strong_close",h.tag="strong",h.nesting=-1,h.markup=d+d,h.content=""):(h.type="em_close",h.tag="em",h.nesting=-1,h.markup=d,h.content=""),c&&(o[t[s-1].token].content="",o[t[i.end+1].token].content="",s--)}}function sne(e){const t=e.tokens_meta,n=e.tokens_meta.length;yC(e,e.delimiters);for(let o=0;o=48&&e<=57}function ine(e){const t=e|32;return Vy(e)||t>=97&&t<=102}function eI(e){const t=e|32;return t>=97&&t<=122}function rne(e){return eI(e)||Vy(e)}function lne(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 ane(e,t,n){let o=t+1;if(o>=n||!eI(e.charCodeAt(o)))return null;for(o++;o=n||e.charCodeAt(o)!==59)return null;const s=e.slice(t,o+1);return QE(s)!==s?s:null}function une(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=lne(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=y2(i)?wp(i):wp(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=ane(e.src,n,o);if(s){const i=QE(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 tI=une;const nI=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),P3=new Array(128),oI=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);P3[e]=`\\${t}`,oI[e]=nI[e]?t:P3[e]}function kC(e,t,n){e.pending&&e.pushPending();const o=new ws("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 cne(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 kC(e,i<256&&nI[i]?r:l,l),e.pos=n+1,!0}var sI=cne;function dne(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*\\/?>`,rI="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",pne=new RegExp(`^(?:${iI}|${rI}||<\\?[\\s\\S]*?\\?>|]*>|)`),hne=new RegExp(`^(?:${iI}|${rI})`);function lI(e){return e===32||e===9||e===10||e===12||e===13}function mne(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||lI(t)}function gne(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 yne(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&&!vne(i))return!1;const r=s.slice(o).match(pne);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,mne(l)&&e.linkLevel++,gne(l)&&e.linkLevel--}return e.pos+=l.length,!0}var aI=yne;function kne(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 h=e.pos+2,m=qm(e,e.pos+1,!1);if(m<0)return!1;if(i=m+1,i=f)return!1;if(l=qE(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=m+1):i=m+1,s||(s=e.src.slice(h,m)),r=e.env.references[v2(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){o=e.src.slice(h,m);const v=[];e.md.inline.parse(o,e.md,e.env,v);const k=e.push("image","img",0);k.attrs=[["src",c],["alt",""]],k.children=v,k.content=o,a&&k.attrs.push(["title",a])}return e.pos=i,e.posMax=f,!0}var uI=kne;function y9(e,t,n){for(;t"u")return!1;let d;if(l=r+1,l=0?(d=n.slice(h,m),d||(d=n.slice(i,r)),l=m+1):d=n.slice(i,r)}else d=n.slice(i,r);const f=e.env.references[v2(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 cI=bne;function dI(e){const t=e|32;return t>=97&&t<=122}function Cne(e){return e>=48&&e<=57}function wne(e){return dI(e)||Cne(e)||e===43||e===45||e===46}function _ne(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&wne(e.charCodeAt(t));)t--;return t++,t>=e.length||!dI(e.charCodeAt(t))?null:e.slice(t)}function xne(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=_ne(e.pending);if(!s)return!1;const i=xne(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 Sne(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||CC(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 Ine(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 mI(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:qy(),records:Object.create(null)};return t.__mdtsRuleProfile=o,o}function zd(e,t,n,o,s,i){const r=mI(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=Ine(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=qy()}function Lne(e){const t=mI(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}},gI=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 ws("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 ws(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 ws(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 _C(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return pI(e,t);case 33:return uI(e,t);case 38:return tI(e,t);case 42:case 95:return O3.tokenize(e,t);case 58:return e.md.options.linkify&&fI(e,t);case 60:return GE(e,t)||aI(e,t);case 91:return cI(e,t);case 92:return sI(e,t);case 96:return YE(e,t);case 126:return D3.tokenize(e,t);default:return hI(e,t)}}function vI(e){return!$ne.test(e)}var Nne=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new wC,this.ruler2=new wC,this.ruler.push("text",hI),this.ruler.push("linkify",fI),this.ruler.push("newline",pI),this.ruler.push("escape",sI),this.ruler.push("backticks",YE),this.ruler.push("strikethrough",D3.tokenize),this.ruler.push("emphasis",O3.tokenize),this.ruler.push("link",cI),this.ruler.push("image",uI),this.ruler.push("autolink",GE),this.ruler.push("html_inline",aI),this.ruler.push("entity",tI),this.ruler2.push("balance_pairs",nne),this.ruler2.push("strikethrough",D3.postProcess),this.ruler2.push("emphasis",O3.postProcess),this.ruler2.push("fragments_join",fne),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=_C(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()&&vI(e)){const a=new ws("text","",0);a.content=e,o.push(a);return}const s=new gI(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&&vI(i.content)){const r=new ws("text","",0);r.content=i.content,i.children.push(r);continue}e.md.inline.parse(i.content,e.md,e.env,i.children)}}}const Rne=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,One=/[0-9a-z]/i;function Pne(e){return/^\s]/i.test(e)}function Dne(e){return/^<\/a\s*>/i.test(e)}function Bne(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"&&(Pne(l.content)&&i>0&&i--,Dne(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(h=>Bne(e.md.linkify,h));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 h=0;hf){const x=new ws("text","",0);x.content=a.slice(f,w),x.level=d,c.push(x)}const b=new ws("link_open","a",1);b.attrs=[["href",v]],b.level=d++,b.markup="linkify",b.info="auto",c.push(b);const _=new ws("text","",0);_.content=k,_.level=d,c.push(_);const g=new ws("link_close","a",-1);g.level=--d,g.markup="linkify",g.info="auto",c.push(g),f=m.lastIndex}if(f!==0){if(f=0;n--){const o=e[n];o.type==="text"&&!t&&(o.content=o.content.replace(Vne,Kne)),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function Gne(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&yI.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 Yne(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(""):"");jne.test(o)&&Zne(n.children||[]),yI.test(o)&&Gne(n.children||[])}}var Xne=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 Jne=/['"]/,xC=/['"]/g,SC="’";function ah(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Qne(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)v=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){v=e[n].content.charCodeAt(e[n].content.length-1);break}let k=32;if(u=48&&v<=57&&(h=f=!1),f&&h&&(f=w,h=b),!f&&!h){m&&(r.content=ah(r.content,d.index,SC));continue}if(h)for(n=o.length-1;n>=0;n--){let x=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("");!Jne.test(o)||!n.children||Qne(n.children,e)}}function toe(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 h=[],m=[],v=[],k=[],w=e.md.block.ruler.getRulesForState(e,"blockquote"),b=e.parentType;e.parentType="blockquote";let _=!1,g;for(g=t;g=d)break;if(s.charCodeAt(c++)===62&&!E){let D=a[g]+1,I,$;s.charCodeAt(c)===32?(c++,D++,$=!1,I=!0):s.charCodeAt(c)===9?(I=!0,(u[g]+D)%4===3?(c++,D++,$=!1):$=!0):I=!1;let B=D;for(h.push(i[g]),i[g]=c;c=d,m.push(u[g]),u[g]=a[g]+1+(I?1:0),v.push(a[g]),a[g]=B-D,k.push(l[g]),l[g]=c-i[g];continue}if(_)break;let P=!1;for(let D=0,I=w.length;D";const T=[t,0];S.map=T,e.md.block.tokenize(e,t,g);const A=e.push("blockquote_close","blockquote",-1);A.markup=">",e.lineMax=f,e.parentType=b,T[1]=e.line;for(let E=0;E=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 loe(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&&TC(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const h=e.push("heading_open",AC[d],1);h.markup=MC[d],h.map=[t,e.line];const m=e.push("inline","",0);m.content=s.slice(a,u).trim(),m.map=[t,e.line],m.children=[];const v=e.push("heading_close",AC[d],-1);return v.markup=MC[d],!0}function uoe(e){switch(e){case 9:case 32:return!0}return!1}function coe(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(`${hne.source}\\s*$`),/^$/,!1]];function doe(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=48&&e<=57}var _I=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 h=o?this.eMarks[c]+1:this.eMarks[c];let m=0;const v=this.src,k=this.bsCount,w=this.tShift;for(;fn?new Array(m-n+1).join(" ")+v.slice(f,h):v.slice(f,h)}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(m,v):s[c]=i.slice(m,v)}return s.join("")}};_I.prototype.Token=ws;function poe(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:poe(n,o,s)}const IC=["","h1","h2"];function hoe(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=xI(e);if(a[t]-u>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,h,m=t+1;for(;m=x)break;if(a[m]-u>3)continue;if(a[m]>=u&&(h=s.charCodeAt(g),h===45||h===61)){let T=g+1,A=T;for(;T=x){f=h===61?1:2;break}if(A-g>1)continue}if(a[m]<0||c&&!SI(e,m,s,g,x))continue;let S=!1;for(let T=0,A=o.length;Tg;){const S=s.charCodeAt(x-1);if(S!==9&&S!==32)break;x--}v=s.slice(g,x)}else v=e.getLines(t,m,u,!1).trim();e.line=m+1;const k=h===61?"=":"-",w=e.push("heading_open",IC[f],1);w.markup=k,w.map=[t,e.line];const b=e.push("inline","",0);b.content=v,b.map=[t,e.line-1],b.children=[];const _=e.push("heading_close",IC[f],-1);return _.markup=k,e.parentType=d,!0}function AI(e){switch(e){case 9:case 32:return!0}return!1}function LC(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 h=e.src,m=e.bMarks,v=e.tShift,k=e.eMarks,w=e.sCount,b=e.bsCount,_=m[l]+v[l];if(_>=k[l])return!1;const g=h.charCodeAt(_);if(g>=48&&g<=57){if(f=$C(e,l),f<0||(c=!0,r=_,d=moe(e,l,f),u&&d!==1))return!1}else if(g===42||g===45||g===43){if(f=LC(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 x=h.charCodeAt(f-1),S=String.fromCharCode(x);if(c){const I=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(I.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=S;let A=!1;const E=e.tokens.length-1,P=e.md.block.ruler.getRulesForState(e,"list"),D=e.parentType;for(e.parentType="list";l=s?H=1:H=$-I,H>4&&(H=1);const O=I+H,F=e.push("list_item_open","li",1);F.markup=S;const U=[l,0];F.map=U,c&&(F.info=f-r-1===1?goe[h.charCodeAt(r)-48]:h.slice(r,f-1));const z=e.tight,W=e.tShift[l],K=e.sCount[l],V=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=O,e.tight=!0,e.tShift[l]=B-m[l],e.sCount[l]=$,B>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||A)&&(a=!1),A=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=V,e.tShift[l]=W,e.sCount[l]=K,e.tight=z,e.push("list_item_close","li",-1).markup=S,l=e.line,U[1]=l,l>=n||e.sCount[l]=4)break;let ie=!1;for(let ne=0,X=P.length;ne3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const _=r[f]+l[f],g=a[f];if(_=g||NC(i.charCodeAt(_+1)))break}else if(x>=48&&x<=57&&_+1=g){S=-1;break}const T=i.charCodeAt(S++);if(T>=48&&T<=57){if(S-_>=10){S=-1;break}continue}if((T===41||T===46)&&(S>=g||NC(i.charCodeAt(S))))break;S=-1;break}if(S>=0)break}}}const k=r[f]+l[f],w=a[f];if(d&&!SI(e,f,i,k,w))continue;let b=!1;for(let _=0,g=o.length;_=4||e.src.charCodeAt(s)!==91)return!1;function a(_){const g=e.lineMax;if(_>=g||e.isEmpty(_))return null;let x=!1;if(e.sCount[_]-e.blkIndent>3&&(x=!0),e.sCount[_]<0&&(x=!0),!x){const A=e.parentType;e.parentType="reference";let E=!1;for(let P=0,D=l.length;P"u"&&(e.env.references={}),typeof e.env.references[b]>"u"&&(e.env.references[b]={title:w,href:f}),e.line=r),!0):!1}function k9(e){switch(e){case 9:case 32:return!0}return!1}const Coe=65536;function b9(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(n,o)}function woe(e,t){if(e.lineFlags)return(e.lineFlags[t]&Hf.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&&!k9(l)||r===45&&k9(l)||!woe(e,t))return!1;for(;i=4)return!1;u=FC(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 h=e.md.block.ruler.getRulesForState(e,"blockquote"),m=e.push("table_open","table",1),v=[t,0];m.map=v;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 g=0;g=4||(u=FC(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),_+=d-u.length,_>Coe))break;if(s===t+2){const S=e.push("tbody_open","tbody",1);S.map=b=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let S=0;Sr.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 zd(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 ch=[["table",_oe,["paragraph","reference"]],["code",roe],["fence",loe,["paragraph","reference","blockquote","list"]],["blockquote",ioe,["paragraph","reference","blockquote","list"]],["hr",coe,["paragraph","reference","blockquote","list"]],["list",yoe,["paragraph","reference","blockquote"]],["reference",boe],["html_block",doe,["paragraph","reference","blockquote"]],["heading",aoe,["paragraph","reference","blockquote"]],["lheading",hoe],["paragraph",koe]];var Soe=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new xoe;for(let e=0;e=a[c];)c++;if(e.line=c,c>=n||u[c]=i){e.line=n;break}const h=e.line;let m=!1;for(let v=0;v=e.line)throw new Error("block rule didn't increment state.line");break}if(!m)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 h=e.line;let m=!1;for(let v=0;v=e.line)throw new Error("block rule didn't increment state.line");break}}if(!m)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 _I(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}},MI=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}};MI.prototype.Token=ws;const RC=[["normalize",Une],["block",Yte],["inline",Fne],["linkify",Hne],["replacements",Yne],["smartquotes",eoe],["text_join",toe]],Aoe={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},Moe={parseLinkLabel:Wy,parseLinkDestination:zy,parseLinkTitle:Uy};function Toe(){return{...Aoe}}function Eoe(){return{...Moe}}var Ioe=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new Soe,this.inline=new Nne,this.ruler=new Xne;for(let e=0;e@[\]\\^_`{}~]/;function Km(e){return!Loe.test(e)}function bf(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function jh(e,t,n){for(let o=t;o3)return Km(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(!Km(c))return!1;const d=Noe[i],f=Foe[i],h=Cr("heading_open",d,1,0);h.map=[s,s+1],h.markup=f,e.push(h),e.push(Ky(c,s,1));const m=Cr("heading_close",d,-1,0);return m.markup=f,e.push(m),!0}function Ooe(e,t,n){const o=Cr("paragraph_open","p",1,0);o.map=[n,n+1],e.push(o),e.push(Ky(t,n,1)),e.push(Cr("paragraph_close","p",-1,0))}function Poe(e,t,n){const o=e.charCodeAt(n-1);return o===32||o===9?e.slice(t,n).trim():e.slice(t,n)}function x9(e,t){for(;t=1e5?PC:_9,s="",i=!1,r=!1,l=0,a=0;for(;l"]/,DC=/[&<>"]/g,joe=/&/g,Voe=/[<>"]/g,qoe={"&":"&","<":"<",">":">",'"':"""};function S9(e){return qoe[e]||e}function eo(e){if(e.length===0)return"";if(e.length<32)return Uoe.test(e)?e.replace(DC,S9):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(joe,"&"):t?e.replace(DC,S9):e.replace(Voe,S9)}const Koe=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Zoe=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function TI(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(Koe,(t,n,o)=>{if(n)return n;if(Zoe.test(o)){const i=o[1].toLowerCase()==="x"?Number.parseInt(o.slice(2),16):Number.parseInt(o.slice(1),10);return y2(i)?wp(i):"�"}const s=$y(t);return s!==t?s:t})}const Goe=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,Yoe=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,Xoe=/"/g;function Sd(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function Zm(e,t,n){for(let o=t;o=e.length||e.charCodeAt(t)===10?!1:!Zm(e,t,Sd(e,t))}function BC(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=Zy(e.slice(i,r));return a===null?null:`${a} +`}function HC(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 nse(e,t,n){const o=t+2;if(n===o+1)return tse(e,o);const s=Zy(e.slice(t+2,n));return s===null?null:`
  • ${s}
  • +`}function ose(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}${eo(c)}
    +`,nextPos:u=25e4,i=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n +`;g +`,l=w,a=b}let _=dh(e,k);for(;_${k}

    +`,u=h,c=m}const v=de.core.parse(t,n,e).tokens);let r=Vh(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=use(r,s.maxChunks)),qh(t,r))return v9(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),Hd(n,i,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return v9(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:i||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!i}),Hd(n,i,()=>{for(let u=0;u=3&&(c?c.marker===_&&x>=c.length&&(c=null):c={marker:_,length:x})}}const k=m-f;s+=k,i+=1,l+=1,v?(a=0,u=0):(a+=1,u+=k);const w=v;if((s>=t.maxChunkChars||i>=t.maxChunkLines)&&!c)if(w)d(m);else{const b=Math.max(10,Math.floor(t.maxChunkLines*.5)),_=Math.max(t.maxChunkChars,8e3);(a>=b||u>=_)&&d(m)}f=m}return n&&d(e.length),o}function qh(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 ase(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 wa(e){return e.length===0?0:Wo(e)+(e.charCodeAt(e.length-1)===10?0:1)}function gse(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 yse(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 gse(e,n+1,e.length-1)?!vse(e,t):!1}function kse(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??pse:e.options.fullChunkSizeChars??dse),l=o.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??hse:e.options.fullChunkSizeLines??fse);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 Kp=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=wa(this.pending);if(this.pending.length=o||n>=s}function FI(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??II))return"yes";const o=e.options.autoUnboundedThresholdLines??LI;return n!==void 0?n>=o?"yes":"no":t+1e.core.parse(t,n,e).tokens);const i=[],r=new Kp(e,{mode:"full",...o,retainTokens:!1,onChunkTokens(l){$I(i,l)}});if(s&&By(n,s),r.feed(t),r.flushForce(n),s&&(Hy(n),o.fallbackOnGlobalState===!1)){const l=Vl(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return i}const Wd=(e,t,n)=>en?n:e;function RI(e){return e.experimental?{...e,...e.experimental}:e}const UC=[{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"}],jC=[{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 OI(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function xse(e,t=Math.max(0,e/40|0),n={}){const o=RI(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:Wd(Math.ceil(e/i),8e3,64e3),maxChunkLines:Wd(Math.ceil(t/i),150,700),maxChunks:Wd(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 VC(e,t=Math.max(0,e/40|0),n={}){const o=RI(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:Wd(Math.ceil(e/i),8e3,64e3),maxChunkLines:Wd(Math.ceil(t/i),150,700),maxChunks:Wd(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 Sse={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"]}}},Ase={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Mse={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 C2(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function Kh(e,t){if(C2(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const qC=e=>C2(e)?e:Promise.resolve(e);function Wf(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 eo(e)}}function Qa(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${Wf(t[0])}="${eo(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 xp(e){return!e.attrs||e.attrs.length===0?`${eo(e.content)}`:`${eo(e.content)}`}function B3(e){const t=eo(e.content);return e.attrs?`${t} +`:`
    ${t}
    +`}function Tse(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 KC(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function Ese(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 ZC(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 Ym(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 Ise={langPrefix:"language-",xhtmlOut:!1,breaks:!1},fh=Object.prototype.hasOwnProperty,On={code_inline(e,t){return xp(e[t])},code_block(e,t){return B3(e[t])},fence(e,t,n,o,s){const i=e[t],r=i.info?TI(i.info).trim():"",{langName:l,langAttrs:a}=PI(r),u=n.highlight,c=eo(i.content);if(!u)return Uf(i,c,r,l,n);const d=u(i.content,l,a);return C2(d)?d.then(f=>Uf(i,f||c,r,l,n)):Uf(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]],Ym(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
    +`:`
    +`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
    +`:`
    +`:` +`},text(e,t){return eo(e[t].content)},text_special(e,t){return eo(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function GC(e,t,n){const o=e.info?TI(e.info).trim():"",{langName:s,langAttrs:i}=PI(o),r=t.highlight,l=eo(e.content);if(!r)return Uf(e,l,o,s,t);const a=r(e.content,s,i);if(C2(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return Uf(e,a||l,o,s,t)}function A9(e,t,n,o){switch(e.type){case"text":return t.text===On.text?e.content.length===0?"":eo(e.content):null;case"text_special":return t.text_special===On.text_special?e.content.length===0?"":eo(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?xp(e):null;default:return null}}function Lse(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===On.text)return i.content.length===0?"":eo(i.content);break;case"text_special":if(s.text_special===On.text_special)return i.content.length===0?"":eo(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 xp(i);break}const r=s[i.type];if(!r)return Ym(i,t.xhtmlOut===!0);const l=r(e,0,t,n,o);return typeof l=="string"?l:Kh(l,i.type)}var $se=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,h="",m="",v=!1,k="";for(let w=0;w0&&e[w-1].hidden?` +`:"";if(_==="list_item_open"&&(!b.attrs||b.attrs.length===0)&&w+3${this.renderInlineTokens(A.children||[],o,s)}`,w+=3;continue}}if(w+2 +`,w+=2;continue}}}if(_==="inline"){const T=b.children||[];if(T.length===1){v||(l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,h=o.xhtmlOut?`
    +`:`
    +`,m=o.breaks?h:` +`,v=!0);const A=T[0];switch(A.type){case"text":if(l===On.text){k+=eo(A.content);continue}break;case"text_special":if(a===On.text_special){k+=eo(A.content);continue}break;case"softbreak":if(u===On.softbreak){k+=m;continue}break;case"hardbreak":if(c===On.hardbreak){k+=h;continue}break;case"html_inline":if(d===On.html_inline){k+=A.content;continue}break;case"code_inline":if(f===On.code_inline){k+=xp(A);continue}break}}k+=this.renderInlineTokens(T,o,s);continue}const x=i[_];if(!x){const T=b.attrs;if(!b.hidden){if(!T||T.length===0)switch(_){case"hr":k+=r?`


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

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

    +`;continue;case"list_item_open":{const A=e[w+1];k+=g+(A&&(A.type==="inline"||A.hidden||A.nesting===-1&&A.tag==="li")?"
  • ":`
  • +`);continue}case"list_item_close":k+=`
  • +`;continue;case"bullet_list_open":k+=`${g}
      +`;continue;case"bullet_list_close":k+=`
    +`;continue;case"blockquote_open":k+=g+(e[w+1]&&e[w+1].nesting===-1&&e[w+1].tag==="blockquote"?"
    ":`
    +`);continue;case"blockquote_close":k+=`
    +`;continue;case"ordered_list_open":k+=`${g}
      +`;continue;case"ordered_list_close":k+=`
    +`;continue;case"table_open":k+=`${g} +`;continue;case"table_close":k+=`
    +`;continue;case"thead_open":k+=`${g} +`;continue;case"thead_close":k+=` +`;continue;case"tbody_open":k+=`${g} +`;continue;case"tbody_close":k+=` +`;continue;case"tr_open":k+=`${g} +`;continue;case"tr_close":k+=` +`;continue;case"td_open":k+=`${g}`;continue;case"td_close":k+=` +`;continue;case"th_open":k+=`${g}`;continue;case"th_close":k+=` +`;continue}else if(T.length===1){const A=T[0];if(_==="ordered_list_open"&&A[0]==="start"){k+=`${g}
      +`;continue}if(_==="td_open"&&A[0]==="style"){k+=`${g}`;continue}if(_==="th_open"&&A[0]==="style"){k+=`${g}`;continue}}}k+=this.renderToken(e,w,o);continue}if(_==="code_block"&&x===On.code_block){k+=B3(b);continue}if(_==="fence"&&x===On.fence){k+=GC(b,o);continue}if(_==="html_block"&&x===On.html_block){k+=b.content;continue}const S=x(e,w,o,s,this);typeof S=="string"?k+=S:k+=Kh(S,b.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(fh.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),fh.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(fh.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(fh.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...Ise,...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 B3(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):Ym(t,r.xhtmlOut===!0);if(i==="fence"&&a===On.fence)return GC(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:Kh(u,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Lse(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,h=o.link_open,m=o.link_close,v=o.em_open,k=o.em_close,w=o.strong_open,b=o.strong_close;let _="";for(let g=0;g`;if(u===On.softbreak&&g+3`,g+=1;continue}if(x.type==="em_open"&&!v&&!k&&g+2${E}`,g+=2;continue}}}if(x.type==="strong_open"&&!w&&!b&&g+2${E}`,g+=2;continue}}}switch(x.type){case"text":if(l===On.text){const A=x.content.length===0?"":eo(x.content);if(d===On.html_inline&&g+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=de,!oe&&pe!==void 0&&(ve=Wo(e),oe=ve>=pe)),oe){const G=this.parseFullDocument(e,$,n,ve,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss($,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!Vl($)?.unbounded}),G.tokens}else if(U){const G=(ce,ue,Se)=>ceSe?Se:ce;ve===void 0&&(ve=Wo(e));const Y=X&&!ne?VC(e.length,ve,n.options):null,fe=Y?.maxChunkChars??(z?G(Math.ceil(e.length/W),8e3,64e3):K??1e4),we=Y?.maxChunkLines??(z?G(Math.ceil(ve/W),150,700):V??200),ge=Y?.maxChunks??(z?G(Math.ceil(e.length/64e3),W,32):ie),Q=e.length>0&&e.charCodeAt(e.length-1)===10,te=F&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&Y?.strategy!=="plain";if((O||te)&&(e.length>=fe*2||ve>=we*2)&&Q){const ce=Gm(n,e,$,{maxChunkChars:fe,maxChunkLines:we,fenceAware:Y?.fenceAware??le,maxChunks:ge});return this.cache={src:e,tokens:ce,env:$,lineCount:ve,lastSegment:void 0,globalStateReason:Ri(e)},this.updateCacheLineCount(this.cache,ve),this.recordChunkedParseResult($,O?"explicit-initial-large-doc":"default-initial-large-doc"),ce}}const ye=this.parseFullDocument(e,$,n,ve);return ve=ye.lineCount,this.cache={src:e,tokens:ye.tokens,env:$,lineCount:ve,lastSegment:void 0,globalStateReason:Ri(e)},this.updateCacheLineCount(this.cache,ve),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss($,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!Vl($)?.unbounded}),ye.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",ss(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=Ri(s.src),s.globalStateReason=r);const l=r?null:i!==null?this.detectGlobalStateForAppend(s,i):Ri(e),a=r||l;if(a){const $=o??s.env;la($);const B=Ri(e),H=this.parseFullDocument(e,$,n),O=H.tokens,F=H.lineCount;return this.cache={src:e,tokens:O,env:$,lineCount:F,lastSegment:void 0,globalStateReason:B},this.updateCacheLineCount(this.cache,F),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss($,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!Vl($)?.unbounded}),O}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,$);let H=null;const O=n.options?.streamContextParseStrategy??"chars",F=n.options?.streamContextParseMinChars??200,U=n.options?.streamContextParseMinLines??2;let z;const W=()=>(z===void 0&&(z=Wo(c)),z),K=this.canDirectlyParseAppend(s),V=K&&this.shouldUseUnboundedAppend(e,s,c);let ie=!1;if(!K)switch(O){case"lines":ie=W()>=U;break;case"constructs":if(c.length>=F){ie=!0;break}if(Rse(c)){ie=!0;break}ie=W()>=U;break;case"chars":default:ie=c.length>=F}if(B>0&&ie){const le=this.getTailLines(s.src,B)+c;try{const Ie=this.core.parse(le,s.env,n).tokens,de=Ie.findIndex(pe=>pe.map&&typeof pe.map[1]=="number"&&pe.map[1]>B);if(de!==-1){const pe=Ie.slice(de),ve=$-B;ve!==0&&this.shiftTokenLines(pe,ve),H={tokens:pe}}}catch{H=null}}else H=null;if(!H){const le=$;if(V)H={tokens:zf(n,c,s.env,{mode:"stream"})},le>0&&this.shiftTokenLines(H.tokens,le);else{const Ie=this.core.parse(c,s.env,n);le>0&&this.shiftTokenLines(Ie.tokens,le),H=Ie}}let ne=0;if(s.tokens.length>0&&H.tokens.length>0){const le=s.tokens[s.tokens.length-1],Ie=H.tokens[0];try{le.type==="inline"&&Ie.type==="inline"&&(Ie.children&&Ie.children.length>0&&(le.children||(le.children=[]),this.appendTokens(le.children,Ie.children)),le.content=(le.content||"")+(Ie.content||""),ne=1)}catch{ne=0}}const X=s.tokens.length;if(H.tokens.length>ne){const le=s.tokens,Ie=H.tokens,de=Math.min(le.length,Ie.length-ne);let pe=0;for(let ve=de;ve>0;ve--){let oe=!0;for(let ye=0;ye0&&(ne+=pe),Ie.length>ne&&this.appendTokens(s.tokens,Ie,ne)}if(s.src=e,s.globalStateReason=null,s.lineCount=$+(z??W()),s.tokens.length>X){const le=this.getLastSegment(s.tokens,e,X,s.tokens.length,e.length-c.length,$);le?s.lastSegment=le:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,V&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",ss(s.env,{area:"stream",path:V?"stream-unbounded-append":"stream-append",reason:V?"large-delta":"safe-append",unbounded:V}),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",ss(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const h=!!n.__explicitStreamChunkFallbackSetting,m=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,v=!!n.options?.streamChunkedFallback,k=!h&&!c&&m,w=v||k,b=n.options?.streamChunkAdaptive!==!1,_=n.options?.streamChunkTargetChunks??8,g=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,S=n.options?.streamChunkMaxChunks,T=!!n.__explicitStreamChunkConfig,A=n.options?.autoTuneChunks!==!1,E=n.options?.streamChunkFenceAware??!0;let P=c&&s.lineCount!==void 0?s.lineCount+Wo(c):void 0;if(w){P===void 0&&(P=Wo(e));const $=(W,K,V)=>WV?V:W,B=A&&!T?VC(e.length,P,n.options):null,H=B?.maxChunkChars??(b?$(Math.ceil(e.length/_),8e3,64e3):g??1e4),O=B?.maxChunkLines??(b?$(Math.ceil(P/_),150,700):x??200),F=B?.maxChunks??(b?$(Math.ceil(e.length/64e3),_,32):S),U=e.length>0&&e.charCodeAt(e.length-1)===10,z=k&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&B?.strategy!=="plain";if((v||z)&&(e.length>=H*2||P>=O*2)&&U){const W=Gm(n,e,d,{maxChunkChars:H,maxChunkLines:O,fenceAware:B?.fenceAware??E,maxChunks:F});return this.cache={src:e,tokens:W,env:d,lineCount:P,lastSegment:void 0,globalStateReason:Ri(e)},this.updateCacheLineCount(this.cache,P),this.recordChunkedParseResult(d,v?"explicit-fallback-large-doc":"default-fallback-large-doc"),W}}const D=this.parseFullDocument(e,d,n,P),I=D.tokens;return P=D.lineCount,this.cache={src:e,tokens:I,env:d,lineCount:P,lastSegment:void 0,globalStateReason:Ri(e)},this.updateCacheLineCount(this.cache,P),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!Vl(d)?.unbounded}),I}recordChunkedParseResult(e,t){const n=Vl(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",ss(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!Vl(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",ss(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=Ri(e);Vp(t)&&la(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?FI(n,e.length,o):"no";if(r==="yes"){const a=zf(n,e,t);return ss(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?Wo(e):0)}}let l=o;if(r==="need-lines"&&(l=Wo(e),NI(n,e.length,l))){const a=zf(n,e,t);return ss(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?Wo(e):0),{tokens:Hd(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:Wo(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+Wo(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??Fse}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sM9?n.slice(n.length-M9):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 h=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),m=this.getListParagraphMode(c,0,c.length,0);(h==="loose"||m==="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 v=f+Wo(i);t.lineCount=v;const k=this.getDocLineCount(e,v);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(m.length===0)return null;const v=s.lineEnd-2;v!==0&&this.shiftTokenLines(m,v);const k=h.tbodyCloseIndex>=0?h.tbodyCloseIndex:h.tableCloseIndex,w=t.lineCount??Wo(t.src);t.tokens.splice(k,0,...m),t.src=e,t.env=n,t.globalStateReason=null;const b=w+Wo(i);t.lineCount=b;const _=this.getDocLineCount(e,b);if(r.map&&(r.map[1]=_),h.tbodyOpenIndex>=0){const g=t.tokens[h.tbodyOpenIndex];g?.map&&(g.map[1]=_)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:_,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=Wo(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 XC={default:Ase,zero:Mse,commonmark:Sse};function Bse(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Hse(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 JC(e){return e.experimental?{...e,...e.experimental}:e}function vr(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 QC(e,t,n){for(let o=0;o=4?n.quotes=[A[0],A[1],A[2],A[3]]:n.quotes=["“","”","‘","’"]}let r=QC(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=QC(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=ew(i?.options,s,"fullChunkedFallback"),u=ew(i?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const h=new Ioe;let m=null;const v=()=>(m||(m=new Nse(n)),m);let k=null;const w=()=>(k||(k=new Dse(h)),k);let b=null;const _=()=>(b||(b=new jE),b),g=A=>!c&&!!d&&!Hse(A,d),x=(A,E)=>o==="default"&&!c&&m===null&&f!==null&&A.parse===f&&g(A)&&!A.stream.enabled&&E<(A.options.autoUnboundedThresholdChars??4e6)&&A.options.html===!1&&A.options.xhtmlOut===!1&&A.options.breaks===!1&&A.options.langPrefix==="language-"&&A.options.linkify===!1&&A.options.typographer===!1&&A.options.highlight===null,S=(A,E)=>o==="default"&&!c&&g(A)&&!A.stream.enabled&&!A.options.fullChunkedFallback&&E<(A.options.autoUnboundedThresholdChars??4e6)&&A.options.html===!1&&A.options.linkify===!1&&A.options.typographer===!1,T={core:h,block:h.block,inline:h.inline,get linkify(){const A=_();return Object.defineProperty(this,"linkify",{value:A,writable:!0,configurable:!0}),A},get renderer(){const A=v();return Object.defineProperty(this,"renderer",{value:A,writable:!0,configurable:!0}),A},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return g(this)},set(A){const E=JC(A);return this.options={...this.options,...E},(vr(A,"fullChunkSizeChars")||vr(A,"fullChunkSizeLines")||vr(A,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(vr(A,"streamChunkSizeChars")||vr(A,"streamChunkSizeLines")||vr(A,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),vr(A,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),vr(A,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),m&&m.set(E),typeof E.stream=="boolean"&&(this.stream.enabled=E.stream,k&&(k.reset(),k.resetStats())),this},configure(A){const E=typeof A=="string"?XC[A]:A;if(!E)throw new Error("Wrong `markdown-it` preset, can't be empty");if(E.options&&this.set(E.options),E.components){const P=E.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(A,E){const P=Array.isArray(A)?A:[A],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],I=new Set;for(const $ of D){if(!$)continue;const B=$.enable(P,!0);for(let H=0;H!I.has(B));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},disable(A,E){const P=Array.isArray(A)?A:[A],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],I=new Set;for(const $ of D){if(!$)continue;const B=$.disable(P,!0);for(let H=0;H!I.has(B));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},use(A,...E){const P=typeof A=="function"?A:A&&typeof A.default=="function"?A.default:void 0;if(!P)throw new TypeError("MarkdownIt.use: plugin must be a function");const D=[this,...E],I=A;return c=!0,P.apply(I,D),this},render(A,E){let P;if(x(this,A.length)){E!==void 0&&(vi(E),P=g9("render"));const $=P?id():0,B=P?WC(A,P):zC(A);if(P&&(P.attemptMs=id()-$,B===null&&(P.fallbackReason="unsupported-stock-subset"),tf(E,P)),B!==null)return E!==void 0&&ss(E,{area:"render",path:"stock-fast",reason:"stock-subset"}),B}const D=E??{},I=this.parse(A,D);return P&&tf(D,P),v().render(I,this.options,D)},async renderAsync(A,E){let P;if(x(this,A.length)){E!==void 0&&(vi(E),P=g9("render"));const $=P?id():0,B=P?WC(A,P):zC(A);if(P&&(P.attemptMs=id()-$,B===null&&(P.fallbackReason="unsupported-stock-subset"),tf(E,P)),B!==null)return E!==void 0&&ss(E,{area:"render",path:"stock-fast",reason:"stock-subset"}),B}const D=E??{},I=this.parse(A,D);return P&&tf(D,P),v().renderAsync(I,this.options,D)},renderIterable(A,E={}){const P=this.parseIterable(A,E);return v().render(P,this.options,E)},async renderAsyncIterable(A,E={}){const P=await this.parseAsyncIterable(A,E);return v().renderAsync(P,this.options,E)},renderInline(A,E={}){const P=this.parseInline(A,E);return v().render(P,this.options,E)},validateLink:bI,normalizeLink:CI,normalizeLinkText:wI,utils:rte,helpers:{...Zte},parse(A,E){if(typeof A!="string")throw new TypeError("Input data should be a String");if(E!==void 0&&vi(E),S(this,A.length)){const $=E===void 0?void 0:g9("parse"),B=$?id():0,H=Woe(A,$);if($&&($.attemptMs=id()-B,H===null&&($.fallbackReason="unsupported-stock-subset"),tf(E,$)),H!==null)return E!==void 0&&ss(E,{area:"parse",path:"stock-fast",reason:"stock-subset"}),H}const P=E??{};let D;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&g(this)){const $=FI(this,A.length);if($==="yes"){const B=zf(this,A,P);return ss(E,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),B}$==="need-lines"&&(D=Wo(A))}if(!this.stream.enabled){const $=A.length,B=this.options.autoTuneChunks!==!1,H=r,O=!a&&g(this),F=!!this.options.fullChunkedFallback,U=O&&$>=2e5;let z;(F||U||D!==void 0)&&(z=D??Wo(A));const W=(F||U)&&B&&!H?xse($,z,this.options):null;if(F||U){const K=z??0;if(F?$>=(this.options.fullChunkThresholdChars??2e4)||K>=(this.options.fullChunkThresholdLines??400):U){if(W&&W.strategy!=="plain"){const V=Gm(this,A,P,{maxChunkChars:W.maxChunkChars,maxChunkLines:W.maxChunkLines,fenceAware:W.fenceAware,maxChunks:W.maxChunks});return E&&tw(E,F?"explicit-full-chunk":"default-large-string"),V}if(F){const V=(oe,ye,G)=>oeG?G:oe,ie=this.options.fullChunkAdaptive!==!1,ne=this.options.fullChunkTargetChunks??8,X=V(Math.ceil($/ne),8e3,64e3),le=V(Math.ceil(K/ne),150,700),Ie=ie?X:this.options.fullChunkSizeChars??1e4,de=ie?le:this.options.fullChunkSizeLines??200,pe=ie?V(Math.ceil($/64e3),ne,32):this.options.fullChunkMaxChunks,ve=Gm(this,A,P,{maxChunkChars:Ie,maxChunkLines:de,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:pe});return E&&tw(E,"explicit-full-chunk"),ve}}}if(D!==void 0&&g(this)&&NI(this,$,z??D)){const K=zf(this,A,P);return ss(E,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),K}}const I=Ri(A);return ss(E,{area:"parse",path:"plain",reason:"default-plain"}),Hd(P,I,()=>h.parse(A,P,this).tokens)},parseIterable(A,E={}){return vi(E),bse(this,A,E)},parseAsyncIterable(A,E={}){return vi(E),Cse(this,A,E)},parseIterableToSink(A,E,P={}){return vi(P),wse(this,A,E,P)},parseAsyncIterableToSink(A,E,P={}){return vi(P),_se(this,A,E,P)},parseInline(A,E={}){if(typeof A!="string")throw new TypeError("Input data should be a String");vi(E),Vp(E)&&la(E);const P=h.createState(A,E,this);return P.inlineMode=!0,h.process(P),P.tokens}};if(T.stream={enabled:!!n.stream,parse(A,E){return T.stream.enabled?w().parse(A,E,T):T.parse(A,E??{})},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 A=i.components;A.core?.rules&&T.core.ruler.enableOnly(A.core.rules),A.block?.rules&&T.block.ruler.enableOnly(A.block.rules),A.inline?.rules&&T.inline.ruler.enableOnly(A.inline.rules),A.inline2?.rules&&T.inline.ruler2.enableOnly(A.inline2.rules)}return d=Bse(T),f=T.parse,T}var Wse=zse;const BI=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Use=["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"],HI=["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"],jse=["svg","g","path"],Vse=["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"],qse=["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"],Kse=["action","data","href","src","srcset","poster","xlink:href","formaction"],Zse=["script"],Gse=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],eu=new Set(BI),zI=new Set(HI),Sp=new Set([...BI,...Use,...HI,...jse]),WI=new Set([...Sp,...Vse]),Yse=new Set(qse),Xse=new Set(Kse),Zp=new Set(Zse),UI=new Set(Gse);function jI(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 Jse={amp:"&",bsol:"\\",colon:":",newline:` +`,sol:"/",tab:" "};function VI(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 Jse[String(s??"").toLowerCase()]??t})}const ph=new Set(["http","https","mailto","tel"]),Qse=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),Nu=new Set(["http","https"]);function qI(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const eie=/^https?:\/\//i;function tie(e){if(!eie.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 nie(e,t,n){if(!jf(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function jf(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function oie(e,t){return t==="href"||t==="xlink:href"?jf(e,t)?ph:Nu:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?Nu:(jf(e,t),ph)}function lc(e,t={}){if(tie(e))return!1;const n=jI(VI(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=qI(n);return i?i==="file"?!nie(n,o,s):jf(o,s)?Qse.has(i):!oie(o,s).has(i):!1}function sie(e){const t=VI(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=qI(jI(t).toLowerCase());return n==="http"||n==="https"}function iie(e,t={}){const n=String(e??"").trim();return n?lc(n,t)?"":n:""}function nw(e){return iie(e,{tagName:"img",attrName:"src"})}function rie(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,h,m,v,k){return f[h].nesting===1&&f[h].attrJoin("class",t),k.renderToken(f,h,m,v,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,h,m,v){let k,w=!1,b=f.bMarks[h]+f.tShift[h],_=f.eMarks[h];if(l!==f.src.charCodeAt(b))return!1;for(k=b+1;k<=_&&r[(k-b)%a]===f.src[k];k++);const g=Math.floor((k-b)/a);if(g=m||(b=f.bMarks[T]+f.tShift[T],_=f.eMarks[T],b<_&&f.sCount[T]=4)){for(k=b+1;k<=_&&r[(k-b)%a]===f.src[k];k++);if(!(Math.floor((k-b)/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)&&KI(s.children,t,n)}}function aie(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(rie,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,h;const m=d.indexOf("{"),v=m>=0?d.slice(m).trimStart():void 0;if(m===-1)f=d||void 0;else{if(f=d.slice(0,m).trim()||void 0,v?.startsWith("{")){let S=0,T=-1;for(let A=0;A0&&(h=v.slice(0,T))}h||(f=d||void 0)}if(s)return!0;const k=!!i.env.__markstreamFinal;let w=n+1,b=!1;for(;w<=o;){const S=i.bMarks[w]+i.tShift[w],T=i.eMarks[w];if(i.src.slice(S,T).trim()===":::"){b=!0;break}w++}b||(w=o);const _=i.push("vmr_container_open","div",1);if(_.attrSet("class",`vmr-container vmr-container-${c}`),_.map=[n,b?w:o],_.meta={..._.meta??{},unclosed:!b&&!k},f&&_.attrSet("data-args",f),h)try{const S=JSON.parse(h);for(const[T,A]of Object.entries(S)){const E=A!=null&&typeof A=="object";_.attrSet(`data-${T}`,E?JSON.stringify(A):String(A))}}catch{const S=lie(h);if(S)for(const[T,A]of Object.entries(S)){const E=A!=null&&typeof A=="object";_.attrSet(`data-${T}`,E?JSON.stringify(A):String(A))}else _.attrSet("data-attrs",h)}const g=[];for(let S=n+1;SS.trim().length>0)){let S=g.join(` +`);S.endsWith(` +`)||(S+=` +`),S.endsWith(` + +`)||(S+=` +`);const T=i.tokens[i.tokens.length-1];T&&(T.raw=S);const A=[];i.md.block.parse(S,i.md,i.env,A),KI(A,n+1,n+1+g.length),i.tokens.push(...A)}const x=i.push("vmr_container_close","div",-1);return b||(x.hidden=!0,x.map=[o,o]),i.line=b?w+1:w,!0},{alt:["paragraph","reference","blockquote","list"]})}function Gr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vo(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function w2(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 uie=/^[a-z][a-z0-9_-]*$/;function ow(e){return uie.test(String(e??"").trim().toLowerCase())}function Sr(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return ow(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":ow(s)?s:""}function Ec(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=Sr(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function cie(...e){const t=new Set,n=[];for(const o of e)for(const s of Ec(o))t.has(s)||(t.add(s),n.push(s));return n}function die(e){const t=Ec(e);return{key:t.join(","),tags:t}}function ZI(e){return Sr(e)}function fie(e,t){const n=String(e??""),o=Sr(t);if(!o)return!1;const s=Gr(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 GI(e,t){const n=Sr(t);return!!n&&!Sp.has(n)&&!fie(e,n)}function pie(e,t){const n=String(e??""),o=Sr(t);if(!o)return n;const s=Gr(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 YI=eu,hie=Sp,XI=new Set(zI);XI.delete("details");const mie=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,gie=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,H3=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,vie=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Xm(e){return(e.match(H3)?.[1]??"").toLowerCase()}function Gy(e){return/^\s*<\s*\//.test(e)}function Yy(e,t){return YI.has(t)||/\/\s*>\s*$/.test(e)}function yie(e,t){let n=0;for(let o=0;o0&&n--;continue}Yy(s,i)||n++}}return n}function sw(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${Gr(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 bie(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${Gr(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 Jm(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Cie(e){const t=e;return t.meta||(t.meta={}),t.meta}function T9(e,t,n){const o=Cie(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function wie(e,t){if(!t.size)return;const n=Array.from(t,h=>new RegExp(String.raw`<\s*${Gr(h)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=h=>h?n.some(m=>m.test(h)):!1,r=h=>{if(!(!h||!o.length))for(const m of o)m.raw+=h,m.inner+=h},l=()=>{!o.length||!s||(r(` +`),s=!1)},a=h=>{r(h)},u=h=>{for(let v=0;v{const m=o[o.length-1]?.tag;if(!m)return null;const v=new RegExp(String.raw`^\s*<\s*\/\s*${Gr(m)}\s*>`,"i");return h.match(v)?.[0]??null},d=h=>!!c(h),f=(h,m,v)=>{const k=v??(h.type==="html_inline"?Xm(m):"");if(!(k&&t.has(k))){r(m);return}const w=Gy(m),b=!w&&Yy(m,k);if(w){if(!o.length||o[o.length-1].tag!==k){r(m);return}u(m);return}if(r(m),b){T9(h,m,"");return}o.push({tag:k,token:h,raw:m,inner:""})};for(const h of e){if(h.type==="inline"&&Array.isArray(h.children)){const m=String(h.content??"");if(d(m)?s=!1:l(),!o.length&&!i(m)){s=!1;continue}let v=0,k=!0;for(const w of h.children){const b=Jm(w),_=w.type==="html_inline"?Xm(b):"",g=_&&t.has(_);let x=b;if(k&&m&&b&&(o.length||g)){const S=m.indexOf(b,v);if(S!==-1)a(m.slice(v,S)),x=m.slice(S,S+b.length),v=S+b.length;else{if(o.length&&!g)continue;k=!1}}f(w,x,_)}k&&m&&v0;continue}if(o.length&&typeof h.content=="string"){const m=Jm(h),v=h.type==="html_block"?c(m):null;if(v){u(`${s?` +`:""}${v}`),s=o.length>0;continue}if(!h.content)continue;l(),r(h.content),s=!0}}for(const h of o)T9(h.token,h.raw,h.inner)}function _ie(e){return/^\s*<\s*[!?]/.test(e)}function xie(e){const t=new Set(hie);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 iw(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function Sie(e,t){let n=null;for(const i of e.matchAll(mie)){const r=i.index??-1;if(r<0)continue;const l=(i[1]??"").toLowerCase();iw(l,t)&&Vo(e.slice(r))===-1&&(!n||r")&&(!n||i")&&(!n||i{const h=f,m=new Set(n),v=Array.isArray(h.env?.__markstreamCustomHtmlTags)?h.env.__markstreamCustomHtmlTags:[];for(const _ of v){const g=Sr(String(_??""));g&&m.add(g)}const k=xie(Array.from(m)),w=new Set(Tie);for(const _ of m)w.add(_);return{autoCloseInlineTagSet:w,commonHtmlTags:k,customTagSet:m,shouldMergeHtmlBlockTag:_=>m.has(_)||!k.has(_)||XI.has(_)}},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 h=f.children[0];return h?.type!=="html_block"?"":String(f.content??h.content??"")},i=(f,h)=>{f.type="html_block",f.content=h,f.raw=h,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,h)=>{const m=r(f);if(!/\S/.test(m))return[];if(l(m))return[{type:"code_block",content:a(m),raw:m}];const v=m.replace(/^[\t ]+/,"");if(!v)return[];if(v.startsWith("<"))return[{type:"html_block",content:v}];const k={type:"inline",tag:"",nesting:0,content:v,children:[{type:"text",content:v,raw:v}]};return h==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},k,{type:"paragraph_close",tag:"p",nesting:-1}]:h==="text"?[{type:"text",content:v,raw:v}]:[k]},c=(f,h,m)=>f[h-1]?.type==="paragraph_open"&&f[h+1]?.type==="paragraph_close"?"inline":m,d=(f,h)=>{const m=r(h);return!/\S/.test(m)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${m}`,f.children.push({type:"text",content:m,raw:m}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const h=f.tokens??[],{commonHtmlTags:m,customTagSet:v}=o(f);for(const k of h){const w=k;if(w.type!=="inline"||!Array.isArray(w.children))continue;const b=String(w.content??""),_=w.children.length?w.children:b.includes("<")?[{type:"text",content:b,raw:b}]:null;if(_)try{const g=Mie(_,m);if(w.children=g.children,g.pendingBuffer){const x=b.lastIndexOf(g.pendingBuffer);if(x!==-1){const S=b.slice(0,x);w.content=S,typeof w.raw=="string"&&(w.raw=S)}}}catch(g){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",g)}}wie(h,v)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const h=f.tokens??[],{autoCloseInlineTagSet:m,customTagSet:v,shouldMergeHtmlBlockTag:k}=o(f),w=[];for(let b=0;b0){const[x,S]=w[w.length-1];if(b!==S){if(_.type==="paragraph_open"||_.type==="paragraph_close"){h.splice(b,1),b--;continue}const T=String(_.content??_.raw??"");if(T){const A=h[S],E=`${String(A.content||"")} +${T}`,P=Vo(E),D=P===-1?null:sw(E,x,P+1);if(D){const I=E.slice(0,D.end),$=E.slice(D.end);A.content=I,A.loading=!1,h.splice(b,1),w.pop();const B=d(A,$)?[]:u($,c(h,b,"paragraph"));B.length&&h.splice(b,0,...B),b--;continue}A.content=E,A.loading!==!1&&(A.loading=!0)}h.splice(b,1),b--;continue}}const g=s(_);if(g){if(_ie(g))continue;const x=(g.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),S=/^\s*<\s*\//.test(g);if(!x||!k(x))continue;if(i(_,g),!S)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(g)&&bie(g,x)>0&&w.push([x,b]);else if(w.length>0&&x&&w[w.length-1][0]===x){const[,T]=w[w.length-1],A=h[T];A.content=`${String(A.content||"")} +${g}`,A.loading=!1,w.pop(),h.splice(b,1),b--}continue}else if(w.length>0){if(_.type==="paragraph_open"||_.type==="paragraph_close"){h.splice(b,1),b--;continue}const x=_.content||"",S=new RegExp(`<\\s*\\/\\s*${w[w.length-1][0]}\\s*>`,"i").test(x);if(x){const[,T]=w[w.length-1],A=h[T];A.content=`${A.content||""} +${x}`,A.loading!==!1&&(A.loading=!S)}S&&w.pop(),h.splice(b,1),b--}else continue}if(v.size>0){const b=new Map,_=new Map,g=T=>{let A=b.get(T);return A||(A=new RegExp(`<\\s*${T}\\b`,"i"),b.set(T,A)),A},x=T=>{let A=_.get(T);return A||(A=new RegExp(`<\\s*\\/\\s*${T}\\s*>`,"i"),_.set(T,A)),A},S=[];for(let T=0;T0){const D=S[S.length-1],I=h[D.index],$=A.type==="html_block"?x(D.tag).exec(E):null;if($){const O=$.index+$[0].length,F=E.slice(0,O),U=E.slice(O);I.content=`${String(I.content??"")} +${F}`,Array.isArray(I.children)&&I.children.push({type:"html_inline",content:``,raw:``}),S.pop();const z=d(I,U)?[]:u(U,c(h,T,"paragraph"));z.length?h.splice(T,1,...z):(h.splice(T,1),T--);continue}if(A.type!=="inline")continue;const B=Array.isArray(A.children)?A.children:[],H=yie(B,D.tag);if(H!==-1){const O=B.slice(0,H+1),F=B.slice(H+1),U=O.map(z=>String(z?.content??z?.raw??"")).join("");if(I.content=`${String(I.content??"")} +${U}`,Array.isArray(I.children)&&I.children.push(...O),F.length){const z=F.map(W=>String(W.content??W.raw??"")).join("");if(z.trim()){const W=z.replace(/^\s+/,"");if(d(I,z))h.splice(T,1),T--;else if(W.startsWith("<"))h.splice(T,1,{type:"html_block",content:W});else{const K=u(z,c(h,T,"paragraph"));h.splice(T,1,...K)}}else h.splice(T,1),T--}else h.splice(T,1),T--;S.pop();continue}I.content=`${String(I.content??"")} +${E}`,Array.isArray(I.children)&&I.children.push(...B),h.splice(T,1),T--;continue}if(A.type!=="inline")continue;const P=Array.isArray(A.children)?A.children:[];for(const D of v)if((P.length?kie(P,D):g(D).test(E)&&!x(D).test(E)?1:0)>0){S.push({tag:D,index:T});break}}}{let b=0;for(let _=0;_0?b--:(h.splice(_,1),_--))}}for(let b=0;b/]+)/)?.[1]??"").toLowerCase();if(A.startsWith("!")||A.startsWith("?")){_.loading=!1;continue}if(v.has(A)){const H=String(_.content??""),O=Vo(H),F=O===-1?null:sw(H,A,O+1);_.loading=F?!1:_.loading!==void 0?_.loading:!0;const U=F?.start??-1,z=F?F.end-F.start:0;if(U!==-1){const W=H.slice(0,U+z);let K="";O!==-1&&O]+)))?/g;let P;for(;(P=E.exec(_.content||""))!==null;)P[1],P[2]||P[3]||P[4];const D=String(_.content??""),I=new RegExp(`<\\/\\s*${A}\\s*>`,"i").exec(D),$=I?I.index:-1,B=I?I[0].length:0;if($!==-1){const H=D.slice(0,$+B),O=(D.slice($+B)||"").replace(/^\s+/,"");_.children=[{type:"html_block",content:H,tag:A,loading:!1}],_.content=H,_.raw=H,O&&h.splice(b+1,0,O.startsWith("<")?{type:"html_block",content:O}:{type:"text",content:O,raw:O})}else _.children=[{type:"html_block",content:_.content,tag:A,loading:!0}];continue}if(!_||_.type!=="inline")continue;if(_.children.length===2&&_.children[0].type==="html_inline"){const A=(_.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),E=_.children[1],P=String(E?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(E?.type==="html_inline"&&P===A)continue;m.has(A)?(_.children[0].loading=!0,_.children[0].tag=A,_.children.push({type:"html_inline",tag:A,loading:!0,content:``})):_.children=[{type:"html_block",loading:!0,tag:A,content:String(_.children[0]?.content??"")+String(_.children[1]?.content??"")}];continue}else if(_.children.length===3&&_.children[0].type==="html_inline"&&_.children[2].type==="html_inline"){const A=(_.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(m.has(A))continue;_.children=[{type:"html_block",loading:!1,tag:A,content:_.children.map(E=>E.content).join("")}];continue}if(!_.content?.startsWith("<")||_.children?.length!==1)continue;const g=String(_.content),x=_,S=x.children[0];if(S?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(g)&&(x.children.length=0);continue}const T=String(S.content??g).match(vie)?.[1]?.toLowerCase()??"";if(T){if(/\/\s*>\s*$/.test(g)||YI.has(T)){x.children=[{type:"html_inline",content:g}];continue}x.children.length=0}}})}function Iie(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 Lie(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&&!Iie(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 JI=/\.([a-z0-9]{1,15})$/i,$ie=/[_()[\]{}<>]/u,Nie=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Fie=/[?#@]/u,Rie=/[\\/]/u,Oie=/^[\p{L}\p{N}./\\-]+$/u,Pie=/^[A-Za-z0-9-]{1,63}$/u,Die=/^xn--[a-z0-9-]{2,59}$/i,Bie=/^(?:[A-Z]{1,6}|\d{1,8})$/u,Hie=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,zie=/文件名\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,Wie=/文件名\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,Uie=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,jie=2e3,Vie=512,qie={},Kie=new Set(["ai","md","py","rs","sh","zip"]),QI=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),Zie=new Set([...QI,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),Gie=new Set(["com","dev","io","page","site"]),Yie=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),Xie=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"]),Ju=new Map;function rw(e,t){if(!e||e.length>Vie)return t;for(Ju.set(e,t);Ju.size>jie;){const n=Ju.keys().next().value;if(!n)break;Ju.delete(n)}return t}function Ap(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function E9(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return Ap(n)?n:void 0}function lw(e,t){if(!Ap(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 aw(e){const t=Gp(e);return Ap(t)?t:void 0}function Jie(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function uw(e,t){if(!Ap(t))return;const n=String(e??"").trim().split(/\s+/u).map(Jie).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>Qm(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>Qm(s,{marketTicker:!0}))&&(o.marketTicker=!0),Ap(o)?o:void 0}function fu(e,t=!1){let n;return{options(o){return t||o==null?lw(e,n):lw(e,E9(aw(o),uw(o,n)))},remember(o){const s=aw(o);n=t?E9(n,s):E9(s,uw(o,n))},reset(){n=void 0}}}function cw(e){return Pie.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function Qie(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return cw(n)||Die.test(n)?t.every(cw):!1}function eL(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function ere(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function tre(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function tL(e,t,n){const o=ere(t);return eL(e)&&tre(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function nre(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 Gp(e){const t=String(e??""),n=Ju.get(t);return n?(Ju.delete(t),Ju.set(t,n),n):nre(t)?rw(t,{explicitFilename:zie.test(t),filename:Wie.test(t),marketTicker:Uie.test(t)}):rw(t,qie)}function ore(e){return Qie(e.split(/[\\/]/)[0]??"")}function sre(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function ire(e){if($ie.test(e)||!Oie.test(e))return!0;if(Rie.test(e))return!ore(e);const t=e.replace(JI,"");return eL(t)?!0:t.split(".").filter(Boolean).some(sre)}function rre(e,t,n){if(!(n?Zie:QI).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?Hie:Bie).test(o)}function Qm(e,t={}){if(!e||Nie.test(e)||Fie.test(e))return!1;const n=e.match(JI);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return rre(e,o,t.marketTicker===!0)?!0:Xie.has(o)?!Kie.has(o)||t.filename?!0:ire(e):!!(t.explicitFilename&&Gie.has(o)||t.filename&&Yie.has(o))}const dw=["!"];function $i(e){return{type:"text",content:e,raw:e}}function Fu(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 Ru(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 _a(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 lre(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($i(t))}}function fw(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 ure(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 pw(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?hw(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=Gp(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 m=hw(u);m!==-1&&(d===-1||m=v.content.length){h-=v.content.length;continue}if(h<0)break;const k=v.content[h],w=v.content.slice(0,h);let b=v.content.slice(h);for(let x=m+1;x0&&(e.splice(m+1,_),a=m+1);let g=c;if(k==="!"&&f!==-1)g=c.slice(0,f);else if(b){const x=encodeURI(b);if(x&&c.endsWith(x))g=c.slice(0,c.length-x.length);else{const S=k?encodeURI(k):"",T=S?c.indexOf(S):-1;T!==-1&&(g=c.slice(0,T))}}g!==c&&ure(l,g),b&&e.splice(a+1,0,$i(b));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(_a(u,c,f));const h=e[r+3].content?.replace(/^\)\**/,"");h&&a.push($i(h)),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,h=2;const m=(e[r-3]?.content||"").match(/^(\*+)$/),v=[];if(m){h+=1;const w=m[1].length;Fu(v,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=(v||f)+e[r+5].content,e[r+5].content=""):f=v||f,h+=3}let m=!0;if(l.nesting===-1&&(d=d.replace(/\*+$/,"")),e[r+2]?.type==="text"){const v=(e[r+2]?.content??"").indexOf(")");m=v===-1,v===-1&&(f+=e[r+2]?.content?.slice(0,v)||"",e[r+2].content="")}a.push(_a(d,f,m)),Ru(a,2),e.splice(r-2,h,...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=[];Fu(d,2),d.push(_a(u,c,!1)),Ru(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[m].type==="text"&&e[m].content==="";)m--;const v=e[m];let k=c+1;for(;k=0&&e[m].type==="text"&&e[m].content==="";)m--;const v=e[m];let k=c+1;for(;k{const n=t;try{const o=xre(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 mw(){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 gw(){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 vw(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 nL(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 I9(e){return nL(e)!==null}function oL(e){return/^:?-+:?$/.test(e.trim())}function kre(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(oL)}function bre(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Cre(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(oL)&&bre(n)}function wre(e){return e==="|"||e==="|:"}function _re(e){const t=nL(e);return t!==null&&t.every(n=>!n.includes(":"))}function xre(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)&&I9(r);if(!t&&(r.includes(` +`)&&c.length===0&&I9(a)&&Cre(u)||d)){const f=l.slice(1,-1).split("|").map(m=>m.trim()).flatMap(m=>vw(m)),h=[...mw(),...f,...gw()];o.splice(s-1,3,...h)}else if(r.includes(` +`)&&c.length===0&&I9(a)&&kre(u)){const f=l.slice(1,-1).split("|").map(m=>m.trim()).flatMap(m=>vw(m)),h=[...mw(),...f,...gw()];o.splice(s-1,3,...h)}else r.includes(` +`)&&c.length===0&&_re(a)&&wre(u)&&(i.content=r.slice(0,-2),i.children.splice(2,1))}return o}function Sre(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 Are=Sre;const Mre=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],eg=Mre.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),Tre=/\\[a-z]+/i,sL="(?:\\\\|\\u0008)",Ere=new RegExp(String.raw`${sL}(?:${eg})\s*\{[^}]+\}`,"i"),Ire=new RegExp(String.raw`(?:${sL})?(?:${eg})\s*\{`,"i"),Lre=/\\(?:text|frac|left|right|times)/,$re=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,Nre=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,Fre=/[A-Z]+\s*\([^)]+\)/i,Rre=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,Ore=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,Pre=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,Dre={"\b":"\\b","\v":"\\v","\f":"\\f"};function Bre(e){let t="";for(const n of e)t+=Dre[n]??n;return t}function Oa(e){if(!e)return!1;const t=Bre(e),n=t.trim();if(Pre.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=Tre.test(t),s=Ere.test(t),i=Ire.test(t),r=Lre.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=$re.test(t)&&!Nre.test(t),u=Fre.test(t),c=Rre.test(n),d=Ore.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),h=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||r||l||a||u||c||d||f||h}const iL="__markstreamMathPluginApplied",z3=80,rL=2e4,yw=rL+4096;function Xy(e){return!!e[iL]}function Hre(e){e[iL]=!0}const lL=["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"],zre=["cdot","mathbf{","partial","mu_{"],aL=lL.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),uL="[ \r\b\f\v]",Wre=new RegExp(`([^\\\\])(${zre.map(e=>e).join("|")})+`,"g"),Ure=/span\{([^}]+)\}/,jre=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,Vre=/(^|[^\\])\\\r?\n/g,qre=/(^|[^\\])\\$/g,Kre=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,Zre=new RegExp(`(${uL})|(${aL})\\b`,"g"),kw=new Map,bw=new Map;function Gre(e){if(!e)return Zre;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),o=kw.get(n);if(o)return o;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${uL})|(${s})\\b`,"g");return kw.set(n,i),i}function Yre(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const o=e?"__default__":n.join(""),s=bw.get(o);if(s)return s;const i=e?[eg,aL].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),eg].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return bw.set(o,r),r}const Cw={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function ww(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function Xre(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&Kre.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function _w(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 xa(e,t){const n=t?.commands??lL,o=t?.escapeExclamation??!0,s=t?.commands==null,i=Gre(s?void 0:n);let r=e.replace(i,(u,c,d,f,h)=>{if(c!==void 0&&Cw[c]!==void 0)return`\\${Cw[c]}`;if(d&&n.includes(d)){const m=h&&typeof f=="number"?h[f-1]:void 0;return m==="\\"||m&&/\w/.test(m)?u:`\\${d}`}return u});o&&(r=Xre(r));let l=r;const a=Yre(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(Ure,"span\\{$1\\}").replace(jre,"\\operatorname{span}\\{$1\\}"),l=l.replace(Vre,`$1\\\\ +`),l=l.replace(qre,"$1\\\\"),l=l.replace(Wre,"$1\\$2"),l}function xw(e){const t=e.trim();return!(!Oa(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 cL(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 W3(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=l)break;const u=tg(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}Yp(e,a)||i++,r=a+Math.max(1,t.length)}return i}function Jy(e,t,n){const o=Tp(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!Tp(o.slice(0,s)).trim()||Yp(o,s))return-1;const i=cL(o);if(tg(i,s))return-1;const r=Sw(o,t,0,s,i);if(t==="$$"){if(r%2===1)return-1}else if(r>Sw(o,n,0,s,i))return-1;return s}function Mp(e){return e===" "||e===" "}function Tp(e){let t=e.length;for(;t>0&&Mp(e[t-1]);)t--;return e.slice(0,t)}function Aw(e){let t=0;for(let n=0;n=48&&t<=57}function Qre(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 ele(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 tle(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(ele)}function nle(e){let t=0;if(!Mw(e[t]))return!1;for(;Mw(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:Mp(e[t+1])}function dL(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&&Mp(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&Mp(t[1])||nle(t)||Qre(t)||tle(t))}function Tw(e,t){return e?t?`${e} +${t}`:e:t}function U3(e){const t=String(e??"").trim();return t?Oa(t):!1}function Ew(e){let t=0;for(let n=0;nz3){h=!0;break}const v=s[m],k=md(v,c);if(k!==-1){const w=Tw(f,v.slice(0,k));if(!U3(w)){h=!0;break}const b=v.slice(k+c.length),_=b.trim()?`suffix:${Ew(b)}`:"nosuffix";return["closed",u,o+l,d,o+m,k,Ew(w),_].join(":")}if(dL(v)){h=!0;break}if(f=Tw(f,v),f.length>rL){h=!0;break}}if(!h&&U3(f))return["pending",u,o+l,d].join(":")}}return null}function $9(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function sle(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 N9(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function ile(e,t){Hre(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=(b,_)=>{let g=_;for(;g=3&&(!g||/\s/.test(g))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,b),a.pos=b,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],h=String(a.pending??""),m=Math.max(0,a.pos-h.length);let v=m,k=m;const w=m;for(const[b,_]of f){const g=a.src,x=cL(g),S=Jre(g,c);let T=!1;b==="$$"&&v!==w&&(v=w);let A=-1,E=-1,P=0;const D=I=>{if((I==="undefined"||I==null)&&(I=""),I==="\\"){a.pos=a.pos+I.length,v=a.pos;return}if(I==="\\)"||I==="\\("){const H=a.push("text_special","",0);H.content=I==="\\)"?")":"(",H.markup=I,a.pos=a.pos+I.length,v=a.pos;return}if(!I)return;if(b==="$$"&&I.includes("$")){let H=0;for(;H0&&I[O-1]==="$"||O+10){const F=I.slice(0,$),U=a.push("text","",0);U.content=F,a.pos=a.pos+F.length,v=a.pos}const H=I.slice($).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(H){const[,F,U]=H,z=U.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),W=z?z[1]:U,K=z&&z[2]?z[2]:null,V=a.push("image","img",0);V.attrs=[["src",W],["alt",F]],K&&V.attrs.push(["title",K]),V.content=F,V.children=[{type:"text",content:F,tag:""}],a.pos=a.pos+H[0].length,v=a.pos;const ie=I.slice($+H[0].length);ie&&D(ie);return}const O=a.push("text","",0);O.content=I,a.pos=a.pos+I.length,v=a.pos;return}const B=a.push("text","",0);B.content=I,a.pos=a.pos+I.length,v=a.pos};for(;!(v>=g.length);){const I=g.indexOf(b,v);if(I===-1)break;if(Yp(g,I)){v=I+Math.max(1,b.length);continue}const $=tg(x,I);if($){v=$[1];continue}const B=tg(S,I);if(B){v=B[1];continue}if(I===A&&v===E){if(P++,P>2){v=I+Math.max(1,b.length);continue}}else P=0,A=I,E=v;if(b==="("&&I>0){let ie=I-1;for(;ie>=0&&g[ie]===" ";)ie--;if(ie>=0&&g[ie]==="]"){v=I+b.length;continue}}if(b==="$"&&I>0&&g[I-1]==="$"){v=I+1;continue}if(b==="$"&&I=g.length);){const $=W3(g,I);if($===-1)break;if($+10&&g[$-1]==="$"){I=$+1;continue}const B=L9(g,$+1);if(B===-1)break;const H=g.slice($+1,B),O=H.includes("`"),F=!H||!H.trim(),U=g[B+1],z=$9(H,U),W=N9(H);if(!O&&!F&&!z&&!W){const K=g.slice(v,$);K&&D(K);const V=a.push("math_inline","math",0);V.content=xa(H,t),V.markup="$",V.raw=`$${H}$`,V.loading=!1,v=B+1,I=B+1}else D("$"),I=$+1}I{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,h=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],m=c.bMarks[l]+c.tShift[l];let v=c.src.slice(m,c.eMarks[l]).trim(),k=!1,w="",b="",_=!1,g="",x=!1;for(const[K,V]of h)if(v.startsWith(K))if(K.includes("[")){const ie=K==="\\["?v.slice(K.length):"";if(K==="\\["&&md(ie,V)===-1&&!/^\s*!\[/.test(ie)&&!ie.includes("`")&&Oa(ie)){k=!0,w=K,b=V;break}if(t?.strictDelimiters){if(v.replace("\\","")==="["){if(l+1=0?"\\]":b,P=A>=0?A:md(v,b,T);if(!_&&P>w.length){const K=v.slice(S+w.length,P),V=c.push("math_block","math",0);V.content=xa(K),V.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",V.map=[l,l+1],V.raw=`${w}${K}${E}`,V.block=!0,V.loading=!1,c.line=l+1;const ie=v.slice(P+E.length);return ie.trim()&&n(c,ie,l),!0}let D=l,I="",$=!1,B="",H=l;const O=_?v:v===w?"":v.slice(w.length),F=!f&&w==="\\["?"]":"",U=md(O,b);if(U!==-1){const K=U;I=O.slice(0,K),B=O.slice(K+b.length),H=_?l+1:l,$=!0,D=H}else for(O&&!_&&(I=O),D=l+1;D{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 rle(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 lle=/^\s]/i,ale=/^<\/a\s*>/i;function ule(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??"");lle.test(r)&&o>0&&o--,ale.test(r)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function cle(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=>ule(l,i));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:r}))})}function dle(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 fle(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 Wse({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:r=>!lc(r,{tagName:"a",attrName:"href"})}),dle(i),cle(i),(e.enableMath??!0)&&ile(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&aie(i),e.enableFixIndentedCodeBlock!==!1&&Lie(i),cre(i),hre(i),fre(i),yre(i),rle(i),Eie(i,{customHtmlTags:e.customHtmlTags}),i}function ac(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=>ac(n))),t}function ple(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function hle(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 mle(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function hh(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function Lw(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function $w(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function yle(e,t){const n=[],o=[],s=[],i=[],r=e.split(gle),l=/\r?\n$/.test(e),a=r.some(h=>h.startsWith("diff ")||h.startsWith("--- ")||h.startsWith("+++ ")||h.startsWith("@@ ")),u=h=>{const m=h;if(!hL.some(v=>m.startsWith(v)))if(m.startsWith("-")){const v=m.slice(1);s.push($w(v,a))}else if(m.startsWith("+")){const v=m.slice(1);i.push($w(v,a))}else{Lw(n,o,s,i);const v=a&&m.startsWith(" ")?m.slice(1):m;n.push(v),o.push(v)}},c=l?Math.max(0,r.length-1):r.length;for(let h=0;h0||i.length>0)&&Lw(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 Qy(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(Iw.test(a)&&(a=a.replace(Iw,"")),r){const{original:u,updated:c}=yle(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 kle(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function ble(){return{type:"hardbreak",raw:`\\ +`}}function Cle(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i\s*$/.test(t)||eu.has(e)}function wle(e){if(!e||e.length===0)return Nw();const t=R9.get(e);if(t)return t;const n=e.map(Sr).filter(Boolean);if(!n.length){const s=Nw();return R9.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:A2({customHtmlTags:e})};return R9.set(e,o),o}function yL(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function _le(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function ng(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 xle(e,t,n){const o=e.slice();return ng(o,"href")||o.push(["href",t]),n!=null&&!ng(o,"title")&&o.push(["title",n]),o}function j3(e){return e.map(yL).join("")}function Zh(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:Zh(o.children)});continue}t.push(o)}return t}function Sle(e,t,n){let o=0;for(let s=t;s`;v.toLowerCase().includes(x.toLowerCase())||(v+=x),w=!0,k=!0}const b=[],_=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let g;for(;(g=_.exec(l))!==null;){const x=g[1],S=g[2]||g[3]||g[4]||"";b.push([x,S])}if(u?.has(a)){const x=_le(e);return[{type:a,tag:a,attrs:b,content:x?x.inner:h.innerTokens.length?j3(h.innerTokens):"",children:h.innerTokens.length?o(h.innerTokens,s,i,r):[],raw:x?.raw??v,loading:e.loading||k,autoClosed:w},h.nextIndex]}return[{type:"html_inline",tag:a,attrs:b,content:v,children:m,raw:v,loading:k,autoClosed:w},h.nextIndex]}function kL(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=>kL(t)).join(""):String(e.content??"")}function Mle(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>kL(t)).join("")}function Fw(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=Mle(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 Tle(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function Ele(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 Lle(e,t,n){const o=e.slice();return og(o,"href")||o.push(["href",t]),n!=null&&!og(o,"title")&&o.push(["title",n]),o}function mh(e,t,n){const o=e[t],s=Ile(o.attrs),i=String(og(s,"href")??""),r=og(s,"title"),l=r==null?null:String(r),a=Lle(s,i,l);let u=t+1;const c=[];let d=!0;for(;uk.type==="strong_open")){const k=String(h.content??""),w=String(h.raw??k),b=ac(h);b.content=k.slice(0,-2),b.raw=w.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=b}const m=$o(f,void 0,void 0,n),v=m.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:v,children:m,raw:`[${v}](${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?@[\\\]^_`{|}~]/,jle=/\p{P}/u,Vle=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,qle=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,Kle=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,Zle=/:\/\//,V3=1,bL=2,Gle=4,Yle=8,CL=16,Ea=32,Gh=64,Cf=128,wL=256,Xle=512,wf=1024,Jle=1982;function gh(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 tu(e){return!!e&&Wle.test(e)}function nu(e){return!!e&&(Ule.test(e)||jle.test(e))}function xL(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&Vle.test(e)}function SL(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&qle.test(e)}function eae(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||tu(o)?!1:!(nu(o)&&!xL(o,n)&&n&&!tu(n)&&!nu(n))}function tae(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||tu(n)?!1:!(nu(n)&&!SL(n,o)&&o&&!tu(o)&&!nu(o))}function nae(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||tu(o)?!1:!(nu(o)&&!xL(o,n)&&n&&!tu(n)&&!nu(n))}function sae(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||tu(n)?!1:!(nu(n)&&!SL(n,o)&&o&&!tu(o)&&!nu(o))}function iae(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const uae=/[\p{L}\p{N}]/u,cae=/^[\p{L}\p{N}]+$/u;function q3(e){return e?uae.test(e):!1}function AL(e){return e?cae.test(e):!1}function Vf(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 hae(e){return e?Kle.test(e)||Zle.test(e):!1}function mae(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function $o(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=Gp(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 h(){return e===f&&(e=e.slice()),e}function m(){u=null}function v(oe,ye){const G=e.length===1?t:String(ye.content??""),Y=[],fe=dae(oe);if(fe!==-1){x(oe.slice(0,fe),oe.slice(0,fe));const ge=oe.slice(fe);return ge&&(D({type:"text",content:ge,raw:ge}),c--),c++,!0}if(Dle.test(oe)){const ge=oe.indexOf("~~");ge!==-1&&Y.push({type:"strikethrough",index:ge})}if(Ble.test(oe)){const ge=oe.indexOf("**");ge!==-1&&Y.push({type:"strong",index:ge})}if(/[^*]*\*[^*]+/.test(oe)){const ge=G?_L(G,0):oe.indexOf("*");if(G&&ge===-1)return!1;ge!==-1&&Y.push({type:"emphasis",index:ge})}Y.sort((ge,Q)=>ge.index!==Q.index?ge.index-Q.index:ge.type===Q.type?0:ge.type==="strong"?-1:Q.type==="strong"?1:0);const we=Y[0];if(!we)return!1;if(we.type==="strikethrough"){const ge=we.index,Q=ge>-1?oe.slice(0,ge):"";if(Q&&x(Q,Q),ge===-1)return c++,!0;const te=oe.indexOf("~~",ge+2),ce=te===-1?oe.slice(ge+2):oe.slice(ge+2,te),ue=te===-1?"":oe.slice(te+2),{node:Se}=Ow([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:ce,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return m(),g(Se),ue&&(D({type:"text",content:ue,raw:ue}),c--),c++,!0}if(we.type==="strong"){const ge=we.index,Q=ge>-1?oe.slice(0,ge):"";if(Q&&x(Q,Q),ge===-1)return c++,!0;if(t&&ge===0){let _e=!1,Ee=0;for(;Ee=2)return x(oe,oe),c++,!0}}if(t&&(oe.match(/\*/g)||[]).length>Qle(t))return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0;const te=Vf(oe,ge);if(te.len>=3){const _e=pae(oe,ge+te.len);if(_e!==-1){const Ee=oe.slice(ge+te.len,_e);if(fae(Ee)){const{node:it}=nf([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Ee,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);m(),g(it);const Fe=oe.slice(_e+3);return Fe&&(D({type:"text",content:Fe,raw:Fe}),c--),c++,!0}}}if(!oae(oe,ge)){const _e=oe.slice(ge,ge+te.len);x(_e,_e);const Ee=oe.slice(ge+te.len);return Ee&&(D({type:"text",content:Ee,raw:Ee}),c--),c++,!0}const ce=iae(oe,ge+2);let ue="",Se="";if(ce.index!==-1){ue=oe.slice(ge+2,ce.index),Se=oe.slice(ce.index+2);const _e=ce.index,Ee=Vf(oe,_e);if(te.intraword&&Ee.intraword&&!AL(ue)||!ue&&te.len>=4&&te.intraword)return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0}else{if(d||ce.sawInvalidClose||te.intraword)return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0;ue=oe.slice(ge+2),Se=""}if(!ue&&/^\*+$/.test(Se))return x(oe,oe),c++,!0;const{node:ze}=nf([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:ue,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return m(),g(ze),Se&&(D({type:"text",content:Se,raw:Se}),c--),c++,!0}if(we.type==="emphasis"){let ge=we.index;ge===-1&&(ge=0);const Q=oe.slice(0,ge);if(Q&&x(Q,Q),!eae(oe,ge)){x(oe[ge],oe[ge]);const _e=oe.slice(ge+1);return _e&&(D({type:"text",content:_e,raw:_e}),c--),c++,!0}const te=Vf(oe,ge),ce=nae(G,oe,ge+1),ue=ce.index,Se=e[c+1];if(o?.final&&Se?.type==="em_open"&&ue!==-1&&oe.slice(ge+1,ue).trim()!==oe.slice(ge+1,ue)||ue===-1&&(ce.sawInvalidClose||o?.final||te.intraword||!q3(oe[ge+1])))return x(oe.slice(ge),oe.slice(ge)),c++,!0;const{node:ze}=hh([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:ue>-1?oe.slice(ge+1,ue):oe.slice(ge+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(m(),g(ze),ue!==-1&&ue{for(let ze=0;ze=0&&Se[Ee]==="\\";Ee--)_e++;if(_e%2===0)return ze}return-1})(oe);if(Y===-1)return!1;let fe=1;for(let Se=Y+1;Sewe?.type==="math_inline")||!Hle.test(oe))return null;const G=ye.parseInline(oe,{__markstreamFinal:!!o?.final});if(!Array.isArray(G)||G.length===0)return null;const Y=(G.find(we=>we?.type==="inline")?.children??[]).filter(we=>!(we?.type==="text"&&String(we.content??"")===""));if(!Y.length||!Y.some(we=>we?.type!=="text")||Y.length===1&&Y[0]?.type==="text"&&String(Y[0].content??"")===oe)return null;const fe=$o(Y,oe,n,o);return fe.length?fe:null}function b(oe){m(),a.push(oe)}function _(oe){m();const ye=ac(oe);a.push(ye)}function g(oe){b(oe)}function x(oe,ye){u?(u.content+=oe,u.raw+=ye??oe):(u={type:"text",content:String(oe??""),raw:String(ye??oe??"")},a.push(u))}function S(oe,ye){if(!oe)return;const G=$o([{...ye,type:"text",content:oe,raw:oe}],oe,n,o);if(G.length===1&&G[0]?.type==="text"){const Y=G[0];x(String(Y.content??""),String(Y.raw??Y.content??""));return}for(const Y of G)g(Y)}function T(oe,ye){return String(oe.markup??"").startsWith(ye)}function A(oe){if(!u||oe.loading!==!0||oe.markup!=="\\(\\)")return;const ye=e[c-1];!ye||ye.type!=="text"||!T(ye,"\\(")||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 E(oe){return oe.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(oe,ye,G=gh(oe)){let Y=oe;const fe=String(ye.content??"");return(G&V3)!==0&&Y.endsWith("\\")&&!T(ye,"\\\\")&&!fe.endsWith("\\\\")&&(Y=Y.slice(0,-1)),(G&wf)!==0&&Y.endsWith("(")&&!T(ye,"\\(")&&!fe.endsWith("\\(")&&(Y=Y.slice(0,-1)),(G&bL)!==0&&/\*+$/.test(Y)&&!T(ye,"\\*")&&!fe.endsWith("\\*")&&(Y=Y.replace(/\*+$/,"")),Y}for(;c=0;_e--){const Ee=a[_e];if(Ee.type!=="text")break;te=_e,ce=String(Ee.content??"")+ce}teQ==="href")?.[1],ge=String(we??"");if(t&&ge){const Q=t.indexOf("](");if(Q!==-1){const te=t.indexOf(")",Q+2);te===-1?ye.loading=!0:ye.loading&&t.slice(Q+2,te).includes(ge)&&(ye.loading=!1)}}F(ye)||b(ye)}function H(oe){if(oe.markup!=="linkify")return!1;const{node:ye,nextIndex:G}=mh(e,c,o);return z(ye,G)?(c=G,!0):!1}function O(oe){m(),g($le(oe)),c++}function F(oe){if(oe.type!=="link")return!1;const ye=a[a.length-1];if(!ye||ye.type!=="text")return!1;const G=String(ye.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!G)return!1;const Y=oe,fe=String(Y.href??""),we=String(Y.text??""),ge=String(G[2]??""),Q=fe.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!fe||!(we===fe||we===Q||hae(we)))return!1;const te=String(G[1]??"");return te?(ye.content=te,ye.raw=te):a.pop(),b({...oe,text:ge,children:[{type:"text",content:ge,raw:ge}],raw:`[${ge}](${fe}${Y.title?` "${Y.title}"`:""})`}),!0}function U(oe){if(oe.type!=="link")return!1;const ye=oe,G=String(ye.href??"");return G?z({href:G,title:ye.title==null||ye.title===""?null:String(ye.title),loading:!!ye.loading},c+1):!1}function z(oe,ye){const G=a[a.length-1];if(G?.type!=="image"||G.src||!G.loading||!String(G.raw??"").endsWith("]("))return!1;const Y=e[ye],fe=String(Y?.content??"");if(Y?.type!=="text"||!fe.startsWith(")"))return!1;a.pop(),u=null;const we=String(G.alt??"");b({type:"image",src:oe.href,alt:we,title:oe.title,raw:`![${we}](${oe.href}${oe.title?` "${oe.title}"`:""})`,loading:!!oe.loading});const ge=fe.slice(1),Q=ac(Y);return Q.content=ge,Q.raw=ge,h()[ye]=Q,!0}function W(oe){if(oe.type!=="link")return!1;const ye=a[a.length-1],G=e[c-1];if(!ye||ye.type!=="text"||G?.type!=="text")return!1;const Y=String(ye.content??""),fe=String(G.content??"");if(!Y.endsWith("!")||!fe.endsWith("!")||T(G,"\\!"))return!1;const we=Y.slice(0,-1);we?(ye.content=we,ye.raw=we,u=ye):(a.pop(),u=null);const ge=oe,Q=String(ge.text??ge.children?.map(ue=>String(ue?.content??ue?.raw??"")).join("")??""),te=String(ge.href??""),ce=ge.title==null||ge.title===""?null:String(ge.title);return b({type:"image",src:te,alt:Q,title:ce,raw:`![${Q}](${te}${ce?` "${ce}"`:""})`,loading:!!ge.loading}),!0}function K(oe,ye="",G=null){const Y=String(oe.alt??oe.raw??"");return{type:"link",href:ye,title:G,text:Y,children:[oe],raw:`[${Y}](${ye}${G?` "${G}"`:""})`,loading:!0}}function V(oe){const ye=oe.startsWith("![")?oe:`![${oe}`,G=ye.slice(2),Y=G.indexOf("](");return{type:"image",src:"",alt:Y===-1?G.replace(/\]$/,""):G.slice(0,Y),title:null,raw:ye,loading:!0}}function ie(oe){const ye=oe.indexOf("[![");if(ye===-1||typeof t=="string"&&e.length===1&&aae(t,ye,"["))return!1;const G=oe.slice(0,ye);return G&&x(G,G),b(K(V(oe.slice(ye+1)))),c++,!0}function ne(oe){if(o?.final)return!1;const ye=e[c-1];if(ye?.type!=="text"||!String(ye.content??"").endsWith("[")||T(ye,"\\["))return!1;const G=a[a.length-1];if(G?.type==="text"&&G.content.endsWith("[")){const Y=G.content.slice(0,-1);Y?(G.content=Y,G.raw=Y,u=G):(a.pop(),u=null)}return b(K(Fw(oe))),c++,!0}function X(oe){if(oe.type!=="link")return!1;const ye=oe,G=String(ye.raw??""),Y=String(ye.text??"");if(!G.startsWith("[![")&&!Y.startsWith("!["))return!1;const fe=ye.title==null||ye.title===""?null:String(ye.title);return b(K({type:"image",src:String(ye.href??""),alt:Y.replace(/^!\[/,"").replace(/\]$/,""),title:fe,raw:G.startsWith("[![")?G.slice(1):G,loading:!0})),!0}function le(oe){if(!oe.startsWith("]("))return!1;const ye=e[c-2];if(ye?.type==="text"&&String(ye.content??"").endsWith("[")&&T(ye,"\\["))return!1;const G=a[a.length-1];if(G?.type!=="image"&&G?.type!=="link")return!1;const Y=G,fe=G?.type==="link"&&Array.isArray(Y.children)&&Y.children.length===1&&Y.children[0]?.type==="image"?a.pop():null,we=fe?fe.children[0]:a.pop();if(!we||we.type!=="image")return!1;const ge=e[c+1];let Q=String(fe?.href??""),te=fe?.title==null?null:String(fe.title),ce=!0;if(ge?.type==="link_open"){const{node:Se,nextIndex:ze}=mh(e,c+1,o);Q=Se.href,te=Se.title,ce=!0,c=ze}else{if(Q=oe.slice(2),Q.includes('"')){const Se=Q.split('"');Q=String(Se[0]??"").trim(),te=Se[1]==null?null:String(Se[1]).trim()}c++}const ue=K(we,Q,te);return ue.loading=ce,b(ue),!0}function Ie(){const oe=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&oe?.type==="text"&&String(oe.content??"").endsWith("[")&&T(oe,"\\[")}function de(oe,ye){const G=oe.indexOf("[");if(G===-1)return!1;let Y=oe.slice(0,G);const fe=oe.indexOf("](",G);if(fe!==-1){const we=e[c+2];let ge=oe.slice(G+1,fe);if(ge.includes("[")){const _e=ge.indexOf("[");Y+=oe.slice(0,G+_e+1);const Ee=G+_e+1;ge=oe.slice(Ee+1,fe)}const Q=e[c+1];if(oe.endsWith("](")&&Q?.type==="link_open"&&we){const _e=e[c+4];let Ee=4,it=!0;if(_e?.type==="text"){const Oe=String(_e.content??"");if(Oe.startsWith(")")){it=!1;const Ge=Oe.slice(1);if(Ge){const at=ac(_e);at.content=Ge,at.raw=Ge,h()[c+4]=at}else Ee++}else Oe==="."&&Ee++}S(Y,ye);const Fe=String(we.content??"");return o?.validateLink&&!o.validateLink(Fe)?x(ge,ge):b({type:"link",href:Fe,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:it}),c+=Ee,!0}const te=oe.indexOf(")",fe),ce=te!==-1?oe.slice(fe+2,te):"",ue=te===-1;let Se=Y.match(/\*+$/);if(Se&&(Y=Y.replace(/\*+$/,"")),S(Y,ye),Se||(Se=ge.match(/^\*+/)),!d&&Se){const _e=Se[0].length;ge=ge.replace(/^\*+/,"").replace(/\*+$/,"");const Ee=[];if(_e===1?Ee.push({type:"em_open",tag:"em",nesting:1}):_e===2?Ee.push({type:"strong_open",tag:"strong",nesting:1}):_e===3&&(Ee.push({type:"strong_open",tag:"strong",nesting:1}),Ee.push({type:"em_open",tag:"em",nesting:1})),Ee.push({type:"link",href:ce,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:ue}),_e===1){Ee.push({type:"em_close",tag:"em",nesting:-1});const{node:it}=hh(Ee,0,o);g(it)}else if(_e===2){Ee.push({type:"strong_close",tag:"strong",nesting:-1});const{node:it}=nf(Ee,0,void 0,o);g(it)}else if(_e===3){Ee.push({type:"em_close",tag:"em",nesting:-1}),Ee.push({type:"strong_close",tag:"strong",nesting:-1});const{node:it}=nf(Ee,0,void 0,o);g(it)}else{const{node:it}=hh(Ee,0,o);g(it)}}else o?.validateLink&&!o.validateLink(ce)?x(ge,ge):b({type:"link",href:ce,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:ue});const ze=te!==-1?oe.slice(te+1):"";return ze&&(D({type:"text",content:ze,raw:ze}),c--),c++,!0}return!1}function pe(oe){const ye=oe.indexOf("![");if(ye===-1)return!1;const G=oe.slice(0,ye);return G&&!u?u={type:"text",content:G,raw:G}:G&&u&&(u.content+=G),u&&(a.push(u),u=null),b(V(oe.slice(ye))),c++,!0}function ve(oe){if(!(oe?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ye=oe.slice(1).match(/[^\s\]]/);if(ye===null)return c++,!0;if(ye&&/x/i.test(ye[0])){const G=ye[0]==="x"||ye[0]==="X";return b({type:"checkbox_input",checked:G,raw:G?"[x]":"[ ]"}),c++,!0}return!1}return a}function t5(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 Pw(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 Ep(e,t,n,o){const s=gae(e,t,n);return t5(s.startLine,s.endLine,o)}function vae(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:t5(o,s,t)}function Dn(e,t,n){if(!n?.includeSourceMap)return e;const o=vae(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 yae(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=t5(i,Math.max(r,l),o)),e}function kae(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 bae(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 Cae(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function b1(e,t,n){const o=e[t],s=[],i=fu(n,!0);let r=t+1;for(;rd.raw).join("")};n?.includeSourceMap&&Dn(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&&Dn(l,o,n),[l,r+1]}function wae(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=fu(o,!0);let a=t+1;for(;au.raw).join(` +`)} +:::`},a+1]}const _ae=new Set(["warning","info","note","tip","danger","caution"]);function xae(e){let t=0;for(;t=0;v--){const k=f[v];if(k.type==="text"&&/:+/.test(k.content)){h=v;break}}const m={type:"paragraph",children:$o((h!==-1?f.slice(0,h):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&Dn(m,e[u],n),l.push(m),a.remember(m.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=b1(e,u,a.options());n?.includeSourceMap&&Dn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=C1(e,u,a.options());n?.includeSourceMap&&Dn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=_2(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 Aae=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Mae(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=Aae.exec(String(o.info??""));return s?wae(e,t,s,n):null}const n5={parseContainer:(e,t,n)=>Sae(e,t,n),matchAdmonition:Mae};function C1(e,t,n){const o=[],s=fu(n,!0);let i=t+1;for(;il.raw).join(` +`)};return n?.includeSourceMap&&Dn(r,e[t],n),[r,i+1]}function Tae(e){if(e.info?.startsWith("diff"))return Qy(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 Eae(e,t,n){const o=[];let s=t+1,i=[],r=[];const l=fu(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 Iae(e,t,n){const o=e[t].meta??{},s=String(o?.label??"0"),i=[],r=fu(n,!0);let l=t+1;for(;la.raw).join(` +`)}`},l+1]}function Lae(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:$o(a.children||[],u,void 0,n),raw:u}}function $ae(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 ML(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 b=r.length-1;b>=0;b--)if(r[b]===w.tag){r.length=b;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 mue(e,t,n){if(!n?.length)return!1;const o=new Set(Ec(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"&&v!=="/")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:m,selfClosing:!f&&c[w]==="/",after:c.slice(k+1)}},l=(c,d)=>{const f=c.toLowerCase();let h=0;for(;h")return!0}}return!1},a=[];let u=0;for(;u=t?t:c,f=e.slice(u,d),h=f.endsWith("\r")?f.slice(0,-1):f,m=w1(h);if(m){const v=r(h.slice(m.index));if(v)if(v.closing){for(let k=a.length-1;k>=0;k--)if(a[k]===v.tag){a.length=k;break}}else v.selfClosing||l(v.after,v.tag)||a.push(v.tag)}if(c===-1||c>=t)break;u=c+1}return a.length>0}function gue(e,t){const n=Zae.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!w1(r.endsWith("\r")?r.slice(0,-1):r)||pue(e,s)||hue(e,s)||mue(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function DL(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)&&!of(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]==="`"&&!of(e,l)){const a=DL(e,i,"`"),u=vue(e,i+a,a);if(u===-1)break;i=u+a;continue}if(e.startsWith("\\[",i)&&!of(e,l)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!of(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return r}function yue(e,t){if(!Xy(t))return e;const n=t,o=Ww.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?BL(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:S2(e).state;Ww.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 Oa(l)&&!c?e:e.slice(0,r)}function kue(e,t,n,o,s){const i=i5(e),r=r5(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&l5(e)==null&&z9(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(l.rest)&&z9(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 qw(e,t,n,o,s)}else return qw(e,t,n,o,s);return!1}function S2(e,t=aue(),n=null,o=!1,s=0){const i=qf(t);let r=qf(t),l="",a=!1,u=0;for(;uu&&e[c-1]==="\r"?c-1:d?c:e.length,h=e.slice(u,f);kue(h,i,s+u,n,o)&&(a=!0),d?(r=qf(i),l=""):l=h,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:i,lineBuffer:l}}}function BL(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:qf(e.committedContext),context:qf(e.context),lineBuffer:e.lineBuffer+t}}:S2(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function bue(e,t){if(!Xy(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=x2.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?BL(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):S2(t),a=l.state,u=i&&s?l.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!u&&!fue(s.source,r)&&!cue(t)){s.source=t,s.explicitBracketMath=a;return}const c=ole(t);(s&&(s&&!i||s.key!==c||u)||!s&&c)&&n.reset(),uue(e,t,c,a)}function Cue(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function wue(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 W9(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&&wue(e,t)}function Kw(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function _ue(e){for(let t=0;t+5":""}function Gw(e){return{type:"paragraph",children:e,raw:e.map(Aue).join("")}}function Yw(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function Xw(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=oue(t);if(!s?.size)return null;let i=-1;for(let c=0;ch?.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(Gw(r)),a.push(l);const u=o.slice(i+1);return u.length&&a.push(Gw(u)),a}function Mue(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 Kf(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function Tue(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*${Gr(t)}\s*>\s*$`,"i").test(n)}const U9=new Set(["iframe","script","style","textarea","title"]);function Xp(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:_===-1?e.length:_+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:_===-1?e.length:_+3,selfClosing:!1,tag:""}}const h=Vo(e.slice(f));if(h===-1)return null;const m=f+h+1,v=e.slice(f,m);if(/^<\s*[!?]/.test(v))return{closing:!1,end:m,selfClosing:!1,tag:""};let k=v.slice(1).trimStart();const w=k.startsWith("/");w&&(k=k.slice(1).trimStart());const b=k.match(/^([A-Z][\w:-]*)/i);return b?.[1]?{closing:w,end:m,selfClosing:/\/\s*>$/.test(v),tag:b[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,h)=>{const m=new RegExp(String.raw`<\s*\/\s*${Gr(f)}(?=\s|>)`,"gi");m.lastIndex=h;const v=m.exec(e);if(!v||v.index==null)return null;const k=s(v.index);return k?{start:v.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(U9.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 Jw(e){return e.replace(/\r\n/g,` +`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Lue(e,t,n){return n?e.includes(n,t)?!0:Jw(e.slice(Math.max(0,t))).includes(Jw(n)):!1}function $ue(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 zL(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Fue=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),Rue=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function Oue(e){return/\n\s*\n/.test(e)||Rue.test(e)}function Pue(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Fue.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(!Oue(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function Due(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=Xp(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 Bue(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,r=zw.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]:Ud(u,t,n));return zw.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function Hue(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"||UI.has(r)||Array.isArray(i.children))return s;const l=String(s.raw??i.content??"");if(!l)return s;const a=Vo(l);if(a===-1)return s;const u=Xp(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 h=zL(n,o),m=d?null:Due(f),v=m?Bue(m,t,h,o):Ud(f,t,h);return Pue(f,v)?{...s,children:v}:s})}function zue(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function Ud(e,t,n){return e.trim()?UL(e,t,{...n,__disableStreamParse:!0}):[]}function Wue(e,t,n){const o=Ud(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function Uue(e,t,n){const o=ML({content:e}),s=Vo(e),i=HL(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const r=Wue(e.slice(s+1,i),t,n);r.length>0&&(o.children=r)}return o.raw=e,o}function jue(e,t,n){const o=Vo(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=Xp(s,"summary",0);if(!i)return Ud(s,t,n);const r=s.slice(0,i.start),l=s.slice(i.end);return[...Ud(r,t,n),Uue(i.raw,t,n),...Ud(l,t,n)]}function WL(e,t,n,o,s,i=0){const r=[];let l=i;for(let a=0;a{const W=HL(f,"details");return W!==-1?f.slice(0,W):f})():f,[_]=WL(w?[]:v===-1?e.slice(a+1):e.slice(a+1,v),t,n,o,s,h+f.length),g=jue(b,n,zL(o,s)),x=v===-1?"":String(e[v].raw??Kf(e[v])??""),S=w||v!==-1&&k?.closed===!0,T=x.replace(/[\t\r\n ]+$/,""),A=S?(()=>{const W=(k?.raw??"").lastIndexOf(T);return W===-1?t.length:h+W})():t.length,E=Vo(f),P=w&&E!==-1?h+E+1:h+f.length,D=t.slice(P,A===-1?t.length:A),I=n.parse(D,{__markstreamFinal:s}),$=n.renderer.render(I,n.options,{__markstreamFinal:s}),B=A+T.length,H=S?Math.max(A+x.length,$ue(t,B)):t.length,O=S?t.slice(A,H):x,F=S?t.slice(h,H):t.slice(h),U=w&&E!==-1?f.slice(0,E+1):f,z={...u,tag:"details",attrs:w2(f.slice(0,E+1)),raw:F,content:`${U}${$}${O}`,children:[...g,..._],loading:!s&&!S};if(o.includeSourceMap&&(z.sourceMap=Ep(t,h,S?H:t.length,o)),r.push(z),l=S?H:t.length,v===-1&&!w)break;v!==-1&&(a=v)}return[r,l]}function Vue(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let r=0;r=d.start&&E.end<=d.end){s.splice(S,1);continue}break}x=A+T.length,s.splice(S,1)}}return s}function que(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=v.charCodeAt(0);return k>=65&&k<=90||k>=97&&k<=122},c=v=>{const k=v.charCodeAt(0);return k>=48&&k<=57},d=v=>v==="!"||u(v),f=v=>u(v)||c(v)||v===":"||v==="-",h=v=>u(v)||c(v)||v==="_"||v==="."||v===":"||v==="-",m=h;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(!h(l[a]))return!1;for(a++;a=l.length)return!0;const v=l[a];if(v==='"'||v==="'"){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=b=>b===" "||b===" ",h=b=>{let _=0;for(;_{let _=0;for(;_";)for(g=!0,_++;_{const _=h(b);if(_)return _;const g=m(b);return g==null?null:h(g)};let k=0;const w=l.split(/\r?\n/);for(const b of w){const _=k,g=k+b.length;if(a<_)break;const x=v(b);if(x){const S=x.markerChar,T=x.markerLen;u?S===c&&T>=d&&/^\s*$/.test(x.rest)&&(u=!1,c="",d=0):(u=!0,c=S,d=T)}if(a<=g)break;k=g+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 e_(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(m??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=m=>m===" "||m===" ",s=m=>{const v=m.charCodeAt(0);return v>=65&&v<=90||v>=97&&v<=122||v>=48&&v<=57||m==="_"||m==="-"||m===":"},i=m=>{if(!m)return!1;if(m[0]===" ")return!0;let v=0;for(let k=0;k=4)return!0;continue}if(w===" ")return!0;break}return!1},r=m=>{let v=!1,k=!1;for(let w=0;w")return w}return-1},l=m=>{let v=0;for(;v{if(i(m))return-1;const k=m.replace(/^[ \t]+/,"");if(!k||k.startsWith(">")||k.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(k))return-1;let w=!1,b=0;for(;b=x.length){w=!0,b++;continue}const T=x[S];if(T==="!"||T==="?"){w=!0,b+=g+1;continue}if(T==="/"){w=!0,b+=g+1;continue}const A=S;for(;S"&&P!=="/"){w=!0,b++;continue}const D=new RegExp(String.raw`<\s*\/\s*${E}\s*>`,"i"),I=/\/\s*>$/.test(x),$=D.test(m.slice(b+g+1)),B=D.test(e.slice(v+b+g+1)),H=/[\r\n]/.test(e.slice(v+b+g+1));if(w&&n.has(E)&&!I&&!$&&(B||H))return b;w=!0,b+=g+1}return-1};let u=!1,c="",d=0,f="",h=0;for(;hh&&e[m-1]==="\r",w=v?k?m-1:m:e.length,b=e.slice(h,w),_=v?k?`\r +`:` +`:"",g=l(b);let x=b;if(!u&&!g){const S=a(b,h);if(S!==-1){const T=_||` +`;x=`${b.slice(0,S).replace(/[ \t]+$/,"")}${T}${T}${b.slice(S).replace(/^[ \t]+/,"")}`}}f+=x,f+=_,g&&(u?g.markerChar===c&&g.markerLen>=d&&/^\s*$/.test(g.rest)&&(u=!1,c="",d=0):(u=!0,c=g.markerChar,d=g.markerLen)),h=v?m+1:e.length}return f}function Zue(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,h=!1;for(let m=0;m")return m}return-1},l=(d,f,h)=>{const m=h.toLowerCase();let v=d.indexOf("<",f);for(;v!==-1;){let k=v+1;for(;k=d.length||d[k]!=="/"){v=d.indexOf("<",v+1);continue}for(k++;kd.length){v=d.indexOf("<",v+1);continue}let w=!0;for(let _=0;_="A"&&g<="Z"?String.fromCharCode(g.charCodeAt(0)+32):g)!==m[_]){w=!1;break}}if(!w){v=d.indexOf("<",v+1);continue}let b=k+m.length;if(b")return!0;v=d.indexOf("<",v+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 h=f;for(;fc&&e[d-1]==="\r",h=f?d-1:d,m=e.slice(c,h);u+=a(m),u+=f?`\r +`:` +`,c=d+1}return u}function Gue(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 h=0,m=!1,v=0;for(;h=f.length||f[h]!==">")break;for(m=!0,h++;h{let h=0;for(;hnew 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",v=h?m?f-1:f:e.length,k=e.slice(d,v),w=h?m?`\r +`:` +`:"",b=s(k),_=b?.prefix??"",g=b?.content??k,x=i(g);x&&(l?x.markerChar===a&&x.markerLen>=u&&/^\s*$/.test(x.rest)&&(l=!1,a="",u=0):(l=!0,a=x.markerChar,u=x.markerLen));let S=g;if(!l&&S.includes("{if(D.replace(/^[\t ]+/,"").startsWith("|"))return A;const I=D.slice(0,P).replace(/^[\t ]+/,"");if(I.length>0){const $=E.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",B=I.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!$||!B||$!==B)return A}return`${E} + +`});if(_){const T=_+S.split(` +`).join(` +${_}`);c+=T}else c+=S;c+=w,d=h?f+1:e.length}return c}function Yue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(I=>String(I??"").toLowerCase()));if(!n.size)return e;const o=I=>I===" "||I===" ",s=I=>{if(!I)return!1;if(I[0]===" ")return!0;let $=0;for(let B=0;B=4)return!0;continue}if(H===" ")return!0;break}return!1},i=I=>{const $=I.charCodeAt(0);return $>=65&&$<=90||$>=97&&$<=122||$>=48&&$<=57||I==="_"||I==="-"||I===":"},r=I=>{let $=0;for(;${let $=0,B=!1,H=0;for(;$=I.length||I[$]!==">")break;for(B=!0,$++;$r(I).startsWith("<"),u=I=>{for(let $=0;${if(s(I))return"";const $=r(I);if(!$.startsWith("<"))return"";let B=1;for(;B<$.length&&o($[B]);)B++;if(B>=$.length||$[B]==="/"||$[B]==="!"||$[B]==="?")return"";const H=B;for(;B<$.length&&i($[B]);)B++;if(B===H)return"";const O=$.slice(H,B).toLowerCase();if(!n.has(O))return"";const F=$[B];return F&&F!==" "&&F!==" "&&F!==">"&&F!=="/"?"":O},d=I=>{if(s(I))return null;const $=r(I);if(!$.startsWith("<"))return null;let B=1;for(;B<$.length&&o($[B]);)B++;if(B>=$.length)return null;const H=$[B]==="/";if(H)for(B++;B<$.length&&o($[B]);)B++;const O=$[B];if(!O||O==="!"||O==="?")return null;const F=B;for(;B<$.length&&i($[B]);)B++;if(B===F)return null;const U=$.slice(F,B).toLowerCase();if(!n.has(U))return null;const z=$[B];if(z&&z!==" "&&z!==" "&&z!==">"&&z!=="/")return null;if(H)return{type:"close",name:U};if(/\/\s*>\s*$/.test($))return{type:"open",name:U,complete:!0};const W=$.indexOf(">",B);if(W!==-1){const K=$.slice(W+1);if(new RegExp(`<\\s*\\/\\s*${U}\\s*>`,"i").test(K))return{type:"open",name:U,complete:!0}}return{type:"open",name:U,complete:!1}},f=I=>{if(s(I))return null;const $=r(I).replace(/[ \t]+$/,"");if(!$.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test($))return null;const B=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(B?.[1])return B[1].toLowerCase();const H=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!H?.[1]||!H[2])return null;const O=H[1].toLowerCase();return O===H[2].toLowerCase()?O:null};let h=!1,m="",v=0;const k=I=>{let $=0;for(;$k(I),b=I=>{const $=r(I);return $?s(I)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test($):!1},_=(I,$,B)=>{let H=I,O=0;for(;HH&&e[F-1]==="\r",W=U?z?F-1:F:e.length,K=e.slice(H,W),V=l(K),ie=V?.key??"";if(O>0&&$&&ie!==$)break;const ne=V?.content??K,X=d(ne);if(X?.name===B){if(X.type==="open")X.complete||O++;else if(O>0&&(O--,O===0))return!1}else if(O>0&&(u(ne)||b(ne)))return!0;if(U)H=F+1;else break}return!1};let g="",x=0,S=!0,T=!1,A=!1,E=` +`;const P=[];let D="";for(;xx&&e[I-1]==="\r",H=$?B?I-1:I:e.length,O=e.slice(x,H),F=$?B?`\r +`:` +`:"",U=l(O),z=U?.key??"",W=U?.content??O,K=w(W);K&&(h?K.markerChar===m&&K.markerLen>=v&&/^\s*$/.test(K.rest)&&(h=!1,m="",v=0):(h=!0,m=K.markerChar,v=K.markerLen));const V=P.length>0;if(!h&&!V){const ne=c(W),X=!!ne&&!S&&T&&A&&_(x,z,ne);ne&&!S&&(!T||X)&&(z&&D&&z===D?g+=`${z}${E}`:z||(g+=E))}if(g+=O,g+=F,F&&(E=F),!h){const ne=d(W);if(ne){if(ne.type==="open")ne.complete||P.push(ne.name);else for(let X=P.length-1;X>=0;X--)if(P[X]===ne.name){P.length=X;break}}}const ie=u(W);S=ie,T=!ie&&a(W),A=!ie&&!!f(W),D=z,x=$?I+1:e.length}return g}function UL(e,t,n={}){const o=LL(n),s=o?l1():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(rue(t,n)&&(t.stream.reset(),lue(t)),i||(l.endsWith("- *")&&(l=l.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*-\s*$/,b=>b.startsWith(` +`)?` +`:""):/(?:^|\n)\s*--\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*--\s*$/,b=>b.startsWith(` +`)?` +`:""):/(?:^|\n)\s*>\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*>\s*$/,b=>b.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*$/,b=>b.startsWith(` +`)?` +`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(l)?l=l.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(b,_,g)=>`${_}${g.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*\d+[.)]\s*$/,b=>b.startsWith(` +`)?` +`:""):/\n[[(]\n*$/.test(l)&&(l=l.replace(/(\n\[|\n\()+\n*$/g,` +`)),l=yue(l,t),l=gue(l,n.customHtmlTags)??l),n.customHtmlTags?.length&&l.includes("<")){const b=Ec(n.customHtmlTags);if(b.length&&(l=Kue(l,b),l=Zue(l,b),l=Yue(l,b),l=Gue(l,b),l.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");l=l.replace(g,"$1$2$2")}}i||(l=que(l));const a=Mue(l);if(a){if(n.includeSourceMap){const g={...n,__sourceLineMapper:e_(r,l)};a[0].sourceMap=Ep(l,0,l.length,g)}const b=n.preTransformTokens,_=n.postTransformTokens;if(s5(t,n)||typeof b=="function"||typeof _=="function"){const g=Zw(t,l,{__markstreamFinal:i},n),x=typeof b=="function"&&b(g)||g;typeof _=="function"&&_(x)}return Uw(a,n,o,s)}const u=Zw(t,l,{__markstreamFinal:i},n);if(!u||!Array.isArray(u))return Uw([],n,o,s);const c=n.preTransformTokens,d=n.postTransformTokens;let f=u;c&&typeof c=="function"&&(f=c(f)||f);const h=t,m=typeof h.validateLink=="function"&&h.__markstreamOriginalValidateLink&&h.validateLink!==h.__markstreamOriginalValidateLink?h.validateLink:void 0,v=n.validateLink??m??h.options?.validateLink??(typeof h.validateLink=="function"?h.validateLink:void 0),k={...n,validateLink:v,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?e_(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let w=nue(t,l,f,k,o);if(d&&typeof d=="function"){const b=d(f);if(Array.isArray(b)){const _=b[0],g=_?.type;_&&typeof g=="string"?w=Yh(b,{...k,__customHtmlBlockCursor:0},o):w=b}}if(zue(w)&&(w=Vue(w,i,l,k),w=WL(w,l,t,k,i)[0],w=Hue(w,t,k,i)),i){const b=new WeakSet,_=g=>{if(!g||typeof g!="object"||b.has(g))return;if(b.add(g),Array.isArray(g)){for(const S of g)_(S);return}const x=g;x.type==="html_block"&&x.loading===!0&&(x.loading=!1);for(const S of Object.values(x))_(S)};_(w)}return w=NL(w,n),n.debug&&console.log("Parsed Markdown Tree Structure:",w),$L(w,o,s)}function t_(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=fu(t),s=t?.includeSourceMap===!0;let i=0;for(;ic.type==="html_block")){if(s)for(const c of u)Dn(c,l,t);for(const c of u)al(c,l,t);n.push(...u)}else{const c={type:"paragraph",raw:a,children:u};s&&Dn(c,l,t);const d=Xw(c,t);if(d){s&&Yw(d,c);for(const f of d)al(f,l,t);n.push(...d)}else al(c,l,t),n.push(c)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const Xue=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,Jue=new Set([...Zp,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),Que=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 n_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ece(e){return typeof e=="string"?e:e==null?"":String(e)}function jL(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function Pa(e){return ece(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function VL(e){return Pa(e).replace(/`/g,"`")}function M2(e){return String(e??"").trim().toLowerCase()}function a5(e,t="safe"){const n=M2(e);return n?t==="escape"?!0:t==="trusted"?Zp.has(n):!Que.has(n):!1}function qL(e,t="safe"){const n=M2(e);return n?t==="escape"?!0:t==="trusted"?Zp.has(n):Jue.has(n):!1}function o_(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${VL(o)}"`).join("")}function KL(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(Xue);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function tce(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||lc(s,{tagName:t,attrName:"srcset"})})}function ZL(e,t,n,o){return Yse.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?tce(t,o):!!(Xse.has(e)&&t&&lc(t,{tagName:o,attrName:e}))}function Gu(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function GL(e,t,n,o=!1){if(t!=="safe"||M2(n)!=="a")return e;const s=Gu(e,"href");if(o&&(!s||!e[s])){const a=Gu(e,"target"),u=Gu(e,"rel");return a&&delete e[a],u&&delete e[u],e}const i=Gu(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const r=Gu(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 s_(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!jL(r)||ZL(l,i,t,n)||(o[r]=i)}return GL(o,t,n,!!Gu(e,"href"))}function YL(e,t){const n=e.toLowerCase();return WI.has(n)?!1:n_(t,n)||n_(t,e)}function u5(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!jL(r)||ZL(l,i,t,n)||(o[r]=i)}return GL(o,t,n,!!Gu(e,"href"))}function Zf(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 Xh(e,t="safe",n){const o=u5(Zf(e),t,n),s=Object.entries(o).map(([i,r])=>[i,r]);return s.length>0?s:void 0}function nce(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 oce(e){const t={};for(const[n,o]of Object.entries(e))t[n]=nce(o,n);return t}function j9(e){return e.trim().length>0}function XL(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);j9(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=KL(e.slice(o+1,s));if(!i){const r=e.slice(o,s+1);j9(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||eu.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r})}n=s+1}return t}function sce(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=KL(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||eu.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r}),n=s+1}return t}function ice(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${Pa(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${Pa(o)}`:` ${Pa(o)}="${VL(s)}"`).join("");return e.type==="self_closing"?`<${Pa(t)}${n} />`:`<${Pa(t)}${n}>`}function rce(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of XL(e))if((n.type==="tag_open"||n.type==="self_closing")&&YL(n.tagName??"",t))return!0;return!1}function jd(e,t="safe"){if(!e)return"";if(t==="escape")return Pa(e);const n=sce(e),o=[],s=[],i=[];for(const r of n){if(r.type==="text"){i.length===0&&s.push(Pa(r.content??""));continue}const l=M2(r.tagName);if(!l)continue;if(qL(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"&&a5(l,t)){s.push(ice(r));continue}if(r.type==="self_closing"){s.push(`<${l}${o_(s_(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${o_(s_(r.attrs??{},t,l))}>`),eu.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 lce=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],i_="http://www.w3.org/2000/svg",ace=new Set(["script","style","iframe","object","embed","link","meta"]),uce=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"]),cce=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),dce=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),fce=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function pce(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function hce(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function mce(e){const t=e.nodeName.toLowerCase();return t==="use"?pce(e):t==="image"?hce(e):t==="text"||t==="tspan"?!!e.textContent?.trim():fce.has(t)}function gce(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 vce(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")?lc(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?lc(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":lc(i,{tagName:o,attrName:s})?"":i:""}function yce(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 QL(e){const t=JL(e),n=t.toLowerCase();let o=0;for(;on.test(t))||QL(t)}function kce(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 yh(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function e$(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(!ace.has(o)){if(o==="br"){t.push(` +`);return}for(const s of Array.from(n.childNodes))e$(s,t)}}function bce(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];e$(t,n);const o=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=yh(t.getAttribute("width")),i=yh(t.getAttribute("height")),r=yh(t.getAttribute("x")),l=yh(t.getAttribute("y")),a=e.ownerDocument.createElementNS(i_,"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 h=e.ownerDocument.createElementNS(i_,"tspan");h.setAttribute("x",String(r+s/2)),h.setAttribute("dy",d===0?`${c}em`:"1.2em"),h.textContent=f,a.appendChild(h)}}t.parentNode?.replaceChild(a,t)}}function Cce(e){bce(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!uce.has(o)){n.remove();continue}if(o==="style"&&r_(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&&r_(i.value)){n.removeAttribute(i.name);continue}if(r==="srcdoc"){n.removeAttribute(i.name);continue}if(cce.has(r)&&i.value){const l=vce(o,r,i.value);if(!l){n.removeAttribute(i.name);continue}l!==i.value&&n.setAttribute(i.name,l);continue}if(dce.has(r)&&i.value&&QL(i.value)){n.removeAttribute(i.name);continue}if(i.value){const l=gce(i.value);l!==i.value&&n.setAttribute(i.name,l)}}kce(n)}}function CVe(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 Cce(n),wce(n)?null:n}catch{return null}}function wce(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){mce(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 kh=[];function V9(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function _ce(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function xce(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function l_(e=`editor-${Date.now()}`,t={}){const n=fle(t),o=n;o.__markstreamRegisteredPluginCount=kh.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||kh.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 m=t.i18n;i=v=>m[v]??s[v]??v}else i=m=>s[m]??m;if(Array.isArray(t.plugin))for(const m of t.plugin){const v=m;if(Array.isArray(v)){const[k,...w]=v;typeof k=="function"&&n.use(k,...w)}else typeof v=="function"&&n.use(v)}if(Array.isArray(t.apply))for(const m of t.apply)try{m(n)}catch(v){console.error("[getMarkdown] apply function threw an error",v)}if(kh.length)for(const m of kh)if(Array.isArray(m)){const[v,...k]=m;typeof v=="function"&&n.use(v,...k)}else typeof m=="function"&&n.use(m);n.use(Tee),n.use(Lee),n.use(See);const r=Vee,l=r.default??r;n.use(l),n.use(xee),n.use(_ee),n.core.ruler.after("block","mark_fence_closed",m=>{const v=m,k=v.src,w=!!v.env?.__markstreamFinal,b=k.split(/\r?\n/);for(const _ of v.tokens){if(_.type!=="fence"||!_.map||!_.markup)continue;const g=_.map[0],x=_.map[1],S=_.markup,T=S[0],A=S.length,E=b[Math.max(0,x-1)]??"";let P=0;for(;Pg+1&&D>=A&&I===E.length,B=_;B.meta=B.meta??{},B.meta.unclosed=!$,B.meta.closed=!!$}});const a=(m,v)=>{const k=m,w=k.pos;if(k.src[w]!=="~")return!1;const b=k.src[w-1],_=k.src[w+1];if(/\d/.test(b)&&/\d/.test(_)){if(!v){const g=k.push("text","",0);g.content="~"}return k.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(m,v)=>{const k=m[v],w=String(k.info??"").trim(),b=String(k.content??""),_=btoa(unescape(encodeURIComponent(b))),g=_ce(w),x=V9(g),S=xce(`editor-${e}-${v}-${g}`),T=V9(i("common.copy"));return`
      +
      + ${V9(g.toUpperCase())} + +
      +
      +
      `};const u=/^\[(\d+)\]/,c=/^\[([^\]\n]+)\]/,d=m=>{if(!m.startsWith("["))return!1;const v=c.exec(m);if(!v)return m!=="["&&!/^\[\d+$/.test(m);const k=String(v[1]??"");return m.slice(v[0].length).startsWith("(")?!1:!/^\d+$/.test(k)},f=(m,v)=>{const k=m;if(k.src[k.pos]!=="[")return!1;const w=u.exec(k.src.slice(k.pos));if(!w)return!1;const b=k.src.slice(Math.max(0,k.pos-120),k.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(b))return!1;const _=k.src.slice(k.pos+w[0].length);if(_.startsWith("](")||_.startsWith("(")||d(_))return!1;if(!v){const g=w[1],x=k.push("reference","span",0);x.content=g,x.markup=w[0],x.raw=w[0]}return k.pos+=w[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(m,v)=>{const w=String(m[v].content??"");return`${w}`};const h=n.use.bind(n);return n.use=((...m)=>(o.__markstreamHasCustomParserExtensions=!0,h(...m))),n}function Sce({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 t$({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}:Sce({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const Ace={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 Mce(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function n$(e){const t=Mce(e);return Ace[t]??t}function Tce(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>n$(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function Ece(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 Ice(e){return Ece(e)?.join("\0")??""}function Lce(e,t){return`${Ice(e)}\0\0${Tce(t)?.join("\0")??""}`}function rd(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function a_(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var $ce=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,h=this.pendingChars<=0;if(this.source+=d,h){const m=u_();this.startedAt=f&&this.hasStarted?m-this.normalizedStartDelayMs:m,this.lastTick=m,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=u_();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=Oce(m/Math.max(.001,v/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(k-this.currentCps)*.2,this.charBudget+=this.currentCps*(h/1e3),this.charBudget<1){this.ensureLoop();return}const w=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),b=Rce(this.source.slice(this.visible.length),w,this.segmenter);b.text&&(this.visible+=b.text,this.charBudget=Math.max(0,this.charBudget-b.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=rd(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,rd(o,1e3,1)),this.normalizedTargetLatencyMs=rd(s,900,1),this.normalizedCatchUpLatencyMs=rd(i,350,1),this.normalizedCatchUpThreshold=a_(r,600),this.normalizedStartDelayMs=a_(a,80),this.maxCommitFps=Math.trunc(rd(l,30,1)),this.maxCharsPerCommit=Math.trunc(rd(u,80,1)),this.flushOnFinish=c,this.segmenter=Fce(),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 Nce(e={},t){const n=new $ce(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 Fce(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function Rce(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 u_(){return typeof performance<"u"?performance.now():Date.now()}function Oce(e,t,n){return Math.min(n,Math.max(t,e))}var Pce=(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 G3=Symbol.for("markstream-vue:node-lifecycle");function wVe(){}const c5=new Map;let o$="material";const Ad=new Map,c_=new Map;let Y3=null;function Dce(e){c5.set(e.id,e)}function Bce(e){const t=c5.get(o$);if(!t)return;const n=t.core[e];if(n)return n;const o=Ad.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!Ad.has(t.id)&&zce(t)}function Hce(){var e,t;return(t=(e=c5.get(o$))==null?void 0:e.fallback)!=null?t:""}function zce(e){return Pce(this,null,function*(){var t,n,o;if(Ad.has(e.id))return(t=Ad.get(e.id))!=null?t:null;let s=c_.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(Ad.set(e.id,i),Y3?.(),i)).catch(()=>(Ad.set(e.id,null),null)),c_.set(e.id,s)),s})}const d_='',f_='',Wce={id:"material",core:{"":f_,plain:'',text:f_,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:d_,csharp:d_,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>jo(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Uce=Xr(0);Y3=()=>{Uce.value++},Dce(Wce);const jce={"":"",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 T2(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=jce[n])!=null?t:n}function _Ve(e){const t=T2(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 xVe(e){return Bce(T2(e))||Hce()}const p_={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 E2=(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 ki=null,Qu=!1,ec=null,I2=f5;function Jp(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function d5(){try{const e=globalThis;return Jp(e?.katex)}catch{return null}}function f5(){return E2(null,null,function*(){const e=d5();if(e)return e;const t=yield jo(()=>import("./katex-DnlPpQZa.js"),[]);try{yield jo(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([0,1]))}catch{}return Jp(t)})}function s$(e){const t=Promise.resolve(e).then(n=>{var o;return ec===t&&n?(ki=(o=Jp(n))!=null?o:n,ki):null}).catch(()=>null).finally(()=>{ec===t&&(ec=null)});return ec=t,Qu=!0,t}function Vce(e){I2=e,ki=null,Qu=!1,ec=null}function qce(e){Vce(f5)}function i$(){return typeof I2=="function"}function SVe(){var e;const t=I2;if(!t||t===f5)return null;if(ki)return ki;const n=d5();if(n)return ki=n,ki;if(Qu)return null;try{const o=t();return o?typeof o?.then=="function"?(s$(o),null):(ki=(e=Jp(o))!=null?e:o,ki):null}catch{return null}}function r$(){return E2(this,null,function*(){var e;const t=d5();if(t)return ki=t,ki;if(ki)return ki;if(ec)return ec;if(Qu)return null;const n=I2;if(!n)return Qu=!0,null;try{const o=n();if(typeof o?.then=="function")return s$(o);if(o)return ki=(e=Jp(o))!=null?e:o,Qu=!0,ki}catch{}return Qu=!0,null})}function l$(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let Ha=null,Na=null;const Ws=new Map,ea=new Map;let Lp=5;const uc=new Set;function Gf(){if(Ws.size{const{id:n,html:o,error:s}=t.data,i=Ws.get(n);if(i)if(Ws.delete(n),clearTimeout(i.timeoutId),i.cleanup(),Gf(),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(ea.set(a,o),ea.size>200){const u=ea.keys().next().value;ea.delete(u)}}i.aborted||i.resolve(o)}},Ha.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Ws.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Ws.clear(),a$()}}function Zce(){var e;for(const t of Ws.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Ws.clear(),a$(),Ha&&((e=Ha.terminate)==null||e.call(Ha)),Ha=null,Na=null}function Gce(e,t=!0,n=2e3,o){return E2(this,null,function*(){performance.now();const s=l$(e);if(!i$()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Na)return Promise.reject(Na);const i=`${t?"d":"i"}:${s}`,r=ea.get(i);if(r)return Gf(),Promise.resolve(r);const l=Ha||(Na=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Na.name="WorkerInitError",Na.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(Na);if(Ws.size>=Lp){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Ws.size,a.max=Lp,Promise.reject(a)}return new Promise((a,u)=>{if(o?.aborted){const v=new Error("Aborted");return v.name="AbortError",void u(v)}const c=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const v=Ws.get(c);if(!v)return;Ws.delete(c),v.cleanup();const k=new Error("Worker render timed out");k.name="WorkerTimeout",k.code="WORKER_TIMEOUT",v.aborted||v.reject(k),Gf()},n);d=()=>{const v=Ws.get(c);if(!v||v.aborted)return;v.aborted=!0,v.cleanup();const k=new Error("Aborted");k.name="AbortError",u(k)},o&&o.addEventListener("abort",d,{once:!0});const h=a,m=u;Ws.set(c,{resolve:v=>{h(v)},reject:v=>{m(v)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(v){const k=Ws.get(c);Ws.delete(c),clearTimeout(f),k?.cleanup(),k?.reject(v),Gf()}})})}function AVe(e,t=!0,n){const o=`${t?"d":"i"}:${l$(e)}`;if(ea.set(o,n),ea.size>200){const s=ea.keys().next().value;ea.delete(s)}}const Yce="WORKER_BUSY";function Xce(e=2e3,t){return Ws.size{let s,i=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),uc.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{i||(i=!0,a(),n())},uc.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(()=>Gf()),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 sf={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function MVe(e){return E2(this,arguments,function*(t,n=!0,o={}){var s,i,r,l;if(!i$()){const v=new Error("KaTeX rendering disabled");throw v.name="KaTeXDisabled",v.code="KATEX_DISABLED",v}const a=(s=o.timeout)!=null?s:sf.timeout,u=(i=o.waitTimeout)!=null?i:sf.waitTimeout,c=(r=o.backoffMs)!=null?r:sf.backoffMs,d=(l=o.maxRetries)!=null?l:sf.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):sf.maxRetries,h=o.signal;let m=0;for(;;){if(h?.aborted){const v=new Error("Aborted");throw v.name="AbortError",v}try{return yield Gce(t,n,a,h)}catch(v){if(v?.code!==Yce||m>=f)throw v;if(m++,yield Xce(u,h).catch(()=>{}),h?.aborted){const k=new Error("Aborted");throw k.name="AbortError",k}c>0&&(yield new Promise(k=>globalThis.setTimeout(k,c*m)))}}})}function Md(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function Jce(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 ig(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=Jce(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 rg(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 u$(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function lg(e,t=360,n=500){return u$(e,t,n)}function ag(e,t=360,n=500){return u$(e,t,n)}var Qce=Object.defineProperty,ede=Object.defineProperties,tde=Object.getOwnPropertyDescriptors,h_=Object.getOwnPropertySymbols,nde=Object.prototype.hasOwnProperty,ode=Object.prototype.propertyIsEnumerable,m_=(e,t,n)=>t in e?Qce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c$=(e,t)=>{for(var n in t||(t={}))nde.call(t,n)&&m_(e,n,t[n]);if(h_)for(var n of h_(t))ode.call(t,n)&&m_(e,n,t[n]);return e},g_=(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 ug=()=>jo(()=>import("./mermaid.core-CJB1tAev.js").then(e=>e.bp),__vite__mapDeps([2,3]));let Ul=null,Td=ug,xf=null,X3=!1,J3=!1,Sf=0;function sde(e){Td=e,Sf++,Ul=null,xf=null,X3=!1,J3=!1}function ide(e){sde(ug)}function v_(){return typeof Td=="function"}function y_(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=c$({},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},ede(n,tde(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function k_(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=c$({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 TVe(){return g_(this,null,function*(){if(Ul)return Ul;const e=(function(){try{const o=globalThis;return y_(o?.mermaid)}catch{return null}})();if(e)return Ul=e,k_(Ul),Ul;const t=Td,n=Sf;return t?t===ug&&X3?null:xf||(xf=g_(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===ug)return n===Sf&&t===Td&&(X3=!0,(function(i){J3||(J3=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===Sf&&t===Td&&(xf=null)}return n!==Sf||t!==Td?null:o?(Ul=y_(o),k_(Ul),Ul):null}),xf):null})}let Oi=null,Fa=null;const Dr=new Map,Uu=new Map;function Jh(e){for(const t of Dr.values())t.reject(e);Dr.clear(),Uu.clear()}let b_=5,C_=!1;const rde="WORKER_BUSY",w_="MERMAID_DISABLED";function lde(e){if(Oi&&Oi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",Jh(n)}Oi=e,Fa=null;const t=e;Oi.onmessage=n=>{if(Oi!==t)return;const{id:o,ok:s,result:i,error:r}=n.data,l=Dr.get(o);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(i))},Oi.onerror=n=>{var o,s;if(Oi===t)if(Dr.size!==0){try{C_?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}Jh(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Oi.onmessageerror=n=>{var o,s;if(Oi===t)if(Dr.size!==0){try{C_?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}Jh(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function ade(){var e;if(Oi)try{Jh(new Error("Worker cleared")),(e=Oi.terminate)==null||e.call(Oi)}catch{}Oi=null,Fa=null}function d$(e,t,n,o){if(!v_()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=w_,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=Uu.get(s);return i||(i=(function(r,l,a=1400){if(!v_()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=w_,Promise.reject(c)}if(Fa)return Promise.reject(Fa);const u=Oi||(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(Dr.size>=b_){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=rde,c.inFlight=Dr.size,c.max=b_,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let h,m=!1;const v=()=>{m||(m=!0,h!=null&&globalThis.clearTimeout(h),Dr.delete(f))},k={resolve:w=>{v(),c(w)},reject:w=>{v(),d(w)}};Dr.set(f,k);try{u.postMessage({id:f,action:r,payload:l})}catch(w){return Dr.delete(f),void d(w)}h=globalThis.setTimeout(()=>{const w=new Error("Worker call timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT";const b=Dr.get(f);b&&b.reject(w)},a)})})(e,t,n),Uu.set(s,i),i.then(()=>{Uu.get(s)===i&&Uu.delete(s)},()=>{Uu.get(s)===i&&Uu.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 EVe(e,t,n=1400,o){return d$("canParse",{code:e,theme:t},n,o)}function IVe(e,t,n=1400,o){return d$("findPrefix",{code:e,theme:t},n,o)}var ude=Object.defineProperty,cde=Object.defineProperties,dde=Object.getOwnPropertyDescriptors,__=Object.getOwnPropertySymbols,fde=Object.prototype.hasOwnProperty,pde=Object.prototype.propertyIsEnumerable,x_=(e,t,n)=>t in e?ude(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mt=(e,t)=>{for(var n in t||(t={}))fde.call(t,n)&&x_(e,n,t[n]);if(__)for(var n of __(t))pde.call(t,n)&&x_(e,n,t[n]);return e},rn=(e,t)=>cde(e,dde(t)),mo=(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 hde="__global__",q9="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",Q3=(()=>{const e=globalThis;if(e[q9])return e[q9];const t={scopedCustomComponents:{},revision:Xr(0)};return e[q9]=t,t})(),S_=Q3.revision,mde=Symbol("markstreamCustomComponents"),gde=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 Qp(e){return gde.has(String(e).trim().toLowerCase())}function vde(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function K9(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([Sr(n),Sr(vde(n))]))!s||Qp(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function fs(e){const t=nn(mde,null);return R(()=>{var n;return S_.value,(function(o,s={}){return S_.value,mt(mt(mt({},K9(Q3.scopedCustomComponents[hde]||{})),K9(s)),K9((function(i){return i&&Q3.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const yde=["aria-label"],kde={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"},bde={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},nr=Gn(et({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(y(),M("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(y(),M("svg",bde,[...n[1]||(n[1]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),C("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(y(),M("svg",kde,[...n[0]||(n[0]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,yde))}),[["__scopeId","data-v-be21ab83"]]);nr.install=e=>{e.component(nr.__name,nr)};const Cde={class:"emoji-node"},zi=Gn(et({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(y(),M("span",Cde,N(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);zi.install=e=>{e.component(zi.__name,zi)};const wde=["id"],_de=["title"],or=Gn(et({__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)=>(y(),M("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[C("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+N(e.node.id)+"]",9,_de)],8,wde))}}),[["__scopeId","data-v-c1463a29"]]);or.install=e=>{e.component(or.__name,or)};const f$=(()=>{try{return!1}catch{}return!1})();function Z9(e){f$&&console.warn(e)}function A_(e,t="safe",n){return u5(e,t,n)}function p$(e){return oce(e)}function G9(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function p5(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=Xh((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),G9(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),G9(r.value)]):Object.entries(s).map(([r,l])=>[r,G9(l)]):null,t,n);var s;if(!o)return;const i=p$(Zf(o));return Object.keys(i).length>0?i:void 0}function M_(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 rf(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Y9(e,t,n,o,s,i,r=!1){const l=(function(d,f){return YL(d,f)})(e,o);if(Zp.has(e.toLowerCase())||!l&&qL(e,i))return null;if(!l&&a5(e,i))return r?[M_(e,t,!0)]:[M_(e,t),...n,``];const a=u5(t,i,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=o[e]||o[e.toLowerCase()],f=p$(a);return tn(d,rn(mt({},f),{key:c}),n.length>0?n:void 0)}return tn(e,rn(mt({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function h$(e,t){return rce(e,t)}function cg(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=Y9(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);rf(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 h=-1;for(let m=u.length-1;m>=0;m--)if(u[m].tagName.toLowerCase()===f){h=m;break}if(h!==-1)for(;u.length>h;){const m=u.pop(),v=Y9(m.tagName,m.attrs||{},m.children,r,m.autoKey,l);u.length>0?rf(u[u.length-1].children,v):rf(c,v),m.tagName.toLowerCase()!==f&&u.length>h&&Z9(`Auto-closing unclosed tag: <${m.tagName}>`)}else Z9(`Ignoring closing tag with no matching opening tag: `)}for(;u.length>0;){const d=u.pop(),f=Y9(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?rf(u[u.length-1].children,f):rf(c,f),Z9(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(XL(e),t,n)}catch(s){return o=s,f$&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const xde=["innerHTML"],sr=Gn(et({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=nn("markstreamHtmlPolicy",void 0),o=R(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=fs(()=>t.customId),i=et({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=R(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:jd(l,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=cg(l,s.value,o.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!h$(l,s.value))return{mode:"html",content:jd(l,o.value)};const a=cg(l,s.value,o.value);return a===null?{mode:"html",content:jd(l,o.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(y(),M("span",{key:0,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[j(p(i),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(y(),M("span",{key:1,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},N(r.value.content),3)):(y(),M("span",{key:2,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,xde))}}),[["__scopeId","data-v-d17f12b0"]]);sr.install=e=>{e.component(sr.__name,sr)};const Sde={class:"inline-code"},Ade={key:0},li=Gn(et({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=p1(),o=nn("markstreamFade",void 0),s=nn("markstreamTextStreamState",void 0),i=nn("markstreamStreamVersion",void 0),r=R(()=>{const b=n.fade;return b===""||b===!0||b==="true"||b!==!1&&b!=="false"&&void 0}),l=R(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=R(()=>{var b;return String((b=t.node.code)!=null?b:"")}),u=R(()=>!l.value),c=R(()=>{var b;const _=(b=n["index-key"])!=null?b:n.indexKey;return _==null||_===""?"":String(_)}),d=Z(t.node.code),f=Z(""),h=Z(0);let m;function v(){m?.(),m=void 0}function k(){v(),f.value&&(d.value=d.value+f.value,f.value="")}Je([()=>t.node.code,c,l],([b])=>{const _=String(b??""),g=c.value,x=t$({nextContent:_,persistedContent:g?s?.get(g):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=x.settledContent,f.value=x.streamedDelta,x.appended?(h.value+=1,(function(){if(!f.value||m||!i)return;const S=i.value;m=Je(()=>i.value,T=>{T!==S&&k()},{flush:"sync"})})()):f.value||v(),g&&s?.set(g,_)},{immediate:!0}),d1(v);const w=R(()=>h.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(b,_)=>(y(),M("code",Sde,[u.value?(y(),M(Pe,{key:0},[qe(N(a.value),1)],64)):(y(),M(Pe,{key:1},[d.value?(y(),M("span",Ade,N(d.value),1)):ee("",!0),f.value?(y(),M("span",{key:1,class:Re(["inline-code-stream-delta",[w.value]]),onAnimationend:k},N(f.value),35)):ee("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);li.install=e=>{e.component(li.__name,li)};const e8=Z(!1),T_=Z(""),E_=Z("top"),Yf=Z(null),Xf=Z(null),t8=Z(null),n8=Z(null),I_=Z(null);let Qh=null,em=null,o8=0;function m$(){Qh&&(clearTimeout(Qh),Qh=null),em&&(clearTimeout(em),em=null)}let bh=!1,Ch=null,L_=!1;function Mde(e,t,n="top",o=!1,s,i){if(!e)return;const r=++o8;m$();const l=()=>mo(null,null,function*(){var a,u;if(yield(function(){return mo(this,null,function*(){if(!bh&&!L_&&typeof document<"u"){Ch!=null||(Ch=mo(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([jo(()=>import("./vue.runtime.esm-bundler-J0WjtLlK.js"),[]),jo(()=>import("./Tooltip-DbYQWF1U.js"),[])]),h=document.createElement("div");h.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(h),c({setup:()=>()=>{var m;return d(f,{visible:e8.value,"anchor-el":Yf.value,content:T_.value,placement:E_.value,id:Xf.value,originX:t8.value,originY:n8.value,isDark:(m=I_.value)!=null?m:void 0})}}).mount(h),bh=!0}));try{yield Ch}catch(c){bh=!1,Ch=null,L_=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),bh&&r===o8){Xf.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Yf.value=e,T_.value=t,E_.value=n,t8.value=(a=s?.x)!=null?a:null,n8.value=(u=s?.y)!=null?u:null,I_.value=typeof i=="boolean"?i:null,e8.value=!0;try{e.setAttribute("aria-describedby",Xf.value)}catch{}}});o?l():Qh=setTimeout(l,80)}function Tde(e=!1){o8+=1,m$();const t=()=>{if(Yf.value&&Xf.value)try{Yf.value.removeAttribute("aria-describedby")}catch{}e8.value=!1,Yf.value=null,Xf.value=null,t8.value=null,n8.value=null};e?t():em=setTimeout(t,120)}const Ede={"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..."},Ide=Symbol("markstreamI18nFallback");function g$(e,t){var n;return(n=t?.[e])!=null?n:Ede[e]}const s8=(e,t)=>{var n;return(n=g$(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 $_(e,t){return{t(n){const o=g$(n,t);if(e.te&&o!=null&&!e.te(n))return s8(n,t);const s=e.t(n);return s===n&&o!=null?s8(n,t):s}}}function Lde(){const e=(function(){var n,o,s;try{const i=ds(),r=Ide,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=ds(),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 $_(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return $_({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>s8(n,e)}}const v$=Symbol("ViewportPriority"),y$=Symbol("ViewportPriorityOptions"),k$=Symbol("OffscreenHeavyNodeDeferral"),$de=R(()=>!1),yc="400px";function h5(){return nn(y$,void 0)}function m5(){return nn(k$,$de)}function Nde(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?Z(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 h=null,m=null;function v(T){if(!T)return"viewport";let A=a.get(T);return A||(A=u++,a.set(T,A)),String(A)}function k(){if(h!=null){try{l?.(h)}catch{}h=null}}function w(T){if(T){const A=c.get(T);if(A&&!A.targets.size){try{A.io.disconnect()}catch{}c.delete(T)}}d.size||f.size||k()}function b(T){const A=d.get(T);if(!A)return;const E=c.get(A.bucketKey);if(!A.visible.value){A.visible.value=!0;try{A.resolve()}catch{}}try{E?.io.unobserve(T)}catch{}E?.targets.delete(T),d.delete(T),f.delete(T),w(A.bucketKey)}function _(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&h==null&&f.size&&(h=r(()=>{h=null;const T=f.values().next().value;T&&(f.delete(T),b(T),f.size&&_())},{timeout:1200}))}function g(T,A){if(!s||typeof IntersectionObserver>"u")return null;const E=(function(H,O){var F,U,z;return{root:(F=e?.(H??null))!=null?F:null,rootMargin:(U=O?.rootMargin)!=null?U:yc,threshold:(z=O?.threshold)!=null?z:0}})(T,A),P=[v((D=E).root),D.rootMargin,D.threshold].join("\0");var D;const I=c.get(P);if(I)return{key:P,bucket:I};let $;try{$=new IntersectionObserver(H=>{for(const O of H)(O.isIntersecting||O.intersectionRatio>0)&&b(O.target)},{root:E.root,rootMargin:E.rootMargin,threshold:E.threshold})}catch{return null}const B={io:$,targets:new Map};return c.set(P,B),{key:P,bucket:B}}function x(){if(s&&i.value)for(const[T,A]of Array.from(d.entries())){const E=g(T,A.opts);if(!E){b(T);continue}if(E.key===A.bucketKey)continue;const P=A.bucketKey,D=c.get(P);try{D?.io.unobserve(T)}catch{}D?.targets.delete(T),A.bucketKey=E.key,E.bucket.targets.set(T,A),E.bucket.io.observe(T),w(P)}}Je(i,T=>{if(!T){for(const A of Array.from(d.keys()))b(A);k()}},{flush:"sync"});const S=(T,A)=>{const E=Z(!1);let P,D=!1;const I=new Promise(O=>{P=()=>{D||(D=!0,O())}}),$=()=>{const O=d.get(T);if(!O)return f.delete(T),void w();const F=c.get(O.bucketKey);try{F?.io.unobserve(T)}catch{}F?.targets.delete(T),d.delete(T),f.delete(T),w(O.bucketKey)};if(!s||!i.value)return E.value=!0,P(),{isVisible:E,whenVisible:I,destroy:$};const B=g(T,A);if(!B)return E.value=!0,P(),{isVisible:E,whenVisible:I,destroy:$};const H={resolve:P,visible:E,bucketKey:B.key,opts:A};return d.set(T,H),B.bucket.targets.set(T,H),B.bucket.io.observe(T),s&&m==null&&(m=window.requestAnimationFrame(()=>{m=null,x()})),A?.allowIdle!==!1&&(f.add(T),_()),{isVisible:E,whenVisible:I,destroy:$}};return S.refresh=x,Ln(v$,S),S}function g5(){var e,t;const n=nn(v$,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:h=>window.setTimeout(()=>h({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:h=>window.clearTimeout(h):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=h=>{if(!h)return;const m=s.get(h);if(m&&!m.targets.size){try{m.io.disconnect()}catch{}s.delete(h)}},d=h=>{const m=o.get(h);if(!m)return;const v=s.get(m.bucketKey);if(!m.visible.value){m.visible.value=!0;try{m.resolve()}catch{}}try{v?.io.unobserve(h)}catch{}o.delete(h),v?.targets.delete(h),i.delete(h),c(m.bucketKey),i.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&i.size&&(r=l(()=>{r=null;const h=i.values().next().value;h&&(i.delete(h),d(h),i.size&&f())},{timeout:1200}))};return(h,m)=>{const v=Z(!1);let k,w=!1;const b=new Promise(x=>{k=()=>{w||(w=!0,x())}}),_=()=>{const x=o.get(h);if(!x)return i.delete(h),void(i.size||u());const S=s.get(x.bucketKey);try{S?.io.unobserve(h)}catch{}o.delete(h),S?.targets.delete(h),i.delete(h),c(x.bucketKey),i.size||u()},g=(x=>{var S,T;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const A=($=>{var B,H;return[(B=$?.rootMargin)!=null?B:yc,(H=$?.threshold)!=null?H:0].join("\0")})(x),E=s.get(A);if(E)return{key:A,bucket:E};const P=(S=x?.rootMargin)!=null?S:yc;let D;try{D=new IntersectionObserver($=>{for(const B of $)(B.isIntersecting||B.intersectionRatio>0)&&d(B.target)},{root:null,rootMargin:P,threshold:(T=x?.threshold)!=null?T:0})}catch{return null}const I={io:D,targets:new Set};return s.set(A,I),{key:A,bucket:I}})(m);return g?(o.set(h,{resolve:k,visible:v,bucketKey:g.key}),g.bucket.targets.add(h),g.bucket.io.observe(h),m?.allowIdle!==!1&&(i.add(h),f()),{isVisible:v,whenVisible:b,destroy:_}):(v.value=!0,k(),{isVisible:v,whenVisible:b,destroy:_})}}function Fde(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 Rde=["data-markstream-viewport-pending"],Ode=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],Pde={key:1,class:"image-placeholder"},Dde={key:1,class:"image-node__raw-text"},Bde={key:2,class:"image-shimmer-overlay"},Hde={key:1,class:"image-node__raw-text"},zde={key:3,class:"image-error"},Va=Gn(et({__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=Z(!1),a=Z(!1),u=Z(""),c=Z("primary"),d=Z(null),f=p1(),h=nn(G3,null),m=g5(),v=h5(),k=m5(),w=R(()=>nw(i.node.src)),b=R(()=>nw(i.fallbackSrc)),_=(s=(o=(n=ds())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),g=typeof window<"u"&&_?.getAttribute("src")===(w.value||b.value),x=Z(typeof window>"u"||g||!k.value),S=Xr(null);let T="",A=null;const E=R(()=>u.value),P=R(()=>!i.lazy),D=R(()=>typeof window<"u"&&k.value&&!g),I=R(()=>!D.value||x.value),$=R(()=>I.value?E.value:""),B=R(()=>{var de,pe;return(pe=(de=v?.value.heavyBlockMargin)!=null?de:v?.value.rootMargin)!=null?pe:yc}),H=R(()=>!i.node.loading&&c.value!=="failed"&&u.value.length>0),O=R(()=>c.value==="failed"),F=R(()=>(!P.value||D.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),U=R(()=>Fde(i,f));function z(de=U.value){de&&d.value&&h?.reportHeight(de,d.value.offsetHeight)}function W(de=U.value){de&&yt(()=>{z(de)})}function K(){A&&(clearTimeout(A),A=null)}function V(){const de=U.value;de&&T!==de&&(T&&h?.markSettled(T),K(),T=de,h?.markPending(de),typeof window<"u"&&(A=window.setTimeout(()=>{T===de&&(W(de),ie())},8e3)))}function ie(){return mo(this,null,function*(){const de=T;de&&(K(),T="",yield yt(),z(de),h?.markSettled(de))})}function ne(){if(c.value==="primary"&&b.value&&b.value!==u.value)return c.value="fallback",u.value=b.value,l.value=!1,a.value=!1,void W();c.value="failed",a.value=!0,r("error",u.value),W()}function X(){l.value=!0,a.value=!1,r("load",E.value),W()}function le(de){de.preventDefault(),l.value&&!a.value&&r("click",[de,E.value])}const{t:Ie}=Lde();return Je([w,b,()=>i.node.loading],()=>(l.value=!1,a.value=!1,i.node.loading||w.value?(u.value=w.value,void(c.value="primary")):b.value?(u.value=b.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Je([d,D],([de,pe],ve,oe)=>{var ye;if((ye=S.value)==null||ye.destroy(),S.value=null,!pe||x.value)return void(x.value=!0);if(!de)return void(x.value=!1);let G=!0;const Y=m(de,{rootMargin:B.value,allowIdle:!1});S.value=Y,x.value=Y.isVisible.value,Y.whenVisible.then(()=>{G&&S.value===Y&&(x.value=!0)}),oe(()=>{G=!1,Y.destroy(),S.value===Y&&(S.value=null)})},{immediate:!0}),Je([H,l,a,E,()=>i.lazy,I],([de,pe,ve,oe,ye,G])=>de&&oe&&!ve&&G?pe?(ie(),void W()):ye?(V(),void W()):void(pe||ve||V()):(ie(),void W()),{flush:"post",immediate:!0}),Vn(()=>{var de;(de=S.value)==null||de.destroy(),S.value=null,(function(){const pe=T;pe&&(K(),T="",h?.markSettled(pe))})()}),(de,pe)=>{var ve,oe,ye,G,Y;return y(),M("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":D.value&&!x.value?"true":void 0},[H.value?(y(),M("img",{key:0,src:$.value||void 0,alt:String((oe=(ve=i.node.alt)!=null?ve:i.node.title)!=null?oe:""),title:String((G=(ye=i.node.title)!=null?ye:i.node.alt)!=null?G:""),class:Re(["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:p(Ie)("image.preview"),onError:ne,onLoad:X,onClick:le},null,42,Ode)):ee("",!0),e.node.loading&&!a.value?(y(),M("span",Pde,[i.usePlaceholder?xn(de.$slots,"placeholder",{key:0,node:i.node,displaySrc:E.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[pe[0]||(pe[0]=C("span",{class:"image-shimmer"},null,-1))],!0):(y(),M("span",Dde,N(e.node.raw),1))])):ee("",!0),F.value&&!e.node.loading?(y(),M("span",Bde,[i.usePlaceholder?xn(de.$slots,"placeholder",{key:0,node:i.node,displaySrc:E.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[pe[1]||(pe[1]=C("span",{class:"image-shimmer"},null,-1))],!0):(y(),M("span",Hde,N(e.node.raw),1))])):ee("",!0),O.value?(y(),M("span",zde,[xn(de.$slots,"error",{node:i.node,displaySrc:E.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[pe[2]||(pe[2]=C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[C("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)),C("span",null,N(p(Ie)("image.loadError")),1)],!0)])):ee("",!0)],8,Rde)}}}),[["__scopeId","data-v-046e82ac"]]);Va.install=e=>{e.component(Va.__name,Va)};const Wde={key:2},El=et({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=fs(()=>t.customId),o=nn("markstreamHtmlPolicy",void 0),s=nn("markstreamNestedRendererProps",void 0),i=R(()=>{var m;return(m=o?.value)!=null?m:"safe"}),r=R(()=>{var m,v;const k=(m=s?.value)!=null?m:{};return rn(mt({},k),{customId:(v=t.customId)!=null?v:k.customId,htmlPolicy:i.value})}),l=zr({loader:()=>Promise.resolve().then(()=>M5),suspensible:!1}),a=R(()=>t.components[String(t.node.type)]),u=R(()=>!!(a.value&&n.value[t.node.type]&&!Qp(String(t.node.type)))),c=R(()=>u.value?p5(t.node,i.value):void 0),d=R(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=R(()=>{var m;return String((m=t.node.content)!=null?m:"")}),h=R(()=>{var m,v;return String((v=(m=t.node.content)!=null?m:t.node.raw)!=null?v:"")});return(m,v)=>a.value&&u.value?(y(),he(bs(a.value),zn({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:me(()=>[d.value?(y(),he(p(l),zn({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?(y(),he(p(l),zn({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"])):ee("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(y(),he(bs(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(y(),M("span",Wde,N(h.value),1)):ee("",!0)}}),N_=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function Ude(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return rn(mt(mt({},N_),n),{enabled:(t=n.enabled)==null||t})}return mt({},N_)}function v5(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 b$(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 F_(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function jde(e){var t;return e.diff===!0||F_(e.language)||F_(b$(String((t=e.raw)!=null?t:"")))}function Vde(e,t,n){const o=(function(s){const i=b$(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 qde=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],Kde={key:0,translate:"no",class:"markstream-pre__diff-code"},Zde={class:"markstream-pre__diff-pane-content"},Gde={class:"markstream-pre__diff-number","aria-hidden":"true"},Yde={class:"markstream-pre__diff-content"},Xde={class:"markstream-pre__diff-content-inner"},Jde={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},Qde=["textContent"],e1e=["textContent"],Pi=et({__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(X,le){const Ie=String(X??"");return le?Ie:Ie.replace(/\r\n$|\n$|\r$/,"")}const o=R(()=>{var X,le,Ie;const de=String((le=(X=t.node)==null?void 0:X.language)!=null?le:"");return String((Ie=String(de).split(/\s+/g)[0])!=null?Ie:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=R(()=>`language-${o.value}`),i=R(()=>{var X;return t.loading===!0||((X=t.node)==null?void 0:X.loading)===!0}),r=R(()=>{var X;return n((X=t.node)==null?void 0:X.code,i.value)});let l="",a=1;const u=R(()=>(function(X){let le=0,Ie=1;X.startsWith(l)&&(le=l.length,Ie=a,le>0&&X[le-1]==="\r"&&X[le]===` +`&&le++);for(let de=le;der.value.split(/\r\n|\n|\r/));let d=0,f="";const h=R(()=>{const X=u.value;X{var X;return t.showLineNumbers===!0&&((X=t.node)==null?void 0:X.diff)===!0}),v=R(()=>m.value&&t.diffInline===!0),k=R(()=>{const X=Number(t.reservedHeightPx);if(!Number.isFinite(X)||X<=0)return;const le=`${Math.ceil(X)}px`;return i.value?{maxHeight:le,overflow:"auto"}:{height:le,minHeight:le,maxHeight:le,overflow:"auto"}}),w=["diff ","index ","--- ","+++ ","@@ "];function b(X){return String(X??"").trim().length===0}function _(X,le="context",Ie={}){const de=b(X);return{code:X,kind:de&&le!=="hunk"&&le!=="spacer"&&!Ie.preserveBlankKind?"context":le,empty:de}}function g(X){const le=n(X,i.value);return le?le.split(/\r\n|\n|\r/):[]}function x(X,le){return!b(X[le])||lew.some(Ie=>le.startsWith(Ie)))}function E(X,le){return le||!X.startsWith(" ")||X.startsWith(" ")?X:` ${X}`}function P(X,le){const Ie=X.length,de=le.length,pe=[];let ve=0;for(;ve=ve&&G>=ve&&X[ye]===le[G];)oe.unshift({originalIndex:ye,modifiedIndex:G}),ye--,G--;const Y=ye-ve+1,fe=G-ve+1;if(Y<=0||fe<=0||i.value||(Y+1)*(fe+1)>15e5)return pe.concat(oe);const we=fe+1,ge=new Uint32Array((Y+1)*(fe+1));for(let ue=Y-1;ue>=0;ue--)for(let Se=fe-1;Se>=0;Se--){const ze=ue*we+Se;if(X[ve+ue]===le[ve+Se])ge[ze]=ge[(ue+1)*we+Se+1]+1;else{const _e=ge[(ue+1)*we+Se],Ee=ge[ue*we+Se+1];ge[ze]=_e>=Ee?_e:Ee}}const Q=[];let te=0,ce=0;for(;te=ge[te*we+ce+1]?te++:ce++;return pe.concat(Q,oe)}function D(X){var le;const Ie=(function(){var G,Y;const fe=t.diffHideUnchangedRegions;if(fe==null||fe===!1)return null;const we=fe===!0?{}:fe;return we.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((G=we.contextLineCount)!=null?G:2)),minimumLineCount:Math.max(1,Math.floor((Y=we.minimumLineCount)!=null?Y:4))}})();if(!Ie||X.length<1||X.length>2||X.length===2&&X[0].lines.length!==X[1].lines.length)return X;const de=X[0].lines,pe=(le=X[1])==null?void 0:le.lines,ve=G=>de[G].kind==="context"&&(pe===void 0||pe[G].kind==="context"&&de[G].code===pe[G].code),oe=[];let ye=0;for(;ye=Ie.minimumLineCount){const fe=G+(G===0?0:Ie.contextLineCount),we=Y-(Y===de.length?0:Ie.contextLineCount);we-fe>=Ie.minimumLineCount&&oe.push({start:fe,end:we})}ye===G&&ye++}return oe.length?X.map((G,Y)=>{const fe=[];let we=0;for(const ge of oe)fe.push(...G.lines.slice(we,ge.start)),fe.push({code:Y===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${G.key}-collapsed-${ge.start}-${ge.end}`,number:""}),we=ge.end;return fe.push(...G.lines.slice(we)),rn(mt({},G),{lines:fe})}):X}const I=R(()=>{var X,le,Ie,de;if(!m.value)return[];const pe=(function(Y){const fe=Y.some(ge=>S(ge)),we=Y.some(ge=>T(ge));return fe&&we||(function(){var ge,Q,te,ce;if(o.value==="diff")return!0;const ue=(ce=(te=String((Q=(ge=t.node)==null?void 0:ge.raw)!=null?Q:"").split(/\r?\n/,1)[0])==null?void 0:te.trim())!=null?ce:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(ue)})()&&(fe||we)})(c.value),ve=(function(){var Y,fe;return((Y=t.node)==null?void 0:Y.originalCode)!=null||((fe=t.node)==null?void 0:fe.updatedCode)!=null})();if(v.value){const Y=ve?(function(fe,we){const ge=g(fe),Q=g(we),te=P(ge,Q);if(te.length>0){const Ee=[];let it=0,Fe=0;for(const Oe of te){for(;it=ue&&ze>=ue&&ge[Se]===Q[ze];)_e.unshift(rn(mt({},_(Q[ze])),{key:`inline-suffix-${ze}`,number:ze+1})),Se--,ze--;for(let Ee=ue;Ee<=Se;Ee++)ce.push(rn(mt({},_(ge[Ee],"removed",{preserveBlankKind:x(ge,Ee)})),{key:`inline-removed-source-${Ee}`,number:Ee+1}));for(let Ee=ue;Ee<=ze;Ee++)ce.push(rn(mt({},_(Q[Ee],"added",{preserveBlankKind:x(Q,Ee)})),{key:`inline-added-source-${Ee}`,number:Ee+1}));return ce.concat(_e)})((X=t.node)==null?void 0:X.originalCode,(le=t.node)==null?void 0:le.updatedCode):(function(fe){const we=[];let ge=1,Q=1;const te=A(fe);for(const[ce,ue]of fe.entries())if(ue.startsWith("@@")){const Se=ue.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);Se&&(ge=Number(Se[1]),Q=Number(Se[2])),we.push(rn(mt({},_(ue,"hunk")),{key:`inline-hunk-${ce}`,number:""}))}else if(S(ue))we.push(rn(mt({},_(E(ue.slice(1),te),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${ce}`,number:ge++}));else if(T(ue))we.push(rn(mt({},_(E(ue.slice(1),te),"added",{preserveBlankKind:!0})),{key:`inline-added-${ce}`,number:Q++}));else{const Se=te&&ue.startsWith(" ")?ue.slice(1):ue;we.push(rn(mt({},_(Se)),{key:`inline-context-${ce}`,number:Q})),ge++,Q++}return we})(c.value);return D([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Y}])}if(!pe&&ve)return(function(Y,fe){const we=g(Y),ge=g(fe),Q=P(we,ge),te=[],ce=[];let ue=0,Se=0,ze=0;const _e=(Ee,it)=>{const Fe=Math.max(Ee-ue,it-Se);for(let Oe=0;Oern(mt({},Y),{key:`original-${fe}`,number:fe+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:ye.map((Y,fe)=>rn(mt({},Y),{key:`modified-${fe}`,number:fe+1}))}])}),$=R(()=>I.value.some(X=>X.lines.some(le=>le.kind==="collapsed"))),B=R(()=>{const X=o.value;return X?`Code block: ${X}`:"Code block"}),H=Z(null),O=Z([]);let F=null,U=!1,z=null;function W(X){const le=Number.parseFloat(String(X??""));return Number.isFinite(le)&&le>0?le:0}function K(X,le){var Ie;if(!X)return le;if(X.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const de=X.querySelector(".markstream-pre__diff-content"),pe=de?.getBoundingClientRect(),ve=(Ie=pe?.height)!=null?Ie:0;return Math.max(le,Math.ceil(ve))}function V(){U||typeof window>"u"||(F!=null&&window.cancelAnimationFrame(F),F=window.requestAnimationFrame(()=>{F=null,U||(function(){var X,le;F=null;const Ie=H.value;if(!Ie||!m.value||v.value||!Ie.classList.contains("is-wrap"))return void(O.value.length&&(O.value=[]));const de=(function(fe){const we=window.getComputedStyle(fe),ge=W(we.getPropertyValue("--markstream-pre-diff-line-height"));if(ge>0)return ge;const Q=W(we.lineHeight);return Q>0?Q:18})(Ie),pe=Array.from(Ie.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),ve=Array.from(Ie.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),oe=Math.max(pe.length,ve.length),ye=[];for(let fe=0;fe{const ge=Y[we];return ge&&Math.abs(fe.rowHeight-ge.rowHeight)<=.5&&Math.abs(fe.originalHeight-ge.originalHeight)<=.5&&Math.abs(fe.modifiedHeight-ge.modifiedHeight)<=.5})||(O.value=ye)})()}))}function ie(X){z?.disconnect(),z=null,X&&m.value&&!v.value&&typeof ResizeObserver<"u"&&(z=new ResizeObserver(()=>{V()}),z.observe(X))}function ne(X,le){const Ie=O.value[X];if(!Ie)return;const de=le==="original"?Ie.originalHeight:Ie.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(Ie.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(de)}px`}}return Je(H,X=>{ie(X),yt(()=>V())},{flush:"post"}),Je([m,v,I],()=>{ie(H.value),yt(()=>V())},{flush:"post",immediate:!0}),Vn(()=>{U=!0,F!=null&&(window.cancelAnimationFrame(F),F=null),z?.disconnect(),z=null}),(X,le)=>(y(),M("pre",{ref_key:"preRef",ref:H,style:Zt(k.value),class:Re([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":m.value,"markstream-pre--diff-inline":v.value,"markstream-pre--diff-collapsed":$.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"},[m.value?(y(),M("code",Kde,[(y(!0),M(Pe,null,pt(I.value,Ie=>(y(),M("span",{key:Ie.key,class:Re(["markstream-pre__diff-pane",Ie.className])},[C("span",Zde,[(y(!0),M(Pe,null,pt(Ie.lines,(de,pe)=>(y(),M("span",{key:de.key,class:Re(["markstream-pre__diff-line",[`markstream-pre__diff-line--${de.kind}`,{"markstream-pre__diff-line--empty":de.empty}]]),style:Zt(ne(pe,Ie.key))},[le[0]||(le[0]=C("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),C("span",Gde,N(de.number),1),C("span",Yde,[C("span",Xde,N(de.code),1)])],6))),128))])],2))),128))])):(y(),M(Pe,{key:1},[t.showLineNumbers?(y(),M("span",Jde,[C("span",{class:"markstream-pre__line-numbers-text",textContent:N(h.value)},null,8,Qde)])):ee("",!0),C("code",{translate:"no",class:"markstream-pre__code",textContent:N(r.value)},null,8,e1e)],64))],14,qde))}});Pi.install=e=>{e.component(Pi.__name,Pi)};const t1e={key:0},qo=Gn(et({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=p1(),o=nn("markstreamFade",void 0),s=nn("markstreamTextStreamState",void 0),i=nn("markstreamStreamVersion",void 0),r=R(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),l=R(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=R(()=>{var k;const w=(k=n["index-key"])!=null?k:n.indexKey;return w==null||w===""?"":String(w)}),u=Z(t.node.content),c=Z(""),d=Z(0);let f;function h(){f?.(),f=void 0}function m(){h(),c.value&&(u.value=u.value+c.value,c.value="")}Je([()=>t.node.content,a,l],([k])=>{const w=String(k??""),b=a.value,_=t$({nextContent:w,persistedContent:b?s?.get(b):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=_.settledContent,c.value=_.streamedDelta,_.appended?(d.value+=1,(function(){if(!c.value||f||!i)return;const g=i.value;f=Je(()=>i.value,x=>{x!==g&&m()},{flush:"sync"})})()):c.value||h(),b&&s?.set(b,w)},{immediate:!0}),d1(h);const v=R(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(k,w)=>(y(),M("span",{class:Re([[e.node.center?"text-node-center":""],"text-node"])},[u.value?(y(),M("span",t1e,N(u.value),1)):ee("",!0),c.value?(y(),M("span",{key:1,class:Re(["text-node-stream-delta",[v.value]]),onAnimationend:m},N(c.value),35)):ee("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function Af(e,t,n){return et({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var r,l;const a=g5(),u=h5(),c=m5(),d=typeof window<"u"&&((l=(r=ds())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=Z(typeof window>"u"||d||!c.value),h=Xr(null);let m=null;function v(k){const w=k&&"$el"in k?k.$el:k;h.value=w instanceof HTMLElement?w:null}return typeof window<"u"&&Je([h,c],([k,w],b,_)=>{if(m?.destroy(),m=null,!w||f.value)return void(f.value=!0);if(!k)return;let g=!0;const x=a(k,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});m=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{g&&m===x&&(f.value=!0)}),_(()=>{g=!1,x.destroy(),m===x&&(m=null)})},{immediate:!0}),Vn(()=>{m?.destroy(),m=null}),()=>tn(f.value?t:n,rn(mt({},s),{ref:v}),i)}})}qo.install=e=>{e.component(qo.__name,qo)};const dg=et({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=T2(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=p_[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):p_[""]),f=jde(n.node),h=Vde(String((r=(i=n.node)==null?void 0:i.raw)!=null?r:""),d,f),m=n.monacoOptions,v=f&&((l=n.estimatedDiffInline)!=null?l:v5(m??{},typeof window>"u"?0:window.innerWidth)),k=m?.diffAppearance,w=k==="dark"||k!=="light"&&n.isDark===!0,b=typeof m?.fontSize=="number"&&Number.isFinite(m.fontSize)&&m.fontSize>0?m.fontSize:12,_=typeof m?.lineHeight=="number"&&Number.isFinite(m.lineHeight)&&m.lineHeight>0?m.lineHeight:b===12?18:Math.max(12,Math.round(1.5*b)),g=typeof m?.tabSize=="number"&&Number.isFinite(m.tabSize)&&m.tabSize>0?m.tabSize:4,x=f?0:8,S=typeof((a=m?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(m.padding.top)&&m.padding.top>=0?m.padding.top:x,T=typeof((u=m?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(m.padding.bottom)&&m.padding.bottom>=0?m.padding.bottom:x,A=typeof m?.fontFamily=="string"?m.fontFamily.trim():"",E=mt(mt({fontSize:`${b}px`,lineHeight:`${_}px`,tabSize:g,paddingTop:`${S}px`,paddingBottom:`${T}px`,"--markstream-pre-line-number-top":`${S}px`},f?{"--markstream-pre-diff-line-height":`${_}px`}:{}),A?{"--markstream-code-font-family":A}:{}),P=()=>tn("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"},[tn("svg",{class:"action-icon"})]),D=n.isShowPreview!==!1&&(c==="html"||c==="svg"),I=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||D&&n.showPreviewButton!==!1,$=H=>{if(H!=null)return typeof H=="number"?`${H}px`:String(H)},B=mt(mt(mt({"--markstream-code-layout-character-width":"1ch"},$(n.minWidth)?{minWidth:$(n.minWidth)}:{}),$(n.maxWidth)?{maxWidth:$(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 tn("div",rn(mt({},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:tn("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)]"},[tn("div",{class:"code-header-main"},[tn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),tn("div",{class:"code-header-copy"},[tn("div",{class:"code-header-title"},h.title),h.caption?tn("div",{class:"code-header-caption"},h.caption):null])]),tn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?tn("div",{class:"code-diff-stats","aria-hidden":"true"},[tn("span",{class:"code-diff-stat removed"},"-0"),tn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:P(),n.showCollapseButton===!1?null:P(),I?tn("div",{class:"relative"},[P()]):null])]),tn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[tn(Pi,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:v,diffHideUnchangedRegions:f?Ude(m?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:E,"data-markstream-code-loading":"1"})]),tn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[tn("div",{class:"loading-skeleton"},[tn("div",{class:"skeleton-line"}),tn("div",{class:"skeleton-line"}),tn("div",{class:"skeleton-line short"})])]),tn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),X9=Af("ViewportDeferredCodeBlockNode",zr({loader:()=>mo(null,null,function*(){try{return(yield jo(()=>import("./CodeBlockNode-BAtAs_qm.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),Pi}}),loadingComponent:dg,delay:0,suspensible:!1}),dg),Jr=zr(()=>mo(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 tn(qo,rn(mt({},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 r$(),(yield jo(()=>import("./index7-BT2SBznQ.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 tn(qo,rn(mt({},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:""}$`}}))}})),C$=zr(()=>mo(null,null,function*(){try{return yield r$(),(yield jo(()=>import("./index6-D4fZsFMu.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 tn(qo,rn(mt({},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:""}$$`}}))}})),xi=Gn(et({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(y(),M("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"]]);xi.install=e=>{e.component(xi.__name,xi)};const n1e={class:"superscript-node"},Wi=Gn(et({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:qo,inline_code:li,link:Mi,html_inline:sr,strong:Si,emphasis:Ti,footnote_reference:or,strikethrough:Ai,highlight:ir,insert:ji,subscript:Ui,emoji:zi,math_inline:Jr,reference:xi},n.value));return(s,i)=>(y(),M("sup",n1e,[(y(!0),M(Pe,null,pt(e.node.children,(r,l)=>(y(),he(p(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"]]);Wi.install=e=>{e.component(Wi.__name,Wi)};const o1e={class:"subscript-node"},Ui=Gn(et({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:qo,inline_code:li,link:Mi,html_inline:sr,strong:Si,emphasis:Ti,footnote_reference:or,strikethrough:Ai,highlight:ir,insert:ji,superscript:Wi,emoji:zi,math_inline:Jr,reference:xi},n.value));return(s,i)=>(y(),M("sub",o1e,[(y(!0),M(Pe,null,pt(e.node.children,(r,l)=>(y(),he(p(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"]]);Ui.install=e=>{e.component(Ui.__name,Ui)};const s1e={class:"strong-node"},Si=Gn(et({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:qo,inline_code:li,link:Mi,html_inline:sr,emphasis:Ti,strikethrough:Ai,highlight:ir,insert:ji,subscript:Ui,superscript:Wi,emoji:zi,footnote_reference:or,math_inline:Jr,reference:xi},n.value));return(s,i)=>(y(),M("strong",s1e,[(y(!0),M(Pe,null,pt(e.node.children,(r,l)=>(y(),he(p(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"]]);Si.install=e=>{e.component(Si.__name,Si)};const i1e={class:"strikethrough-node"},Ai=Gn(et({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:qo,inline_code:li,link:Mi,html_inline:sr,strong:Si,emphasis:Ti,highlight:ir,insert:ji,subscript:Ui,superscript:Wi,emoji:zi,footnote_reference:or,math_inline:Jr,reference:xi},n.value));return(s,i)=>(y(),M("del",i1e,[(y(!0),M(Pe,null,pt(e.node.children,(r,l)=>(y(),he(p(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"]]);Ai.install=e=>{e.component(Ai.__name,Ai)};const r1e=["href","title","aria-label","aria-hidden","target","rel"],l1e=["aria-hidden"],a1e={class:"link-text-wrapper relative inline-flex"},u1e={class:"leading-[normal] link-text"},Mi=Gn(et({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=nn("markstreamShowTooltips",void 0),o=R(()=>{const w=n?.value;return typeof w=="boolean"?w:t.showTooltip}),s=R(()=>{var w,b,_,g,x;const S=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",T=(w=t.animationOpacity)!=null?w:.35,A=Math.max(.12,Math.min(.5*T,T)),E={"--underline-height":`${(b=t.underlineHeight)!=null?b:2}px`,"--underline-bottom":S,"--underline-opacity":String(T),"--underline-rest-opacity":String(A),"--underline-duration":`${(_=t.animationDuration)!=null?_:1.6}s`,"--underline-timing":(g=t.animationTiming)!=null?g:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(E["--link-color"]=t.color),E}),i=fs(()=>t.customId),r=R(()=>mt({text:qo,strong:Si,strikethrough:Ai,emphasis:Ti,image:Va,html_inline:sr,inline_code:li},i.value)),l=p1(),a=R(()=>{var w,b;const _=(w=t.node)==null?void 0:w.attrs;if(!_||typeof _!="object")return{};const g={};if(Array.isArray(_))for(const x of _)Array.isArray(x)&&x[0]&&(g[String(x[0])]=String((b=x[1])!=null?b:""));else for(const[x,S]of Object.entries(_))x&&S!=null&&S!==!1&&(g[x]=S===!0?"":String(S));return A_(g,"safe","a")}),u=R(()=>mt(mt({},l),a.value)),c=R(()=>{var w,b;return A_({href:String((b=(w=t.node)==null?void 0:w.href)!=null?b:"")},"safe","a").href}),d=R(()=>{if(!c.value)return;const w=u.value.target;return(typeof w=="string"?w.trim():String(w??"").trim())||(sie(c.value)?"_blank":void 0)}),f=R(()=>{var w;return String((w=d.value)!=null?w:"").trim().toLowerCase()==="_blank"}),h=R(()=>{if(!c.value)return;const w=u.value.rel,b=new Set((typeof w=="string"?w:String(w??"")).split(/\s+/).filter(Boolean)),_=new Set(Array.from(b).filter(g=>g.toLowerCase()!=="opener"));return f.value&&(_.add("noopener"),_.add("noreferrer")),_.size>0?Array.from(_).join(" "):void 0}),m=R(()=>{const w=mt({},u.value);return delete w.title,delete w.href,delete w.target,delete w.rel,w});function v(){o.value&&Tde()}const k=R(()=>{var w,b;const _=(w=t.node)==null?void 0:w.title;return typeof _=="string"&&_.trim().length>0?_:String((b=c.value)!=null?b:"")});return(w,b)=>{var _,g;return e.node.loading?(y(),M("span",zn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},p(l),{style:s.value}),[C("span",a1e,[C("span",u1e,[j(p(qo),{class:"leading-[normal] link-text",node:{type:"text",content:String((_=e.node.text)!=null?_:""),raw:String((g=e.node.text)!=null?g:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),b[1]||(b[1]=C("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,l1e)):(y(),M("a",zn({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:h.value},m.value,{style:s.value,onMouseenter:b[0]||(b[0]=x=>(function(S){var T,A,E,P;if(!o.value)return;const D=S,I=D?.clientX!=null&&D?.clientY!=null?{x:D.clientX,y:D.clientY}:void 0,$=((T=t.node)==null?void 0:T.title)||((A=c.value)!=null&&A.includes("xn--")&&((P=(E=t.node)==null?void 0:E.text)!=null&&P.includes("://"))?t.node.text:c.value)||"";Mde(S.currentTarget,$,"top",!1,I)})(x)),onMouseleave:v}),[(y(!0),M(Pe,null,pt(e.node.children,(x,S)=>(y(),he(p(El),{key:`${e.indexKey||"emphasis"}-${S}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${S}`},null,8,["components","node","custom-id","index-key"]))),128))],16,r1e))}}}),[["__scopeId","data-v-367e6ca4"]]);Mi.install=e=>{e.component(Mi.__name,Mi)};const c1e={class:"insert-node"},ji=Gn(et({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:qo,inline_code:li,link:Mi,html_inline:sr,strong:Si,emphasis:Ti,strikethrough:Ai,highlight:ir,subscript:Ui,superscript:Wi,emoji:zi,footnote_reference:or,math_inline:Jr,reference:xi},n.value));return(s,i)=>(y(),M("ins",c1e,[(y(!0),M(Pe,null,pt(e.node.children,(r,l)=>(y(),he(p(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"]]);ji.install=e=>{e.component(ji.__name,ji)};const d1e={class:"highlight-node"},ir=Gn(et({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:qo,inline_code:li,link:Mi,html_inline:sr,strong:Si,emphasis:Ti,strikethrough:Ai,insert:ji,subscript:Ui,superscript:Wi,emoji:zi,footnote_reference:or,math_inline:Jr,reference:xi},n.value));return(s,i)=>(y(),M("mark",d1e,[(y(!0),M(Pe,null,pt(e.node.children,(r,l)=>(y(),he(p(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"]]);ir.install=e=>{e.component(ir.__name,ir)};const f1e={class:"emphasis-node"},Ti=Gn(et({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:qo,inline_code:li,link:Mi,html_inline:sr,strong:Si,strikethrough:Ai,highlight:ir,insert:ji,subscript:Ui,superscript:Wi,emoji:zi,footnote_reference:or,math_inline:Jr,reference:xi},n.value));return(s,i)=>(y(),M("em",f1e,[(y(!0),M(Pe,null,pt(e.node.children,(r,l)=>(y(),he(p(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"]]);Ti.install=e=>{e.component(Ti.__name,Ti)};const p1e={class:"hard-break"},qa=Gn(et({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(y(),M("br",p1e))}),[["__scopeId","data-v-50c58f70"]]);qa.install=e=>{e.component(qa.__name,qa)};const $p=et({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=kt({checkbox:nr,checkbox_input:nr,emoji:zi,emphasis:Ti,hardbreak:qa,highlight:ir,inline_code:li,insert:ji,link:Mi,reference:xi,strikethrough:Ai,strong:Si,subscript:Ui,superscript:Wi,text:qo}),o=fs(()=>t.customId),s=R(()=>{const i=o.value;return Object.keys(i).length>0?mt(mt({},n),i):n});return(i,r)=>(y(!0),M(Pe,null,pt(e.nodes,(l,a)=>(y(),he(p(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 i8(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(i8)}function fg(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(i8))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(i8)?s:null}function kc(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 h1e=["cite"],m1e={key:0,dir:"auto",class:"paragraph-node"},g1e=["custom-id"],tm=Gn(et({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>!!n.value.paragraph),s=R(()=>!!n.value.text),i=R(()=>fg(t.node.children,!o.value)),r=R(()=>t.fade!==!1||s.value?null:kc(i.value));return Ln("markstreamShowTooltips",R(()=>t.showTooltips)),Ln("markstreamFade",R(()=>t.fade)),(l,a)=>(y(),M("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(y(),M("p",m1e,[r.value!==null?(y(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(r.value),9,g1e)):(y(),he(p($p),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(y(),he(p(Vi),{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,h1e))}}),[["__scopeId","data-v-abfecebc"]]);tm.install=e=>{e.component(tm.__name,tm)};const v1e={class:"definition-list"},y1e={class:"definition-term"},k1e={class:"definition-desc"},nm=Gn(et({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(y(),M("dl",v1e,[(y(!0),M(Pe,null,pt(t.node.items,(s,i)=>(y(),M(Pe,{key:i},[C("dt",y1e,[j(p(Vi),{"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"])]),C("dd",k1e,[j(p(Vi),{"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"]]);nm.install=e=>{e.component(nm.__name,nm)};const b1e=["href","title"],Jf=Gn(et({__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)=>(y(),M("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,b1e))}}),[["__scopeId","data-v-e1eb37b6"]]);Jf.install=e=>{e.component(Jf.__name,Jf)};const C1e=["id"],w1e={class:"flex-1"},om=et({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(y(),M("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[C("div",w1e,[j(p(Vi),{"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,C1e))}});om.install=e=>{e.component(om.__name,om)};const _1e=["custom-id"],r8=Gn(et({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=nn("markstreamFade",void 0),s=R(()=>o?.value!==!1||n.value.text?null:kc(t.node.children)),i=R(()=>mt({text:qo,inline_code:li,link:Mi,image:Va,strong:Si,emphasis:Ti,strikethrough:Ai,highlight:ir,insert:ji,subscript:Ui,superscript:Wi,emoji:zi,checkbox:nr,checkbox_input:nr,footnote_reference:or,hardbreak:qa,math_inline:Jr,reference:xi},n.value));return(r,l)=>(y(),he(bs(`h${e.node.level}`),zn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:me(()=>[s.value!==null?(y(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(s.value),9,_1e)):(y(!0),M(Pe,{key:1},pt(e.node.children,(a,u)=>(y(),he(p(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"]]),L2=r8;L2.install=e=>{e.component(r8.__name,r8)};const x1e={key:0,dir:"auto",class:"paragraph-node"},S1e=["custom-id"],A1e={dir:"auto",class:"paragraph-node"},M1e=["custom-id"],Vd=Gn(et({__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=R(()=>{var h;return(h=t.node)!=null?h:t.item}),o=fs(()=>t.customId),s=R(()=>!!o.value.paragraph),i=R(()=>!!o.value.text),r=R(()=>{var h;return fg((h=n.value)==null?void 0:h.children,!s.value)}),l=R(()=>{var h;if(s.value)return null;const m=(h=n.value)==null?void 0:h.children;if(!Array.isArray(m)||m.length<2)return null;const v=m[0];if(v?.type!=="paragraph"||!Array.isArray(v.children))return null;const k=m.slice(1);if(!k.every(b=>b?.type==="list"))return null;const w=fg([v]);return w?{paragraphChildren:w,nestedLists:k}:null});function a(){return t.fade===!1&&!i.value}const u=R(()=>a()?kc(r.value):null),c=R(()=>{var h;return a()?kc((h=l.value)==null?void 0:h.paragraphChildren):null}),d=Object.freeze({}),f=R(()=>{const{value:h}=t;return typeof h=="number"&&Number.isFinite(h)?{value:h}:d});return Ln("markstreamShowTooltips",R(()=>t.showTooltips)),Ln("markstreamFade",R(()=>t.fade)),(h,m)=>{var v,k;return y(),M("li",zn({class:"list-item",dir:"auto"},f.value),[r.value?(y(),M("p",x1e,[u.value!==null?(y(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(u.value),9,S1e)):(y(),he(p($p),{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?(y(),M(Pe,{key:1},[C("p",A1e,[c.value!==null?(y(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(c.value),9,M1e)):(y(),he(p($p),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(y(!0),M(Pe,null,pt(l.value.nestedLists,(w,b)=>(y(),he(p(Vi),{key:b,nodes:[w],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${b}`,"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:m[0]||(m[0]=_=>h.$emit("copy",_))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(y(),he(p(Vi),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(k=(v=n.value)==null?void 0:v.children)!=null?k:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:m[1]||(m[1]=w=>h.$emit("copy",w))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);Vd.install=e=>{e.component(Vd.__name,Vd)};const qd=Gn(et({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=fs(()=>e.customId),n=R(()=>t.value.list_item||Vd);return(o,s)=>(y(),he(bs(e.node.ordered?"ol":"ul"),{class:Re(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:me(()=>[(y(!0),M(Pe,null,pt(e.node.items,(i,r)=>{var l;return y(),he(bs(n.value),zn({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"]]);qd.install=e=>{e.component(qd.__name,qd)};const T1e={key:2,class:"html-block-node__raw"},E1e=["innerHTML"],I1e={key:1,class:"html-block-node__placeholder"},Qf=Gn(et({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=nn("markstreamHtmlPolicy",void 0),o=nn("markstreamNestedRendererProps",void 0),s=R(()=>{var I,$;return($=(I=t.htmlPolicy)!=null?I:n?.value)!=null?$:"safe"}),i=R(()=>{var I,$;const B=(I=o?.value)!=null?I:{};return rn(mt({},B),{customId:($=t.customId)!=null?$:B.customId,htmlPolicy:s.value})}),r=zr({loader:()=>Promise.resolve().then(()=>M5),suspensible:!1}),l=R(()=>{const I=Xh(t.node.attrs,s.value);if(!I)return;const $=Zf(I);return Object.keys($).length>0?$:void 0}),a=R(()=>{const I=String(t.node.tag||"").trim(),$=Xh(t.node.attrs,s.value,I);if(!$)return;const B=Zf($);return Object.keys(B).length>0?B:void 0}),u=fs(()=>t.customId),c=et({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=Z(null),f=Z(typeof window>"u"),h=Z(t.node.content),m=R(()=>Array.isArray(t.node.children)?t.node.children:[]),v=R(()=>String(t.node.tag||"div")),k=R(()=>{var I;if(v.value.trim().toLowerCase()!=="details"||(I=t.node.attrs)!=null&&I.some(([B])=>String(B).toLowerCase()==="open"))return null;const $=m.value[0];return $?.type==="html_block"&&String($.tag||"").toLowerCase()==="summary"?$:null}),w=R(()=>{var I;return kc((I=k.value)==null?void 0:I.children)}),b=R(()=>{const I=k.value;if(!I)return;const $=Xh(I.attrs,s.value,"summary");if(!$)return;const B=Zf($);return Object.keys(B).length>0?B:void 0}),_=R(()=>w.value==null?m.value:m.value.slice(1)),g=R(()=>{const I=v.value.trim().toLowerCase();return UI.has(I)||a5(I,s.value)}),x=R(()=>m.value.length>0&&!!t.node.tag&&!g.value),S=R(()=>{var I,$,B;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(I=h.value)!=null?I:""};const H=($=h.value)!=null?$:t.node.content;if(!H)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:jd(H,s.value)};if(t.node.loading){const F=cg(H,u.value,s.value);return F===null?{mode:"text",content:(B=t.node.raw)!=null?B:H}:{mode:"dynamic",nodes:F}}if(!h$(H,u.value))return{mode:"html",content:jd(H,s.value)};const O=cg(H,u.value,s.value);return O===null?{mode:"html",content:jd(H,s.value)}:{mode:"dynamic",nodes:O}}),T=g5(),A=h5(),E=m5(),P=Xr(null),D=!!t.node.loading;return typeof window<"u"?(Je([()=>d.value,()=>A?.value.heavyBlockMargin,()=>A?.value.rootMargin],([I],$,B)=>{var H,O,F,U;if((O=(H=P.value)==null?void 0:H.destroy)==null||O.call(H),P.value=null,!D)return f.value=!0,void(h.value=t.node.content);if(!I)return void(f.value=!1);let z=!0;const W=(U=(F=A?.value.heavyBlockMargin)!=null?F:A?.value.rootMargin)!=null?U:yc,K=T(I,{rootMargin:W,allowIdle:!E.value});P.value=K,f.value=f.value||K.isVisible.value,K.whenVisible.then(()=>{z&&P.value===K&&(f.value=!0)}),B(()=>{z=!1,K.destroy(),P.value===K&&(P.value=null)})},{immediate:!0}),Je(()=>t.node.content,I=>{D&&!f.value||(h.value=I)})):f.value=!0,Vn(()=>{var I,$;($=(I=P.value)==null?void 0:I.destroy)==null||$.call(I),P.value=null}),(I,$)=>(y(),he(bs(x.value?v.value:"div"),zn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":p(E)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:me(()=>[f.value?(y(),M(Pe,{key:0},[S.value.mode==="structured"?(y(),M(Pe,{key:0},[w.value!==null?(y(),M(Pe,{key:0},[C("summary",xR(OA(b.value)),N(w.value),17),_.value.length?(y(),he(p(r),zn({key:0},i.value,{nodes:_.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):ee("",!0)],64)):(y(),he(p(r),zn({key:1},i.value,{nodes:m.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):S.value.mode==="dynamic"?(y(),he(p(c),{key:1,nodes:S.value.nodes},null,8,["nodes"])):S.value.mode==="text"?(y(),M("pre",T1e,N(S.value.content),1)):(y(),M("div",zn({key:3},l.value,{innerHTML:S.value.content}),null,16,E1e))],64)):(y(),M("div",I1e,[xn(I.$slots,"placeholder",{node:e.node},()=>[$[0]||($[0]=C("span",{class:"html-block-node__placeholder-bar"},null,-1)),$[1]||($[1]=C("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),$[2]||($[2]=C("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);Qf.install=e=>{e.component(Qf.__name,Qf)};const L1e={dir:"auto",class:"paragraph-node"},$1e=["custom-id"],cc=Gn(et({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=fs(()=>t.customId),o=nn("markstreamHtmlPolicy",void 0),s=nn("markstreamFade",void 0),i=nn("markstreamParseOptions",void 0),r=nn("markstreamCustomMarkdownIt",void 0),l=nn("markstreamNestedRendererProps",void 0),a=R(()=>{var A;return(A=o?.value)!=null?A:"safe"}),u=R(()=>{var A;return(A=t.parseOptions)!=null?A:i?.value}),c=R(()=>{var A;return(A=t.customMarkdownIt)!=null?A:r?.value}),d=R(()=>{var A,E;return(E=t.customHtmlTags)!=null?E:(A=l?.value)==null?void 0:A.customHtmlTags}),f=R(()=>{var A,E;const P=(A=l?.value)!=null?A:{};return rn(mt({},P),{customId:(E=t.customId)!=null?E:P.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),h=zr({loader:()=>Promise.resolve().then(()=>M5),suspensible:!1});function m(A){var E;return A.type==="text"&&String((E=A.content)!=null?E:"").trim()===""}const v=R(()=>t.node.children.filter(A=>!m(A))),k=R(()=>v.value.length>0&&v.value.every(A=>A.type==="image"||(function(E){var P;const D=(function(I){return I.type==="link"&&Array.isArray(I.children)?I.children.filter($=>!m($)):[]})(E);return D.length===1&&((P=D[0])==null?void 0:P.type)==="image"})(A))),w=R(()=>new Set(Ec(d.value))),b=R(()=>{if(!k.value||v.value.length<=1)return t.node.children;const A=[];for(let E=0;E0,I=t.node.children.slice(E+1).some($=>!m($));D&&I&&A.push(rn(mt({},P),{content:" ",raw:" "}))}return A}),_=R(()=>s?.value===!1&&!n.value.text),g=R(()=>_.value?kc(b.value):null);function x(A,E){return{node:A,"index-key":`${t.indexKey}-${E}`,"custom-id":t.customId,"custom-html-tags":d.value}}const S=R(()=>mt({inline_code:li,image:Va,link:Mi,hardbreak:qa,emphasis:Ti,strong:Si,strikethrough:Ai,highlight:ir,insert:ji,subscript:Ui,superscript:Wi,html_inline:sr,html_block:Qf,emoji:zi,checkbox:nr,math_inline:Jr,checkbox_input:nr,reference:xi,footnote_anchor:Jf,footnote_reference:or,text:qo},n.value)),T=R(()=>b.value.map((A,E)=>{var P;const D=(function(I){var $,B,H,O;if(I.type==="html_block"||I.type==="html_inline"){const F=String(($=I.tag)!=null?$:"").trim().toLowerCase()||ZI(I.content);if(F&&!w.value.has(F)&&GI((B=I.content)!=null?B:I.raw,F)){const U=String((O=(H=I.content)!=null?H:I.raw)!=null?O:"");return{child:{type:"text",content:U,raw:U},component:qo,isCustomComponent:!1}}}return{child:I,component:S.value[I.type],isCustomComponent:!!(n.value[I.type]&&!Qp(String(I.type)))}})(A);return rn(mt({},D),{index:E,key:`${t.indexKey||"paragraph"}-${E}`,customAttrs:D.isCustomComponent?p5(D.child,a.value):void 0,hasSlotChildren:Array.isArray(D.child.children)&&D.child.children.length>0,slotContent:String((P=D.child.content)!=null?P:""),originalChild:A})}));return(A,E)=>(y(),M("p",L1e,[g.value!==null?(y(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(g.value),9,$1e)):(y(!0),M(Pe,{key:1},pt(T.value,P=>{return y(),M(Pe,{key:P.key},[k.value&&m(P.originalChild)?(y(),M(Pe,{key:0},[qe(N((D=P.originalChild,String((I=D.content)!=null?I:""))),1)],64)):P.isCustomComponent?(y(),he(bs(P.component),zn({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:me(()=>[P.hasSlotChildren?(y(),he(p(h),zn({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?(y(),he(p(h),zn({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"])):ee("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(y(),he(bs(P.component),zn({key:2,ref_for:!0},x(P.child,P.index)),null,16))],64);var D,I}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);cc.install=e=>{e.component(cc.__name,cc)};const N1e={class:"table-node-wrapper"},F1e=["aria-busy"],R1e={key:0},O1e=["custom-id"],P1e=["aria-label","onPointerdown"],D1e=["custom-id"],B1e={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},ep=Gn(et({__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=R(()=>{var w;return(w=t.node.loading)!=null&&w}),o=R(()=>{var w;return(w=t.node.rows)!=null?w:[]}),s=Z(null),i=Z([]);let r=null;const l=R(()=>t.node.header.cells.length),a=R(()=>i.value.some(w=>Number.isFinite(w)&&w>0)),u=R(()=>a.value?i.value.map(w=>w>0?{width:`${w}px`}:void 0):[]);Ln("markstreamShowTooltips",R(()=>t.showTooltips)),Ln("markstreamFade",R(()=>t.fade));const c=fs(()=>t.customId),d=R(()=>!!c.value.text),f=R(()=>!!c.value.paragraph),h=new WeakMap;function m(w){const b=t.fade===!1&&!d.value,_=!f.value,g=h.get(w);if(g?.children===w.children&&g.textFastPath===b&&g.paragraphFastPath===_)return g.info;const x=fg(w.children,_,!0),S={simpleChildren:x,plainText:x&&b?kc(x):null};return h.set(w,{children:w.children,textFastPath:b,paragraphFastPath:_,info:S}),S}function v(w){if(!r)return;w.preventDefault();const b=r.startWidth+r.nextStartWidth,_=Math.min(48,Math.floor(b/2)),g=Math.max(_,Math.min(b-_,Math.round(r.startWidth+w.clientX-r.startX))),x=[...r.widths];x[r.index]=g,x[r.index+1]=b-g,i.value=x}function k(){r&&(window.removeEventListener("pointermove",v),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),r=null)}return Je(l,()=>{k(),i.value=[]}),Vn(k),(w,b)=>(y(),M("div",N1e,[C("table",{ref_key:"tableRef",ref:s,class:Re(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(y(),M("colgroup",R1e,[(y(!0),M(Pe,null,pt(e.node.header.cells,(_,g)=>(y(),M("col",{key:g,style:Zt(u.value[g])},null,4))),128))])):ee("",!0),C("thead",null,[C("tr",null,[(y(!0),M(Pe,null,pt(e.node.header.cells,(_,g)=>(y(),M("th",{key:g,dir:"auto",class:Re([_.align==="right"?"text-right":_.align==="center"?"text-center":"text-left"])},[m(_).plainText!==null?(y(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(m(_).plainText),9,O1e)):m(_).simpleChildren?(y(),he(p($p),{key:1,nodes:m(_).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${g}`},null,8,["nodes","custom-id","index-key"])):(y(),he(p(Vi),{key:2,nodes:_.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:b[0]||(b[0]=x=>w.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),g(function(S,T){if(T.button!==0)return;const A=(function(){var D;const I=(D=s.value)==null?void 0:D.querySelectorAll("thead th");return Array.from(I??[],$=>Math.round($.getBoundingClientRect().width))})(),E=A[S],P=A[S+1];E&&P&&(T.preventDefault(),r={index:S,startX:T.clientX,startWidth:E,nextStartWidth:P,widths:A},i.value=A,window.addEventListener("pointermove",v),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k))})(g,x)},null,40,P1e)):ee("",!0)],2))),128))])]),C("tbody",null,[(y(!0),M(Pe,null,pt(o.value,(_,g)=>(y(),M("tr",{key:g},[(y(!0),M(Pe,null,pt(_.cells,(x,S)=>(y(),M("td",{key:S,class:Re([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[m(x).plainText!==null?(y(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(m(x).plainText),9,D1e)):m(x).simpleChildren?(y(),he(p($p),{key:1,nodes:m(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${g}-${S}`},null,8,["nodes","custom-id","index-key"])):(y(),he(p(Vi),{key:2,nodes:x.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:b[1]||(b[1]=T=>w.$emit("copy",T))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,F1e),j(as,{name:"table-node-fade"},{default:me(()=>[n.value?(y(),M("div",B1e,[xn(w.$slots,"loading",{isLoading:n.value},()=>[b[2]||(b[2]=C("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),b[3]||(b[3]=C("span",{class:"sr-only"},"Loading",-1))],!0)])):ee("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);ep.install=e=>{e.component(ep.__name,ep)};const H1e={class:"hr-node"},sm=Gn({},[["render",function(e,t){return y(),M("hr",H1e)}],["__scopeId","data-v-39b2349c"]]);sm.install=e=>{e.component(sm.__name,sm)};const z1e={class:"unknown-node"},l8=et({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(y(),M("div",z1e,N(e.node.raw),1))}),im=Gn(et({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=R(()=>`vmr-container vmr-container-${t.node.name}`),o=fs(()=>t.customId),s=R(()=>mt({text:qo,paragraph:cc,heading:L2,inline_code:li,link:Mi,image:Va,strong:Si,emphasis:Ti,strikethrough:Ai,insert:ji,subscript:Ui,superscript:Wi,checkbox:nr,checkbox_input:nr,hardbreak:qa,math_inline:Jr,reference:xi,list:qd,math_block:C$,table:ep},o.value));return(i,r)=>(y(),M("div",zn({class:n.value},e.node.attrs),[(y(!0),M(Pe,null,pt(e.node.children,(l,a)=>{return y(),he(bs((u=l.type,s.value[u]||l8)),{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"]]);im.install=e=>{e.component(im.__name,im)};const W1e=["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"],R_=[[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 U1e(e){if(e<=255)return W1e[e];let t=0,n=R_.length-1;for(;t<=n;){const o=t+n>>1,s=R_[o];if(es[1]))return s[2];t=o+1}}return"L"}const j1e=/[ \t\n\r\f]+/g,V1e=/[\t\n\r\f]| {2,}|^ | $/;let J9=null;const q1e=new RegExp("\\p{Script=Arabic}","u"),ou=new RegExp("\\p{M}","u"),y5=new RegExp("\\p{Nd}","u");function O_(e){return q1e.test(e)}function P_(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 kl(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(P_(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(P_(n))return!0}}return!1}const K1e=new Set([" "," ","⁠","\uFEFF"]),Z1e=new Set(["-","‐","–","—"]);function w$(e,t){return!((function(n){const o=tp(n);return o!==null&&K1e.has(o)})(e)||t&&((function(n){const o=tp(n);return o!==null&&(k5.has(o)||bc.has(o))})(e)||(function(n){const o=tp(n);return o!==null&&Z1e.has(o)})(e)))}const k5=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),$2=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),b5=new Set(["'","’"]),bc=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),G1e=new Set([":",".","،","؛"]),Y1e=new Set(["၏"]),X1e=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function J1e(e){if(C5(e))return!0;let t=!1;for(const n of e)if(bc.has(n)||hg(n))t=!0;else if(!t||!ou.test(n))return!1;return t}function Q1e(e){for(const t of e)if(!k5.has(t)&&!bc.has(t))return!1;return e.length>0}function efe(e){if(C5(e))return!0;for(const t of e)if(!($2.has(t)||b5.has(t)||ou.test(t)||hg(t)))return!1;return e.length>0}function C5(e){let t=!1;for(const n of e)if(n!=="\\"&&!ou.test(n)){if(!($2.has(n)||bc.has(n)||b5.has(n)))return!1;t=!0}return t}function pg(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 tp(e){if(e.length===0)return null;const t=pg(e,e.length);return e.slice(t)}const tfe=[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 hg(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,tfe)}function nfe(e){const t=(function(n){for(const o of n)if(!ou.test(o))return o;return null})(e);return t!==null&&y5.test(t)}function ofe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(ou.test(o))n--;else{if(!$2.has(o)&&!b5.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function sfe(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function D_(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 B_(e,t){return e&&t!==null&&G1e.has(t)}function ife(e){const t=tp(e);return t!==null&&Y1e.has(t)}function rfe(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 a8(e){let t=e.length;for(;t>0;){const n=pg(e,t),o=e.slice(n,t);if(X1e.has(o))return!0;if(!bc.has(o))return!1;t=n}return!1}function lfe(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 afe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Or(e){return e.length===1?e[0]:e.join("")}function ufe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),Or(n)}function cfe(e,t,n,o){if(!afe.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=lfe(c,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:Or(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:Or(r),isWordLike:a,kind:i,start:l}),s}function Q9(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const dfe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function ffe(e,t){const n=e.texts[t];return!!n.startsWith("www.")||dfe.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!vfe.has(e)&&!gfe.test(e)&&mfe.test(e)}function H_(e){let t=!1;for(const n of e)if(!ou.test(n)){if(!_$(n))return!1;t=!0}return t}function yfe(e,t,n,o){const s=!t&&H_(e),i=!o&&H_(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=pg(c,d),h=c.slice(f,d);if(!ou.test(h))return h;d=f}return null})(a);return u!==null&&hg(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=pg(a,u),d=a.slice(c,u);if(!ou.test(d))return _$(d)||hg(d);u=c}return!1})(e);return!!(s||i||l)&&!kl(e)&&!kl(n)&&(t||s||r)&&(o||i)}function z_(e){for(const t of e)if(y5.test(t))return!0;return!1}function rm(e){if(e.length===0)return!1;for(const t of e)if(!y5.test(t)&&!hfe.has(t))return!1;return!0}function kfe(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,h;const m=(J9===null&&(J9=new Intl.Segmenter(void 0,{granularity:"word"})),J9);let v=0;const k=[],w=[],b=[],_=[],g=[],x=[],S=[],T=[],A=[],E=[],P=[],D=[];for(const O of m.segment(a))for(const F of cfe(O.segment,(d=O.isWordLike)!=null&&d,O.index,c)){let U=function(){x[le]!==null&&(w[le]=[D_(k,x,S,le)],x[le]=null),w[le].push(F.text),b[le]=b[le]||F.isWordLike,T[le]=T[le]||K,A[le]=A[le]||V,E[le]=ne,P[le]=X,D[le]=B_(A[le],ie)};const z=F.kind==="text",W=sfe(F.text,F.isWordLike,F.kind),K=kl(F.text),V=O_(F.text),ie=tp(F.text),ne=a8(F.text),X=ife(F.text),le=v-1;u.carryCJKAfterClosingQuote&&z&&v>0&&_[le]==="text"&&K&&T[le]&&E[le]||z&&v>0&&_[le]==="text"&&Q1e(F.text)&&T[le]||z&&v>0&&_[le]==="text"&&P[le]?U():z&&v>0&&_[le]==="text"&&F.isWordLike&&V&&D[le]?(U(),b[le]=!0):W!==null&&v>0&&_[le]==="text"&&x[le]===W?S[le]=((f=S[le])!=null?f:1)+1:z&&!F.isWordLike&&v>0&&_[le]==="text"&&!T[le]&&(J1e(F.text)||F.text==="-"&&b[le])?U():(k[v]=F.text,w[v]=[F.text],b[v]=F.isWordLike,_[v]=F.kind,g[v]=F.start,x[v]=W,S[v]=W===null?0:1,T[v]=K,A[v]=V,E[v]=ne,P[v]=X,D[v]=B_(V,ie),v++)}for(let O=0;Onull);let $=-1;for(let O=v-1;O>=0;O--){const F=k[O];if(F.length!==0){if(_[O]==="text"&&!b[O]&&$>=0&&_[$]==="text"&&(efe(F)||F==="-"&&nfe(k[$]))){const U=(h=I[$])!=null?h:[];U.push(F),I[$]=U,g[$]=g[O],k[O]="";continue}$=O}}for(let O=0;OK+1){F.push(Or(X)),U.push(Ie),z.push("text"),W.push(O.starts[K]),K=le;continue}}F.push(V),U.push(ne),z.push(ie),W.push(O.starts[K]),K++}return{len:F.length,texts:F,isWordLike:U,kinds:z,starts:W}})((function(O){const F=[],U=[],z=[],W=[];for(let K=0;K1;for(let X=0;X=O.len||Q9(O.kinds[ie]))continue;const ne=[],X=O.starts[ie];let le=ie;for(;le0&&(F.push(Or(ne)),U.push(!0),z.push("text"),W.push(X),K=le-1)}return{len:F.length,texts:F,isWordLike:U,kinds:z,starts:W}})((function(O){const F=O.texts.slice(),U=O.isWordLike.slice(),z=O.kinds.slice(),W=O.starts.slice();for(let V=0;V=0&&!w$(u.texts[_-1],c)&&b(_),v<0&&(v=_),k=k||kl(g))}return b(u.len),{len:d.length,texts:d,isWordLike:f,kinds:h,starts:m}})(i,r,t.breakKeepAllAfterPunctuation):r;return mt({normalized:i,chunks:kfe(l,s)},l)}let ld=null;const W_=new Map;let ad=null;const Cfe=new RegExp("\\p{Emoji_Presentation}","u"),wfe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let e4=null;const U_=new Map;function u8(){if(ld!==null)return ld;if(typeof OffscreenCanvas<"u")return ld=new OffscreenCanvas(1,1).getContext("2d"),ld;if(typeof document<"u")return ld=document.createElement("canvas").getContext("2d"),ld;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Sa(e,t){let n=t.get(e);return n===void 0&&(n={width:u8().measureText(e).width,containsCJK:kl(e)},t.set(e,n)),n}function mg(){if(ad!==null)return ad;if(typeof navigator>"u")return ad={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},ad;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 ad={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},ad}function x$(){return e4===null&&(e4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),e4}function _fe(e){return Cfe.test(e)||e.includes("️")}function Ou(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=x$();for(const a of l.segment(i))_fe(a.segment)&&r++;return r})(o)),s.emojiCount})(e,t)*n}function xfe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function j_(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function V_(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function w5(e,t){return t===0?0:e+t}function Mfe(e,t,n,o,s){return w5(o,t==="tab"?s+(function(i,r){return i.letterSpacing!==0&&i.spacingGraphemeCounts[r]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function q_(e,t,n,o){return w5(o,t==="tab"?0:e.lineEndFitAdvances[n])}function K_(e,t,n,o,s){return w5(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function Tfe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Efe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function wh(e,t,n){let o=t;for(;oU){if(we!==null&&Q>G){le(ye,Q,te),ce=Q,ge=wh(we,ge,ce+1),Q=-1,te=0;continue}le(),de(ye,ce,ue)}else W+=ue,V=ye,ie=ce+1;else de(ye,ce,ue);const Se=ce+1;we!==null&&we[ge]===Se&&(Q=Se,te=W,ge++),ce++}K&&V===ye&&ie===fe.length&&(V=ye+1,ie=0)}let oe=0;for(;oe=B.length)));){const ye=B[oe],G=j_(H[oe]);if(K)if(W+ye>U){if(G){pe(oe,ye),le(oe+1,0,W-ye),oe++;continue}if(ne>=0){if(V>ne||V===ne&&ie>0){le();continue}le(ne,0,X);continue}if(ye>U&&O[oe]!==null){le(),ve(oe,0),oe++;continue}le()}else pe(oe,ye),G&&(ne=oe+1,X=W-ye),oe++;else ye>U&&O[oe]!==null?ve(oe,0):Ie(oe,ye),G&&(ne=oe+1,X=W-ye),oe++}return K&&le(),z})(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=mg(),d=o+c.lineFitEpsilon;let f=0,h=0,m=!1,v=0,k=0,w=-1,b=0,_=null;function g(){w=-1,b=0,_=null}function x(I=v,$=k,B){f++,h=0,m=!1,g()}function S(I,$){m=!0,v=I+1,k=0,h=$}function T(I,$,B){m=!0,v=I,k=$+1,h=B}function A(I,$){m?(h+=$,v=I+1,k=0):S(I,$)}function E(I,$,B,H,O,F){if(!$)return;const U=q_(n,I,B,O);K_(n,I,B,O,H),w=B+1,b=h-F+U,_=I}function P(I,$){var B;const H=r[I],O=(B=l[I])!=null?B:null;let F=O===null?-1:wh(O,0,$+1),U=-1,z=$;for(;zd){if(O!==null&&U>$){x(I,U),z=U,F=wh(O,F,z+1),U=-1;continue}x(),T(I,z,W)}else h=ie,v=I,k=z+1}else T(I,z,W);const K=z+1;O!==null&&O[F]===K&&(U=K,F++),z++}m&&v===I&&k===H.length&&(v=I+1,k=0)}function D(I){f++,g()}for(let I=0;I=$.endSegmentIndex)));){const H=i[B],O=j_(H),F=Afe(n,m,B),U=H==="tab"?Sfe(h+F,n.tabStopAdvance):s[B],z=F+U,W=Mfe(n,H,B,F,U);if(H!=="soft-hyphen")if(m){if(h+W>d){const K=h+q_(n,H,B,F);if(K_(n,H,B,F,U),_==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&b<=d){x(w,0);continue}if(O&&K<=d){A(B,z),x(B+1,0),B++;continue}if(w>=0&&b<=d){if(v>w||v===w&&k>0){x();continue}const V=w;x(V,0),B=V;continue}if(W>d&&r[B]!==null){x(),P(B,0),B++;continue}x();continue}A(B,z),E(H,O,B,U,F,z),B++}else W>d&&r[B]!==null?P(B,0):S(B,U),E(H,O,B,U,F,z),B++;else m&&(v=B+1,k=0,w=B+1,b=h+a,_=H),B++}m&&($.consumedEndSegmentIndex,x($.consumedEndSegmentIndex,0))}return f})(e,t)}let t4=null;function _5(){return t4===null&&(t4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),t4}function Lfe(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,h){o=[d],s=f,i=h,r=a8(d),l=$2.has(d)}function c(d,f){o.push(d),i=i||f;const h=a8(d);r=d.length===1&&bc.has(d)&&r||h,l=!1}for(const d of _5().segment(e)){const f=d.segment,h=kl(f);o.length!==0?l||k5.has(f)||bc.has(f)||t.carryCJKAfterClosingQuote&&h&&r?c(f,h):i||h?(a(),u(f,d.index,h)):c(f,h):u(f,d.index,h)}return a(),n}function $fe(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&&!w$(t[l-1].text,n)&&r(l),s<0&&(s=l),i=i||kl(a.text)}return r(t.length),o}function Z_(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=_5();for(const s of o.segment(e))n++;return n}function Nfe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Ffe(e,t,n,o,s){const i=mg(),{cache:r,emojiCorrection:l}=(function(D,I){u8().font=D;const $=(function(O){let F=W_.get(O);return F||(F=new Map,W_.set(O,F)),F})(D),B=(function(O){const F=O.match(/(\d+(?:\.\d+)?)\s*px/);return F?parseFloat(F[1]):16})(D),H=I?(function(O,F){let U=U_.get(O);if(U!==void 0)return U;const z=u8();z.font=O;const W=z.measureText("😀").width;if(U=0,W>F+.5&&typeof document<"u"&&document.body!==null){const K=document.createElement("span");K.style.font=O,K.style.display="inline-block",K.style.visibility="hidden",K.style.position="absolute",K.textContent="😀",document.body.appendChild(K);const V=K.getBoundingClientRect().width;document.body.removeChild(K),W-V>.5&&(U=W-V)}return U_.set(O,U),U})(D,B):0;return{cache:$,fontSize:B,emojiCorrection:H}})(t,(a=e.normalized,wfe.test(a)));var a;const u=Ou("-",Sa("-",r),l)+(s===0?0:2*s),c=8*Ou(" ",Sa(" ",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=[],h=[],m=[],v=[];let k=e.chunks.length<=1&&!d;const w=null,b=[],_=[],g=[],x=null,S=Array.from({length:e.len});function T(D,I,$,B,H,O,F,U,z){H!=="text"&&H!=="space"&&H!=="zero-width-break"&&(k=!1),f.push(I),h.push($),m.push(B),v.push(H),b.push(F),_.push(U),d&&g.push(z)}function A(D,I,$,B,H){const O=Sa(D,r),F=d?Z_(D,I):0,U=(function(V,ie,ne){return ie>1?V+(ie-1)*ne:V})(Ou(D,O,l),F,s),z=I==="space"||I==="preserved-space"||I==="zero-width-break"?0:U,W=z===0?0:z+(F>0?s:0),K=I==="space"||I==="zero-width-break"?0:U;if(H&&B&&D.length>1){let V="sum-graphemes";s!==0?V="segment-prefixes":rm(D)?V="pair-context":i.preferPrefixWidthsForBreakableRuns&&(V="segment-prefixes");const ie=(function(X,le,Ie,de,pe){if(le.breakableFitAdvances!==void 0&&le.breakableFitMode===pe)return le.breakableFitAdvances;le.breakableFitMode=pe;const ve=x$(),oe=[];for(const fe of ve.segment(X))oe.push(fe.segment);if(oe.length<=1)return le.breakableFitAdvances=null,le.breakableFitAdvances;if(pe==="sum-graphemes"){const fe=[];for(const we of oe){const ge=Sa(we,Ie);fe.push(Ou(we,ge,de))}return le.breakableFitAdvances=fe,le.breakableFitAdvances}if(pe==="pair-context"||oe.length>96){const fe=[];let we=null,ge=0;for(const Q of oe){const te=Ou(Q,Sa(Q,Ie),de);if(we===null)fe.push(te);else{const ce=we+Q,ue=Sa(ce,Ie);fe.push(Ou(ce,ue,de)-ge)}we=Q,ge=te}return le.breakableFitAdvances=fe,le.breakableFitAdvances}const ye=[];let G="",Y=0;for(const fe of oe){G+=fe;const we=Ou(G,Sa(G,Ie),de);ye.push(we-Y),Y=we}return le.breakableFitAdvances=ye,le.breakableFitAdvances})(D,O,r,l,V),ne=ie===null||o==="keep-all"?null:(function(X){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(X))return null;const le=[];let Ie=0;for(const de of _5().segment(X))Ie++,Nfe(de.segment)&&le.push(Ie);return le.length===0?null:le})(D);return void T(D,U,W,K,I,$,ie,ne,F)}T(D,U,W,K,I,$,null,null,F)}for(let D=0;D=55296&&X<=56319&&ne+1=56320&&pe<=57343&&(le=pe-56320+(X-55296<<10)+65536,Ie=2)}const de=U1e(le);de!=="R"&&de!=="AL"&&de!=="AN"||(U=!0);for(let pe=0;pe=0&&F[X]==="ET";X--)F[X]="EN";for(X=ne+1;X0?F[ne-1]:V)!=="L"?"R":"L";if(le===((X{const e=globalThis;if(e[n4])return e[n4];const t={configs:{},controllers:{},revision:Xr(0),preparedCache:new Map,blockEstimateCache:new Map};return e[n4]=t,t})();let lf=null;const o4=ys.revision;function G_(e){var t;return e&&(t=ys.configs[e])!=null?t:null}function Y_(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function Ofe(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function s4(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!Ofe(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 i4(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(lf!=null)return lf;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return lf=!!((i=r.getContext)!=null&&i.call(r,"2d")),lf}catch{return lf=!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=ys.blockEstimateCache.get(r);if(l)return ys.blockEstimateCache.delete(r),ys.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(h,m,v){const k=`${v}\0${m}\0${h}`,w=ys.preparedCache.get(k);if(w)return ys.preparedCache.delete(k),ys.preparedCache.set(k,w),w.prepared;const b=(function(_,g,x){return(function(S,T,A,E){var P,D;const I=(P=E?.wordBreak)!=null?P:"normal",$=(D=E?.letterSpacing)!=null?D:0;return Ffe(bfe(S,mg(),E?.whiteSpace,I),T,!1,I,$)})(_,g,0,x)})(h,m,{whiteSpace:v});for(ys.preparedCache.set(k,{prepared:b});ys.preparedCache.size>240;){const _=ys.preparedCache.keys().next().value;if(!_)break;ys.preparedCache.delete(_)}return b})(e,n.font,a),c=(function(h,m,v){const k=Ife(h,m);return{lineCount:k,height:k*v}})(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(ys.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});ys.blockEstimateCache.size>4e3;){const h=ys.blockEstimateCache.keys().next().value;if(!h)break;ys.blockEstimateCache.delete(h)}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=s4(e.children);return i&&n.paragraph?i4(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),r=s4(e.children),l=n.headings[i];return r&&l?i4(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=s4((s=i[0])==null?void 0:s.children);return r?i4(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 af(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function Pu(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function r4(e,t,n=0){return e.diff?v5(t??{},n)?(function(o){const s=Pu(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(r=>!Rfe.some(l=>r.startsWith(l))).length):Math.max(1,i.length)}return af(Pu(o.originalCode))+af(Pu(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(af(Pu(s)),af(Pu(i)));const r=Pu(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):af(Pu(e.code,e.loading===!0))}function Pfe(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function l4(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=Y_(o.lineHeight,1.5*Y_(o.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:Pfe(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const Dfe=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function X_(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))Dfe.has(r)||s.has(r)||l.enumerable&&"value"in l&&(o[r]=l.value);return o}function J_(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,h){return Number.isFinite(f)?Math.min(Math.max(0,f),h):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 h=o.getNormalizedScrollTop(e,t,!1),m=Math.abs(h-r);md&&(e.scrollTop=u)}function Q_(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 ex(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const A$=Symbol("MarkstreamMathBlockMinHeightCache");function LVe(){return nn(A$,null)}const Bfe=new Set(["text","inline_code","emoji","footnote_reference"]),Hfe=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function uf(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function Du(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 M$(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(Bfe.has(o))return!0;if(!Hfe.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(M$)}function c8(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 h=u[f];if(Array.isArray(h)){const m=h.map(c8).filter(Boolean).join(" ");m&&d.push(m)}}return d.join(" ").replace(/\s+/g," ").trim()}function T$(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(T$)})}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 Wfe(e,t){var n,o,s,i,r,l,a,u,c,d,f,h,m,v;if(!e||typeof e!="object")return 32;const k=e,w=String((n=k.type)!=null?n:""),b=Number.isFinite(t)&&t>0?t:640;switch(w){case"heading":return(function(_){var g;const x=Number((g=_.level)!=null?g:_.depth);return x>=4?20:x===3?30:x===2?32:44})(k);case"paragraph":return(function(_,g){const x=String(_??"");if(!x)return 28;const S=Math.max(18,Math.floor(Math.max(320,g)/8)),T=x.split(/\r?\n/).length,A=Math.ceil(x.length/S);return Math.max(1,T,A)<=1?28:Du(x,g,34)})(String((s=(o=k.raw)!=null?o:k.content)!=null?s:""),b);case"list":return(function(_,g){var x;const S=Array.isArray(_.items)?_.items:[];if(!S.length)return 48;const T=Math.max(48,30*S.length+12);let A=12;for(const D of S)A+=zfe(c8(D)||String((x=D.raw)!=null?x:""),g);const E=Math.max(0,A-T);if(S.length>20){const D=Math.round(2.4*S.length);return Math.round(T+Math.max(D,Math.min(E,3*S.length)))}if(E<=0)return T;const P=S.length>8?8*S.length:E;return Math.round(T+Math.min(E,P))})(k,b);case"list_item":return Du(String((r=(i=k.raw)!=null?i:k.content)!=null?r:""),b,34);case"blockquote":return Du(String((a=(l=k.raw)!=null?l:k.content)!=null?a:""),b,56);case"table":return(function(_,g){const x=[..._.header?[_.header]:[],...Array.isArray(_.rows)?_.rows:[]];if(!x.length){const S=Array.isArray(_.children)?_.children.length:3;return Math.max(120,38*S+48)}return Math.max(120,Math.round(4+x.reduce((S,T)=>S+(function(A,E){const P=Math.max(1,A.length),D=Math.max(80,(E-32)/P),I=Math.max(10,Math.floor(D/8)),$=Math.max(1,...A.map(B=>{var H;const O=c8(B)||String((H=B?.raw)!=null?H:"");return Math.ceil(O.length/I)||1}));return 54+34*Math.max(0,$-1)+(P<=3&&A.some(T$)?14:0)})((function(A){var E;return Array.isArray(A?.cells)&&(E=A.cells)!=null?E:[]})(T),g),0)))})(k,b);case"code_block":{const _=String((u=k.language)!=null?u:"").trim().toLowerCase(),g=String((d=(c=k.code)!=null?c:k.raw)!=null?d:"");return _==="mermaid"?lg(ig(g)):_==="infographic"?ag(rg(g)):Du(g,b,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(_,g){var x,S,T;const A=_.match(/^\s*]*)>/i);return A&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=A[1])!=null?x:"")?Du(((T=(S=_.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:S[1])==null?void 0:T.replace(/<[^>]*>/g,"").trim())||"Details",g,28,28):Du(_,g,96)})(String((h=(f=k.raw)!=null?f:k.content)!=null?h:""),b);case"thematic_break":return 24;default:return Du(String((v=(m=k.raw)!=null?m:k.content)!=null?v:""),b,40)}}function tx(e,t,n){return Math.min(Math.max(e,t),n)}const Ufe=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],jfe=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],Vfe=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),E$=["raw","content","code","originalCode","updatedCode"],nx=new WeakMap,ox=new WeakMap;let qfe=1;function Rr(){return typeof performance<"u"?performance.now():Date.now()}function sx(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Qi(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=nx.get(t);return n||(n=qfe++,nx.set(t,n)),String(n)}function ix(e,t,n,o={}){var s,i;const r=o.includeFinal!==!1,l={md:Qi(t),customMarkdownIt:Qi(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:Qi(e.validateLink),preTransformTokens:Qi(e.preTransformTokens),postTransformTokens:Qi(e.postTransformTokens),postTransformNodes:Qi(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function rx(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 lx(e){const t=I$(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function I$(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function L$(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function x5(e){const t=String(e??"");return`${t.length}:${L$(t)}`}function d8(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?x5(r):`${r.length}:${L$(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Qi(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:${Qi(o)}`;const i=Qi(o);if(t.set(o,i),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>d8(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}:${d8(r[u],t,n+1)}`).join(";")}`}return typeof e}function gg(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function $$(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>gg(o)?su(o,t,n+1):$$(o,t,n+1)).join(",")}`:gg(e)?su(e,t,n):d8(e,t,n)}function Kfe(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!E$.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${x5(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${Qi(s)}`:Vfe.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${$$(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${Qi(s)}`:""}).filter(Boolean).join(";")}function Zfe(e){return E$.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${x5(n)}`:""}).filter(Boolean).join(";")}function su(e,t=new WeakMap,n=0){const o=ox.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}:${Qi(s)}`;const r=Qi(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],h=f.length?f.slice(0,200).map(m=>su(m,u,c+1)).join("|"):"";return[a.type,Zfe(d),Kfe(d,u,c),f.length,h].join(":")})(e,t,n);return ox.set(s,l),l}function N$(e,t){return su(e)===su(t)}function S5(e,t,n){const o=Rr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Rr()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function ax(e,t,n){return S5(t,n,()=>su(e))}function F$(e,t,n){return ax(e,n,"stabilizeSignatureMs")===ax(t,n,"stabilizeSignatureMs")}function _h(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function ux(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function cx(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function Gfe(e,t){return e.length===t.length&&e===t}function A5(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=A5(e,t)}),o??F$(e,t,n)}function Jfe(e,t){const n={};for(const o of Ufe){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function Qfe(e,t){var n;const o=l_(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:R(()=>!1),r=Z(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let B="",H=0,O=!1,F=!1,U=!1,z=!1;function W(){B="",H=0,O=!1,F=!1,U=!1,z=!1}function K(V){let ie=!1;for(let ne=0;ne{if(!V||!ie.startsWith(V)||ie.length<=V.length)return W(),[!0,0];let ne=0;B!==V&&(W(),K(V),ne=V.length);const X=ie.slice(V.length),le=K(X);return B=ie,[le,ne+X.length]}})();let h,m=0,v=0,k=Rr(),w=-1,b=0;function _(B){w=Number.isInteger(B)?B:0,b+=1}function g(){h&&(clearTimeout(h),h=void 0)}function x(){g();const B=t.renderContent.value;r.value!==B&&(r.value=B),k=Rr()}Je([t.renderContent,t.effectiveFinal,i],([B,H,O])=>{r.value!==B&&(!O||H||(function(F,U){if(!F&&U||U.length<=80||U.length\s*|`{3,}|~{3,})/.test(z))||z.endsWith(` +`)&&!(function(W){const K=rx(W);if(lx(K))return!1;const V=I$(K);return V.length>=2&&V.some(ie=>ie.trim())})(U))})(r.value,B)?x():(function(){if(v+=1,h)return;const F=Math.max(0,(function(U){const z=U.parseCoalesceMs;return typeof z=="number"&&Number.isFinite(z)&&z>=0?z:80})(e)-(Rr()-k));F<=0?x():h=setTimeout(x,F)})())},{flush:"sync",immediate:!0}),d1(g);const S=R(()=>{var B,H,O,F;return cie(e.customHtmlTags,(B=e.parseOptions)==null?void 0:B.customHtmlTags,(F=(O=(H=t.customComponentsMap)==null?void 0:H.value)!=null?O:{},Object.entries(F).map(([U,z])=>{const W=Sr(U);return z==null||!W||Qp(W)||WI.has(W)||Zp.has(W)?"":W}).filter(Boolean)))}),T=R(()=>{const{key:B,tags:H}=die(S.value);if(!B)return o;const O=s.get(B);if(O)return O;const F=l_(t.instanceMsgId,{customHtmlTags:H});return s.set(B,F),F}),A=R(()=>{const B=T.value;if(!e.customMarkdownIt)return B;const H=e.customMarkdownIt(B);return B.__markstreamHasCustomParserExtensions=!0,H.__markstreamHasCustomParserExtensions=!0,H}),E=R(()=>{var B,H;const O=(B=e.parseOptions)!=null?B:{},F=t.effectiveFinal.value,U=S.value,z=F!=null,W=U.length>0;return z||W||O.streamParse==null?mt(mt(rn(mt({},O),{streamParse:(H=O.streamParse)==null||H}),z?{final:F}:{}),W?{customHtmlTags:U}:{}):O}),P=R(()=>{var B;return new Set(((B=E.value.customHtmlTags)!=null?B:[]).map(H=>String(H).trim().toLowerCase()).filter(Boolean))}),D=R(()=>ix(E.value,A.value,e.customMarkdownIt,{includeFinal:!0})),I=R(()=>ix(E.value,A.value,e.customMarkdownIt,{includeFinal:!1}));Je([D,I],([B,H],[O,F])=>{O&&(B===O&&H===F||(x(),H!==F&&(l=[],c="")))},{flush:"sync"});const $=R(()=>{var B,H,O,F,U,z,W,K,V,ie,ne;if((B=e.nodes)!=null&&B.length)return l=[],c="",_(0),kt(e.nodes.slice());const X=r.value;if(!X)return l=[],c="",_(-1),[];const le=t.debugPerformanceEnabled.value,Ie=le?Rr():0,de=A.value,pe=D.value,ve=I.value;a&&pe!==a&&(function(Fe){var Oe,Ge;(Ge=(Oe=Fe.stream)==null?void 0:Oe.reset)==null||Ge.call(Oe)})(de),u&&ve!==u&&(l=[],c="");const oe=Object.keys((O=(H=t.customComponentsMap)==null?void 0:H.value)!=null?O:{}).length>0||typeof E.value.postTransformNodes=="function";oe!==d&&(l=[],c="");const ye=!oe&&l.length>0&&X.startsWith(c)&&ve===u,G=le?sx(de):null,Y=le?{}:void 0,fe=cx(de),we=!fe&&!oe,ge=mt(mt(rn(mt({},E.value),{__reuseStableTopLevelNodes:we}),fe?{__disableStreamParse:!0}:{}),Y?{__timing:Y}:{}),Q=UL(X,de,ge),te=le?Rr():0,ce=le?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let ue,Se=le?_h(Q.length):void 0,ze=0,_e=0,Ee=0;if(ye){const Fe=le?Rr():0,[Oe,Ge]=(function(Tt){var Bt,Yt;const[Sn,on]=Tt.scanGlobalReferenceAppend(Tt.previousContent,Tt.content),en=Tt.parseOptions;return[Tt.previousDirtyStartIndex>0&&en.final!==!0&&!Tt.customMarkdownIt&&!cx(Tt.md)&&!Sn&&typeof en.preTransformTokens!="function"&&typeof en.postTransformTokens!="function"&&typeof en.postTransformNodes!="function"&&((Yt=(Bt=en.customHtmlTags)==null?void 0:Bt.length)!=null?Yt:0)===0?Tt.previousDirtyStartIndex:0,on]})({content:X,previousContent:c,previousDirtyStartIndex:w,parseOptions:E.value,customMarkdownIt:e.customMarkdownIt,md:de,scanGlobalReferenceAppend:f});Ee=Ge;const at=Oe<=0;if(ce){const Tt=(function(Bt,Yt,Sn,on={}){var en;if(!Yt.length)return{nodes:Bt,metrics:_h(Bt.length)};const Cn=(en=on.scanStartIndex)!=null?en:0,Mn=on.reuseDirtyTail!==!1,We=(function(Lt,gt,wn,yn=0){const go=Math.min(Lt.length,gt.length);for(let qt=Math.min(go,Math.max(0,yn));qtsu(Fe[at]))})(ue,ce,_e):(function(Fe,Oe=0){for(let Ge=Math.max(0,Oe);Ge((U=G?.total)!=null?U:0);t.logPerf(Oe?"parse(stream)":"parse(sync)",mt(mt(mt({rendererId:t.instanceMsgId,ms:Math.round(Rr()-Ie),nodes:ue.length,contentLength:X.length,parseCommitCount:m,parseCoalescedCount:v,nodeReuseMs:it,referenceDefinitionScanChars:Ee,signatureMs:(z=ce?.signatureMs)!=null?z:0,stabilizeSignatureMs:(W=ce?.stabilizeSignatureMs)!=null?W:0,primeSignatureMs:(K=ce?.primeSignatureMs)!=null?K:0,signatureCallCount:(V=ce?.signatureCallCount)!=null?V:0,stabilizeSignatureCallCount:(ie=ce?.stabilizeSignatureCallCount)!=null?ie:0,primeSignatureCallCount:(ne=ce?.primeSignatureCallCount)!=null?ne:0,stabilizeMs:ze},Se??{}),Y?Object.fromEntries(jfe.map(Ge=>{var at;return[Ge,(at=Y[Ge])!=null?at:0]})):{}),Fe?{streamMode:Fe.lastMode,streamDelta:Jfe(Fe,G),streamStats:Fe}:{}))}return kt(ue)});return{effectiveCustomHtmlTags:S,effectiveCustomHtmlTagsSet:P,mdBase:T,mdInstance:A,mergedParseOptions:E,getParsedNodesDirtyStartIndex:()=>w,getParsedNodesRevision:()=>b,parsedNodes:$}}function epe(e){const{isClient:t}=e,n=Z(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,h){if((v=(m=e.shouldTrackVisibleNodeIndices)==null?void 0:m.call(e))!=null&&!v)return;var m,v;const k=n.value,w=k.has(f);if(h){if(w)return;const _=new Set(k);return _.add(f),void(n.value=_)}if(!w)return;const b=new Set(k);b.delete(f),n.value=b})(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,h]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=R(()=>Math.max(0,t.value.length-n.value.length)),a=R(()=>l.value===0),u=R(()=>o.value&&a.value);return Kg()&&d1(()=>{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 npe={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},dx=/auto|scroll|overlay/i;function ope(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return dx.test(t)||dx.test(n)}function spe(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 ipe={class:"m-0 p-0"},rpe=["data-probe"],lpe=Gn(et(rn(mt({},{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)=>(y(),M("div",{class:"height-estimation-probes",style:Zt({width:`${e.width}px`}),"aria-hidden":"true"},[C("div",{ref:i=>e.setParagraphWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[j(p(cc),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),C("div",{ref:i=>e.setListItemWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[C("ul",ipe,[j(p(Vd),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),C("div",{ref:i=>e.setListWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[j(p(qd),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(y(),M(Pe,null,pt(6,i=>C("div",{key:`probe-heading-${i}`,ref_for:!0,ref:r=>e.setHeadingWrapper(i,r),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[j(p(L2),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,rpe)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),fx=et({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=R(()=>{var n,o;return ag((o=Md(e.estimatedPreviewHeightPx))!=null?o:rg(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return tn("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?tn("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)"}},[tn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[tn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),tn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),tn("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},()=>tn("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,tn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[tn("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:"")),tn("div",{class:"absolute inset-0"},[tn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),px=et({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=R(()=>{var n,o;return lg((o=Md(e.estimatedPreviewHeightPx))!=null?o:ig(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return tn("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?tn("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)"}},[tn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[tn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),tn("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},()=>tn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[tn("span",{class:"action-icon block"})])))]):null,tn("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)"}},[tn("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:"")),tn("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"}})])])}}}),ape={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 As(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 upe=["data-custom-id"],cpe=["data-node-index","data-node-type"],hx="typewriter-simple-cursor-target",R$=Gn(et(rn(mt({},{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(L){if(!(typeof Event<"u"&&L instanceof Event))return typeof L=="string"&&s("copy-code",L),void s("copy",L)}const r=ds(),l=nn("markstreamNestedRendererProps",void 0);function a(L){const q=r?.vnode.props;return!!q&&(Object.prototype.hasOwnProperty.call(q,L)||Object.prototype.hasOwnProperty.call(q,String(L).replace(/[A-Z]/g,re=>`-${re.toLowerCase()}`)))}function u(L){var q,re;const ae=o[L];return a(L)?ae:(re=(q=l?.value)==null?void 0:q[L])!=null?re:ae}const c=R(()=>{return(L=u("mode"))==="chat"||L==="minimal"||L==="docs"?L:"docs";var L}),d=R(()=>ex(u("typewriter"))),f=R(()=>d.value!=="off"),h=R(()=>u("domMode")==="minimal"?"minimal":"full"),m=R(()=>{return(L={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":L.codeRenderer==="pre"||L.codeRenderer==="shiki"||L.codeRenderer==="monaco"?L.codeRenderer:L.renderCodeBlocksAsPre===!1||L.mode==="docs"?"monaco":"pre";var L}),v=R(()=>ape[c.value]),k=R(()=>{var L;return(L=u("showTooltips"))!=null?L:v.value.showTooltips}),w=R(()=>{var L;return(L=u("fade"))!=null?L:v.value.fade}),b=R(()=>{var L;return(L=u("batchRendering"))!=null?L:v.value.batchRendering}),_=R(()=>{var L;return(L=u("initialRenderBatchSize"))!=null?L:v.value.initialRenderBatchSize}),g=R(()=>{var L;return(L=u("renderBatchSize"))!=null?L:v.value.renderBatchSize}),x=R(()=>{var L;return(L=u("renderBatchDelay"))!=null?L:v.value.renderBatchDelay}),S=R(()=>{var L;return(L=u("renderBatchBudgetMs"))!=null?L:v.value.renderBatchBudgetMs}),T=R(()=>{var L;return(L=u("renderBatchIdleTimeoutMs"))!=null?L:v.value.renderBatchIdleTimeoutMs}),A=R(()=>{var L;return(L=u("deferNodesUntilVisible"))!=null?L:v.value.deferNodesUntilVisible}),E=R(()=>{var L;return(L=u("maxLiveNodes"))!=null?L:v.value.maxLiveNodes}),P=R(()=>{var L;return(L=u("liveNodeBuffer"))!=null?L:v.value.liveNodeBuffer}),D=R(()=>{var L;return(L=u("nodeVirtual"))!=null?L:v.value.nodeVirtual}),I={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 h.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 b.value},get initialRenderBatchSize(){return _.value},get renderBatchSize(){return g.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return S.value},get renderBatchIdleTimeoutMs(){return T.value},get deferNodesUntilVisible(){return A.value},get maxLiveNodes(){return E.value},get liveNodeBuffer(){return P.value},get nodeVirtual(){return D.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function $(L){s("height-change",L)}function B(L){s("virtual-state-change",L)}function H(L){s("anchor-change",L)}const O=Z(),F=Z(null),U=Z(null),z=Z(null),W=Go({1:null,2:null,3:null,4:null,5:null,6:null}),K=Z(!1),V=new Map,ie=Z(0),ne=Z(0),X=Z({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function le(L,q){return typeof L!="string"?q:L.trim()||q}function Ie(L){const q=Number(L);return Number.isFinite(q)&&q>0?Math.max(1,Math.trunc(q)):640}const de=R(()=>{var L;const q=(L=I.viewportPriorityOptions)!=null?L:{},re=le(q.rootMargin,yc);return{rootMargin:re,heavyBlockMargin:le(q.heavyBlockMargin,re),maxTargets:Ie(q.maxTargets)}}),pe=R(()=>{var L;return(L=de.value.rootMargin)!=null?L:yc}),ve=R(()=>{var L;return(L=de.value.maxTargets)!=null?L:640});function oe(){var L,q;if(((L=o.virtualScroll)==null?void 0:L.enabled)!==!0)return null;const re=(q=o.virtualScroll)==null?void 0:q.scrollRoot;return ye(typeof re=="function"?re():re)}function ye(L){return L?typeof HTMLElement<"u"&&L instanceof HTMLElement?L:typeof L=="object"&&"value"in L?ye(L.value):typeof L=="object"&&"$el"in L?ye(L.$el):null:null}Ln(y$,de);const{isClient:G,renderAsFragment:Y,debugPerformanceEnabled:fe,resolvedShowTooltips:we,resolvedHtmlPolicy:ge,inheritedSmoothStreaming:Q,ownsTypewriterCursor:te}=(function(L){const q=typeof window<"u",re=p1(),ae=nn("markstreamHtmlPolicy",void 0),be=nn("markstreamTypewriterCursor",void 0),Ne=nn("markstreamSmoothStreaming",void 0),De=R(()=>L.renderAsFragment===!0),je=R(()=>!!(L.debugPerformance&&q&&typeof console<"u")),ot=R(()=>{var nt;if(typeof L.showTooltips=="boolean")return L.showTooltips;const Be=(nt=re.showTooltips)!=null?nt:re["show-tooltips"];return Be===""||Be===!0||Be==="true"||Be!==!1&&Be!=="false"&&void 0}),Ve=R(()=>{var nt,Be;return(Be=(nt=L.htmlPolicy)!=null?nt:ae?.value)!=null?Be:"safe"}),Ye=R(()=>be?.value!==!0);return{isClient:q,renderAsFragment:De,debugPerformanceEnabled:je,resolvedShowTooltips:ot,resolvedHtmlPolicy:Ve,inheritedSmoothStreaming:Ne,inheritedTypewriterCursor:be,ownsTypewriterCursor:Ye}})(I),{resolveViewportRoot:ce,resolveScrollContainer:ue,isReverseFlexScrollRoot:Se,getNormalizedScrollTop:ze,getOffsetTopWithinRoot:_e}=(function(L,q){function re(){var je,ot;return(ot=(je=q.scrollRoot)==null?void 0:je.call(q))!=null?ot:null}function ae(je){if(typeof window>"u")return null;const ot=re();if(ot)return ot;const Ve=je??L.value;if(!Ve)return null;const Ye=Ve.ownerDocument||document,nt=Ye.scrollingElement||Ye.documentElement;let Be=Ve;for(;Be&&Be!==Ye.body&&Be!==nt;){if(ope(window.getComputedStyle(Be))&&spe(Be))return Be;Be=Be.parentElement}return null}function be(je){if(!q.isClient)return!1;try{const ot=window.getComputedStyle(je);return!!(ot.display||"").toLowerCase().includes("flex")&&(ot.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Ne(je,ot,Ve){var Ye,nt;if(Ve)return De(ot);const Be=je.scrollTop;if(!be(je))return Be;const Xe=Be<0?-Be:Be;return Math.max(0,((Ye=je.scrollHeight)!=null?Ye:0)-((nt=je.clientHeight)!=null?nt:0))-Xe}function De(je){var ot,Ve,Ye,nt,Be;const Xe=Number((ot=je.scrollingElement)==null?void 0:ot.scrollTop),lt=Number((Ye=(Ve=je.documentElement)==null?void 0:Ve.scrollTop)!=null?Ye:0),rt=Number((Be=(nt=je.body)==null?void 0:nt.scrollTop)!=null?Be:0);return Math.max(0,Number.isFinite(Xe)?Xe:0,Number.isFinite(lt)?lt:0,Number.isFinite(rt)?rt:0)}return{resolveViewportRoot:ae,resolveScrollContainer:function(je){var ot,Ve,Ye,nt;const Be=re();if(Be)return Be;const Xe=ae((ot=je??L.value)!=null?ot:null);if(Xe)return Xe;const lt=(nt=(Ye=je?.ownerDocument)!=null?Ye:(Ve=L.value)==null?void 0:Ve.ownerDocument)!=null?nt:typeof document<"u"?document:null;return lt?.scrollingElement||lt?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:Ne,getOffsetTopWithinRoot:function(je,ot){const Ve=ot.ownerDocument||je.ownerDocument||document;if((function(Xe,lt){return Xe===lt.documentElement||Xe===lt.body||Xe===lt.scrollingElement})(ot,Ve))return je.getBoundingClientRect().top+De(Ve);const Ye=ot.getBoundingClientRect(),nt=je.getBoundingClientRect(),Be=Ne(ot,Ve,!1);return nt.top-Ye.top+Be}}})(O,{isClient:G,scrollRoot:oe});Ln("markstreamShowTooltips",we),Ln("markstreamHtmlPolicy",ge),Ln("markstreamTypewriter",f),Ln("markstreamFade",R(()=>I.fade!==!1)),Ln("markstreamTypewriterCursor",R(()=>!0)),Ln("markstreamTextStreamState",V),Ln("markstreamStreamVersion",ie),Ln("markstreamParseOptions",R(()=>I.parseOptions)),Ln("markstreamCustomMarkdownIt",R(()=>I.customMarkdownIt));const{smoothStreamingEnabled:Ee,renderContent:it,requestedFinal:Fe,effectiveFinal:Oe}=(function(L,q){const re=tpe(mt(mt({},npe),L.smoothStreamingOptions)),ae=R(()=>{var Be,Xe,lt;return L.smoothStreaming!==!1&&!((Be=L.nodes)!=null&&Be.length)&&(L.smoothStreaming===!0||!((Xe=q.inheritedSmoothStreaming)!=null&&Xe.value))&&(L.smoothStreaming===!0||ex(L.typewriter)!=="off"||((lt=L.maxLiveNodes)!=null?lt:0)<=0)}),be=Z(!q.isClient||L.smoothStreaming===!0);dn(()=>{be.value=!0});const Ne=R(()=>be.value&&ae.value),De=R(()=>{var Be;return Ne.value?re.visible.value:(Be=L.content)!=null?Be:""}),je=R(()=>{var Be,Xe;const lt=(Be=L.parseOptions)!=null?Be:{};return(Xe=L.final)!=null?Xe:lt.final}),ot=R(()=>{const Be=je.value;return Ne.value&&Be!=null?!!Be&&re.caughtUp.value:Be});let Ve=0,Ye=!1;function nt(){Ve=0,Ye=!1}return Je([()=>L.content,()=>L.nodes,Ne,je],([Be,Xe,lt,rt])=>{if(Xe?.length)return nt(),void re.reset("");const wt=Be??"";if(!lt)return nt(),re.reset(wt),void(rt&&re.finish({flush:!0}));const dt=re.source.value;if(wt){if(wt!==dt)if(wt.startsWith(dt)){const Ft=wt.slice(dt.length),Ht=re.pendingChars.value;Ft.length<=8?(Ve++,Ye||Ve>=2&&Ht<=8?(Ye=!0,re.reset(wt)):re.enqueue(Ft)):(nt(),re.enqueue(Ft))}else nt(),re.reset(wt)}else nt(),re.reset("");rt&&re.finish()},{immediate:!0}),{smoothStream:re,smoothStreamingEligible:ae,smoothStreamingEnabled:Ne,renderContent:De,requestedFinal:je,effectiveFinal:ot}})(I,{isClient:G,inheritedSmoothStreaming:Q}),Ge=Fe.value===!0;Ln("markstreamSmoothStreaming",Ee);const at=Z(!1),Tt=Z(!1),Bt=Z(!1);let Yt="",Sn=!1,on=null;function en(){G&&on!=null&&(window.clearTimeout(on),on=null)}function Cn(){at.value=!1,en()}function Mn(L,q){if(!fe.value)return;const re=(function(){if(!fe.value)return null;const ae=gt(We),be=gt(tt),Ne=Math.max(Lt,be);if(ae<=0&&Ne<=0)return null;const De={total:ae,maxPerFrame:Ne,byLabel:(je=We,Object.fromEntries(Array.from(je.entries()).sort((ot,Ve)=>Ve[1]-ot[1]||ot[0].localeCompare(Ve[0]))))};var je;return We.clear(),tt.clear(),Lt=0,De})();console.info(`[markstream-vue][perf] ${L}`,re?rn(mt({},q),{layoutReads:re}):q)}Je([()=>I.indexKey,()=>I.customId],()=>{var L,q;Cn(),Tt.value=!1,Bt.value=!((L=o.nodes)!=null&&L.length)&&Fe.value!==!0&&!!o.content,Yt=(q=it.value)!=null?q:"",Sn=Yt.length>0},{flush:"sync"}),Je([()=>o.content,()=>o.nodes,Fe],([L,q,re])=>{!q?.length&&re!==!0&&L&&(Bt.value=!0)},{flush:"sync",immediate:!0}),Je([it,()=>o.nodes,Fe],([L,q,re])=>{const ae=L??"";return q?.length||re===!0?(Cn(),Tt.value=!1,Yt=ae,void(Sn=!0)):(ae.length>0&&(Bt.value=!0),Sn?(Yt&&ae.length>Yt.length&&ae.startsWith(Yt)?(at.value=!0,Tt.value=!0,G&&(en(),on=window.setTimeout(()=>{var be;on=null,Oe.value===!0||(be=o.nodes)!=null&&be.length||(qc(),at.value=!1,Ol())},1200))):(ae.length"u")return null;const Ne=window;if(Ne.__markstreamLayoutReadPerformance)return Ne.__markstreamLayoutReadPerformance;const De={total:0,maxPerFrame:0,byLabel:{}};return Ne.__markstreamLayoutReadPerformance=De,De})();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(()=>yn(be),0):queueMicrotask(()=>yn(be)):window.requestAnimationFrame(()=>yn(be))))})(L),Ue||(Ue=!0,G&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(wn):typeof queueMicrotask!="function"?setTimeout(wn,0):queueMicrotask(wn)))}function qt(L,q){return go(L),q()}const ps=I.customId?`renderer-${I.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,xs=(function(L){const q=new Map;return{scope:L,cache:q,clear:()=>q.clear()}})(ps),_n=ps;Ln(A$,xs);const In=fs(()=>I.customId),{effectiveCustomHtmlTagsSet:To,mergedParseOptions:lo,parsedNodes:St,getParsedNodesDirtyStartIndex:hs,getParsedNodesRevision:Jo}=Qfe(I,{instanceMsgId:ps,renderContent:it,effectiveFinal:Oe,smoothStreamingEnabled:Ee,debugPerformanceEnabled:fe,customComponentsMap:In,logPerf:Mn});Je(St,()=>{at.value||xs.clear(),ie.value+=1},{immediate:!0});const uo=R(()=>({customId:I.customId,customHtmlTags:lo.value.customHtmlTags,parseOptions:I.parseOptions,customMarkdownIt:I.customMarkdownIt,htmlPolicy:ge.value,viewportPriority:I.viewportPriority,viewportPriorityOptions:de.value,mode:c.value,domMode:I.domMode,codeRenderer:m.value,codeBlockStream:I.codeBlockStream,codeBlockDarkTheme:I.codeBlockDarkTheme,codeBlockLightTheme:I.codeBlockLightTheme,codeBlockMonacoOptions:I.codeBlockMonacoOptions,renderCodeBlocksAsPre:I.renderCodeBlocksAsPre,codeBlockMinWidth:I.codeBlockMinWidth,codeBlockMaxWidth:I.codeBlockMaxWidth,codeBlockProps:I.codeBlockProps,mermaidProps:I.mermaidProps,d2Props:I.d2Props,infographicProps:I.infographicProps,showTooltips:we.value,themes:I.themes,langs:I.langs,isDark:I.isDark,typewriter:f.value,smoothStreamingOptions:I.smoothStreamingOptions,parseCoalesceMs:I.parseCoalesceMs,fade:I.fade}));Ln("markstreamNestedRendererProps",uo);const Ys=R(()=>St.value),Nn=R(()=>St.value.length),no=Z(null),$s=Z(null),Xs=Z(null),ci=Z(null),Oo=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),vo=!Oo&&I.customId?G_(I.customId):null,Po=R(()=>vo?(o4.value,G_(I.customId)):null),co=R(()=>{var L;return!!(!Y.value&&I.customId&&!Oo&&((L=Po.value)!=null&&L.enabled))}),Tn=R(()=>!!(G&&co.value)),fo=R(()=>{var L;return!!(!Y.value&&((L=o.virtualScroll)!=null&&L.enabled))}),Qe=R(()=>fo.value),st=Z(!1);dn(()=>{st.value=!0});const Ct=R(()=>!!(G&&fo.value));Ln("markstreamHostScrollManaged",Ct);const Qt=R(()=>!!(st.value&&Ct.value)),kn=R(()=>Tn.value||Ct.value),Ko=R(()=>Tn.value||Qt.value),Eo=R(()=>{var L;return kn.value&&((L=Po.value)==null?void 0:L.textEstimation)!==!1});function bo(){const L=ne.value||qt("getMeasuredContainerWidth.clientWidth",()=>{var q;return((q=O.value)==null?void 0:q.clientWidth)||0});return Number.isFinite(L)&&L>0?L:0}const Ns=R(()=>{const L=bo();return L>0?Math.max(1,Math.round(L)):640}),Do=R(()=>{var L,q;return!(Oe.value!==!0||fo.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(L=o.nodes)!=null&&L.length||Bt.value||!(((q=I.maxLiveNodes)!=null?q:0)<=0))}),Io=R(()=>{var L;return Do.value?50:Math.max(1,(L=I.maxLiveNodes)!=null?L:320)}),Qo=R(()=>{var L;return Do.value?16:Math.max(0,(L=I.liveNodeBuffer)!=null?L:60)}),sn=R(()=>{var L;return!Y.value&&I.nodeVirtual!==!1&&!(((L=I.maxLiveNodes)!=null?L:0)<=0&&!Do.value)&&(I.nodeVirtual===!0?St.value.length>0:St.value.length>Io.value)}),es=R(()=>sn.value||Tn.value||Ct.value),ms=R(()=>I.viewportPriority!==!1),Tr=R(()=>!!ms.value&&!K.value);var ts;ts=R(()=>ms.value),Ln(k$,ts);const Ki=R(()=>{var L;return!(Y.value||I.deferNodesUntilVisible===!1||((L=I.maxLiveNodes)!=null?L:0)<=0||sn.value||St.value.length>900||I.viewportPriority===!1)}),Js=Nde(L=>{var q;return ce((q=L??O.value)!=null?q:null)},ms),{requestFrame:Bo,cancelFrame:Zo,hasIdleCallback:Il,isTestEnv:Zi}=(function(L){const q=L.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,re=L.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ae=L.isClient&&typeof window.requestIdleCallback=="function",be=(function(){var Ne;if(typeof globalThis>"u"||!("process"in globalThis))return;const De=(Ne=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Ne.value;return De?.env})();return{requestFrame:q,cancelFrame:re,hasIdleCallback:ae,isTestEnv:be?.NODE_ENV==="test"}})({isClient:G}),tl=R(()=>Oe.value===!0&&!fo.value),{resolvedBatchSize:Ho,resolvedInitialBatch:Co,batchingEnabled:Fs,incrementalRenderingActive:Rs,renderedCount:yo,previousRenderContext:ht,adaptiveBatchSize:Le,previousBatchConfig:Ze}=(function(L,q){var re;const ae=R(()=>{var nt;const Be=Math.trunc((nt=L.renderBatchSize)!=null?nt:80);return Number.isFinite(Be)?Math.max(0,Be):0}),be=R(()=>{var nt;const Be=Math.trunc((nt=L.initialRenderBatchSize)!=null?nt:ae.value);return Number.isFinite(Be)?Math.max(0,Be):ae.value}),Ne=R(()=>!q.renderAsFragment.value&&L.batchRendering!==!1&&ae.value>0&&q.isClient&&!q.isTestEnv),De=Z(0),je=Z({key:L.indexKey,total:0}),ot=Z(Math.max(1,ae.value||1)),Ve=R(()=>{var nt,Be,Xe;return Ne.value&&!((nt=q.continuousStreaming)!=null&&nt.value)&&!((Be=q.forceFullRenderFinalContent)!=null&&Be.value)&&((Xe=L.maxLiveNodes)!=null?Xe:0)<=0}),Ye=Z({batchSize:ae.value,initial:be.value,delay:(re=L.renderBatchDelay)!=null?re:16,enabled:Ve.value});return{resolvedBatchSize:ae,resolvedInitialBatch:be,batchingEnabled:Ne,incrementalRenderingActive:Ve,renderedCount:De,previousRenderContext:je,adaptiveBatchSize:ot,previousBatchConfig:Ye}})(I,{isClient:G,isTestEnv:Zi,renderAsFragment:Y,forceFullRenderFinalContent:tl,continuousStreaming:R(()=>Tt.value&&Oe.value!==!0)}),Xt=R(()=>{var L;return!Y.value&&I.batchRendering!==!1&&Ho.value>0&&!Zi&&((L=I.maxLiveNodes)!=null?L:0)<=0&&!tl.value}),gs=R(()=>Xt.value),di=R(()=>kn.value||gs.value),Ei=R(()=>{var L;return di.value&&((L=Po.value)==null?void 0:L.codeBlockEstimation)!==!1}),ao=new Map,Gi=new Map,Er=new WeakMap;let fi=null;const Ll=new WeakMap,zo=new Map,Ir=[];let Qs=[],pi=[],se=-1;const xe=Xr(Ir),J=new Set,Ce=Z(0);let $e=0;const He=Z(0),vt=R(()=>(He.value,Array.from(ao.entries()).sort((L,q)=>L[0]-q[0]))),ut=Z(null),Dt=Z(null);let Et,ln=null,oo=0,Ot=null;function Pt(){Et.markFallbackHeightPrefixDirty()}function Yn(L){return Et.getFallbackNodeHeight(L)}function ko(L,q){return Et.estimateHeightRange(L,q)}function vs(L){return Et.estimateIndexForOffset(L)}const{activeRestoreAnchor:Os,getRelativeScrollTopWithinContainer:ei,setRelativeScrollTopWithinContainer:Lc,resolveAnchorOffset:U2,clearRestoreReconcile:$c,scheduleRestoreReconcile:yu,captureRestoreAnchor:Nc,restoreAnchor:Fc,getAnchorDrift:j2}=(function(L){const{isClient:q,containerRef:re,parsedNodeCount:ae,requestFrame:be,cancelFrame:Ne,resolveScrollContainer:De,getNormalizedScrollTop:je,getOffsetTopWithinRoot:ot,isReverseFlexScrollRoot:Ve,estimateIndexForOffset:Ye,estimateHeightRange:nt,getFallbackNodeHeight:Be,clamp:Xe}=L,lt=Z(null);let rt=null,wt=[];function dt(){const Kt=De(),fn=re.value;if(!Kt||!fn)return null;const vn=Kt.ownerDocument||fn.ownerDocument||document;if(Kt===vn.documentElement||Kt===vn.body||Kt===vn.scrollingElement){const Qn=fn.getBoundingClientRect();return Math.max(0,-Qn.top)}return Math.max(0,je(Kt,vn,!1)-ot(fn,Kt))}function Ft(Kt){var fn;const vn=De(),Qn=re.value;if(!vn||!Qn)return;const Hs=Math.max(0,Kt),Ss=vn.ownerDocument||Qn.ownerDocument||document,$r=Ss.defaultView||(typeof window<"u"?window:null);if(vn===Ss.documentElement||vn===Ss.body||vn===Ss.scrollingElement){const il=je(vn,Ss,!0)+Qn.getBoundingClientRect().top;return void((fn=$r?.scrollTo)==null||fn.call($r,0,Math.max(0,il+Hs)))}J_(vn,Ss,ot(Qn,vn)+Hs,{isReverseFlexScrollRoot:il=>{var K1;return(K1=Ve?.(il))!=null&&K1},getNormalizedScrollTop:je})}function Ht(Kt){const fn=ae.value,vn=Xe(Kt.nodeIndex,0,Math.max(0,fn-1));return nt(0,vn)+Math.max(0,Kt.offsetWithinNodePx)}function Vt(){if(rt!=null&&(Ne?.(rt),rt=null),q)for(const Kt of wt)window.clearTimeout(Kt);wt=[]}function Wt(Kt){const fn=Ht(Kt),vn=dt();vn!=null&&Math.abs(vn-fn)<=.5||Ft(fn)}return{activeRestoreAnchor:lt,getRelativeScrollTopWithinContainer:dt,setRelativeScrollTopWithinContainer:Ft,resolveAnchorOffset:Ht,clearRestoreReconcile:Vt,applyRestoreAnchor:Wt,scheduleRestoreReconcile:function(){lt.value&&q&&rt==null&&(rt=be?be(()=>{rt=null,lt.value&&Wt(lt.value)}):null,rt==null&<.value&&Wt(lt.value))},captureRestoreAnchor:function(){const Kt=dt(),fn=ae.value;if(Kt==null||fn<=0)return null;const vn=Xe(Ye(Kt+1),0,fn-1),Qn=nt(0,vn),Hs=Be(vn);return{nodeIndex:vn,offsetWithinNodePx:Xe(Kt-Qn,0,Math.max(0,Hs-1))}},restoreAnchor:function(Kt){const fn=ae.value;if(lt.value={nodeIndex:Xe(Kt.nodeIndex,0,Math.max(0,fn-1)),offsetWithinNodePx:Math.max(0,Kt.offsetWithinNodePx)},Vt(),Wt(lt.value),q)for(const vn of[0,120,280,480])wt.push(window.setTimeout(()=>{lt.value&&Wt(lt.value)},vn))},getAnchorDrift:function(Kt){const fn=dt();return fn==null?null:fn-Ht(Kt)}}})({isClient:G,containerRef:O,parsedNodeCount:Nn,requestFrame:Bo,cancelFrame:Zo,resolveScrollContainer:()=>ut.value||ue(),getNormalizedScrollTop:ze,getOffsetTopWithinRoot:_e,isReverseFlexScrollRoot:Se,estimateIndexForOffset:vs,estimateHeightRange:ko,getFallbackNodeHeight:Yn,clamp:Bs}),{nodeHeights:$l,heightStats:hi,heightTreeSize:x1,heightSumTree:a0,heightKnownTree:u0,averageNodeHeight:S1,resetHeightMeasurements:c0,pruneHeightMeasurements:d0,rebuildHeightTrees:Rc,recordNodeHeight:V2,removeNodeHeights:q2,exportHeightCache:ke,importHeightCache:Ae,fenwickRangeSum:Ke}=(function(L={}){const q=Go({}),re=Go({total:0,count:0}),ae=Z(0),be=Z([]),Ne=Z([]);function De(){for(const Be of Object.keys(q))delete q[Number(Be)];re.total=0,re.count=0,ae.value=0,be.value=[],Ne.value=[]}function je(Be,Xe,lt){for(let rt=Xe+1;rt0;rt-=rt&-rt)lt+=Be[rt];return lt}function Ve(Be){ae.value=Be;const Xe=new Array(Be+1).fill(0),lt=new Array(Be+1).fill(0);for(const[rt,wt]of Object.entries(q)){const dt=Number(rt),Ft=Number(wt);!Number.isFinite(dt)||dt<0||dt>=Be||!Number.isFinite(Ft)||Ft<=0||(je(Xe,dt,Ft),je(lt,dt,1))}be.value=Xe,Ne.value=lt}function Ye(Be){if(!Number.isInteger(Be)||Be<0)return!1;const Xe=q[Be];if(!Number.isFinite(Xe)||Xe<=0)return!1;if(delete q[Be],re.total=Math.max(0,re.total-Xe),re.count=Math.max(0,re.count-1),ae.value>Be){const lt=be.value,rt=Ne.value;lt.length&&rt.length&&(je(lt,Be,-Xe),je(rt,Be,-1))}return!0}const nt=R(()=>re.count>0?Math.max(12,re.total/re.count):32);return{nodeHeights:q,heightStats:re,heightTreeSize:ae,heightSumTree:be,heightKnownTree:Ne,averageNodeHeight:nt,resetHeightMeasurements:De,pruneHeightMeasurements:function(Be){if(Be<=0)return void De();let Xe=0,lt=0;for(const[rt,wt]of Object.entries(q)){const dt=Number(rt),Ft=Number(wt);!Number.isFinite(dt)||dt<0||dt>=Be||!Number.isFinite(Ft)||Ft<=0?delete q[dt]:(Xe+=Ft,lt++)}re.total=Xe,re.count=lt},rebuildHeightTrees:Ve,recordNodeHeight:function(Be,Xe,lt={}){(function(rt,wt,dt={}){var Ft;if(!Number.isFinite(wt)||wt<=0)return!1;const Ht=q[rt];if(Ht&&(dt.allowShrink===!1&&wtrt){const Vt=be.value,Wt=Ne.value;if(Vt.length&&Wt.length)if(Ht){const Kt=wt-Ht;Kt!==0&&je(Vt,rt,Kt)}else je(Vt,rt,wt),je(Wt,rt,1)}dt.notify!==!1&&((Ft=L.onHeightRecorded)==null||Ft.call(L))})(Be,Xe,rn(mt({},lt),{notify:!0}))},removeNodeHeight:function(Be,Xe={}){var lt;const rt=Ye(Be);return rt&&Xe.notify!==!1&&((lt=L.onHeightRecorded)==null||lt.call(L)),rt},removeNodeHeights:function(Be,Xe={}){var lt;let rt=0;for(const wt of Be)Ye(Number(wt))&&rt++;return rt>0&&Xe.notify!==!1&&((lt=L.onHeightRecorded)==null||lt.call(L)),rt},exportHeightCache:function(){return Object.entries(q).map(([Be,Xe])=>({index:Number(Be),height:Number(Xe)})).filter(Be=>Number.isFinite(Be.index)&&Be.index>=0&&Number.isFinite(Be.height)&&Be.height>0).sort((Be,Xe)=>Be.index-Xe.index)},importHeightCache:function(Be,Xe={}){var lt;if(!Array.isArray(Be))return;const rt=ae.value;let wt=!1;if(Xe.mode!=="merge"){const dt=Object.keys(q);if(dt.length>0){for(const Ft of dt)delete q[Number(Ft)];wt=!0}}for(const dt of Be){const Ft=Number(dt.index),Ht=Number(dt.height);if(!Number.isInteger(Ft)||Ft<0||rt>0&&Ft>=rt||!Number.isFinite(Ht)||Ht<=0)continue;const Vt=q[Ft];Vt&&Math.abs(Vt-Ht)<=1||(q[Ft]=Ht,wt=!0)}wt&&((function(){let dt=0,Ft=0;const Ht=ae.value;for(const[Vt,Wt]of Object.entries(q)){const Kt=Number(Vt),fn=Number(Wt);!Number.isFinite(Kt)||Kt<0||Ht>0&&Kt>=Ht||!Number.isFinite(fn)||fn<=0?delete q[Kt]:(dt+=fn,Ft++)}re.total=dt,re.count=Ft})(),rt>0&&Ve(rt),(lt=L.onHeightRecorded)==null||lt.call(L))},fenwickRangeSum:function(Be,Xe,lt){if(lt<=Xe)return 0;const rt=ot(Be,lt-1);return Xe<=0?rt:rt-ot(Be,Xe-1)}}})({onHeightRecorded:()=>{Pt(),Ct.value&&z1(),Os.value&&yu(),Dt.value&&Uc(),po("node-resize")}});function Mt(L){Number.isInteger(L)&&L>=0&&J.add(L)}function Gt(L){for(const q of L)Mt(Number(q))}function an(L){$e++;let q=!0;try{const re=L();return q=re!==!1,re}finally{$e--,$e===0&&q&&Ce.value++}}function Fn(){Qs=[],pi=[],se=-1,J.clear(),xe.value=Ir}function so(){Fn(),an(()=>c0()),zo.clear()}function Ps(L){!Number.isInteger(L)||L<0||L>=St.value.length||zo.set(L,I1(L))}function ku(L,q,re={}){const ae=$l[L];Mt(L),V2(L,q,re);const be=$l[L];return Object.is(ae,be)?(J.delete(L),!1):(be&&be>0?Ps(L):ae&&zo.delete(L),!0)}function A1(L,q){const re=qt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ae,be;return(be=(ae=ao.get(L))==null?void 0:ae.offsetHeight)!=null?be:0});return re>0?re:qt("getNodeLayoutHeight.content.offsetHeight",()=>q.offsetHeight)}function a6(L,q={}){q.mode!=="merge"?Fn():Gt(L.map(re=>re.index)),an(()=>Ae(L,q)),bv()}const nl=R(()=>Ki.value&&Tr.value),wF=R(()=>{var L;return!Y.value&&I.batchRendering!==!1&&Ho.value>0&&((L=I.maxLiveNodes)!=null?L:0)<=0}),_F=R(()=>!Y.value&&Ge&&Oe.value===!0&&!sn.value&&!fo.value&&!co.value&&!nl.value&&!wF.value),u6=R(()=>!!Js&&nl.value),c6=R(()=>sn.value||Ct.value),{focusIndex:Nl,liveRange:Ds,updateLiveRange:M1}=(function(L,q){const{parsedNodeCount:re,virtualizationEnabled:ae,maxLiveNodesResolved:be,liveNodeBufferResolved:Ne,clamp:De}=q,je=Ne??R(()=>{var Ye;return Math.max(0,(Ye=L.liveNodeBuffer)!=null?Ye:60)}),ot=Z(0),Ve=Go({start:0,end:0});return{liveNodeBufferResolved:je,focusIndex:ot,liveRange:Ve,updateLiveRange:function(){const Ye=re.value;if(!ae.value||Ye===0)return Ve.start=0,void(Ve.end=Ye);const nt=Math.min(be.value,Ye),Be=je.value,Xe=De(ot.value-Be,0,Math.max(0,Ye-nt));Ve.start=Xe,Ve.end=Math.min(Ye,Xe+nt)}}})(I,{parsedNodeCount:Nn,virtualizationEnabled:sn,maxLiveNodesResolved:Io,liveNodeBufferResolved:Qo,clamp:Bs}),ol=new Map,bu=new Map,da=new Map,f0=[],Fl=new Map,fa=new Set,d6=Z(0);let K2=!1;const f6=R(()=>(d6.value,fa.size)),Yi=new Map,sl=new Map,p6=Z(0),Z2=R(()=>{p6.value;let L=0;for(const q of Yi.values())L+=Math.max(0,q);return L});let Xi=null;const p0=R(()=>{if(!sn.value)return St.value.length;const L=Qo.value,q=Math.max(Ds.end+L,Co.value),re=Math.min(St.value.length,q);return Math.max(yo.value,re)});function h0(){K2||(K2=!0,queueMicrotask(()=>{K2=!1,d6.value+=1}))}function h6(L,q,re="node-resize"){if(!G||typeof window>"u")return null;const ae=window.setTimeout(()=>{fa.delete(ae)&&h0();try{q()}finally{po(re)}},Math.max(0,L));return fa.add(ae),h0(),ae}function m0(L){G&&L!=null&&(fa.delete(L)&&h0(),window.clearTimeout(L))}function m6(){if(G&&typeof window<"u")for(const L of fa)window.clearTimeout(L);fa.size&&(fa.clear(),h0()),f0.length=0,da.clear()}function xF(L){F.value=L}function SF(L){U.value=L}function AF(L){z.value=L}const{cancelScheduledFocusSync:G2,scheduleFocusSync:Lr}=(function(L){const{isClient:q,containerRef:re,virtualizationEnabled:ae,requestFrame:be,cancelFrame:Ne,syncFocusToScroll:De}=L;let je=null;function ot(){var Ye,nt,Be;return(Be=(nt=(Ye=re.value)==null?void 0:Ye.ownerDocument)==null?void 0:nt.defaultView)!=null?Be:typeof window<"u"?window:null}function Ve(){if(!je)return;const Ye=ot();je.viaTimeout?Ye?Ye.clearTimeout(je.id):clearTimeout(je.id):Ne?.(je.id),je=null}return{cancelScheduledFocusSync:Ve,scheduleFocusSync:function(Ye={}){if(!ae.value)return;if(!q)return void De(!0);if(Ye.immediate)return Ve(),void De(!0);if(je)return;const nt=()=>{je=null,De()};if(be)return void(je={id:be(nt),viaTimeout:!1});const Be=ot();je={id:Be?Be.setTimeout(nt,16):setTimeout(nt,16),viaTimeout:!0}}}})({isClient:G,containerRef:O,virtualizationEnabled:sn,requestFrame:Bo,cancelFrame:Zo,syncFocusToScroll:function(L=!1){var q;if(!sn.value)return;const re=ut.value||ue();if(!re)return;const ae=re.ownerDocument||((q=O.value)==null?void 0:q.ownerDocument)||document,be=ae?.defaultView||(typeof window<"u"?window:null),Ne=re===ae?.documentElement||re===ae?.body,De=St.value.length;if(De<=0)return;if(!Ne&&De>0&&Se(re)){const rt=qt("syncFocusToScroll.clientHeight",()=>re.clientHeight||0),wt=qt("syncFocusToScroll.scrollTop",()=>re.scrollTop),dt=wt<0?-wt:wt;return void y0(Bs((je=Math.max(0,dt)+.5*Math.max(0,rt),Et.estimateIndexForOffsetFromEnd(je)),0,Math.max(0,De-1)),L)}var je;const ot=(function(rt,wt,dt,Ft){const Ht=O.value;if(!Ht)return null;const Vt=Ft?0:qt("syncFocusToScroll.model.root.getBoundingClientRect",()=>rt.getBoundingClientRect().top),Wt=qt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Ht.getBoundingClientRect().top),Kt=Math.max(0,Vt-Wt),fn=Ft?qt("syncFocusToScroll.model.viewport.clientHeight",()=>{var vn,Qn,Hs,Ss;return(Ss=(Hs=(Qn=dt?.innerHeight)!=null?Qn:(vn=wt.documentElement)==null?void 0:vn.clientHeight)!=null?Hs:rt.clientHeight)!=null?Ss:0}):qt("syncFocusToScroll.model.root.clientHeight",()=>rt.clientHeight);return Bs(vs(Kt+.5*Math.max(0,fn)),0,Math.max(0,St.value.length-1))})(re,ae,be,Ne);if(ot!=null)return void y0(ot,L);const Ve=Ne?null:qt("syncFocusToScroll.root.getBoundingClientRect",()=>re.getBoundingClientRect()),Ye=Ne?0:Ve.top,nt=Ne?qt("syncFocusToScroll.viewport.clientHeight",()=>{var rt,wt;return(wt=(rt=be?.innerHeight)!=null?rt:re.clientHeight)!=null?wt:0}):Ve.bottom,Be=vt.value;let Xe=null,lt=null;for(const[rt,wt]of Be){if(!wt)continue;const dt=qt("syncFocusToScroll.slot.getBoundingClientRect",()=>wt.getBoundingClientRect());dt.bottom<=Ye||dt.top>=nt||(Xe==null&&(Xe=rt),lt=rt)}if(Xe==null||lt==null){const rt=O.value;if(!rt)return;const wt=Ne?{top:0}:qt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>re.getBoundingClientRect()),dt=qt("syncFocusToScroll.fallback.scrollTop",()=>ze(re,ae,Ne)),Ft=Ne?(()=>{const Vt=qt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>rt.getBoundingClientRect()),Wt=(Ne?0:wt.top)-Vt.top;return Math.max(0,Wt)})():(()=>{const Vt=_e(rt,re);return Math.max(0,dt-Vt)})(),Ht=Ne?qt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var Vt,Wt,Kt,fn;return(fn=(Kt=(Wt=be?.innerHeight)!=null?Wt:(Vt=ae?.documentElement)==null?void 0:Vt.clientHeight)!=null?Kt:re.clientHeight)!=null?fn:0}):qt("syncFocusToScroll.fallback.root.clientHeight",()=>re.clientHeight);return void y0(Bs(vs(Ft+.5*Math.max(0,Ht)),0,Math.max(0,St.value.length-1)),!0)}y0(Math.round((Xe+lt)/2),L)}}),{visibleNodeIndices:Y2,nodeVisibilityHandles:Oc,nodeVisibilityWatchStops:g0,nodeVisibilityFallbackTimers:g6,clearVisibilityFallback:v0,markNodeVisible:pa,cleanupNodeVisibility:MF,destroyNodeVisibilityState:X2}=epe({isClient:G,shouldTrackVisibleNodeIndices:()=>nl.value,shouldCleanupNodeVisibility:()=>sn.value,onNodeMarkedVisible:L=>{sn.value?Lr():Nl.value=Bs(L,0,Math.max(0,St.value.length-1))},onNodeVisibilityCleaned:L=>{ao.delete(L)&&j6()}}),{cleanupScrollListener:v6,setupScrollListener:TF}=(function(L){const{isClient:q,virtualizationEnabled:re,listenerEnabled:ae,scrollRootElement:be,resolveScrollContainer:Ne,scheduleFocusSync:De,onScroll:je}=L;let ot=null,Ve=null;function Ye(){ot&&(ot(),ot=null),Ve=null,be.value=null}function nt(Be){const Xe=L.getScrollTop?L.getScrollTop(Be):Be.scrollTop;return Math.max(0,Number.isFinite(Xe)?Math.abs(Xe):0)}return{cleanupScrollListener:Ye,setupScrollListener:function(){if(!q)return;if(!((Be=ae?.value)!=null?Be:re.value))return void Ye();var Be;const Xe=Ne();if(!Xe)return void Ye();if(be.value===Xe&&ot)return;Ye(),Ve=nt(Xe);const lt=()=>{if(je?.(),re.value){const rt=(function(wt){const dt=nt(wt),Ft=Ve;Ve=dt;const Ht=Math.max(480,.75*(wt.clientHeight||0));return Ft==null?dt>Ht?{immediate:!0}:void 0:Math.abs(dt-Ft)>Ht?{immediate:!0}:void 0})(Xe);rt?De(rt):De()}};Xe.addEventListener("scroll",lt,{passive:!0}),be.value=Xe,ot=()=>{Xe.removeEventListener("scroll",lt)}}}})({isClient:G,virtualizationEnabled:sn,listenerEnabled:c6,scrollRootElement:ut,resolveScrollContainer:ue,scheduleFocusSync:Lr,onScroll:function(){const L=Dt.value;if(!L)return;const q=E1();if(!q||(function(ae){if(R1()>=oo)return Ot=null,!1;const be=Ot;if(be==null)return!0;const Ne=Math.abs(ae.scrollTop-be)<=2;return Ne||(Ot=null),Ne})(q))return;const re=$6(q);re!=null?(re<-32||Math.abs(Math.max(0,re)-Math.max(0,L.distanceFromBottomPx))>32)&&Wc("restore"):Wc("restore")},getScrollTop:L=>{var q;const re=L.ownerDocument||((q=O.value)==null?void 0:q.ownerDocument)||document,ae=L===re.documentElement||L===re.body||L===re.scrollingElement;return qt("scrollListener.getScrollTop",()=>ze(L,re,ae))}});function y0(L,q=!1){const re=Bs(L,0,Math.max(0,St.value.length-1));!q&&Math.abs(re-Nl.value)<=1||(Nl.value=re,M1())}function Bs(L,q,re){return Math.min(Math.max(L,q),re)}function J2(L=St.value.length){const q=hs();return!Number.isInteger(q)||q<0?L:Bs(q,0,L)}function Q2(L){return L?.firstElementChild}function y6(L,q){var re;return L?(re=L.matches)!=null&&re.call(L,q)?L:L.querySelector(q):null}function EF(L,q){L<1||L>6||(W[L]=q)}function k6(){if(!kn.value)return void(ne.value=0);const L=qt("updateExperimentContainerWidth.clientWidth",()=>{var q,re;return(re=(q=O.value)==null?void 0:q.clientWidth)!=null?re:0});ne.value=L>0?L:0}let T1=null;function ev(){T1?.disconnect(),T1=null}const b6=Af("ViewportDeferredMarkdownCodeBlockNode",zr({loader:()=>mo(null,null,function*(){return(yield jo(()=>import("./index5-Cn2jfVMX.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:dg,delay:0,suspensible:!1}),dg);function C6(L){return L===b6}const w6=R(()=>m.value==="pre"?Pi:m.value==="shiki"?b6:X9);function _6(){var L;return((L=I.codeBlockProps)==null?void 0:L.showHeader)!==!1}function x6(L,q,re){const ae=$l[q],be=typeof ae=="number"&&ae>0;if(Eo.value&&!be&&!(function(Ne){return!!In.value.paragraph&&(Ne.type==="paragraph"||Ne.type==="list_item"||Ne.type==="list")})(L)){const Ne=S$(L,re,X.value);if(Ne)return Ne}if(Ei.value&&L.type==="code_block"){const Ne=(function(De){if(De.type!=="code_block")return null;const je=n7(De,T0(De));return C6(je)?"markdown":je===Pi?"pre":je===w6.value||je===X9?"monaco":null})(L);if(Ne==="monaco"||Ne==="markdown"||Ne==="pre")return(function(De,je){var ot,Ve,Ye;if(!De||De.type!=="code_block")return null;const nt=je.rendererKind,Be=nt!=="pre"&&je.showHeader!==!1,Xe=!!De.diff;let lt=0,rt=500;if(nt==="monaco"){const dt=(ot=je.monacoOptions)!=null?ot:{},Ft=r4(De,dt,je.width),Ht=(function(Wt){const Kt=typeof Wt?.fontSize=="number"&&Wt.fontSize>0?Wt.fontSize:12;return typeof Wt?.lineHeight=="number"&&Wt.lineHeight>0?Wt.lineHeight:Math.round(1.5*Kt)})(dt),Vt=(function(Wt,Kt){var fn,vn;const Qn=typeof((fn=Wt?.padding)==null?void 0:fn.top)=="number"?Wt.padding.top:Kt?0:8,Hs=typeof((vn=Wt?.padding)==null?void 0:vn.bottom)=="number"?Wt.padding.bottom:Kt?0:8;return Math.max(0,Qn)+Math.max(0,Hs)})(dt,Xe);rt=typeof dt.MAX_HEIGHT=="number"&&dt.MAX_HEIGHT>0?dt.MAX_HEIGHT:500,lt=Math.round(Ft*Ht+Vt)}else if(nt==="markdown"){const dt=r4(De);lt=Math.round(21*dt+32)}else{const dt=r4(De);lt=Math.round(28*dt),rt=Number.POSITIVE_INFINITY}const wt=Math.max(1,Math.min(lt,rt));return mt({kind:"code-block",height:Math.round(wt+(Be?40:0)),contentHeight:wt,rendererKind:nt},Xe&&nt==="monaco"?{diffInline:v5((Ve=je.monacoOptions)!=null?Ve:{},(Ye=je.width)!=null?Ye:0)}:{})})(L,{rendererKind:Ne,monacoOptions:I.codeBlockMonacoOptions,showHeader:_6(),width:re})}return null}I4(()=>{if(Ce.value,$e>0)return;const L=St.value,q=Jo();if(!L.length||!di.value)return Qs=[],pi=[],se=-1,J.clear(),void(xe.value=Ir);const re=ne.value||qt("estimatedNodeHeights.clientWidth",()=>{var Ve;return((Ve=O.value)==null?void 0:Ve.clientWidth)||0});if(!Number.isFinite(re)||re<=0)return Qs=[],pi=[],se=-1,J.clear(),void(xe.value=Ir);const ae=(function(Ve){return[Math.round(Ve),Eo.value,Ei.value,X.value,I.codeBlockMonacoOptions,_6(),m.value,In.value,o4.value]})(re),be=Qs.length<=L.length&&(De=ae,(Ne=pi).length===De.length&&Ne.every((Ve,Ye)=>Object.is(Ve,De[Ye])));var Ne,De;const je=be&&se===q?L.length:be?J2(L.length):0,ot=be?Array.from(J):[];Qs.length=L.length;for(let Ve=je;Ve=0&&Vexe.value);Et=(function(L){let q=!0,re=[0],ae="";function be(Ye){var nt;const Be=L.nodeHeights[Ye];if(Number.isFinite(Be)&&Be>0)return Be;const Xe=L.parsedNodes.value[Ye],lt=Xe?.type,rt=!!((nt=L.hasCustomParagraphComponent)!=null&&nt.call(L)),wt=L.estimatedNodeHeights.value[Ye],dt=wt?.height;if(!(function(Ht,Vt,Wt){return!!(Wt&&Vt?.kind==="simple-text"&&(Ht==="paragraph"||Ht==="list_item"||Ht==="list"))})(lt,wt,rt)&&Number.isFinite(dt)&&dt>0)return dt;const Ft=Wfe(Xe,L.getContainerWidth()||640);return lt==="heading"||lt==="paragraph"&&Ft<=28&&(function(Ht,Vt){if(Vt)return!1;const Wt=Ht.children;return!Array.isArray(Wt)||!Wt.length||Wt.every(M$)})(Xe,rt)?Ft:Math.max(L.averageNodeHeight.value,Ft)}function Ne(){var Ye;const nt=L.parsedNodes.value.length,Be=L.getPrefixCacheKeyParts().join(":");if(!q&&ae===Be)return re;const Xe=new Array(nt+1);Xe[0]=0;for(let lt=0;lt=((nt=lt[Xe])!=null?nt:0))return Xe-1;let rt=0,wt=Xe-1,dt=Xe-1;for(;rt<=wt;){const Ft=rt+wt>>1;((Be=lt[Ft+1])!=null?Be:0)>=Ye?(dt=Ft,wt=Ft-1):rt=Ft+1}return dt}function je(Ye,nt){var Be,Xe;if(Ye>=nt)return 0;if(L.heightEstimationActive.value)return(function(wt,dt){var Ft,Ht;const Vt=L.parsedNodes.value.length,Wt=tx(Math.trunc(wt),0,Vt),Kt=tx(Math.trunc(dt),Wt,Vt);if(Wt>=Kt)return 0;const fn=Ne();return((Ft=fn[Kt])!=null?Ft:0)-((Ht=fn[Wt])!=null?Ht:0)})(Ye,nt);if(L.heightTreeSize.value!==L.parsedNodes.value.length){let wt=0;for(let dt=Ye;dtWt<=0?0:L.fenwickRangeSum(rt,0,Wt)+(Wt-L.fenwickRangeSum(wt,0,Wt))*lt;let Ft=0,Ht=Be.length-1,Vt=Be.length-1;for(;Ft<=Ht;){const Wt=Ft+Ht>>1;dt(Wt+1)>=Ye?(Vt=Wt,Ht=Wt-1):Ft=Wt+1}return Vt}let Xe=Ye;for(let lt=0;lt0||Ye++}return Ye}return{markFallbackHeightPrefixDirty:function(){q=!0},getFallbackNodeHeight:be,estimateHeightRange:je,estimateIndexForOffset:ot,estimateIndexForOffsetFromEnd:function(Ye){var nt,Be;const Xe=L.parsedNodes.value;if(!Xe.length)return 0;if(Ye<=0)return Math.max(0,Xe.length-1);if(L.heightEstimationActive.value){const rt=(nt=Ne()[Xe.length])!=null?nt:0;return De(Math.max(0,rt-Ye))}if(L.heightTreeSize.value===Xe.length){const rt=je(0,Xe.length);return ot(Math.max(0,rt-Ye))}let lt=Ye;for(let rt=Xe.length-1;rt>=0;rt--){const wt=(Be=L.nodeHeights[rt])!=null?Be:L.averageNodeHeight.value;if(lt<=wt)return rt;lt-=wt}return 0},getEstimatedNodeHeightCount:Ve,buildVirtualHeightSummary:function(Ye){var nt;const Be=L.parsedNodes.value.length;return{totalNodes:Be,measuredCount:L.heightStats.count,estimatedCount:Ve(),averageNodeHeight:L.averageNodeHeight.value,topSpacerHeight:Ye.topSpacerHeight,bottomSpacerHeight:Ye.bottomSpacerHeight,estimatedTotalHeight:je(0,Be),width:(nt=Ye.width)!=null?nt:L.getContainerWidth()}}}})({parsedNodes:St,nodeHeights:$l,heightStats:hi,heightTreeSize:x1,heightSumTree:a0,heightKnownTree:u0,averageNodeHeight:S1,heightEstimationActive:kn,estimatedNodeHeights:Pc,getContainerWidth:bo,hasCustomParagraphComponent:()=>!!In.value.paragraph,getPrefixCacheKeyParts:()=>{var L;const q=uf(ne.value||qt("getFallbackHeightPrefix.clientWidth",()=>{var ae;return((ae=O.value)==null?void 0:ae.clientWidth)||0})),re=((L=o.virtualScroll)==null?void 0:L.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[St.value.length,hi.count,Math.round(hi.total),Math.round(100*S1.value),re,q,kn.value?1:0,o4.value,ie.value,In.value.paragraph?1:0]},fenwickRangeSum:Ke}),Je(()=>St.value.length,L=>{var q;Pt(),L<=0?so():(Ld0(q))),L!==x1.value&&Rc(L))},{immediate:!0});const IF=R(()=>{if(!sn.value)return St.value.map((ae,be)=>({node:ae,index:be}));const L=St.value.length,q=Bs(Ds.start,0,L),re=Bs(Ds.end,q,L);return St.value.slice(q,re).map((ae,be)=>({node:ae,index:q+be}))}),tv=R(()=>sn.value?ko(0,Math.min(Ds.start,St.value.length)):0),nv=R(()=>{if(!sn.value)return 0;const L=St.value.length;return ko(Math.min(Ds.end,L),L)});function S6(){return Et.buildVirtualHeightSummary({topSpacerHeight:tv.value,bottomSpacerHeight:nv.value,width:Cu()})}function LF(){const L=St.value,q=S6();return rn(mt({},q),{probe:{paragraphReady:!!X.value.paragraph,listItemReady:!!X.value.listItem,listWrapperOverhead:X.value.listWrapperOverhead,headingReadyLevels:Object.entries(X.value.headings).filter(([,re])=>!!re).map(([re])=>Number(re))},nodes:L.map((re,ae)=>{var be,Ne,De,je,ot,Ve,Ye,nt,Be;return{index:ae,type:re.type,estimateKind:(Ne=(be=Pc.value[ae])==null?void 0:be.kind)!=null?Ne:null,rendererKind:(je=(De=Pc.value[ae])==null?void 0:De.rendererKind)!=null?je:null,estimatedHeight:(Ve=(ot=Pc.value[ae])==null?void 0:ot.height)!=null?Ve:null,estimatedContentHeight:(nt=(Ye=Pc.value[ae])==null?void 0:Ye.contentHeight)!=null?nt:null,measuredHeight:(Be=$l[ae])!=null?Be:null}})})}function ov(){return o.indexKey!=null?String(o.indexKey):fo.value?`virtual-${wo()}`:"markdown-renderer"}function A6(L){const q=String(L),re=`${ov()}-`;if(!q.startsWith(re))return null;const ae=q.slice(re.length).match(/^(\d+)(?:$|-)/);if(!ae)return null;const be=Number(ae[1]);return!Number.isInteger(be)||be<0||be>=St.value.length?null:be}function wo(){var L,q,re;const ae=(L=o.virtualScroll)==null?void 0:L.sessionKey;return String(ae!=null&&ae!==""?ae:(re=(q=o.indexKey)!=null?q:I.customId)!=null?re:ps)}function ns(){var L;const q=(L=o.virtualScroll)==null?void 0:L.threadKey;return q==null||q===""?void 0:String(q)}const $F=R(()=>{var L,q,re;return(re=ns())!=null?re:String((q=(L=o.indexKey)!=null?L:I.customId)!=null?q:ps)});function sv(L){var q;return(L??"")===((q=ns())!=null?q:"")}function Rl(){var L,q,re;return q=(L=o.virtualScroll)==null?void 0:L.measurementKey,re=(function(){const ae=m.value;return(function(be){var Ne,De;const je=be.renderer,ot=je==="monaco"?be.codeBlockMonacoOptions:void 0,Ve=be.codeBlockProps,Ye=je==="shiki";return[be.isDark?"dark":"light",je==="monaco"?"code-rich":je==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",As(be.codeBlockMinWidth),As(be.codeBlockMaxWidth),...Ye?[Lce((Ne=Ve?.themes)!=null?Ne:be.themes,(De=Ve?.langs)!=null?De:be.langs)]:[],As(ot?.fontSize),As(ot?.lineHeight),As(ot?.fontFamily),As(ot?.tabSize),As(ot?.MAX_HEIGHT),As(ot?.wordWrap),As(ot?.wrappingIndent),As(ot?.padding),As(Ve?.showHeader),As(Ve?.showCopyButton),As(Ve?.showExpandButton),As(Ve?.showPreviewButton),As(Ve?.showCollapseButton),As(Ve?.showFontSizeButtons)].join("\0")})({renderer:ae,isDark:I.isDark,codeBlockStream:I.codeBlockStream,codeBlockMinWidth:I.codeBlockMinWidth,codeBlockMaxWidth:I.codeBlockMaxWidth,codeBlockMonacoOptions:ae==="monaco"?I.codeBlockMonacoOptions:void 0,codeBlockProps:I.codeBlockProps,themes:ae==="shiki"?I.themes:void 0,langs:ae==="shiki"?I.langs:void 0})})(),[q==null?"":String(q),re].join("\0")}function Cu(){return bo()}const k0=R(()=>uf(Cu())),Ji=R(()=>[Rl(),k0.value].join("\0")),NF=R(()=>{var L;return fo.value?["virtual",(L=ns())!=null?L:"",wo(),Ji.value].join("\0"):o.indexKey});function Dc(){p6.value+=1}function iv(L){return!(!L||!Number.isInteger(L.index)||L.index<0||L.index>=St.value.length||L.sessionKey!==wo()||L.threadKey!==ns()||L.layoutEpochKey!==Ji.value)}function M6(L){const q=String(L),re=sl.get(q);return re?iv(re)?re.index:null:A6(q)}function T6(L="async-node"){(Yi.size||sl.size)&&(Yi.clear(),sl.clear(),Dc(),po(L))}const Bc=nn(G3,null),rv={reportHeight(L,q){if(!Ct.value)return;const re=M6(L);if(re==null)return;const ae=ol.get(re);if(!ae)return;const be=Number(q),Ne=A1(re,ae);(function(De,je,ot={}){an(()=>ku(De,je,ot))})(re,Number.isFinite(be)&&be>0?Math.max(be,Ne||0):Ne)},markPending(L){if(!Ct.value)return;const q=A6(L);q!=null&&(function(re,ae){var be;const Ne=sl.get(re);if(Ne&&iv(Ne))return Yi.set(re,Math.max(0,(be=Yi.get(re))!=null?be:0)+1),Dc(),void po("async-node");Yi.set(re,1),sl.set(re,(function(De){return{index:De,sessionKey:wo(),threadKey:ns(),layoutEpochKey:Ji.value}})(ae)),Dc(),po("async-node")})(String(L),q)},markSettled(L){if(!Ct.value)return;const q=String(L),re=M6(L);(re!=null||(function(ae){return Yi.has(String(ae))})(q))&&(function(ae){var be;const Ne=(be=Yi.get(ae))!=null?be:0;return!(Ne<=0||(Ne<=1?(Yi.delete(ae),sl.delete(ae)):Yi.set(ae,Ne-1),Dc(),Ne===1&&po("async-node"),0))})(q)&&re!=null&&Ol()}};function FF(){let L=0;for(const q of ol.values())L+=qt("getVisibleDomHeight.offsetHeight",()=>{var re;return(re=q?.offsetHeight)!=null?re:0});return Math.ceil(Math.max(0,L))}Ln(G3,{reportHeight(L,q){rv.reportHeight(L,q),Bc?.reportHeight(L,q)},markPending(L){rv.markPending(L),Bc?.markPending(L)},markSettled(L){rv.markSettled(L),Bc?.markSettled(L)}});let lv,av=null,Hc=null;function b0(L){return L!==!1&&L!=null&&L!==""}function E6(){return sn.value?(function(){if(!sn.value)return!0;const L=St.value.length,q=Bs(Ds.start,0,L),re=Bs(Ds.end,q,L);if(q>=re)return!0;for(let ae=q;ae=p0.value}function uv(){return Oe.value===!0&&!at.value&&Z2.value===0&&fa.size===0&&Fl.size===0&&Xi==null&&E6()}function I6(){var L,q;if(((L=o.virtualScroll)==null?void 0:L.settleMode)!=="manual"||av===wo()&&lv===ns())return!0;const re=(q=o.virtualScroll)==null?void 0:q.settledToken;return!!b0(re)&&Hc===W1(re)}function cv(){return uv()&&I6()}function RF(L,q){return q.totalNodes<=0?L==="final"?"final":"estimate":q.measuredCount>=q.totalNodes?L==="final"?"final":"measured":q.measuredCount>0||q.estimatedCount>0?"mixed":"estimate"}function wu(L="manual",q){const re=S6(),ae=(function(be){return be||(Oe.value!==!0?St.value.length>0?"streaming":"estimating":!E6()||Fl.size>0||Xi!=null?"measuring":cv()?"settled":"settling")})(q);return{sessionKey:wo(),threadKey:ns(),phase:ae,nodeCount:re.totalNodes,liveRange:{start:Ds.start,end:Ds.end},renderedCount:yo.value,measuredCount:re.measuredCount,estimatedCount:re.estimatedCount,averageNodeHeight:re.averageNodeHeight,topSpacerHeight:re.topSpacerHeight,bottomSpacerHeight:re.bottomSpacerHeight,visibleDomHeight:FF(),totalHeight:L6(),width:re.width,final:Oe.value===!0,stable:cv(),confidence:RF(ae,re),reason:L}}function E1(){const L=ut.value||ue(),q=O.value;if(!L||!q)return null;const re=L.ownerDocument||q.ownerDocument||document,ae=L===re.documentElement||L===re.body||L===re.scrollingElement,be=qt("getScrollBox.scrollTop",()=>ze(L,re,ae)),Ne=qt("getScrollBox.scrollHeight",()=>{var je,ot,Ve,Ye,nt;return ae?Math.max((ot=(je=re.documentElement)==null?void 0:je.scrollHeight)!=null?ot:0,(Ye=(Ve=re.body)==null?void 0:Ve.scrollHeight)!=null?Ye:0,(nt=L.scrollHeight)!=null?nt:0):L.scrollHeight}),De=qt("getScrollBox.clientHeight",()=>{var je;return ae?((je=re.documentElement)==null?void 0:je.clientHeight)||L.clientHeight||0:L.clientHeight});return{root:L,doc:re,isViewportRoot:ae,scrollTop:be,scrollHeight:Ne,clientHeight:De}}function L6(){const L=St.value.length,q=Math.max(0,ko(0,L)),re=qt("getRendererLogicalHeight.offsetHeight",()=>{var be,Ne;return(Ne=(be=O.value)==null?void 0:be.offsetHeight)!=null?Ne:0}),ae=Math.max(0,re>0?re:qt("getRendererLogicalHeight.scrollHeight",()=>{var be,Ne;return(Ne=(be=O.value)==null?void 0:be.scrollHeight)!=null?Ne:0}));return L<=0?Math.ceil(re):sn.value?q>0?Math.max(1,Math.ceil(q),(function(){let be=tv.value+nv.value;for(const Ne of ao.values())Ne&&(be+=Math.max(0,qt("getVirtualizedDomLogicalHeight.offsetHeight",()=>Ne.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,Ne){return be<=0||Ne<=0?0:Ne<=be+Math.max(512,.05*be)?Math.ceil(Ne):0})(q,ae)):Math.max(1,Math.ceil(ae)):Ct.value?q>0||hi.count>0||Et.getEstimatedNodeHeightCount()>0?(Rs.value&&yo.value,Math.max(1,Math.ceil(ae),Math.ceil(q))):Math.ceil(ae):Math.max(1,Math.ceil(ae),Math.ceil(q))}function $6(L){const q=O.value;if(!q)return null;const re=qt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>q.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:qt("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(L)-re.bottom}function OF(L={}){const q=L.requireViewport!==!1,re=(function(Ne=64){const De=E1(),je=O.value;if(!De||!je)return!1;const ot=(function(Ye){if(Ye.isViewportRoot)return{top:0,bottom:Ye.clientHeight};const nt=qt("getVirtualViewportRect.getBoundingClientRect",()=>Ye.root.getBoundingClientRect());return{top:nt.top,bottom:nt.bottom}})(De),Ve=qt("isRendererNearVirtualViewport.getBoundingClientRect",()=>je.getBoundingClientRect());return Ve.bottom>=ot.top-Ne&&Ve.top<=ot.bottom+Ne})();if(q&&!re)return null;const ae=(function(){const Ne=E1(),De=O.value;if(!Ne||!De||Math.max(0,Ne.scrollHeight-Ne.scrollTop-Ne.clientHeight)>64)return null;const je=$6(Ne);return je==null?null:je>=-8&&je<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,je)}:null})();if(ae)return{anchor:ae,captured:!0};const be=Nc();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:re};if(L.allowFallback===!0){const Ne=(function(){const De=St.value.length;return De<=0?null:{type:"node",nodeIndex:Bs(Nl.value,0,Math.max(0,De-1)),offsetWithinNodePx:0}})();return Ne?{anchor:Ne,captured:!1}:null}return null}function dv(L){let q=2166136261;for(let re=0;re>>0).toString(36)}function PF(L,q){let re=L;for(let ae=0;ae8192?`${ae.slice(0,8192)}...${ae.length}`:ae;return`${ae.length}:${dv(be)}`})(L)}`;if(typeof L=="function")return"fn";if(typeof L!="object")return typeof L;if(q.has(L))return"cycle";if(re>=6)return"max-depth";q.add(L);try{if(Array.isArray(L)){if(L.length<=160){const Ve=[];for(let Ye=0;Ye=je&&De.push(Ye)}return[`a:${L.length}`,`h=${Ne.join(",")}`,`t=${De.join(",")}`,`all=${(ot>>>0).toString(36)}`].join(":")}const ae=L,be=Object.keys(ae).filter(Ne=>{const De=ae[Ne];return Ne!=="parent"&&Ne!=="el"&&Ne!=="component"&&(De==null||typeof De=="string"||typeof De=="number"||typeof De=="boolean"||DF.has(Ne))}).sort();return`o:${be.length}:${be.map(Ne=>`${Ne}=${C0(ae[Ne],q,re+1)}`).join(";")}`}finally{q.delete(L)}}let fv=-1,pv="",_u=[2166136261];function I1(L){const q=St.value[L];return q?dv(C0(q)):""}function BF(L,q){let re=L;for(let ae=0;ae>>0}function hv(){var L,q;const re=ie.value;if(fv===re)return pv;const ae=St.value.length;let be=J2(ae);(fv!==re-1||be>ae||_u.length>>0).toString(36),fv=re,pv}function zc(L,q={}){var re;const ae=q.includeHeightCache===!0,be=(re=q.includeContentHash)!=null?re:ae,Ne=ae?(function(je){const ot=(function(){var rt,wt;const dt=Number((wt=(rt=o.virtualScroll)==null?void 0:rt.heightCacheLimit)!=null?wt:5e3);return!Number.isFinite(dt)||dt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(dt))})();if(!Number.isFinite(ot)||je.length<=ot)return je;const Ve=new Map,Ye=rt=>{!rt||Ve.size>=ot||Ve.set(rt.index,rt)},nt=St.value.length,Be=Bs(Ds.start-2*Qo.value,0,nt),Xe=Bs(Ds.end+2*Qo.value,Be,nt);for(const rt of je)rt.index>=Be&&rt.index=0&&Ve.sizert.index-wt.index).slice(0,ot)})(ke().map(je=>{var ot;const Ve=St.value[je.index];return Ve?rn(mt({},je),{nodeType:String((ot=Ve.type)!=null?ot:""),signature:I1(je.index)}):null}).filter(je=>!!je)):[],De=OF({allowFallback:q.allowAnchorFallback===!0,requireViewport:q.requireViewport});return De||Ne.length||q.includeEmptyState===!0?rn(mt({sessionKey:L.sessionKey,threadKey:L.threadKey},De?{anchor:De.anchor,anchorCaptured:De.captured}:{anchorCaptured:!1}),{metrics:L,width:L.width,contentHash:be?hv():void 0,measurementKey:Rl()||void 0,heightCache:Ne.length?Ne:void 0}):null}function mv(L){var q,re;const ae=E1();if(!ae)return;const be=(function(je){const ot=O.value;if(!ot)return null;const Ve=_e(ot,je.root),Ye=St.value.length,nt=qt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>ot.offsetHeight||0),Be=Math.max(0,nt>0?nt:Ye>0?qt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>ot.scrollHeight||0):0),Xe=L6();return Ve+Math.max(Be,Xe)})(ae);if(be==null)return;const Ne=Math.max(0,L.distanceFromBottomPx),De=Math.max(0,be-ae.clientHeight-Ne);(function(je){oo=R1()+120,Ot=je})(De),ae.isViewportRoot?(re=(q=ae.doc.defaultView)==null?void 0:q.scrollTo)==null||re.call(q,0,De):J_(ae.root,ae.doc,De,{isReverseFlexScrollRoot:Se,getNormalizedScrollTop:ze})}const gv=[];function N6(){if(G)for(ln!=null&&(Zo?.(ln),ln=null);gv.length;){const L=gv.pop();L!=null&&window.clearTimeout(L)}}function Wc(L){const q=!!Dt.value;Dt.value=null,oo=0,Ot=null,N6(),q&&L&&po(L)}function Uc(){if(!Dt.value||!G||ln!=null)return;const L=()=>{ln=null;const q=Dt.value;q&&mv(q)};ln=Bo?Bo(L):null,ln==null&&L()}function F6(L,q={}){const re=St.value.length;return re<=0?[]:L.filter(ae=>!(!Number.isInteger(ae.index)||ae.index<0||ae.index>=re)&&!(!Number.isFinite(ae.height)||ae.height<=0)&&!(q.requireSignature&&!ae.signature)&&!(q.requireCompatibilityMetadata&&!ae.nodeType&&!ae.signature)&&(function(be){var Ne;const De=St.value[be.index];return!(!De||be.nodeType&&be.nodeType!==String((Ne=De.type)!=null?Ne:"")||be.signature&&be.signature!==I1(be.index))})(ae))}function R6(L){const q=uf(Cu()),re=uf(L);return q!==-1&&re!==-1&&q===re}function vv(L){var q;const re=Number(L?.width);if(Number.isFinite(re)&&re>0)return re;const ae=Number((q=L?.metrics)==null?void 0:q.width);return Number.isFinite(ae)&&ae>0?ae:null}function O6(L){var q;return L.sessionKey===wo()&&!!sv(L.threadKey)&&((q=L.measurementKey)!=null?q:"")===Rl()&&!!R6(vv(L))&&!!(function(re){const ae=re.heightCache;return!!ae?.length&&(P6(re)?ae.some(be=>!!(be.nodeType||be.signature)):ae.some(be=>!!be.signature))})(L)}function P6(L){return!!(L.contentHash&&L.contentHash===hv())}function HF(L){return!P6(L)}let xu=null,Su=null,w0=null,L1=null,$1=null;function yv(L){var q;const re=L.map(be=>{var Ne,De;return[be.index,Math.round(10*be.height),(Ne=be.nodeType)!=null?Ne:"",(De=be.signature)!=null?De:""].join("")}).join(""),ae=uf(Cu());return[(q=ns())!=null?q:"",wo(),Rl(),St.value.length,ae,L.length,dv(re)].join(":")}function D6(L=(q=>(q=o.virtualScroll)==null?void 0:q.heightCache)()){if(!Ct.value||!L?.length||St.value.length<=0||!R6((q=o.virtualScroll)==null?void 0:q.heightCacheWidth))return!1;var q;const re=F6(L,{requireSignature:!0});if(!re.length)return!1;const ae=yv(re);return ae===xu?(Su="standalone",!0):(a6(re,{mode:"merge"}),Pt(),xu=ae,Su="standalone",P1(),po("restore"),!0)}function kv(L,q={}){var re,ae,be;if(!Ct.value||!L||L.sessionKey!==wo()||!sv(L.threadKey)||St.value.length<=0)return!1;const Ne=!!((re=L.heightCache)!=null&&re.length)&&!_0(),De=!L.anchor||L.anchorCaptured===!1&&q.allowUncapturedAnchor!==!0?null:L.anchor,je=q.restoreAnchor===!0&&!!De&&!_0()&&Number(vv(L))>0;let ot=!1;if((ae=L.heightCache)!=null&&ae.length&&O6(L)){const Ye=F6(L.heightCache,{requireCompatibilityMetadata:!L.contentHash,requireSignature:HF(L)});Ye.length&&(a6(Ye,{mode:"merge"}),Pt(),xu=yv(Ye),Su="restore",P1(),ot=!0)}if(Ne||je)return!1;if(!q.restoreAnchor||!De)return ot&&po("restore"),!0;const Ve=(function(Ye,nt){var Be;const Xe=Ye.anchor,lt=Xe?Xe.type==="bottom"?`bottom:${Math.round(Xe.distanceFromBottomPx)}`:`node:${Xe.nodeIndex}:${Math.round(Xe.offsetWithinNodePx)}`:"none";return[(Be=ns())!=null?Be:"",wo(),Rl(),k0.value,nt,lt].join(":")})(L,(be=q.restoreToken)!=null?be:"imperative");return w0===Ve?(ot&&po("restore"),!0):(w0=Ve,(function(Ye){const nt=()=>{if(Ye.type==="node")return Wc(),void Fc({nodeIndex:Ye.nodeIndex,offsetWithinNodePx:Ye.offsetWithinNodePx});if($c(),Os.value=null,Dt.value=Ye,N6(),mv(Ye),G)for(const Be of[0,120,280,480])gv.push(window.setTimeout(()=>{const Xe=Dt.value;Xe&&mv(Xe)},Be))};(function(Be){if(!sn.value)return!1;const Xe=St.value.length;return!(Xe<=0||(Nl.value=Be.type==="node"?Bs(Be.nodeIndex,0,Xe-1):Xe-1,M1(),0))})(Ye)?yt(nt):nt()})(De),po("restore"),!0)}function _0(){const L=Cu();return Number.isFinite(L)&&L>0}function B6(L){var q;return L.sessionKey===wo()&&!!sv(L.threadKey)&&(St.value.length<=0||!(!((q=L.heightCache)!=null&&q.length)||_0())||!(!(L.anchor&&Number(vv(L))>0)||_0()))}function bv(){zo.clear();for(const L of Object.keys($l)){const q=Number(L);Number.isInteger(q)&&q>=0&&q{let q=!1,re=null;const ae=()=>{q||(q=!0,re!=null&&window.clearTimeout(re),L())};if(Bo)return Bo(ae),void(re=window.setTimeout(ae,50));re=window.setTimeout(ae,0)})}function Cv(L,q=ns(),re=Ji.value){return wo()===L&&ns()===q&&Ji.value===re}function wv(){return mo(this,arguments,function*(L={}){var q,re,ae,be,Ne;const De=wo(),je=ns(),ot=Ji.value,Ve=(q=L.frames)!=null?q:2,Ye=(re=L.timeoutMs)!=null?re:120,nt=(ae=L.reason)!=null?ae:"manual",Be=L.expectedSettledTokenKey,Xe=L.flushPendingTimers===!0,lt=wu(nt),rt=()=>rn(mt({},lt),{phase:lt.final?"settling":lt.phase,stable:!1,confidence:lt.confidence==="final"?"mixed":lt.confidence,reason:nt}),wt=()=>Cv(De,je,ot)&&(Be==null||O1()===Be);for(let Vt=0;Vtwindow.setTimeout(Wt,Vt))})(Ye),!wt()||(Xe&&m6(),Ol(),N1(),!wt()))return rt();const dt=uv();dt&&(av=De,lv=je,((be=o.virtualScroll)==null?void 0:be.settleMode)==="manual"&&Be!=null&&b0((Ne=o.virtualScroll)==null?void 0:Ne.settledToken)&&O1()===Be&&(Hc=W1(o.virtualScroll.settledToken)));const Ft=wt()&&dt&&I6(),Ht=wu(nt,Ft?"final":void 0);return Mv(Ht,!0),Ht})}let _v="content",Au=null,Mu=null,xv=0,F1=null,jc=null,Sv=null,Av=null;function R1(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function z6(L){var q,re;const ae=F1;if(!ae)return!0;const be=(re=(q=o.virtualScroll)==null?void 0:q.heightDiffThresholdPx)!=null?re:1;return Math.abs(L.totalHeight-ae.totalHeight)>be||L.sessionKey!==ae.sessionKey||L.phase!==ae.phase||L.stable!==ae.stable||L.final!==ae.final||L.threadKey!==ae.threadKey||L.nodeCount!==ae.nodeCount||L.measuredCount!==ae.measuredCount||L.width!==ae.width}function O1(L=(q=>(q=o.virtualScroll)==null?void 0:q.settledToken)()){return As(L)}function W6(L,q){var re,ae;return[L,q.sessionKey,(re=q.threadKey)!=null?re:"",Rl(),hv(),As((ae=o.virtualScroll)==null?void 0:ae.settledToken),Math.round(q.totalHeight),Math.round(q.width)].join("\0")}function P1(){Sv=null,Av=null,jc=null}function zF(L){const q=L.heightCache;return q?.length?yv(q):""}function D1(L){var q,re,ae;const be=L.metrics,Ne=L.anchor?(De=L.anchor).type==="bottom"?`bottom:${Math.round(De.distanceFromBottomPx)}`:`node:${De.nodeIndex}:${Math.round(De.offsetWithinNodePx)}`:"none";var De;return[L.sessionKey,(q=L.threadKey)!=null?q:"",(re=L.measurementKey)!=null?re:Rl(),(ae=L.contentHash)!=null?ae:"",zF(L),Ne,L.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 Mv(L,q=!1){if(!Ct.value||(function(De=!1){return!De&&fo.value&&!Qt.value})(q))return;const re=q||z6(L),ae=(function(De,je=!1){return je||De.stable||De.phase==="final"?{state:zc(De,{includeHeightCache:!0})}:{state:zc(De)}})(L,q),be=ae.state,Ne=!!(be&&(re||(function(De,je=!1){return!!je||D1(De)!==jc})(be,q)));if(re&&($(L),F1=L,xv=R1()),be&&Ne&&(B(be),be.anchor&&H(be.anchor),jc=D1(be)),L.stable){const De=W6("settled",L);if(De!==Sv){Sv=De;const je=zc(L,{includeHeightCache:!0});je&&(B(je),jc=D1(je)),(function(ot){s("render-settled",ot)})(L)}}if(L.phase==="final"){const De=W6("final",L);if(De!==Av){Av=De;const je=zc(L,{includeHeightCache:!0});je&&(B(je),jc=D1(je)),(function(ot){s("render-final",ot)})(L)}}}function Tv(){Au!=null&&(Zo?.(Au),Au=null),Mu!=null&&G&&(window.clearTimeout(Mu),Mu=null)}function U6(){Au=null,Mu=null,(function(L){if(Fl.size>0||Xi!=null)return!0;switch(L){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(_v)&&(Ol(),N1()),Mv(wu(_v))}function po(L){var q,re;if(!Ct.value||(_v=L,Au!=null||Mu!=null))return;const ae=Math.max(0,(re=(q=o.virtualScroll)==null?void 0:q.emitIntervalMs)!=null?re:32),be=Math.max(0,ae-(R1()-xv)),Ne=()=>{Mu=null,Au=Bo?Bo(U6):null,Au==null&&U6()};G&&be>0?Mu=window.setTimeout(Ne,be):Ne()}function j6(){He.value+=1}function x0(L){if(Rs.value&&L>=yo.value){const q=St.value[L],re=Fe.value===!0&&Oe.value!==!0&&L>=St.value.length-2,ae=q?.type==="code_block"||q?.type==="image"||q?.type==="mermaid"||q?.type==="infographic";if(!re||ae)return!1}return!nl.value||L=ve.value&&(K.value||(K.value=!0,X2()),!u6.value||!Js))return Vc(L),void(q&&pa(L,!0));if(L{if(g6.delete(Ne),!nl.value||Y2.value.has(Ne))return;const ot=ao.get(Ne);if(!ot)return;const Ve=ue(ot),Ye=ot.ownerDocument||document,nt=Ye.defaultView||window,Be=!Ve||Ve===Ye.documentElement||Ve===Ye.body,Xe=!Be&&Ve?qt("nodeVisibilityFallback.root.getBoundingClientRect",()=>Ve.getBoundingClientRect()):null,lt=Be?0:Xe.top,rt=Be?qt("nodeVisibilityFallback.clientHeight",()=>{var dt,Ft;return(Ft=(dt=nt.innerHeight)!=null?dt:Ve?.clientHeight)!=null?Ft:0}):Xe.bottom,wt=qt("nodeVisibilityFallback.node.getBoundingClientRect",()=>ot.getBoundingClientRect());wt.bottom>=lt-500&&wt.top<=rt+500&&pa(Ne,!0)},1800+De);g6.set(Ne,je)})(L);let be=null;be=Je(()=>ae.isVisible.value,Ne=>{if(Ne){v0(L),pa(L,!0),be?.(),g0.delete(L),Oc.get(L)===ae&&Oc.delete(L);try{ae.destroy()}catch{}}},{immediate:!0}),g0.set(L,be),sn.value&&Lr()}function Ev(){Xi=null,an(()=>{let L=!1;for(const[q,re]of Fl)Fl.delete(q),ol.get(q)===re.el&&bu.get(q)===re.version&&(L=ku(q,re.height,{allowShrink:re.allowShrink})||L);return L})}function qc(){Xi!=null&&(Zo?.(Xi),Xi=null),Fl.clear()}function A0(L,q){(function(re,ae,be){var Ne;if(!Number.isFinite(be)||be<=0||ol.get(re)!==ae)return;const De=bu.get(re);if(De==null)return;const je=St.value[re],ot=at.value&&Oe.value!==!0&&!((Ne=o.nodes)!=null&&Ne.length)&&re>=St.value.length-2,Ve=!(je?.loading===!0||ot),Ye=Fl.get(re),nt=Ye?Ye.allowShrink&&Ve:Ve,Be=Ye&&!nt?Math.max(Ye.height,be):be;Fl.set(re,{height:Be,allowShrink:nt,version:De,el:ae}),Xi==null&&(Xi=Bo?Bo(Ev):null,Xi==null&&Ev())})(L,q,A1(L,q))}function Ol(){for(const[L,q]of ol)q&&A0(L,q)}function V6(){fi?.disconnect(),fi=null,Gi.clear()}function Iv(){for(;f0.length;)m0(f0.pop())}Je(Qt,L=>{L&&po("content")},{flush:"post"}),t({getVirtualMetrics:wu,captureVirtualState:function(L={}){var q;return zc(wu("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:L.allowFallbackAnchor===!0,requireViewport:L.requireViewport===!0,includeEmptyState:(q=L.includeEmptyState)==null||q})},restoreVirtualState:function(L,q={}){const re=q.restoreAnchor===!0,ae=q.restoreToken==null?"imperative":String(q.restoreToken);L1=L,$1={restoreAnchor:re,restoreToken:ae,allowUncapturedAnchor:q.allowUncapturedAnchor===!0},!kv(L,{restoreAnchor:re,restoreToken:ae,allowUncapturedAnchor:q.allowUncapturedAnchor===!0})&&B6(L)||(L1=null,$1=null)},forceMeasure:function(L="manual"){return mo(this,null,function*(){yield yt(),yield H6(),Ol(),N1(),yield yt();const q=wu(L);return Mv(q,!0),q})},settle:wv,scrollToNode:function(L,q="start"){Wc(),$c();const re=St.value.length;if(re<=0)return;const ae=Bs(L,0,re-1),be=()=>{var Ne;const De=U2({nodeIndex:ae,offsetWithinNodePx:0}),je=Yn(ae),ot=E1(),Ve=(Ne=ot?.clientHeight)!=null?Ne:0,Ye=ei();let nt=De;if(q==="center")nt=De-Ve/2+je/2;else if(q==="end")nt=De-Ve+je;else if(q==="nearest"&&Ye!=null){if(De>=Ye&&De+je<=Ye+Ve)return;nt=Dees.value,L=>{if(!L){V6();for(const q of da.values())for(const re of q)m0(re);da.clear(),bu.clear(),Iv(),qc()}},{immediate:!0}),Je(Oe,L=>{L&&(function(){if(G&&Oe.value&&ol.size){Iv();for(const q of[80,240,640]){const re=h6(q,()=>{for(const[ae,be]of ol)be&&A0(ae,be)},"final");re!=null&&f0.push(re)}}})(),po(L?"final":"content")});const WF=Q_(()=>po("content"),16),UF=Q_(()=>po("batch"),16);Je([()=>St.value.length,()=>yo.value],()=>{Dt.value&&Uc(),WF()},{flush:"post",immediate:!0}),Je([()=>Ds.start,()=>Ds.end],()=>{UF()},{flush:"post"});const{cleanupBatchScheduler:jF}=(function(L){const{props:q,isClient:re,isTestEnv:ae,parsedNodesIdentity:be,parsedNodeCount:Ne,desiredRenderedCount:De,datasetKey:je,batchingEnabled:ot,incrementalRenderingActive:Ve,resolvedBatchSize:Ye,resolvedInitialBatch:nt,renderedCount:Be,adaptiveBatchSize:Xe,previousRenderContext:lt,previousBatchConfig:rt,requestFrame:wt,cancelFrame:dt,hasIdleCallback:Ft,cleanupNodeVisibility:Ht,onDatasetKeyChanged:Vt,onDatasetChanged:Wt}=L;let Kt=null,fn="raf",vn=null,Qn=0,Hs=!1,Ss=!1;const $r=new Set,il=new Set;function K1(){if(re){Kt!=null&&(fn==="raf"&&dt?dt(Kt):fn==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(Kt):fn==="timeout"&&window.clearTimeout(Kt),Kt=null),Qn+=1;for(const ti of $r)dt&&dt(ti);for(const ti of il)window.clearTimeout(ti);$r.clear(),il.clear(),vn=null,Hs=!1,Ss=!1}}function R0(){return typeof performance<"u"?performance.now():Date.now()}function u7(ti){(function(Pl){var ma;if(!Ve.value)return;const Dl=Math.max(2,(ma=q.renderBatchBudgetMs)!=null?ma:6),Bl=Math.max(1,Ye.value||1),Nr=Math.max(1,Math.floor(Bl/4));Pl>1.5*Dl?Xe.value=Math.max(Nr,Math.floor(.8*Xe.value)):Pl<.6*Dl&&Xe.value=Dl)return;const Bl=Math.max(1,ti),Nr=()=>{const Gc=R0();Kt=null;const Z1=vn??Bl;vn=null;const Yc=R0();Be.value=Math.min(Dl,Be.value+Z1),Ht(Be.value),(function(Pv,O0){if(!re)return void u7(O0);Hs=!0;const p7=++Qn;yt().then(()=>{var h7;if(p7!==Qn)return;const dR=R0(),fR=Math.max(O0,dR-Pv),m7=()=>{p7===Qn&&u7(fR)};if(wt){let Eu=null,Xc=null,v7=!1;const y7=()=>{v7||(v7=!0,Eu!==null&&($r.delete(Eu),Eu=null),Xc!==null&&(il.delete(Xc),window.clearTimeout(Xc),Xc=null),m7())};return Eu=wt(()=>{y7()}),$r.add(Eu),Xc=window.setTimeout(()=>{Eu!==null&&dt&&dt(Eu),y7()},Math.max(32,(h7=q.renderBatchIdleTimeoutMs)!=null?h7:120)),void il.add(Xc)}const g7=window.setTimeout(()=>{il.delete(g7),m7()},0);il.add(g7)})})(Gc,R0()-Yc)};if(!re||Li.immediate)return void Nr();const ga=Math.max(0,(Pl=q.renderBatchDelay)!=null?Pl:16);if(vn=vn!=null?Math.max(vn,Bl):Bl,Kt==null){if(!ae&&Ft&&window.requestIdleCallback){const Gc=Math.max(0,(ma=q.renderBatchIdleTimeoutMs)!=null?ma:120);return fn="idle",void(Kt=window.requestIdleCallback(()=>Nr(),{timeout:Gc}))}if(wt&&!ae)return fn="raf",void(Kt=wt(()=>{ga===0?Nr():(fn="timeout",Kt=window.setTimeout(()=>Nr(),ga))}));fn="timeout",Kt=window.setTimeout(()=>Nr(),ga)}}function d7(ti,Li={}){Hs?Ss=!0:ti==null?f7():c7(ti,Li)}function f7(){Ve.value&&c7(ot.value?Math.max(1,Math.round(Xe.value)):Math.max(1,Ye.value))}return Je([be,Ne,je,Ve,Ye,nt,()=>q.renderBatchDelay],()=>{var ti;const Li=Ne.value,Pl=lt.value,ma=je.value,Dl=!Object.is(ma,Pl.key),Bl=Li!==Pl.total,Nr=Dl||Bl;lt.value={key:ma,total:Li};const ga=rt.value,Gc=(ti=q.renderBatchDelay)!=null?ti:16,Z1=ga.batchSize!==Ye.value||ga.initial!==nt.value||ga.delay!==Gc||ga.enabled!==Ve.value;rt.value={batchSize:Ye.value,initial:nt.value,delay:Gc,enabled:Ve.value},Dl&&Vt(Li),(Nr||Z1||!Ve.value)&&K1(),(Nr||Z1)&&(Xe.value=Math.max(1,Ye.value||1)),Nr&&Wt();const Yc=De.value;if(!Li)return Be.value=0,void Ht(0);if(!Ve.value)return Be.value=Yc,void Ht(Be.value);const Pv=Dl||Pl.total===0;Be.value=Pv||Z1?Math.min(Yc,nt.value):Math.min(Be.value,Yc);const O0=Math.max(1,nt.value||Ye.value||Li);Be.value{Ve.value&&(typeof Li=="number"&&ti<=Li||ti>Be.value&&d7())}),{cleanupBatchScheduler:K1}})({props:I,isClient:G,isTestEnv:Zi,parsedNodesIdentity:Ys,parsedNodeCount:Nn,desiredRenderedCount:p0,datasetKey:NF,batchingEnabled:Fs,incrementalRenderingActive:Rs,resolvedBatchSize:Ho,resolvedInitialBatch:Co,renderedCount:yo,adaptiveBatchSize:Le,previousRenderContext:ht,previousBatchConfig:Ze,requestFrame:Bo,cancelFrame:Zo,hasIdleCallback:Il,cleanupNodeVisibility:MF,onDatasetKeyChanged:L=>{qc(),so(),Pt(),P1(),L>0&&Rc(L)},onDatasetChanged:()=>{sn.value&&Lr({immediate:!0})}});Je([c6,sn,()=>O.value,()=>oe()],([L,q])=>{if(!L)return v6(),void G2();TF(),q?Lr({immediate:!0}):G2()},{flush:"post",immediate:!0}),Je([()=>St.value.length,()=>sn.value],L=>mo(null,[L],function*([q,re]){re&&q&&G&&(yield yt(),Lr({immediate:!0}))}),{flush:"post"}),Je(kn,L=>{L&&(function(){var q;if(no.value&&$s.value&&Xs.value&&((q=ci.value)!=null&&q[1]))return;const re=kt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ae=kt({type:"list_item",children:[re],raw:"- Probe paragraph text"}),be=kt({type:"list",ordered:!1,items:[ae],raw:"- Probe paragraph text"});no.value=re,$s.value=ae,Xs.value=be;const Ne={1:null,2:null,3:null,4:null,5:null,6:null};for(let De=1;De<=6;De++)Ne[De]=kt({type:"heading",level:De,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(De)} Probe heading`});ci.value=Ne})()},{immediate:!0}),Je([()=>O.value,kn],()=>{if(!kn.value)return ev(),void(ne.value=0);k6(),ev(),kn.value&&O.value&&typeof ResizeObserver<"u"&&(T1=new ResizeObserver(()=>{k6(),Os.value&&yu(),Dt.value&&Uc(),po("resize")}),T1.observe(O.value))},{immediate:!0}),Je([kn,Ns,Ji],()=>mo(null,null,function*(){if(!kn.value)return X.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Pt();yield yt(),(function(){if(!kn.value||typeof window>"u")return X.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Pt();const L={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},q=y6(Q2(F.value),".paragraph-node");L.paragraph=l4(F.value,q,"pre-wrap");const re=Q2(U.value),ae=re?.querySelector(".paragraph-node");L.listItem=l4(U.value,ae,"pre-wrap");const be=qt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var De,je;return(je=(De=z.value)==null?void 0:De.offsetHeight)!=null?je:0}),Ne=qt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var De,je;return(je=(De=U.value)==null?void 0:De.offsetHeight)!=null?je:0});L.listWrapperOverhead=Math.max(0,be-Ne);for(let De=1;De<=6;De++){const je=y6(Q2(W[De]),`h${De}`);L.headings[De]=l4(W[De],je,"pre-wrap")}X.value=L,Pt()})()}),{flush:"post",immediate:!0}),Je(()=>St.value.length,()=>{sn.value&&Lr({immediate:!0})}),Je([kn,ne],()=>{Pt(),sn.value&&Lr({immediate:!0}),Os.value&&yu(),Dt.value&&Uc(),po("resize")},{immediate:!1}),Je(()=>nl.value,L=>{if(L)for(const[q,re]of ao)S0(q,re);else if(X2(),sn.value)Lr({immediate:!0});else for(const[q,re]of ao)re&&pa(q,!0)},{immediate:!1}),Je([pe,ve,()=>oe()],()=>{var L;(L=Js.refresh)==null||L.call(Js);for(const[q,re]of ao)S0(q,re)},{immediate:!1}),Je([()=>I.viewportPriority,()=>St.value.length,ve],([L,q,re])=>{if(L!==!1){if(K.value&&(q<=200||q<=re)){K.value=!1;for(const[ae,be]of ao)S0(ae,be)}}else K.value=!1}),Je(()=>yo.value,()=>{sn.value&&Lr({immediate:!0})}),Je([Nl,Io,Qo,()=>St.value.length,sn],()=>{M1()},{immediate:!0});let B1=null,H1=!1,Kc=null;function z1(){B1=null,av=null,lv=void 0,Hc=null,P1()}function Lv(){qc(),so(),Pt(),zo.clear();const L=St.value.length;L>0&&Rc(L),bv()}function $v(){Tv(),m6(),F1=null,xu=null,Su=null,w0=null,L1=null,$1=null,H1=!1,z1(),T6("restore"),$c(),Wc()}function W1(L){var q;return[(q=ns())!=null?q:"",wo(),Rl(),k0.value,O1(L),St.value.length,Math.round(ko(0,St.value.length)),Math.round(Cu()),hi.count,Math.round(hi.total)].join(":")}function q6(){return mo(this,null,function*(){var L,q,re,ae;const be=(L=o.virtualScroll)==null?void 0:L.settledToken,Ne=O1(be),De=wo(),je=ns(),ot=Ji.value;if(Ct.value&&((q=o.virtualScroll)==null?void 0:q.settleMode)==="manual"&&b0(be))if(uv()){if(W1(be)!==Hc&&!H1){H1=!0;try{const Ve=yield wv({reason:"manual",expectedSettledTokenKey:Ne}),Ye=O1()===Ne;Cv(De,je,ot)&&Ve.sessionKey===De&&Ve.threadKey===je&&Ye&&Ve.stable&&Ve.phase==="final"&&(Hc=W1((re=o.virtualScroll)==null?void 0:re.settledToken))}finally{H1=!1,yield yt();const Ve=(ae=o.virtualScroll)==null?void 0:ae.settledToken,Ye=b0(Ve)?W1(Ve):"";Cv(De,je,ot)&&Ye&&Hc!==Ye&&q6()}}}else po("manual")})}Je(Ct,(L,q)=>{if(L!==q){if(!L)return $v(),void Tv();$v(),Lv(),Kc=Ji.value,po("content")}},{flush:"post"}),Je([Ct,Ji],([L,q])=>{L?Kc!=null?Kc!==q&&(Kc=q,(function(re="resize"){qc(),so(),Pt(),zo.clear();const ae=St.value.length;ae>0&&Rc(ae),bv(),xu=null,Su=null,w0=null,F1=null,H1=!1,z1(),D6(),yt(()=>{Ol(),Os.value&&yu(),Dt.value&&Uc(),po(re)})})("resize")):Kc=q:Kc=null},{flush:"post",immediate:!0}),Je([Ct,()=>wo(),()=>ns()],([L])=>{L&&($v(),Lv(),T6("content"),po("content"))}),Je([Ct,()=>wo(),()=>ns(),Ji,()=>St.value.length],([L])=>{L&&(function(q="async-node"){let re=!1;for(const[ae,be]of Array.from(sl.entries()))iv(be)||(sl.delete(ae),Yi.delete(ae),re=!0);re&&(Dc(),po(q))})("async-node")},{flush:"post"}),Je([Ct,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.sessionKey},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.measurementKey},()=>o.indexKey,()=>ie.value],([L])=>{L&&(P1(),(function(q="content"){if(!Ct.value)return;const re=[],ae=St.value.length,be=J2(ae);for(const Ne of Array.from(zo.keys())){if(Ne>=ae){re.push(Ne);continue}if(Ne=ae&&zo.delete(Ne);re.length&&((function(Ne,De={}){const je=Array.from(Ne,Number);Gt(je);let ot=0;if(an(()=>(ot=q2(je,De),ot>0)),ot>0)(function(Ve){for(const Ye of Ve)zo.delete(Ye)})(je);else for(const Ve of je)J.delete(Ve)})(re,{notify:!1}),Pt(),z1(),Os.value&&yu(),Dt.value&&Uc(),po(q))})("content"))},{flush:"post",immediate:!0}),Je([Ct,()=>St.value.length,()=>wo(),()=>ns()],([L,q,re,ae],[be,Ne,De,je])=>{L&&be&&re===De&&ae===je&&q!==Ne&&z1()},{flush:"post"}),Je([Ct,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.heightCache},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.heightCacheWidth},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.measurementKey},()=>St.value.length,()=>wo(),ne],()=>{D6()},{flush:"post",immediate:!0}),Je([Ct,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.restoreAnchor},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.measurementKey},()=>St.value.length,()=>wo(),ne],L=>mo(null,[L],function*([q,re]){if(!q||!re)return;yield yt();const ae=(function(){var be;const Ne=(be=o.virtualScroll)==null?void 0:be.restoreAnchor;return Ne==null||Ne===!1?null:Ne===!0?"true":String(Ne)})();kv(re,{restoreAnchor:ae!=null,restoreToken:ae??void 0})}),{flush:"post",immediate:!0}),Je([Ct,ne,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.measurementKey}],([L])=>{var q;if(!L)return;const re=(q=o.virtualScroll)==null?void 0:q.restoreState;re&&xu&&Su==="restore"&&(O6(re)||(Lv(),xu=null,Su=null,po("resize")))},{flush:"post"}),Je([Ct,()=>St.value.length,()=>wo(),ne],L=>mo(null,[L],function*([q]){var re;const ae=L1,be=$1;q&&ae&&(yield yt(),!kv(ae,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(re=be?.restoreToken)!=null?re:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&B6(ae)||(L1=null,$1=null))}),{flush:"post",immediate:!0}),Je([Ct,Oe,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.settleMode},()=>wo(),()=>ns(),Ji,Z2,f6,()=>yo.value,p0,()=>hi.count,()=>hi.total],([L,q,re])=>{if(!L||q!==!0||re==="manual"||!cv())return;const ae=(function(){var be;const Ne=St.value.length;return[(be=ns())!=null?be:"",wo(),Rl(),k0.value,Ne,Math.round(ko(0,Ne)),Math.round(Cu()),hi.count,Math.round(hi.total)].join(":")})();B1!==ae&&(B1=ae,wv({reason:"final"}).then(be=>{be.stable||B1!==ae||(B1=null)}))},{flush:"post",immediate:!0}),Je([Ct,Oe,()=>{var L;return(L=o.virtualScroll)==null?void 0:L.settleMode},()=>{var L;return(L=o.virtualScroll)==null?void 0:L.settledToken},()=>wo(),()=>ns(),Ji,Z2,f6,()=>yo.value,p0,()=>St.value.length,()=>hi.count,()=>hi.total],()=>{q6()},{flush:"post",immediate:!0}),Je([()=>St.value.length,sn,Io,Qo,()=>Ds.start,()=>Ds.end],([L,q,re,ae,be,Ne])=>{fe.value&&Mn("virtualization",{nodes:L,virtualization:q,maxLiveNodes:re,buffer:ae,focusIndex:Nl.value,scroll:q?(()=>{const De=ut.value||ue();return De?{reverse:Se(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:be,end:Ne},rendered:yo.value})}),Je([()=>I.customId],([L],q,re)=>{if(!L||Oo)return;const ae=(function(be,Ne){return be?(ys.controllers[be]=Ne,()=>{ys.controllers[be]===Ne&&delete ys.controllers[be]}):()=>{}})(L,{captureRestoreAnchor:Nc,restoreAnchor:Fc,getAnchorDrift:j2,getReport:LF});re(()=>{ae()})},{immediate:!0}),Vn(()=>{(function(){if(Ct.value)try{Ol(),N1();const L=wu("manual");z6(L)&&($(L),F1=L,xv=R1());const q=zc(L,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});q&&(B(q),q.anchor&&H(q.anchor),jc=D1(q))}catch{}})(),jF(),X2(),en(),V6();for(const L of da.values())for(const q of L)m0(q);da.clear(),bu.clear(),zo.clear(),Iv(),qc(),ev(),$c(),Wc(),Tv(),v6(),G2()});const VF=Af("ViewportDeferredMermaidBlockNode",zr({loader:()=>mo(null,null,function*(){try{return(yield jo(()=>import("./index11-Ci8_PlMN.js"),__vite__mapDeps([7,5]))).default}catch(L){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".',L),Pi}}),loadingComponent:px,delay:0}),px),qF=Af("ViewportDeferredInfographicBlockNode",zr({loader:()=>mo(null,null,function*(){try{return(yield jo(()=>import("./index10-BCo1_xRY.js"),[])).default}catch(L){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.',L),Pi}}),loadingComponent:fx,delay:0}),fx),KF=Af("ViewportDeferredD2BlockNode",zr(()=>mo(null,null,function*(){try{return(yield jo(()=>import("./index8-BaK3y7fN.js"),[])).default}catch(L){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".',L),Pi}})),Pi),K6={text:qo,paragraph:cc,heading:L2,code_block:X9,list:qd,list_item:Vd,blockquote:tm,table:ep,definition_list:nm,footnote:om,footnote_reference:or,footnote_anchor:Jf,admonition:lm,vmr_container:im,hardbreak:qa,link:Mi,image:Va,thematic_break:sm,math_inline:Jr,math_block:C$,strong:Si,emphasis:Ti,strikethrough:Ai,highlight:ir,insert:ji,subscript:Ui,superscript:Wi,emoji:zi,checkbox:nr,checkbox_input:nr,inline_code:li,html_inline:sr,reference:xi,html_block:Qf},ZF=R(()=>ov()),Z6=R(()=>X_(I.codeBlockProps)),GF=R(()=>X_(I.codeBlockProps,{omit:["langs"]})),G6=R(()=>mt(mt({stream:I.codeBlockStream,darkTheme:I.codeBlockDarkTheme,lightTheme:I.codeBlockLightTheme,monacoOptions:I.codeBlockMonacoOptions,themes:I.themes,langs:m.value==="shiki"?I.langs:void 0,minWidth:I.codeBlockMinWidth,maxWidth:I.codeBlockMaxWidth},typeof we.value=="boolean"?{showTooltips:we.value}:{}),GF.value)),Y6=R(()=>mt(rn(mt({},G6.value),{langs:I.langs}),Z6.value));function X6(L){return typeof L=="boolean"?L:void 0}const YF=R(()=>{const L=I.codeBlockProps||{},q={},re=X6(L.showLineNumbers);re!==void 0&&(q.showLineNumbers=re);const ae=X6(L.diffInline);ae!==void 0&&(q.diffInline=ae);const be=(function(Ne){const De=Number(Ne);return Number.isFinite(De)&&De>0?De:void 0})(L.reservedHeightPx);return be!==void 0&&(q.reservedHeightPx=be),q}),XF=R(()=>mt(mt({stream:I.codeBlockStream,darkTheme:I.codeBlockDarkTheme,lightTheme:I.codeBlockLightTheme,themes:I.themes,langs:I.langs,minWidth:I.codeBlockMinWidth,maxWidth:I.codeBlockMaxWidth},typeof we.value=="boolean"?{showTooltips:we.value}:{}),Z6.value)),JF=R(()=>mt({},I.mermaidProps||{})),J6=R(()=>mt({},I.d2Props||{})),QF=R(()=>mt({},I.infographicProps||{})),U1=R(()=>({typewriter:f.value,fade:I.fade,customHtmlTags:lo.value.customHtmlTags})),eR=R(()=>mt(mt({},U1.value),typeof we.value=="boolean"?{showTooltip:we.value}:{})),tR=R(()=>mt(mt({},U1.value),typeof we.value=="boolean"?{showTooltips:we.value}:{})),nR=R(()=>mt(mt({},U1.value),typeof we.value=="boolean"?{showTooltips:we.value}:{})),oR=R(()=>mt(mt({},U1.value),typeof we.value=="boolean"?{showTooltips:we.value}:{}));function sR(L){return Array.isArray(L.children)&&L.children.length>0}const M0=R(()=>IF.value.map(L=>{var q,re,ae,be,Ne,De,je,ot;let Ve=(function(dt){var Ft,Ht,Vt,Wt,Kt,fn,vn;if(dt.type!=="code_block")return dt;const Qn=dt,Hs=[String((Ft=Qn.language)!=null?Ft:""),String((Ht=Qn.loading)!=null?Ht:""),String((Vt=Qn.diff)!=null?Vt:""),String((Wt=Qn.code)!=null?Wt:""),String((Kt=Qn.originalCode)!=null?Kt:""),String((fn=Qn.updatedCode)!=null?fn:""),String((vn=Qn.raw)!=null?vn:"")].join("\0"),Ss=Ll.get(Qn);if(Ss&&Ss.signature===Hs)return Ss.node;const $r=mt({},Qn);return Ll.set(Qn,{signature:Hs,node:$r}),$r})(L.node);const Ye=T0(Ve);let nt=n7(Ve,Ye);if((Ve.type==="html_block"||Ve.type==="html_inline")&&nt===K6[Ve.type]){const dt=Ve,Ft=String((q=dt.tag)!=null?q:"").trim().toLowerCase()||ZI(dt.content);if(Ft){const Ht=In.value[Ft];if(To.value.has(Ft)&&Ht)nt=Ht,Ve=rn(mt({},dt),{type:Ft,tag:Ft,content:pie(dt.content,Ft)});else if(GI((re=dt.content)!=null?re:dt.raw,Ft)){const Vt=String((be=(ae=dt.content)!=null?ae:dt.raw)!=null?be:"");Ve.type==="html_inline"?(nt=qo,Ve={type:"text",content:Vt,raw:Vt}):(nt=cc,Ve={type:"paragraph",children:[{type:"text",content:Vt,raw:Vt}],raw:Vt})}}}const Be=Ve.type==="code_block"&&m.value==="pre"&&nt===Pi&&!Nv(In.value,Ye);let Xe=mt({},(function(dt,Ft,Ht){const Vt=Ft??T0(dt);if(dt.type==="code_block"){const Wt=Vt?Nv(In.value,Vt):void 0;if(Ht&&m.value==="pre"&&!Wt&&Ht===Pi)return YF.value;if(Ht&&Vt&&Ht===Wt)return Vt==="mermaid"?e7(dt):Vt==="infographic"?t7(dt):Vt==="d2"||Vt==="d2lang"?J6.value:Y6.value;if(Ht&&Ht===In.value.code_block)return Y6.value;if(C6(Ht))return XF.value}return Vt==="mermaid"?e7(dt):Vt==="infographic"?t7(dt):Vt==="d2"||Vt==="d2lang"?J6.value:dt.type==="link"?eR.value:dt.type==="list"?tR.value:dt.type==="blockquote"?nR.value:dt.type==="table"?oR.value:dt.type==="code_block"?G6.value:U1.value})(Ve,Ye,nt));const lt=kn.value?Pc.value[L.index]:null;Ve.type==="code_block"&<?.kind==="code-block"&&(Xe=rn(mt({},Xe),Be?{reservedHeightPx:(Ne=lt.height)!=null?Ne:lt.contentHeight}:{estimatedHeightPx:lt.height,estimatedContentHeightPx:lt.contentHeight,estimatedDiffInline:lt.diffInline})),Be||Ve.type!=="code_block"||Ye!=="mermaid"||Md(Xe.estimatedPreviewHeightPx)!=null||(Xe=rn(mt({},Xe),{estimatedPreviewHeightPx:lg(ig(String((De=Ve.code)!=null?De:"")))})),Be||Ve.type!=="code_block"||Ye!=="infographic"||Md(Xe.estimatedPreviewHeightPx)!=null||(Xe=rn(mt({},Xe),{estimatedPreviewHeightPx:ag(rg(String((je=Ve.code)!=null?je:"")))})),Ve.type==="math_block"&&(Xe=rn(mt({},Xe),{cacheScope:_n}));const rt=(function(dt,Ft){const Ht=String(dt.type);return!Qp(Ht)&&In.value[Ht]===Ft})(Ve,nt),wt=rt?p5(Ve,ge.value):void 0;return rn(mt({},L),{node:Ve,component:nt,bindings:Xe,customBindings:mt(mt({},wt??{}),Xe),rendersCustomNode:rt,hasSlotChildren:sR(Ve),slotContent:String((ot=Ve.content)!=null?ot:""),isCodeBlock:Ve.type==="code_block",indexKey:`${ZF.value}-${L.index}`,vnodeKey:`${$F.value}\0${L.index}\0${Ve.type}`})}));function T0(L){var q;return L?.type==="code_block"?String((q=L.language)!=null?q:"").trim().toLowerCase():""}function Nv(L,q){const re=q.trim().toLowerCase();if(re)for(const ae of[re,T2(re),n$(re)]){const be=ae&&L[ae];if(be)return be}}function Q6(L,q,re,ae){var be,Ne;const De=mt({},L.value);return Md(De.estimatedPreviewHeightPx)==null&&(De.estimatedPreviewHeightPx=ae(re(String((be=q?.code)!=null?be:"")),void 0,De.maxHeight==="none"?null:(Ne=Md(De.maxHeight))!=null?Ne:void 0)),De}function e7(L){return Q6(JF,L,ig,lg)}function t7(L){return Q6(QF,L,rg,ag)}function n7(L,q){if(!L)return l8;const re=In.value,ae=re[String(L.type)];if(L.type==="code_block"){const be=q??T0(L),Ne=be?Nv(re,be):void 0;return Ne||(m.value==="pre"?re.code_block||Pi:be==="mermaid"?re.mermaid||VF:be==="infographic"?re.infographic||qF:be==="d2"||be==="d2lang"?re.d2||KF:ae||re.code_block||w6.value)}return ae||K6[String(L.type)]||l8}function Fv(L){s("click",L)}function iR(L){var q;(q=L.target)!=null&&q.closest("[data-node-index]")&&s("mouseover",L)}function rR(L){var q;(q=L.target)!=null&&q.closest("[data-node-index]")&&s("mouseout",L)}function o7(L){s("mouseover",L)}function s7(L){s("mouseout",L)}const Tu=Z(null),Ii=Z(!1),j1=Z(null),lR=R(()=>!(I.domMode!=="minimal"||Y.value||I.fade!==!1||f.value||Ii.value||Xt.value||sn.value||Qe.value||co.value||Ki.value||Object.keys(In.value).length!==0));let V1,Zc=null,Rv=0,E0=0,I0=0;const i7=["code_block","admonition","table","math_block","html_block","image","thematic_break"],aR=new Set(i7),r7=[".typewriter-cursor",".height-estimation-probes",...i7.map(L=>`[data-node-type="${L}"]`),"script","style"].join(",");function l7(L){if(!L||typeof L!="object")return!1;const q=L.type;return typeof q=="string"&&aR.has(q)}function L0(L){var q,re;if(!L||typeof L!="object")return 0;const ae=L,be=(re=(q=ae.raw)!=null?q:ae.content)!=null?re:ae.code;if(typeof be=="string")return be.length;const Ne=ae.children;if(Array.isArray(Ne))return Ne.reduce((je,ot)=>je+L0(ot),0);const De=ae.items;return Array.isArray(De)?De.reduce((je,ot)=>je+L0(ot),0):0}function $0(){V1&&(clearTimeout(V1),V1=void 0)}function Ov(){Rv+=1,Zc!=null&&(Zo?.(Zc),Zc=null)}function q1(){Ov(),ha(),Tu.value&&(Tu.value.style.visibility="hidden")}function uR(L){var q;if(L.nodeType!==Node.TEXT_NODE||!((q=L.textContent)!=null?q:"").trim())return!1;const re=L.parentElement;return!!re&&!re.closest(r7)}function cR(L){let q=L.lastChild;for(;q;){if(uR(q))return q;if(q.nodeType===Node.ELEMENT_NODE){const re=q;if(!re.matches(r7)&&re.lastChild){q=re.lastChild;continue}}for(;q&&q!==L&&!q.previousSibling;)q=q.parentNode;if(!q||q===L)break;q=q.previousSibling}return null}function a7(){const L=M0.value;for(let q=L.length-1;q>=0;q--){const re=L[q];if(!re||l7(re.node)||!x0(re.index))continue;const ae=ao.get(re.index);if(!ae)continue;const be=cR(ae);if(be)return be}return null}function ha(){j1.value&&(j1.value.classList.remove(hx),j1.value=null)}function N0(){if(d.value!=="simple"||!G||!Ii.value||!O.value)return void ha();const L=a7(),q=L?(function(re){var ae;const be=(ae=re.parentElement)==null?void 0:ae.closest(".text-node");return be instanceof HTMLElement?be:re.parentElement})(L):null;q!==j1.value&&(ha(),q&&(q.classList.add(hx),j1.value=q))}function F0(){if(d.value!=="precise"||!G||!Ii.value||Zc!=null)return;const L=Rv,q=()=>{Zc=null,L===Rv&&(function(){var re,ae;if(d.value!=="precise"||!(G&&Ii.value&&O.value&&Tu.value))return;const be=O.value,Ne=Tu.value;Ne.style.visibility="hidden";const De=a7();if(!De)return;let je=0,ot=0,Ve=20,Ye=!1;if(De?.textContent){const nt=De.textContent.length,Be=document.createRange();Be.setStart(De,Math.max(0,nt-1)),Be.setEnd(De,nt);const Xe=typeof Be.getClientRects=="function"?Be.getClientRects():void 0,lt=(ae=Xe?.[Xe.length-1])!=null?ae:(re=De.parentElement)==null?void 0:re.getBoundingClientRect();if(lt){const rt=qt("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());je=lt.right-rt.left+be.scrollLeft,ot=lt.top-rt.top+be.scrollTop,Ve=lt.height||Ve,Ye=!0}Be.detach()}Ye&&(Ne.style.transform=`translate(${Math.max(0,je)}px, ${Math.max(0,ot)}px)`,Ne.style.height=`${Ve}px`,Ne.style.visibility="visible")})()};Bo?Zc=Bo(q):q()}return Je([it,()=>o.content,()=>o.nodes,()=>I.typewriter,Oe],()=>mo(null,null,function*(){var L,q;if(!G||Y.value||!te.value)return;if(Oe.value)return Ii.value=!1,$0(),void q1();if((L=o.nodes)!=null&&L.length)return Ii.value=!1,$0(),q1(),E0=((q=o.content)!=null?q:"").length,void(I0=it.value.length);const re=(function(){var je,ot;return(je=o.nodes)!=null&&je.length?o.nodes.reduce((Ve,Ye)=>Ve+L0(Ye),0):((ot=o.content)!=null?ot:"").length})(),ae=(function(){var je;return(je=o.nodes)!=null&&je.length?o.nodes.reduce((ot,Ve)=>ot+L0(Ve),0):it.value.length})(),be=!l7(St.value[St.value.length-1]),Ne=re>E0,De=ae>I0;if(!f.value||!be||!Ne&&!De)return f.value&&be||(Ii.value=!1,q1()),E0=re,void(I0=ae);E0=re,I0=ae,Ii.value=!0,d.value==="precise"&&Tu.value&&(Tu.value.style.visibility="hidden"),$0(),yield yt(),d.value==="simple"?N0():(ha(),F0()),V1=setTimeout(()=>{V1=void 0,Ii.value=!1},3e3)}),{flush:"post",immediate:!0}),Je(Ii,L=>mo(null,null,function*(){L?(yield yt(),d.value!=="simple"?(ha(),d.value==="precise"&&F0()):N0()):q1()}),{flush:"post"}),Je(d,()=>mo(null,null,function*(){if(G&&!Y.value&&te.value&&Ii.value){if(yield yt(),d.value==="simple")return Ov(),void N0();ha(),d.value!=="precise"?q1():F0()}}),{flush:"post"}),Je([()=>yo.value,()=>Ds.start,()=>Ds.end],()=>mo(null,null,function*(){G&&!Y.value&&te.value&&Ii.value&&(yield yt(),d.value!=="simple"?(ha(),d.value==="precise"&&F0()):N0())}),{flush:"post"}),Vn(()=>{$0(),Ov(),ha(),xs.clear()}),(L,q)=>{const re=zO("NodeRenderer",!0);return p(Y)?(y(!0),M(Pe,{key:0},pt(M0.value,ae=>(y(),M(Pe,{key:ae.vnodeKey},[ae.rendersCustomNode?(y(),he(bs(ae.component),zn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":I.customId,"is-dark":I.isDark,onClick:Fv,onMouseover:o7,onMouseout:s7,onCopy:q[0]||(q[0]=be=>i(be)),onHandleArtifactClick:q[1]||(q[1]=be=>s("handleArtifactClick",be))}),{default:me(()=>[ae.hasSlotChildren?(y(),he(re,zn({key:0,ref_for:!0},uo.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?(y(),he(re,zn({key:1,ref_for:!0},uo.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"])):ee("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(y(),he(bs(ae.component),zn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":I.customId,"is-dark":I.isDark,onClick:Fv,onMouseover:o7,onMouseout:s7,onCopy:q[2]||(q[2]=be=>i(be)),onHandleArtifactClick:q[3]||(q[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(y(),M("div",{key:1,ref_key:"containerRef",ref:O,class:Re(["markstream-vue markdown-renderer",[{dark:I.isDark},{virtualized:sn.value},{"virtual-scroll-coordinated":Qt.value},{"stable-layout":_F.value},{"typewriter-simple-cursor":Ii.value&&d.value==="simple"}]]),"data-custom-id":I.customId,onClick:Fv,onMouseover:iR,onMouseout:rR},[Ko.value||sn.value?(y(),M(Pe,{key:0},[Ko.value?(y(),he(lpe,{key:0,width:Ns.value,"flow-root":sn.value||Qt.value,"paragraph-node":no.value,"list-item-node":$s.value,"list-node":Xs.value,"heading-nodes":ci.value,"set-paragraph-wrapper":xF,"set-list-item-wrapper":SF,"set-list-wrapper":AF,"set-heading-wrapper":EF},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):ee("",!0),sn.value?(y(),M("div",{key:1,class:"node-spacer",style:Zt({height:`${tv.value}px`}),"aria-hidden":"true"},null,4)):ee("",!0)],64)):ee("",!0),lR.value?(y(!0),M(Pe,{key:1},pt(M0.value,ae=>(y(),M(Pe,{key:ae.vnodeKey},[x0(ae.index)?(y(),he(bs(ae.component),zn({key:0,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":I.customId,"is-dark":I.isDark,onMouseover:q[4]||(q[4]=be=>s("mouseover",be)),onMouseout:q[5]||(q[5]=be=>s("mouseout",be)),onCopy:q[6]||(q[6]=be=>i(be)),onHandleArtifactClick:q[7]||(q[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):ee("",!0)],64))),128)):(y(!0),M(Pe,{key:2},pt(M0.value,ae=>(y(),M("div",{key:ae.vnodeKey,ref_for:!0,ref:be=>S0(ae.index,be),class:"node-slot","data-node-index":ae.index,"data-node-type":ae.node.type},[x0(ae.index)?(y(),M("div",{key:0,ref_for:!0,ref:be=>(function(Ne,De){var je;De||(function(nt){const Be=`${ov()}-${nt}`;let Xe=!1;for(const lt of Array.from(Yi.keys())){const rt=sl.get(lt);(rt?.index===nt||lt===Be||lt.startsWith(`${Be}-`))&&(Yi.delete(lt),sl.delete(lt),Xe=!0)}Xe&&(Dc(),po("async-node"))})(Ne),Fl.delete(Ne),(function(nt){var Be;const Xe=((Be=bu.get(nt))!=null?Be:0)+1;bu.set(nt,Xe)})(Ne);const ot=da.get(Ne);if(ot){for(const nt of ot)m0(nt);da.delete(Ne)}if((function(nt){const Be=Gi.get(nt);Be&&(fi?.unobserve(Be),Er.delete(Be),Gi.delete(nt))})(Ne),!De||!es.value)return ol.delete(Ne),void bu.delete(Ne);ol.set(Ne,De);const Ve=()=>{A0(Ne,De)};queueMicrotask(Ve);const Ye=(fi||typeof ResizeObserver>"u"||(fi=new ResizeObserver(nt=>{if(nt.length)for(const Be of nt){const Xe=Er.get(Be.target),lt=Gi.get(Xe??-1);Xe!=null&<&&A0(Xe,lt)}else Ol()})),fi);if(Ye&&(Gi.set(Ne,De),Er.set(De,Ne),Ye.observe(De)),typeof window<"u"){const nt=((je=St.value[Ne])==null?void 0:je.type)==="code_block"?[16,80,240,800]:Oe.value?[80]:[];if(nt.length){const Be=nt.map(Xe=>h6(Xe,Ve,"node-resize")).filter(Xe=>Xe!=null);Be.length&&da.set(Ne,Be)}}})(ae.index,be),class:"node-content"},[ae.isCodeBlock?ae.rendersCustomNode?(y(),he(bs(ae.component),zn({key:1,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":I.customId,"is-dark":I.isDark,onCopy:q[12]||(q[12]=be=>i(be)),onHandleArtifactClick:q[13]||(q[13]=be=>s("handleArtifactClick",be))}),{default:me(()=>[ae.hasSlotChildren?(y(),he(re,zn({key:0,ref_for:!0},uo.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?(y(),he(re,zn({key:1,ref_for:!0},uo.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"])):ee("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(y(),he(bs(ae.component),zn({key:2,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":I.customId,"is-dark":I.isDark,onCopy:q[14]||(q[14]=be=>i(be)),onHandleArtifactClick:q[15]||(q[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(y(),he(as,{key:0,name:"fade",css:I.fade!==!1,appear:I.fade!==!1},{default:me(()=>[ae.rendersCustomNode?(y(),he(bs(ae.component),zn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":I.customId,"is-dark":I.isDark,onCopy:q[8]||(q[8]=be=>i(be)),onHandleArtifactClick:q[9]||(q[9]=be=>s("handleArtifactClick",be))}),{default:me(()=>[ae.hasSlotChildren?(y(),he(re,zn({key:0,ref_for:!0},uo.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?(y(),he(re,zn({key:1,ref_for:!0},uo.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"])):ee("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(y(),he(bs(ae.component),zn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":I.customId,"is-dark":I.isDark,onCopy:q[10]||(q[10]=be=>i(be)),onHandleArtifactClick:q[11]||(q[11]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(y(),M("div",{key:1,class:"node-placeholder",style:Zt({height:`${Yn(ae.index)}px`})},null,4))],8,cpe))),128)),Ii.value&&d.value==="precise"?(y(),M("span",{key:3,ref_key:"typewriterCursorRef",ref:Tu,class:"typewriter-cursor","aria-hidden":"true"},null,512)):ee("",!0),sn.value?(y(),M("div",{key:4,class:"node-spacer",style:Zt({height:`${nv.value}px`}),"aria-hidden":"true"},null,4)):ee("",!0)],42,upe))}}})),[["__scopeId","data-v-a9489508"]]),Vi=R$;Vi.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Vi.__name,Vi.name].filter(n=>!!n));for(const n of t)e.component(n,R$)};const M5=Object.freeze(Object.defineProperty({__proto__:null,default:Vi},Symbol.toStringTag,{value:"Module"})),dpe={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"},fpe={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"},ppe={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"},hpe={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"},mpe={class:"admonition-title"},gpe=["aria-expanded","aria-controls"],vpe=["id"],lm=Gn(et({__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=R(()=>{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=Z(!!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)=>(y(),M("div",{class:Re(["admonition",[`admonition-${o.node.kind}`]])},[C("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(y(),M("svg",dpe,[...c[1]||(c[1]=[C("circle",{cx:"12",cy:"12",r:"10"},null,-1),C("path",{d:"M12 16v-4"},null,-1),C("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(y(),M("svg",fpe,[...c[2]||(c[2]=[C("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),C("path",{d:"M9 18h6"},null,-1),C("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(y(),M("svg",ppe,[...c[3]||(c[3]=[C("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),C("path",{d:"M12 9v4"},null,-1),C("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(y(),M("svg",hpe,[...c[4]||(c[4]=[C("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),C("path",{d:"M12 8v4"},null,-1),C("path",{d:"M12 16h.01"},null,-1)])])):ee("",!0),C("span",mpe,N(i.value),1),o.node.collapsible?(y(),M("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(y(),M("svg",{style:Zt({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]=[C("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,gpe)):ee("",!0)]),Bn(C("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[j(p(Vi),{"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,vpe),[[qs,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);lm.install=e=>{e.component(lm.__name,lm)};const f8=()=>jo(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let xh=null,Sh=f8,Ah=null,mx=!1,gx=!1;function $Ve(){return mo(this,null,function*(){if(xh)return xh;const e=Sh;return e?e===f8&&mx?null:Ah||(Ah=mo(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===f8)return e===Sh&&(mx=!0,(function(o){gx||(gx=!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===Sh&&(Ah=null)}return e!==Sh?null:t?(xh=(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),xh):null}),Ah):null})}let Mh=null,O$=null,Th=null;function NVe(){return typeof O$=="function"}function FVe(){return mo(this,null,function*(){if(Mh)return Mh;const e=O$;return e?Th||(Th=mo(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?(Mh=n,Mh):null}).finally(()=>{Th=null}),Th):null})}const RVe=Symbol("markstreamLanguageIconResolver"),P$=["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"],ype=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),p8=[...P$].sort((e,t)=>t.length-e.length).join("|"),a4=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${p8}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${p8})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?,。;!?)])`].join(""),"gi"),D$=/[),.;!?,。;!?)]+$/;function kpe(e){const t=e.toLowerCase();return P$.some(n=>t.endsWith(`.${n}`))}function bpe(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${p8}))["']`,"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 Cpe(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(D$,"");if(!s)return null;const i=s.split("/").pop()??s,r=s.includes("/"),l=ype.has(i),a=kpe(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 wpe(e,t={}){const n=[];a4.lastIndex=0;let o;for(;(o=a4.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(D$,""),c=a.length-u.length;a=u;const d=Cpe(a,t);if(!d)continue;const f=o.index+r,h=f+a.length;n.push({...d,start:f,end:h,text:a}),c>0&&(a4.lastIndex-=c)}return n}function u4(e,t){let n=0,o=t-1;for(;o>=0&&e[o]==="\\";)n++,o--;return n%2===1}const _pe=/\s/,xpe=/\p{Nd}/u;function Cc(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function Spe(e,t){if(t<=0)return;const n=e.charCodeAt(t-1),o=n>=56320&&n<=57343&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function vx(e){return e!==void 0&&_pe.test(e)}function a1(e){return e!==void 0&&xpe.test(e)}function Ape(e,t){const n=e[t+1];return a1(Cc(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&a1(Cc(e,t+2))}function vg(e){return e!==void 0&&e>="A"&&e<="Z"}const B$=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 Mpe(e,t){if(!vg(e[t-1]))return!1;let n=t-1;for(;n>0&&vg(e[n-1]);)n--;return B$.test(e.slice(n,t))||a1(Cc(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(Cc(e,t+1)??"")}function Tpe(e,t){if(!vg(e[t-1]))return!1;let n=t-1;for(;n>0&&vg(e[n-1]);)n--;return B$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}const Epe=/^[-–—,,、;;::~~(([【//]$/;function Ipe(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!a1(Cc(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&Epe.test(o)}function Lpe(e){const t=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;let n=e.replace(new RegExp(String.raw`^(?:${t})+`,"u"),"");for(;;){const s=n.replace(new RegExp(String.raw`^\p{L}+(?:${t})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(s===n)break;n=s}if(!/\p{Nd}/u.test(n))return!1;const o=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${o}(?:\p{L}+)?(?:(?:${t})+${o}(?:\p{L}+)?)*$`,"u").test(n)}const ul=-1,yx=1,kx=2,bx=3;function $pe(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(ul),s=new Int32Array(t+1),i=new Int32Array(t+1),r=[],l=[];{const F=[];for(let K=0;K{for(;a=(l[a]?.[1]??0);)a++;const U=l[a];return U!==void 0&&F>=U[0]},c=new Set(' \n\r)。,、;:!?"<>`「」『』【】〔〕()*—–“”‘’'),d=[];for(const F of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))d.push(F.index);for(const F of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))d.push(F.index);for(const F of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(F.index===0||!/[\w~/.-]/.test(e[F.index-1]))&&d.push(F.index);d.sort((F,U)=>F-U);let f=-1;for(const F of d){if(FF+7&&!/[\w/?#@~.+&=%-]/.test(e[U+1]??""))break}U++}r.push([F,U]),f=U}const h=[];for(let F=0;F]/.test(K))continue;let V=U,ie=ul,ne=ul;for(;V"){ne=V;break}if(!z&&X==="/"&&e[V+1]===">"){ne=V+1;break}if(!/\s/.test(X)){ie=V;break}for(;V"){ne=V;break}if(z){ie=V;break}if(le==="/"&&e[V+1]===">"){ne=V+1;break}const Ie=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(V));if(!Ie){ie=V;break}V+=Ie[0].length;let de=V;for(;de`]+/.exec(e.slice(de));if(!ve){ie=de;break}V=de+ve[0].length}}}if(ne!==ul)h.push([F,ne+1]),F=ne;else if(ie!==ul){const X=e.indexOf("<",F+1);F=(X!==-1&&X",F+2);ie===-1?v=!1:(h.push([F,ie+2]),F=ie+1,z=!0)}else if(U==="!"){if(e[F+2]==="-"&&e[F+3]==="-"){if(m){const ie=e.indexOf("-->",F+4);ie===-1?m=!1:(h.push([F,ie+3]),F=ie+2,z=!0)}}else if(e.startsWith("[CDATA[",F+2)){if(k){const ie=e.indexOf("]]>",F+9);ie===-1?k=!1:(h.push([F,ie+3]),F=ie+2,z=!0)}}else if(w&&/[A-Z]/.test(e[F+2]??"")){const ie=e.indexOf(">",F+3);ie===-1?w=!1:(h.push([F,ie+1]),F=ie,z=!0)}}if(z)continue;if(U!==void 0&&/[a-zA-Z]/.test(U)){const ie=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(F+1));if(ie){let ne=F+1+ie[0].length;for(;ne"&&e[ne]!=="<"&&!/\s/.test(e[ne]);)ne++;if(e[ne]===">"){h.push([F,ne+1]),F=ne;continue}}}if(U===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(U))continue;let W=F+1;for(;W"&&(h.push([F,W+1]),F=W)}}h.sort((F,U)=>F[0]-U[0]);const b=[];for(const[F,U]of h){const z=b[b.length-1];z&&F<=z[1]?z[1]=Math.max(z[1],U):b.push([F,U])}r.push(...b);let _=0;const g=F=>{for(;_=(b[_]?.[1]??0);)_++;const U=b[_];return U!==void 0&&F>=U[0]},x=[];let S=null,T=0,A=!1;for(let F=0;F"&&(A=!1);else if(!(u(F)||g(F))){if(S!==null)e[F]===S&&(S=null);else if(x.length>0&&(e[F]==='"'||e[F]==="'")&&F>0&&/\s/.test(e[F-1]))S=e[F];else if(e[F]==="[")T++;else if(e[F]==="]")T>0&&e[F+1]==="("&&(x.push(F),A=e[F+2]==="<",F++),T=Math.max(0,T-1);else if(e[F]==="("&&x.length>0)x.push(-1);else if(e[F]===")"&&x.length>0){const U=x.pop();if(U!==void 0&&U>=0){const z=e.slice(U+2,F);(/\s/.exec(z)===null||z.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(z)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(z))&&r.push([U,F+1])}}}r.sort((F,U)=>F[0]-U[0]);const E=[];for(const[F,U]of r){const z=E[E.length-1];z&&F<=z[1]?z[1]=Math.max(z[1],U):E.push([F,U])}const P=F=>{let U=0,z=E.length-1;for(;U<=z;){const W=U+z>>1,K=E[W];if(K===void 0)return!1;if(F=K[1])U=W+1;else return!0}return!1};for(let F=0;F=0;F--)n[F]===bx&&(D=F),o[F]=D;const I=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,$=/[^\p{L}\p{Nd}\s]$/u,B=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,H=/(?:^|\s)[a-z]{2,}/,O=(F,U)=>{const z=Cc(e,F+1);if(z===void 0||!I.test(z))return!1;const W=o[F+1]??ul;if(W!==ul){const K=e.slice(F+1,W);return!(K.length===((K.codePointAt(0)??0)>65535?2:1))&&B.test(K)||/[,;:!?]$/.test(K)||/^[a-z]{2,}$/.test(K)?!1:(s[W]??0)-(s[F+1]??0)===0&&(i[W]??0)-(i[F+1]??0)===0}return $.test(U)||B.test(U)||H.test(U)};return(F,U=-1)=>{if(e[F]!=="$"||n[F]===yx||e[F+1]==="$"||e[F-1]==="$"&&U!==F||Mpe(e,F)||F+1>=t||vx(e[F+1]))return null;const z=o[F+1]??ul;if(z===ul||(s[z]??0)-(s[F+1]??0)>0||(i[z]??0)-(i[F+1]??0)>0)return null;const W=e.slice(F+1,z);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(W)||e[z+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(W)||a1(Spe(e,F))&&Lpe(W)||Ape(e,F)&&(O(z,W)||Tpe(e,z)||/\s/.test(W)&&/\p{Nd}$/u.test(W)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(W)||e[z+1]==="$"&&!/\p{L}/u.test(W)&&/[^\p{L}\p{Nd}\s]$/u.test(W))?null:{content:W,end:z+1}}}const Cx=new WeakMap;function Npe(e,t){if(e.src[e.pos]!=="$")return!1;let n=Cx.get(e);(!n||n.src!==e.src)&&(n={src:e.src,match:$pe(e.src),lastEnd:-1},Cx.set(e,n));const o=n.match(e.pos,n.lastEnd);if(!o||o.end>e.posMax)return!1;if(n.lastEnd=o.end,t)return e.pos=o.end,!0;const s=e.push("math_inline","math",0);return s.content=o.content,s.markup="$",s.raw=e.src.slice(e.pos,o.end),s.loading=!1,e.pos=o.end,!0}function Fpe(e){return e.inline.ruler.disable("math"),e.inline.ruler.before("escape","math",Npe),e}const Rpe=12e4,Ope=6e4,Ppe=32,Dpe=3e4,wx=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function Bpe(e){let t=0,n=0,o=0;wx.lastIndex=0;let s;for(;(s=wx.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,o=Math.max(o,r.length)}return{codeRenderer:e.length>=Rpe||n>=Ope||t>=Ppe||o>=Dpe?"pre":"shiki",codeFenceCount:t,codeChars:n}}async function H$(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 zpe(e)}function Hpe(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||H$(e)}function zpe(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 z$="md-table-wide",W$="md-table-toggle",U$="md-table-fade",_x="md-table-toggle--show",Wpe="md-table-at-end",Upe="kimi-table-layout",j$='',jpe='';function e0(e){return e.querySelector(`button.${W$}`)}function V$(e){return e.querySelector(`.${U$}`)}const Vpe=26;function qpe(e){const t=e0(e);if(!t)return;const n=e.querySelector("thead tr")??e.querySelector("tr");if(!n)return;const o=n.getBoundingClientRect(),s=e.getBoundingClientRect().top,i=Math.max(2,Math.round(o.top-s+(o.height-Vpe)/2));t.style.top=`${i}px`,t.style.right=`${i}px`}function Kpe(e){return e.closest(".a-msg .msg")!==null}function Zpe(e){const t=e.querySelector("table");return t!==null&&t.scrollWidth>e.clientWidth+1}function q$(e){const t=`translateX(${e.scrollLeft}px)`,n=V$(e);n&&(n.style.transform=t);const o=e0(e);o&&(o.style.transform=t);const s=e.scrollLeft+e.clientWidth>=e.scrollWidth-2;e.classList.toggle(Wpe,s)}function Gpe(e,t){const n=e0(e);if(n)return n;if(!Kpe(e))return null;const o=document.createElement("div");o.className=U$,o.setAttribute("aria-hidden","true");const s=document.createElement("button");return s.type="button",s.className=W$,s.innerHTML=j$,s.setAttribute("aria-label",t.widen),s.title=t.widen,s.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),Ype(e,t)}),e.appendChild(o),e.appendChild(s),e.addEventListener("scroll",()=>q$(e),{passive:!0}),T5(e),s}function Ype(e,t){const n=e.classList.toggle(z$),o=e0(e);if(o){o.innerHTML=n?jpe:j$;const s=n?t.restore:t.widen;o.setAttribute("aria-label",s),o.title=s}T5(e),e.dispatchEvent(new CustomEvent(Upe,{bubbles:!0}))}function T5(e){const t=e0(e);if(!t)return;const n=Zpe(e),o=e.classList.contains(z$);t.classList.toggle(_x,n||o);const s=V$(e);s&&s.classList.toggle(_x,n),qpe(e),q$(e)}function Xpe(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function Jpe(e){return new Worker("/assets/mermaidParser.worker-BFSlSHEW.js",{type:"module",name:e?.name})}const Qpe={key:1,class:"diff-wrap"},e0e={class:"diff-bar"},t0e=["aria-label","onClick"],n0e={class:"diff-pre"},o0e={key:0,class:"diff-sign"},s0e={class:"diff-text"},i0e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",xx="github-light",Sx="github-dark",r0e=et({__name:"Markdown",props:{text:{},openFile:{},streaming:{type:Boolean,default:!1}},setup(e){qce(),ide(),Zce(),ade(),Kce(new Xpe),lde(new Jpe);const{t}=m1(),n=nn("resolveImage"),o=Z(null),s=e,i=R(()=>!s.streaming),r=R(()=>bpe(s.text??"")),l=R(()=>s.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:Bpe(s.text??"")),a=f2(),u=R(()=>!s.streaming),c=Go(new Map),d=new Set,f=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,h=/(]*?\bsrc=")([^"]+)(")/gi;function m(F){return!/^(https?:|data:|blob:)/i.test(F)}function v(F){if(!n)return;const U=[];for(const z of[f,h]){z.lastIndex=0;let W;for(;(W=z.exec(F))!==null;)U.push(W[2]??"")}for(const z of U)!z||!m(z)||c.has(z)||d.has(z)||(d.add(z),n(z).then(W=>{c.set(z,W!==z?W:"")}).catch(()=>{c.set(z,"")}).finally(()=>{d.delete(z)}))}function k(F){if(!n)return F;const U=z=>{if(!m(z))return null;const W=c.get(z);return W===void 0?i0e:W===""?null:W};return F.replace(f,(z,W,K,V)=>{const ie=U(K);return ie===null?z:`${W}${ie}${V}`}).replace(h,(z,W,K,V)=>{const ie=U(K);return ie===null?z:`${W}${ie}${V}`})}Je(()=>s.text,F=>v(F??""),{immediate:!0});function w(){if(!o.value||!s.openFile||s.streaming)return;const F=document.createTreeWalker(o.value,NodeFilter.SHOW_TEXT),U=[];let z=F.nextNode();for(;z;){const W=z,K=W.parentElement;K&&!K.closest("a, pre, .md-file-link, svg")&&W.data.trim().length>0&&U.push(W),z=F.nextNode()}for(const W of U){const K=wpe(W.data,{aliases:r.value});if(K.length===0||!W.parentNode)continue;const V=document.createDocumentFragment();let ie=0;for(const ne of K){ne.start>ie&&V.append(document.createTextNode(W.data.slice(ie,ne.start)));const X=document.createElement("button");X.type="button",X.className="md-file-link",X.textContent=ne.text,X.title=ne.line?`${ne.path}:${ne.line}`:ne.path,X.addEventListener("click",le=>{le.preventDefault(),le.stopPropagation(),s.openFile?.({path:ne.path,line:ne.line})}),V.append(X),ie=ne.end}ie{W.preventDefault(),W.stopPropagation(),s.openFile?.({path:_(z)})}))}}function x(){return{widen:t("conversation.widenTable"),restore:t("conversation.restoreTableWidth")}}function S(){if(!o.value||s.streaming)return;const F=x();for(const U of o.value.querySelectorAll(".table-node-wrapper"))Gpe(U,F)}function T(){if(!(!o.value||s.streaming))for(const F of o.value.querySelectorAll(".table-node-wrapper"))T5(F)}function A(){yt().then(()=>{w(),g(),S()})}Je(()=>s.text,A),Je(()=>s.streaming,A);let E=null,P=null;dn(()=>{A(),o.value&&(E=new MutationObserver(A),E.observe(o.value,{childList:!0,subtree:!0}),P=new ResizeObserver(T),P.observe(o.value))}),bn(()=>{E?.disconnect(),P?.disconnect()});const D={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}}},I=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,$=R(()=>{const F=k(s.text??""),U=[];let z=0;I.lastIndex=0;let W;for(;(W=I.exec(F))!==null;){const V=W[1]??"",ie=F.slice(z,W.index)+(V||"");ie.trim()&&U.push({kind:"md",text:ie}),U.push({kind:"diff",code:W[2]??""}),z=I.lastIndex}const K=F.slice(z);return(K.trim()||U.length===0)&&U.push({kind:"md",text:K}),U});function B(F){return F.split(` +`).map(U=>U.startsWith("@@")?{type:"hunk",sign:"",text:U}:/^\+(?!\+\+)/.test(U)?{type:"add",sign:"+",text:U.slice(1)}:/^-(?!--)/.test(U)?{type:"del",sign:"-",text:U.slice(1)}:U.startsWith(" ")?{type:"ctx",sign:"",text:U.slice(1)}:{type:"ctx",sign:"",text:U})}const H=Z(null);function O(F,U){H$(F).then(z=>{z&&(H.value=U,setTimeout(()=>{H.value=null},1400))})}return(F,U)=>(y(),M("div",{ref_key:"mdRef",ref:o,class:"md"},[(y(!0),M(Pe,null,pt($.value,(z,W)=>(y(),M(Pe,{key:W},[z.kind==="md"?(y(),he(p(Vi),{key:0,content:z.text,"custom-markdown-it":p(Fpe),mode:"chat","code-renderer":l.value.codeRenderer,"is-dark":p(a),"code-block-light-theme":xx,"code-block-dark-theme":Sx,themes:[xx,Sx],"code-block-props":D,final:i.value,"smooth-streaming":e.streaming,"batch-rendering":u.value,"defer-nodes-until-visible":!1,onCopy:p(Hpe)},null,8,["content","custom-markdown-it","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(y(),M("div",Qpe,[C("div",e0e,[U[0]||(U[0]=C("span",{class:"diff-lang"},"diff",-1)),j(p(pn),{text:p(t)("filePreview.copyCode")},{default:me(()=>[C("button",{class:"diff-copy","aria-label":p(t)("filePreview.copyCode"),onClick:K=>O(z.code,W)},[j(p(Te),{name:H.value===W?"check":"copy",size:"sm"},null,8,["name"])],8,t0e)]),_:2},1032,["text"])]),C("pre",n0e,[C("code",null,[(y(!0),M(Pe,null,pt(B(z.code),(K,V)=>(y(),M("span",{key:V,class:Re(["diff-line",`diff-${K.type}`])},[K.type!=="hunk"?(y(),M("span",o0e,N(K.sign),1)):ee("",!0),C("span",s0e,N(K.text),1)],2))),128))])])]))],64))),128))],512))}}),Ic=ft(r0e,[["__scopeId","data-v-2a3e373d"]]),l0e={state:"idle"};function a0e(e){const t=Z(l0e),n=Z(ui(cn.updateSkippedVersion)),o=Z(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(i=>{o.value=i}).catch(()=>{}),e!==void 0){let i=!1;e.onUpdateStatus(r=>{i=!0,t.value=r}),e.getUpdateStatus().then(r=>{i||(t.value=r)}).catch(()=>{})}const s=R(()=>{const i=t.value;return!(i.state==="idle"||i.state==="available"&&i.version!==void 0&&i.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:o,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:i=>{o.value=i,e?.setUpdateAutoDownload?.(i).catch(()=>{})},skipVersion:()=>{const i=t.value.version;t.value.state==="available"&&i!==void 0&&(n.value=i,Ls(cn.updateSkippedVersion,i))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const i=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return i.outcome==="available"&&i.version!==void 0&&i.version===n.value&&(n.value=null,ur(cn.updateSkippedVersion)),i},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let c4=null;function K$(){return c4===null&&(c4=a0e(window.kimiDesktop)),c4}const u0e=["data-state"],c0e=["aria-label"],d0e={class:"upd-pill-text"},f0e={key:0,class:"upd-meta"},p0e={key:1,class:"upd-notes"},h0e={class:"upd-notes-title"},m0e={key:2,class:"upd-progress"},g0e={key:3,class:"upd-message"},v0e={class:"upd-foot"},y0e={class:"upd-foot-actions"},k0e=et({__name:"UpdateIndicator",setup(e){const{t,locale:n}=Nt(),{status:o,visible:s,skipVersion:i,download:r,install:l,autoDownload:a,setAutoDownload:u,canToggleAutoDownload:c}=K$(),d=Z(!1),f="0.33.0".trim()?"0.33.0":"",h=R(()=>{switch(o.value.state){case"available":return t("sidebar.update");case"downloading":return`${o.value.percent??0}%`;case"downloaded":return t("sidebar.updateDone");case"error":return t("sidebar.updateFailed");default:return""}}),m=R(()=>{switch(o.value.state){case"available":return t("sidebar.updateAvailable",{version:o.value.version??""});case"downloading":return t("sidebar.updateDownloading",{percent:o.value.percent??0});case"downloaded":return t("sidebar.updateReady",{version:o.value.version??""});case"error":return t("sidebar.updateFailed");default:return""}}),v=R(()=>{const T=o.value.releaseDate;if(T===void 0||T==="")return"";const A=new Date(T),E=Number.isNaN(A.getTime())?T:A.toLocaleDateString();return t("sidebar.updateReleaseDate",{date:E})}),k=R(()=>{const T=[];return v.value!==""&&T.push(v.value),f!==""&&T.push(t("sidebar.updateCurrentVersion",{version:f})),T.join(" · ")}),w=R(()=>o.value.percent??0),b=R(()=>{const T=o.value.releaseNotes;return T===void 0?"":((n.value.toLowerCase().startsWith("zh")?T.zh:T.en)??T.zh??T.en??"").trim()}),_=R(()=>{switch(o.value.state){case"error":return"alert-triangle";default:return"download"}});function g(){r()}function x(){i(),d.value=!1}function S(){l(),d.value=!1}return(T,A)=>p(s)?(y(),M("span",{key:0,class:"upd","data-state":p(o).state},[C("button",{class:"upd-pill",type:"button","aria-label":h.value,onClick:A[0]||(A[0]=E=>d.value=!0)},[j(p(Te),{class:"upd-pill-icon",name:_.value,size:"sm"},null,8,["name"]),C("span",d0e,N(h.value),1)],8,c0e),j(p(ua),{open:d.value,title:m.value,size:"lg","onUpdate:open":A[4]||(A[4]=E=>d.value=E)},{foot:me(()=>[C("div",v0e,[C("div",y0e,[p(o).state==="available"?(y(),M(Pe,{key:0},[j(p(Rt),{variant:"ghost",onClick:x},{default:me(()=>[qe(N(p(t)("sidebar.updateSkip")),1)]),_:1}),j(p(Rt),{onClick:g},{default:me(()=>[qe(N(p(t)("sidebar.updateDownloadNow")),1)]),_:1})],64)):p(o).state==="downloading"?(y(),he(p(Rt),{key:1,variant:"secondary",onClick:A[1]||(A[1]=E=>d.value=!1)},{default:me(()=>[qe(N(p(t)("sidebar.updateBackground")),1)]),_:1})):p(o).state==="downloaded"?(y(),M(Pe,{key:2},[j(p(Rt),{variant:"ghost",onClick:A[2]||(A[2]=E=>d.value=!1)},{default:me(()=>[qe(N(p(t)("sidebar.updateRestartLater")),1)]),_:1}),j(p(Rt),{onClick:S},{default:me(()=>[qe(N(p(t)("sidebar.updateRestartNow")),1)]),_:1})],64)):p(o).state==="error"?(y(),he(p(Rt),{key:3,variant:"danger-soft",onClick:g},{default:me(()=>[qe(N(p(t)("sidebar.updateRetry")),1)]),_:1})):ee("",!0)]),p(c)?(y(),he(p(rW),{key:0,class:"upd-auto","model-value":p(a),"onUpdate:modelValue":A[3]||(A[3]=E=>p(u)(E))},{default:me(()=>[qe(N(p(t)("sidebar.updateAutoDownload")),1)]),_:1},8,["model-value"])):ee("",!0)])]),default:me(()=>[(p(o).state==="available"||p(o).state==="downloaded")&&k.value?(y(),M("p",f0e,N(k.value),1)):ee("",!0),b.value?(y(),M("section",p0e,[C("h4",h0e,N(p(t)("sidebar.updateWhatsNew")),1),j(p(Ic),{text:b.value},null,8,["text"])])):ee("",!0),p(o).state==="downloading"?(y(),M("div",m0e,[C("div",{class:"upd-progress-fill",style:Zt({width:`${w.value}%`})},null,4)])):ee("",!0),p(o).state==="error"&&p(o).message?(y(),M("p",g0e,N(p(o).message),1)):ee("",!0)]),_:1},8,["open","title"])],8,u0e)):ee("",!0)}}),b0e=ft(k0e,[["__scopeId","data-v-c0a4acce"]]),yg=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],Hn=Mz({locale:$M()});function E5(e){Hn.global.locale.value=e,Ls(cn.locale,e)}const C0e=["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"],Z$=500,kg=256*1024,Ax=200,d4=16384,f4=500,p4=50,h4=50,w0e=6,_0e=/api[_-]?key|authorization|token|secret|password|cookie|credential|email|phone|nickname|avatar/i,x0e=/^[A-Za-z0-9+/=_-]{200,}$/;let m4=null;function Qr(){if(m4!==null)return m4;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=ui(cn.debug)==="1"),m4=e,e}const Ka=[],Ed=[];let Mf=0;const Yu=[];let Tf=0,S0e=1;const bg=new TextEncoder,A0e=new Set(C0e),I5=Z(0),Ef=Xr(!1);function M0e(){return Ka}function T0e(){Ka.length=0,Ed.length=0,Mf=0,Yu.length=0,Tf=0,I5.value++}function ca(e){if(!Ef.value){try{const t={id:S0e++,ts:Date.now(),source:e.source,kind:String(Kd(e.kind)),label:String(Kd(e.label)),sessionId:e.sessionId===void 0?void 0:String(Kd(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:pu(e.detail)},n=JSON.stringify(t),o=bg.encode(n).byteLength;if(o>kg)return;for(Ka.push(t),Ed.push(n),Mf+=o+(Ed.length>1?1:0);Ka.length>Z$||Mf>kg;){const s=Ed.shift();Ka.shift(),s!==void 0&&(Mf-=bg.encode(s).byteLength,Ed.length>0&&(Mf-=1))}}catch{return}I5.value++}}function Bu(e){if(typeof e=="string")return e.length<=Ax?e:e.slice(0,Ax)}function mr(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function E0e(e,t){if(A0e.has(e))try{const n={ts:Date.now(),event:e,sessionId:Bu(t?.sessionId),status:Bu(t?.status),operation:Bu(t?.operation),seq:mr(t?.seq),durationMs:mr(t?.durationMs),messageCount:mr(t?.messageCount),contentCount:mr(t?.contentCount),mediaCount:mr(t?.mediaCount),sessionCount:mr(t?.sessionCount),workspaceCount:mr(t?.workspaceCount),promptId:Bu(t?.promptId),zipBytes:mr(t?.zipBytes),errorName:Bu(t?.errorName),errorCode:mr(t?.errorCode),requestId:Bu(t?.requestId),phase:Bu(t?.phase),httpStatus:mr(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:mr(t?.line),col:mr(t?.col)},o=JSON.stringify(n),s=bg.encode(o).byteLength;if(s>kg)return;for(Yu.push(o),Tf+=s+(Yu.length>1?1:0);Yu.length>Z$||Tf>kg;){const i=Yu.shift();i!==void 0&&(Tf-=bg.encode(i).byteLength,Yu.length>0&&(Tf-=1))}}catch{return}}function Kd(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 x0e.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>f4?`${i.slice(0,f4)}… [+${i.length-f4} chars]`:i}if(n!=="object")return String(e);if(t>=w0e)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,p4).map(r=>Kd(r,t+1));return e.length>p4&&i.push(`[+${e.length-p4} more items]`),i}const o={},s=Object.entries(e);for(const[i,r]of s.slice(0,h4))o[i]=_0e.test(i)?"[redacted]":Kd(r,t+1);return s.length>h4&&(o._truncatedKeys=s.length-h4),o}function pu(e){if(e===void 0)return;const t=Kd(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>d4)return{_truncated:`detail JSON was ${n.length} chars; first ${d4} kept`,preview:n.slice(0,d4)}}catch{return"[unserializable detail]"}return t}function I0e(e){Qr()&&ca({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:pu(e.body)}})}function L0e(e){if(!Qr())return;const t=e.code!==0;ca({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:pu(e.data)}})}function $0e(e){Qr()&&ca({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 N0e(e,t){Qr()&&ca({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:pu(t)})}function F0e(e){if(!Qr())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;ca({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:pu(e)})}function R0e(e){if(!Qr())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);ca({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:pu(t.payload)})}const O0e={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function P0e(e,t,n){Qr()&&ca({source:"client",kind:`client:${e}`,label:`${O0e[e]} ${t}`,detail:pu(n)})}function D0e(e,t){Qr()&&ca({source:"client",kind:"client:event",label:`· ${e}`,detail:pu(t)})}function bi(e,t){E0e(e,t),ca({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 g4=!1,Eh=null;function B0e(){if(g4)return()=>Eh?.();g4=!0;const e=[];try{if(typeof window<"u"){const n=s=>{bi("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno}),Xl(`[kimi-web] window error: ${s.message}`,s.error instanceof Error?s.error.stack:void 0)},o=s=>{const i=s.reason;bi("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i}),Xl(`[kimi-web] unhandled rejection: ${z0e(i)}`,i instanceof Error?i.stack:void 0)};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(Qr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{P0e(n,i.map(H0e).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(Eh===t){for(const n of e.toReversed())n();Eh=null,g4=!1}};return Eh=t,t}function H0e(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 z0e(e){if(e instanceof Error)return e.message;try{return String(e)}catch{return"[unstringifiable reason]"}}function G$(e=Ka){if(typeof document>"u")return;const t=new Blob([W0e(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`kimi-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 W0e(e=Ka){return e===Ka?Ed.join(` +`):e.map(t=>JSON.stringify(t)).join(` +`)}function U0e(){return Yu.join(` +`)}const Mx=cn.clientId,j0e="kimi-code-web",V0e="web";function q0e(){return{serverHttpUrl:Z0e(),clientId:Y0e(),clientName:j0e,clientVersion:X0e(),clientUiMode:V0e}}function K0e(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function Z0e(){const e=Y$();return h8(e||void 0)}const Tx="kimi-desktop-server-origin";function Y$(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get("kimi_origin");try{return e?(window.sessionStorage.setItem(Tx,e),e):window.sessionStorage.getItem(Tx)??void 0}catch{return e??void 0}}function h8(e){const t=e&&e.trim()?e:K0e(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Ex(e){return e.replace(/^https?:\/\//,"").replace(/\/$/,"")}function G0e(){if(typeof window<"u"){const t=Y$();if(t)return Ex(h8(t))}const e=typeof window<"u"&&window.location?.origin?window.location.origin:"";return Ex(e)}function Y0e(){const e=ui(Mx);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Ls(Mx,t),t}function X0e(){return"0.33.0".trim()?"0.33.0":"0.0.0-dev"}const J0e={restRequest:e=>I0e(e),restResponse:e=>L0e(e),restFailure:e=>$0e(e),wsEvent:e=>{switch(e.kind){case"lifecycle":N0e(e.event,e.detail);break;case"in":R0e(e.frame);break;case"out":F0e(e.frame);break}},traceKeyEvent:(e,t)=>bi(e,t)},Q0e={getToken:eQ,markAuthRequired:sQ},ehe=(e,t)=>t===void 0?Hn.global.t(e):Hn.global.t(e,t);function the(){const e=q0e();return eY({origin:e.serverHttpUrl,identity:{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode},tracer:J0e,credentialStore:Q0e,t:ehe})}const nhe=the();function _t(){return nhe}function ohe(e,t,n){return e==="idle"&&!t&&!n}function X$(e,t){const n=ui(e);return n===null?t:n==="1"}const Cg=Z(X$(cn.notifyEnabled,!0)),L5=Z(X$(cn.notifySound,!0)),$5=Z(typeof Notification<"u"?Notification.permission:"denied"),she="/favicon.ico";async function ihe(e){if(!e){Cg.value=!1,Ls(cn.notifyEnabled,"0");return}if(typeof Notification>"u")return;let t=Notification.permission;if(t==="default")try{t=await Notification.requestPermission()}catch{}$5.value=t,t==="granted"&&(Cg.value=!0,Ls(cn.notifyEnabled,"1"))}function rhe(e){L5.value=e,Ls(cn.notifySound,e?"1":"0")}function N5(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function lhe(e){return{title:Hn.global.t("settings.notifyTitle"),body:N5(e,Hn.global.t("settings.notifyFallback"))}}function ahe(e,t){return{title:Hn.global.t("settings.notifyQuestionTitle"),body:N5(t,e,Hn.global.t("settings.notifyQuestionFallback"))}}function uhe(e,t){return{title:Hn.global.t("settings.notifyApprovalTitle"),body:N5(t,e,Hn.global.t("settings.notifyApprovalFallback"))}}function F5(e,t,n){if(!Cg.value||typeof Notification>"u")return;const o=Notification.permission;if(o!=="denied"){if(o==="default"){Notification.requestPermission().then(s=>{$5.value=s,s==="granted"&&Ix(e,t,n)});return}Ix(e,t,n)}}function Ix(e,t,n){if(!e.isUserWatching)try{const o=new Notification(t.title,{body:t.body,tag:n,icon:she,silent:!L5.value});o.onclick=()=>{try{window.kimiDesktop?.showWindow?.(),window.focus()}catch{}e.onClick(),o.close()}}catch{}}function che(e,t){F5(t,lhe(t.sessionTitle),`kimi-complete-${e}-${t.promptId??Date.now()}`)}function dhe(e){F5(e,ahe(e.sessionTitle,e.questionPreview),`kimi-question-${e.questionId}`)}function fhe(e){F5(e,uhe(e.sessionTitle,e.toolName),`kimi-approval-${e.approvalId}`)}function phe(){return{notifyEnabled:Cg,notifySound:L5,notifyPermission:$5,setNotifyEnabled:ihe,setNotifySound:rhe,maybeNotifyCompletion:che,maybeNotifyQuestion:dhe,maybeNotifyApproval:fhe}}const hhe=1e3,mhe=4096,Lx=32*1024;function ghe(e,t){let n=null,o;const s=new Set;async function i(f){try{const m=await _t().listTasks(f);e.tasksBySession={...e.tasksBySession,[f]:nC(m,e.tasksBySession[f]??[])},await r(f,m)}catch{}}async function r(f,h){if(e.activeSessionId!==f)return;const m=h??e.tasksBySession[f]??[],v=_t(),k=new Map;if(await Promise.all(m.map(async b=>{if((b.status==="completed"||b.status==="failed"||b.status==="cancelled")&&!s.has(b.id)&&!((b.outputLines?.length??0)>0))try{const g=await v.getTask(f,b.id,{withOutput:!0,outputBytes:Lx});g.outputPreview!==void 0&&k.set(b.id,{preview:g.outputPreview,bytes:g.outputBytes}),s.add(b.id)}catch{}})),k.size===0)return;const w=e.tasksBySession[f]??[];e.tasksBySession={...e.tasksBySession,[f]:w.map(b=>{const _=k.get(b.id)??(b.backgroundTaskId!==void 0?k.get(b.backgroundTaskId):void 0);return _?{...b,outputPreview:_.preview,outputBytes:_.bytes}:b})}}async function l(f){if(e.activeSessionId!==f)return;const h=_t();let m;try{m=await h.listTasks(f)}catch{return}const v=new Map;await Promise.all(m.map(async _=>{const g=_.status==="running",x=_.status==="completed"||_.status==="failed"||_.status==="cancelled";if(!(!g&&!x)&&!(x&&(s.has(_.id)||(_.outputLines?.length??0)>0)))try{const S=await h.getTask(f,_.id,{withOutput:!0,outputBytes:g?mhe:Lx});S.outputPreview!==void 0&&v.set(_.id,{preview:S.outputPreview,bytes:S.outputBytes}),x&&s.add(_.id)}catch{}}));const k=e.tasksBySession[f]??[],w=new Map(k.map(_=>[_.id,_])),b=m.map(_=>{const g=w.get(_.id),x=v.get(_.id);return{..._,outputLines:g?.outputLines,text:g?.text,outputPreview:x?.preview??g?.outputPreview,outputBytes:x?.bytes??g?.outputBytes}});e.tasksBySession={...e.tasksBySession,[f]:nC(b,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())},hhe))}function u(){n!==null&&(clearInterval(n),n=null),o=void 0,s.clear()}const c=Z(0);let d=null;return Je(()=>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}),Je(()=>{const f=e.activeSessionId;if(!f)return{sid:void 0,hasRunning:!1};const h=e.tasksBySession[f]??[];return{sid:f,hasRunning:h.some(m=>m.status==="running")}},({sid:f,hasRunning:h},m,v)=>{let k;h&&f!==void 0?a(f):f!==void 0?k=setTimeout(()=>{(e.tasksBySession[f]??[]).some(b=>b.status==="running")||u()},1500):u(),v(()=>{k!==void 0&&clearTimeout(k)})},{deep:!0,immediate:!0}),{taskClock:R(()=>c.value),loadTasksForSession:i}}function m8(e){const t=[];for(const n of e??[])n.kind==="video"?t.push({type:"video",source:{kind:"file",fileId:n.fileId}}):n.kind==="file"?t.push({type:"file",fileId:n.fileId,name:n.name??"",mediaType:n.mediaType||"application/octet-stream",size:n.size??0}):t.push({type:"image",source:{kind:"file",fileId:n.fileId}});return t}const vhe=640,yhe=`(max-width: ${vhe}px)`;function khe(){const e=Z(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(yhe);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),bn(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),bn(()=>t.removeListener(n))),e}const J$=Z(typeof window>"u"?0:window.innerWidth);let Ih=0,wg=!1;function g8(){J$.value=window.innerWidth}function bhe(){wg||typeof window>"u"||(window.addEventListener("resize",g8),wg=!0,g8())}function Che(){!wg||typeof window>"u"||(window.removeEventListener("resize",g8),wg=!1)}function Q$(e,t,n){return Math.max(t,e-n)}function v8(e,t,n){return Math.min(n,Math.max(t,e))}function eN(){return dn(()=>{Ih+=1,bhe()}),Vn(()=>{Ih=Math.max(0,Ih-1),Ih===0&&Che()}),{viewportWidth:J$}}const whe=24;function _he(e){const t=Z(null),n=Z(!0);let o=null,s=null,i=null,r=0,l=0,a=!1,u=0;function c(){const k=t.value;k&&(k.scrollTop=Math.max(k.scrollTop,r))}function d(){const w=t.value?.firstElementChild??null;w!==i&&(i&&o?.unobserve(i),i=w,w&&o?.observe(w))}function f(){const k=t.value;!k||a||(n.value=r-k.scrollTop-lh(k));return}requestAnimationFrame(()=>{requestAnimationFrame(()=>h(k))})}function v(){const k=t.value;k&&(o?.disconnect(),s?.disconnect(),i=null,a=!1,u++,r=0,l=0,typeof ResizeObserver=="function"?(o=new ResizeObserver(()=>{const w=t.value;if(!w)return;const{scrollHeight:b,clientHeight:_}=w,g=b>r+1,x=_{n.value=!0,yt(v)}),Je(t,()=>void yt(v)),dn(()=>void yt(v)),bn(()=>{u++,o?.disconnect(),s?.disconnect()}),{scroller:t,following:n,onScroll:f,pinScroll:m}}function xhe(e){try{const t=ui(e);if(t===null)return null;const n=Number(t);return Number.isFinite(n)?n:null}catch{return null}}function $x(e,t){try{Ls(e,String(t))}catch{}}function She(e){const{storageKey:t,defaultWidth:n,min:o,max:s,reverse:i=!1,axis:r="x",applyLive:l}=e;function a(D){return Number.isFinite(D)?Math.min(Rh(s),Math.max(o,Math.round(D))):n}const u=Z(a(xhe(t)??n)),c=Z(!1);function d(D){const I=D<=o,$=D>=Rh(s),B=r==="x"?"col-resize":"row-resize";if(I&&$)return B;const[H,O]=r==="x"?["e-resize","w-resize"]:["s-resize","n-resize"];return $?i?H:O:I?i?O:H:B}const f=Z(null),h=R(()=>d(f.value??u.value));function m(D){typeof document>"u"||(document.body.style.cursor=d(D))}function v(D){const I=a(D);u.value=I,$x(t,I)}Je(()=>Rh(s),D=>{!c.value&&u.value>D&&v(D)});let k=0,w=0,b=null,_=-1,g=0,x=0,S=0;function T(){if(x=0,!c.value)return;const D=g-k;S=a(w+(i?-D:D)),f.value=S,m(S),l?l(S):u.value=S}function A(D){if(c.value&&(g=r==="x"?D.clientX:D.clientY,x===0)){if(typeof requestAnimationFrame!="function"){T();return}x=requestAnimationFrame(T)}}function E(){if(c.value){if(x!==0&&(cancelAnimationFrame(x),T()),c.value=!1,l?v(S):$x(t,u.value),f.value=null,typeof document<"u"&&(document.body.style.userSelect="",document.body.style.cursor=""),b){try{b.releasePointerCapture(_)}catch{}b.removeEventListener("pointermove",A),b.removeEventListener("pointerup",E),b.removeEventListener("pointercancel",E)}b=null,_=-1}}function P(D){D.preventDefault(),c.value=!0,k=r==="x"?D.clientX:D.clientY,w=a(u.value),S=w,b=D.currentTarget,_=D.pointerId,typeof document<"u"&&(document.body.style.userSelect="none"),m(w);try{b.setPointerCapture(_)}catch{}b.addEventListener("pointermove",A),b.addEventListener("pointerup",E),b.addEventListener("pointercancel",E)}return Vn(E),{width:u,dragging:c,cursor:h,clamp:a,setWidth:v,onPointerDown:P}}const Hr=Z(null),Zd=Z(!1),Ahe=R(()=>Hr.value!==null);function R5(e){const t=Hr.value;!t||Zd.value||(Hr.value=null,t.resolve(e))}async function Mhe(){const e=Hr.value;if(!(!e||Zd.value)){if(!e.action){R5(!0);return}Zd.value=!0;try{await e.action(),Hr.value===e&&(Hr.value=null),e.resolve(!0)}catch(t){Hr.value===e&&(Hr.value=null),e.reject(t)}finally{Zd.value=!1}}}function The(e){return Zd.value?Promise.resolve(!1):(Hr.value&&R5(!1),new Promise((t,n)=>{Hr.value={...e,resolve:t,reject:n}}))}function hu(){return{current:Hr,busy:Zd,isConfirmOpen:Ahe,confirm:The,settle:R5,runAction:Mhe}}function Ehe(e){const{sessionId:t}=e;function n(u){return ui(eC(u))??""}function o(u,c){const d=eC(u);c?Ls(d,c):ur(d)}const s=Z(n(t())),i=Z(null);function r(){const u=i.value;u&&(u.style.height="auto",u.style.height=`${u.scrollHeight}px`)}Je(s,u=>{yt(r),o(t(),u)}),Je(t,(u,c)=>{u!==c&&(o(c,s.value),s.value=n(u),yt(r))});function l(u){s.value=u,yt(()=>{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 Ihe(e){return e?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable===!0:!1}function Lhe(e){const{sessionId:t,mobile:n,starting:o,dockedComposer:s,emptyComposer:i}=e,r=Z(!1);Je(t,()=>{n()||(r.value=!0)}),Je([r,s,i,o],()=>{if(!r.value)return;const l=s.value??i.value;if(!l)return;const a=typeof document<"u"?document.activeElement:null;if(Ihe(a)){r.value=!1;return}l.focus(),(typeof document>"u"||document.activeElement!==a)&&(r.value=!1)},{flush:"post"})}const _g=100;function $he(e){const t=y1(cn.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>_g?n.slice(-_g):n,s={[e]:o};return Tc(cn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function Nhe(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=Z($he(s())),r=R(()=>i.value[s()??""]??[]);let l=-1,a="";function u(w){const b=s();if(l=-1,!b)return;const _=w.trim();if(!_)return;const g=i.value[b]??[];if(g.at(-1)===_)return;const x=[...g,_],S=x.length>_g?x.slice(-_g):x;i.value={...i.value,[b]:S},Tc(cn.inputHistory,i.value)}function c(){const w=n.value;return w?(w.selectionStart??0)===0:!1}function d(w){t.value=w,yt(()=>{const b=n.value;if(!b)return;o();const _=w.length;b.setSelectionRange(_,_)})}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 h(){if(l===-1)return;const w=r.value;l0}return Je(s,()=>{l=-1}),{push:u,caretAtTextStart:c,recallOlder:f,recallNewer:h,resetBrowsing:m,isBrowsing:v,hasHistory:k}}function Fhe(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:r,clearDraft:l}=e,a=Z(!1),u=Z([]),c=Z(0);function d(){const h=t.value;h.startsWith("/")&&!h.includes(" ")?(u.value=mQ(h,CE(s())),c.value=0,a.value=u.value.length>0):a.value=!1}function f(h){if(a.value=!1,h.acceptsInput){t.value=`${h.name} `,yt(()=>{const m=n.value;if(!m)return;const v=t.value.length;m.setSelectionRange(v,v),m.focus(),o()});return}t.value="",l?.(),r(h.name),i(h.name)}return{open:a,items:u,active:c,update:d,select:f}}function Rhe(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s}=e,i=Z(!1),r=Z([]),l=Z(0),a=Z(!1);let u=null;function c(){const h=t.value,m=n.value?.selectionStart??h.length;let v=m-1;for(;v>=0&&!/\s/.test(h[v]);)v--;v++;const k=h.slice(v,m);return k.startsWith("@")?{token:k.slice(1),start:v,end:m}:null}function d(){const h=c(),m=s();if(u!==null&&clearTimeout(u),!h||!m||h.token.length===0){i.value=!1,a.value=!1;return}const v=h.token;u=setTimeout(async()=>{a.value=!0,i.value=!0,l.value=0;const k=()=>{const w=c();return w!==null&&w.token===v&&i.value};try{const w=await m(v);k()&&(r.value=w)}catch{k()&&(r.value=[])}finally{k()&&(a.value=!1)}},200)}function f(h){const m=c();if(!m)return;const v=t.value;t.value=v.slice(0,m.start)+h.path+v.slice(m.end),i.value=!1,yt(()=>{const k=n.value;if(!k)return;const w=m.start+h.path.length;k.setSelectionRange(w,w),k.focus(),o()})}return{open:i,items:r,active:l,loading:a,update:d,select:f}}const Ohe="kimi-web.file-preview-width",gd=320;function Phe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=eN(),i=R(()=>Math.max(0,s.value-t.value)),r=R(()=>Q$(i.value,gd,gd));function l(Y){return v8(Math.round(Y),gd,r.value)}function a(){return l(i.value/2)}const u=R(()=>a()),c=Z(u.value),d=R(()=>v8(c.value,gd,r.value)),f=Z(null),h=R(()=>{const Y=f.value;if(!Y)return null;const fe=e.turns.value.find(we=>we.id===Y.turnId);return fe?.role==="compaction"&&fe.text?fe.text:null}),m=R(()=>h.value!==null);function v(Y){if(f.value?.turnId===Y.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=Y}function k(){f.value=null,n.value==="compaction"&&(n.value=null)}const w=Z(null),b=R(()=>{const Y=w.value;if(!Y)return{entry:void 0,version:0};const fe=e.auxiliaryTranscripts.getEntry(Y.sessionId,Y.subagentId);return{entry:fe,version:fe?.version.value??0}});function _(Y){const fe=e.turns.value.flatMap(we=>we.tools??[]).find(we=>we.agentId===Y);if(!fe)return{};try{const we=JSON.parse(fe.arg);return{name:typeof we.description=="string"?we.description:void 0,subagentType:typeof we.subagent_type=="string"?we.subagent_type:void 0,status:fe.status,outputLines:fe.output}}catch{return{}}}const g=R(()=>{const Y=w.value;if(!Y)return null;const fe=e.activeAppTasks.value.find(Fe=>Fe.agentId===Y.subagentId||Fe.id===Y.subagentId);if(fe)return UY(fe);const we=b.value.entry?.channel,ge=we?.agents.find(Fe=>Fe.agentId===Y.subagentId),Q=we?.refreshError??!1,te=we===void 0||we.loading,ce=we?.snapshot.meta.activity==="turn",ue=_(Y.subagentId),Se=we?.snapshot.items.findLast(Fe=>Fe.kind==="turn"),ze=Se?.kind==="turn"&&Se.state==="cancelled",_e=Se?.kind==="turn"&&Se.state==="failed"||ue.status==="error",Ee=ce?"working":_e||ze?"failed":te?"queued":Q&&ue.status===void 0?"failed":"completed",it=ce?"running":ze?"cancelled":_e?"failed":te?"running":Q&&ue.status===void 0?"failed":"completed";return{id:Y.subagentId,name:ge?.label??ue.name??Y.subagentId,subagentType:ue.subagentType??(ge?.type==="sub"?"subagent":ge?.type),phase:Ee,status:it,outputLines:ue.outputLines}}),x=R(()=>{const Y=b.value.entry;if(!Y)return[];const fe=w.value,we=Y.channel.agents.find(ge=>ge.agentId===fe?.subagentId);return nX(Y.channel.snapshot,e.getFileUrl,we)}),S=R(()=>b.value.entry?.channel.loading??!1),T=R(()=>b.value.entry?.channel.refreshError??!1),A=R(()=>b.value.entry?.channel.loadingOlder??!1),E=R(()=>b.value.entry?.channel.loadOlderError??!1),P=R(()=>b.value.entry?.channel.snapshot.hasMoreOlder??!1),D=R(()=>b.value.entry?.channel.snapshot.meta.activity==="turn"),I=R(()=>g.value!==null);function $(Y){const fe=e.activeSessionId.value;if(!(!Y||!fe)){if(n.value==="agent"&&w.value?.sessionId===fe&&w.value.subagentId===Y){B();return}w.value={sessionId:fe,subagentId:Y},n.value="agent",e.auxiliaryTranscripts.activate(fe,Y)}}function B(){const Y=w.value;Y&&e.auxiliaryTranscripts.deactivate(Y.sessionId,Y.subagentId),w.value=null,n.value==="agent"&&(n.value=null)}Je(n,(Y,fe)=>{if(fe!=="agent"||Y==="agent")return;const we=w.value;we&&e.auxiliaryTranscripts.deactivate(we.sessionId,we.subagentId)});function H(){const Y=b.value.entry;Y&&Y.channel.loadOlder().catch(()=>{})}const O=Z("list"),F=Z(null);function U(){if(n.value==="diff"){z();return}n.value="diff",O.value="list",F.value=null,e.loadGitStatus(e.activeSessionId.value)}function z(){n.value==="diff"&&(n.value=null),O.value="list",F.value=null,e.clearFileDiff()}async function W(Y){O.value="detail",F.value=Y,await e.loadFileDiff(Y)}const K=Xr(null);function V(Y){if(K.value===Y&&n.value==="turn-diff"){ie();return}K.value=Y,n.value="turn-diff"}function ie(){K.value=null,n.value==="turn-diff"&&(n.value=null)}async function ne(Y){if(!e.activeSessionId.value&&e.activeWorkspaceId.value){const fe=await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,Y);return n.value="btw",fe}return await e.openSideChat(Y),n.value="btw",null}function X(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function le(){n.value==="btw"&&(n.value=null)}const Ie=R(()=>e.sideChatVisible.value),de=R(()=>n.value!==null&&(n.value!=="compaction"||m.value)&&(n.value!=="agent"||I.value)&&(n.value!=="btw"||Ie.value)),pe=Z(!1),ve=Z({});function oe(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return w.value?{kind:"agent",...w.value}:null;case"btw":return{kind:"btw"};default:return null}}function ye(Y){if(Y)switch(Y.kind){case"compaction":f.value={turnId:Y.turnId},n.value="compaction";break;case"agent":e.activeSessionId.value&&(w.value={sessionId:e.activeSessionId.value,subagentId:Y.subagentId},n.value="agent",e.auxiliaryTranscripts.activate(e.activeSessionId.value,Y.subagentId));break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function G(){return n.value==="compaction"&&m.value?(k(),!0):n.value==="agent"&&I.value?(B(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(z(),!0):n.value==="turn-diff"?(ie(),!0):n.value==="btw"?(X(),!0):!1}return Je(e.activeSessionId,(Y,fe)=>{if(fe){const we=oe();we?ve.value[fe]=we:delete ve.value[fe]}o(),k(),B(),z(),ie(),le(),Y&&ye(ve.value[Y])}),{PREVIEW_WIDTH_KEY:Ohe,PREVIEW_MIN:gd,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,compactionPanelText:h,compactionPanelVisible:m,openCompactionPanel:v,closeCompactionPanel:k,agentPanelMember:g,agentPanelTurns:x,agentPanelLoading:S,agentPanelLoadError:T,agentPanelLoadingMore:A,agentPanelLoadMoreError:E,agentPanelHasMore:P,agentPanelRunning:D,agentPanelVisible:I,openAgentPanel:$,closeAgentPanel:B,loadOlderAgentMessages:H,detailDiffMode:O,detailDiffPath:F,openDiffDetail:U,closeDiffDetail:z,selectDiffFile:W,turnDiffChange:K,openTurnDiff:V,closeTurnDiff:ie,btwVisible:Ie,openSideChatTab:ne,closeSideChat:X,hideSideChatPanel:le,sidePanelVisible:de,panelDragging:pe,closeOpenSidePanel:G}}const Dhe=cn.sidebarWidth,Nx=cn.sidebarCollapsed,Fx=270,v4=220,Bhe=480,Hhe=320;function zhe(e={}){const{viewportWidth:t}=eN(),n=Z(Fx),o=Z(!1),s=Z(!1),i=R(()=>{const c=Hhe+(Rh(e.previewOpen)?gd:0);return Math.min(Bhe,Q$(t.value,v4,c))}),r=R(()=>v8(n.value,v4,i.value));function l(){try{o.value=ui(Nx)==="true"}catch{o.value=!1}}function a(){try{Ls(Nx,String(o.value))}catch{}}function u(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:Dhe,SIDEBAR_DEFAULT:Fx,SIDEBAR_MIN:v4,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}const Whe=40409;function Rx(e){return Us(e)&&e.code===Whe}function Ox(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")}function Px(e){if(e.startsWith("\\\\"))return e;const t=/^[a-zA-Z]:/.test(e)?e.slice(0,2):"",n=[];for(const o of e.slice(t.length).split(/[\\/]+/))if(!(!o||o===".")){if(o===".."){n.pop();continue}n.push(o)}return t?`${t}/${n.join("/")}`:`/${n.join("/")}`}function Uhe({client:e,detailTarget:t,t:n}){const o=Z(null),s=Z(null),i=Z(!1),r=Z(null),l=Z(null);let a=0;const u=R(()=>{const g=l.value;return g?e.getFileDownloadUrl(g):null}),c=R(()=>o.value!==null&&l.value!==null);function d(g){return g.length>1?g.replace(/\/+$/,""):g}function f(g){const x=h2(g,e.status.value.cwd);return x===null||x.split(/[\\/]+/).includes("..")?null:h(x)||null}function h(g){const x=[];for(const S of g.split(/[\\/]+/))if(!(!S||S===".")){if(S===".."){x.pop();continue}x.push(S)}return x.join("/")}function m(g){const x=g.trim();if(!x)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(x))return{error:n("filePreview.errors.unsupportedPath")};if(x.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const S=d(e.status.value.cwd);if(x.startsWith("/")){if(!S||x!==S&&!x.startsWith(`${S}/`))return{error:n("filePreview.errors.outsideWorkspace")};const A=x===S?"":x.slice(S.length+1);if(A.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const E=h(A);return E?{path:E}:{error:n("filePreview.errors.isDirectory")}}if(x.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const T=h(x);return T?{path:T}:{error:n("filePreview.errors.emptyPath")}}async function v(g){const x=o.value;if(t.value==="file"&&x&&x.path===g.path&&x.line===g.line){w();return}const S=++a;if(t.value="file",s.value=null,r.value=null,i.value=!0,o.value=g,l.value=null,typeof g.content=="string"){i.value=!1,s.value={path:g.path,content:g.content,encoding:"utf-8",mime:"text/markdown",isBinary:!1,size:g.content.length};return}if(!Ox(g.path)&&g.path.split(/[\\/]+/).includes("..")){const A=d(e.status.value.cwd);A&&(g={...g,path:Px(`${A}/${g.path}`)})}if(Ox(g.path)){g={...g,path:Px(g.path)};const A=f(g.path);if(A!==null)g={...g,path:A};else{try{const E=await e.readHostFileContent(g.path);if(S!==a)return;l.value=null,s.value={path:g.path,content:E.content,encoding:E.encoding,mime:E.mime,isBinary:E.isBinary,size:E.size}}catch(E){if(S!==a)return;r.value=Rx(E)?n("filePreview.errors.notFound"):pU(E)?n("filePreview.errors.tooLarge"):E instanceof Error?E.message:n("filePreview.errors.loadFailed")}finally{S===a&&(i.value=!1)}return}}const T=m(g.path);if("error"in T){i.value=!1,r.value=T.error;return}l.value=T.path;try{const A=await e.readFileContent(T.path);if(S!==a)return;A?s.value={...A,path:A.path||T.path}:r.value=n("filePreview.errors.loadFailed")}catch(A){if(S!==a)return;r.value=Rx(A)?n("filePreview.errors.notFound"):A instanceof Error?A.message:n("filePreview.errors.loadFailed")}finally{S===a&&(i.value=!1)}}function k(){a+=1,o.value=null,l.value=null,s.value=null,r.value=null,i.value=!1}function w(){k(),t.value==="file"&&(t.value=null)}Je(t,(g,x)=>{x==="file"&&g!=="file"&&k()});function b(){const g=s.value?.path??o.value?.path;g&&e.openWorkspaceFile(g,o.value?.line)}function _(){const g=s.value?.path??o.value?.path;g&&e.revealWorkspaceFile(g)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:v,closeFilePreview:w,openPreviewInEditor:b,revealPreviewFile:_}}function jhe({running:e,title:t="Kimi Code"}){if(Wp){I4(()=>{typeof document<"u"&&(document.title=t)});return}const n=["◐","◓","◑","◒"],o=Z(0);let s=null;function i(){s===null&&(o.value=0,s=setInterval(()=>{o.value=(o.value+1)%n.length},250))}function r(){s!==null&&(clearInterval(s),s=null),o.value=0}Je(e,a=>{a?i():r()},{immediate:!0});const l=R(()=>`${e.value?`${n[o.value]} `:""}${t}`);I4(()=>{typeof document<"u"&&(document.title=l.value)}),bn(()=>{r()})}const Vhe=50,am=5,O5=5,xg=50,qhe=40401,Khe=40402,Zhe=40410,Ghe=40409,Yhe=40902,Xhe=2e3,Jhe=10;function y4(e){return Us(e)&&e.code===Yhe}const Qhe=40904;function eme(e){return Us(e)&&e.code===Qhe}const Hu=Go({}),Lh=Go({}),k4=Go({}),cl=Go(new Set),N2=new Map,wc=new Map,Sg=new Map;let tme=0;const ju=new Map,nme=3;let Dx=0;function ome(){return Dx+=1,`${Date.now().toString(36)}-${Dx}`}function sme(e){return{generation:N2.get(e)??0,pending:(wc.get(e)?.size??0)>0}}function y8(e){const t=++tme;N2.set(e,t);const n=wc.get(e)??new Set;return n.add(t),wc.set(e,n),t}function k8(e,t){const n=wc.get(e);if(n===void 0||(n.delete(t),n.size>0))return;wc.delete(e);const o=Sg.get(e);Sg.delete(e),o?.()}function ime(e){N2.delete(e),wc.delete(e),Sg.delete(e),ju.delete(e)}function rme(e,t){return!t.pending&&t.generation===(N2.get(e)??0)}function lme(e,t){if((wc.get(e)?.size??0)===0){t();return}Sg.set(e,t)}function ame(e,t){const{t:n}=Hn.global,{confirm:o}=hu(),{taskPoller:s,sideChat:i,modelProvider:r,pushOperationFailure:l,activity:a,sessionsKnownEmpty:u,setSessions:c,updateSession:d,upsertSessionFront:f,appendSession:h,forgetSession:m,unpinSessions:v,setActiveSessionId:k,updateSessionMessages:w,nextOptimisticMsgId:b,getEventConn:_,syncSessionFromSnapshot:g,reopenSession:x,hasLoadedMessages:S,refreshSessionStatus:T,refreshSessionGoal:A,refreshSessionPlans:E,persistSessionProfile:P,mergedWorkspaces:D,workspacesView:I,status:$,workspaceIdForSession:B,savePermissionToStorage:H,savePlanModeToStorage:O,saveSwarmModeToStorage:F,saveGoalModeToStorage:U,draftModes:z,saveUnread:W,saveActiveWorkspaceToStorage:K,saveHiddenWorkspacesToStorage:V,goalErrorMessage:ie,initialized:ne,connectIssue:X,selectedDiffPath:le,fileDiffLines:Ie,fileDiffLoading:de,fileDiffTexts:pe,fileDiffEmptyFile:ve}=t;let oe=!1,ye=0;function G(se,xe,J,Ce){w(se,$e=>{const He=$e.findIndex(Et=>Et.id===xe);if(He===-1)return $e;const vt=$e.findIndex((Et,ln)=>ln!==He&&Et.role==="user"&&(Et.id===Ce||Et.userMessageId===Ce||Et.promptId===J)),ut=$e[He],Dt=vt===-1?ut:$e[vt];return $e.flatMap((Et,ln)=>ln===vt?[]:ln!==He?[Et]:[{...Dt,id:ut.id,promptId:J,userMessageId:Ce,metadata:{...Dt.metadata,...ut.metadata}}])})}async function Y(se){if(e.messagesLoadingMoreBySession[se])return;const xe=e.messagesBySession[se];if(!xe||xe.length===0)return;const J=xe[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[se]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[se]:!1};try{const Ce=await _t().listMessages(se,{beforeId:J,pageSize:Vhe}),$e=[...Ce.items].reverse();w(se,He=>[...$e,...He]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[se]:Ce.hasMore}}catch(Ce){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[se]:!0},l("loadOlderMessages",Ce,{sessionId:se})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[se]:!1}}}function fe(se,xe){s.loadTasksForSession(se),Q(se),xe?.skipStatus!==!0&&T(se),A(se),E(se),Object.prototype.hasOwnProperty.call(r.skillsBySession.value,se)||r.loadSkillsForSession(se)}async function we(se){const xe=e.activeSessionId;if(xe){le.value=se,Ie.value=[],pe.value=null,ve.value=!1,de.value=!0;try{const Ce=await _t().getFileDiff(xe,se);if(le.value!==se||e.activeSessionId!==xe)return;const $e=wX(Ce.diff);if(Ie.value=$e,$e.length===0){const vt=await Ei(se).catch(()=>null);if(le.value!==se||e.activeSessionId!==xe)return;ve.value=vt!==null&&vt.size===0;return}de.value=!1;const He=await cX($e,{truncated:Ce.truncated,readNewText:async()=>{const vt=await Ei(se).catch(()=>null);return!vt||vt.isBinary||vt.encoding!=="utf-8"?null:vt.content}});if(le.value!==se||e.activeSessionId!==xe)return;pe.value=He}catch(J){le.value===se&&(Ie.value=[]),gl("[loadFileDiff] diff unavailable for",se,J)}finally{le.value===se&&(de.value=!1)}}}function ge(){le.value=null,Ie.value=[],pe.value=null,ve.value=!1,de.value=!1}async function Q(se){try{const J=await _t().getGitStatus(se);e.gitStatusBySession={...e.gitStatusBySession,[se]:J}}catch{}}let te=0;async function ce(se){try{const xe=await _t().getUserInfo();if(se!==te||e.managedProviderStatus!=="authenticated")return;e.managedUserInfo=xe.kind==="ok"?xe.userInfo:null,xe.kind==="ok"?e.managedMembership=xe.userInfo.userLevel===Jhe?"free":"member":e.managedMembership=xe.status===402?"free":null}catch{if(se!==te)return;e.managedProviderStatus==="authenticated"&&(e.managedUserInfo=null,e.managedMembership=null)}}async function ue(){e.managedProviderStatus==="authenticated"&&await ce(++te)}async function Se(){const se=++te;try{const J=await _t().getAuth();return e.authReady=J.ready,e.defaultModel=J.defaultModel,e.managedProviderStatus=J.managedProvider?.status??null,e.managedProviderStatus==="authenticated"?ce(se):(e.managedUserInfo=null,e.managedMembership=null),X.value=null,"proceed"}catch(xe){return Us(xe)&&(xe.code===401||xe.code===PM)?(X.value=null,"server-auth-required"):(X.value=(xe instanceof Error?xe.message:String(xe)).slice(0,140),"retry")}}async function ze(){let se=!0;for(;;){const xe=await Se();if(xe!=="retry")return xe;se&&(X.value=null,se=!1),await new Promise(J=>{setTimeout(J,Xhe)})}}async function _e(){try{const se=_t();e.config=await se.getConfig()}catch{}}async function Ee(se){try{const J=await _t().setConfig(se);return e.config=J,e.defaultModel=J.defaultModel??null,!0}catch(xe){return l("setConfig",xe),!1}}const it=100,Fe=720*60*1e3;async function Oe(se){const xe=_t(),J=[];let Ce,$e;for(;se?.shouldContinue?.()!==!1;){let He;try{He=await xe.listSessions({pageSize:it,beforeId:Ce,excludeEmpty:!0})}catch(vt){if(J.length===0)throw vt;$e=vt;break}if(J.push(...He.items),!He.hasMore||He.items.length===0)break;Ce=He.items[He.items.length-1].id}return{sessions:J,error:$e}}function Ge(se){const xe=new Map(e.sessions.map(J=>[J.id,J]));c(se.map(J=>{const Ce=xe.get(J.id);if(Ce===void 0)return J;const $e=o3(J.usage)&&!o3(Ce.usage),He=J.pullRequest??Ce.pullRequest;return!$e&&He===J.pullRequest?J:{...J,usage:$e?Ce.usage:J.usage,pullRequest:He}}))}function at(se){const xe=[...se],J=new Set(xe.map(Ce=>Ce.id));for(const Ce of e.sessions)J.has(Ce.id)||(xe.push(Ce),J.add(Ce.id));return xe.sort((Ce,$e)=>new Date($e.updatedAt).getTime()-new Date(Ce.updatedAt).getTime()),xe}async function Tt(se){const xe=_t(),J=[],Ce=Date.now(),$e=Et=>Ce-new Date(Et.updatedAt).getTime();let He,vt=!1,ut=!0,Dt;for(;;){let Et;try{Et=await xe.listSessions({workspaceId:se,pageSize:am,beforeId:He,excludeEmpty:!0})}catch(Ot){if(ut)throw Ot;Dt=Ot,vt=!0;break}if(vt=Et.hasMore,Et.items.length===0)break;const ln=Et.items[Et.items.length-1],oo=$e(ln)>=Fe;if(!ut&&oo){const Ot=Et.items.findIndex(Yn=>$e(Yn)>=Fe),Pt=Ot>=0?Ot+1:Et.items.length;J.push(...Et.items.slice(0,Pt)),vt=Et.hasMore||PtTt(Ot.id))),J=[],Ce=new Set,$e=new Map,He=new Set;let vt;for(let Ot=0;OtHe.has(Ot.id)).map(Ot=>Ot.root)),Dt=new Set(se.map(Ot=>Ot.id));for(const Ot of e.sessions)!(Ot.workspaceId!==void 0&&Dt.has(Ot.workspaceId)?He.has(Ot.workspaceId):ut.has(Ot.cwd)||He.has(B(Ot)))||Ce.has(Ot.id)||(J.push(Ot),Ce.add(Ot.id));const Et={},ln={},oo={};for(const{id:Ot}of se){const Pt=$e.get(Ot);if(Pt===void 0){const Yn=e.sessionsHasMoreByWorkspace[Ot],ko=e.sessionsCursorByWorkspace[Ot],vs=e.sessionsInitialCountByWorkspace[Ot];Yn!==void 0&&(Et[Ot]=Yn),ko!==void 0&&(ln[Ot]=ko),vs!==void 0&&(oo[Ot]=vs);continue}Et[Ot]=Pt.hasMore,ln[Ot]=Pt.items.length>0?Pt.items[Pt.items.length-1].id:void 0,oo[Ot]=Math.max(Pt.items.length,am)}return e.sessionsHasMoreByWorkspace=Et,e.sessionsCursorByWorkspace=ln,e.sessionsInitialCountByWorkspace=oo,e.sessionsFullyLoaded=!1,J.sort((Ot,Pt)=>new Date(Pt.updatedAt).getTime()-new Date(Ot.updatedAt).getTime()),He.size>0&&l("load",vt),J}async function Yt(se){if(!e.sessionsLoadingMoreByWorkspace[se]&&e.sessionsHasMoreByWorkspace[se]!==!1&&e.sessionsCursorByWorkspace[se]!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[se]:!0};try{let xe=e.sessionsCursorByWorkspace[se],J;for(let He=0;He<3&&xe!==void 0&&(J=await _t().listSessions({workspaceId:se,pageSize:O5,beforeId:xe,excludeEmpty:!0}),e.sessionsCursorByWorkspace[se]!==xe);He+=1)J=void 0,xe=e.sessionsCursorByWorkspace[se];if(J===void 0)return;const Ce=new Set(e.sessions.map(He=>He.id)),$e=J.items.filter(He=>!Ce.has(He.id));$e.length>0&&c([...e.sessions,...$e]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[se]:J.items.length>0?J.items[J.items.length-1].id:xe},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[se]:J.hasMore}}catch(xe){l("loadMoreSessions",xe)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[se]:!1}}}}function Sn(se){return e.sessions.filter(xe=>!xe.parentSessionId&&B(xe)===se)}const on=5;function en(se,xe){const J=new Set(e.sessions.map(He=>He.id)),Ce=se.items.filter(He=>!J.has(He.id)&&(He.meta.last_prompt??"").length>0).map(kU);Ce.length>0&&c([...e.sessions,...Ce]);for(const He of se.items)if(J.has(He.id)&&He.git!==void 0){const vt=He.git.pull_request;d(He.id,ut=>ut.pullRequest===vt?ut:{...ut,pullRequest:vt})}if(se.items.length>0){const He=Math.min(...se.items.map(vt=>vt.meta.updated_at));e.flatSessionsFrontier=xe?.resetFrontier===!0||e.flatSessionsFrontier===null?He:Math.min(e.flatSessionsFrontier,He)}e.flatSessionsNextPageToken=se.nextPageToken,e.flatSessionsHasMore=se.hasMore;const $e=new Set(I.value.map(He=>He.id));return se.items.filter(He=>(He.meta.last_prompt??"").length>0&&$e.has(B({workspaceId:He.workspace.id,cwd:He.workspace.cwd??""}))).length}async function Cn(){const se=await _t().listSessionsV2({pageSize:xg,include:"git"});en(se,{resetFrontier:!0}),e.flatSessionsSeeded=!0}async function Mn(){if(!(e.flatSessionsSeeded||e.flatSessionsLoading)){e.flatSessionsLoading=!0;try{await Cn()}catch(se){l("ensureFlatSessions",se)}finally{e.flatSessionsLoading=!1}}}async function We(){if(!(e.flatSessionsLoading||e.flatSessionsLoadingMore)&&e.flatSessionsHasMore){e.flatSessionsLoadingMore=!0;try{if(!e.flatSessionsSeeded){await Cn();return}if(e.flatSessionsNextPageToken===null)return;for(let se=0;se0)break}}catch(se){l("loadMoreFlatSessions",se)}finally{e.flatSessionsLoadingMore=!1}}}async function tt(se,xe,J,Ce){if(e.sessionsCursorByWorkspace[se]===xe){const He=new Date(J).getTime();let vt;for(const ut of e.sessions){if(B(ut)!==se)continue;const Dt=new Date(ut.updatedAt).getTime();Dt<=He||(vt===void 0||Dt0&&Sn(se).lengthln.id)),Et=ut.items.filter(ln=>!Dt.has(ln.id));Et.length>0&&c([...e.sessions,...Et].sort((ln,oo)=>new Date(oo.updatedAt).getTime()-new Date(ln.updatedAt).getTime())),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[se]:ut.items.length>0?ut.items[ut.items.length-1].id:void 0},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[se]:ut.hasMore}}catch(ut){l("loadMoreSessions",ut);break}else await Yt(se);if($e-=1,Sn(se).length===vt&&e.sessionsCursorByWorkspace[se]===He)break}}async function Ue(){if(e.sessionsFullyLoaded)return;const se=await Oe().catch(Ce=>(gl("[kimi-web] loadAllSessions failed; search covers only loaded sessions",Ce),null));if(se===null)return;const xe=se.error===void 0?se.sessions:at(se.sessions);if(Ge(xe),e.sessionsFullyLoaded=se.error===void 0,se.error!==void 0)return;const J={};for(const Ce of e.workspaces)J[Ce.id]=!1;e.sessionsHasMoreByWorkspace=J}async function Lt(){const se=await _t().getMeta().catch(()=>null);se!==null&&(e.serverVersion=se.serverVersion,e.availableOpenInApps=se.openInApps,e.dangerousBypassAuth=se.dangerousBypassAuth,e.experimentalFlags=se.experimentalFlags,e.backend=se.backend)}async function gt(){const se=Date.now();let xe="accepted";bi("app:load:start"),e.loading=!0;const J=!ne.value;let Ce=!0;try{if(J&&await ze()==="server-auth-required"){Ce=!1,xe="auth-required";return}const $e=_t();await Promise.all([$e.getHealth().catch(()=>null),Lt(),r.loadModels()]),J||await Se(),await _e(),await wn();const He=await Bt(),vt=He??e.sessions;if(He!==void 0&&Ge(He),!J&&He!==void 0&&e.flatSessionsSeeded){e.flatSessionsSeeded=!1,e.flatSessionsNextPageToken=null,e.flatSessionsHasMore=!0,e.flatSessionsFrontier=null;try{await Cn()}catch(Ot){l("ensureFlatSessions",Ot)}}const ut=_E().filter(Ot=>!e.sessions.some(Pt=>Pt.id===Ot));if(ut.length>0){const Ot=await Promise.all(ut.map(Yn=>$s(Yn))),Pt=ut.filter((Yn,ko)=>Ot[ko]==="stale");Pt.length>0&&v(Pt)}const Dt=vt[0],Et=e.activeWorkspaceId;!(Et!==null&&D.value.some(Ot=>Ot.id===Et))&&Dt&&go(B(Dt)),Oo();const oo=typeof window<"u"?Qb(window.location):void 0;!e.activeSessionId&&oo!==void 0&&(e.sessions.some(Pt=>Pt.id===oo)||await no(oo))&&await vo(oo,{urlMode:"replace"}),!e.activeSessionId&&vt.length>0&&await vo(vt[0].id,{urlMode:"replace"})}catch($e){xe="failed",l("load",$e)}finally{e.loading=!1,Ce&&(ne.value=!0),bi("app:load:complete",{status:xe,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-se})}}async function wn(){try{const se=_t(),[xe,J]=await Promise.all([se.listWorkspaces().catch(()=>[]),se.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=yn(xe),e.fsHome=J.home||null,e.recentRoots=J.recentRoots}catch{}}function yn(se){const xe=lh();return Object.keys(xe).length===0?se:se.map(J=>{const Ce=xe[J.root];return Ce!==void 0?{...J,name:Ce}:J})}function go(se){e.activeWorkspaceId=se,K(se)}function qt(se){go(se);const xe=e.sessions.filter(J=>B(J)===se);if(xe.length>0){const J=xe[0];J&&J.id!==e.activeSessionId&&vo(J.id)}else k(void 0),Nn(void 0,"push")}function ps(se){const xe=lh()[se.root],J=xe!==void 0?{...se,name:xe}:se,Ce=Pr(J.root);e.hiddenWorkspaceRoots.some(vt=>Pr(vt)===Ce)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(vt=>Pr(vt)!==Ce),V(e.hiddenWorkspaceRoots));const $e=e.workspaces.findIndex(vt=>vt.id===J.id||vt.root===J.root);if($e===-1){e.workspaces=[J,...e.workspaces];return}const He=[...e.workspaces];He[$e]=J,e.workspaces=He}function xs(se){if(se.type==="workspaceCreated"||se.type==="workspaceUpdated"){ps(se.workspace);return}const xe=e.workspaces.find(Ce=>Ce.id===se.workspaceId)?.root??se.root;if(xe&&!e.hiddenWorkspaceRoots.includes(xe)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,xe],V(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Ce=>Ce.id!==se.workspaceId&&Ce.root!==xe),e.activeWorkspaceId===se.workspaceId||e.activeWorkspaceId===xe){const Ce=I.value[0]?.id??null;if(e.activeWorkspaceId=Ce,Ce)K(Ce);else try{ur(cn.activeWorkspace)}catch{}k(void 0),e.sessionLoading=!1,ge(),Nn(void 0,"replace")}}function _n(){k(void 0),Nn(void 0,"push")}function In(se){go(se),_n(),ge()}async function To(se){const xe=D.value.find(ln=>ln.id===se);if(!xe)return null;const J=e.thinking,Ce=_t();let $e,He=xe.root;try{const ln=await Ce.addWorkspace({root:xe.root});$e=ln.id,He=ln.root,ps(ln)}catch{}const vt=r.draftModel.value??void 0,ut=await Ce.createSession({workspaceId:$e,cwd:He,model:vt});r.draftModel.value=null;const Dt=vt!==void 0&&(!ut.model||ut.model.length===0)?{...ut,model:vt}:ut;f(Dt);const Et=ut.id;return J!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Et]:J},k3(e,Et)),go(ut.workspaceId??$e??se),await vo(ut.id,{skipStatusRefresh:!0}),z.planMode&&(e.planModeBySession={...e.planModeBySession,[Et]:!0},O()),z.swarmMode&&(e.swarmModeBySession={...e.swarmModeBySession,[Et]:!0},F()),z.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[Et]:!0},U()),z.planMode=!1,z.swarmMode=!1,z.goalMode=!1,Et}async function lo(se,xe,J){if(cl.has(se))return null;cl.add(se);let Ce=null;try{const $e=await To(se);return $e?(Ce=$e,await Po($e,xe,J),$e):null}catch($e){return l("startSessionAndSendPrompt",$e),Ce}finally{cl.delete(se)}}async function St(se,xe,J,Ce){if(cl.has(se))return null;cl.add(se);let $e=null;try{const He=await To(se);if(!He)return null;$e=He;const vt=e.planModeBySession[He]??!1,ut=e.swarmModeBySession[He]??!1,Dt=e.sessions.find(Ot=>Ot.id===He),Et=(Dt?.model&&Dt.model.length>0?Dt.model:e.defaultModel)??void 0,ln=await r.resolveThinkingForPrompt(He,Et)??e.thinking;return await P({model:Et,planMode:vt,swarmMode:ut,permissionMode:e.permission,thinking:ln},He)&&await r.activateSkill(xe,J,Ce,He,{skipThinkingPersist:!0}),He}catch(He){return l("startSessionAndActivateSkill",He),$e}finally{cl.delete(se)}}async function hs(se,xe){if(cl.has(se))return null;cl.add(se);let J=null;try{const Ce=await To(se);return Ce?(J=Ce,await i.openSideChatOn(Ce,xe),Ce):null}catch(Ce){return l("startSessionAndOpenSideChat",Ce),J}finally{cl.delete(se)}}async function Jo(se){const xe=se.trim();if(!xe)return!1;const J=_t();try{const Ce=await J.addWorkspace({root:xe});return ps(Ce),In(Ce.id),!0}catch(Ce){return gl("[kimi-web] addWorkspaceByPath failed for",xe,Ce),!1}}async function uo(se){try{return await _t().browseFs(se)}catch{return{path:"",parent:null,entries:[]}}}async function Ys(){try{return await _t().getFsHome()}catch{return{home:"",recentRoots:[]}}}function Nn(se,xe){if(xe==="none"||typeof window>"u"||!window.history)return;const J=fQ(se);if(window.location.pathname!==J)try{xe==="push"?window.history.pushState(null,"",J):window.history.replaceState(null,"",J)}catch{}}async function no(se){try{const xe=await _t().getSession(se);return e.sessions.some(J=>J.id===xe.id)||h(xe),!0}catch{return!1}}async function $s(se){try{const xe=await _t().getSession(se);return xe.archived?"stale":(e.sessions.some(J=>J.id===xe.id)||h(xe),"ok")}catch(xe){return Us(xe)&&xe.code===qhe?"stale":"retry"}}function Xs(){const se=Qb(window.location);if(se===void 0){k(void 0);return}if(se!==e.activeSessionId){if(e.sessions.some(xe=>xe.id===se)){vo(se,{urlMode:"none"});return}(async()=>{if(await no(se)){await vo(se,{urlMode:"none"});return}const xe=e.sessions[0];xe?await vo(xe.id,{urlMode:"replace"}):(k(void 0),Nn(void 0,"replace"))})()}}let ci=!1;function Oo(){ci||typeof window>"u"||(ci=!0,window.addEventListener("popstate",Xs))}async function vo(se,xe){if(!e.sessions.some($e=>$e.id===se)){const $e=++ye;if(!await no(se)||$e!==ye)return}const J=S(se),Ce=!J&&u.has(se);u.delete(se);try{Nn(se,xe?.urlMode??"push"),e.sessionLoading=!J&&!Ce,k(se),e.unreadBySession[se]&&(e.unreadBySession={...e.unreadBySession,[se]:!1},W({[se]:!1})),ge();const $e=e.sessions.find(He=>He.id===se);if($e){const He=B($e);e.activeWorkspaceId!==He&&go(He)}if(J){if(await x(se)==="not-found")return}else if(await g(se,{skipStatusRefresh:xe?.skipStatusRefresh===!0})==="not-found")return;fe(se,{skipStatus:xe?.skipStatusRefresh===!0})}catch($e){l("selectSession",$e,{sessionId:se})}finally{e.activeSessionId===se&&(e.sessionLoading=!1)}}async function Po(se,xe,J){const Ce=y8(se);e.inFlightBySession={...e.inFlightBySession,[se]:!0};const $e=b();let He=e.pendingThinkingBySession[se];try{const vt=_t(),ut=[];if(xe&&ut.push({type:"text",text:xe}),ut.push(...m8(J)),ut.length===0)return e.inFlightBySession={...e.inFlightBySession,[se]:!1},"rejected";const Dt={id:$e,sessionId:se,role:"user",content:ut,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};w(se,vs=>[...vs,Dt]);const Et=e.sessions.find(vs=>vs.id===se),ln=(Et?.model&&Et.model.length>0?Et.model:e.defaultModel)??void 0,oo=e.planModeBySession[se]??!1,Ot=e.swarmModeBySession[se]??!1,Pt=e.goalModeBySession[se]??!1;if(Pt&&xe)try{await vt.updateSession(se,{goalObjective:xe.trim()})}catch(vs){return vl(e,se,He)&&T(se),l("createGoal",vs,{sessionId:se}),e.inFlightBySession={...e.inFlightBySession,[se]:!1},w(se,Os=>Os.some(ei=>ei.id===$e)?Os.filter(ei=>ei.id!==$e):Os),"rejected"}const Yn=await r.resolveThinkingForPrompt(se,ln)??e.thinking;He=e.pendingThinkingBySession[se];const ko=await vt.submitPrompt(se,{content:ut,model:ln,thinking:Yn,permissionMode:e.permission,planMode:oo,swarmMode:Ot});return Yn!==void 0&&vl(e,se,He),Pt&&(e.goalModeBySession={...e.goalModeBySession,[se]:!1},U()),e.promptIdBySession={...e.promptIdBySession,[se]:ko.promptId},G(se,$e,ko.promptId,ko.userMessageId),_()?.bindNextPromptId(se,ko.promptId),"ok"}catch(vt){return e.inFlightBySession={...e.inFlightBySession,[se]:!1},w(se,ut=>ut.some(Dt=>Dt.id===$e)?ut.filter(Dt=>Dt.id!==$e||Dt.promptId!==void 0||Dt.userMessageId!==void 0):ut),vl(e,se,He)&&T(se),l("sendPrompt",vt,{sessionId:se}),Us(vt)?"rejected":"uncertain"}finally{k8(se,Ce)}}async function co(se,xe){const J=e.activeSessionId;if(J){if(a.value!=="idle"||e.inFlightBySession[J]){Qe(se,xe);return}if((e.queuedBySession[J]?.length??0)>0){Qe(se,xe),st(J);return}await Po(J,se,xe)}}async function Tn(se,xe){const J=e.activeSessionId;if(!J)return;const Ce=e.queuedBySession[J]??[],$e=[],He=[];for(const Pt of Ce){const Yn=Pt.text.trim();Yn&&$e.push(Yn),Pt.attachments?.length&&He.push(...Pt.attachments)}const vt=se.trim();if(vt&&$e.push(vt),xe?.length&&He.push(...xe),$e.length===0&&He.length===0)return;Ce.length>0&&(e.queuedBySession={...e.queuedBySession,[J]:[]});const ut=$e.join(` + +`),Dt=()=>{if(Ce.length===0)return;const Pt=e.queuedBySession[J]??[];e.queuedBySession={...e.queuedBySession,[J]:[...Ce,...Pt]}};if(a.value==="idle"&&!e.inFlightBySession[J]){await Po(J,ut,He)==="rejected"&&Dt();return}const Et=[];ut&&Et.push({type:"text",text:ut});for(const Pt of He)Pt.kind==="video"?Et.push({type:"video",source:{kind:"file",fileId:Pt.fileId}}):Pt.kind==="file"?Et.push({type:"file",fileId:Pt.fileId,name:Pt.name??"",mediaType:Pt.mediaType||"application/octet-stream",size:Pt.size??0}):Et.push({type:"image",source:{kind:"file",fileId:Pt.fileId}});const ln=b(),oo={id:ln,sessionId:J,role:"user",content:Et,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};w(J,Pt=>[...Pt,oo]);const Ot=y8(J);try{const Pt=_t(),Yn=e.sessions.find(Lc=>Lc.id===J),ko=(Yn?.model&&Yn.model.length>0?Yn.model:e.defaultModel)??void 0,vs=await r.resolveThinkingForPrompt(J,ko)??e.thinking,Os=e.pendingThinkingBySession[J],ei=await Pt.submitPrompt(J,{content:Et,model:ko,thinking:vs,permissionMode:e.permission,planMode:e.planModeBySession[J]??!1,swarmMode:e.swarmModeBySession[J]??!1});if(vs!==void 0&&vl(e,J,Os),G(J,ln,ei.promptId,ei.userMessageId),ei.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[J]:ei.promptId},_()?.bindNextPromptId(J,ei.promptId);return}try{await Pt.steerPrompts(J,[ei.promptId])}catch{}}catch(Pt){w(J,Yn=>Yn.filter(ko=>ko.id!==ln||ko.promptId!==void 0||ko.userMessageId!==void 0)),Us(Pt)&&Dt(),l("steer",Pt,{sessionId:J})}finally{k8(J,Ot)}}async function fo(se,xe){try{const Ce=await _t().uploadFile({file:se,name:xe});return{fileId:Ce.id,name:Ce.name,mediaType:Ce.mediaType}}catch(J){return l("uploadImage",J),null}}function Qe(se,xe){const J=e.activeSessionId;if(!J)return;const Ce=e.queuedBySession[J]??[],$e={text:se,attachments:xe,id:ome()};e.queuedBySession={...e.queuedBySession,[J]:[...Ce,$e]}}function st(se){const[xe,...J]=e.queuedBySession[se]??[];xe!==void 0&&(e.queuedBySession={...e.queuedBySession,[se]:J},Po(se,xe.text,xe.attachments).then(Ce=>{if(Ce==="ok"){ju.delete(se);return}if(Ce==="uncertain"){ju.delete(se);return}if(!e.sessions.some(Dt=>Dt.id===se)){ju.delete(se);return}const $e=xe.id??xe.text,He=ju.get(se),vt=He!==void 0&&He.key===$e?He.count+1:1;if(vt>=nme){ju.delete(se),(e.queuedBySession[se]?.length??0)>0&&st(se);return}ju.set(se,{key:$e,count:vt});const ut=e.queuedBySession[se]??[];e.queuedBySession={...e.queuedBySession,[se]:[xe,...ut]}}))}function Ct(se,xe){const J=e.inFlightBySession[se]===!0;if(e.inFlightBySession={...e.inFlightBySession,[se]:!1},e.promptIdBySession[se]!==void 0){const $e={...e.promptIdBySession};delete $e[se],e.promptIdBySession=$e}return(J||xe?.turnWasActive===!0||(e.turnActiveBySession[se]??!1))&&st(se),J}function Qt(se,xe){xe.inFlightTurn!==null&&xe.busy||Ct(se)}async function kn(){const se=e.activeSessionId;if(!se)return!1;const xe=e.sessions.find(ut=>ut.id===se);let J=e.promptIdBySession[se];if(J===void 0){const ut=xe?.currentPromptId;ut!==void 0&&ut.length>0&&!ut.startsWith("pr_")&&(J=ut)}const Ce=_t();let $e=!1;const He=()=>{e.inFlightBySession={...e.inFlightBySession,[se]:!1},e.turnActiveBySession={...e.turnActiveBySession,[se]:!1}};if(J!==void 0)try{if((await Ce.abortPrompt(se,J)).aborted)return!0;$e=!0;const Dt={...e.promptIdBySession};delete Dt[se],e.promptIdBySession=Dt,He()}catch(ut){if(Us(ut)&&ut.code===Khe){$e=!0;const Dt={...e.promptIdBySession};delete Dt[se],e.promptIdBySession=Dt,He()}else return l("abortCurrentPrompt",ut,{sessionId:se}),!1}if($e||!((e.inFlightBySession[se]??!1)||(e.turnActiveBySession[se]??!1)||(xe?.mainTurnActive??!1)))return!1;try{return(await Ce.abortSession(se)).aborted===!0}catch(ut){return l("abortCurrentPrompt",ut,{sessionId:se}),!1}}function Ko(se,xe){const J=e.approvalsBySession[se]??[];e.approvalsBySession={...e.approvalsBySession,[se]:J.filter(Ce=>Ce.approvalId!==xe)}}function Eo(se,xe){const J=e.questionsBySession[se]??[];e.questionsBySession={...e.questionsBySession,[se]:J.filter(Ce=>Ce.questionId!==xe)}}async function bo(se,xe){const J=e.activeSessionId;if(!J||Lh[se])return;Lh[se]=!0;const Ce=e.approvalsBySession[J]?.find($e=>$e.approvalId===se&&$e.toolName==="ExitPlanMode")?.toolCallId;try{const $e=_t(),He={decision:xe.decision,scope:xe.scope,feedback:xe.feedback,selectedLabel:xe.selectedLabel};await $e.respondApproval(J,se,He),Ko(J,se),Ce!==void 0&&E(J,Ce)}catch($e){y4($e)?(Ko(J,se),Ce!==void 0&&E(J,Ce)):l("respondApproval",$e,{sessionId:J})}finally{delete Lh[se]}}async function Ns(se,xe){const J=e.activeSessionId;if(J&&!Hu[se]){Hu[se]="answer";try{await _t().respondQuestion(J,se,xe),Eo(J,se)}catch(Ce){y4(Ce)?Eo(J,se):l("respondQuestion",Ce,{sessionId:J})}finally{delete Hu[se]}}}async function Do(se){const xe=e.activeSessionId;if(xe&&!Hu[se]){Hu[se]="dismiss";try{await _t().dismissQuestion(xe,se),Eo(xe,se)}catch(J){y4(J)?Eo(xe,se):l("dismissQuestion",J,{sessionId:xe})}finally{delete Hu[se]}}}async function Io(se){const xe=e.activeSessionId;if(xe&&!k4[se]){k4[se]=!0;try{const J=_t(),Ce=(e.tasksBySession[xe]??[]).find(He=>He.id===se)?.backgroundTaskId;await J.cancelTask(xe,Ce??se);const $e=e.tasksBySession[xe]??[];e.tasksBySession={...e.tasksBySession,[xe]:$e.map(He=>He.id===se?{...He,status:"cancelled"}:He)}}catch(J){eme(J)||l("cancelTask",J,{sessionId:xe})}finally{delete k4[se]}}}function Qo(se){const xe=e.activeSessionId;xe?(e.planModeBySession={...e.planModeBySession,[xe]:se},O(),P({planMode:se})):z.planMode=se}function sn(){const se=e.activeSessionId,xe=se?e.planModeBySession[se]??!1:z.planMode;Qo(!xe)}function es(se){const xe=e.activeSessionId;xe?(e.swarmModeBySession={...e.swarmModeBySession,[xe]:se},F(),P({swarmMode:se})):z.swarmMode=se}async function ms(){const se=e.activeSessionId,J=!(se?e.swarmModeBySession[se]??!1:z.swarmMode);J&&e.permission==="manual"&&!await o({title:n("workspace.swarmEnableTitle"),message:n("workspace.swarmEnableConfirm"),variant:"primary"})||es(J)}function Tr(se){const xe=e.activeSessionId;xe?(e.goalModeBySession={...e.goalModeBySession,[xe]:se},U()):z.goalMode=se}function ts(){const se=e.activeSessionId,xe=se?e.goalModeBySession[se]??!1:z.goalMode;Tr(!xe)}async function Ki(se){const xe=se.trim();if(!xe||e.permission==="manual"&&!await o({title:n("workspace.goalStartTitle"),message:n("workspace.goalStartConfirm",{objective:xe}),variant:"primary"}))return null;let J=e.activeSessionId,Ce=null;if(!J){const $e=e.activeWorkspaceId,He=$e&&I.value.some(vt=>vt.id===$e)?$e:I.value[0]?.id??null;if(!He)return null;try{J=await To(He)??void 0,Ce=J??null}catch(vt){return l("createGoal",vt),null}if(!J)return null}try{await _t().updateSession(J,{goalObjective:xe})}catch($e){return l("createGoal",$e,{sessionId:J,message:ie($e)}),Ce}return e.goalModeBySession[J]&&(e.goalModeBySession={...e.goalModeBySession,[J]:!1},U()),e.activeSessionId===J?await co(xe):await Po(J,xe),Ce}function Js(se){const xe=e.activeSessionId;xe&&Promise.resolve(_t().updateSession(xe,{goalControl:se})).catch(J=>{l("controlGoal",J,{sessionId:xe,message:ie(J)})})}function Bo(se){e.permission=se,H(se),P({permissionMode:se})}function Zo(se){const xe=[...e.warnings];xe.splice(se,1),e.warnings=xe}async function Il(se,xe){try{await _t().updateSession(se,{title:xe}),d(se,Ce=>({...Ce,title:xe}))}catch(J){l("renameSession",J,{sessionId:se})}}async function Zi(se,xe){const J=e.workspaces.find($e=>$e.id===se)?.root,Ce=()=>{e.workspaces=e.workspaces.map($e=>$e.id===se?{...$e,name:xe}:$e)};try{if(await _t().updateWorkspace(se,{name:xe}),J!==void 0){const $e=lh();J in $e&&(delete $e[J],tC($e))}Ce()}catch($e){if(J!==void 0&&Us($e)&&$e.code===Zhe){tC({...lh(),[J]:xe}),Ce();return}l("renameWorkspace",$e)}}async function tl(se){const xe=e.workspaces.find(He=>He.id===se)?.root??D.value.find(He=>He.id===se)?.root??se,J=e.activeSessionId?e.sessions.find(He=>He.id===e.activeSessionId):void 0,Ce=e.activeWorkspaceId===se||e.activeWorkspaceId===xe,$e=!!(J&&(J.cwd===xe||J.workspaceId===se||B(J)===se));xe&&!e.hiddenWorkspaceRoots.includes(xe)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,xe],V(e.hiddenWorkspaceRoots));try{await _t().deleteWorkspace(se)}catch(He){gl("[kimi-web] deleteWorkspace registry cleanup failed for",se,He)}if(e.workspaces=e.workspaces.filter(He=>He.id!==se&&He.root!==xe),Ce||$e){const He=I.value[0]?.id??null;if(e.activeWorkspaceId=He,He)K(He);else try{ur(cn.activeWorkspace)}catch{}}(Ce||$e)&&(k(void 0),e.sessionLoading=!1,ge(),Nn(void 0,"replace"))}async function Ho(se){try{const xe=_t(),J=e.sessions.find(ut=>ut.id===se),Ce=J!==void 0?B(J):void 0,$e=Ce!==void 0?Sn(Ce).length:0;await xe.archiveSession(se),m(se),J!==void 0&&Ce!==void 0&&tt(Ce,se,J.updatedAt,$e),i.clearSideChatForSession(se);const{[se]:He,...vt}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=vt,e.activeSessionId===se){const ut=e.sessions[0];ut?await vo(ut.id,{urlMode:"replace"}):(k(void 0),Nn(void 0,"replace"))}}catch(xe){l("archiveSession",xe,{sessionId:se})}}async function Co(se){if(oe)return;const xe=se??e.activeSessionId;if(!xe){const Ce=n("commands.export.noSession");bi("export:failed",{status:"no-session"}),l("exportSession",new Error(Ce),{message:Ce});return}oe=!0;const J=Date.now();bi("export:start",{sessionId:xe});try{const Ce=U0e(),{blob:$e,fileName:He}=await _t().exportSession(xe,Ce,{desktop:Wp});if(typeof document>"u")throw new Error("Document is unavailable");const vt=URL.createObjectURL($e);let ut;try{ut=document.createElement("a"),ut.href=vt,ut.download=He,document.body.append(ut),ut.click()}finally{ut?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(vt)}catch{}},0)}bi("export:accepted",{sessionId:xe,status:"accepted",zipBytes:$e.size,durationMs:Date.now()-J})}catch(Ce){const $e=typeof Ce=="object"&&Ce!==null?Ce:void 0;bi("export:failed",{sessionId:xe,status:"failed",durationMs:Date.now()-J,errorName:typeof $e?.name=="string"?$e.name:typeof Ce,errorCode:typeof $e?.code=="number"?$e.code:void 0,requestId:typeof $e?.requestId=="string"?$e.requestId:void 0,phase:typeof $e?.phase=="string"?$e.phase:void 0,httpStatus:typeof $e?.status=="number"?$e.status:void 0}),l("exportSession",Ce,{sessionId:xe})}finally{oe=!1}}async function Fs(se){try{const xe=await _t().restoreSession(se);return f(xe),!0}catch(xe){return l("restoreSession",xe,{sessionId:se}),!1}}function Rs(se){return _t().listSessions({archivedOnly:!0,beforeId:se?.beforeId,pageSize:se?.pageSize??50})}async function yo(){try{await _t().logout(),await Se(),await gt()}catch(se){l("logout",se)}}function ht(se){const xe=e.activeSessionId;xe&&_t().compactSession(xe,se).catch(J=>{l("compact",J,{sessionId:xe})})}async function Le(se){const xe=se??e.activeSessionId;if(xe)try{const J=await _t().forkSession(xe);f(J),await vo(J.id)}catch(J){l("fork",J,{sessionId:xe})}}async function Ze(se=1){const xe=e.activeSessionId;if(!xe)return null;const J=e.messagesBySession[xe]??[];let Ce=-1;for(let ut=J.length-1;ut>=0;ut--){const Dt=J[ut];if(Dt.role==="user"&&!(Dt.metadata?.origin&&Dt.metadata.origin.kind!=="user")){Ce=ut;break}}const $e=Ce>=0?J[Ce].content.filter(ut=>ut.type==="text").map(ut=>ut.text).join(` +`):null,He=se===1&&Ce>=0&&J.slice(Ce+1).every(ut=>ut.role!=="user"),vt=He?e.sessions.find(ut=>ut.id===xe):void 0;if(He&&(e.messagesBySession={...e.messagesBySession,[xe]:J.slice(0,Ce)},vt!==void 0)){const ut={...vt};delete ut.lastTurnReason,f(ut)}try{return await _t().undoSession(xe,se),await g(xe),{text:$e}}catch(ut){return He&&(e.messagesBySession={...e.messagesBySession,[xe]:J},vt!==void 0&&f(vt),await g(xe).catch(()=>{})),l("undo",ut,{sessionId:xe}),null}}function Xt(se){const xe=e.activeSessionId;if(!xe)return;const J=e.queuedBySession[xe]??[];if(se<0||se>=J.length)return;const Ce=[...J];Ce.splice(se,1),e.queuedBySession={...e.queuedBySession,[xe]:Ce}}function gs(se,xe){const J=e.activeSessionId;if(!J)return;const Ce=e.queuedBySession[J]??[];if(se===xe||se<0||se>=Ce.length||xe<0||xe>=Ce.length)return;const $e=[...Ce],[He]=$e.splice(se,1);He!==void 0&&($e.splice(xe,0,He),e.queuedBySession={...e.queuedBySession,[J]:$e})}async function di(se){const xe=e.activeSessionId;if(!xe)return[];try{return(await _t().listDirectory(xe,{path:se,includeGitStatus:!0})).items}catch{return[]}}async function Ei(se){const xe=e.activeSessionId;if(!xe)return null;try{const Ce=await _t().readFile(xe,{path:se});return{path:Ce.path,content:Ce.content,encoding:Ce.encoding,mime:Ce.mime,languageId:Ce.languageId,isBinary:Ce.isBinary,size:Ce.size,lineCount:Ce.lineCount}}catch(J){if(gl("[kimi-web] readFileContent failed for",se,J),Us(J)&&J.code===Ghe)throw J;return null}}async function ao(se){return _t().readHostFileContent(se)}const Gi=10485760;function Er(se){const xe=e.activeSessionId;return xe?_t().getFileDownloadUrl(xe,se):null}async function fi(se,xe){const J=e.activeSessionId;if(!J)return!1;try{return await _t().openFile(J,{path:se,line:xe}),!0}catch(Ce){return l("openFile",Ce,{sessionId:J}),!1}}async function Ll(se){const xe=e.activeSessionId;if(!xe)return;const J=$.value.cwd||".";try{await _t().openInApp(xe,se,J)}catch(Ce){l("openInApp",Ce,{sessionId:xe})}}async function zo(se){const xe=e.activeSessionId;if(!xe)return!1;try{return await _t().revealFile(xe,{path:se}),!0}catch(J){return l("revealFile",J,{sessionId:xe}),!1}}function Ir(se){return se.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(se)||se.startsWith("\\\\")}async function Qs(se){if(/^(https?:|data:|blob:)/i.test(se))return se;const xe=e.activeSessionId;if(!xe)return se;let J=se;if(Ir(J)){const Ce=e.sessions.find(He=>He.id===xe)?.cwd,$e=Ce?h2(J,Ce):null;if($e)J=$e;else try{const He=await ao(J);return!He.isBinary||He.encoding!=="base64"?se:`data:${He.mime};base64,${He.content}`}catch{return se}}try{const $e=await _t().readFile(xe,{path:J,length:Gi});return!$e.isBinary||$e.encoding!=="base64"||$e.truncated?se:`data:${$e.mime};base64,${$e.content}`}catch{return se}}async function pi(se){const xe=e.sessions.find(Ce=>Ce.id===e.activeSessionId),J=xe===void 0?e.activeWorkspaceId:B(xe);if(!J)return[];try{return(await _t().searchFiles(J,{query:se,limit:20})).items.map(He=>({path:He.path,name:He.name}))}catch{return[]}}return{loadFileDiff:we,clearFileDiff:ge,loadGitStatus:Q,checkAuth:Se,probeManagedMembership:ue,loadConfig:_e,updateConfig:Ee,listAllSessionsGlobal:Oe,load:gt,refreshServerMeta:Lt,loadWorkspaces:wn,loadMoreSessions:Yt,loadAllSessions:Ue,ensureFlatSessions:Mn,loadMoreFlatSessions:We,selectWorkspace:go,openWorkspace:qt,upsertWorkspacePreserveOrder:ps,applyWorkspaceEvent:xs,clearActiveSession:_n,openWorkspaceDraft:In,startSessionAndSendPrompt:lo,startSessionAndActivateSkill:St,startSessionAndOpenSideChat:hs,addWorkspaceByPath:Jo,browseFs:uo,getFsHome:Ys,writeSessionUrl:Nn,fetchSessionIntoList:no,onSessionRoutePopState:Xs,bindSessionRoute:Oo,selectSession:vo,submitPromptInternal:Po,finishPromptLocal:Ct,localTurnStartState:sme,isLocalTurnSnapshotCurrent:rme,afterLocalTurnStartsSettle:lme,handleSessionSnapshot:Qt,sendPrompt:co,steerPrompt:Tn,uploadImage:fo,enqueue:Qe,unqueue:Xt,reorderQueue:gs,abortCurrentPrompt:kn,respondApproval:bo,respondQuestion:Ns,dismissQuestion:Do,pendingQuestionActions:Hu,pendingApprovalActions:Lh,cancelTask:Io,setPlanMode:Qo,togglePlanMode:sn,setSwarmMode:es,toggleSwarmMode:ms,setGoalMode:Tr,toggleGoalMode:ts,createGoal:Ki,controlGoal:Js,setPermission:Bo,dismissWarning:Zo,renameSession:Il,renameWorkspace:Zi,deleteWorkspace:tl,archiveSession:Ho,exportSession:Co,restoreSession:Fs,loadArchivedSessions:Rs,logout:yo,compact:ht,forkSession:Le,undo:Ze,listDir:di,readFileContent:Ei,readHostFileContent:ao,getFileDownloadUrl:Er,openWorkspaceFile:fi,openInApp:Ll,revealWorkspaceFile:zo,resolveImageUrl:Qs,searchFiles:pi,loadOlderMessages:Y,refreshSessionSidecars:fe,isStartingFirstPrompt:()=>cl.size>0}}const tN=cn.starredModels,Bx=new Error("profile persist failed");function ume(){try{const e=ui(tN);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function cme(e){try{Ls(tN,JSON.stringify(e))}catch{}}function dme(e,t){const{pushOperationFailure:n,refreshSessionStatus:o,persistSessionProfile:s,activity:i,updateSession:r,updateSessionMessages:l,loadConfig:a,checkAuth:u}=t,c=Z([]),d=Z(ume()),f=Z({}),h=Z({}),m=Z([]),v=Z(null);function k(pe){if(!(pe==null||pe.length===0))return c.value.find(ve=>ve.id===pe)??c.value.find(ve=>ve.model===pe)}function w(){const pe=e.activeSessionId?e.sessions.find(oe=>oe.id===e.activeSessionId):void 0,ve=pe===void 0?v.value??e.defaultModel:pe.model||e.defaultModel;return k(ve)?.id??ve??void 0}function b(pe){if(pe===void 0)return;const ve=k(pe);return ve===void 0?void 0:bp(ve)}function _(pe,ve){const oe=pe==null?void 0:e.thinkingBySession[pe];return oe!==void 0&&gJ(ve,oe)?oe:bp(ve)}function g(pe,ve){if(ve===void 0)return;const oe=k(ve);return oe===void 0?void 0:_(pe,oe)}async function x(pe,ve){return pe!=null&&e.thinkingBySession[pe]===void 0&&await o(pe),g(pe,ve)}function S(pe){e.thinking=pe;const ve=e.activeSessionId;return pe!==void 0&&ve!==null&&ve!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[ve]:pe},k3(e,ve)),pe}Je([()=>e.activeSessionId,()=>w(),()=>{const pe=e.activeSessionId;return pe==null?void 0:e.thinkingBySession[pe]}],()=>{const pe=k(w());pe!==void 0&&(e.thinking=_(e.activeSessionId,pe))});function T(pe){_t().setConfig({thinking:vJ(pe,k(w())?.supportEfforts)}).catch(ve=>n("setConfig",ve))}async function A(pe){try{const oe=await _t().listSkills(pe);f.value={...f.value,[pe]:oe}}catch{}}async function E(pe){try{const oe=await _t().listSkillsForWorkspace(pe);h.value={...h.value,[pe]:oe}}catch{}}async function P(){try{const pe=_t();c.value=await pe.listModels();const ve=k(w());ve!==void 0&&(e.thinking=_(e.activeSessionId,ve))}catch(pe){n("loadModels",pe)}}async function D(){try{const pe=_t();m.value=await pe.listProviders()}catch(pe){n("loadProviders",pe)}}async function I(pe){const ve=e.activeSessionId,oe=k(pe),ye=e.thinking,G=ve?e.sessions.find(ge=>ge.id===ve)?.model:void 0,Y=w()!==(oe?.id??pe),fe=yJ(oe,ye,Y);if(!ve)return v.value=pe,e.thinking=fe,fe!==ye&&fe!==void 0&&T(fe),!0;r(ve,ge=>({...ge,model:pe}));let we;fe!==ye&&(e.thinking=fe,fe!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[ve]:fe},we=k3(e,ve)));try{await _t().updateSession(ve,{model:pe,thinking:fe!==ye?fe:void 0})}catch(ge){return r(ve,Q=>({...Q,model:G??Q.model})),fe!==ye&&(e.thinking=ye,ye!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[ve]:ye}),vl(e,ve,we)&&o(ve)),n("setModel",ge,{sessionId:ve}),!1}return fe!==ye&&fe!==void 0&&T(fe),vl(e,ve,we),await o(ve),!0}function $(pe){const ve=new Set(d.value);ve.has(pe)?ve.delete(pe):ve.add(pe),d.value=Array.from(ve),cme(d.value)}async function B(pe,ve,oe,ye,G){const Y=ye??e.activeSessionId;if(!Y)return;const fe=i.value==="idle"&&!e.inFlightBySession[Y],we=`msg_skill_opt_${Date.now().toString(36)}`,ge=fe?y8(Y):void 0;if(fe){e.inFlightBySession={...e.inFlightBySession,[Y]:!0};const Q={id:we,sessionId:Y,role:"user",content:[{type:"text",text:`/${pe}${ve?` ${ve}`:""}`},...m8(oe)],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:pe,skillArgs:ve}}};l(Y,te=>[...te,Q])}try{if(G?.skipThinkingPersist!==!0){const Q=e.sessions.find(ue=>ue.id===Y)?.model,te=(Q&&Q.length>0?Q:e.defaultModel)??void 0;if(!await s({thinking:await x(Y,te)??e.thinking},Y))throw Bx}await _t().activateSkill(Y,pe,ve,m8(oe))}catch(Q){fe&&(e.inFlightBySession={...e.inFlightBySession,[Y]:!1},l(Y,te=>te.filter(ce=>ce.id!==we))),Q!==Bx&&n("activateSkill",Q,{sessionId:Y})}finally{ge!==void 0&&k8(Y,ge)}}async function H(pe){return _t().getProvider(pe)}async function O(pe){try{return await _t().addProvider(pe),await Promise.all([D(),P(),a()]),await u(),null}catch(ve){return Xl("[kimi-web] operation failed: addProvider",ve),ve instanceof Error?ve.message:String(ve)}}async function F(pe,ve){try{return await _t().updateProvider(pe,ve),await Promise.all([D(),P(),a()]),null}catch(oe){return Xl("[kimi-web] operation failed: updateProvider",oe),oe instanceof Error?oe.message:String(oe)}}async function U(pe){try{const oe=await _t().deleteProvider(pe);return await Promise.all([D(),P(),a()]),await u(),oe}catch(ve){return n("deleteProvider",ve),null}}async function z(pe){try{const ve=await _t().refreshProvider(pe);for(const oe of ve.failed)n("refreshProvider",new Error(oe.reason),{message:oe.provider});await Promise.all([D(),P(),a()])}catch(ve){n("refreshProvider",ve)}}async function W(){try{const pe=await _t().refreshAllProviders();for(const ve of pe.failed)n("refreshAllProviders",new Error(ve.reason),{message:ve.provider});await Promise.all([D(),P(),a()])}catch(pe){n("refreshAllProviders",pe)}}async function K(){try{return{kind:"ok",items:await _t().listCatalogProviders()}}catch(pe){return pe instanceof wd&&pe.code===void 0?{kind:"unsupported"}:(Xl("[kimi-web] operation failed: loadCatalogProviders",pe),{kind:"error"})}}async function V(pe){try{return await _t().importCatalogProvider(pe),await Promise.all([D(),P(),a()]),await u(),null}catch(ve){return Xl("[kimi-web] operation failed: importCatalogProvider",ve),ve instanceof Error?ve.message:String(ve)}}async function ie(pe){try{const oe=await _t().importCustomRegistry(pe);return await Promise.all([D(),P(),a()]),await u(),oe}catch(ve){return Xl("[kimi-web] operation failed: importCustomRegistry",ve),ve instanceof Error?ve.message:String(ve)}}async function ne(){try{return await _t().startOAuthLogin()}catch{return null}}async function X(){try{return await _t().pollOAuthLogin()}catch(pe){return gl("[kimi-web] pollOAuthLogin failed",pe),null}}async function le(){try{await _t().cancelOAuthLogin()}catch{}}async function Ie(){try{return await _t().getUsage()}catch(pe){return{kind:"error",message:pe instanceof Error?pe.message:String(pe)}}}function de(pe){const ve=S(pe);s({thinking:ve}),ve!==void 0&&T(ve)}return{models:c,starredModelIds:d,providers:m,draftModel:v,skillsBySession:f,skillsByWorkspace:h,loadSkillsForSession:A,loadSkillsForWorkspace:E,loadModels:P,loadProviders:D,setModel:I,thinkingLevelForModelId:b,thinkingLevelForSessionId:g,resolveThinkingForPrompt:x,toggleStarModel:$,activateSkill:B,addProvider:O,updateProvider:F,deleteProvider:U,getProvider:H,loadCatalogProviders:K,importCatalogProvider:V,importCustomRegistry:ie,refreshProvider:z,refreshAllProviders:W,startOAuthLogin:ne,pollOAuthLogin:X,cancelOAuthLogin:le,getUsage:Ie,setThinking:de}}function fme(e,t){const{pushOperationFailure:n,nextOptimisticMsgId:o,connectEventsIfNeeded:s,getEventConn:i,resolveThinkingForPrompt:r,refreshSessionStatus:l}=t,a=Z({}),u=R(()=>{const O=e.activeSessionId;if(!O)return null;const F=a.value[O];return F?{parentId:O,agentId:F.agentId}:null}),c=R(()=>u.value?.parentId??null),d=R(()=>u.value!==null),f=R(()=>{const O=u.value;return O?!!e.sideChatSendingByAgent[O.agentId]:!1}),h=R(()=>{const O=u.value;return O?e.sideChatSendingByAgent[O.agentId]?!0:(e.tasksBySession[O.parentId]??[]).some(F=>F.id===O.agentId&&F.status==="running"):!1}),m=O=>_t().getFileUrl(O),v=[],k=KT(),w=R(()=>{const O=u.value;return O?k({messages:e.sideChatMessagesByAgent[O.agentId]??[],approvals:v,getFileUrl:m,sessionActive:h.value}):[]});function b(O,F){e.sideChatMessagesByAgent[O]=F(e.sideChatMessagesByAgent[O]??[])}function _(O,F){b(O,U=>[...U,F])}function g(O,F){b(O,U=>{const z=U.find(W=>W.id===F);return z?.promptId!==void 0||z?.userMessageId!==void 0?U:U.filter(W=>W.id!==F)})}function x(O,F){const U=e.sideChatUserMessageIdsBySession[O]??[];U.includes(F)||(e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[O]:[...U,F]})}function S(O,F,U,z){b(O,W=>{const K=W.findIndex(X=>X.id===F);if(K===-1)return W;const V=W.findIndex((X,le)=>le!==K&&X.role==="user"&&(X.id===z||X.userMessageId===z||X.promptId===U)),ie=W[K],ne=V===-1?ie:W[V];return W.flatMap((X,le)=>le===V?[]:le!==K?[X]:[{...ne,id:ie.id,promptId:U,userMessageId:z,metadata:{...ne.metadata,...ie.metadata}}])})}function T(O,F){x(F.sessionId,F.userMessageId??F.id),b(O,U=>{const z=U.findIndex(V=>V.role==="user"&&(V.userMessageId===(F.userMessageId??F.id)||V.promptId!==void 0&&V.promptId===F.promptId));if(z===-1)return[...U,F];const W=U[z],K=[...U];return K[z]={...F,id:W.id,promptId:F.promptId??W.promptId,userMessageId:F.userMessageId??F.id,metadata:{...F.metadata,...W.metadata}},K})}function A(O,F,U){U&&b(O,z=>{const W=z.at(-1);if(W?.role==="assistant"){const K=W.content[0],V=K?.type==="text"?K.text:"";return[...z.slice(0,-1),{...W,content:[{type:"text",text:`${V}${U}`}]}]}return[...z,{id:o(),sessionId:F,role:"assistant",content:[{type:"text",text:U}],createdAt:new Date().toISOString()}]})}function E(O,F,U){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[O]:!1},!U)return;const W=(e.sideChatMessagesByAgent[O]??[]).at(-1);(W?.role==="assistant"&&W.content[0]?.type==="text"?W.content[0].text:"").trim().length>0||A(O,F,U)}async function P(O){const F=e.activeSessionId;F&&await D(F,O)}async function D(O,F){if(!a.value[O]){let U;try{({agentId:U}=await _t().startBtw(O))}catch(z){n("openSideChat",z,{sessionId:O});return}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[U]:e.sideChatMessagesByAgent[U]??[]},a.value={...a.value,[O]:{agentId:U}},s(),i()?.markSideChannelAgent(O,U)}F&&F.trim()&&await I(O,F.trim())}async function I(O,F){const U=a.value[O],z=F.trim();if(!U||!z)return;const W=O,K=U.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[K]:!0};const V=o(),ie={id:V,sessionId:W,role:"user",content:[{type:"text",text:z}],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};_(K,ie);let ne;try{const X=e.sessions.find(pe=>pe.id===W),le=(X?.model&&X.model.length>0?X.model:e.defaultModel)??void 0,Ie=await r(W,le)??e.thinking;ne=e.pendingThinkingBySession[W];const de=await _t().submitPrompt(W,{content:[{type:"text",text:z}],agentId:K,model:le,thinking:Ie,permissionMode:e.permission,planMode:e.planModeBySession[W]??!1,swarmMode:e.swarmModeBySession[W]??!1});Ie!==void 0&&vl(e,W,ne),S(K,V,de.promptId,de.userMessageId),x(W,de.userMessageId)}catch(X){vl(e,W,ne)&&l(W),n("sendSideChatPrompt",X,{sessionId:W}),g(K,V),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[K]:!1}}}function $(){const O=e.activeSessionId;if(!O)return;const{[O]:F,...U}=a.value;a.value=U}async function B(O){const F=u.value;F&&await I(F.parentId,O)}function H(O){if(!a.value[O])return;const{[O]:F,...U}=a.value;a.value=U}return{sideChatTargetBySession:a,sideChatSessionId:c,sideChatVisible:d,sideChatSending:f,sideChatRunning:h,sideChatTurns:w,appendSideChatAssistantText:A,finishSideChatAgent:E,reconcileSideChatUserMessage:T,openSideChat:P,openSideChatOn:D,closeSideChat:$,sendSideChatPrompt:B,clearSideChatForSession:H}}class pme{transcript;sessionId;agentId;fetchPage;pageSize;onChange;onGap;refreshPromise=null;buffered=[];agents_=[];seq_;loadingOlder_=!1;loadOlderError_=!1;refreshError_=!1;constructor(t){this.sessionId=t.sessionId,this.agentId=t.agentId,this.transcript=new tj(t.agentId),this.fetchPage=t.fetchPage,this.pageSize=t.pageSize??20,this.onChange=t.onChange,this.onGap=t.onGap}get snapshot(){return this.transcript.snapshot()}get seq(){return this.seq_}get agents(){return this.agents_}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlder_}get loadOlderError(){return this.loadOlderError_}get refreshError(){return this.refreshError_}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshError_=!1;const t=this.fetchPage({pageSize:this.pageSize}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshError_=!0,n}).finally(()=>{this.refreshPromise=null;const n=this.buffered;this.buffered=[];for(const o of n)this.applyOps(o.ops,o.seq);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.seq_=n),this.refreshError_=!1,this.onChange?.()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlder_)return this.buffered.push({ops:t,...n!==void 0?{seq:n}:{}}),!1;if(n!==void 0&&this.seq_!==void 0){if(n<=this.seq_)return!0;if(n!==this.seq_+1)return this.onGap?.(),!1}const o=this.transcript.apply(t);return n!==void 0&&(this.seq_=n),o.gap!==void 0&&this.onGap?.(),o.accepted.length>0&&this.onChange?.(),o.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlder_)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlder_=!0,this.loadOlderError_=!1,this.onChange?.();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:this.pageSize});this.applyPage(n,!1)}catch(n){throw this.loadOlderError_=!0,n}finally{this.loadingOlder_=!1;const n=this.buffered;this.buffered=[];for(const o of n)this.applyOps(o.ops,o.seq);this.onChange?.()}}}applyPage(t,n){this.agents_=t.agents;const o=this.snapshot,s=n?t:{...t,items:hme(t.items,o.items),hasMoreOlder:t.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}}function hme(e,t){const n=new Set,o=[];for(const s of[...e,...t]){const i=s.kind==="turn"?s.turnId:s.kind==="marker"?s.markerId:s.refId;n.has(i)||(n.add(i),o.push(s))}return o}function mme(e){const t=qS(new Map),n=new Map,o=new Map,s=new Set;let i=null,r=null;function l(){i!==null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(i),i=null),r!==null&&(clearTimeout(r),r=null);for(const _ of s)_.version.value+=1;s.clear()}function a(_){s.add(_),!(i!==null||r!==null)&&(typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(l)),r=setTimeout(l,50))}function u(_,g){return`${_}\0${g}`}function c(_,g,x){const S=e.getEventConnection();S!==null&&(S.subscribeTranscript(_,g,x),o.set(_,g))}function d(_,g){const x=u(_,g),S=t.get(x);if(S!==void 0)return S;const T={channel:new pme({sessionId:_,agentId:g,fetchPage:A=>e.api.getSessionTranscript(_,{...A,agentId:g}),onChange:()=>{a(T)},onGap:()=>{f(T)}}),version:Z(0),baselineLoaded:!1,resumePromise:null};return t.set(x,T),T}async function f(_){if(_.resumePromise!==null)return _.resumePromise;const g=h(_).finally(()=>{_.resumePromise===g&&(_.resumePromise=null)});return _.resumePromise=g,g}async function h(_){try{await _.channel.refresh(),_.baselineLoaded=!0,n.get(_.channel.sessionId)===_.channel.agentId&&c(_.channel.sessionId,_.channel.agentId,_.channel.seq)}catch{n.get(_.channel.sessionId)===_.channel.agentId&&c(_.channel.sessionId,_.channel.agentId)}}function m(_,g){e.connectEventsIfNeeded(),n.set(_,g);const x=d(_,g);return x.baselineLoaded?c(_,g,x.channel.seq):f(x),x}function v(_,g){if(n.get(_)!==g)return;n.delete(_);const x=o.get(_);x!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(_,[x]),o.delete(_))}function k(_,g,x,S){if(n.get(_)!==g)return;const T=d(_,g);T.channel.receiveReset(x,S),T.baselineLoaded=!0}function w(_,g,x,S){return n.get(_)!==g?!0:d(_,g).channel.applyOps(x,S)}function b(_){n.delete(_),o.delete(_)&&e.getEventConnection()?.unsubscribeTranscript(_);for(const[g,x]of t)x.channel.sessionId===_&&(t.delete(g),s.delete(x))}return{getEntry:(_,g)=>t.get(u(_,g)),activate:m,deactivate:v,receiveReset:k,applyOps:w,forgetSession:b}}const $h=XT(),Da=phe(),nN=cn.permission,oN=cn.activeWorkspace,sN=cn.planMode,iN=cn.swarmMode,rN=cn.goalMode,Hx=40401,Ag=cn.onboarded;ur(cn.codeFont);ur(cn.accent);ur(cn.theme);ur(cn.thinking);ur(cn.notifyOnComplete);ur(cn.notifyOnQuestion);ur(cn.notifyOnApproval);ur(cn.soundOnComplete);function gme(){try{const e=ui(nN);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function vme(e){try{Ls(nN,e)}catch{}}function b4(e){const t=ui(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 P5(e,t){try{const n={};for(const[o,s]of Object.entries(t))s&&(n[o]=!0);Ls(e,JSON.stringify(n))}catch{}}function lN(){P5(sN,Me.planModeBySession)}function aN(){P5(iN,Me.swarmModeBySession)}function uN(){P5(rN,Me.goalModeBySession)}function yme(){try{return ui(oN)}catch{return null}}const cN=cn.hiddenWorkspaces;function kme(){try{const e=ui(cN);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function bme(e){try{Ls(cN,JSON.stringify(e))}catch{}}function Cme(e){try{Ls(oN,e)}catch{}}function wme(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 Me=Go({...oY(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlags:{},workspaceName:"kimi-web",connection:"disconnected",permission:gme(),thinking:void 0,thinkingBySession:{},pendingThinkingBySession:{},planModeBySession:b4(sN),swarmModeBySession:b4(iN),goalModeBySession:b4(rN),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:Ey(),authReady:!1,defaultModel:null,managedProviderStatus:null,managedUserInfo:null,managedMembership:null,workspaces:[],activeWorkspaceId:yme(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:kme(),availableOpenInApps:[],config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1,flatSessionsNextPageToken:null,flatSessionsHasMore:!0,flatSessionsLoading:!1,flatSessionsLoadingMore:!1,flatSessionsSeeded:!1,flatSessionsFrontier:null}),Mg=Go({}),np=new Map,If=new Map;function _me(e,t){return`${e}\0${t??"*"}`}async function b8(e,t){const n=_me(e,t),o=(np.get(n)??0)+1;np.set(n,o),t!==void 0&&If.set(e,(If.get(e)??0)+1);const s=If.get(e)??0;try{const i=await _t().getSessionPlans(e,{agentId:"main",toolCallId:t});if(np.get(n)!==o||t===void 0&&(If.get(e)??0)!==s||!Me.sessions.some(l=>l.id===e))return;const r=Object.fromEntries(i.map(l=>[l.toolCallId,l]));Mg[e]=t===void 0?r:{...Mg[e],...r}}catch(i){gl("[refreshSessionPlans] plan history unavailable for",e,i)}}function xme(e){const t=`${e}\0`;for(const n of np.keys())n.startsWith(t)&&np.delete(n);If.delete(e),delete Mg[e]}const F2=Go({planMode:!1,swarmMode:!1,goalMode:!1});function D5(e){Me.sessions=e}function R2(e,t){Me.sessions=Me.sessions.map(n=>n.id===e?t(n):n)}function Sme(e){Me.sessions=[e,...Me.sessions.filter(t=>t.id!==e.id)]}function Ame(e){Me.sessions=[...Me.sessions,e]}function Mme(e){Me.sessions=Me.sessions.filter(t=>t.id!==e)}function dN(){const e=Me.activeSessionId;e&&Me.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(Me.unreadBySession[e]=!1,Iy({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===cn.unread&&(Me.unreadBySession=Ey(),dN())});function C8(){if(rr===null||!rr.health().stale)return;bi("ws:stale-reconnect",{sessionId:Me.activeSessionId,status:"stale"}),D0e("ws: stale socket on focus, reconnecting",{activeSessionId:Me.activeSessionId}),rr.reconnect();const e=Me.activeSessionId;e&&Lg.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(dN(),C8())});typeof window<"u"&&(window.addEventListener("focus",C8),window.addEventListener("online",C8));function B5(e){Me.activeSessionId=e}function Tme(e){Ni(Me.messagesBySession,e)}function Eme(e,t){Me.messagesBySession[e]=t}function fN(e,t){Me.messagesBySession[e]=t(Me.messagesBySession[e]??[])}function Ime(e){delete Me.messagesBySession[e]}function pN(e){rr?.unsubscribe(e),Tg.forgetSession(e),ege(e),Gd.discard(({meta:t})=>t.sessionId===e),Mme(e),Ime(e),xme(e),delete Me.approvalsBySession[e],delete Me.questionsBySession[e],delete Me.tasksBySession[e],delete Me.goalBySession[e],delete Me.gitStatusBySession[e],delete Me.lastSeqBySession[e],delete Me.compactionBySession[e],delete Me.messagesLoadingMoreBySession[e],delete Me.messagesHasMoreBySession[e],delete Me.messagesLoadMoreErrorBySession[e],delete w8[e],Ig.delete(e),um.delete(e),MN.delete(e),ime(e),delete Me.queuedBySession[e],delete Me.promptIdBySession[e],delete Me.inFlightBySession[e],delete Me.turnActiveBySession[e],delete Me.turnEndedPromptIdBySession[e],delete Me.turnErrorBySession[e],delete Me.turnRetryBySession[e],delete Me.planModeBySession[e],delete Me.swarmModeBySession[e],delete Me.goalModeBySession[e],delete Me.thinkingBySession[e],delete Me.pendingThinkingBySession[e],lN(),aN(),uN(),Yo.value.includes(e)&&(Yo.value=uE(Yo.value,e),k1(Yo.value))}const hN=Z(null),mN=Z([]),gN=Z(!1),vN=Z(null),yN=Z(!1),kN=Z(!1),bN=Z(null);async function _c(e){let t;try{t=await _t().getSessionStatus(e)}catch{return}R2(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),Me.swarmModeBySession[e]=t.swarmMode,Me.planModeBySession[e]=t.planMode,t.thinkingEffort.length>0&&rE(Me,e,t.thinkingEffort)}async function Lme(e){const t=Me.goalVersionBySession[e]??0;let n;try{n=await _t().getSessionGoal(e)}catch{return}(Me.goalVersionBySession[e]??0)===t&&(n===null||n.status==="complete"?delete Me.goalBySession[e]:Me.goalBySession[e]=n)}function CN(e,t){const n=t??Me.activeSessionId;if(!n)return Promise.resolve(!1);const o=e.thinking!==void 0?Me.pendingThinkingBySession[n]:void 0;return Promise.resolve(_t().updateSession(n,e)).then(()=>(vl(Me,n,o),_c(n))).then(()=>!0).catch(s=>(vl(Me,n,o)&&_c(n),t0("persistSessionProfile",s,{sessionId:n}),!1))}function wN(e){try{return ui(e)??""}catch{return""}}function $me(){return typeof window>"u"?!1:new URLSearchParams(window.location.search).get("kimi_onboarded")==="1"}const _N=$me();if(_N&&wN(Ag)!=="1")try{Ls(Ag,"1")}catch{}const xN=Z(_N||wN(Ag)==="1");function Nme(e){xN.value=e;try{Ls(Ag,e?"1":"0")}catch{}e&&window.kimiDesktop?.setOnboarded?.()}let rr=null;const Tg=mme({api:_t(),connectEventsIfNeeded:H5,getEventConnection:()=>rr});let zx=0;function SN(){return zx+=1,`msg_opt_${Date.now().toString(36)}_${zx}`}function Wx(e,t,n){const o={sessions:Me.sessions,activeSessionId:Me.activeSessionId,messagesBySession:Me.messagesBySession,approvalsBySession:Me.approvalsBySession,planReviewByToolCallId:Me.planReviewByToolCallId,questionsBySession:Me.questionsBySession,tasksBySession:Me.tasksBySession,goalBySession:Me.goalBySession,goalVersionBySession:Me.goalVersionBySession,lastSeqBySession:Me.lastSeqBySession,turnActiveBySession:Me.turnActiveBySession,turnEndedPromptIdBySession:Me.turnEndedPromptIdBySession,turnErrorBySession:Me.turnErrorBySession,turnRetryBySession:Me.turnRetryBySession,compactionBySession:Me.compactionBySession,config:Me.config,warnings:Me.warnings},s=fY(o,e,{sessionId:t,seq:n},{t:(i,r)=>r===void 0?Hn.global.t(i):Hn.global.t(i,r)});s.sessions!==o.sessions&&D5(s.sessions),s.activeSessionId!==o.activeSessionId&&B5(s.activeSessionId),Tme(s.messagesBySession),Ni(Me.approvalsBySession,s.approvalsBySession),Ni(Me.planReviewByToolCallId,s.planReviewByToolCallId),Ni(Me.questionsBySession,s.questionsBySession),Ni(Me.tasksBySession,s.tasksBySession),Ni(Me.goalBySession,s.goalBySession),Ni(Me.goalVersionBySession,s.goalVersionBySession),Ni(Me.lastSeqBySession,s.lastSeqBySession),Ni(Me.turnActiveBySession,s.turnActiveBySession),Ni(Me.turnEndedPromptIdBySession,s.turnEndedPromptIdBySession),Ni(Me.turnErrorBySession,s.turnErrorBySession),Ni(Me.turnRetryBySession,s.turnRetryBySession),Ni(Me.compactionBySession,s.compactionBySession),s.config!==o.config&&(Me.config=s.config??null),pY(s.warnings,o.warnings)||(Me.warnings=s.warnings),e.type==="configChanged"&&(Me.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(Rn.loadModels(),Rn.loadProviders()),e.type==="sessionUsageUpdated"&&(e.swarmMode!==void 0&&(Me.swarmModeBySession[e.sessionId]=e.swarmMode),e.planMode!==void 0&&(Me.planModeBySession[e.sessionId]=e.planMode),e.thinking!==void 0&&rE(Me,e.sessionId,e.thinking)),e.type==="sessionDeleted"&&V5(e.sessionId)}function Fme(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="user")return;if(n.role==="assistant")for(let o=n.content.length-1;o>=0;o--){const s=n.content[o];if(s.type==="toolUse"&&s.toolName==="ExitPlanMode")return s.toolCallId}}}function Rme(e,t){const n=Me.lastSeqBySession[t.sessionId]??0,o=Me.turnActiveBySession[t.sessionId]??!1,s=e.type==="approvalResolved"||e.type==="approvalExpired"?Me.approvalsBySession[t.sessionId]?.find(r=>r.approvalId===e.approvalId&&r.toolName==="ExitPlanMode")?.toolCallId:void 0,i=si.sideChatTargetBySession.value[t.sessionId];if(e.type==="messageCreated"&&e.message.role==="user"&&e.agentId!==void 0&&Object.prototype.hasOwnProperty.call(Me.sideChatMessagesByAgent,e.agentId)){Wx({type:"unknown",raw:{_noop:!0}},t.sessionId,t.seq),si.reconcileSideChatUserMessage(e.agentId,e.message);return}if(Wx(e,t.sessionId,t.seq),i){const{agentId:r}=i,l=t.sessionId;e.type==="agentDelta"&&e.agentId===r?e.delta.text&&si.appendSideChatAssistantText(r,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===r?si.finishSideChatAgent(r,l):e.type==="taskProgress"&&e.taskId===r?si.appendSideChatAssistantText(r,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===r&&si.finishSideChatAgent(r,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const r=e.message.sessionId;Me.promptIdBySession[r]!==e.message.promptId&&(Me.promptIdBySession[r]=e.message.promptId)}if(e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const r=e.reason;y2e(e.sessionId,r==="cancelled"||r==="failed"||r==="blocked"?"aborted":"idle",o);const l=Fme(Me.messagesBySession[e.sessionId]??[]);l!==void 0&&b8(e.sessionId,l)}e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&o||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&v2e(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&Me.promptIdBySession[e.sessionId]===e.promptId&&At.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&k2e(e.sessionId,e.question),e.type==="approvalRequested"&&b2e(e.sessionId,e.approval),s!==void 0&&b8(t.sessionId,s)}const Gd=gX(({appEvent:e,meta:t})=>Rme(e,t),({appEvent:e})=>fX(e),{coalesce:yX}),Ome=3e4;let Ux=0,oi=null;const op=new Map;let Eg=0,Yd=null;function Pme(){Yd!==null&&(clearTimeout(Yd),Yd=null)}function jx(e){if(!Me.connected||Yd!==null)return;const t=Math.min(Ome,1e3*2**Eg);Eg+=1,gl("[kimi-web] session work reconciliation incomplete; retrying",e),Yd=setTimeout(()=>{Yd=null,Me.connected&&AN()},t)}function Dme(e,t){const n=new Map(e.map(u=>[u.id,u]));let o=!1,s=!1;const i={...Me.turnActiveBySession},r=[],l=new Map,a=Me.sessions.map(u=>{const c=n.get(u.id);if(c===void 0)return u;const d=t.workEventSeqBySession.get(u.id)??0,f=t.turnEventSeqBySession.get(u.id)??0,h=t.pendingEventBySession.get(u.id),m=d>c.lastSeq,v=f>c.lastSeq,k=h!==void 0&&h.seq>c.lastSeq,w=m||v&&u.mainTurnActive===!0?u.busy||u.mainTurnActive===!0:c.busy,b=m||v?u.mainTurnActive:c.mainTurnActive??(w?u.mainTurnActive:!1),_=k?h.source==="work"?u.pendingInteraction:(Me.approvalsBySession[u.id]?.length??0)>0?"approval":(Me.questionsBySession[u.id]?.length??0)>0?"question":"none":c.pendingInteraction??(w?u.pendingInteraction:"none");(k&&h.source==="work"||!k&&(c.pendingInteraction!==void 0||c.busy===!1))&&_!==void 0&&l.set(u.id,_);const g=m?u.lastTurnReason:c.lastTurnReason;op.set(u.id,Math.max(op.get(u.id)??0,c.lastSeq));const x=t.turnStartBySession.get(u.id);return(b===!1||b===void 0&&!w)&&t.witnessedTurnBySession.has(u.id)&&x!==void 0&&At.isLocalTurnSnapshotCurrent(u.id,x)&&r.push(u.id),b===!0&&!i[u.id]?(i[u.id]=!0,s=!0):(b===!1||!w)&&i[u.id]&&(delete i[u.id],s=!0),u.busy===w&&u.mainTurnActive===b&&u.pendingInteraction===_&&u.lastTurnReason===g?u:(o=!0,{...u,busy:w,mainTurnActive:b,pendingInteraction:_,lastTurnReason:g})});o&&D5(a),s&&Ni(Me.turnActiveBySession,i);for(const[u,c]of l)c==="none"?(delete Me.approvalsBySession[u],delete Me.questionsBySession[u]):c==="question"&&delete Me.approvalsBySession[u];for(const u of r)At.finishPromptLocal(u,{turnWasActive:!0})}async function AN(){const e={workEventSeqBySession:new Map,turnEventSeqBySession:new Map,pendingEventBySession:new Map,turnStartBySession:new Map(Me.sessions.map(t=>[t.id,At.localTurnStartState(t.id)])),witnessedTurnBySession:new Set(Me.sessions.filter(t=>Me.inFlightBySession[t.id]||Me.turnActiveBySession[t.id]).map(t=>t.id))};oi=e;try{const t=await At.listAllSessionsGlobal({shouldContinue:()=>oi===e&&Me.connected});if(oi!==e||!Me.connected)return;Gd.flush(),Dme(t.sessions,e),oi=null,t.error!==void 0?jx(t.error):Eg=0}catch(t){if(oi!==e||!Me.connected)return;oi=null,jx(t)}}function H5(){if(rr!==null||typeof WebSocket>"u")return;bi("ws:connection",{status:"connecting"}),Me.connection="connecting",rr=_t().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){At.applyWorkspaceEvent(t);return}const o=t.type==="sessionWorkChanged",s=t.type==="turnActiveChanged",i=t.type==="approvalRequested"||t.type==="approvalResolved"||t.type==="approvalExpired"||t.type==="questionRequested"||t.type==="questionAnswered"||t.type==="questionDismissed";if((o||s||i)&&n.seq>0){const r=op.get(n.sessionId)??0;if(n.seq<=r)return;op.set(n.sessionId,n.seq)}if(oi!==null&&(o||s||i))if(o){const r=oi.workEventSeqBySession.get(n.sessionId)??0;if(n.seq>r&&oi.workEventSeqBySession.set(n.sessionId,n.seq),t.pendingInteraction!==void 0||!t.busy){const l=oi.pendingEventBySession.get(n.sessionId);(l===void 0||n.seq>l.seq)&&oi.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"work"})}}else if(s){const r=oi.turnEventSeqBySession.get(n.sessionId)??0;n.seq>r&&oi.turnEventSeqBySession.set(n.sessionId,n.seq)}else{const r=oi.pendingEventBySession.get(n.sessionId);(r===void 0||n.seq>r.seq)&&oi.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"interaction"})}for(const r of vX({appEvent:t,meta:n}))Gd(r)},onResync(t,n,o){bi("ws:resync",{sessionId:t,status:"required",seq:n}),Gd.flush(),Ig.add(t),Lg.request(t)},onError(t,n,o){bi("ws:error",{status:"failed",errorCode:t,fatal:o}),O2({severity:"error",title:Hn.global.t("warnings.wsTitle"),message:n,details:[Lo("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){bi("ws:connection",{status:t?"connected":"disconnected"}),Me.connected=t,Me.connection=t?"connected":"disconnected",t||(oi=null,op.clear(),Pme(),Eg=0),t&&(Ux+=1,qme(),At.refreshServerMeta())},onReplayComplete(){Gd.flush(),Ux>1&&AN()},onTranscriptReset(t,n,o,s){Tg.receiveReset(t,n,o,s)},onTranscriptOps(t,n,o,s){return Tg.applyOps(t,n,o,s)}})}const w8={},Ig=new Set,um=new Set,MN=new Set;function Bme(e){return Us(e)&&e.code===Hx?!0:typeof e=="object"&&e!==null&&e.code===Hx}function Lo(e,t){if(!(t==null||t===""))return{label:Hn.global.t(`warnings.details.${e}`),value:TN(t)}}function TN(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 Hme(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function zme(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function Wme(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function Ume(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function Vx(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function jme(e,t,n){const o=iy(t),s=Us(t),i=o||s?t.timestamp:void 0,r=o||s?t.durationMs:void 0,l=[Lo("operation",e),Lo("sessionId",n??Me.activeSessionId),Lo("connection",Me.connection),Lo("timestamp",Ume(i??Date.now()))];return o?l.push(Lo("duration",Vx(r)),Lo("request",`${t.method} ${t.path}`),Lo("endpoint",t.url),Lo("requestId",t.requestId),Lo("phase",t.phase),Lo("timeout",`${t.timeoutMs}ms`),Lo("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),Lo("contentType",t.contentType),Lo("responsePreview",t.bodyPreview),Lo("cause",t.cause)):s?l.push(Lo("duration",Vx(r)),Lo("code",t.code),Lo("requestId",t.requestId),Lo("message",t.message),Lo("details",t.details)):l.push(Lo("errorName",Hme(t)),Lo("message",zme(t)??TN(t)),Lo("stack",Wme(t))),l.filter(a=>a!==void 0)}function Vme(e,t,n={}){const o=iy(t),s=Us(t),i=n.title??(o?Hn.global.t("warnings.daemonNetworkTitle"):s?Hn.global.t("warnings.daemonApiTitle"):Hn.global.t("warnings.operationFailedTitle")),r=n.message??(o?Hn.global.t("warnings.daemonNetworkMessage"):s?t.message:Hn.global.t("warnings.operationFailedMessage"));return{severity:"error",title:i,message:r,details:jme(e,t,n.sessionId)}}function O2(e){Me.warnings=[...Me.warnings,e]}function qme(){const e=Hn.global.t("warnings.wsTitle"),t=Me.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==Me.warnings.length&&(Me.warnings=t)}function t0(e,t,n){Xl(`[kimi-web] operation failed: ${e}`,t);const o=Us(t),s=iy(t);bi("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}),O2(Vme(e,t,n))}const Kme={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function Zme(e){if(!Us(e)||e.code===void 0)return;const t=Kme[e.code];return t?Hn.global.t(t):void 0}async function Gme(e){if(pN(e),Me.activeSessionId!==e)return;const t=Me.sessions[0];t?await At.selectSession(t.id,{urlMode:"replace"}):(B5(void 0),Me.sessionLoading=!1,At.writeSessionUrl(void 0,"replace"))}const qx=new Set;async function Yme(e){if(!qx.has(e)){qx.add(e);try{const t=await _t().getSessionWarnings(e),n=Hn.global.t("warnings.noteLabel");for(const o of t)O2(`${n}: ${o.message}`)}catch{}}}async function z5(e,t){const n=At.localTurnStartState(e);try{const s=await _t().getSessionSnapshot(e);if(!Me.sessions.some(c=>c.id===e))return"ok";Gd.flush();const i=Me.lastSeqBySession[e]??0,r=w8[e],l=Ig.has(e)||$g.has(e);if(!l&&r!==void 0&&r===s.epoch&&i>s.asOfSeq)return um.delete(e)||(um.add(e),Lg.request(e)),"ok";if(!At.isLocalTurnSnapshotCurrent(e,n))return At.afterLocalTurnStartsSettle(e,()=>{Lg.request(e)}),"ok";const a=Me.turnRetryBySession[e];a!==void 0&&a.turnId!==s.inFlightTurn?.turnId&&delete Me.turnRetryBySession[e],(l||s.session.lastTurnReason!=="failed")&&delete Me.turnErrorBySession[e];const u=o3(s.session.usage);R2(e,c=>({...s.session,model:s.session.model&&s.session.model.length>0?s.session.model:c.model,usage:u?c.usage:s.session.usage,updatedAt:!s.session.mainTurnActive&&s.session.updatedAt>c.updatedAt?s.session.updatedAt:c.updatedAt})),Eme(e,gQ(Me.messagesBySession[e]??[],s.messages)),Me.tasksBySession[e]=_Q(s.subagents,Me.tasksBySession[e]??[]),Me.messagesHasMoreBySession[e]=s.hasMoreMessages,Me.approvalsBySession[e]=s.pendingApprovals;for(const c of s.pendingApprovals){const d=c.display;d?.kind==="plan_review"&&typeof d.plan=="string"&&d.plan.length>0&&(Me.planReviewByToolCallId[c.toolCallId]={plan:d.plan,path:typeof d.path=="string"?d.path:void 0})}return Me.questionsBySession[e]=s.pendingQuestions,Me.lastSeqBySession[e]=s.asOfSeq,w8[e]=s.epoch,Ig.delete(e),um.delete(e),At.handleSessionSnapshot(e,{inFlightTurn:s.inFlightTurn,busy:s.session.busy}),s.session.mainTurnActive??(s.inFlightTurn!==null&&s.session.busy)?Me.turnActiveBySession[e]=!0:delete Me.turnActiveBySession[e],H5(),rr&&(rr.seedSnapshot(e,s),rr.subscribe(e,{seq:s.asOfSeq,epoch:s.epoch}),Qme(e)),$g.delete(e),u&&t?.skipStatusRefresh!==!0&&_c(e),Yme(e),"ok"}catch(o){return Bme(o)?(await Gme(e),"not-found"):(t0("getSessionSnapshot",o,{title:Hn.global.t("warnings.sessionSnapshotTitle"),message:Hn.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const Lg=vQ(z5);function Xme(e){return Object.prototype.hasOwnProperty.call(Me.messagesBySession,e)}const Jme=4,ql=[],$g=new Set;function Qme(e){const t=ql.indexOf(e);for(t!==-1&&ql.splice(t,1),ql.unshift(e);ql.length>Jme;){let n=-1;for(let s=ql.length-1;s>=0;s--)if(ql[s]!==Me.activeSessionId){n=s;break}if(n===-1)break;const[o]=ql.splice(n,1);if(o===void 0)break;rr?.unsubscribe(o),$g.add(o)}}function ege(e){const t=ql.indexOf(e);t!==-1&&ql.splice(t,1),$g.delete(e)}async function tge(e){return z5(e)}function u1(e,t){return(Me.inFlightBySession[e]??!1)||(Me.turnActiveBySession[e]??!1)||(t??Me.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function n0(e){try{const t=new Date(e),o=Date.now()-t.getTime(),s=o/36e5;if(o<6e4)return Hn.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 nge=3e4,xc=Z(0);let C4=null;function oge(){C4===null&&(C4=setInterval(()=>{xc.value=(xc.value+1)%Number.MAX_SAFE_INTEGER},nge),C4.unref?.())}function sge(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:o,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,i=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&i!==void 0){const r=r1(s,i)??Pm(s,i);return{kind:"diff",path:o,diff:r}}return{kind:"diff",path:o,diff:[]}}if(n==="file_io"){const o=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:o,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=r1(t.before,t.after)??Pm(t.before,t.after);return{kind:"diff",path:o,diff:r}}const i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:o,detail:i}}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:DT(o);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 ige(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 rge(e){const t=Me.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 lge(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":t="fail";let n="";if(e.status==="running"&&e.startedAt){const r=Math.round((Date.now()-new Date(e.startedAt).getTime())/1e3),l=Math.floor(r/60),a=r%60;n=Hn.global.t("tasks.timingRunning",{time:`${l}:${String(a).padStart(2,"0")}`})}else if(e.completedAt&&e.startedAt){const r=Math.round((new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime())/1e3);n=Hn.global.t("tasks.timingDone",{sec:r})}else n=e.status;const o=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,s=e.command??rge(e),i=e.kind==="bash"&&s?`$ ${s}`:void 0;return{id:e.id,agentId:e.agentId,name:e.description,kind:e.kind,state:t,timing:n,meta:i,output:o,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,model:e.model,thinkingEffort:e.thinkingEffort}}const age=R(()=>{const e=Me.sessions.find(n=>n.id===Me.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:Me.workspaceName,branch:t}}),uge=R(()=>(xc.value,Me.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:n0(e.updatedAt),busy:u1(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason,workspaceId:Ml(e),cwd:e.cwd})))),cge=R(()=>Me.activeSessionId??""),dge=R(()=>{const e=Me.activeSessionId;if(e)return Rn.skillsBySession.value[e]??[];const t=P2.value;return t?Rn.skillsByWorkspace.value[t]??[]:[]}),W5=R(()=>{const e=Me.activeSessionId;return e?Me.inFlightBySession[e]??!1:!1}),fge=R(()=>At.isStartingFirstPrompt()),si=fme(Me,{pushOperationFailure:t0,nextOptimisticMsgId:SN,connectEventsIfNeeded:H5,getEventConn:()=>rr,resolveThinkingForPrompt:(e,t)=>Rn.resolveThinkingForPrompt(e,t),refreshSessionStatus:_c}),o0=R(()=>{const e=Me.activeSessionId;if(!e)return[];const t=si.sideChatTargetBySession.value[e]?.agentId;return(Me.tasksBySession[e]??[]).filter(n=>n.id!==t)}),EN=ghe(Me,o0),s0=R(()=>{const e=Me.activeSessionId;return e?(Me.turnActiveBySession[e]??!1)||(Me.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),pge=R(()=>{const e=Me.activeSessionId;if(e)return Me.turnErrorBySession[e]}),hge=R(()=>{const e=Me.activeSessionId;if(e&&s0.value)return Me.turnRetryBySession[e]}),IN=e=>_t().getFileUrl(e),mge=[],gge=KT(),vge=R(()=>{const e=Me.activeSessionId;if(!e)return[];const t=new Set(Me.sideChatUserMessageIdsBySession[e]??[]);return gge({messages:(Me.messagesBySession[e]??[]).filter(n=>!t.has(n.id)),approvals:Me.approvalsBySession[e]??mge,getFileUrl:IN,sessionActive:s0.value,planReviewByToolCallId:Me.planReviewByToolCallId,plansByToolCallId:Mg[e]})}),yge=R(()=>W5.value||s0.value),kge=R(()=>(EN.taskClock.value,o0.value.map(lge))),LN=R(()=>IX(o0.value)),bge=R(()=>$X(o0.value)),vd=R(()=>{const e=Me.activeSessionId;return e?Me.goalBySession[e]??null:null}),Cge=R(()=>{const e=Me.activeSessionId;return e?bX(Me.messagesBySession[e]??[]):[]}),wge=R(()=>{const e=Me.activeSessionId;return e?Me.compactionBySession[e]??null:null}),_ge=R(()=>Me.connection),xge=R(()=>Me.loading),Sge=R(()=>Me.sessionLoading),Age=R(()=>{const e=Me.activeSessionId;return e?Me.messagesLoadingMoreBySession[e]??!1:!1}),Mge=R(()=>{const e=Me.activeSessionId;return e?Me.messagesHasMoreBySession[e]??!1:!1}),Tge=R(()=>{const e=Me.activeSessionId;return e?Me.messagesLoadMoreErrorBySession[e]??!1:!1}),Ege=R(()=>Me.serverVersion),Ige=R(()=>Me.experimentalFlags),Lge=R(()=>Me.backend),$ge=R(()=>Me.dangerousBypassAuth);function Nge(){Me.dangerousBypassAuth=!1}const Fge=R(()=>Me.permission),Rge=R(()=>Me.thinking),$N=R(()=>{const e=Me.activeSessionId;return e?Me.planModeBySession[e]??!1:F2.planMode}),Oge=R(()=>{const e=Me.activeSessionId;return e?Me.swarmModeBySession[e]??!1:F2.swarmMode}),Pge=R(()=>{const e=Me.activeSessionId;return e?Me.goalModeBySession[e]??!1:F2.goalMode}),Dge=R(()=>{const e=LX(LN.value);return{plan:$N.value,goal:vd.value&&vd.value.status!=="complete"?{status:vd.value.status,turnsUsed:vd.value.turnsUsed,elapsedMs:vd.value.wallClockMs}:null,swarm:e.total>0?e:null}}),Bge=R(()=>{const e=Me.activeSessionId;if(!e)return[];const t=_t();return(Me.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,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}))}))}),Hge=R(()=>Me.warnings),zge=R(()=>{const e=Me.activeSessionId;return e?(Me.questionsBySession[e]??[]).map(ige):[]}),Wge=R(()=>{const e=Me.activeSessionId;return e?(Me.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:sge(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),U5=R(()=>{const e=Me.activeSessionId;return e?(Me.approvalsBySession[e]??[]).length>0?"awaiting-approval":(Me.questionsBySession[e]??[]).length>0?"awaiting-question":W5.value||s0.value?"running":"idle":"idle"}),Rn=dme(Me,{pushOperationFailure:t0,refreshSessionStatus:_c,persistSessionProfile:CN,activity:U5,updateSession:R2,updateSessionMessages:fN,loadConfig:()=>At.loadConfig(),checkAuth:()=>At.checkAuth()}),_8=R(()=>{const e=Me.activeSessionId;if(!e)return null;const t=Me.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),Uge=R(()=>{const e=Me.activeSessionId;return e?Me.gitStatusBySession[e]?.pullRequest??null:null}),jge=R(()=>{const e=Me.activeSessionId;if(!e)return[];const t=Me.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,o])=>({path:n,status:o})).sort((n,o)=>n.path.localeCompare(o.path)):[]}),Vge=R(()=>{const e=Me.activeSessionId;if(!e)return null;const t=Me.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),NN=R(()=>{const e=Me.sessions.find(r=>r.id===Me.activeSessionId),t=_8.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?Rn.draftModel.value:null,o=(e?.model&&e.model.length>0?e.model:n??Me.defaultModel)??"—",s=Rn.models.value.find(r=>r.id===o)??Rn.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:Me.permission,branch:t,cwd:e?.cwd??"",isGitRepo:_8.value!==null}}),qge=R(()=>mN.value),Kge=R(()=>Me.sessions.find(t=>t.id===Me.activeSessionId)?.usage.totalCostUsd??0),Zge=R(()=>Me.authReady),Gge=R(()=>Me.defaultModel),Yge=R(()=>Me.managedProviderStatus),Xge=R(()=>Me.managedUserInfo),Jge=R(()=>Me.managedMembership),Qge=R(()=>Me.config),e2e=R(()=>{const e=Me.activeSessionId;if(!e)return{};const t=Me.gitStatusBySession[e];return t?{...t.entries}:{}}),t2e=R(()=>{const e=new Map;for(const t of Me.workspaces){const n=Pr(t.root);e.has(n)||e.set(n,t.id)}return e});function Ml(e){return t2e.value.get(Pr(e.cwd))??e.workspaceId??e.cwd}const j5=R(()=>dJ({workspaces:Me.workspaces,sessions:Me.sessions,hiddenWorkspaceRoots:Me.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:Me.sessionsHasMoreByWorkspace})),Ng=Z(wQ());Je(()=>[j5.value.map(e=>e.id).join("\0"),Me.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],o=UQ(n,Ng.value);o!==null&&(Ng.value=o,wE(o))});const Yo=Z(_E());function FN(e){const t=LJ(Yo.value,e);t!==Yo.value&&(Yo.value=t,k1(t))}function V5(e){const t=uE(Yo.value,e);t!==Yo.value&&(Yo.value=t,k1(t))}function n2e(e){const t=new Set(e),n=Yo.value.filter(o=>!t.has(o));n.length!==Yo.value.length&&(Yo.value=n,k1(n))}function o2e(e){Yo.value.includes(e)?V5(e):FN(e)}function s2e(e){const t=cE(e,Yo.value);Yo.value=t,k1(t)}function i2e(e,t,n){const o=ON.value.map(r=>r.id),s=NJ(o,e,t,n),i=cE(s,Yo.value);Yo.value=i,k1(i)}const Yr=R(()=>{const e=j5.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:wme(t.root,Me.fsHome),sessionCount:t.sessionCount}));return jQ(e,Ng.value)}),P2=R(()=>{const e=Me.activeWorkspaceId,t=Yr.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Je(P2,e=>{e&&(Object.prototype.hasOwnProperty.call(Rn.skillsByWorkspace.value,e)||Rn.loadSkillsForWorkspace(e))},{immediate:!0});const r2e=R(()=>{const e=P2.value;return e?Yr.value.find(t=>t.id===e)??null:null}),l2e=R(()=>{xc.value;const e=new Set(Yr.value.map(n=>n.id)),t=new Map(Yr.value.map(n=>[n.id,n.name]));return Me.sessions.filter(n=>!n.parentSessionId&&e.has(Ml(n))).map(n=>{const o=Ml(n);return{id:n.id,title:n.title,time:n0(n.updatedAt),busy:u1(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:o,workspaceName:t.get(o)}})}),Fg=Z(xg),q5=R(()=>{xc.value;const e=new Set(Yr.value.map(l=>l.id)),t=new Map(Yr.value.map(l=>[l.id,l.name])),n=new Set(Yo.value),o=(l,a)=>new Date(a.updatedAt).getTime()-new Date(l.updatedAt).getTime(),s=Me.flatSessionsFrontier,i=[],r=[];for(const l of Me.sessions){if(l.parentSessionId||l.archived||n.has(l.id)||!e.has(Ml(l)))continue;if(kE({busy:u1(l.id,l.mainTurnActive),unread:DN.value[l.id]??!1,renaming:!1,questionCount:x8.value[l.id]?.questions??0,approvalCount:x8.value[l.id]?.approvals??0,pendingInteraction:l.pendingInteraction,lastTurnReason:l.lastTurnReason}).hasStatus){i.push(l);continue}s!==null&&new Date(l.updatedAt).getTime(){const a=Ml(l);return{id:l.id,title:l.title,time:n0(l.updatedAt),busy:u1(l.id,l.mainTurnActive),pendingInteraction:l.pendingInteraction,lastTurnReason:l.lastTurnReason,lastPrompt:l.lastPrompt,updatedAt:l.updatedAt,workspaceId:a,workspaceName:t.get(a),cwdLabel:l.cwd?v1(l.cwd):"-",pullRequest:l.pullRequest}})}),a2e=R(()=>q5.value.slice(0,Fg.value)),u2e=R(()=>Me.flatSessionsHasMore||Fg.valueq5.value.length&&Me.flatSessionsHasMore&&At.loadMoreFlatSessions()}function RN(e){xc.value;const t=new Set(Yo.value),n=new Map,o=new Map;for(const s of Me.sessions.toSorted((i,r)=>new Date(r.updatedAt).getTime()-new Date(i.updatedAt).getTime())){if(s.parentSessionId)continue;const i=Ml(s);if(e&&t.has(s.id)){o.set(i,(o.get(i)??0)+1);continue}const r={id:s.id,title:s.title,time:n0(s.updatedAt),busy:u1(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt},l=n.get(i)??[];l.push(r),n.set(i,l)}return Yr.value.map(s=>({workspace:s,sessions:n.get(s.id)??[],pinnedCount:o.get(s.id)??0,hasMore:Me.sessionsHasMoreByWorkspace[s.id]??!1,loadingMore:Me.sessionsLoadingMoreByWorkspace[s.id]??!1,initialCount:Me.sessionsInitialCountByWorkspace[s.id]??am}))}const d2e=R(()=>RN(!0)),f2e=R(()=>RN(!1)),ON=R(()=>{xc.value;const e=new Set(Yr.value.map(o=>o.id)),t=new Map(Yr.value.map(o=>[o.id,o.name])),n=Me.sessions.filter(o=>!o.parentSessionId&&!o.archived&&e.has(Ml(o)));return $J(n,Yo.value).pinned.map(o=>{const s=Ml(o);return{id:o.id,title:o.title,time:n0(o.updatedAt),busy:u1(o.id,o.mainTurnActive),pendingInteraction:o.pendingInteraction,lastTurnReason:o.lastTurnReason,updatedAt:o.updatedAt,workspaceId:s,workspaceName:t.get(s),pinned:!0,cwdLabel:o.cwd?v1(o.cwd):"-",pullRequest:o.pullRequest}})});function p2e(e){Ng.value=e,wE(e)}const PN=R(()=>{const e={};for(const[t,n]of Object.entries(Me.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(Me.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),x8=R(()=>{const e={};for(const[t,n]of Object.entries(Me.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(Me.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),DN=R(()=>{const e={};for(const[t,n]of Object.entries(Me.unreadBySession))n&&(e[t]=!0);return e}),h2e=R(()=>{const e={},t=PN.value;for(const n of Me.sessions){const o=t[n.id]??0;if(o<=0)continue;const s=Ml(n);e[s]=(e[s]??0)+o}return e}),m2e=R(()=>Me.recentRoots),g2e=R(()=>Me.availableOpenInApps),At=ame(Me,{taskPoller:EN,sideChat:si,modelProvider:Rn,pushOperationFailure:t0,activity:U5,sessionsKnownEmpty:MN,setSessions:D5,updateSession:R2,upsertSessionFront:Sme,appendSession:Ame,forgetSession:pN,unpinSessions:n2e,setActiveSessionId:B5,updateSessionMessages:fN,nextOptimisticMsgId:SN,getEventConn:()=>rr,syncSessionFromSnapshot:z5,reopenSession:tge,hasLoadedMessages:Xme,refreshSessionStatus:_c,refreshSessionGoal:Lme,refreshSessionPlans:b8,persistSessionProfile:CN,mergedWorkspaces:j5,workspacesView:Yr,status:NN,workspaceIdForSession:Ml,savePermissionToStorage:vme,savePlanModeToStorage:lN,saveSwarmModeToStorage:aN,saveGoalModeToStorage:uN,draftModes:F2,saveUnread:Iy,saveActiveWorkspaceToStorage:Cme,saveHiddenWorkspacesToStorage:bme,goalErrorMessage:Zme,initialized:kN,connectIssue:bN,selectedDiffPath:hN,fileDiffLines:mN,fileDiffLoading:gN,fileDiffTexts:vN,fileDiffEmptyFile:yN});function K5(e){return e===Me.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function v2e(e){Me.turnActiveBySession[e]&&delete Me.turnActiveBySession[e],Me.inFlightBySession[e]&&(Me.inFlightBySession[e]=!1)}function y2e(e,t,n){const o=Me.promptIdBySession[e];At.finishPromptLocal(e,{turnWasActive:n}),e===Me.activeSessionId?(At.loadGitStatus(e),_c(e)):t==="idle"&&(Me.unreadBySession[e]=!0,Iy({[e]:!0}));const s=(Me.approvalsBySession[e]??[]).length>0,i=(Me.questionsBySession[e]??[]).length>0;ohe(t,s,i)&&Da.maybeNotifyCompletion(e,{isUserWatching:K5(e),sessionTitle:Me.sessions.find(r=>r.id===e)?.title??"",promptId:o,onClick:()=>{At.selectSession(e)}})}function k2e(e,t){const n=t.questions[0],o=n?.header?.trim()??"",s=n?.question?.trim()??"",i=o&&s?`${o}: ${s}`:s||o;Da.maybeNotifyQuestion({isUserWatching:K5(e),sessionTitle:Me.sessions.find(r=>r.id===e)?.title??"",questionPreview:i,questionId:t.questionId,onClick:()=>{At.selectSession(e)}})}function b2e(e,t){Da.maybeNotifyApproval({isUserWatching:K5(e),sessionTitle:Me.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{At.selectSession(e)}})}function mu(){return oge(),{workspace:age,sessions:uge,activeSessionId:cge,workspacesView:Yr,visibleWorkspace:r2e,activeWorkspaceId:P2,sessionsForView:l2e,workspaceGroups:d2e,mobileWorkspaceGroups:f2e,pinnedSessions:ON,flatSessions:a2e,flatSessionsHasMore:u2e,flatSessionsLoadingMore:R(()=>Me.flatSessionsLoadingMore),attentionBySession:PN,pendingBySession:x8,attentionByWorkspace:h2e,unreadBySession:DN,recentRoots:m2e,turns:vge,tasks:kge,activeAppTasks:o0,auxiliaryTranscripts:Tg,getFileUrl:IN,todos:Cge,goal:vd,swarms:LN,swarmMembersByToolCallId:bge,activationBadges:Dge,compaction:wge,status:NN,sessionCost:Kge,fileDiff:qge,selectedDiffPath:hN,fileDiffLoading:gN,fileDiffTexts:vN,fileDiffEmptyFile:yN,changes:jge,gitInfo:_8,gitDiffStats:Vge,activePullRequest:Uge,changesByPath:e2e,pendingApprovals:Wge,availableOpenInApps:g2e,connection:_ge,loading:xge,sessionLoading:Sge,loadingMoreMessages:Age,hasMoreMessages:Mge,loadMoreMessagesError:Tge,serverVersion:Ege,backend:Lge,dangerousBypassAuth:$ge,experimentalFlags:Ige,clearDangerousBypassAuth:Nge,initialized:kN,connectIssue:bN,permission:Fge,thinking:Rge,planMode:$N,swarmMode:Oge,goalMode:Pge,queued:Bge,warnings:Hge,questions:zge,activity:U5,turnActive:s0,activeTurnError:pge,activeTurnRetry:hge,inFlight:W5,working:yge,isStartingFirstPrompt:fge,models:Rn.models,starredModelIds:Rn.starredModelIds,providers:Rn.providers,fontScale:$h.fontScale,setFontScale:$h.setFontScale,colorScheme:$h.colorScheme,setColorScheme:$h.setColorScheme,notifyEnabled:Da.notifyEnabled,notifySound:Da.notifySound,notifyPermission:Da.notifyPermission,setNotifyEnabled:Da.setNotifyEnabled,setNotifySound:Da.setNotifySound,onboarded:xN,setOnboarded:Nme,load:At.load,selectSession:At.selectSession,clearActiveSession:At.clearActiveSession,loadOlderMessages:At.loadOlderMessages,loadWorkspaces:At.loadWorkspaces,loadMoreSessions:At.loadMoreSessions,loadAllSessions:At.loadAllSessions,ensureFlatSessions:At.ensureFlatSessions,loadMoreFlatSessions:c2e,selectWorkspace:At.selectWorkspace,openWorkspace:At.openWorkspace,openWorkspaceDraft:At.openWorkspaceDraft,startSessionAndSendPrompt:At.startSessionAndSendPrompt,startSessionAndActivateSkill:At.startSessionAndActivateSkill,startSessionAndOpenSideChat:At.startSessionAndOpenSideChat,addWorkspaceByPath:At.addWorkspaceByPath,browseFs:At.browseFs,getFsHome:At.getFsHome,sendPrompt:At.sendPrompt,steerPrompt:At.steerPrompt,sideChatVisible:si.sideChatVisible,sideChatSessionId:si.sideChatSessionId,sideChatTurns:si.sideChatTurns,sideChatRunning:si.sideChatRunning,sideChatSending:si.sideChatSending,openSideChat:si.openSideChat,closeSideChat:si.closeSideChat,sendSideChatPrompt:si.sendSideChatPrompt,uploadImage:At.uploadImage,abortCurrentPrompt:At.abortCurrentPrompt,respondApproval:At.respondApproval,respondQuestion:At.respondQuestion,dismissQuestion:At.dismissQuestion,pendingQuestionActions:At.pendingQuestionActions,pendingApprovalActions:At.pendingApprovalActions,cancelTask:At.cancelTask,setPermission:At.setPermission,setThinking:Rn.setThinking,setPlanMode:At.setPlanMode,togglePlanMode:At.togglePlanMode,setSwarmMode:At.setSwarmMode,toggleSwarmMode:At.toggleSwarmMode,setGoalMode:At.setGoalMode,toggleGoalMode:At.toggleGoalMode,createGoal:At.createGoal,controlGoal:At.controlGoal,enqueue:At.enqueue,dismissWarning:At.dismissWarning,renameSession:At.renameSession,renameWorkspace:At.renameWorkspace,deleteWorkspace:At.deleteWorkspace,reorderWorkspaces:p2e,pinSession:FN,unpinSession:V5,togglePinSession:o2e,reorderPinnedSessions:s2e,pinSessionAt:i2e,archiveSession:At.archiveSession,exportSession:At.exportSession,restoreSession:At.restoreSession,loadArchivedSessions:At.loadArchivedSessions,compact:At.compact,forkSession:At.forkSession,undo:At.undo,unqueue:At.unqueue,reorderQueue:At.reorderQueue,searchFiles:At.searchFiles,loadGitStatus:At.loadGitStatus,loadFileDiff:At.loadFileDiff,clearFileDiff:At.clearFileDiff,listDir:At.listDir,readFileContent:At.readFileContent,readHostFileContent:At.readHostFileContent,getFileDownloadUrl:At.getFileDownloadUrl,openWorkspaceFile:At.openWorkspaceFile,openInApp:At.openInApp,revealWorkspaceFile:At.revealWorkspaceFile,resolveImageUrl:At.resolveImageUrl,loadModels:Rn.loadModels,loadProviders:Rn.loadProviders,skills:dge,activateSkill:Rn.activateSkill,setModel:Rn.setModel,toggleStarModel:Rn.toggleStarModel,addProvider:Rn.addProvider,updateProvider:Rn.updateProvider,getProvider:Rn.getProvider,deleteProvider:Rn.deleteProvider,refreshProvider:Rn.refreshProvider,refreshAllProviders:Rn.refreshAllProviders,loadCatalogProviders:Rn.loadCatalogProviders,importCatalogProvider:Rn.importCatalogProvider,importCustomRegistry:Rn.importCustomRegistry,authReady:Zge,defaultModel:Gge,managedProviderStatus:Yge,managedUserInfo:Xge,managedMembership:Jge,notify:O2,config:Qge,loadConfig:At.loadConfig,updateConfig:At.updateConfig,checkAuth:At.checkAuth,probeManagedMembership:At.probeManagedMembership,startOAuthLogin:Rn.startOAuthLogin,pollOAuthLogin:Rn.pollOAuthLogin,cancelOAuthLogin:Rn.cancelOAuthLogin,getUsage:Rn.getUsage,logout:At.logout}}const C2e=["aria-expanded"],w2e={class:"user-menu-avatar","aria-hidden":"true"},_2e=["src"],x2e={class:"user-menu-name"},S2e={class:"user-menu-name"},A2e={class:"user-menu-item-label"},M2e={class:"user-menu-item-label"},T2e={class:"user-menu-item-label user-menu-login-label"},E2e={class:"user-menu-item-label"},I2e={class:"user-menu-row-value"},L2e={class:"user-menu-item-label"},$2e={class:"user-menu-row-value"},N2e={class:"user-menu-item-label"},F2e={key:0,class:"user-menu-usage"},R2e={key:0,class:"user-menu-usage-state"},O2e={key:1,class:"user-menu-usage-state"},P2e={class:"user-menu-usage-error"},D2e={key:2,class:"user-menu-usage-state user-menu-usage-empty"},B2e={class:"user-menu-usage-main"},H2e={class:"user-menu-usage-label"},z2e={key:0,class:"user-menu-usage-hint"},W2e={class:"user-menu-item-label"},U2e={class:"user-menu-item-label"},j2e=et({__name:"UserMenu",emits:["login","openSettings"],setup(e,{emit:t}){const n=t,{t:o,locale:s}=Nt(),i=mu(),{confirm:r}=hu(),l=R(()=>i.managedProviderStatus.value==="authenticated"),a=i.managedUserInfo,u=i.managedMembership,c=R(()=>a.value?.nickname||o("sidebar.defaultUserName")),d=R(()=>u.value==="free"||OJ(a.value?.userLevel)),f=R(()=>u.value!=="free"),h=Z(!1);Je(()=>a.value?.avatar,()=>{h.value=!1});const m=R(()=>!!a.value?.avatar&&!h.value),v=i.colorScheme,k=R(()=>o(`theme.${v.value}`)),w=R(()=>v.value==="light"?"light-mode":v.value==="dark"?"dark-mode":"follow-system"),b=[{value:"light",labelKey:"theme.light",icon:"light-mode"},{value:"dark",labelKey:"theme.dark",icon:"dark-mode"},{value:"system",labelKey:"theme.system",icon:"follow-system"}];function _(te){i.setColorScheme(te)}const g=R(()=>yg.find(te=>te.code===s.value)?.label??s.value);function x(te){s.value!==te&&E5(te)}const S=Z(!1),T=Z({}),A=Z(null),E=Z(null);let P=null;function D(te){const ce=te.target;ce.closest(".user-menu")||ce.closest(".user-menu-trigger")||ce.closest(".user-submenu")||O()}function I(te){te.key==="Escape"&&(te.stopPropagation(),O())}async function $(){if(S.value){O();return}S.value=!0,document.addEventListener("mousedown",D),document.addEventListener("keydown",I,!0),window.addEventListener("resize",O),l.value&&oe(),await yt(),B();const te=E.value;te&&(P=new ResizeObserver(H),P.observe(te))}function B(){const te=E.value,ce=A.value?.el;if(!te||!ce)return;const ue=te.getBoundingClientRect(),Se=4,ze=8,_e=ce.offsetHeight,Ee={left:`${Math.round(ue.left)}px`,width:`${Math.round(ue.width)}px`};ue.top-_e-Se{W[te]=ce instanceof HTMLElement?ce:ce?.$el??null}}function ie(te){le(),F.value!==te&&(F.value=te,yt(Ie))}function ne(te,ce){te.key!=="Enter"&&te.key!==" "&&te.key!=="ArrowRight"||(te.preventDefault(),ie(ce))}function X(){le(),K=setTimeout(()=>{F.value=null,K=null},250)}function le(){K!==null&&(clearTimeout(K),K=null)}function Ie(){const te=F.value,ce=A.value?.el,ue=z.value?.el,Se=te!==null?W[te]:null;if(!ce||!ue||!Se)return;const ze=4,_e=8,Ee=ce.getBoundingClientRect(),it=Se.getBoundingClientRect(),Fe=ue.offsetHeight,Oe=Math.min(ue.offsetWidth,Ee.width);let Ge=Ee.right+ze,at=!1;Ge+Oe>window.innerWidth-_e&&(Ge=Math.max(_e,Ee.left-Oe-ze),at=!0);const Tt=Math.max(_e,Math.min(it.top,window.innerHeight-Fe-_e));U.value={top:`${Math.round(Tt)}px`,left:`${Math.round(Ge)}px`,maxWidth:`${Math.round(Ee.width)}px`,transformOrigin:at?"top right":"top left","--menu-pop-shift":"-2px"}}const de=Z(!1),pe=Z(null);let ve=0;async function oe(){const te=++ve;de.value=!0;try{const ce=await i.getUsage();te===ve&&(pe.value=ce)}finally{te===ve&&(de.value=!1)}}const ye=R(()=>{if(pe.value?.kind!=="ok")return[];const{summary:te,limits:ce}=pe.value,ue=FJ(ce,5,"hour");return[te,ue].filter(Se=>Se!=null)}),G=R(()=>pe.value?.kind==="error"?pe.value.message:o("settings.planUsage.loadFailed"));function Y(te){return te.resetAt===void 0?"":fE(te.resetAt,o)}function fe(){O(),jp()}function we(){O(),n("login")}function ge(){O(),n("openSettings")}async function Q(){O(),await r({title:o("sidebar.logoutConfirmTitle"),message:o("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>i.logout()})}return(te,ce)=>(y(),M(Pe,null,[C("button",{ref_key:"triggerRef",ref:E,class:"user-menu-trigger",type:"button","aria-haspopup":"menu","aria-expanded":S.value,onClick:It($,["stop"])},[l.value?(y(),M(Pe,{key:0},[C("span",w2e,[m.value?(y(),M("img",{key:0,src:p(a)?.avatar,alt:"",onError:ce[0]||(ce[0]=ue=>h.value=!0)},null,40,_2e)):(y(),he(p(Te),{key:1,name:"user",size:"sm"}))]),C("span",x2e,N(c.value),1)],64)):(y(),M(Pe,{key:1},[j(p(Te),{name:"user"}),C("span",S2e,N(p(o)("sidebar.notSignedIn")),1)],64))],8,C2e),(y(),he(Zr,{to:"body"},[j(as,{name:"menu-pop"},{default:me(()=>[S.value?(y(),he(p(Cl),{key:0,ref_key:"menuRef",ref:A,class:"user-menu",style:Zt(T.value),onClick:ce[14]||(ce[14]=It(()=>{},["stop"]))},{default:me(()=>[l.value?(y(),M(Pe,{key:0},[f.value?(y(),he(p(hn),{key:0,ref:V("usage"),"aria-haspopup":"true","aria-expanded":F.value==="usage",onMouseenter:ce[1]||(ce[1]=ue=>ie("usage")),onMouseleave:X,onFocus:ce[2]||(ce[2]=ue=>ie("usage")),onBlur:X,onClick:ce[3]||(ce[3]=ue=>ie("usage")),onKeydown:ce[4]||(ce[4]=ue=>ne(ue,"usage"))},{default:me(()=>[j(p(Te),{name:"histogram",size:"sm"}),C("span",A2e,N(p(o)("settings.planUsage.title")),1),j(p(Te),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"])):ee("",!0),d.value?(y(),he(p(hn),{key:1,onClick:fe,onMouseenter:X},{default:me(()=>[j(p(Te),{name:"music",size:"sm"}),C("span",M2e,N(p(o)("sidebar.upgrade")),1),j(p(Te),{name:"external-link",size:"sm"})]),_:1})):ee("",!0),j(p(hn),{separator:""})],64)):(y(),M(Pe,{key:1},[j(p(hn),{class:"user-menu-login",onClick:we,onMouseenter:X},{default:me(()=>[j(p(Te),{name:"log-in",size:"sm"}),C("span",T2e,N(p(o)("sidebar.signIn")),1)]),_:1}),j(p(hn),{separator:""})],64)),j(p(hn),{ref:V("theme"),"aria-haspopup":"true","aria-expanded":F.value==="theme",onMouseenter:ce[5]||(ce[5]=ue=>ie("theme")),onMouseleave:X,onFocus:ce[6]||(ce[6]=ue=>ie("theme")),onBlur:X,onClick:ce[7]||(ce[7]=ue=>ie("theme")),onKeydown:ce[8]||(ce[8]=ue=>ne(ue,"theme"))},{default:me(()=>[j(p(Te),{name:w.value,size:"sm"},null,8,["name"]),C("span",E2e,N(p(o)("theme.colorSchemeLabel")),1),C("span",I2e,N(k.value),1),j(p(Te),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),j(p(hn),{ref:V("language"),"aria-haspopup":"true","aria-expanded":F.value==="language",onMouseenter:ce[9]||(ce[9]=ue=>ie("language")),onMouseleave:X,onFocus:ce[10]||(ce[10]=ue=>ie("language")),onBlur:X,onClick:ce[11]||(ce[11]=ue=>ie("language")),onKeydown:ce[12]||(ce[12]=ue=>ne(ue,"language"))},{default:me(()=>[j(p(Te),{name:"translate",size:"sm"}),C("span",L2e,N(p(o)("sidebar.language")),1),C("span",$2e,N(g.value),1),j(p(Te),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),j(p(hn),{onClick:ge,onMouseenter:X},{default:me(()=>[j(p(Te),{name:"settings",size:"sm"}),C("span",N2e,N(p(o)("settings.title")),1)]),_:1}),l.value?(y(),M(Pe,{key:2},[j(p(hn),{separator:""}),j(p(hn),{onClick:ce[13]||(ce[13]=ue=>void Q()),onMouseenter:X},{default:me(()=>[j(p(Te),{name:"log-out",size:"sm"}),qe(" "+N(p(o)("sidebar.signOut")),1)]),_:1})],64)):ee("",!0)]),_:1},8,["style"])):ee("",!0)]),_:1})])),(y(),he(Zr,{to:"body"},[j(as,{name:"menu-pop"},{default:me(()=>[F.value!==null?(y(),he(p(Cl),{key:0,ref_key:"submenuRef",ref:z,class:"user-submenu",style:Zt(U.value),role:F.value==="usage"?"dialog":"menu",onClick:ce[16]||(ce[16]=It(()=>{},["stop"])),onMouseenter:le,onMouseleave:X,onFocusin:le,onFocusout:X},{default:me(()=>[F.value==="usage"?(y(),M("div",F2e,[de.value?(y(),M("div",R2e,[j(p(Ao),{size:"sm"})])):pe.value?.kind!=="ok"?(y(),M("div",O2e,[C("span",P2e,N(G.value),1),j(p(Rt),{variant:"ghost",size:"sm",onClick:ce[15]||(ce[15]=ue=>void oe())},{default:me(()=>[qe(N(p(o)("settings.planUsage.retry")),1)]),_:1})])):ye.value.length===0?(y(),M("span",D2e,N(p(o)("settings.planUsage.empty")),1)):(y(!0),M(Pe,{key:3},pt(ye.value,(ue,Se)=>(y(),M("div",{key:Se,class:"user-menu-usage-row"},[C("span",B2e,[C("span",H2e,N(p(dE)(ue,p(o))),1),Y(ue)?(y(),M("span",z2e,N(Y(ue)),1)):ee("",!0)]),C("span",{class:Re(["user-menu-usage-value",`sev-${p(C3)(ue.used,ue.limit)}`])},N(p(Wh)(ue.used,ue.limit))+"% ",3)]))),128))])):F.value==="theme"?(y(),M(Pe,{key:1},pt(b,ue=>j(p(hn),{key:ue.value,onClick:Se=>_(ue.value)},{default:me(()=>[j(p(Te),{name:ue.icon,size:"sm"},null,8,["name"]),C("span",W2e,N(p(o)(ue.labelKey)),1),p(v)===ue.value?(y(),he(p(Te),{key:0,name:"check",size:"sm"})):ee("",!0)]),_:2},1032,["onClick"])),64)):(y(!0),M(Pe,{key:2},pt(p(yg),ue=>(y(),he(p(hn),{key:ue.code,onClick:Se=>x(ue.code)},{default:me(()=>[C("span",U2e,N(ue.label),1),p(s)===ue.code?(y(),he(p(Te),{key:0,name:"check",size:"sm"})):ee("",!0)]),_:2},1032,["onClick"]))),128))]),_:1},8,["style","role"])):ee("",!0)]),_:1})]))],64))}}),V2e=ft(j2e,[["__scopeId","data-v-06f13413"]]),q2e={class:"ep-search"},K2e=["placeholder"],Z2e={class:"ep-scroll"},G2e={key:0,class:"ep-grid"},Y2e=["onClick"],X2e={key:1,class:"ep-empty"},J2e={class:"ep-label"},Q2e={class:"ep-grid"},eve=["onClick"],tve={class:"ep-label"},nve={class:"ep-grid"},ove=["onClick"],Kx="kimi-web.recent-emojis",sve=et({__name:"SessionEmojiPicker",props:{current:{default:null},removable:{type:Boolean,default:!0}},emits:["pick"],setup(e,{expose:t,emit:n}){const{t:o}=Nt(),{handleCompositionStart:s,handleCompositionEnd:i,isComposingKeyEvent:r}=Ar(),l=e,a=n,u=["⏳","⚠️","🐛","✨","🔥","🚀","🎯","🧪","📝","🔍","🛠️","💡","📦","🎨","🔒","📈","🧹","🚧","✅","❓","🌙","☕","🐳","🗂️","📊","🤖","🧩","⚙️","🌱","📌","💥","🕐"],c={faces:"sidebar.emojiGroupFaces",nature:"sidebar.emojiGroupNature",food:"sidebar.emojiGroupFood",activity:"sidebar.emojiGroupActivity",objects:"sidebar.emojiGroupObjects",symbols:"sidebar.emojiGroupSymbols"},d=sJ.map(S=>({id:S,labelKey:c[S],emojis:sE.filter(T=>T.group===S).map(T=>T.emoji)})),f=Z(h());function h(){try{const S=JSON.parse(localStorage.getItem(Kx)??"[]");return Array.isArray(S)?S.filter(T=>typeof T=="string"):[]}catch{return[]}}function m(S){f.value=aJ(f.value,S);try{localStorage.setItem(Kx,JSON.stringify(f.value))}catch{}a("pick",S)}const v=Z(""),k=R(()=>v.value.trim().length>0),w=R(()=>rJ(v.value)),b=Z(null);dn(()=>b.value?.focus());function _(S){if(r(S))return;const T=w.value[0];k.value&&T&&m(T)}function g(){let S=l.current??void 0;for(;S===void 0||S===l.current;)S=u[Math.floor(Math.random()*u.length)];m(S)}const x=Z(null);return t({el:R(()=>x.value?.el),isComposingKeyEvent:r}),(S,T)=>(y(),he(p(Cl),{ref_key:"menuRef",ref:x,class:"emoji-picker",role:"dialog","aria-label":p(o)("sidebar.sessionEmojiTitle"),onKeydown:T[4]||(T[4]=It(()=>{},["stop"]))},{default:me(()=>[C("div",q2e,[j(p(Te),{name:"search",size:"sm"}),Bn(C("input",{ref_key:"inputRef",ref:b,"onUpdate:modelValue":T[0]||(T[0]=A=>v.value=A),class:"ep-input",type:"text",placeholder:p(o)("sidebar.searchEmoji"),autocomplete:"off",spellcheck:"false",onKeydown:xl(_,["enter"]),onCompositionstart:T[1]||(T[1]=(...A)=>p(s)&&p(s)(...A)),onCompositionend:T[2]||(T[2]=(...A)=>p(i)&&p(i)(...A))},null,40,K2e),[[ai,v.value]])]),C("div",Z2e,[k.value?(y(),M(Pe,{key:0},[w.value.length?(y(),M("div",G2e,[(y(!0),M(Pe,null,pt(w.value,A=>(y(),M("button",{key:A,class:Re(["ep-e",{sel:A===e.current}]),type:"button",onClick:E=>m(A)},N(A),11,Y2e))),128))])):(y(),M("div",X2e,N(p(o)("sidebar.noEmojiResults")),1))],64)):(y(),M(Pe,{key:1},[f.value.length?(y(),M(Pe,{key:0},[C("div",J2e,N(p(o)("sidebar.recentEmojis")),1),C("div",Q2e,[(y(!0),M(Pe,null,pt(f.value,A=>(y(),M("button",{key:A,class:Re(["ep-e",{sel:A===e.current}]),type:"button",onClick:E=>m(A)},N(A),11,eve))),128))])],64)):ee("",!0),(y(!0),M(Pe,null,pt(p(d),A=>(y(),M(Pe,{key:A.id},[C("div",tve,N(p(o)(A.labelKey)),1),C("div",nve,[(y(!0),M(Pe,null,pt(A.emojis,E=>(y(),M("button",{key:E,class:Re(["ep-e",{sel:E===e.current}]),type:"button",onClick:P=>m(E)},N(E),11,ove))),128))])],64))),128))],64))]),j(p(hn),{separator:""}),j(p(hn),{role:"button",disabled:!(e.current&&e.removable),onClick:T[3]||(T[3]=A=>a("pick",null))},{default:me(()=>[j(p(Te),{name:"close",size:"sm"}),qe(" "+N(p(o)("sidebar.removeEmoji")),1)]),_:1},8,["disabled"]),j(p(hn),{role:"button",onClick:g},{default:me(()=>[j(p(Te),{name:"sparkles",size:"sm"}),qe(" "+N(p(o)("sidebar.randomEmoji")),1)]),_:1})]),_:1},8,["aria-label"]))}}),ive=ft(sve,[["__scopeId","data-v-05e46bbb"]]),rve={class:"row"},lve={key:0,class:"lead","aria-hidden":"true"},ave={key:1,class:"unread-dot"},uve={class:"left"},cve=["onKeydown"],dve=["aria-label"],fve={class:"act"},pve={key:0,class:"ts"},hve={key:1,class:"st"},mve={key:1,class:"unread-dot"},gve={key:2,class:"ha"},vve={key:0,class:"sub"},yve={class:"sub-text"},kve=["aria-label"],bve={class:"menu-time"},Cve=et({__name:"SessionRow",props:{session:{},active:{type:Boolean},approvalCount:{default:0},questionCount:{default:0},unread:{type:Boolean,default:!1}},emits:["select","rename","renameStateChange","archive","fork","export","pin"],setup(e,{expose:t,emit:n}){const{t:o}=Nt(),s=e,i=n;function r(ue){const Se=new Date(ue);if(Number.isNaN(Se.getTime()))return ue;const ze=_e=>String(_e).padStart(2,"0");return`${Se.getFullYear()}-${ze(Se.getMonth()+1)}-${ze(Se.getDate())} ${ze(Se.getHours())}:${ze(Se.getMinutes())}`}const l=R(()=>s.session.updatedAt?r(s.session.updatedAt):s.session.time),a=R(()=>s.session.cwdLabel!==void 0),u=R(()=>kE({busy:s.session.busy,unread:s.unread,renaming:W.value,questionCount:s.questionCount,approvalCount:s.approvalCount,pendingInteraction:s.session.pendingInteraction,lastTurnReason:s.session.lastTurnReason})),c=R(()=>u.value.showQuestionBadge),d=R(()=>u.value.showApprovalBadge),f=R(()=>u.value.showAbortedBadge),h=R(()=>u.value.showBusySpinner),m=R(()=>u.value.hasStatus),v=Z(!1),k=Z(null),w=Z({});function b(ue){const Se=ue.target;k.value?.el?.contains(Se)||g()}async function _(){$(),v.value=!0,setTimeout(()=>document.addEventListener("mousedown",b),0),window.addEventListener("resize",g),await yt()}function g(){v.value=!1,document.removeEventListener("mousedown",b),window.removeEventListener("resize",g)}bn(()=>{document.removeEventListener("mousedown",b),document.removeEventListener("mousedown",B),window.removeEventListener("keydown",H,!0),window.removeEventListener("resize",g),window.removeEventListener("resize",$)});const x=R(()=>yE(s.session.title)),S=R(()=>{const ue=x.value.emoji;return ue?s.session.title.slice(ue.length):s.session.title}),T=Z(!1),A=Z(null),E=Z({});let P=null;function D(ue,Se,ze){const _e=A.value?.el,Ee=4,it=8,Fe=_e?.offsetHeight??0,Oe=_e?.offsetWidth??0;let Ge=ue.bottom+Ee,at=!1;Ge+Fe>window.innerHeight-it&&(Ge=Math.max(it,ue.top-Fe-Ee),at=!0);const Tt=ze??(Se==="left"?ue.left:ue.right-Oe),Bt=Math.max(it,Math.min(Tt,window.innerWidth-Oe-it)),Yt=ze===void 0?Se:`${Math.round(Math.min(Math.max(ze-Bt,0),Oe))}px`;E.value={top:`${Math.round(Ge)}px`,left:`${Math.round(Bt)}px`,transformOrigin:`${Yt} ${at?"bottom":"top"}`,"--menu-pop-shift":at?"2px":"-2px"}}async function I(ue,Se,ze="left",_e){const Ee=Se??ue?.getBoundingClientRect();if(Ee){if(T.value){$();return}g(),P=ue??null,T.value=!0,setTimeout(()=>document.addEventListener("mousedown",B),0),window.addEventListener("keydown",H,!0),window.addEventListener("resize",$),await yt(),D(Ee,ze,_e)}}function $(){T.value=!1,P=null,document.removeEventListener("mousedown",B),window.removeEventListener("keydown",H,!0),window.removeEventListener("resize",$)}function B(ue){const Se=ue.target;A.value?.el?.contains(Se)||P?.contains(Se)||$()}function H(ue){ue.key==="Escape"&&(A.value?.isComposingKeyEvent(ue)||(ue.preventDefault(),ue.stopPropagation(),$()))}function O(ue){return ue.clientX||ue.clientY?new DOMRect(ue.clientX,ue.clientY,0,0):void 0}function F(ue){ue.stopPropagation();const Se=ue;I(Se.currentTarget,O(Se),"left",Se.clientX||void 0)}function U(ue){const Se=k.value?.el,ze=ue,_e=O(ze)??Se?.getBoundingClientRect();g(),I(Se,_e,"left",ze.clientX||void 0)}function z(ue){if($(),ue===x.value.emoji)return;const Se=dQ(s.session.title,ue);Se&&Se!==s.session.title&&i("rename",s.session.id,Se)}const W=Z(!1),K=Z(""),V=Z(null),{handleCompositionStart:ie,handleCompositionEnd:ne,isComposingKeyEvent:X}=Ar();async function le(){g(),$(),W.value=!0,K.value=s.session.title,await yt();try{V.value?.focus(),V.value?.select()}catch{}}function Ie(){const ue=K.value.trim();ue&&ue!==s.session.title&&i("rename",s.session.id,ue),W.value=!1}function de(ue){X(ue)||Ie()}function pe(ue){X(ue)||ve()}function ve(){W.value=!1}Je(W,ue=>i("renameStateChange",ue));async function oe(ue){W.value||(ue.preventDefault(),ue.stopPropagation(),v.value&&g(),await _(),ye(ue))}function ye(ue){const Se=k.value?.el,ze=8,_e=Se?.offsetHeight??0,Ee=Se?.offsetWidth??0;let it=ue.clientY,Fe=!1;it+_e>window.innerHeight-ze&&(it=Math.max(ze,ue.clientY-_e),Fe=!0);let Oe=ue.clientX,Ge=!1;Oe+Ee>window.innerWidth-ze&&(Oe=Math.max(ze,ue.clientX-Ee),Ge=!0),w.value={top:`${Math.round(it)}px`,left:`${Math.round(Oe)}px`,transformOrigin:`${Fe?"bottom":"top"} ${Ge?"right":"left"}`,"--menu-pop-shift":Fe?"2px":"-2px"}}const G=Z(!1),Y=Z(!1);async function fe(){const ue=await Zs(s.session.id);G.value=ue,Y.value=!ue,setTimeout(()=>{G.value=!1,Y.value=!1,g()},1500)}function we(){g(),i("fork",s.session.id)}function ge(){g(),i("export",s.session.id)}function Q(){g(),i("pin",s.session.id)}function te(){g(),i("archive",s.session.id)}t({closeMenu:g});function ce(){const ue=s.session.pullRequest?.url;ue&&window.open(ue,"_blank","noopener")}return(ue,Se)=>(y(),M("div",{class:Re(["se",{on:e.active,flat:a.value}]),onClick:Se[7]||(Se[7]=ze=>i("select",e.session.id)),onContextmenu:oe},[C("div",rve,[a.value?ee("",!0):(y(),M("span",lve,[e.session.busy?(y(),he(p(Ao),{key:0,size:"sm"})):e.unread?(y(),M("span",ave)):ee("",!0)])),C("div",uve,[W.value?Bn((y(),M("input",{key:0,ref_key:"renameInputRef",ref:V,"onUpdate:modelValue":Se[0]||(Se[0]=ze=>K.value=ze),class:"rename-input",onClick:Se[1]||(Se[1]=It(()=>{},["stop"])),onKeydown:[xl(It(de,["stop"]),["enter"]),xl(It(pe,["stop"]),["esc"])],onCompositionstart:Se[2]||(Se[2]=(...ze)=>p(ie)&&p(ie)(...ze)),onCompositionend:Se[3]||(Se[3]=(...ze)=>p(ne)&&p(ne)(...ze)),onBlur:Ie},null,40,cve)),[[ai,K.value]]):(y(),M("span",{key:1,class:"t",onDblclick:It(le,["stop"])},[x.value.emoji?(y(),M("button",{key:0,type:"button",class:"emoji","aria-label":p(o)("sidebar.setEmoji"),onClick:It(F,["stop"]),onDblclick:Se[4]||(Se[4]=It(()=>{},["stop"]))},N(x.value.emoji),41,dve)):ee("",!0),qe(N(S.value),1)],32))]),C("span",fve,[j(p(pn),{text:p(o)("workspace.awaitingAnswerTitle")},{default:me(()=>[c.value?(y(),he(p(Vr),{key:0,variant:"info",size:"sm"},{default:me(()=>[qe(N(p(o)("workspace.awaitingAnswer")),1)]),_:1})):ee("",!0)]),_:1},8,["text"]),j(p(pn),{text:p(o)("workspace.awaitingPermissionTitle")},{default:me(()=>[d.value?(y(),he(p(Vr),{key:0,variant:"warning",size:"sm"},{default:me(()=>[qe(N(p(o)("workspace.awaitingPermission")),1)]),_:1})):ee("",!0)]),_:1},8,["text"]),j(p(pn),{text:p(o)("workspace.abortedTitle")},{default:me(()=>[f.value?(y(),he(p(Vr),{key:0,variant:"danger",size:"sm"},{default:me(()=>[qe(N(p(o)("workspace.aborted")),1)]),_:1})):ee("",!0)]),_:1},8,["text"]),!a.value||!m.value?(y(),M("span",pve,N(e.session.time),1)):h.value||e.unread?(y(),M("span",hve,[h.value?(y(),he(p(Ao),{key:0,size:"sm"})):(y(),M("span",mve))])):ee("",!0),W.value?ee("",!0):(y(),M("span",gve,[j(p(pn),{text:e.session.pinned?p(o)("sidebar.unpin"):p(o)("sidebar.pin")},{default:me(()=>[j(p(gn),{class:"pin-btn",size:"sm",label:e.session.pinned?p(o)("sidebar.unpin"):p(o)("sidebar.pin"),onClick:It(Q,["stop"])},{default:me(()=>[j(p(Te),{name:e.session.pinned?"unpin":"pin"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"]),j(p(pn),{text:p(o)("sidebar.archive")},{default:me(()=>[j(p(gn),{class:"archive-btn",size:"sm",label:p(o)("sidebar.archive"),onClick:It(te,["stop"])},{default:me(()=>[j(p(Te),{name:"archive"})]),_:1},8,["label"])]),_:1},8,["text"])]))])]),e.session.cwdLabel!==void 0?(y(),M("div",vve,[j(p(Te),{class:"sub-icon",name:"folder-closed",size:"sm"}),C("span",yve,N(e.session.cwdLabel),1),e.session.pullRequest?(y(),M("button",{key:0,type:"button",class:Re(["pr",`pr--${e.session.pullRequest.state}`]),"aria-label":`PR #${e.session.pullRequest.number}`,onClick:It(ce,["stop"])},[j(p(Te),{name:"git-pull-request",size:"sm"}),C("span",null,"#"+N(e.session.pullRequest.number),1)],10,kve)):ee("",!0)])):ee("",!0),(y(),he(Zr,{to:"body"},[j(as,{name:"menu-pop"},{default:me(()=>[v.value?(y(),he(p(Cl),{key:0,ref_key:"menuRef",ref:k,class:"menu",style:Zt(w.value),onClick:Se[5]||(Se[5]=It(()=>{},["stop"]))},{default:me(()=>[j(p(hn),{danger:Y.value,onClick:fe},{default:me(()=>[j(p(Te),{name:"copy",size:"sm"}),qe(" "+N(Y.value?p(o)("sidebar.copyFailed"):G.value?p(o)("sidebar.copied"):p(o)("sidebar.copySessionId")),1)]),_:1},8,["danger"]),j(p(hn),{separator:""}),j(p(hn),{onClick:le},{default:me(()=>[j(p(Te),{name:"pencil",size:"sm"}),qe(" "+N(p(o)("sidebar.rename")),1)]),_:1}),j(p(hn),{onClick:U},{default:me(()=>[j(p(Te),{name:"emoji",size:"sm"}),qe(" "+N(p(o)("sidebar.setEmoji")),1)]),_:1}),j(p(hn),{onClick:we},{default:me(()=>[j(p(Te),{name:"git-fork",size:"sm"}),qe(" "+N(p(o)("sidebar.fork")),1)]),_:1}),j(p(hn),{onClick:ge},{default:me(()=>[j(p(Te),{name:"download",size:"sm"}),qe(" "+N(p(o)("sidebar.export")),1)]),_:1}),j(p(hn),{onClick:Q},{default:me(()=>[j(p(Te),{name:e.session.pinned?"unpin":"pin",size:"sm"},null,8,["name"]),qe(" "+N(e.session.pinned?p(o)("sidebar.unpin"):p(o)("sidebar.pin")),1)]),_:1}),j(p(hn),{onClick:te},{default:me(()=>[j(p(Te),{name:"archive",size:"sm"}),qe(" "+N(p(o)("sidebar.archive")),1)]),_:1}),j(p(hn),{separator:""}),C("div",bve,N(l.value),1)]),_:1},8,["style"])):ee("",!0)]),_:1})])),(y(),he(Zr,{to:"body"},[j(as,{name:"menu-pop"},{default:me(()=>[T.value?(y(),he(ive,{key:0,ref_key:"pickerRef",ref:A,class:"picker",style:Zt(E.value),current:x.value.emoji,removable:x.value.rest.length>0,onClick:Se[6]||(Se[6]=It(()=>{},["stop"])),onPick:z},null,8,["style","current","removable"])):ee("",!0)]),_:1})]))],34))}}),Z5=ft(Cve,[["__scopeId","data-v-341acfa2"]]),wve=["draggable"],_ve={class:"gh-top"},xve={class:"gh-name"},Sve=["inert"],Ave={key:0,class:"show-more-row"},Mve=["disabled"],Tve={class:"show-more-label"},Eve={key:1,class:"show-more-sep","aria-hidden":"true"},Ive={class:"show-more-label"},Lve={key:1,class:"group-empty"},$ve=et({__name:"WorkspaceGroup",props:{group:{},activeWorkspaceId:{},activeId:{},renamingId:{},renameValue:{},renameInputRef:{},pendingBySession:{},unreadBySession:{},wsMenuOpenId:{},dragging:{type:Boolean},isCollapsed:{type:Function},visibleLimit:{type:Function},pinnedDragSession:{}},emits:["groupClick","groupContextmenu","toggleWsMenu","createInWorkspace","selectSession","renameSession","archiveSession","forkSession","exportSession","pinSession","dropPinnedSession","expand","collapse","confirmRename","cancelRename","updateRenameValue","wsDragstart","wsDragend"],setup(e,{emit:t}){const{t:n}=Nt(),o=e,s=t,i=R({get:()=>o.renameValue,set:P=>s("updateRenameValue",P)}),r=Z(!1),l=R(()=>o.pinnedDragSession!=null),a=R(()=>o.pinnedDragSession?.workspaceId===o.group.workspace.id);function u(P){if(o.pinnedDragSession!=null){if(!a.value){P.dataTransfer&&(P.dataTransfer.dropEffect="none");return}P.preventDefault(),P.dataTransfer&&(P.dataTransfer.dropEffect="move"),r.value=!0}}function c(P){o.pinnedDragSession==null||!a.value||(P.preventDefault(),r.value=!1,s("dropPinnedSession",o.pinnedDragSession.id))}function d(P){P.currentTarget.contains(P.relatedTarget)||(r.value=!1)}const f=R(()=>o.visibleLimit(o.group.workspace.id)??o.group.initialCount),h=R(()=>{const P=o.group.sessions.slice(0,f.value);if(o.activeId&&!P.some(D=>D.id===o.activeId)){const D=o.group.sessions.find(I=>I.id===o.activeId);if(D)return[...P,D]}return P}),m=R(()=>o.group.sessions.length>f.value||o.group.hasMore||o.group.loadingMore),v=R(()=>f.value>o.group.initialCount);function k(P){o.renameInputRef.value=P instanceof HTMLInputElement?P:null}const{handleCompositionStart:w,handleCompositionEnd:b,isComposingKeyEvent:_}=Ar();function g(P){_(P)||s("confirmRename")}function x(P){_(P)||s("cancelRename")}const S=Z(null);function T(P){o.renamingId!==o.group.workspace.id&&s("groupContextmenu",o.group.workspace,P)}function A(P){P.dataTransfer&&(P.dataTransfer.effectAllowed="move",P.dataTransfer.setData("text/plain",o.group.workspace.id),s("wsDragstart",o.group.workspace.id))}function E(P,D){D.dataTransfer&&(D.dataTransfer.effectAllowed="move",D.dataTransfer.setData(Bf,P),D.dataTransfer.setData("text/plain",P))}return(P,D)=>(y(),M("div",{class:Re(["group",{dragging:e.dragging,"pinned-drag-active":l.value&&a.value,"pinned-drop-hover":r.value,"pinned-drop-blocked":l.value&&!a.value}]),onDragover:u,onDrop:c,onDragleave:d},[C("div",{class:Re(["gh",{on:e.group.workspace.id===e.activeWorkspaceId&&e.activeId==="",collapsed:e.isCollapsed(e.group.workspace.id)}]),draggable:e.renamingId!==e.group.workspace.id,onClick:D[7]||(D[7]=It(I=>s("groupClick",e.group.workspace.id,I),["stop"])),onContextmenu:T,onDragstart:A,onDragend:D[8]||(D[8]=I=>s("wsDragend"))},[C("div",_ve,[e.isCollapsed(e.group.workspace.id)?(y(),he(p(Te),{key:0,class:"gh-folder",name:"folder-closed"})):(y(),he(p(Te),{key:1,class:"gh-folder",name:"folder"})),e.renamingId!==e.group.workspace.id?(y(),he(p(pn),{key:2,text:e.group.workspace.root},{default:me(()=>[C("span",xve,N(e.group.workspace.name),1)]),_:1},8,["text"])):Bn((y(),M("input",{key:3,ref:k,"onUpdate:modelValue":D[0]||(D[0]=I=>i.value=I),class:"gh-rename",type:"text",onKeydown:[xl(g,["enter"]),xl(x,["esc"])],onCompositionstart:D[1]||(D[1]=(...I)=>p(w)&&p(w)(...I)),onCompositionend:D[2]||(D[2]=(...I)=>p(b)&&p(b)(...I)),onBlur:D[3]||(D[3]=I=>s("cancelRename")),onClick:D[4]||(D[4]=It(()=>{},["stop"]))},null,544)),[[ai,i.value]]),e.renamingId!==e.group.workspace.id?(y(),M("div",{key:4,class:Re(["gh-actions",{open:e.wsMenuOpenId===e.group.workspace.id}])},[j(p(gn),{class:Re(["gh-more",{open:e.wsMenuOpenId===e.group.workspace.id}]),size:"sm",label:p(n)("sidebar.options"),tooltip:p(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":e.wsMenuOpenId===e.group.workspace.id,onClick:D[5]||(D[5]=It(I=>s("toggleWsMenu",e.group.workspace,I),["stop"]))},{default:me(()=>[j(p(Te),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded"]),j(p(gn),{class:"gh-add",size:"sm",label:p(n)("workspace.newInGroup"),tooltip:p(n)("workspace.newInGroup"),onClick:D[6]||(D[6]=It(I=>s("createInWorkspace",e.group.workspace.id),["stop"]))},{default:me(()=>[j(p(Te),{name:"chat-new"})]),_:1},8,["label","tooltip"])],2)):ee("",!0)])],42,wve),C("div",{class:Re(["group-sessions",{collapsed:e.isCollapsed(e.group.workspace.id)}]),inert:e.isCollapsed(e.group.workspace.id)},[(y(!0),M(Pe,null,pt(h.value,I=>(y(),he(Z5,{key:I.id,session:I,active:I.id===e.activeId,"approval-count":e.pendingBySession[I.id]?.approvals??0,"question-count":e.pendingBySession[I.id]?.questions??0,unread:e.unreadBySession[I.id]??!1,draggable:S.value!==I.id,onDragstart:$=>E(I.id,$),onRenameStateChange:$=>S.value=$?I.id:null,onSelect:D[9]||(D[9]=$=>s("selectSession",$)),onRename:D[10]||(D[10]=($,B)=>s("renameSession",$,B)),onArchive:D[11]||(D[11]=$=>s("archiveSession",$)),onFork:D[12]||(D[12]=$=>s("forkSession",$)),onExport:D[13]||(D[13]=$=>s("exportSession",$)),onPin:D[14]||(D[14]=$=>s("pinSession",$))},null,8,["session","active","approval-count","question-count","unread","draggable","onDragstart","onRenameStateChange"]))),128)),m.value||v.value?(y(),M("div",Ave,[m.value?(y(),M("button",{key:0,class:"show-more",disabled:e.group.loadingMore,onClick:D[15]||(D[15]=It(I=>s("expand",e.group.workspace.id),["stop"]))},[j(p(Te),{name:"chevron-down",size:"sm"}),C("span",Tve,N(e.group.loadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.showMore")),1)],8,Mve)):ee("",!0),m.value&&v.value?(y(),M("span",Eve,"·")):ee("",!0),v.value?(y(),M("button",{key:2,class:"show-more",onClick:D[16]||(D[16]=It(I=>s("collapse",e.group.workspace.id),["stop"]))},[j(p(Te),{name:"chevron-up",size:"sm"}),C("span",Ive,N(p(n)("sidebar.showLess")),1)])):ee("",!0)])):ee("",!0),e.group.sessions.length===0?(y(),M("div",Lve,N(e.group.pinnedCount>0?p(n)("sidebar.allPinned",{count:e.group.pinnedCount}):p(n)("sidebar.noSessions")),1)):ee("",!0)],10,Sve)],34))}}),Nve=ft($ve,[["__scopeId","data-v-9586bfbe"]]),Fve={class:"pinned-label"},Rve={class:"pinned-title"},Ove={key:0,class:"pinned-rows"},Pve=["draggable","onDragstart","onDragover","onDrop"],Dve=et({__name:"PinnedSessionList",props:{sessions:{},activeId:{},pendingBySession:{},unreadBySession:{}},emits:["selectSession","renameSession","archiveSession","forkSession","exportSession","pinSession","pinSessionAt","sessionDragStart","sessionDragEnd","reorder"],setup(e,{expose:t,emit:n}){const{t:o}=Nt(),s=e,i=n,r=Z(kQ());function l(){r.value=!r.value,M3(r.value)}function a(){r.value&&(r.value=!1,M3(!1))}t({expand:a});const u=Z(null),c=Z(null),d=Z(null);function f(x,S){if(!S.dataTransfer)return;S.dataTransfer.effectAllowed="move",S.dataTransfer.setData("text/plain",x),u.value=x;const T=s.sessions.find(A=>A.id===x)?.workspaceId;T!==void 0&&i("sessionDragStart",x,T)}function h(){u.value=null,c.value=null,i("sessionDragEnd")}Je(()=>s.sessions,x=>{u.value!==null&&!x.some(S=>S.id===u.value)&&(u.value=null,c.value=null)});function m(x){const S=x.currentTarget.getBoundingClientRect();return x.clientYP.id),T,x,A));return}const E=S.dataTransfer?.getData(Bf);E&&i("pinSessionAt",E,x,A)}function b(x){if(u.value===null&&!v(x))return;x.preventDefault(),x.dataTransfer&&(x.dataTransfer.dropEffect="move");const S=s.sessions[s.sessions.length-1];S!==void 0&&(c.value={id:S.id,position:"after"})}function _(x){const S=s.sessions.map(E=>E.id),T=u.value;if(c.value=null,u.value=null,T!==null){const E=S[S.length-1];E!==void 0&&T!==E&&i("reorder",[...S.filter(P=>P!==T),T]);return}const A=x.dataTransfer?.getData(Bf);A&&i("pinSessionAt",A,S[S.length-1]??null,"after")}function g(x){x.currentTarget.contains(x.relatedTarget)||(c.value=null)}return(x,S)=>(y(),M("div",{class:"pinned",onDragover:b,onDrop:_,onDragleave:g},[C("div",Fve,[C("span",Rve,N(p(o)("sidebar.pinned")),1),j(p(gn),{class:Re(["pinned-toggle",{"pinned-toggle--on":r.value}]),size:"sm",label:r.value?p(o)("sidebar.expandPinned"):p(o)("sidebar.collapsePinned"),tooltip:r.value?p(o)("sidebar.expandPinned"):p(o)("sidebar.collapsePinned"),onClick:It(l,["stop"])},{default:me(()=>[r.value?(y(),he(p(Te),{key:0,name:"chevron-right"})):(y(),he(p(Te),{key:1,name:"chevron-down"}))]),_:1},8,["class","label","tooltip"])]),r.value?ee("",!0):(y(),M("div",Ove,[(y(!0),M(Pe,null,pt(e.sessions,T=>(y(),M("div",{key:T.id,class:Re(["pin-drop-target",{dragging:u.value===T.id,"drop-before":c.value?.id===T.id&&c.value.position==="before","drop-after":c.value?.id===T.id&&c.value.position==="after"}]),draggable:d.value!==T.id,onDragstart:A=>f(T.id,A),onDragend:h,onDragover:It(A=>k(A,T.id),["stop"]),onDrop:It(A=>w(T.id,A),["stop"])},[j(Z5,{session:T,active:T.id===e.activeId,"approval-count":e.pendingBySession[T.id]?.approvals??0,"question-count":e.pendingBySession[T.id]?.questions??0,unread:e.unreadBySession[T.id]??!1,onRenameStateChange:A=>d.value=A?T.id:null,onSelect:S[0]||(S[0]=A=>i("selectSession",A)),onRename:S[1]||(S[1]=(A,E)=>i("renameSession",A,E)),onArchive:S[2]||(S[2]=A=>i("archiveSession",A)),onFork:S[3]||(S[3]=A=>i("forkSession",A)),onExport:S[4]||(S[4]=A=>i("exportSession",A)),onPin:S[5]||(S[5]=A=>i("pinSession",A))},null,8,["session","active","approval-count","question-count","unread","onRenameStateChange"])],42,Pve))),128))]))],32))}}),Bve=ft(Dve,[["__scopeId","data-v-aec340eb"]]),Hve={class:"ch"},zve={class:"ch-brand"},Wve={class:"ch-tail"},Uve={class:"search-input"},jve={class:"side-section-label"},Vve={class:"side-section-title"},qve={class:"side-section-actions"},Kve={key:0,class:"empty"},Zve=["onDragover","onDrop"],Gve={key:0,class:"empty"},Yve={key:1,class:"show-more-row"},Xve=["disabled"],Jve={class:"show-more-label"},Qve={class:"folder-drop-card"},e9e={class:"view-menu-label"},t9e={class:"view-menu-check"},n9e={class:"view-menu-check"},o9e=!1,s9e=1e3,i9e=et({__name:"Sidebar",props:{activeWorkspace:{default:null},activeWorkspaceId:{default:null},sessions:{},groups:{},pinnedSessions:{default:()=>[]},flatSessions:{default:()=>[]},flatHasMore:{type:Boolean,default:!1},flatLoadingMore:{type:Boolean,default:!1},initialized:{type:Boolean,default:!1},activeId:{},attentionBySession:{default:()=>({})},pendingBySession:{default:()=>({})},unreadBySession:{default:()=>({})},colWidth:{default:220},collapsed:{type:Boolean,default:!1},dragging:{type:Boolean,default:!1}},emits:["select","create","createInWorkspace","selectWorkspace","addWorkspace","addWorkspacePaths","rename","archive","fork","export","pin","reorderPinned","pinAt","unpin","renameWorkspace","deleteWorkspace","reorderWorkspaces","loadMoreSessions","loadAllSessions","ensureFlatSessions","loadMoreFlatSessions","openSettings","login","collapse"],setup(e,{emit:t}){const{t:n}=Nt(),o=e,s=t,i=Z(!1),r=c()?["⌘","K"]:["Ctrl","K"],l=c()?["⌃","⇧","O"]:["Ctrl","Shift","O"];function a(){s("loadAllSessions"),i.value=!0}function u(Qe){(Qe.metaKey||Qe.ctrlKey)&&(Qe.key.toLowerCase()==="k"?(Qe.preventDefault(),a()):!Qe.metaKey&&Qe.ctrlKey&&Qe.shiftKey&&Qe.key.toLowerCase()==="o"&&(Qe.preventDefault(),s("create")))}dn(()=>window.addEventListener("keydown",u)),Vn(()=>window.removeEventListener("keydown",u));function c(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const Qe=navigator.userAgentData;return Qe?.platform==="macOS"||Qe?.platform==="iOS"}const d=Z(null),f=Z(!1),h=Z(!1),m=Z(!1);let v=null;function k(Qe=d.value){Qe&&(f.value=Qe.scrollTop>0,h.value=Qe.scrollTop+Qe.clientHeight{m.value=!1,v=null},900)}let b=null;dn(()=>{yt(()=>{k(),typeof ResizeObserver=="function"&&d.value&&(b=new ResizeObserver(()=>k()),b.observe(d.value))})}),Dp(()=>k()),Vn(()=>{b?.disconnect(),v&&clearTimeout(v)});const _=Z(new Set(yQ()));function g(Qe){return _.value.has(Qe)}function x(Qe){const st=new Set(_.value);st.has(Qe)?st.delete(Qe):st.add(Qe),_.value=st,p9(st)}function S(){const Qe=new Set(o.groups.map(st=>st.workspace.id));_.value=Qe,p9(Qe)}function T(){const Qe=new Set;_.value=Qe,p9(Qe)}const A=R(()=>o.groups.length>0&&o.groups.every(Qe=>_.value.has(Qe.workspace.id))),E=Z(new Map);function P(Qe){return E.value.get(Qe)}function D(Qe){const st=o.groups.find(kn=>kn.workspace.id===Qe);if(!st)return;const Ct=(E.value.get(Qe)??st.initialCount)+O5,Qt=new Map(E.value);Qt.set(Qe,Ct),E.value=Qt,st.sessions.lengthkn.workspace.id),st,Qe,Ct);s("reorderWorkspaces",Qt)}const W=Z(null);function K(Qe,st){W.value={id:Qe,workspaceId:st}}function V(){W.value=null}function ie(Qe){W.value=null,s("unpin",Qe)}const ne=Z(bQ());function X(Qe){ne.value!==Qe&&(ne.value=Qe,CQ(Qe),Qe==="flat"&&s("ensureFlatSessions"))}Je(()=>o.initialized,Qe=>{Qe&&ne.value==="flat"&&s("ensureFlatSessions")},{immediate:!0});const le=Z(!1),Ie=Z({}),de=Z(null);function pe(Qe){const st=Qe.target;st.closest(".view-menu")||st.closest(".side-section-view")||oe()}async function ve(Qe){if(le.value){oe();return}const st=Qe.currentTarget;le.value=!0,document.addEventListener("mousedown",pe),window.addEventListener("resize",oe),await yt();const Ct=de.value?.el,Qt=st.getBoundingClientRect(),kn=4,Ko=8,Eo=Ct?.offsetHeight??0,bo=Ct?.offsetWidth??0;let Ns=Qt.bottom+kn,Do=!1;Ns+Eo>window.innerHeight-Ko&&(Ns=Math.max(Ko,Qt.top-Eo-kn),Do=!0);let Io=Qt.right-bo;IoSn.value?.focus())}function Cn(){const Qe=Tt.value,st=Bt.value.trim();Qe&&st&&st!==Yt.value&&s("renameWorkspace",Qe,st),Tt.value=null}function Mn(){Tt.value=null}function We(Qe){Bt.value=Qe}const tt=Z(!1),Ue=Z(null),Lt=Z({}),gt=Z(null);function wn(Qe){gt.value?.el&&!gt.value.el.contains(Qe.target)&&go()}function yn(Qe,st){st.preventDefault(),st.stopPropagation(),Ue.value=Qe,Lt.value={top:`${st.clientY}px`,left:`${st.clientX}px`,transformOrigin:"top left","--menu-pop-shift":"-2px"},tt.value=!0,document.addEventListener("mousedown",wn,!0)}function go(){tt.value=!1,document.removeEventListener("mousedown",wn,!0),Ue.value=null}function qt(){Ue.value&&Zs(Ue.value.root),go()}function ps(){Ue.value&&en(Ue.value.id,Ue.value.name),go()}function xs(){const Qe=Ue.value;Qe&&(go(),s("deleteWorkspace",Qe.id))}const _n=Z(null),In=Z(null),To=Z({}),lo=Z(null);function St(Qe){const st=Qe.target;st.closest(".gh-more")||st.closest(".ws-menu")||Jo()}async function hs(Qe,st){if(_n.value===Qe.id){Jo();return}const Ct=st.currentTarget;In.value=Qe,_n.value=Qe.id,document.addEventListener("mousedown",St),window.addEventListener("resize",Jo),await yt();const Qt=lo.value?.el,kn=Ct.getBoundingClientRect(),Ko=4,Eo=8,bo=Qt?.offsetHeight??0,Ns=Qt?.offsetWidth??0;let Do=kn.bottom+Ko,Io=!1;Do+bo>window.innerHeight-Eo&&(Do=Math.max(Eo,kn.top-bo-Ko),Io=!0);let Qo=kn.right-Ns;Qo{document.removeEventListener("mousedown",wn,!0),document.removeEventListener("mousedown",St),document.removeEventListener("mousedown",pe),window.removeEventListener("resize",Jo),window.removeEventListener("resize",oe)});const no=Z(null);let $s;function Xs(){const Qe=no.value;Qe&&(Qe.classList.remove("blink-now"),Qe.getBoundingClientRect(),Qe.classList.add("blink-now"),clearTimeout($s),$s=setTimeout(()=>Qe.classList.remove("blink-now"),300))}const ci=zr(()=>jo(()=>import("./DesignSystemView-CTUhpkDe.js"),__vite__mapDeps([8,9]))),Oo=Z(!1);let vo,Po=!1;function co(Qe){Po=!1,clearTimeout(vo),Qe.currentTarget.setPointerCapture?.(Qe.pointerId),vo=setTimeout(()=>{Po=!0,Oo.value=!0},s9e)}function Tn(Qe){clearTimeout(vo);const st=Qe.currentTarget;st.hasPointerCapture?.(Qe.pointerId)&&st.releasePointerCapture(Qe.pointerId)}function fo(){if(Po){Po=!1;return}Xs()}return Vn(()=>{clearTimeout(vo)}),(Qe,st)=>(y(),M("aside",{class:Re(["side",{"macos-desktop":p(rc),collapsed:e.collapsed,"no-anim":e.dragging}]),style:Zt({width:e.collapsed?"0px":e.colWidth+"px"})},[C("div",{class:"col",style:Zt({width:e.colWidth+"px"}),onDragenter:Fe,onDragover:Oe,onDragleave:Ge,onDrop:at},[C("div",Hve,[C("div",zve,[p(rc)?ee("",!0):(y(),M(Pe,{key:0},[(y(),M("svg",{ref_key:"logoRef",ref:no,class:"ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:fo,onPointerdown:co,onPointerup:Tn,onPointercancel:Tn},[...st[31]||(st[31]=[iu('',2)])],544)),st[32]||(st[32]=C("span",{class:"ch-name"},"Kimi Code",-1))],64))]),C("div",Wve,[p(rc)?ee("",!0):(y(),he(p(gn),{key:0,class:"ch-collapse",size:"sm",label:p(n)("sidebar.collapseSidebar"),tooltip:p(n)("sidebar.collapseSidebar"),onClick:st[0]||(st[0]=It(Ct=>s("collapse"),["stop"]))},{default:me(()=>[j(p(Te),{name:"panel-collapse"})]),_:1},8,["label","tooltip"])),j(b0e)])]),C("div",{class:Re(["sidebar-actions",{"sidebar-actions--has-workspace-action":o9e}])},[C("button",{class:"btn-new-chat",type:"button",onClick:st[1]||(st[1]=It(Ct=>s("create"),["stop"]))},[j(p(Te),{name:"chat-new"}),C("span",null,N(p(n)("sidebar.newChat")),1),j(p(oa),{keys:p(l)},null,8,["keys"])]),ee("",!0),C("button",{class:"search",type:"button",onClick:a},[j(p(Te),{class:"search-icon",name:"search"}),C("span",Uve,N(p(n)("sidebar.search")),1),j(p(oa),{keys:p(r)},null,8,["keys"])])],2),ne.value==="flat"||e.groups.length>0?(y(),M("div",{key:0,class:Re(["sessions-head",{"sessions-head--scrolled":f.value}])},[e.pinnedSessions.length>0?(y(),he(Bve,{key:0,ref_key:"pinnedListRef",ref:ue,sessions:e.pinnedSessions,"active-id":e.activeId,"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,onSelectSession:ce,onRenameSession:st[3]||(st[3]=(Ct,Qt)=>s("rename",Ct,Qt)),onArchiveSession:st[4]||(st[4]=Ct=>s("archive",Ct)),onForkSession:st[5]||(st[5]=Ct=>s("fork",Ct)),onExportSession:st[6]||(st[6]=Ct=>s("export",Ct)),onPinSession:Se,onPinSessionAt:ze,onSessionDragStart:K,onSessionDragEnd:V,onReorder:st[7]||(st[7]=Ct=>s("reorderPinned",Ct))},null,8,["sessions","active-id","pending-by-session","unread-by-session"])):ee("",!0),C("div",jve,[C("span",Vve,N(p(n)("sidebar.sessionsHeader")),1),C("div",qve,[ne.value==="grouped"?(y(),he(p(gn),{key:0,class:"side-section-toggle",size:"sm",label:A.value?p(n)("sidebar.expandAll"):p(n)("sidebar.collapseAll"),tooltip:A.value?p(n)("sidebar.expandAll"):p(n)("sidebar.collapseAll"),onClick:st[8]||(st[8]=It(Ct=>A.value?T():S(),["stop"]))},{default:me(()=>[A.value?(y(),he(p(Te),{key:0,name:"expand"})):(y(),he(p(Te),{key:1,name:"collapse"}))]),_:1},8,["label","tooltip"])):ee("",!0),j(p(pn),{text:p(n)("sidebar.viewSwitcher")},{default:me(()=>[j(p(gn),{class:"side-section-toggle side-section-view",size:"sm",label:p(n)("sidebar.viewSwitcher"),onClick:It(ve,["stop"])},{default:me(()=>[j(p(Te),{name:"list-settings"})]),_:1},8,["label"])]),_:1},8,["text"])])])],2)):ee("",!0),C("div",{ref_key:"sessionsEl",ref:d,class:Re(["sessions",{scrolling:m.value,"pinned-drag-active":ne.value==="flat"&&W.value!==null,"flat-pinned-drop-hover":fe.value}]),onScroll:w,onDragover:we,onDrop:ge,onDragleave:Q},[ne.value==="grouped"?(y(),M(Pe,{key:0},[e.groups.length===0?(y(),M("div",Kve,N(p(n)("workspace.noWorkspace")),1)):(y(!0),M(Pe,{key:1},pt(e.groups,Ct=>(y(),M("div",{key:Ct.workspace.id,class:Re(["ws-drop-target",{"drop-before":B.value?.id===Ct.workspace.id&&B.value.position==="before","drop-after":B.value?.id===Ct.workspace.id&&B.value.position==="after"}]),onDragover:Qt=>U(Qt,Ct.workspace.id),onDrop:Qt=>z(Ct.workspace.id)},[j(Nve,{group:Ct,"active-workspace-id":e.activeWorkspaceId,"active-id":e.activeId,"renaming-id":Tt.value,"rename-value":Bt.value,"rename-input-ref":on(),"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"ws-menu-open-id":_n.value,dragging:$.value===Ct.workspace.id,"is-collapsed":g,"visible-limit":P,"pinned-drag-session":W.value,onGroupClick:te,onGroupContextmenu:yn,onToggleWsMenu:hs,onCreateInWorkspace:st[9]||(st[9]=Qt=>s("createInWorkspace",Qt)),onSelectSession:ce,onRenameSession:st[10]||(st[10]=(Qt,kn)=>s("rename",Qt,kn)),onArchiveSession:st[11]||(st[11]=Qt=>s("archive",Qt)),onForkSession:st[12]||(st[12]=Qt=>s("fork",Qt)),onExportSession:st[13]||(st[13]=Qt=>s("export",Qt)),onPinSession:Se,onDropPinnedSession:ie,onExpand:D,onCollapse:I,onConfirmRename:Cn,onCancelRename:Mn,onUpdateRenameValue:We,onWsDragstart:H,onWsDragend:O},null,8,["group","active-workspace-id","active-id","renaming-id","rename-value","rename-input-ref","pending-by-session","unread-by-session","ws-menu-open-id","dragging","pinned-drag-session"])],42,Zve))),128))],64)):(y(),M(Pe,{key:1},[(y(!0),M(Pe,null,pt(e.flatSessions,Ct=>(y(),he(Z5,{key:Ct.id,session:Ct,active:Ct.id===e.activeId,"approval-count":e.pendingBySession[Ct.id]?.approvals??0,"question-count":e.pendingBySession[Ct.id]?.questions??0,unread:e.unreadBySession[Ct.id]??!1,draggable:G.value!==Ct.id,onDragstart:Qt=>Y(Ct.id,Qt),onRenameStateChange:Qt=>G.value=Qt?Ct.id:null,onSelect:ce,onRename:st[14]||(st[14]=(Qt,kn)=>s("rename",Qt,kn)),onArchive:st[15]||(st[15]=Qt=>s("archive",Qt)),onFork:st[16]||(st[16]=Qt=>s("fork",Qt)),onExport:st[17]||(st[17]=Qt=>s("export",Qt)),onPin:Se},null,8,["session","active","approval-count","question-count","unread","draggable","onDragstart","onRenameStateChange"]))),128)),e.flatSessions.length===0&&!e.flatHasMore&&e.pinnedSessions.length===0?(y(),M("div",Gve,N(p(n)("sidebar.noSessions")),1)):ee("",!0),e.flatHasMore?(y(),M("div",Yve,[C("button",{class:"show-more",disabled:e.flatLoadingMore,onClick:st[18]||(st[18]=It(Ct=>s("loadMoreFlatSessions"),["stop"]))},[C("span",Jve,N(e.flatLoadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.loadMore")),1),j(p(Te),{name:"chevron-down",size:"sm"})],8,Xve)])):ee("",!0)],64))],34),C("div",{class:Re(["side-footer",{"side-footer--shadowed":h.value}])},[j(V2e,{onLogin:st[19]||(st[19]=Ct=>s("login")),onOpenSettings:st[20]||(st[20]=Ct=>s("openSettings"))})],2),C("div",{class:Re(["folder-drop-overlay",{show:Ee.value}]),"aria-hidden":"true"},[C("div",Qve,[j(p(Te),{name:"folder",size:"lg"}),C("span",null,N(p(n)("sidebar.dropToAddWorkspace")),1)])],2)],36),j(as,{name:"menu-pop"},{default:me(()=>[tt.value?(y(),he(p(Cl),{key:0,ref_key:"ghMenuRef",ref:gt,class:"gh-menu",style:Zt(Lt.value),onClick:st[21]||(st[21]=It(()=>{},["stop"]))},{default:me(()=>[j(p(hn),{onClick:qt},{default:me(()=>[j(p(Te),{name:"copy",size:"sm"}),qe(" "+N(p(n)("sidebar.copyPath")),1)]),_:1}),j(p(hn),{class:"workspace-rename-item",onClick:ps},{default:me(()=>[j(p(Te),{name:"pencil",size:"sm"}),qe(" "+N(p(n)("sidebar.rename")),1)]),_:1}),j(p(hn),{danger:"",onClick:xs},{default:me(()=>[j(p(Te),{name:"close",size:"sm"}),qe(" "+N(p(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):ee("",!0)]),_:1}),j(as,{name:"menu-pop"},{default:me(()=>[_n.value!==null&&In.value?(y(),he(p(Cl),{key:0,ref_key:"wsMenuRef",ref:lo,class:"ws-menu",style:Zt(To.value),onClick:st[25]||(st[25]=It(()=>{},["stop"]))},{default:me(()=>[j(p(hn),{onClick:st[22]||(st[22]=Ct=>uo(In.value))},{default:me(()=>[j(p(Te),{name:"copy",size:"sm"}),qe(" "+N(p(n)("sidebar.copyPath")),1)]),_:1}),j(p(hn),{class:"workspace-rename-item",onClick:st[23]||(st[23]=Ct=>Ys(In.value))},{default:me(()=>[j(p(Te),{name:"pencil",size:"sm"}),qe(" "+N(p(n)("sidebar.rename")),1)]),_:1}),j(p(hn),{danger:"",onClick:st[24]||(st[24]=Ct=>Nn(In.value))},{default:me(()=>[j(p(Te),{name:"close",size:"sm"}),qe(" "+N(p(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):ee("",!0)]),_:1}),j(as,{name:"menu-pop"},{default:me(()=>[le.value?(y(),he(p(Cl),{key:0,ref_key:"viewMenuRef",ref:de,class:"view-menu",style:Zt(Ie.value),onClick:st[28]||(st[28]=It(()=>{},["stop"]))},{default:me(()=>[C("div",e9e,N(p(n)("sidebar.viewGroup")),1),j(p(hn),{onClick:st[26]||(st[26]=Ct=>ye("flat"))},{default:me(()=>[j(p(Te),{name:"list",size:"sm"}),qe(" "+N(p(n)("sidebar.viewFlat"))+" ",1),C("span",t9e,[ne.value==="flat"?(y(),he(p(Te),{key:0,name:"check",size:"sm"})):ee("",!0)])]),_:1}),j(p(hn),{onClick:st[27]||(st[27]=Ct=>ye("grouped"))},{default:me(()=>[j(p(Te),{name:"tree-view",size:"sm"}),qe(" "+N(p(n)("sidebar.viewGrouped"))+" ",1),C("span",n9e,[ne.value==="grouped"?(y(),he(p(Te),{key:0,name:"check",size:"sm"})):ee("",!0)])]),_:1})]),_:1},8,["style"])):ee("",!0)]),_:1}),i.value?(y(),he(uee,{key:0,sessions:e.sessions,"active-id":e.activeId,onSelect:ce,onClose:st[29]||(st[29]=Ct=>i.value=!1)},null,8,["sessions","active-id"])):ee("",!0),(y(),he(Zr,{to:"body"},[Oo.value?(y(),he(p(ci),{key:0,onClose:st[30]||(st[30]=Ct=>Oo.value=!1)})):ee("",!0)]))],6))}}),r9e=ft(i9e,[["__scopeId","data-v-a80a4ba6"]]),l9e=["aria-label"],a9e=et({__name:"ResizeHandle",props:{storageKey:{},defaultWidth:{},min:{},max:{},reverse:{type:Boolean},ariaLabel:{},applyLive:{}},emits:["update:width","update:dragging"],setup(e,{emit:t}){const n=e,o=t,{t:s}=Nt(),{width:i,dragging:r,cursor:l,onPointerDown:a}=She({storageKey:n.storageKey,defaultWidth:n.defaultWidth,min:n.min,max:()=>n.max,reverse:n.reverse,applyLive:n.applyLive});return o("update:width",i.value),Je(i,u=>o("update:width",u)),Je(r,u=>o("update:dragging",u)),(u,c)=>(y(),M("div",{class:Re(["rh",{dragging:p(r)}]),style:Zt({cursor:p(l)}),role:"separator","aria-orientation":"vertical","aria-label":e.ariaLabel??p(s)("layout.resizeHandleAria"),onPointerdown:c[0]||(c[0]=(...d)=>p(a)&&p(a)(...d))},[...c[1]||(c[1]=[C("span",{class:"rh-bar","aria-hidden":"true"},null,-1)])],46,l9e))}}),Zx=ft(a9e,[["__scopeId","data-v-1c6dfdc5"]]),u9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c9e(e,t){return y(),M("svg",u9e,[...t[0]||(t[0]=[C("path",{d:"M12.0684 2.03418C12.5654 2.03421 12.9687 2.43755 12.9688 2.93457V11.0996H21.0654C21.5625 11.0996 21.9658 11.503 21.9658 12C21.9658 12.497 21.5625 12.9004 21.0654 12.9004H12.9688V21.0654C12.9687 21.5624 12.5654 21.9658 12.0684 21.9658C11.5713 21.9658 11.168 21.5625 11.168 21.0654V12.9004H2.93457C2.43751 12.9004 2.03418 12.4971 2.03418 12C2.03418 11.5029 2.43751 11.0996 2.93457 11.0996H11.168V2.93457C11.168 2.43753 11.5713 2.03418 12.0684 2.03418Z",fill:"currentColor"},null,-1)])])}const d9e=kt({name:"kimi-add",render:c9e}),f9e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function p9e(e,t){return y(),M("svg",f9e,[...t[0]||(t[0]=[C("path",{id:"p0",d:"M 0 -9.9 C -5.468 -9.9 -9.9 -5.468 -9.9 0 C -9.9 1.923 -9.351 3.719 -8.402 5.239 C -8.402 5.239 -9.483 7.821 -9.483 7.821 C -9.896 8.809 -9.171 9.9 -8.099 9.9 C -8.099 9.9 0 9.9 0 9.9 C 5.468 9.9 9.9 5.468 9.9 0 C 9.9 -5.468 5.468 -9.9 0 -9.9 Z M -8.1 0 C -8.1 -4.474 -4.474 -8.1 0 -8.1 C 4.473 -8.1 8.1 -4.474 8.1 0 C 8.1 4.473 4.473 8.1 -0.001 8.1 C -0.001 8.1 -7.648 8.1 -7.648 8.1 L -6.365 5.035 C -6.365 5.035 -6.648 4.629 -6.648 4.629 C -7.563 3.317 -8.1 1.723 -8.1 0 Z",transform:"matrix(1 0 0 1 12 12)",fill:"currentColor","fill-rule":"evenodd"},null,-1),C("path",{id:"p1",d:"M 3.6 0.5 L -2.6 0.5 M 0.5 -2.573 L 0.5 3.573",transform:"translate(11.5 11.5)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"},null,-1)])])}const h9e=kt({name:"kimi-add-conversation",render:p9e}),m9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g9e(e,t){return y(),M("svg",m9e,[...t[0]||(t[0]=[C("path",{d:"M15.0996 12C15.5967 12 16 12.4033 16 12.9004C15.9998 13.3973 15.5965 13.7998 15.0996 13.7998H8.90039C8.40346 13.7998 8.00021 13.3973 8 12.9004C8 12.4033 8.40333 12 8.90039 12H15.0996Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 3.2002C20.5464 3.2002 21.7998 4.4536 21.7998 6V7C21.7998 8.03565 21.2363 8.93754 20.4004 9.42188V17C20.4004 19.1539 18.6539 20.9004 16.5 20.9004H7.5C5.34609 20.9004 3.59961 19.1539 3.59961 17V9.42188C2.76374 8.93754 2.2002 8.03565 2.2002 7V6C2.2002 4.4536 3.4536 3.2002 5 3.2002H19ZM5.40039 17C5.40039 18.1598 6.3402 19.0996 7.5 19.0996H16.5C17.6598 19.0996 18.5996 18.1598 18.5996 17V9.7998H5.40039V17ZM4.89746 5.00488C4.39333 5.05621 4 5.48232 4 6V7L4.00488 7.10254C4.05278 7.57297 4.42703 7.94722 4.89746 7.99512L5 8H19C19.5523 8 20 7.55228 20 7V6C20 5.44772 19.5523 5 19 5H5L4.89746 5.00488Z",fill:"currentColor"},null,-1)])])}const v9e=kt({name:"kimi-archive",render:g9e}),y9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k9e(e,t){return y(),M("svg",y9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 21.6387C11.7378 21.988 12.3059 21.987 12.6565 21.6364L18.1949 16.098C18.5464 15.7465 18.5464 15.1766 18.1949 14.8252C17.8434 14.4737 17.2736 14.4737 16.9221 14.8252L12.9201 18.8272V3.00002C12.9201 2.50297 12.5171 2.10003 12.0201 2.10003C11.523 2.10003 11.1201 2.50297 11.1201 3.00002V18.8383L7.07554 14.8229C6.7228 14.4727 6.15295 14.4747 5.80275 14.8275C5.45255 15.1802 5.45461 15.7501 5.80735 16.1003L11.386 21.6387Z",fill:"currentColor"},null,-1)])])}const b9e=kt({name:"kimi-arrow-down",render:k9e}),C9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function w9e(e,t){return y(),M("svg",C9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.16127 12.814C1.81197 12.4622 1.81299 11.8941 2.16357 11.5435L7.70203 6.00506C8.0535 5.65359 8.62335 5.65359 8.97482 6.00506C9.32629 6.35653 9.32629 6.92638 8.97482 7.27785L4.97276 11.2799H20.8C21.297 11.2799 21.7 11.6829 21.7 12.1799C21.7 12.677 21.297 13.0799 20.8 13.0799H4.96171L8.97712 17.1244C9.32732 17.4772 9.32526 18.047 8.97252 18.3972C8.61978 18.7474 8.04993 18.7454 7.69973 18.3926L2.16127 12.814Z",fill:"currentColor"},null,-1)])])}const _9e=kt({name:"kimi-arrow-left",render:w9e}),x9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function S9e(e,t){return y(),M("svg",x9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.4387 12.814C21.788 12.4622 21.787 11.8941 21.4364 11.5436L15.8979 6.0051C15.5464 5.65363 14.9766 5.65363 14.6251 6.0051C14.2737 6.35657 14.2737 6.92642 14.6251 7.27789L18.6272 11.28H2.79998C2.30293 11.28 1.89998 11.6829 1.89998 12.18C1.89998 12.677 2.30293 13.08 2.79998 13.08H18.6382L14.6228 17.1245C14.2726 17.4772 14.2747 18.0471 14.6274 18.3973C14.9802 18.7475 15.55 18.7454 15.9002 18.3927L21.4387 12.814Z",fill:"currentColor"},null,-1)])])}const A9e=kt({name:"kimi-arrow-right",render:S9e}),M9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T9e(e,t){return y(),M("svg",M9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 2.36129C11.7378 2.01198 12.3059 2.013 12.6565 2.36358L18.1949 7.90204C18.5464 8.25351 18.5464 8.82336 18.1949 9.17483C17.8434 9.52631 17.2736 9.52631 16.9221 9.17483L12.9201 5.17277V21C12.9201 21.497 12.5171 21.9 12.0201 21.9C11.523 21.9 11.1201 21.497 11.1201 21V5.16172L7.07554 9.17713C6.7228 9.52733 6.15295 9.52527 5.80275 9.17253C5.45255 8.81979 5.45461 8.24995 5.80735 7.89975L11.386 2.36129Z",fill:"currentColor"},null,-1)])])}const E9e=kt({name:"kimi-arrow-up",render:T9e}),I9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L9e(e,t){return y(),M("svg",I9e,[...t[0]||(t[0]=[C("path",{d:"M19.3027 5.9053C19.6542 5.55397 20.2247 5.55388 20.5761 5.9053C20.9273 6.25675 20.9273 6.82734 20.5761 7.17874L9.65911 18.0948C9.30773 18.4461 8.73814 18.446 8.38665 18.0948L3.42376 13.1328C3.0726 12.7814 3.07263 12.2118 3.42376 11.8604C3.77524 11.509 4.34575 11.5089 4.6972 11.8604L9.02239 16.1856L19.3027 5.9053Z",fill:"currentColor"},null,-1)])])}const $9e=kt({name:"kimi-check",render:L9e}),N9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F9e(e,t){return y(),M("svg",N9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 16.7134C11.743 17.0627 12.3111 17.0617 12.6617 16.7111L19.6364 9.73641C19.9878 9.38494 19.9878 8.81509 19.6364 8.46362C19.2849 8.11215 18.7151 8.11215 18.3636 8.46362L12.023 14.8042L5.63407 8.46132C5.28133 8.11112 4.71149 8.11318 4.36129 8.46592C4.01109 8.81866 4.01314 9.3885 4.36588 9.73871L11.3912 16.7134Z",fill:"currentColor"},null,-1)])])}const R9e=kt({name:"kimi-chevron-down",render:F9e}),O9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P9e(e,t){return y(),M("svg",O9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.1261 12.6088C16.4754 12.257 16.4743 11.6889 16.1238 11.3383L9.14904 4.36363C8.79757 4.01216 8.22772 4.01216 7.87625 4.36363C7.52477 4.7151 7.52477 5.28495 7.87625 5.63642L14.2169 11.977L7.87395 18.3659C7.52375 18.7187 7.52581 19.2885 7.87855 19.6387C8.23129 19.9889 8.80113 19.9869 9.15133 19.6341L16.1261 12.6088Z",fill:"currentColor"},null,-1)])])}const D9e=kt({name:"kimi-chevron-right",render:P9e}),B9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H9e(e,t){return y(),M("svg",B9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 8.46132C11.743 8.11202 12.3111 8.11304 12.6617 8.46362L19.6364 15.4383C19.9878 15.7898 19.9878 16.3597 19.6364 16.7111C19.2849 17.0626 18.7151 17.0626 18.3636 16.7111L12.023 10.3705L5.63407 16.7134C5.28133 17.0636 4.71149 17.0616 4.36129 16.7088C4.01109 16.3561 4.01314 15.7862 4.36588 15.436L11.3912 8.46132Z",fill:"currentColor"},null,-1)])])}const z9e=kt({name:"kimi-chevron-up",render:H9e}),W9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U9e(e,t){return y(),M("svg",W9e,[...t[0]||(t[0]=[C("path",{d:"M11.8999 6.79965C12.397 6.79965 12.7997 7.20235 12.7997 7.69941V11.7266L14.7359 13.6629C15.0873 14.0143 15.0879 14.584 14.7366 14.9355C14.3852 15.287 13.8148 15.287 13.4633 14.9355L11.2632 12.7355C11.0947 12.5668 11.0002 12.338 11.0001 12.0995V7.69941C11.0001 7.20238 11.4029 6.7997 11.8999 6.79965Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 1.89893C17.4677 1.89893 21.9001 6.33147 21.9002 11.7991C21.9002 17.2669 17.4678 21.6993 12 21.6993C6.53228 21.6993 2.09985 17.2669 2.09985 11.7991C2.09998 6.33147 6.53236 1.89893 12 1.89893ZM20.1 11.7998C20.1 7.32616 16.4737 3.69984 12 3.69984C7.5264 3.69984 3.90008 7.32616 3.90008 11.7998C3.90032 16.2732 7.52655 19.8998 12 19.8998C16.4735 19.8998 20.0998 16.2732 20.1 11.7998Z",fill:"currentColor"},null,-1)])])}const j9e=kt({name:"kimi-clock",render:U9e}),V9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function q9e(e,t){return y(),M("svg",V9e,[...t[0]||(t[0]=[C("path",{d:"M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z",fill:"currentColor"},null,-1)])])}const K9e=kt({name:"kimi-close",render:q9e}),Z9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G9e(e,t){return y(),M("svg",Z9e,[...t[0]||(t[0]=[C("path",{d:"M9.85815 11.957C10.9074 11.957 11.7583 12.8083 11.7585 13.8574V19.8574C11.7585 20.3545 11.3552 20.7578 10.8582 20.7578C10.3611 20.7578 9.95776 20.3545 9.95776 19.8574V13.8574C9.95755 13.8024 9.91325 13.7578 9.85815 13.7578H3.85815C3.3611 13.7578 2.95776 13.3545 2.95776 12.8574C2.95798 12.3605 3.36123 11.957 3.85815 11.957H9.85815Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8582 2.95703C13.3551 2.95703 13.7583 3.36054 13.7585 3.85742V9.85742C13.7585 9.91265 13.8029 9.95703 13.8582 9.95703H19.8582C20.3551 9.95703 20.7583 10.3605 20.7585 10.8574C20.7585 11.3545 20.3552 11.7578 19.8582 11.7578H13.8582C12.8088 11.7578 11.9578 10.9068 11.9578 9.85742V3.85742C11.958 3.36054 12.3612 2.95703 12.8582 2.95703Z",fill:"currentColor"},null,-1)])])}const Y9e=kt({name:"kimi-collapse",render:G9e}),X9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J9e(e,t){return y(),M("svg",X9e,[...t[0]||(t[0]=[C("path",{d:"M11.9004 2.19995C17.3678 2.20016 21.7998 6.63285 21.7998 12.1003C21.7996 17.5677 17.3677 21.9995 11.9004 21.9998H3.80078C2.72946 21.9996 2.00334 20.9089 2.41699 19.9207L3.49805 17.3386C2.54871 15.8189 2.00007 14.0226 2 12.1003C2 6.63272 6.43277 2.19995 11.9004 2.19995ZM11.9004 3.99976C7.42688 3.99976 3.7998 7.62684 3.7998 12.1003C3.79989 13.8228 4.33669 15.4175 5.25195 16.7292L5.53516 17.1345L4.25195 20.2H11.8994C16.3727 20.1999 19.9998 16.5736 20 12.1003C20 7.62697 16.3737 3.99997 11.9004 3.99976ZM8.9541 10.8005C9.75473 10.8006 10.4041 11.4491 10.4043 12.2498C10.4043 13.0505 9.75482 13.6998 8.9541 13.7C8.15329 13.7 7.50391 13.0506 7.50391 12.2498C7.50406 11.4491 8.15339 10.8005 8.9541 10.8005ZM15.1533 10.8005C15.9539 10.8006 16.6034 11.4491 16.6035 12.2498C16.6035 13.0505 15.954 13.6998 15.1533 13.7C14.3525 13.7 13.7031 13.0506 13.7031 12.2498C13.7033 11.4491 14.3526 10.8005 15.1533 10.8005Z",fill:"currentColor"},null,-1)])])}const Q9e=kt({name:"kimi-comment",render:J9e}),e4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function t4e(e,t){return y(),M("svg",e4e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 7.09961C19.1539 7.09961 20.9004 8.84609 20.9004 11V17C20.9004 19.1539 19.1539 20.9004 17 20.9004H11C8.84609 20.9004 7.09961 19.1539 7.09961 17V11C7.09961 8.84609 8.84609 7.09961 11 7.09961H17ZM11 8.90039C9.8402 8.90039 8.90039 9.8402 8.90039 11V17C8.90039 18.1598 9.8402 19.0996 11 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V11C19.0996 9.8402 18.1598 8.90039 17 8.90039H11Z",fill:"currentColor"},null,-1),C("path",{d:"M13 3.09961C14.4447 3.09961 15.705 3.88644 16.3779 5.0498C16.6265 5.47999 16.4789 6.03049 16.0488 6.2793C15.6186 6.52781 15.0681 6.38029 14.8193 5.9502C14.4548 5.32041 13.776 4.90039 13 4.90039H7C5.8402 4.90039 4.90039 5.8402 4.90039 7V13C4.90039 13.776 5.32041 14.4548 5.9502 14.8193C6.38029 15.0681 6.52781 15.6186 6.2793 16.0488C6.03049 16.4789 5.47999 16.6265 5.0498 16.3779C3.88644 15.705 3.09961 14.4447 3.09961 13V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H13Z",fill:"currentColor"},null,-1)])])}const n4e=kt({name:"kimi-copy",render:t4e}),o4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s4e(e,t){return y(),M("svg",o4e,[...t[0]||(t[0]=[C("path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.2797 2.43414 8.66074 3.19922 7.24707C3.20172 7.24246 3.20453 7.23801 3.20703 7.2334C3.33385 6.99995 3.47181 6.77351 3.61621 6.55176C3.73214 6.37355 3.85079 6.19744 3.97754 6.02734C5.35905 4.17471 7.36856 2.81959 9.68945 2.27051C9.69952 2.26813 9.70965 2.26602 9.71973 2.26367C9.85224 2.23276 9.98563 2.2043 10.1201 2.17871C10.1542 2.17221 10.1884 2.16631 10.2227 2.16016C10.3466 2.13791 10.4712 2.11724 10.5967 2.09961C10.6301 2.09489 10.6637 2.0913 10.6973 2.08691C10.8216 2.07073 10.9465 2.05552 11.0723 2.04395C11.1125 2.04022 11.153 2.0384 11.1934 2.03516C11.4595 2.0139 11.7284 2 12 2ZM11.9941 3.7998C11.9968 3.86623 12 3.93292 12 4C12 6.76142 9.76142 9 7 9C6.14209 9 5.33517 8.78324 4.62988 8.40234C4.09862 9.48861 3.7998 10.7093 3.7998 12C3.7998 12.4438 3.83644 12.8791 3.9043 13.3037C4.52807 12.5673 5.45945 12.0996 6.5 12.0996C8.37777 12.0996 9.90039 13.6222 9.90039 15.5C9.90039 17.0702 8.83532 18.3903 7.38867 18.7812C8.70267 19.6765 10.2901 20.2002 12 20.2002C12.468 20.2002 12.9264 20.1583 13.373 20.083C13.1323 19.4342 13 18.7327 13 18C13 14.6863 15.6863 12 19 12C19.4098 12 19.8098 12.0416 20.1963 12.1201C20.1969 12.0801 20.2002 12.0401 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998H11.9941ZM19 13.7998C16.6804 13.7998 14.7998 15.6804 14.7998 18C14.7998 18.5617 14.9112 19.0972 15.1113 19.5869C17.5225 18.597 19.3558 16.4929 19.9727 13.9141C19.6605 13.8399 19.3349 13.7998 19 13.7998ZM6.5 13.9004C5.61634 13.9004 4.90039 14.6163 4.90039 15.5C4.90039 16.3837 5.61634 17.0996 6.5 17.0996C7.38366 17.0996 8.09961 16.3837 8.09961 15.5C8.09961 14.6163 7.38366 13.9004 6.5 13.9004ZM15.5 6.09961C16.8255 6.09961 17.9004 7.17452 17.9004 8.5C17.9004 9.82548 16.8255 10.9004 15.5 10.9004C14.1745 10.9004 13.0996 9.82548 13.0996 8.5C13.0996 7.17452 14.1745 6.09961 15.5 6.09961ZM15.5 7.90039C15.1686 7.90039 14.9004 8.16863 14.9004 8.5C14.9004 8.83137 15.1686 9.09961 15.5 9.09961C15.8314 9.09961 16.0996 8.83137 16.0996 8.5C16.0996 8.16863 15.8314 7.90039 15.5 7.90039ZM10.1992 4C8.35326 4.41375 6.74333 5.44923 5.59961 6.87598C6.02235 7.08306 6.49716 7.2002 7 7.2002C8.76731 7.2002 10.1992 5.76731 10.1992 4Z",fill:"currentColor"},null,-1)])])}const i4e=kt({name:"kimi-dark-mode",render:s4e}),r4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function l4e(e,t){return y(),M("svg",r4e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.90002C12.4971 2.90002 12.9 3.30297 12.9 3.80002V12.2939L15.8081 9.38585C16.1595 9.03438 16.7294 9.03438 17.0808 9.38585C17.4323 9.73732 17.4323 10.3072 17.0808 10.6586L12.6364 15.1031C12.4676 15.2719 12.2387 15.3667 12 15.3667C11.7613 15.3667 11.5324 15.2719 11.3636 15.1031L6.91917 10.6586C6.5677 10.3072 6.5677 9.73732 6.91917 9.38585C7.27064 9.03438 7.84049 9.03438 8.19196 9.38585L11.1 12.2939V3.80002C11.1 3.30297 11.503 2.90002 12 2.90002ZM4.00001 13.5874C4.49706 13.5874 4.90001 13.9903 4.90001 14.4874V18.043C4.90001 18.2758 4.99249 18.499 5.1571 18.6636C5.32172 18.8282 5.54498 18.9207 5.77778 18.9207H18.2222C18.455 18.9207 18.6783 18.8283 18.8429 18.6636C19.0075 18.499 19.1 18.2758 19.1 18.043V14.4874C19.1 13.9903 19.5029 13.5874 20 13.5874C20.4971 13.5874 20.9 13.9903 20.9 14.4874V18.043C20.9 18.7531 20.6179 19.4342 20.1157 19.9364C19.6135 20.4386 18.9324 20.7207 18.2222 20.7207H5.77778C5.06759 20.7207 4.38649 20.4386 3.88431 19.9364C3.38213 19.4342 3.10001 18.7531 3.10001 18.043V14.4874C3.10001 13.9903 3.50295 13.5874 4.00001 13.5874Z",fill:"currentColor"},null,-1)])])}const a4e=kt({name:"kimi-download",render:l4e}),u4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c4e(e,t){return y(),M("svg",u4e,[...t[0]||(t[0]=[C("path",{d:"M18.0179 3.09998C18.3963 3.10003 18.7709 3.17491 19.1205 3.31971C19.4701 3.46454 19.7884 3.67614 20.056 3.94373C20.3237 4.21144 20.5362 4.52965 20.681 4.87928C20.8258 5.22887 20.8997 5.60423 20.8997 5.9828C20.8997 6.36118 20.8257 6.73591 20.681 7.08533C20.5362 7.43497 20.3237 7.75317 20.056 8.02088L17.639 10.4379L9.15756 18.9183C8.5296 19.5463 7.74274 19.992 6.8812 20.2074L4.21811 20.8734C3.91148 20.95 3.5871 20.8596 3.36362 20.6361C3.14017 20.4126 3.05063 20.0883 3.12729 19.7816L3.79233 17.1185C4.00771 16.257 4.45344 15.4701 5.08139 14.8422L15.9798 3.94373C16.5203 3.40346 17.2536 3.09998 18.0179 3.09998ZM19.0003 19.1C19.4972 19.1002 19.8997 19.5034 19.8997 20.0004C19.8995 20.4971 19.4971 20.8996 19.0003 20.8998H12.0003C11.5034 20.8998 11.1001 20.4973 11.0999 20.0004C11.0999 19.5033 11.5033 19.1 12.0003 19.1H19.0003ZM18.0179 4.89979C17.7309 4.89979 17.4553 5.01417 17.2523 5.21717L6.35385 16.1146C5.95661 16.5119 5.67469 17.01 5.53842 17.5551L5.23666 18.7631L6.44467 18.4613C6.98971 18.3251 7.48782 18.0431 7.8851 17.6459L18.7826 6.74744C18.883 6.64702 18.9635 6.52821 19.0179 6.39686C19.0723 6.26558 19.0999 6.1247 19.0999 5.9828C19.0999 5.84075 19.0723 5.69916 19.0179 5.56776C18.9635 5.43645 18.883 5.31757 18.7826 5.21717C18.6821 5.11678 18.5631 5.03716 18.432 4.9828C18.3008 4.92845 18.16 4.89983 18.0179 4.89979Z",fill:"currentColor"},null,-1)])])}const d4e=kt({name:"kimi-edit",render:c4e}),f4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function p4e(e,t){return y(),M("svg",f4e,[...t[0]||(t[0]=[C("path",{d:"M5 11.0996C5.49693 11.0996 5.90018 11.5031 5.90039 12V18C5.90039 18.0552 5.94477 18.0996 6 18.0996H12C12.4969 18.0996 12.9002 18.5031 12.9004 19C12.9004 19.4971 12.4971 19.9004 12 19.9004H6C4.95066 19.9004 4.09961 19.0493 4.09961 18V12C4.09982 11.5031 4.50307 11.0996 5 11.0996ZM18 4.09961C19.0492 4.09961 19.9002 4.95084 19.9004 6V12C19.9004 12.4971 19.4971 12.9004 19 12.9004C18.5029 12.9004 18.0996 12.4971 18.0996 12V6C18.0994 5.94495 18.0551 5.90039 18 5.90039H12C11.5029 5.90039 11.0996 5.49706 11.0996 5C11.0998 4.50312 11.5031 4.09961 12 4.09961H18Z",fill:"currentColor"},null,-1)])])}const h4e=kt({name:"kimi-expand",render:p4e}),m4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g4e(e,t){return y(),M("svg",m4e,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1723 2.1001C13.9413 2.10018 14.6793 2.40592 15.2231 2.94971L19.0512 6.77783C19.595 7.32162 19.9007 8.0596 19.9008 8.82861V18.0005C19.9008 20.1544 18.1543 21.9009 16.0004 21.9009H8.0004C5.84649 21.9009 4.10001 20.1544 4.10001 18.0005V6.00049C4.10001 3.84658 5.84649 2.1001 8.0004 2.1001H13.1723ZM8.0004 3.90088C6.8406 3.90088 5.90079 4.84069 5.90079 6.00049V18.0005C5.90079 19.1603 6.8406 20.1001 8.0004 20.1001H16.0004C17.1602 20.1001 18.1 19.1603 18.1 18.0005V9.90088H15.0004C13.3988 9.90088 12.1 8.60211 12.1 7.00049V3.90088H8.0004ZM13.9008 7.00049C13.9008 7.608 14.3929 8.1001 15.0004 8.1001H17.8217C17.8072 8.08375 17.7933 8.06681 17.7777 8.05127L13.9496 4.22314C13.9339 4.20745 13.9173 4.19286 13.9008 4.17822V7.00049Z",fill:"currentColor"})],-1)])])}const Gx=kt({name:"kimi-file",render:g4e}),v4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y4e(e,t){return y(),M("svg",v4e,[...t[0]||(t[0]=[C("path",{d:"M15.4795 15.4971C15.9765 15.4971 16.3799 15.9004 16.3799 16.3975C16.3799 16.8945 15.9765 17.2978 15.4795 17.2979H8.52051C8.02345 17.2979 7.62012 16.8945 7.62012 16.3975C7.62012 15.9004 8.02345 15.4971 8.52051 15.4971H15.4795Z",fill:"currentColor"},null,-1),C("path",{d:"M12.3359 11.0996C12.8329 11.0997 13.2354 11.503 13.2354 12C13.2354 12.497 12.8329 12.9003 12.3359 12.9004H8.52051C8.02345 12.9004 7.62012 12.4971 7.62012 12C7.62012 11.5029 8.02345 11.0996 8.52051 11.0996H12.3359Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1719 2.09961C13.9408 2.09969 14.6789 2.40555 15.2227 2.94922L19.0508 6.77734C19.5946 7.32113 19.9003 8.05911 19.9004 8.82812V18C19.9004 20.1539 18.1539 21.9004 16 21.9004H8C5.84626 21.9002 4.09961 20.1538 4.09961 18V6C4.09961 3.84621 5.84626 2.09981 8 2.09961H13.1719ZM8 3.90039C6.84037 3.90059 5.90039 4.84032 5.90039 6V18C5.90039 19.1597 6.84037 20.0994 8 20.0996H16C17.1598 20.0996 18.0996 19.1598 18.0996 18V9.90039H15C13.3985 9.90019 12.0996 8.6015 12.0996 7V3.90039H8ZM13.9004 7C13.9004 7.60739 14.3927 8.09941 15 8.09961H17.8213C17.8068 8.08333 17.7928 8.06626 17.7773 8.05078L13.9492 4.22266C13.9335 4.20696 13.9169 4.19237 13.9004 4.17773V7Z",fill:"currentColor"},null,-1)])])}const k4e=kt({name:"kimi-file-text",render:y4e}),b4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C4e(e,t){return y(),M("svg",b4e,[...t[0]||(t[0]=[C("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 w4e=kt({name:"kimi-folder",render:C4e}),_4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x4e(e,t){return y(),M("svg",_4e,[...t[0]||(t[0]=[C("g",null,[C("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"})],-1)])])}const S4e=kt({name:"kimi-folder-open",render:x4e}),A4e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function M4e(e,t){return y(),M("svg",A4e,[...t[0]||(t[0]=[C("path",{id:"af-p0",d:"M -2.619 -8.3 C -1.815 -8.3 -1.048 -7.97 -0.499 -7.39 C -0.499 -7.39 0.141 -6.712 0.141 -6.712 C 0.141 -6.712 5.75 -6.712 5.75 -6.712 C 7.904 -6.712 9.65 -4.986 9.65 -2.858 C 9.65 -2.858 9.65 -1.71 9.65 -1.71 C 9.65 -1.219 9.247 -0.821 8.75 -0.821 C 8.253 -0.821 7.85 -1.219 7.85 -1.71 C 7.85 -1.71 7.85 -2.858 7.85 -2.858 C 7.849 -4.004 6.91 -4.934 5.75 -4.934 C 5.75 -4.934 -0.207 -4.934 -0.207 -4.934 C -0.484 -4.934 -0.749 -5.047 -0.938 -5.247 C -0.938 -5.247 -1.815 -6.177 -1.815 -6.177 C -2.023 -6.397 -2.315 -6.521 -2.619 -6.521 C -2.619 -6.521 -6.25 -6.521 -6.25 -6.521 C -7.41 -6.521 -8.35 -5.592 -8.35 -4.446 C -8.35 -4.446 -8.35 4.446 -8.35 4.446 C -8.35 5.592 -7.41 6.521 -6.25 6.521 C -6.25 6.521 1.25 6.521 1.25 6.521 C 1.747 6.521 2.15 6.919 2.15 7.41 C 2.15 7.901 1.747 8.3 1.25 8.3 C 1.25 8.3 -6.25 8.3 -6.25 8.3 C -8.404 8.3 -10.15 6.574 -10.15 4.446 C -10.15 4.446 -10.15 -4.446 -10.15 -4.446 C -10.15 -6.574 -8.404 -8.3 -6.25 -8.3 C -6.25 -8.3 -2.619 -8.3 -2.619 -8.3 Z M 3.75 -2.5 C 4.247 -2.5 4.65 -2.097 4.65 -1.6 C 4.65 -1.103 4.247 -0.699 3.75 -0.699 C 3.75 -0.699 -4.25 -0.699 -4.25 -0.699 C -4.747 -0.699 -5.15 -1.103 -5.15 -1.6 C -5.15 -2.097 -4.747 -2.5 -4.25 -2.5 C -4.25 -2.5 3.75 -2.5 3.75 -2.5 Z",transform:"matrix(1 0 0 1 11.75 12)",fill:"currentColor"},null,-1),C("g",{id:"af-p1"},[C("path",{d:"M 2.635 0 L -2.635 0 M 0 -2.635 L 0 2.635",transform:"matrix(1 0 0 1 18.4 16.3)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1)])])}const T4e=kt({name:"kimi-folder-plus",render:M4e}),E4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I4e(e,t){return y(),M("svg",E4e,[...t[0]||(t[0]=[C("path",{d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 19.2002C15.9764 19.2002 19.2002 15.9764 19.2002 12C19.2002 8.02355 15.9764 4.7998 12 4.7998V19.2002Z",fill:"currentColor"},null,-1)])])}const L4e=kt({name:"kimi-follow-system",render:I4e}),$4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function N4e(e,t){return y(),M("svg",$4e,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7ZM12 15.6992C12.4968 15.6992 12.8994 16.1028 12.8994 16.5996C12.8994 17.0964 12.4968 17.5 12 17.5C11.5024 17.5 11.0996 17.0964 11.0996 16.5996C11.0996 16.1028 11.5024 15.6992 12 15.6992ZM12 6.49902C12.4969 6.49922 12.8994 6.86908 12.8994 7.3252V13.6729C12.8994 14.129 12.4969 14.4988 12 14.499C11.5029 14.499 11.0996 14.1291 11.0996 13.6729V7.3252C11.0996 6.86896 11.5029 6.49902 12 6.49902Z",fill:"currentColor"},null,-1)])])}const F4e=kt({name:"kimi-full-access",render:N4e}),R4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O4e(e,t){return y(),M("svg",R4e,[...t[0]||(t[0]=[C("path",{d:"M12.5092 2.11279C17.7402 2.37781 21.8998 6.70364 21.8998 12.0005C21.8996 17.4153 17.5524 21.8108 12.1576 21.895C12.1056 21.898 12.0532 21.8999 12.0004 21.8999C11.948 21.8999 11.8954 21.8968 11.8432 21.896L11.8422 21.895C6.44751 21.8107 2.10022 17.4152 2.10001 12.0005C2.10001 6.53287 6.53278 2.1001 12.0004 2.1001L12.5092 2.11279ZM8.92715 13.0005C9.02896 14.9787 9.42581 16.721 9.99356 17.9985C10.3249 18.7441 10.6971 19.292 11.0639 19.6411C11.4259 19.9855 11.741 20.1001 12.0004 20.1001C12.2598 20.1 12.5749 19.9856 12.9369 19.6411C13.3037 19.292 13.6749 18.7441 14.0063 17.9985C14.574 16.721 14.9718 14.9788 15.0736 13.0005H8.92715ZM3.96329 13.0005C4.31462 15.8522 6.14714 18.2427 8.66837 19.3823C8.55544 19.1733 8.44916 18.9552 8.34903 18.73C7.66574 17.1926 7.22657 15.1926 7.12344 13.0005H3.96329ZM16.8764 13.0005C16.7732 15.1926 16.3341 17.1926 15.6508 18.73C15.5506 18.9554 15.4435 19.1732 15.3305 19.3823C17.8522 18.2429 19.6851 15.8525 20.0365 13.0005H16.8764ZM8.66934 4.6167C6.08869 5.78266 4.22826 8.25964 3.93985 11.1997H7.11661C7.20176 8.92954 7.64512 6.85497 8.34903 5.271C8.4494 5.04516 8.5561 4.82619 8.66934 4.6167ZM12.0004 3.8999C11.7411 3.8999 11.4259 4.01454 11.0639 4.35889C10.6971 4.70797 10.3249 5.25587 9.99356 6.00146C9.40671 7.32188 9.00186 9.13885 8.91739 11.1997H15.0834C14.9989 9.13884 14.5931 7.32189 14.0063 6.00146C13.6749 5.2559 13.3037 4.70796 12.9369 4.35889C12.5749 4.0144 12.2598 3.90002 12.0004 3.8999ZM15.3295 4.61572C15.443 4.82559 15.5502 5.04471 15.6508 5.271C16.3547 6.85498 16.799 8.92949 16.8842 11.1997H20.06C19.7715 8.25914 17.9108 5.78143 15.3295 4.61572Z",fill:"currentColor"},null,-1)])])}const P4e=kt({name:"kimi-globe",render:O4e}),D4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B4e(e,t){return y(),M("svg",D4e,[...t[0]||(t[0]=[C("path",{d:"M8 17C8.82834 17 9.5 17.6717 9.5 18.5C9.5 19.3283 8.82834 20 8 20C7.17166 20 6.5 19.3283 6.5 18.5C6.5 17.6717 7.17166 17 8 17ZM16 17C16.8283 17 17.5 17.6717 17.5 18.5C17.5 19.3283 16.8283 20 16 20C15.1717 20 14.5 19.3283 14.5 18.5C14.5 17.6717 15.1717 17 16 17ZM8 10.5C8.82834 10.5 9.5 11.1717 9.5 12C9.5 12.8283 8.82834 13.5 8 13.5C7.17166 13.5 6.5 12.8283 6.5 12C6.5 11.1717 7.17166 10.5 8 10.5ZM16 10.5C16.8283 10.5 17.5 11.1717 17.5 12C17.5 12.8283 16.8283 13.5 16 13.5C15.1717 13.5 14.5 12.8283 14.5 12C14.5 11.1717 15.1717 10.5 16 10.5ZM8 4C8.82834 4 9.5 4.67166 9.5 5.5C9.5 6.32834 8.82834 7 8 7C7.17166 7 6.5 6.32834 6.5 5.5C6.5 4.67166 7.17166 4 8 4ZM16 4C16.8283 4 17.5 4.67166 17.5 5.5C17.5 6.32834 16.8283 7 16 7C15.1717 7 14.5 6.32834 14.5 5.5C14.5 4.67166 15.1717 4 16 4Z",fill:"currentColor"},null,-1)])])}const H4e=kt({name:"kimi-grip",render:B4e}),z4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function W4e(e,t){return y(),M("svg",z4e,[...t[0]||(t[0]=[C("path",{d:"M7.22264 6.10352C7.22264 5.5078 7.48259 4.95449 7.91405 4.56055C8.34271 4.16918 8.90831 3.96198 9.48241 3.96191C9.64155 3.96191 9.80001 3.97936 9.95507 4.01074C10.0127 3.5042 10.2586 3.04178 10.6338 2.69922C11.0625 2.30778 11.6279 2.09961 12.2021 2.09961C12.7763 2.09966 13.3418 2.30783 13.7705 2.69922C13.9947 2.90401 14.1709 3.15244 14.29 3.42676C14.4947 3.37044 14.7071 3.34182 14.9209 3.3418C15.4951 3.3418 16.0605 3.549 16.4892 3.94043C16.8644 4.28293 17.1093 4.74548 17.167 5.25195C17.3223 5.22045 17.4812 5.20312 17.6406 5.20312C18.2147 5.20318 18.7803 5.41135 19.209 5.80273C19.6402 6.19663 19.9004 6.74922 19.9004 7.34473V14.6543C19.9004 17.413 19.2914 19.0434 18.0137 20.21C16.82 21.2998 15.2175 21.9004 13.5615 21.9004C11.7538 21.9004 10.2315 21.5696 8.95702 20.8535C7.67664 20.1341 6.71683 19.0652 5.97362 17.708L3.3496 12.916C3.18848 12.6213 3.10112 12.2914 3.0996 11.9531C3.09812 11.6147 3.18309 11.2835 3.34179 10.9873C3.5001 10.692 3.72639 10.4416 3.99706 10.251C4.26771 10.0604 4.57776 9.93235 4.90136 9.87305C5.56617 9.75102 6.25934 9.84517 6.86425 10.1445C6.9942 10.2088 7.11461 10.2788 7.22264 10.3477V6.10352ZM9.02343 12.7969C9.02336 13.1912 8.76624 13.5395 8.38964 13.6562C8.0129 13.773 7.60387 13.6309 7.38085 13.3057L6.53514 12.0723C6.51218 12.0529 6.48411 12.0282 6.45018 12.002C6.34595 11.9213 6.20986 11.8289 6.06639 11.7578C5.81525 11.6335 5.51637 11.5904 5.22655 11.6436H5.22557C5.15055 11.6573 5.08558 11.6865 5.03417 11.7227C4.98289 11.7588 4.94815 11.7998 4.92772 11.8379C4.90762 11.8755 4.90023 11.9122 4.90038 11.9453C4.90057 11.9782 4.9084 12.0144 4.9287 12.0518L7.55272 16.8438C8.16912 17.9693 8.90989 18.7622 9.83886 19.2842C10.7737 19.8094 11.9704 20.0996 13.5615 20.0996C14.7902 20.0996 15.9536 19.6533 16.7998 18.8809C17.5619 18.185 18.0996 17.1383 18.0996 14.6543V7.34473C18.0996 7.28204 18.0734 7.20342 17.9951 7.13184C17.9139 7.05771 17.7875 7.00396 17.6406 7.00391C17.4937 7.00391 17.3674 7.05771 17.2861 7.13184C17.2077 7.20347 17.1807 7.28199 17.1807 7.34473V11.0693C17.1805 11.5661 16.778 11.9685 16.2812 11.9688C15.7843 11.9688 15.381 11.5662 15.3808 11.0693V5.48242C15.3808 5.41973 15.3537 5.34107 15.2754 5.26953C15.1941 5.19547 15.0677 5.1416 14.9209 5.1416C14.774 5.14166 14.6476 5.19541 14.5664 5.26953C14.4881 5.34105 14.462 5.41974 14.4619 5.48242V11.0693C14.4617 11.5662 14.0584 11.9688 13.5615 11.9688C13.0646 11.9687 12.6613 11.5662 12.6611 11.0693V4.24121C12.6611 4.17852 12.635 4.09989 12.5566 4.02832C12.4754 3.95419 12.349 3.90045 12.2021 3.90039C12.0552 3.90039 11.9289 3.95421 11.8476 4.02832C11.7692 4.09992 11.7422 4.17849 11.7422 4.24121V11.0693C11.742 11.5661 11.3395 11.9685 10.8428 11.9688C10.3458 11.9688 9.94257 11.5662 9.94237 11.0693V6.10352L9.93651 6.05371C9.92534 6.00177 9.89573 5.94433 9.8369 5.89062C9.75567 5.81647 9.62938 5.76172 9.48241 5.76172C9.33554 5.76179 9.2091 5.81651 9.12792 5.89062C9.04964 5.96222 9.02343 6.04084 9.02343 6.10352V12.7969Z",fill:"currentColor"},null,-1)])])}const U4e=kt({name:"kimi-hand",render:W4e}),j4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function V4e(e,t){return y(),M("svg",j4e,[...t[0]||(t[0]=[C("path",{d:"M4 3.33203C4.55224 3.33203 4.99993 3.7798 5 4.33203V18.0908H20.0674C20.6195 18.0908 21.0671 18.5388 21.0674 19.0908C21.0674 19.6431 20.6197 20.0908 20.0674 20.0908H5C3.89543 20.0908 3 19.1954 3 18.0908V4.33203C3.00007 3.7798 3.44776 3.33203 4 3.33203ZM8.19922 9.28418C8.7515 9.28418 9.19922 9.73189 9.19922 10.2842V15.6045C9.19908 16.1567 8.75142 16.6045 8.19922 16.6045C7.64719 16.6043 7.19936 16.1565 7.19922 15.6045V10.2842C7.19922 9.73202 7.6471 9.28438 8.19922 9.28418ZM17.2227 6.85645C17.7748 6.85658 18.2226 7.3043 18.2227 7.85645V15.6045C18.2225 16.1566 17.7747 16.6044 17.2227 16.6045C16.6705 16.6045 16.2228 16.1566 16.2227 15.6045V7.85645C16.2227 7.30422 16.6704 6.85645 17.2227 6.85645ZM12.7109 3.96387C13.2631 3.96387 13.7107 4.41175 13.7109 4.96387V15.6035C13.7109 16.1558 13.2632 16.6035 12.7109 16.6035C12.1587 16.6035 11.7109 16.1558 11.7109 15.6035V4.96387C11.7111 4.41175 12.1588 3.96387 12.7109 3.96387Z",fill:"currentColor"},null,-1)])])}const q4e=kt({name:"kimi-histogram",render:V4e}),K4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Z4e(e,t){return y(),M("svg",K4e,[...t[0]||(t[0]=[C("path",{d:"M8.00916 7.50488C8.47326 7.50488 8.91828 7.68943 9.24646 8.01758C9.57465 8.34577 9.75916 8.79075 9.75916 9.25488C9.75916 9.71901 9.57465 10.164 9.24646 10.4922C8.91828 10.8203 8.47326 11.0049 8.00916 11.0049C7.54507 11.0049 7.10001 10.8203 6.77185 10.4922C6.4437 10.164 6.25916 9.71898 6.25916 9.25488C6.25916 8.79078 6.4437 8.34576 6.77185 8.01758C7.10001 7.68942 7.54507 7.50492 8.00916 7.50488Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8998 4.09961C20.0537 4.09961 21.8002 5.84609 21.8002 8V16C21.8002 18.1539 20.0537 19.9004 17.8998 19.9004H5.89978C3.74598 19.9003 1.99939 18.1538 1.99939 16V8C1.99939 5.84617 3.74598 4.09974 5.89978 4.09961H17.8998ZM15.4867 12.2539C15.448 12.2184 15.3885 12.2192 15.351 12.2559L11.7338 15.8027C11.0146 16.5079 9.87305 16.5222 9.13708 15.835L6.98669 13.8262C6.95049 13.7924 6.89516 13.791 6.85681 13.8223L3.82361 16.2988C3.96873 17.3168 4.84165 18.0995 5.89978 18.0996H17.8998C18.9375 18.0996 19.7964 17.3466 19.9662 16.3574L15.4867 12.2539ZM5.89978 5.90039C4.74009 5.90052 3.80017 6.84028 3.80017 8V14.002L5.73181 12.4238C6.46046 11.8286 7.51253 11.8634 8.20056 12.5059L10.351 14.5146C10.3897 14.5508 10.4498 14.5497 10.4877 14.5127L14.1049 10.9658C14.819 10.2656 15.9506 10.2466 16.6879 10.9219L19.9994 13.9551V8C19.9994 6.8402 19.0596 5.90039 17.8998 5.90039H5.89978Z",fill:"currentColor"},null,-1)])])}const G4e=kt({name:"kimi-image",render:Z4e}),Y4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function X4e(e,t){return y(),M("svg",Y4e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.09375 2.81174C5.4825 2.50796 6.04376 2.56488 6.34766 2.93869L20.1855 19.9602C20.4895 20.3341 20.421 20.8836 20.0322 21.1877C19.6435 21.4917 19.0823 21.4355 18.7783 21.0617L17.9971 20.1008H5.99609C3.84224 20.1008 2.0958 18.3552 2.0957 16.2014V8.13889C2.09589 6.26755 3.41429 4.70428 5.17285 4.32639L4.93945 4.03928C4.63577 3.66536 4.7051 3.11573 5.09375 2.81174ZM7.13184 14.1096C7.09416 14.0738 7.03659 14.0713 6.99609 14.1037L3.92871 16.5569C4.09761 17.5472 4.95753 18.301 5.99609 18.301H16.5342L13.373 14.4133L11.9072 15.9455C11.1531 16.7324 9.92202 16.7621 9.13281 16.0119L7.13184 14.1096ZM5.99609 6.03928C4.83643 6.03928 3.89669 6.97927 3.89648 8.13889V14.1408L5.83496 12.5901C6.60469 11.9742 7.69929 12.022 8.41504 12.7024L10.416 14.6037C10.4575 14.6431 10.5218 14.642 10.5615 14.6008L12.1641 12.926L9.78906 10.0051C9.70282 10.2646 9.55682 10.5038 9.35645 10.7004C9.02202 11.0285 8.56767 11.2131 8.09473 11.2131C7.62195 11.213 7.1683 11.0284 6.83398 10.7004C6.49961 10.3724 6.31152 9.92701 6.31152 9.46311C6.3116 8.99941 6.49981 8.55474 6.83398 8.22678C7.12986 7.93654 7.51931 7.75901 7.93262 7.7219L6.56543 6.03928H5.99609Z",fill:"currentColor"},null,-1),C("path",{d:"M18.0049 4.31272C20.1587 4.31288 21.9043 6.0593 21.9043 8.21311V13.718C21.9039 15.4743 19.7248 16.2906 18.5713 14.966L14.9141 10.7658C14.5882 10.3912 14.6278 9.82271 15.002 9.49631C15.3768 9.16994 15.9451 9.20948 16.2715 9.5842L19.9287 13.7844C19.9528 13.812 19.9696 13.8167 19.9775 13.8186C19.9908 13.8216 20.0141 13.8213 20.04 13.8117C20.0655 13.8021 20.0826 13.7875 20.0908 13.7766C20.0955 13.7702 20.1044 13.7552 20.1045 13.718V8.21311C20.1045 7.05341 19.1645 6.11366 18.0049 6.1135H10.6328C10.1361 6.11327 9.73267 5.70981 9.73242 5.21311C9.73242 4.71619 10.136 4.31295 10.6328 4.31272H18.0049Z",fill:"currentColor"},null,-1)])])}const J4e=kt({name:"kimi-image-failed",render:X4e}),Q4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e3e(e,t){return y(),M("svg",Q4e,[...t[0]||(t[0]=[C("path",{d:"M12 2.1001C17.4676 2.10031 21.8994 6.53286 21.8994 12.0005C21.8992 17.4679 17.4674 21.8997 12 21.8999C6.53237 21.8999 2.09982 17.4681 2.09961 12.0005C2.09961 6.53273 6.53224 2.1001 12 2.1001ZM12 3.8999C7.52636 3.8999 3.89941 7.52684 3.89941 12.0005C3.89963 16.474 7.52649 20.1001 12 20.1001C16.4733 20.0999 20.0994 16.4738 20.0996 12.0005C20.0996 7.52697 16.4735 3.90011 12 3.8999ZM12 9.50049C12.4969 9.50068 12.8994 9.87055 12.8994 10.3267V16.6743C12.8992 17.1303 12.4968 17.5003 12 17.5005C11.503 17.5005 11.0998 17.1304 11.0996 16.6743V10.3267C11.0996 9.87043 11.5029 9.50049 12 9.50049ZM12 6.49951C12.4968 6.49951 12.8994 6.90313 12.8994 7.3999C12.8992 7.8965 12.4966 8.30029 12 8.30029C11.5025 8.30028 11.0998 7.8965 11.0996 7.3999C11.0996 6.90313 11.5024 6.49952 12 6.49951Z",fill:"currentColor"},null,-1)])])}const t3e=kt({name:"kimi-info",render:e3e}),n3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function o3e(e,t){return y(),M("svg",n3e,[...t[0]||(t[0]=[iu('',10)])])}const s3e=kt({name:"kimi-keyboard",render:o3e}),i3e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function r3e(e,t){return y(),M("svg",i3e,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const l3e=kt({name:"kimi-left-panel",render:r3e}),a3e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function u3e(e,t){return y(),M("svg",a3e,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow-expand",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const c3e=kt({name:"kimi-left-panel-expand",render:u3e}),d3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f3e(e,t){return y(),M("svg",d3e,[...t[0]||(t[0]=[iu('',1)])])}const p3e=kt({name:"kimi-light-mode",render:f3e}),h3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function m3e(e,t){return y(),M("svg",h3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.97427 8.06961C4.99348 7.33581 6.18946 7.1 7.00001 7.1H9.00001C9.49706 7.1 9.90001 7.50294 9.90001 8C9.90001 8.49706 9.49706 8.9 9.00001 8.9H7.00001C6.47755 8.9 5.67353 9.06419 5.02599 9.53039C4.42434 9.96356 3.90001 10.6934 3.90001 12C3.90001 13.3066 4.42434 14.0364 5.02599 14.4696C5.67353 14.9358 6.47755 15.1 7.00001 15.1H9.00001C9.49706 15.1 9.90001 15.5029 9.90001 16C9.90001 16.4971 9.49706 16.9 9.00001 16.9H7.00001C6.18946 16.9 4.99348 16.6642 3.97427 15.9304C2.90917 15.1636 2.10001 13.8934 2.10001 12C2.10001 10.1066 2.90917 8.83644 3.97427 8.06961ZM14.1 8C14.1 7.50294 14.5029 7.1 15 7.1H17C17.8105 7.1 19.0065 7.33581 20.0257 8.06961C21.0908 8.83644 21.9 10.1066 21.9 12C21.9 13.8934 21.0908 15.1636 20.0257 15.9304C19.0065 16.6642 17.8105 16.9 17 16.9H15C14.5029 16.9 14.1 16.4971 14.1 16C14.1 15.5029 14.5029 15.1 15 15.1H17C17.5225 15.1 18.3265 14.9358 18.974 14.4696C19.5757 14.0364 20.1 13.3066 20.1 12C20.1 10.6934 19.5757 9.96356 18.974 9.53039C18.3265 9.06419 17.5225 8.9 17 8.9H15C14.5029 8.9 14.1 8.49706 14.1 8ZM7.10001 12C7.10001 11.5029 7.50295 11.1 8.00001 11.1H16C16.4971 11.1 16.9 11.5029 16.9 12C16.9 12.4971 16.4971 12.9 16 12.9H8.00001C7.50295 12.9 7.10001 12.4971 7.10001 12Z",fill:"currentColor"},null,-1)])])}const g3e=kt({name:"kimi-link",render:m3e}),v3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y3e(e,t){return y(),M("svg",v3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.10001 5.99998C4.10001 5.50292 4.50295 5.09998 5.00001 5.09998H19C19.4971 5.09998 19.9 5.50292 19.9 5.99998C19.9 6.49703 19.4971 6.89998 19 6.89998H5.00001C4.50295 6.89998 4.10001 6.49703 4.10001 5.99998ZM4.10001 12C4.10001 11.5029 4.50295 11.1 5.00001 11.1H19C19.4971 11.1 19.9 11.5029 19.9 12C19.9 12.497 19.4971 12.9 19 12.9H5.00001C4.50295 12.9 4.10001 12.497 4.10001 12ZM4.10001 18C4.10001 17.5029 4.50295 17.1 5.00001 17.1H19C19.4971 17.1 19.9 17.5029 19.9 18C19.9 18.497 19.4971 18.9 19 18.9H5.00001C4.50295 18.9 4.10001 18.497 4.10001 18Z",fill:"currentColor"},null,-1)])])}const k3e=kt({name:"kimi-list",render:y3e}),b3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C3e(e,t){return y(),M("svg",b3e,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 4.09961C20.1539 4.09961 21.9004 5.84609 21.9004 8V16C21.9004 18.1539 20.1539 19.9004 18 19.9004H6C3.84609 19.9004 2.09961 18.1539 2.09961 16V8C2.09961 5.84609 3.84609 4.09961 6 4.09961H18ZM3.90039 16C3.90039 17.1598 4.8402 18.0996 6 18.0996H18C19.1598 18.0996 20.0996 17.1598 20.0996 16V9.49805L13.5361 13.5361C12.5955 14.1147 11.4075 14.1084 10.4727 13.5205L3.90039 9.38672V16ZM6 5.90039C5.0746 5.90039 4.29039 6.49909 4.01074 7.33008L11.4316 11.9971C11.7861 12.2199 12.2361 12.2222 12.5928 12.0029L20.0195 7.43457C19.7725 6.54993 18.9636 5.90039 18 5.90039H6Z",fill:"currentColor"})],-1)])])}const w3e=kt({name:"kimi-mail",render:C3e}),_3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x3e(e,t){return y(),M("svg",_3e,[...t[0]||(t[0]=[C("path",{d:"M17 11.0996C17.4971 11.0996 17.9004 11.5029 17.9004 12C17.9004 12.4971 17.4971 12.9004 17 12.9004H7C6.50294 12.9004 6.09961 12.4971 6.09961 12C6.09961 11.5029 6.50294 11.0996 7 11.0996H17Z",fill:"currentColor"},null,-1)])])}const S3e=kt({name:"kimi-minus",render:x3e}),A3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M3e(e,t){return y(),M("svg",A3e,[...t[0]||(t[0]=[C("path",{d:"M15.182 3.32802C15.9304 2.72235 17.0309 2.76978 17.724 3.46767L18.5424 4.29189L18.6722 4.43642C19.2377 5.13495 19.234 6.1404 18.6635 6.83486L18.5326 6.97841L18.0248 7.48232C17.9549 7.55172 17.8793 7.61254 17.8021 7.66884C17.9794 8.18027 17.9316 8.7498 17.6595 9.22841C17.6847 9.24522 17.7091 9.2635 17.7328 9.2831L17.8002 9.3456L17.9847 9.53798C19.8515 11.5442 20.4549 14.0022 19.6224 16.2196C19.1921 17.3657 18.4025 18.3827 17.2992 19.203H19.0873L19.1801 19.2079C19.6337 19.2542 19.9877 19.6375 19.9877 20.1034C19.9876 20.5692 19.6337 20.9527 19.1801 20.9989L19.0873 21.0028H13.0385C13.0244 21.0033 13.0104 21.0031 12.9965 21.0028H4.9115C4.41448 21.0028 4.01117 20.6004 4.01111 20.1034C4.01111 19.6064 4.41444 19.203 4.9115 19.203H12.9047C15.7614 18.5471 17.3679 17.1023 17.9369 15.5868C18.4678 14.1726 18.179 12.4782 16.807 10.9188L16.5189 10.6093L16.4574 10.5399C16.4549 10.5368 16.453 10.5333 16.4506 10.5302L12.3011 14.6522C11.6031 15.3454 10.5023 15.3845 9.75818 14.7733L9.61365 14.6425L7.31091 12.3231C6.5717 11.5786 6.57617 10.376 7.32068 9.63662L12.3676 4.62392L12.5121 4.49404C13.0358 4.06988 13.7318 3.96755 14.3402 4.18251C14.3969 4.10597 14.4591 4.03197 14.5287 3.96279L15.0365 3.45791L15.182 3.32802ZM4.83044 12.9335C5.16112 12.6052 5.68305 12.5863 6.03552 12.8759L6.10291 12.9384L9.07361 15.9286L9.13513 15.997C9.42218 16.3514 9.3992 16.8727 9.06873 17.2011C8.7381 17.5294 8.21712 17.5482 7.86462 17.2587L7.79626 17.1972L4.82654 14.2069L4.76501 14.1376C4.47792 13.7831 4.49979 13.2619 4.83044 12.9335ZM13.6693 5.87978L13.6361 5.90126L8.58826 10.914C8.54935 10.9529 8.54943 11.0165 8.58826 11.0556L10.891 13.3739L10.9242 13.3964C10.9602 13.4111 11.0032 13.404 11.0326 13.3749L16.0795 8.3622L16.1019 8.329C16.1117 8.3049 16.1117 8.2779 16.1019 8.2538L16.0804 8.2206L13.7777 5.90224C13.7486 5.87289 13.7054 5.86535 13.6693 5.87978ZM16.3383 4.71376L16.3051 4.73525L15.7972 5.24013C15.7584 5.27904 15.7585 5.34166 15.7972 5.38076L16.6146 6.20498L16.6478 6.22744C16.6838 6.24221 16.7268 6.23487 16.7562 6.20595L17.264 5.70107L17.2865 5.66787C17.2962 5.64382 17.2963 5.61672 17.2865 5.59267L17.265 5.55947L16.4467 4.73623C16.4174 4.70681 16.3744 4.6992 16.3383 4.71376Z",fill:"currentColor"},null,-1)])])}const T3e=kt({name:"kimi-microscope",render:M3e}),E3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I3e(e,t){return y(),M("svg",E3e,[...t[0]||(t[0]=[C("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),C("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),C("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 L3e=kt({name:"kimi-more",render:I3e}),$3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function N3e(e,t){return y(),M("svg",$3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 12.0993C8.49691 12.0993 8.90016 12.5028 8.90039 12.9997V17.9997C8.90039 19.6013 7.60163 20.9001 6 20.9001C4.39837 20.9001 3.09961 19.6013 3.09961 17.9997C3.09984 16.3982 4.39852 15.0993 6 15.0993C6.38939 15.0993 6.76033 15.1778 7.09961 15.317V12.9997C7.09984 12.5028 7.50309 12.0993 8 12.0993ZM6 16.9001C5.39263 16.9001 4.90062 17.3923 4.90039 17.9997C4.90039 18.6072 5.39249 19.0993 6 19.0993C6.60751 19.0993 7.09961 18.6072 7.09961 17.9997C7.09938 17.3923 6.60737 16.9001 6 16.9001Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.627 3.35611C19.8025 3.12106 20.9001 4.02068 20.9004 5.21939V15.9997C20.9004 17.6013 19.6016 18.9001 18 18.9001C16.3984 18.9001 15.0996 17.6013 15.0996 15.9997C15.0998 14.3982 16.3985 13.0993 18 13.0993C18.3894 13.0993 18.7603 13.1778 19.0996 13.317V9.21939C19.0993 9.15657 19.0421 9.10946 18.9805 9.12173L12.6768 10.3825C12.1894 10.4799 11.7148 10.1637 11.6172 9.67642C11.52 9.18922 11.8361 8.71439 12.3232 8.61685L18.627 7.35611C18.7868 7.32415 18.9452 7.31502 19.0996 7.32291V5.21939C19.0993 5.15657 19.0421 5.10946 18.9805 5.12173L12.6768 6.38248C12.1894 6.47994 11.7148 6.16372 11.6172 5.67642C11.52 5.18922 11.8361 4.71439 12.3232 4.61685L18.627 3.35611ZM18 14.9001C17.3926 14.9001 16.9006 15.3923 16.9004 15.9997C16.9004 16.6072 17.3925 17.0993 18 17.0993C18.6075 17.0993 19.0996 16.6072 19.0996 15.9997C19.0994 15.3923 18.6074 14.9001 18 14.9001Z",fill:"currentColor"},null,-1),C("path",{d:"M7.32422 5.38931C7.61669 4.87032 8.38346 4.87015 8.67578 5.38931L8.73047 5.50845L8.89551 5.95376L8.97949 6.1481C9.19937 6.58817 9.57968 6.93145 10.0459 7.10415L10.4912 7.26919C11.127 7.50461 11.1666 8.36217 10.6104 8.67544L10.4912 8.73013L10.0459 8.89517C9.5799 9.06783 9.19939 9.41141 8.97949 9.85123L8.89551 10.0456L8.73047 10.4909C8.49495 11.1267 7.63737 11.1665 7.32422 10.61L7.26953 10.4909L7.10449 10.0456C6.93172 9.57931 6.58767 9.19898 6.14746 8.97916L5.9541 8.89517L5.50879 8.73013C4.83054 8.47903 4.83061 7.52037 5.50879 7.26919L5.9541 7.10415L6.14746 7.02017C6.58757 6.80032 6.93176 6.41995 7.10449 5.95376L7.26953 5.50845L7.32422 5.38931Z",fill:"currentColor"},null,-1)])])}const F3e=kt({name:"kimi-music",render:N3e}),R3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O3e(e,t){return y(),M("svg",R3e,[...t[0]||(t[0]=[C("path",{d:"M17.9551 6.32648C17.955 5.82951 17.5517 5.42706 17.0547 5.42706H15.4844C14.9875 5.42717 14.5851 5.82958 14.585 6.32648V17.6732C14.585 18.1701 14.9874 18.5734 15.4844 18.5735H17.0547C17.5518 18.5735 17.9551 18.1702 17.9551 17.6732V6.32648ZM19.7549 17.6732C19.7549 19.1643 18.5459 20.3734 17.0547 20.3734H15.4844C13.9933 20.3732 12.7842 19.1643 12.7842 17.6732V6.32648C12.7843 4.83546 13.9934 3.62639 15.4844 3.62628H17.0547C18.5458 3.62628 19.7548 4.8354 19.7549 6.32648V17.6732Z",fill:"currentColor"},null,-1),C("path",{d:"M9.41571 6.32648C9.41561 5.82951 9.01231 5.42706 8.51532 5.42706H6.94501C6.44811 5.42717 6.0457 5.82958 6.04559 6.32648V17.6732C6.04559 18.1701 6.44804 18.5734 6.94501 18.5735H8.51532C9.01238 18.5735 9.41571 18.1702 9.41571 17.6732V6.32648ZM11.2155 17.6732C11.2155 19.1643 10.0065 20.3734 8.51532 20.3734H6.94501C5.45393 20.3732 4.24481 19.1643 4.24481 17.6732V6.32648C4.24492 4.83546 5.45399 3.62639 6.94501 3.62628H8.51532C10.0064 3.62628 11.2154 4.8354 11.2155 6.32648V17.6732Z",fill:"currentColor"},null,-1)])])}const P3e=kt({name:"kimi-pause",render:O3e}),D3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B3e(e,t){return y(),M("svg",D3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0176 4.89998C17.7305 4.89998 17.4552 5.014 17.2522 5.217L6.35429 16.1149C5.957 16.5122 5.67517 17.01 5.53889 17.5551L5.23691 18.763L6.44486 18.4611C6.98994 18.3248 7.48773 18.0429 7.88502 17.6456L18.783 6.74773C18.8834 6.64728 18.9631 6.52797 19.0176 6.39658C19.072 6.26517 19.1 6.12441 19.1 5.98236C19.1 5.84031 19.072 5.69956 19.0176 5.56815C18.9631 5.43676 18.8834 5.31745 18.783 5.217C18.6825 5.11649 18.5631 5.03676 18.4318 4.98237C18.3005 4.92798 18.1597 4.89998 18.0176 4.89998ZM15.9794 3.94421C16.52 3.40366 17.2531 3.09998 18.0176 3.09998C18.3961 3.09998 18.7709 3.17452 19.1207 3.31938C19.4704 3.46424 19.7881 3.67656 20.0558 3.94421C20.3235 4.21192 20.5357 4.52969 20.6805 4.87932C20.8254 5.22895 20.9 5.60375 20.9 5.98236C20.9 6.36098 20.8254 6.73578 20.6805 7.08541C20.5357 7.43504 20.3235 7.75281 20.0558 8.02052L17.6385 10.4378L9.15781 18.9184C8.52984 19.5464 7.74301 19.9919 6.88142 20.2073L4.21828 20.8731C3.91158 20.9498 3.58714 20.8599 3.3636 20.6364C3.14006 20.4128 3.05019 20.0884 3.12686 19.7817L3.79264 17.1185C4.00803 16.257 4.45351 15.4701 5.0815 14.8421L15.9794 3.94421Z",fill:"currentColor"},null,-1)])])}const H3e=kt({name:"kimi-pencil",render:B3e}),z3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function W3e(e,t){return y(),M("svg",z3e,[...t[0]||(t[0]=[C("path",{d:"M7.76251 3.10547C8.25776 3.10552 8.74422 3.23849 9.17072 3.49023L19.533 9.60742C20.8536 10.3869 21.2922 12.0901 20.5174 13.4121C20.2785 13.8195 19.9398 14.1604 19.533 14.4004L9.16974 20.5156C7.84721 21.2958 6.14595 20.8511 5.36993 19.5273C5.1196 19.1003 4.98719 18.6142 4.98712 18.1191V5.88672C4.98716 4.3537 6.2273 3.10547 7.76251 3.10547ZM6.7879 18.1191C6.78797 18.2945 6.8343 18.4664 6.92267 18.6172C7.19638 19.0841 7.79336 19.2377 8.25568 18.9648L18.618 12.8496C18.7607 12.7654 18.8803 12.6458 18.9647 12.502C19.2393 12.0334 19.082 11.4311 18.618 11.1572L8.25568 5.04102C8.1061 4.95273 7.93562 4.9063 7.76251 4.90625C7.22703 4.90625 6.78794 5.34218 6.7879 5.88672V18.1191Z",fill:"currentColor"},null,-1)])])}const U3e=kt({name:"kimi-play",render:W3e}),j3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function V3e(e,t){return y(),M("svg",j3e,[...t[0]||(t[0]=[C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 3.7998C7.47126 3.7998 3.7998 7.47126 3.7998 12C3.7998 16.5287 7.47126 20.2002 12 20.2002C16.5287 20.2002 20.2002 16.5287 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998Z",fill:"currentColor"},null,-1)])])}const q3e=kt({name:"kimi-question",render:V3e}),K3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Z3e(e,t){return y(),M("svg",K3e,[...t[0]||(t[0]=[C("path",{d:"M12 2C13.1046 2 14 2.89543 14 4C14 4.78019 13.552 5.45353 12.9004 5.7832V7H16.5C18.1569 7 19.5 8.34315 19.5 10V17C19.5 18.6051 18.2394 19.9158 16.6543 19.9961L16.5 20H7.5L7.3457 19.9961C5.81166 19.9184 4.58163 18.6883 4.50391 17.1543L4.5 17V10C4.5 8.34315 5.84315 7 7.5 7H11.0996V5.7832C10.448 5.45353 10 4.78019 10 4C10 2.89543 10.8954 2 12 2ZM7.5 8.7998C6.83726 8.7998 6.2998 9.33726 6.2998 10V17C6.2998 17.6627 6.83726 18.2002 7.5 18.2002H16.5C17.1627 18.2002 17.7002 17.6627 17.7002 17V10C17.7002 9.33726 17.1627 8.7998 16.5 8.7998H7.5ZM3 10.7666C3.49706 10.7666 3.90039 11.1699 3.90039 11.667V15C3.90039 15.4971 3.49706 15.9004 3 15.9004C2.50294 15.9004 2.09961 15.4971 2.09961 15V11.667C2.09961 11.1699 2.50294 10.7666 3 10.7666ZM21 10.7666C21.4971 10.7666 21.9004 11.1699 21.9004 11.667V15C21.9004 15.4971 21.4971 15.9004 21 15.9004C20.5029 15.9004 20.0996 15.4971 20.0996 15V11.667C20.0996 11.1699 20.5029 10.7666 21 10.7666ZM9.5 11.0996C9.99706 11.0996 10.4004 11.5029 10.4004 12V14.5C10.4004 14.9971 9.99706 15.4004 9.5 15.4004C9.00294 15.4004 8.59961 14.9971 8.59961 14.5V12C8.59961 11.5029 9.00294 11.0996 9.5 11.0996ZM14.5 11.0996C14.9971 11.0996 15.4004 11.5029 15.4004 12V14.5C15.4004 14.9971 14.9971 15.4004 14.5 15.4004C14.0029 15.4004 13.5996 14.9971 13.5996 14.5V12C13.5996 11.5029 14.0029 11.0996 14.5 11.0996ZM12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5Z",fill:"currentColor"},null,-1)])])}const G3e=kt({name:"kimi-robot",render:Z3e}),Y3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function X3e(e,t){return y(),M("svg",Y3e,[...t[0]||(t[0]=[C("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 J3e=kt({name:"kimi-search",render:X3e}),Q3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e8e(e,t){return y(),M("svg",Q3e,[...t[0]||(t[0]=[C("path",{d:"M16.5364 10.1636C16.8879 10.5151 16.8879 11.0849 16.5364 11.4364C16.1849 11.7879 15.6151 11.7879 15.2636 11.4364L12.9 9.07281V17.1C12.9 17.597 12.4971 18 12 18C11.503 18 11.1 17.597 11.1 17.1V9.07281L8.73641 11.4364C8.38494 11.7879 7.81509 11.7879 7.46362 11.4364C7.11214 11.0849 7.11214 10.5151 7.46362 10.1636L11.3636 6.2636C11.7151 5.91211 12.2849 5.91211 12.6364 6.2636L16.5364 10.1636Z",fill:"currentColor"},null,-1)])])}const t8e=kt({name:"kimi-send",render:e8e}),n8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function o8e(e,t){return y(),M("svg",n8e,[...t[0]||(t[0]=[C("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),C("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 s8e=kt({name:"kimi-setting",render:o8e}),i8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function r8e(e,t){return y(),M("svg",i8e,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1)])])}const l8e=kt({name:"kimi-shield-question",render:r8e}),a8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u8e(e,t){return y(),M("svg",a8e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.90005 12C2.90005 11.503 3.303 11.1 3.80005 11.1H12.2939L9.38588 8.19197C9.03441 7.8405 9.03441 7.27065 9.38588 6.91918C9.73735 6.56771 10.3072 6.56771 10.6587 6.91918L15.1031 11.3636C15.2719 11.5324 15.3667 11.7613 15.3667 12C15.3667 12.2387 15.2719 12.4676 15.1031 12.6364L10.6587 17.0809C10.3072 17.4323 9.73735 17.4323 9.38588 17.0809C9.03441 16.7294 9.03441 16.1595 9.38588 15.8081L12.2939 12.9H3.80005C3.303 12.9 2.90005 12.4971 2.90005 12ZM13.5874 20C13.5874 19.503 13.9904 19.1 14.4874 19.1H18.043C18.2758 19.1 18.4991 19.0075 18.6637 18.8429C18.8283 18.6783 18.9208 18.455 18.9208 18.2222V5.7778C18.9208 5.545 18.8283 5.32174 18.6637 5.15712C18.499 4.9925 18.2758 4.90002 18.043 4.90002H14.4874C13.9904 4.90002 13.5874 4.49708 13.5874 4.00002C13.5874 3.50297 13.9904 3.10003 14.4874 3.10003H18.043C18.7532 3.10003 19.4343 3.38215 19.9365 3.88433C20.4386 4.38651 20.7208 5.06761 20.7208 5.7778V18.2222C20.7208 18.9324 20.4386 19.6135 19.9365 20.1157C19.4343 20.6179 18.7532 20.9 18.043 20.9H14.4874C13.9904 20.9 13.5874 20.4971 13.5874 20Z",fill:"currentColor"},null,-1)])])}const c8e=kt({name:"kimi-sign-in",render:u8e}),d8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f8e(e,t){return y(),M("svg",d8e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.6364 11.3636C20.9879 11.7151 20.9879 12.2849 20.6364 12.6364L16.1919 17.0808C15.8405 17.4323 15.2706 17.4323 14.9192 17.0808C14.5677 16.7293 14.5677 16.1595 14.9192 15.808L17.8272 12.9H9.33333C8.83627 12.9 8.43333 12.497 8.43333 12C8.43333 11.5029 8.83627 11.1 9.33333 11.1H17.8272L14.9192 8.19193C14.5677 7.84046 14.5677 7.27061 14.9192 6.91914C15.2706 6.56766 15.8405 6.56766 16.1919 6.91914L20.6364 11.3636ZM10.2333 3.99998C10.2333 4.49703 9.83038 4.89998 9.33333 4.89998H5.77777C5.54497 4.89998 5.3217 4.99246 5.15709 5.15707C4.99247 5.32169 4.89999 5.54495 4.89999 5.77775V18.2222C4.89999 18.455 4.99247 18.6783 5.15709 18.8429C5.32171 19.0075 5.54497 19.1 5.77777 19.1H9.33333C9.83038 19.1 10.2333 19.5029 10.2333 20C10.2333 20.497 9.83038 20.9 9.33333 20.9H5.77777C5.06758 20.9 4.38648 20.6179 3.8843 20.1157C3.38212 19.6135 3.09999 18.9324 3.09999 18.2222V5.77775C3.09999 5.06756 3.38212 4.38646 3.8843 3.88428C4.38648 3.3821 5.06758 3.09998 5.77777 3.09998H9.33333C9.83038 3.09998 10.2333 3.50292 10.2333 3.99998Z",fill:"currentColor"},null,-1)])])}const p8e=kt({name:"kimi-sign-out",render:f8e}),h8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function m8e(e,t){return y(),M("svg",h8e,[...t[0]||(t[0]=[iu('',9)])])}const g8e=kt({name:"kimi-sliders",render:m8e}),v8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y8e(e,t){return y(),M("svg",v8e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.78027 8.90405C7.5 9.45411 7.5 10.1742 7.5 11.6144V12.3856C7.5 13.8258 7.5 14.5459 7.78027 15.096C8.02681 15.5798 8.42019 15.9732 8.90405 16.2197C9.45411 16.5 10.1742 16.5 11.6144 16.5H12.3856C13.8258 16.5 14.5459 16.5 15.096 16.2197C15.5798 15.9732 15.9732 15.5798 16.2197 15.096C16.5 14.5459 16.5 13.8258 16.5 12.3856V11.6144C16.5 10.1742 16.5 9.45411 16.2197 8.90405C15.9732 8.42019 15.5798 8.02681 15.096 7.78027C14.5459 7.5 13.8258 7.5 12.3856 7.5H11.6144C10.1742 7.5 9.45411 7.5 8.90405 7.78027C8.42019 8.02681 8.02681 8.42019 7.78027 8.90405Z",fill:"currentColor"},null,-1)])])}const k8e=kt({name:"kimi-stop",render:y8e}),b8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C8e(e,t){return y(),M("svg",b8e,[...t[0]||(t[0]=[C("path",{d:"M7.01562 3.41459C7.4446 3.16449 7.9954 3.30924 8.24609 3.73784C8.49645 4.167 8.35189 4.71868 7.92285 4.96928C5.51497 6.37506 3.90054 8.98498 3.90039 11.9703C3.90076 16.4435 7.52672 20.0699 12 20.0699C16.4733 20.0699 20.0992 16.4435 20.0996 11.9703C20.0996 11.2291 20 10.5116 19.8145 9.83159C19.6838 9.35222 19.967 8.85702 20.4463 8.72612C20.9256 8.59541 21.4207 8.87778 21.5518 9.35698C21.7792 10.1901 21.9004 11.0674 21.9004 11.9703C21.9 17.4376 17.4674 21.8697 12 21.8697C6.53261 21.8697 2.09998 17.4376 2.09961 11.9703C2.09976 8.31904 4.07782 5.12972 7.01562 3.41459ZM8.39258 8.24077C8.75015 7.89591 9.3199 7.90591 9.66504 8.26323C10.01 8.62076 9.99985 9.19051 9.64258 9.53569C9.00203 10.1541 8.60558 11.02 8.60547 11.979C8.60584 13.8536 10.1253 15.3736 12 15.3736C13.8746 15.3735 15.3942 13.8536 15.3945 11.979C15.3945 11.6847 15.3577 11.3989 15.2881 11.1285C15.1646 10.6474 15.4536 10.1568 15.9346 10.0328C16.4158 9.9089 16.9071 10.1991 17.0312 10.6802C17.1383 11.096 17.1943 11.5321 17.1943 11.979C17.194 14.8477 14.8688 17.1733 12 17.1734C9.1312 17.1734 6.80506 14.8478 6.80469 11.979C6.8048 10.5117 7.41519 9.18431 8.39258 8.24077ZM11.5459 1.12651C11.8216 0.965605 12.1631 0.963306 12.4414 1.11967L19.1953 4.91752C19.4859 5.08108 19.662 5.39277 19.6533 5.72612C19.6443 6.05972 19.4515 6.36154 19.1523 6.50932L12.9004 9.5933V12.2583C12.9004 12.7554 12.4971 13.1587 12 13.1587C11.5029 13.1587 11.0996 12.7554 11.0996 12.2583V1.90385C11.0999 1.58444 11.2702 1.2878 11.5459 1.12651ZM12.9004 7.58549L16.8252 5.64897L12.9004 3.44194V7.58549Z",fill:"currentColor"},null,-1)])])}const w8e=kt({name:"kimi-target",render:C8e}),_8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x8e(e,t){return y(),M("svg",_8e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.9893 6.60743C20.5897 6.60757 21.8877 7.8926 21.8877 9.47736C21.8877 10.7416 21.0607 11.8129 19.9141 12.1955V14.257C19.914 15.8428 18.6152 17.1288 17.0137 17.1289H12.8438V20.1381C12.8437 20.6301 12.4412 21.0293 11.9443 21.0296C11.4473 21.0296 11.044 20.6302 11.0439 20.1381V16.4356C11.0441 15.8343 11.5363 15.3461 12.1436 15.3458H17.0137C17.6211 15.3457 18.1133 14.8585 18.1133 14.257V12.2129C16.9408 11.8451 16.0909 10.7598 16.0908 9.47736C16.0908 7.89251 17.3887 6.60743 18.9893 6.60743ZM18.9893 8.38953C18.3828 8.38953 17.8906 8.87684 17.8906 9.47736C17.8907 10.0778 18.3828 10.5642 18.9893 10.5642C19.5956 10.5641 20.0869 10.0777 20.0869 9.47736C20.0869 8.87693 19.5956 8.38967 18.9893 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.89844 6.60743C6.49899 6.60747 7.79688 7.89254 7.79688 9.47736C7.79684 10.7388 6.97371 11.8078 5.83105 12.1926V14.4021C5.83105 15.0036 6.32315 15.4918 6.93066 15.4918H8.37109C8.86789 15.492 9.27038 15.8905 9.27051 16.3824C9.27051 16.8744 8.86797 17.2737 8.37109 17.2739H6.93066C5.32904 17.2739 4.03027 15.9879 4.03027 14.4021V12.2158C2.85382 11.8504 2.00004 10.7627 2 9.47736C2 7.89251 3.29784 6.60743 4.89844 6.60743ZM4.89844 8.38953C4.29196 8.38953 3.7998 8.87684 3.7998 9.47736C3.79985 10.0778 4.29198 10.5642 4.89844 10.5642C5.50485 10.5642 5.99605 10.0778 5.99609 9.47736C5.99609 8.87687 5.50488 8.38958 4.89844 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9434 2.9707C13.5439 2.97075 14.8418 4.25581 14.8418 5.84063C14.8418 7.11413 14.0035 8.1923 12.8438 8.56745V13.0135C12.8436 13.5056 12.4403 13.9041 11.9434 13.9041C11.4466 13.9039 11.0431 13.5055 11.043 13.0135V8.56745C9.8836 8.19209 9.04496 7.11387 9.04492 5.84063C9.04492 4.25592 10.343 2.97093 11.9434 2.9707ZM11.9434 4.75281C11.3371 4.75303 10.8447 5.24026 10.8447 5.84063C10.8448 6.44097 11.3371 6.92726 11.9434 6.92749C12.5498 6.92745 13.041 6.44108 13.041 5.84063C13.041 5.24014 12.5498 4.75285 11.9434 4.75281Z",fill:"currentColor"},null,-1)])])}const S8e=kt({name:"kimi-task",render:x8e}),A8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M8e(e,t){return y(),M("svg",A8e,[...t[0]||(t[0]=[C("path",{d:"M16.5293 15.0596C16.9496 15.1021 17.2772 15.4572 17.2773 15.8887C17.2773 16.3202 16.9497 16.6753 16.5293 16.7178L16.4443 16.7217H12C11.5399 16.7216 11.167 16.3488 11.167 15.8887C11.1671 15.4286 11.54 15.0558 12 15.0557H16.4443L16.5293 15.0596Z",fill:"currentColor"},null,-1),C("path",{d:"M6.96582 7.52246C7.27077 7.21751 7.75375 7.1983 8.08105 7.46484L8.14453 7.52246L10.8232 10.2002C11.5102 10.8872 11.5102 12.0014 10.8232 12.6885L8.14453 15.3672L8.08105 15.4248C7.75377 15.6913 7.27075 15.6721 6.96582 15.3672C6.66114 15.0621 6.64234 14.5791 6.90918 14.252L6.96582 14.1885L9.64453 11.5098C9.68057 11.4736 9.68062 11.415 9.64453 11.3789L6.96582 8.7002C6.64116 8.37488 6.6411 7.84774 6.96582 7.52246Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 3.09961C19.1539 3.09966 20.9004 4.84612 20.9004 7V17C20.9004 19.1539 19.1539 20.9003 17 20.9004H7C4.84609 20.9004 3.09961 19.1539 3.09961 17V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H17ZM7 4.90039C5.8402 4.90039 4.90039 5.8402 4.90039 7V17C4.90039 18.1598 5.8402 19.0996 7 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V7C19.0996 5.84024 18.1598 4.90044 17 4.90039H7Z",fill:"currentColor"},null,-1)])])}const T8e=kt({name:"kimi-terminal",render:M8e}),E8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I8e(e,t){return y(),M("svg",E8e,[...t[0]||(t[0]=[C("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 L8e=kt({name:"kimi-thinking",render:I8e}),$8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function N8e(e,t){return y(),M("svg",$8e,[...t[0]||(t[0]=[iu('',6)])])}const F8e=kt({name:"kimi-todo",render:N8e}),R8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O8e(e,t){return y(),M("svg",R8e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.09752 2.19507C8.5421 1.97278 9.08271 2.15298 9.305 2.59756L10.0562 4.10005H13.5C13.9971 4.10005 14.4 4.50299 14.4 5.00005C14.4 5.49711 13.9971 5.90005 13.5 5.90005H12.3106C12.2556 6.2319 12.1667 6.64073 12.0226 7.0987C11.7254 8.04355 11.191 9.20402 10.2334 10.3239C11.4166 11.196 12.5606 11.7524 13.4512 12.0987C13.978 12.3036 14.4136 12.434 14.7124 12.5122L14.7348 12.5181L15.695 10.5976C15.8475 10.2927 16.1591 10.1 16.5 10.1C16.8409 10.1 17.1525 10.2927 17.305 10.5976L20.7969 17.5814L20.8044 17.5959L20.8137 17.615L21.805 19.5976C22.0273 20.0421 21.8471 20.5827 21.4025 20.805C20.9579 21.0273 20.4173 20.8471 20.195 20.4025L19.4438 18.9H13.5562L12.805 20.4025C12.5827 20.8471 12.0421 21.0273 11.5975 20.805C11.1529 20.5827 10.9727 20.0421 11.195 19.5976L12.1863 17.615C12.1917 17.6036 12.1973 17.5924 12.2031 17.5814L13.9146 14.1583C13.6034 14.0667 13.2256 13.9423 12.7988 13.7764C11.7294 13.3605 10.3442 12.6802 8.92538 11.5924C7.79753 12.5167 6.69473 13.0764 5.83285 13.4112C5.33899 13.603 4.92286 13.7216 4.62401 13.7931C4.47449 13.8288 4.35399 13.8529 4.26741 13.8684C4.2241 13.8762 4.18924 13.8818 4.16343 13.8858L4.13156 13.8904L4.12084 13.8919L4.11682 13.8924L4.11514 13.8927C4.11514 13.8927 4.11368 13.8928 4.00001 13L4.11368 13.8928C3.62061 13.9556 3.17 13.6068 3.10722 13.1137C3.0446 12.6219 3.39148 12.1723 3.88256 12.1077L3.94947 12.0967C4.00428 12.0869 4.09114 12.0698 4.20543 12.0424C4.43422 11.9877 4.77156 11.8924 5.18106 11.7334C5.84103 11.477 6.68484 11.0564 7.56458 10.3753C7.15054 9.93496 6.78945 9.48388 6.50421 9.10102C6.26672 8.78224 6.07517 8.50172 5.94227 8.29973C5.87571 8.19858 5.82359 8.11671 5.78748 8.05909C5.76942 8.03027 5.75535 8.00749 5.74545 7.99135L5.73377 7.9722L5.73032 7.96651L5.72864 7.96371C5.71133 7.9349 5.69582 7.9055 5.68208 7.87566C5.49265 7.46416 5.6393 6.96717 6.03659 6.72853C6.09037 6.69623 6.14617 6.6702 6.20315 6.65023C6.59739 6.51205 7.04758 6.66421 7.27129 7.03623L7.27266 7.0385L7.28001 7.05054C7.28695 7.06186 7.29793 7.07964 7.31274 7.10328C7.34239 7.15059 7.38731 7.2212 7.44595 7.31032C7.56343 7.48886 7.73484 7.73997 7.94765 8.02562C8.21085 8.37889 8.52772 8.77187 8.8756 9.14201C9.64226 8.24147 10.0681 7.3133 10.3056 6.55854C10.381 6.3186 10.4372 6.09683 10.4791 5.90005H9.51951C9.50696 5.90031 9.49442 5.90031 9.48191 5.90005H4.00001C3.50296 5.90005 3.10001 5.49711 3.10001 5.00005C3.10001 4.50299 3.50296 4.10005 4.00001 4.10005H8.04378L7.69503 3.40254C7.67314 3.35877 7.65516 3.31407 7.64094 3.26883C7.51078 2.8546 7.69671 2.39547 8.09752 2.19507ZM16.5 13.0125L18.5438 17.1H14.4562L16.5 13.0125Z",fill:"currentColor"},null,-1),C("path",{d:"M15.1 4.00007C15.1 3.50301 15.5029 3.10007 16 3.10007H18C19.6016 3.10007 20.9 4.39844 20.9 6.00007V8.00007C20.9 8.49712 20.497 8.90007 20 8.90007C19.5029 8.90007 19.1 8.49712 19.1 8.00007V6.00007C19.1 5.39255 18.6075 4.90007 18 4.90007H16C15.5029 4.90007 15.1 4.49712 15.1 4.00007Z",fill:"currentColor"},null,-1),C("path",{d:"M3.99998 15.1001C4.49703 15.1001 4.89998 15.503 4.89998 16.0001V18.0001C4.89998 18.6076 5.39246 19.1001 5.99998 19.1001H7.99998C8.49703 19.1001 8.89998 19.503 8.89998 20.0001C8.89998 20.4971 8.49703 20.9001 7.99998 20.9001H5.99998C4.39835 20.9001 3.09998 19.6017 3.09998 18.0001V16.0001C3.09998 15.503 3.50292 15.1001 3.99998 15.1001Z",fill:"currentColor"},null,-1)])])}const P8e=kt({name:"kimi-translate",render:O8e}),D8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B8e(e,t){return y(),M("svg",D8e,[...t[0]||(t[0]=[C("path",{d:"M8.10001 3C8.10001 2.50294 8.50295 2.1 9.00001 2.1H15C15.4971 2.1 15.9 2.50294 15.9 3C15.9 3.49706 15.4971 3.9 15 3.9H9.00001C8.50295 3.9 8.10001 3.49706 8.10001 3Z",fill:"currentColor"},null,-1),C("path",{d:"M10 15.9C9.50295 15.9 9.10001 15.4971 9.10001 15L9.10001 10C9.10001 9.50294 9.50295 9.1 10 9.1C10.4971 9.1 10.9 9.50294 10.9 10L10.9 15C10.9 15.4971 10.4971 15.9 10 15.9Z",fill:"currentColor"},null,-1),C("path",{d:"M13.1 15C13.1 15.4971 13.5029 15.9 14 15.9C14.4971 15.9 14.9 15.4971 14.9 15L14.9 10C14.9 9.50294 14.4971 9.1 14 9.1C13.5029 9.1 13.1 9.50294 13.1 10V15Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.10001 6C2.10001 5.50294 2.50295 5.1 3.00001 5.1H4.99152C4.99785 5.09993 5.00417 5.09993 5.01048 5.1H18.9895C18.9958 5.09993 19.0021 5.09993 19.0085 5.1H21C21.4971 5.1 21.9 5.50294 21.9 6C21.9 6.49706 21.4971 6.9 21 6.9H19.8281L18.8448 18.6993C18.7412 19.9432 17.7013 20.9 16.4531 20.9H7.54686C6.29865 20.9 5.25881 19.9432 5.15515 18.6993L4.17188 6.9H3.00001C2.50295 6.9 2.10001 6.49706 2.10001 6ZM5.97811 6.9L18.0219 6.9L17.0511 18.5498C17.0251 18.8608 16.7652 19.1 16.4531 19.1H7.54686C7.23481 19.1 6.97485 18.8608 6.94893 18.5498L5.97811 6.9Z",fill:"currentColor"},null,-1)])])}const H8e=kt({name:"kimi-trash",render:B8e}),z8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function W8e(e,t){return y(),M("svg",z8e,[...t[0]||(t[0]=[C("path",{d:"M7.36336 3.3634C7.71483 3.01192 8.28533 3.01192 8.6368 3.3634C8.98817 3.71488 8.98824 4.2854 8.6368 4.63683L6.17391 7.09972H15.0001C18.2585 7.09977 20.9005 9.74166 20.9005 13.0001C20.9004 16.2585 18.2585 18.9005 15.0001 18.9005H7.00008C6.50307 18.9005 6.09976 18.4971 6.09969 18.0001C6.09969 17.5031 6.50302 17.0997 7.00008 17.0997H15.0001C17.2644 17.0997 19.0996 15.2644 19.0997 13.0001C19.0997 10.7358 17.2644 8.90055 15.0001 8.90051H6.17391L8.6368 11.3634L8.69832 11.4318C8.98668 11.7853 8.96632 12.3073 8.6368 12.6368C8.30728 12.9663 7.78521 12.9867 7.43172 12.6984L7.36336 12.6368L3.36336 8.63683C3.33098 8.60445 3.30286 8.56908 3.27645 8.53332C3.25597 8.50559 3.23607 8.47741 3.21883 8.44738C3.20492 8.42311 3.19221 8.39837 3.18074 8.37316C3.1764 8.36365 3.17109 8.35453 3.16707 8.34484C3.1627 8.33427 3.1593 8.32331 3.15535 8.31261C3.12946 8.24274 3.11237 8.16872 3.10457 8.09191C3.09258 7.97426 3.10262 7.85446 3.1368 7.74035C3.14281 7.72035 3.15094 7.70114 3.15828 7.68176C3.16165 7.67283 3.16341 7.66325 3.16707 7.65441C3.17216 7.64216 3.17806 7.63025 3.18367 7.61828C3.19055 7.60356 3.19744 7.58874 3.20516 7.57433C3.24709 7.49624 3.3012 7.42556 3.36336 7.3634L7.36336 3.3634Z",fill:"currentColor"},null,-1)])])}const U8e=kt({name:"kimi-undo",render:W8e}),j8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function V8e(e,t){return y(),M("svg",j8e,[...t[0]||(t[0]=[C("path",{d:"M11.9997 12.8779C16.0197 12.878 19.4393 15.3848 20.7048 18.8828C21.0812 19.9234 20.2782 20.8962 19.2038 21.0137L18.9861 21.0264H5.0134L4.79562 21.0137C3.7213 20.8961 2.91743 19.9233 3.29367 18.8828C4.55905 15.3847 7.9797 12.8781 11.9997 12.8779ZM11.9997 14.6777C8.84467 14.6779 6.17462 16.5794 5.09152 19.2256H18.9079C17.8248 16.5793 15.1549 14.6778 11.9997 14.6777ZM12.2312 3.00586C14.6088 3.1264 16.4997 5.09239 16.4997 7.5L16.4939 7.73145C16.3734 10.1091 14.4073 11.9999 11.9997 12C9.59225 11.9998 7.62604 10.109 7.50558 7.73145L7.49973 7.5C7.49973 5.01485 9.51462 3.00021 11.9997 3L12.2312 3.00586ZM11.9997 4.7998C10.5087 4.80001 9.29953 6.00896 9.29953 7.5C9.29953 8.99104 10.5087 10.2 11.9997 10.2002C13.4908 10.2001 14.6999 8.99112 14.6999 7.5C14.6999 6.00888 13.4908 4.79989 11.9997 4.7998Z",fill:"currentColor"},null,-1)])])}const q8e=kt({name:"kimi-user",render:V8e}),K8e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Z8e(e,t){return y(),M("svg",K8e,[...t[0]||(t[0]=[C("path",{d:"M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z",fill:"currentColor"},null,-1)])])}const G8e=kt({name:"kimi-warning",render:Z8e}),Y8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function X8e(e,t){return y(),M("svg",Y8e,[...t[0]||(t[0]=[C("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[C("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-2zm11-2v16"}),C("path",{d:"m9 10l2 2l-2 2"})],-1)])])}const J8e=kt({name:"tabler-layout-sidebar-right-collapse",render:X8e}),Q8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function eye(e,t){return y(),M("svg",Q8e,[...t[0]||(t[0]=[C("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 tye=kt({name:"tabler-paperclip",render:eye}),nye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function oye(e,t){return y(),M("svg",nye,[...t[0]||(t[0]=[C("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 sye=kt({name:"ri-braces-line",render:oye}),iye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function rye(e,t){return y(),M("svg",iye,[...t[0]||(t[0]=[C("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 lye=kt({name:"ri-calendar-close-line",render:rye}),aye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uye(e,t){return y(),M("svg",aye,[...t[0]||(t[0]=[C("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 cye=kt({name:"ri-calendar-schedule-line",render:uye}),dye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fye(e,t){return y(),M("svg",dye,[...t[0]||(t[0]=[C("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 pye=kt({name:"ri-calendar-todo-line",render:fye}),hye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function mye(e,t){return y(),M("svg",hye,[...t[0]||(t[0]=[C("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 gye=kt({name:"ri-code-line",render:mye}),vye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function yye(e,t){return y(),M("svg",vye,[...t[0]||(t[0]=[C("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-4-7h8a4 4 0 0 1-8 0m0-2a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3"},null,-1)])])}const kye=kt({name:"ri-emotion-line",render:yye}),bye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Cye(e,t){return y(),M("svg",bye,[...t[0]||(t[0]=[C("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 wye=kt({name:"ri-external-link-line",render:Cye}),_ye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xye(e,t){return y(),M("svg",_ye,[...t[0]||(t[0]=[C("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 Sye=kt({name:"ri-eye-line",render:xye}),Aye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Mye(e,t){return y(),M("svg",Aye,[...t[0]||(t[0]=[C("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 Tye=kt({name:"ri-eye-off-line",render:Mye}),Eye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Iye(e,t){return y(),M("svg",Eye,[...t[0]||(t[0]=[C("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 Lye=kt({name:"ri-file-add-line",render:Iye}),$ye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Nye(e,t){return y(),M("svg",$ye,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const Fye=kt({name:"ri-flashlight-line",render:Nye}),Rye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Oye(e,t){return y(),M("svg",Rye,[...t[0]||(t[0]=[C("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 Pye=kt({name:"ri-folder-fill",render:Oye}),Dye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Bye(e,t){return y(),M("svg",Dye,[...t[0]||(t[0]=[C("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 Hye=kt({name:"ri-git-fork-line",render:Bye}),zye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Wye(e,t){return y(),M("svg",zye,[...t[0]||(t[0]=[C("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 Uye=kt({name:"ri-git-pull-request-line",render:Wye}),jye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Vye(e,t){return y(),M("svg",jye,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M2 18h7v2H2zm0-7h9v2H2zm0-7h20v2H2zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4 4 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391a4 4 0 0 1-1.435.83L19 21h-2l-.24-1.196a4 4 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4 4 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196a4 4 0 0 1 1.434.83M18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const qye=kt({name:"ri-list-settings-line",render:Vye}),Kye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Zye(e,t){return y(),M("svg",Kye,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm9 16h-4v2h4zm0-8h-4v2h4zM9 4H5v2h4z"},null,-1)])])}const Gye=kt({name:"ri-node-tree",render:Zye}),Yye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Xye(e,t){return y(),M("svg",Yye,[...t[0]||(t[0]=[C("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 Jye=kt({name:"ri-pushpin-line",render:Xye}),Qye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function e5e(e,t){return y(),M("svg",Qye,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const t5e=kt({name:"ri-sort-desc",render:e5e}),n5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function o5e(e,t){return y(),M("svg",n5e,[...t[0]||(t[0]=[C("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 s5e=kt({name:"ri-star-fill",render:o5e}),i5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function r5e(e,t){return y(),M("svg",i5e,[...t[0]||(t[0]=[C("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 l5e=kt({name:"ri-star-line",render:r5e}),a5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function u5e(e,t){return y(),M("svg",a5e,[...t[0]||(t[0]=[C("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 c5e=kt({name:"ri-tools-line",render:u5e}),d5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function f5e(e,t){return y(),M("svg",d5e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m20.97 17.172l-1.414 1.414l-3.535-3.535l-.073.074l-.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.243L5.34 8.761l3.536-.707l.073-.074l-3.536-3.536L6.828 3.03zM10.365 9.394l-.502.502l-2.822.565l6.5 6.5l.564-2.822l.502-.502zm8.411.074l-1.34 1.34l1.414 1.415l1.34-1.34l.707.707l1.415-1.415l-8.486-8.485l-1.414 1.414l.707.707l-1.34 1.34l1.414 1.415l1.34-1.34z"},null,-1)])])}const p5e=kt({name:"ri-unpin-line",render:f5e}),h5e=` + + +`,m5e=` + + + +`,g5e=` + + + +`,v5e=` + + +`,y5e=` + + +`,k5e=` + + +`,b5e=` + + +`,C5e=` + + +`,w5e=` + + +`,_5e=` + + +`,x5e=` + + +`,S5e=` + + + +`,A5e=` + + +`,M5e=` + + + +`,T5e=` + + +`,E5e=` + + + +`,I5e=` + + +`,L5e=` + + +`,$5e=` + + +`,N5e=` + + +`,Yx=` + + + + +`,F5e=` + + + + +`,R5e=` + + +`,O5e=` + + + + +`,P5e=` + + + + + +`,D5e=` + + +`,B5e=` + + +`,H5e=` + + +`,z5e=` + + +`,W5e=` + + +`,U5e=` + + +`,j5e=` + + + +`,V5e=` + + + +`,q5e=` + + +`,K5e=` + + + + + + + + + + + +`,Z5e=` + + + + +`,G5e=` + + + + +`,Y5e=` + + + + + + + + + + + + +`,X5e=` + + +`,J5e=` + + +`,Q5e=` + + + + +`,e6e=` + + +`,t6e=` + + +`,n6e=` + + + + +`,o6e=` + + + + +`,s6e=` + + + +`,i6e=` + + +`,r6e=` + + +`,l6e=` + + + + +`,a6e=` + + +`,u6e=` + + +`,c6e=` + + +`,d6e=` + + + +`,f6e=` + + + + +`,p6e=` + + +`,h6e=` + + +`,m6e='',g6e=` + + +`,v6e=` + + +`,y6e=` + + + + +`,k6e=` + + + + +`,b6e=` + + +`,C6e=` + + + + + + + +`,w6e=` + + + + +`,_6e=` + + + + + +`,x6e=` + + +`,S6e=` + + +`,A6e=` + + + + +`,M6e='',T6e='',E6e='',I6e='',L6e='',$6e='',N6e='',F6e='',R6e='',O6e='',P6e='',D6e='',B6e='',H6e='',z6e='',W6e='',U6e='',j6e='',V6e='',q6e='',K6e='',Z6e='',G6e='',Y6e='',X6e={sm:14,md:16,lg:20};function xt(e,t){return{component:e,svg:t}}const BN={plus:xt(d9e,h5e),"chat-new":xt(h9e,m5e),"calendar-close":xt(lye,I6e),"calendar-schedule":xt(cye,L6e),"calendar-todo":xt(pye,$6e),close:xt(K9e,A5e),check:xt($9e,C5e),archive:xt(v9e,g5e),search:xt(J3e,u6e),copy:xt(n4e,E5e),link:xt(g3e,X5e),"external-link":xt(wye,R6e),download:xt(a4e,L5e),undo:xt(U8e,x6e),send:xt(t8e,c6e),image:xt(G4e,j5e),settings:xt(s8e,d6e),sliders:xt(g8e,m6e),"light-mode":xt(p3e,Y5e),"dark-mode":xt(i4e,I5e),"follow-system":xt(L4e,D5e),"log-in":xt(c8e,p6e),"log-out":xt(p8e,h6e),hand:xt(U4e,W5e),"full-access":xt(F4e,B5e),"shield-question":xt(l8e,f6e),"chevron-down":xt(R9e,w5e),"chevron-right":xt(D9e,_5e),"chevron-up":xt(z9e,x5e),"arrow-up":xt(E9e,b5e),"arrow-down":xt(b9e,v5e),"arrow-right":xt(A9e,k5e),"arrow-left":xt(_9e,y5e),minus:xt(S3e,e6e),microscope:xt(T3e,t6e),"panel-collapse":xt(l3e,Z5e),"panel-collapse-right":xt(J8e,M6e),"panel-expand":xt(c3e,G5e),expand:xt(h4e,N5e),collapse:xt(Y9e,M5e),list:xt(k3e,J5e),"list-settings":xt(qye,U6e),"tree-view":xt(Gye,j6e),sort:xt(t5e,q6e),grip:xt(H4e,z5e),folder:xt(S4e,O5e),"folder-closed":xt(w4e,R5e),"folder-plus":xt(T4e,P5e),"folder-solid":xt(Pye,H6e),file:xt(Gx,Yx),"file-text":xt(k4e,F5e),"file-edit":xt(d4e,$5e),"file-plus":xt(Lye,D6e),"file-off":xt(Gx,Yx),attachment:xt(tye,T6e),"image-off":xt(J4e,V5e),eye:xt(Sye,O6e),"eye-off":xt(Tye,P6e),code:xt(gye,N6e),terminal:xt(T8e,k6e),pencil:xt(H3e,i6e),tool:xt(c5e,G6e),glob:xt(sye,E6e),globe:xt(P4e,H5e),translate:xt(P8e,w6e),"check-list":xt(F8e,C6e),bolt:xt(Fye,B6e),keyboard:xt(s3e,K5e),trash:xt(H8e,_6e),"git-fork":xt(Hye,z6e),"git-pull-request":xt(Uye,W6e),message:xt(Q9e,T5e),mail:xt(w3e,Q5e),user:xt(q8e,S6e),info:xt(t3e,q5e),"help-circle":xt(q3e,l6e),"alert-triangle":xt(G8e,A6e),clock:xt(j9e,S5e),robot:xt(G3e,a6e),sparkles:xt(S8e,y6e),histogram:xt(q4e,U5e),music:xt(F3e,o6e),emoji:xt(kye,F6e),target:xt(w8e,v6e),pause:xt(P3e,s6e),play:xt(U3e,r6e),pin:xt(Jye,V6e),stop:xt(k8e,g6e),star:xt(s5e,K6e),"star-outline":xt(l5e,Z6e),unpin:xt(p5e,Y6e),"dots-horizontal":xt(L3e,n6e),thinking:xt(L8e,b6e)};function J6e(e){return BN[e]}function Q6e(e,t){return e.replace(/]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^
      ${r}`}function OY(e,t,n){return(n.xhtmlOut?`
      -`:`
      -`)+`
      -
        -`}function PY(){return`
      -
      -`}function DY(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}`),`
    1. `}function BY(){return`
    2. -`}function HY(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 zY(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=RY,e.renderer.rules.footnote_block_open=OY,e.renderer.rules.footnote_block_close=PY,e.renderer.rules.footnote_open=DY,e.renderer.rules.footnote_close=BY,e.renderer.rules.footnote_anchor=HY,e.renderer.rules.footnote_caption=FY,e.renderer.rules.footnote_anchor_name=NY;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 h;for(h=d+2;h=f||l.src.charCodeAt(++h)!==58)return!1;if(c)return!0;h++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const g=l.src.slice(d+2,h-2);l.env.footnotes.refs[`:${g}`]=-1;const m=new l.Token("footnote_reference_open","",1);m.meta={label:g},m.level=l.level++,l.tokens.push(m);const w=l.bMarks[a],_=l.tShift[a],v=l.sCount[a],k=l.parentType,y=h,x=l.sCount[a]+h-(l.bMarks[a]+l.tShift[a]);let M=x;for(;h=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 h=l.env.footnotes.list.length,g=[];l.md.inline.parse(l.src.slice(d,f),l.md,l.env,g);const m=l.push("footnote_ref","",0);m.meta={id:h},l.env.footnotes.list[h]={content:l.src.slice(d,f),tokens:g}}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 h;l.env.footnotes.refs[`:${f}`]<0?(h=l.env.footnotes.list.length,l.env.footnotes.list[h]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=h):h=l.env.footnotes.refs[`:${f}`];const g=l.env.footnotes.list[h].count;l.env.footnotes.list[h].count++;const m=l.push("footnote_ref","",0);m.meta={id:h,subId:g,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(g){return g.type==="footnote_reference_open"?(d=!0,u=[],c=g.meta.label,!1):g.type==="footnote_reference_close"?(d=!1,f[":"+c]=u,!1):(d&&u.push(g),!d)}),!l.env.footnotes.list))return;const h=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let g=0,m=h.length;g0?h[g].count:1;for(let k=0;k?@[\]^_`{|}~-])/g;function VY(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 ZY(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,w){w=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},w),m.core.ruler.after("inline","github-task-lists",function(_){for(var v=_.tokens,k=0,y=2;y=0;v--)if(m[v].level===_)return v;return-1}function s(m,w){return d(m[w])&&f(m[w-1])&&h(m[w-2])&&g(m[w])}function i(m,w,_,v){var k=_.idPrefix+w;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(k,v)),m.children.push(a(v)),m.children.unshift(r(m,k,_,v)),_.divWrap&&(m.children.unshift(u(_,v)),m.children.push(c(v)))}function r(m,w,_,v){var k=new v("checkbox_input","input",0);return k.attrs=[["type","checkbox"],["id",w]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&k.attrs.push(["checked","true"]),_.disabled===!0&&k.attrs.push(["disabled","true"]),k}function l(m,w){var _=new w("label_open","label",1);return _.attrs=[["for",m]],_}function a(m){return new m("label_close","label",-1)}function u(m,w){var _=new w("checkbox_open","div",0);return _.attrs=[["class",m.divClass]],_}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 h(m){return m.type==="list_item_open"}function g(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})}),XY=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))),JY=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),p9;const QY=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]]),eX=(p9=String.fromCodePoint)!==null&&p9!==void 0?p9: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 tX(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=QY.get(e))!==null&&t!==void 0?t:e}var Is;(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"})(Is||(Is={}));const nX=32;var Da;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Da||(Da={}));function m3(e){return e>=Is.ZERO&&e<=Is.NINE}function oX(e){return e>=Is.UPPER_A&&e<=Is.UPPER_F||e>=Is.LOWER_A&&e<=Is.LOWER_F}function sX(e){return e>=Is.UPPER_A&&e<=Is.UPPER_Z||e>=Is.LOWER_A&&e<=Is.LOWER_Z||m3(e)}function iX(e){return e===Is.EQUALS||sX(e)}var Ss;(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"})(Ss||(Ss={}));var Fa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Fa||(Fa={}));var rX=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Ss.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Fa.Strict}startEntity(e){this.decodeMode=e,this.state=Ss.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ss.EntityStart:return e.charCodeAt(t)===Is.NUM?(this.state=Ss.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ss.NamedEntity,this.stateNamedEntity(e,t));case Ss.NumericStart:return this.stateNumericStart(e,t);case Ss.NumericDecimal:return this.stateNumericDecimal(e,t);case Ss.NumericHex:return this.stateNumericHex(e,t);case Ss.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|nX)===Is.LOWER_X?(this.state=Ss.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ss.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===Is.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Fa.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]&Da.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]&~Da.VALUE_LENGTH:o[e+1],n),t===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case Ss.NamedEntity:return this.result!==0&&(this.decodeMode!==Fa.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ss.NumericDecimal:return this.emitNumericEntity(0,2);case Ss.NumericHex:return this.emitNumericEntity(0,3);case Ss.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ss.EntityStart:return 0}}};function KT(e){let t="";const n=new rX(e,o=>t+=eX(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 lX(e,t,n,o){const s=(t&Da.BRANCH_LENGTH)>>7,i=t&Da.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 aX=KT(XY);KT(JY);function E8(e,t=Fa.Legacy){return aX(e,t)}var uX=qT(YY());const Mb={};function cX(e){let t=Mb[e];if(t)return t;t=Mb[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})}h2.defaultChars=";/?:@&=+$,#";h2.componentChars="";var g3=h2;const Tb={};function dX(e){let t=Tb[e];if(t)return t;t=Tb[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=dX(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}m2.defaultChars=";/?:@&=+$,-_.!~*'()#";m2.componentChars="-_.!~*'()";var ZT=m2;function I8(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 Pm(){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 fX=/^([a-z0-9.+-]+:)/i,pX=/:[0-9]*$/,hX=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,mX=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` -`," "]),gX=["'"].concat(mX),Eb=["%","/","?",";","#"].concat(gX),Ib=["/","?","#"],vX=255,Lb=/^[+a-z0-9A-Z_-]{0,63}$/,yX=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,$b={javascript:!0,"javascript:":!0},Nb={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function kX(e,t){if(e&&e instanceof Pm)return e;const n=new Pm;return n.parse(e,t),n}Pm.prototype.parse=function(e,t){let n,o,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const u=hX.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=fX.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&&$b[r])&&(i=i.substr(2),this.slashes=!0)),!$b[r]&&(s||r&&!Nb[r])){let u=-1;for(let g=0;g127?v+="x":v+=_[k];if(!v.match(Lb)){const k=g.slice(0,m),y=g.slice(m+1),x=_.match(yX);x&&(k.push(x[1]),y.unshift(x[2])),y.length&&(i=y.join(".")+i),this.hostname=k.join(".");break}}}}this.hostname.length>vX&&(this.hostname=""),h&&(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),Nb[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Pm.prototype.parseHost=function(e){let t=pX.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 L8=kX,GT=VT({decode:()=>g3,encode:()=>ZT,format:()=>I8,parse:()=>L8}),YT=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,XT=/[\0-\x1F\x7F-\x9F]/,bX=/[\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]/,JT=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,CX=/[\$\+<->\^`\|~\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]/,QT=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,wX=VT({Any:()=>YT,Cc:()=>XT,Cf:()=>bX,P:()=>JT,S:()=>CX,Z:()=>QT}),_X=Object.defineProperty,eE=e=>{let t={};for(var n in e)_X(t,n,{get:e[n],enumerable:!0});return t},bs=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}`}},xX=eE({arrayReplaceAt:()=>LX,assign:()=>EX,countLines:()=>Ko,escapeHtml:()=>HX,escapeRE:()=>WX,fromCodePoint:()=>Cp,has:()=>TX,isMdAsciiPunct:()=>Hm,isPunctChar:()=>Bm,isPunctCode:()=>v3,isSpace:()=>IX,isString:()=>AX,isValidEntityCode:()=>v2,isWhiteSpace:()=>bp,lib:()=>UX,mdurl:()=>GT,normalizeReference:()=>g2,ucmicro:()=>Dm,unescapeAll:()=>wp,unescapeMd:()=>RX});const Dm=wX;function SX(e){return Object.prototype.toString.call(e)}function AX(e){return SX(e)==="[object String]"}const MX=Object.prototype.hasOwnProperty;function TX(e,t){return MX.call(e,t)}function EX(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 IX(e){return e===9||e===32}function bp(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 Bm(e){return Dm.P.test(e)||Dm.S.test(e)}const Fb=new Map;function v3(e){if(Hm(e))return!0;if(e>=0&&e<128)return!1;const t=Fb.get(e);if(t!==void 0)return t;const n=Bm(String.fromCharCode(e));return Fb.set(e,n),n}function Hm(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 g2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function LX(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function v2(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 Cp(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 tE=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,$X=new RegExp(`${tE.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),NX=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function FX(e,t){if(t.charCodeAt(0)===35&&NX.test(t)){const o=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return v2(o)?Cp(o):e}const n=E8(e);return n!==e?n:e}function RX(e){return e.includes("\\")?e.replace(tE,"$1"):e}function wp(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace($X,(t,n,o)=>n||FX(t,o))}const OX=/[&<>"]/,PX=/[&<>"]/g,DX={"&":"&","<":"<",">":">",'"':"""};function BX(e){return DX[e]}function HX(e){return OX.test(e)?e.replace(PX,BX):e}const zX=/[.?*+^$[\]\\(){}|-]/g;function WX(e){return e.replace(zX,"\\$&")}const UX={mdurl:GT,ucmicro:Dm};function Ko(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` -`,n+1))!==-1;)t++;return t}const jX=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,VX=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,qX=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,$8=["references","footnotes","abbreviations","abbr","abbrs"],N8=Symbol.for("markdown-it-ts.global-state"),F8=Object.prototype.hasOwnProperty;function Rb(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 ja(e){if(Array.isArray(e))return e.map(t=>ja(t));if(Wr(e)){const t={};for(const n of Object.keys(e))t[n]=ja(e[n]);return t}return e}function zm(e){return Array.isArray(e)?e.map((t,n)=>String(n)):Wr(e)?Object.keys(e):[]}function y3(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)?!y3(s[r],nE(o.value,r)):!0)}}function aa(e){const t=R8(e);if(t){for(const n of $8){const o=t.snapshot[n];if(!o){delete e[n];continue}if(o.ownedKeys){ZX(e,n,o);continue}o.existed?e[n]=KX(e[n],o.value):delete e[n]}delete e[N8]}}function h9(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 k3=Symbol.for("markdown-it-ts.diagnostics");function Up(e,t){if(e)try{const n=e[k3];if(n&&typeof n=="object")return n;if(!t)return;const o={};return e[k3]=o,o}catch{return}}function ql(e){return Up(e,!1)}function YX(e){if(e)try{const t=e[k3];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function mi(e){YX(e)}function t1(e,t){const n=Up(e,!0);n&&(n.stockFast=t)}function ss(e,t){const n=Up(e,!0);n&&(n.strategy=t)}function m9(e,t){const n=Up(e,!0);n&&(n.chunk=t)}function oE(e,t){const n=Up(e,!0);n&&(n.unbounded=t)}function XX(e){const t={};e=e||{},t.src_Any=YT.source,t.src_Cc=XT.source,t.src_Z=QT.source,t.src_P=JT.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 b3(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function y2(e){return Object.prototype.toString.call(e)}function JX(e){return y2(e)==="[object String]"}function QX(e){return y2(e)==="[object Object]"}function eJ(e){return y2(e)==="[object RegExp]"}function Ob(e){return y2(e)==="[object Function]"}function tJ(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const sE={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function nJ(e){return Object.keys(e||{}).reduce(function(t,n){return t||sE.hasOwnProperty(n)},!1)}const oJ={"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}}},sJ="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]",iJ="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function rJ(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function Pb(){return function(e,t){t.normalize(e)}}function Wm(e){const t=e.re=XX(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(sJ),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,QX(a)){eJ(a.validate)?u.validate=rJ(a.validate):Ob(a.validate)?u.validate=a.validate:i(l,a),Ob(a.normalize)?u.normalize=a.normalize:a.normalize?i(l,a):u.normalize=Pb();return}if(JX(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:Pb()};const r=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(tJ).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 iE(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 ar(e,t){if(!(this instanceof ar))return new ar(e,t);t||nJ(e)&&(t=e,e={}),this.__opts__=b3({},sE,t),this.__schemas__=b3({},oJ,e),this.__compiled__={},this.__tlds__=iJ,this.__tlds_replaced__=!1,this.re={},Wm(this)}ar.prototype.add=function(t,n){return this.__schemas__[t]=n,Wm(this),this};ar.prototype.set=function(t){return this.__opts__=b3(this.__opts__,t),this};ar.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)};ar.prototype.pretest=function(t){return this.re.pretest.test(t)};ar.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0};ar.prototype.match=function(t){const n=[],o=[],s=[],i=[];let r,l,a;function u(f,h){return f?h?f.index!==h.index?f.index=h.lastIndex?f:h:f:h}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]]],h=u(u(f[0],f[1]),f[2]);if(!h)break;if(h===f[0]?c[0]++:h===f[1]?c[1]++:c[2]++,h.index{const d=/^xn--/,f=/[^\0-\x7F]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=35,w=Math.floor,_=String.fromCharCode;function v(H){throw new RangeError(g[H])}function k(H,O){const F=[];let W=H.length;for(;W--;)F[W]=O(H[W]);return F}function y(H,O){const F=H.split("@");let W="";F.length>1&&(W=F[0]+"@",H=F[1]),H=H.replace(h,".");const z=k(H.split("."),O).join(".");return W+z}function x(H){const O=[];let F=0;const W=H.length;for(;F=55296&&z<=56319&&FString.fromCodePoint(...H),$=function(H){return H>=48&&H<58?26+(H-48):H>=65&&H<91?H-65:H>=97&&H<123?H-97:36},S=function(H,O){return H+22+75*(H<26)-((O!=0)<<5)},I=function(H,O,F){let W=0;for(H=F?w(H/700):H>>1,H+=w(H/O);H>m*26>>1;W+=36)H=w(H/m);return w(W+(m+1)*H/(H+38))},P=function(H){const O=[],F=H.length;let W=0,z=128,U=72,q=H.lastIndexOf("-");q<0&&(q=0);for(let K=0;K=128&&v("not-basic"),O.push(H.charCodeAt(K));for(let K=q>0?q+1:0;K=F&&v("invalid-input");const Ee=$(H.charCodeAt(K++));Ee>=36&&v("invalid-input"),Ee>w((2147483647-W)/Y)&&v("overflow"),W+=Ee*Y;const de=le<=U?1:le>=U+26?26:le-U;if(Eew(2147483647/he)&&v("overflow"),Y*=he}const ne=O.length+1;U=I(W-ie,ne,ie==0),w(W/ne)>2147483647-z&&v("overflow"),z+=w(W/ne),W%=ne,O.splice(W++,0,z)}return String.fromCodePoint(...O)},D=function(H){const O=[];H=x(H);const F=H.length;let W=128,z=0,U=72;for(const ie of H)ie<128&&O.push(_(ie));const q=O.length;let K=q;for(q&&O.push("-");K=W&&Yw((2147483647-z)/ne)&&v("overflow"),z+=(ie-W)*ne,W=ie;for(const Y of H)if(Y2147483647&&v("overflow"),Y===W){let le=z;for(let Ee=36;;Ee+=36){const de=Ee<=U?1:Ee>=U+26?26:Ee-U;if(le32))return i;if(o===41){if(r===0)break;r--}s++}return t===s||r!==0||(i.str=wp(e.slice(t,s)),i.pos=s,i.ok=!0),i}var aE=D8;const zh=-2;function aJ(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=aJ(l,t,a,n);if(f!==zh)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 dJ(e,t,n){const o=k2(e,t);o<0?z8(e,[t,n]):e.attrs[o][1]=`${e.attrs[o][1]} ${n}`}var fJ=eE({attrGet:()=>cJ,attrIndex:()=>k2,attrJoin:()=>dJ,attrPush:()=>z8,attrSet:()=>uJ,parseLinkDestination:()=>D8,parseLinkLabel:()=>B8,parseLinkTitle:()=>H8});function pJ(e){return e.includes("\r")||e.includes("\0")}function cE(e){return typeof e=="string"?e:e.toString()}function hJ(e){if(e.inlineMode){const t=new bs("inline","",0);t.content=cE(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 mJ=/^([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])?)*)$/,gJ=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function vJ(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(gJ.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(mJ.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 dE=vJ;function yJ(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 fE=yJ;function Db(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 h=u>0&&!e[u-1].open?i[u-1]+1:0;i[r]=r-u+h,i[u]=h,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 kJ(e){const t=e.tokens_meta,n=e.tokens_meta.length;Db(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?pE:hE,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 h=o[u];c?(h.type="strong_close",h.tag="strong",h.nesting=-1,h.markup=d+d,h.content=""):(h.type="em_close",h.tag="em",h.nesting=-1,h.markup=d,h.content=""),c&&(o[t[s-1].token].content="",o[t[i.end+1].token].content="",s--)}}function wJ(e){const t=e.tokens_meta,n=e.tokens_meta.length;Bb(e,e.delimiters);for(let o=0;o=48&&e<=57}function _J(e){const t=e|32;return W8(e)||t>=97&&t<=102}function gE(e){const t=e|32;return t>=97&&t<=122}function xJ(e){return gE(e)||W8(e)}function SJ(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 AJ(e,t,n){let o=t+1;if(o>=n||!gE(e.charCodeAt(o)))return null;for(o++;o=n||e.charCodeAt(o)!==59)return null;const s=e.slice(t,o+1);return mE(s)!==s?s:null}function MJ(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=SJ(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=v2(i)?Cp(i):Cp(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=AJ(e.src,n,o);if(s){const i=mE(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 vE=MJ;const yE=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),w3=new Array(128),kE=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);w3[e]=`\\${t}`,kE[e]=yE[e]?t:w3[e]}function Hb(e,t,n){e.pending&&e.pushPending();const o=new bs("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 TJ(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 Hb(e,i<256&&yE[i]?r:l,l),e.pos=n+1,!0}var bE=TJ;function EJ(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*\\/?>`,wE="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",LJ=new RegExp(`^(?:${CE}|${wE}||<\\?[\\s\\S]*?\\?>|]*>|)`),$J=new RegExp(`^(?:${CE}|${wE})`);function _E(e){return e===32||e===9||e===10||e===12||e===13}function NJ(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||_E(t)}function FJ(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 OJ(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&&!RJ(i))return!1;const r=s.slice(o).match(LJ);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,NJ(l)&&e.linkLevel++,FJ(l)&&e.linkLevel--}return e.pos+=l.length,!0}var xE=OJ;function PJ(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 h=e.pos+2,g=Um(e,e.pos+1,!1);if(g<0)return!1;if(i=g+1,i=f)return!1;if(l=aE(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=g+1):i=g+1,s||(s=e.src.slice(h,g)),r=e.env.references[g2(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){o=e.src.slice(h,g);const m=[];e.md.inline.parse(o,e.md,e.env,m);const w=e.push("image","img",0);w.attrs=[["src",c],["alt",""]],w.children=m,w.content=o,a&&w.attrs.push(["title",a])}return e.pos=i,e.posMax=f,!0}var SE=PJ;function g9(e,t,n){for(;t"u")return!1;let d;if(l=r+1,l=0?(d=n.slice(h,g),d||(d=n.slice(i,r)),l=g+1):d=n.slice(i,r)}else d=n.slice(i,r);const f=e.env.references[g2(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 AE=DJ;function ME(e){const t=e|32;return t>=97&&t<=122}function BJ(e){return e>=48&&e<=57}function HJ(e){return ME(e)||BJ(e)||e===43||e===45||e===46}function zJ(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&HJ(e.charCodeAt(t));)t--;return t++,t>=e.length||!ME(e.charCodeAt(t))?null:e.slice(t)}function WJ(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=zJ(e.pending);if(!s)return!1;const i=WJ(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 UJ(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||Wb(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 ZJ(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 LE(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:U8(),records:Object.create(null)};return t.__mdtsRuleProfile=o,o}function Wd(e,t,n,o,s,i){const r=LE(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=ZJ(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=U8()}function GJ(e){const t=LE(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}},$E=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 bs("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 bs(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 bs(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 jb(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return EE(e,t);case 33:return SE(e,t);case 38:return vE(e,t);case 42:case 95:return C3.tokenize(e,t);case 58:return e.md.options.linkify&&TE(e,t);case 60:return dE(e,t)||xE(e,t);case 91:return AE(e,t);case 92:return bE(e,t);case 96:return fE(e,t);case 126:return _3.tokenize(e,t);default:return IE(e,t)}}function NE(e){return!YJ.test(e)}var XJ=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new Ub,this.ruler2=new Ub,this.ruler.push("text",IE),this.ruler.push("linkify",TE),this.ruler.push("newline",EE),this.ruler.push("escape",bE),this.ruler.push("backticks",fE),this.ruler.push("strikethrough",_3.tokenize),this.ruler.push("emphasis",C3.tokenize),this.ruler.push("link",AE),this.ruler.push("image",SE),this.ruler.push("autolink",dE),this.ruler.push("html_inline",xE),this.ruler.push("entity",vE),this.ruler2.push("balance_pairs",bJ),this.ruler2.push("strikethrough",_3.postProcess),this.ruler2.push("emphasis",C3.postProcess),this.ruler2.push("fragments_join",IJ),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=jb(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()&&NE(e)){const a=new bs("text","",0);a.content=e,o.push(a);return}const s=new $E(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&&NE(i.content)){const r=new bs("text","",0);r.content=i.content,i.children.push(r);continue}e.md.inline.parse(i.content,e.md,e.env,i.children)}}}const QJ=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,eQ=/[0-9a-z]/i;function tQ(e){return/^\s]/i.test(e)}function nQ(e){return/^<\/a\s*>/i.test(e)}function oQ(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"&&(tQ(l.content)&&i>0&&i--,nQ(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(h=>oQ(e.md.linkify,h));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 h=0;hf){const x=new bs("text","",0);x.content=a.slice(f,_),x.level=d,c.push(x)}const v=new bs("link_open","a",1);v.attrs=[["href",m]],v.level=d++,v.markup="linkify",v.info="auto",c.push(v);const k=new bs("text","",0);k.content=w,k.level=d,c.push(k);const y=new bs("link_close","a",-1);y.level=--d,y.markup="linkify",y.info="auto",c.push(y),f=g.lastIndex}if(f!==0){if(f=0;n--){const o=e[n];o.type==="text"&&!t&&(o.content=o.content.replace(uQ,dQ)),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function pQ(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&FE.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 hQ(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(""):"");aQ.test(o)&&fQ(n.children||[]),FE.test(o)&&pQ(n.children||[])}}var mQ=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 gQ=/['"]/,Vb=/['"]/g,qb="’";function lh(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function vQ(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 w=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=_,h=v),!f&&!h){g&&(r.content=lh(r.content,d.index,qb));continue}if(h)for(n=o.length-1;n>=0;n--){let x=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("");!gQ.test(o)||!n.children||vQ(n.children,e)}}function kQ(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 h=[],g=[],m=[],w=[],_=e.md.block.ruler.getRulesForState(e,"blockquote"),v=e.parentType;e.parentType="blockquote";let k=!1,y;for(y=t;y=d)break;if(s.charCodeAt(c++)===62&&!I){let D=a[y]+1,T,L;s.charCodeAt(c)===32?(c++,D++,L=!1,T=!0):s.charCodeAt(c)===9?(T=!0,(u[y]+D)%4===3?(c++,D++,L=!1):L=!0):T=!1;let B=D;for(h.push(i[y]),i[y]=c;c=d,g.push(u[y]),u[y]=a[y]+1+(T?1:0),m.push(a[y]),a[y]=B-D,w.push(l[y]),l[y]=c-i[y];continue}if(k)break;let P=!1;for(let D=0,T=_.length;D";const $=[t,0];M.map=$,e.md.block.tokenize(e,t,y);const S=e.push("blockquote_close","blockquote",-1);S.markup=">",e.lineMax=f,e.parentType=v,$[1]=e.line;for(let I=0;I=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 SQ(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&&Gb(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const h=e.push("heading_open",Kb[d],1);h.markup=Zb[d],h.map=[t,e.line];const g=e.push("inline","",0);g.content=s.slice(a,u).trim(),g.map=[t,e.line],g.children=[];const m=e.push("heading_close",Kb[d],-1);return m.markup=Zb[d],!0}function MQ(e){switch(e){case 9:case 32:return!0}return!1}function TQ(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(`${$J.source}\\s*$`),/^$/,!1]];function EQ(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=48&&e<=57}var BE=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 h=o?this.eMarks[c]+1:this.eMarks[c];let g=0;const m=this.src,w=this.bsCount,_=this.tShift;for(;fn?new Array(g-n+1).join(" ")+m.slice(f,h):m.slice(f,h)}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(g,m):s[c]=i.slice(g,m)}return s.join("")}};BE.prototype.Token=bs;function LQ(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:LQ(n,o,s)}const Xb=["","h1","h2"];function $Q(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=HE(e);if(a[t]-u>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,h,g=t+1;for(;g=x)break;if(a[g]-u>3)continue;if(a[g]>=u&&(h=s.charCodeAt(y),h===45||h===61)){let $=y+1,S=$;for(;$=x){f=h===61?1:2;break}if(S-y>1)continue}if(a[g]<0||c&&!zE(e,g,s,y,x))continue;let M=!1;for(let $=0,S=o.length;$y;){const M=s.charCodeAt(x-1);if(M!==9&&M!==32)break;x--}m=s.slice(y,x)}else m=e.getLines(t,g,u,!1).trim();e.line=g+1;const w=h===61?"=":"-",_=e.push("heading_open",Xb[f],1);_.markup=w,_.map=[t,e.line];const v=e.push("inline","",0);v.content=m,v.map=[t,e.line-1],v.children=[];const k=e.push("heading_close",Xb[f],-1);return k.markup=w,e.parentType=d,!0}function WE(e){switch(e){case 9:case 32:return!0}return!1}function Jb(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 h=e.src,g=e.bMarks,m=e.tShift,w=e.eMarks,_=e.sCount,v=e.bsCount,k=g[l]+m[l];if(k>=w[l])return!1;const y=h.charCodeAt(k);if(y>=48&&y<=57){if(f=Qb(e,l),f<0||(c=!0,r=k,d=NQ(e,l,f),u&&d!==1))return!1}else if(y===42||y===45||y===43){if(f=Jb(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=w[l])return!1;if(o)return!0;const x=h.charCodeAt(f-1),M=String.fromCharCode(x);if(c){const T=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(T.attrs=[["start",String(d)]])}else e.push("bullet_list_open","ul",1);const $=[l,0];e.tokens[e.tokens.length-1].map=$,e.tokens[e.tokens.length-1].markup=M;let S=!1;const I=e.tokens.length-1,P=e.md.block.ruler.getRulesForState(e,"list"),D=e.parentType;for(e.parentType="list";l=s?H=1:H=L-T,H>4&&(H=1);const O=T+H,F=e.push("list_item_open","li",1);F.markup=M;const W=[l,0];F.map=W,c&&(F.info=f-r-1===1?FQ[h.charCodeAt(r)-48]:h.slice(r,f-1));const z=e.tight,U=e.tShift[l],q=e.sCount[l],K=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=O,e.tight=!0,e.tShift[l]=B-g[l],e.sCount[l]=L,B>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||S)&&(a=!1),S=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=K,e.tShift[l]=U,e.sCount[l]=q,e.tight=z,e.push("list_item_close","li",-1).markup=M,l=e.line,W[1]=l,l>=n||e.sCount[l]=4)break;let ie=!1;for(let ne=0,Y=P.length;ne3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const k=r[f]+l[f],y=a[f];if(k=y||eC(i.charCodeAt(k+1)))break}else if(x>=48&&x<=57&&k+1=y){M=-1;break}const $=i.charCodeAt(M++);if($>=48&&$<=57){if(M-k>=10){M=-1;break}continue}if(($===41||$===46)&&(M>=y||eC(i.charCodeAt(M))))break;M=-1;break}if(M>=0)break}}}const w=r[f]+l[f],_=a[f];if(d&&!zE(e,f,i,w,_))continue;let v=!1;for(let k=0,y=o.length;k=4||e.src.charCodeAt(s)!==91)return!1;function a(k){const y=e.lineMax;if(k>=y||e.isEmpty(k))return null;let x=!1;if(e.sCount[k]-e.blkIndent>3&&(x=!0),e.sCount[k]<0&&(x=!0),!x){const S=e.parentType;e.parentType="reference";let I=!1;for(let P=0,D=l.length;P"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:_,href:f}),e.line=r),!0):!1}function v9(e){switch(e){case 9:case 32:return!0}return!1}const BQ=65536;function y9(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(n,o)}function HQ(e,t){if(e.lineFlags)return(e.lineFlags[t]&H1.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&&!v9(l)||r===45&&v9(l)||!HQ(e,t))return!1;for(;i=4)return!1;u=tC(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 h=e.md.block.ruler.getRulesForState(e,"blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const w=e.push("thead_open","thead",1);w.map=[t,t+1];const _=e.push("tr_open","tr",1);_.map=[t,t+1];for(let y=0;y=4||(u=tC(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),k+=d-u.length,k>BQ))break;if(s===t+2){const M=e.push("tbody_open","tbody",1);M.map=v=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let M=0;Mr.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 Wd(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 uh=[["table",zQ,["paragraph","reference"]],["code",xQ],["fence",SQ,["paragraph","reference","blockquote","list"]],["blockquote",_Q,["paragraph","reference","blockquote","list"]],["hr",TQ,["paragraph","reference","blockquote","list"]],["list",OQ,["paragraph","reference","blockquote"]],["reference",DQ],["html_block",EQ,["paragraph","reference","blockquote"]],["heading",AQ,["paragraph","reference","blockquote"]],["lheading",$Q],["paragraph",PQ]];var UQ=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new WQ;for(let e=0;e=a[c];)c++;if(e.line=c,c>=n||u[c]=i){e.line=n;break}const h=e.line;let g=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}if(!g)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 h=e.line;let g=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}}if(!g)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 BE(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}},UE=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}};UE.prototype.Token=bs;const nC=[["normalize",lQ],["block",hJ],["inline",JJ],["linkify",sQ],["replacements",hQ],["smartquotes",yQ],["text_join",kQ]],jQ={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},VQ={parseLinkLabel:B8,parseLinkDestination:D8,parseLinkTitle:H8};function qQ(){return{...jQ}}function KQ(){return{...VQ}}var ZQ=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new UQ,this.inline=new XJ,this.ruler=new mQ;for(let e=0;e@[\]\\^_`{}~]/;function jm(e){return!GQ.test(e)}function k1(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Wh(e,t,n){for(let o=t;o3)return jm(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(!jm(c))return!1;const d=XQ[i],f=JQ[i],h=br("heading_open",d,1,0);h.map=[s,s+1],h.markup=f,e.push(h),e.push(j8(c,s,1));const g=br("heading_close",d,-1,0);return g.markup=f,e.push(g),!0}function eee(e,t,n){const o=br("paragraph_open","p",1,0);o.map=[n,n+1],e.push(o),e.push(j8(t,n,1)),e.push(br("paragraph_close","p",-1,0))}function tee(e,t,n){const o=e.charCodeAt(n-1);return o===32||o===9?e.slice(t,n).trim():e.slice(t,n)}function w9(e,t){for(;t=1e5?sC:C9,s="",i=!1,r=!1,l=0,a=0;for(;l"]/,iC=/[&<>"]/g,aee=/&/g,uee=/[<>"]/g,cee={"&":"&","<":"<",">":">",'"':"""};function _9(e){return cee[e]||e}function Qn(e){if(e.length===0)return"";if(e.length<32)return lee.test(e)?e.replace(iC,_9):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(aee,"&"):t?e.replace(iC,_9):e.replace(uee,_9)}const dee=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),fee=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function jE(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(dee,(t,n,o)=>{if(n)return n;if(fee.test(o)){const i=o[1].toLowerCase()==="x"?Number.parseInt(o.slice(2),16):Number.parseInt(o.slice(1),10);return v2(i)?Cp(i):"�"}const s=E8(t);return s!==t?s:t})}const pee=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,hee=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,mee=/"/g;function Ad(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Vm(e,t,n){for(let o=t;o=e.length||e.charCodeAt(t)===10?!1:!Vm(e,t,Ad(e,t))}function rC(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=V8(e.slice(i,r));return a===null?null:`${a} -`}function lC(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`
    3. ${e[t]}
    4. -`}function bee(e,t,n){const o=t+2;if(n===o+1)return kee(e,o);const s=V8(e.slice(t+2,n));return s===null?null:`
    5. ${s}
    6. -`}function Cee(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 -`;y -`,l=_,a=v}let k=ch(e,w);for(;k${w}

      -`,u=h,c=g}const m=de.core.parse(t,n,e).tokens);let r=Uh(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=Mee(r,s.maxChunks)),jh(t,r))return m9(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),zd(n,i,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return m9(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:i||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!i}),zd(n,i,()=>{for(let u=0;u=3&&(c?c.marker===k&&x>=c.length&&(c=null):c={marker:k,length:x})}}const w=g-f;s+=w,i+=1,l+=1,m?(a=0,u=0):(a+=1,u+=w);const _=m;if((s>=t.maxChunkChars||i>=t.maxChunkLines)&&!c)if(_)d(g);else{const v=Math.max(10,Math.floor(t.maxChunkLines*.5)),k=Math.max(t.maxChunkChars,8e3);(a>=v||u>=k)&&d(g)}f=g}return n&&d(e.length),o}function jh(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 Aee(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 Ca(e){return e.length===0?0:Ko(e)+(e.charCodeAt(e.length-1)===10?0:1)}function Fee(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 Oee(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 Fee(e,n+1,e.length-1)?!Ree(e,t):!1}function Pee(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??Lee:e.options.fullChunkSizeChars??Eee),l=o.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??$ee:e.options.fullChunkSizeLines??Iee);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 jp=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=Ca(this.pending);if(this.pending.length=o||n>=s}function YE(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??qE))return"yes";const o=e.options.autoUnboundedThresholdLines??KE;return n!==void 0?n>=o?"yes":"no":t+1e.core.parse(t,n,e).tokens);const i=[],r=new jp(e,{mode:"full",...o,retainTokens:!1,onChunkTokens(l){ZE(i,l)}});if(s&&O8(n,s),r.feed(t),r.flushForce(n),s&&(P8(n),o.fallbackOnGlobalState===!1)){const l=ql(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return i}const Ud=(e,t,n)=>en?n:e;function XE(e){return e.experimental?{...e,...e.experimental}:e}const cC=[{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"}],dC=[{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 JE(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function Wee(e,t=Math.max(0,e/40|0),n={}){const o=XE(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:Ud(Math.ceil(e/i),8e3,64e3),maxChunkLines:Ud(Math.ceil(t/i),150,700),maxChunks:Ud(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 fC(e,t=Math.max(0,e/40|0),n={}){const o=XE(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:Ud(Math.ceil(e/i),8e3,64e3),maxChunkLines:Ud(Math.ceil(t/i),150,700),maxChunks:Ud(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 Uee={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"]}}},jee={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Vee={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 b2(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function Vh(e,t){if(b2(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const pC=e=>b2(e)?e:Promise.resolve(e);function W1(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 Qa(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${W1(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 _p(e){return!e.attrs||e.attrs.length===0?`${Qn(e.content)}`:`${Qn(e.content)}`}function x3(e){const t=Qn(e.content);return e.attrs?`${t} -`:`
      ${t}
      -`}function qee(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 hC(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function Kee(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 mC(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 Km(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 Zee={langPrefix:"language-",xhtmlOut:!1,breaks:!1},dh=Object.prototype.hasOwnProperty,Fn={code_inline(e,t){return _p(e[t])},code_block(e,t){return x3(e[t])},fence(e,t,n,o,s){const i=e[t],r=i.info?jE(i.info).trim():"",{langName:l,langAttrs:a}=QE(r),u=n.highlight,c=Qn(i.content);if(!u)return U1(i,c,r,l,n);const d=u(i.content,l,a);return b2(d)?d.then(f=>U1(i,f||c,r,l,n)):U1(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]],Km(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 gC(e,t,n){const o=e.info?jE(e.info).trim():"",{langName:s,langAttrs:i}=QE(o),r=t.highlight,l=Qn(e.content);if(!r)return U1(e,l,o,s,t);const a=r(e.content,s,i);if(b2(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return U1(e,a||l,o,s,t)}function x9(e,t,n,o){switch(e.type){case"text":return t.text===Fn.text?e.content.length===0?"":Qn(e.content):null;case"text_special":return t.text_special===Fn.text_special?e.content.length===0?"":Qn(e.content):null;case"softbreak":return t.softbreak===Fn.softbreak?o:null;case"hardbreak":return t.hardbreak===Fn.hardbreak?n:null;case"html_inline":return t.html_inline===Fn.html_inline?e.content:null;case"code_inline":return t.code_inline===Fn.code_inline?_p(e):null;default:return null}}function Gee(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===Fn.text)return i.content.length===0?"":Qn(i.content);break;case"text_special":if(s.text_special===Fn.text_special)return i.content.length===0?"":Qn(i.content);break;case"softbreak":if(s.softbreak===Fn.softbreak)return t.breaks?t.xhtmlOut?`
      -`:`
      -`:` -`;break;case"hardbreak":if(s.hardbreak===Fn.hardbreak)return t.xhtmlOut?`
      -`:`
      -`;break;case"html_inline":if(s.html_inline===Fn.html_inline)return i.content;break;case"code_inline":if(s.code_inline===Fn.code_inline)return _p(i);break}const r=s[i.type];if(!r)return Km(i,t.xhtmlOut===!0);const l=r(e,0,t,n,o);return typeof l=="string"?l:Vh(l,i.type)}var Yee=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...Fn}}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,h="",g="",m=!1,w="";for(let _=0;_0&&e[_-1].hidden?` -`:"";if(k==="list_item_open"&&(!v.attrs||v.attrs.length===0)&&_+3${this.renderInlineTokens(S.children||[],o,s)}`,_+=3;continue}}if(_+2 -`,_+=2;continue}}}if(k==="inline"){const $=v.children||[];if($.length===1){m||(l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,h=o.xhtmlOut?`
      -`:`
      -`,g=o.breaks?h:` -`,m=!0);const S=$[0];switch(S.type){case"text":if(l===Fn.text){w+=Qn(S.content);continue}break;case"text_special":if(a===Fn.text_special){w+=Qn(S.content);continue}break;case"softbreak":if(u===Fn.softbreak){w+=g;continue}break;case"hardbreak":if(c===Fn.hardbreak){w+=h;continue}break;case"html_inline":if(d===Fn.html_inline){w+=S.content;continue}break;case"code_inline":if(f===Fn.code_inline){w+=_p(S);continue}break}}w+=this.renderInlineTokens($,o,s);continue}const x=i[k];if(!x){const $=v.attrs;if(!v.hidden){if(!$||$.length===0)switch(k){case"hr":w+=r?`


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

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

      -`;continue;case"list_item_open":{const S=e[_+1];w+=y+(S&&(S.type==="inline"||S.hidden||S.nesting===-1&&S.tag==="li")?"
    7. ":`
    8. -`);continue}case"list_item_close":w+=`
    9. -`;continue;case"bullet_list_open":w+=`${y}
        -`;continue;case"bullet_list_close":w+=`
      -`;continue;case"blockquote_open":w+=y+(e[_+1]&&e[_+1].nesting===-1&&e[_+1].tag==="blockquote"?"
      ":`
      -`);continue;case"blockquote_close":w+=`
      -`;continue;case"ordered_list_open":w+=`${y}
        -`;continue;case"ordered_list_close":w+=`
      -`;continue;case"table_open":w+=`${y} -`;continue;case"table_close":w+=`
      -`;continue;case"thead_open":w+=`${y} -`;continue;case"thead_close":w+=` -`;continue;case"tbody_open":w+=`${y} -`;continue;case"tbody_close":w+=` -`;continue;case"tr_open":w+=`${y} -`;continue;case"tr_close":w+=` -`;continue;case"td_open":w+=`${y}`;continue;case"td_close":w+=` -`;continue;case"th_open":w+=`${y}`;continue;case"th_close":w+=` -`;continue}else if($.length===1){const S=$[0];if(k==="ordered_list_open"&&S[0]==="start"){w+=`${y}
        -`;continue}if(k==="td_open"&&S[0]==="style"){w+=`${y}`;continue}if(k==="th_open"&&S[0]==="style"){w+=`${y}`;continue}}}w+=this.renderToken(e,_,o);continue}if(k==="code_block"&&x===Fn.code_block){w+=x3(v);continue}if(k==="fence"&&x===Fn.fence){w+=gC(v,o);continue}if(k==="html_block"&&x===Fn.html_block){w+=v.content;continue}const M=x(e,_,o,s,this);typeof M=="string"?w+=M:w+=Vh(M,v.type)}return w}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(dh.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),dh.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(dh.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(dh.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...Zee,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===Fn.code_block)return x3(t);if(i==="html_block"&&s.html_block===Fn.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):Km(t,r.xhtmlOut===!0);if(i==="fence"&&a===Fn.fence)return gC(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:Vh(u,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Gee(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,h=o.link_open,g=o.link_close,m=o.em_open,w=o.em_close,_=o.strong_open,v=o.strong_close;let k="";for(let y=0;y`;if(u===Fn.softbreak&&y+3`,y+=1;continue}if(x.type==="em_open"&&!m&&!w&&y+2${I}`,y+=2;continue}}}if(x.type==="strong_open"&&!_&&!v&&y+2${I}`,y+=2;continue}}}switch(x.type){case"text":if(l===Fn.text){const S=x.content.length===0?"":Qn(x.content);if(d===Fn.html_inline&&y+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=de,!oe&&he!==void 0&&(pe=Ko(e),oe=pe>=he)),oe){const G=this.parseFullDocument(e,L,n,pe,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(L,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ql(L)?.unbounded}),G.tokens}else if(W){const G=(ce,ue,Se)=>ceSe?Se:ce;pe===void 0&&(pe=Ko(e));const X=Y&&!ne?fC(e.length,pe,n.options):null,fe=X?.maxChunkChars??(z?G(Math.ceil(e.length/U),8e3,64e3):q??1e4),Ce=X?.maxChunkLines??(z?G(Math.ceil(pe/U),150,700):K??200),ge=X?.maxChunks??(z?G(Math.ceil(e.length/64e3),U,32):ie),Q=e.length>0&&e.charCodeAt(e.length-1)===10,ee=F&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&X?.strategy!=="plain";if((O||ee)&&(e.length>=fe*2||pe>=Ce*2)&&Q){const ce=qm(n,e,L,{maxChunkChars:fe,maxChunkLines:Ce,fenceAware:X?.fenceAware??le,maxChunks:ge});return this.cache={src:e,tokens:ce,env:L,lineCount:pe,lastSegment:void 0,globalStateReason:Ni(e)},this.updateCacheLineCount(this.cache,pe),this.recordChunkedParseResult(L,O?"explicit-initial-large-doc":"default-initial-large-doc"),ce}}const ve=this.parseFullDocument(e,L,n,pe);return pe=ve.lineCount,this.cache={src:e,tokens:ve.tokens,env:L,lineCount:pe,lastSegment:void 0,globalStateReason:Ni(e)},this.updateCacheLineCount(this.cache,pe),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(L,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ql(L)?.unbounded}),ve.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",ss(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=Ni(s.src),s.globalStateReason=r);const l=r?null:i!==null?this.detectGlobalStateForAppend(s,i):Ni(e),a=r||l;if(a){const L=o??s.env;aa(L);const B=Ni(e),H=this.parseFullDocument(e,L,n),O=H.tokens,F=H.lineCount;return this.cache={src:e,tokens:O,env:L,lineCount:F,lastSegment:void 0,globalStateReason:B},this.updateCacheLineCount(this.cache,F),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(L,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ql(L)?.unbounded}),O}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,L);let H=null;const O=n.options?.streamContextParseStrategy??"chars",F=n.options?.streamContextParseMinChars??200,W=n.options?.streamContextParseMinLines??2;let z;const U=()=>(z===void 0&&(z=Ko(c)),z),q=this.canDirectlyParseAppend(s),K=q&&this.shouldUseUnboundedAppend(e,s,c);let ie=!1;if(!q)switch(O){case"lines":ie=U()>=W;break;case"constructs":if(c.length>=F){ie=!0;break}if(Qee(c)){ie=!0;break}ie=U()>=W;break;case"chars":default:ie=c.length>=F}if(B>0&&ie){const le=this.getTailLines(s.src,B)+c;try{const Ee=this.core.parse(le,s.env,n).tokens,de=Ee.findIndex(he=>he.map&&typeof he.map[1]=="number"&&he.map[1]>B);if(de!==-1){const he=Ee.slice(de),pe=L-B;pe!==0&&this.shiftTokenLines(he,pe),H={tokens:he}}}catch{H=null}}else H=null;if(!H){const le=L;if(K)H={tokens:z1(n,c,s.env,{mode:"stream"})},le>0&&this.shiftTokenLines(H.tokens,le);else{const Ee=this.core.parse(c,s.env,n);le>0&&this.shiftTokenLines(Ee.tokens,le),H=Ee}}let ne=0;if(s.tokens.length>0&&H.tokens.length>0){const le=s.tokens[s.tokens.length-1],Ee=H.tokens[0];try{le.type==="inline"&&Ee.type==="inline"&&(Ee.children&&Ee.children.length>0&&(le.children||(le.children=[]),this.appendTokens(le.children,Ee.children)),le.content=(le.content||"")+(Ee.content||""),ne=1)}catch{ne=0}}const Y=s.tokens.length;if(H.tokens.length>ne){const le=s.tokens,Ee=H.tokens,de=Math.min(le.length,Ee.length-ne);let he=0;for(let pe=de;pe>0;pe--){let oe=!0;for(let ve=0;ve0&&(ne+=he),Ee.length>ne&&this.appendTokens(s.tokens,Ee,ne)}if(s.src=e,s.globalStateReason=null,s.lineCount=L+(z??U()),s.tokens.length>Y){const le=this.getLastSegment(s.tokens,e,Y,s.tokens.length,e.length-c.length,L);le?s.lastSegment=le:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,K&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",ss(s.env,{area:"stream",path:K?"stream-unbounded-append":"stream-append",reason:K?"large-delta":"safe-append",unbounded:K}),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",ss(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const h=!!n.__explicitStreamChunkFallbackSetting,g=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,w=!h&&!c&&g,_=m||w,v=n.options?.streamChunkAdaptive!==!1,k=n.options?.streamChunkTargetChunks??8,y=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,M=n.options?.streamChunkMaxChunks,$=!!n.__explicitStreamChunkConfig,S=n.options?.autoTuneChunks!==!1,I=n.options?.streamChunkFenceAware??!0;let P=c&&s.lineCount!==void 0?s.lineCount+Ko(c):void 0;if(_){P===void 0&&(P=Ko(e));const L=(U,q,K)=>UK?K:U,B=S&&!$?fC(e.length,P,n.options):null,H=B?.maxChunkChars??(v?L(Math.ceil(e.length/k),8e3,64e3):y??1e4),O=B?.maxChunkLines??(v?L(Math.ceil(P/k),150,700):x??200),F=B?.maxChunks??(v?L(Math.ceil(e.length/64e3),k,32):M),W=e.length>0&&e.charCodeAt(e.length-1)===10,z=w&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&B?.strategy!=="plain";if((m||z)&&(e.length>=H*2||P>=O*2)&&W){const U=qm(n,e,d,{maxChunkChars:H,maxChunkLines:O,fenceAware:B?.fenceAware??I,maxChunks:F});return this.cache={src:e,tokens:U,env:d,lineCount:P,lastSegment:void 0,globalStateReason:Ni(e)},this.updateCacheLineCount(this.cache,P),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),U}}const D=this.parseFullDocument(e,d,n,P),T=D.tokens;return P=D.lineCount,this.cache={src:e,tokens:T,env:d,lineCount:P,lastSegment:void 0,globalStateReason:Ni(e)},this.updateCacheLineCount(this.cache,P),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ql(d)?.unbounded}),T}recordChunkedParseResult(e,t){const n=ql(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",ss(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!ql(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",ss(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=Ni(e);Wp(t)&&aa(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?YE(n,e.length,o):"no";if(r==="yes"){const a=z1(n,e,t);return ss(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?Ko(e):0)}}let l=o;if(r==="need-lines"&&(l=Ko(e),GE(n,e.length,l))){const a=z1(n,e,t);return ss(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?Ko(e):0),{tokens:zd(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:Ko(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+Ko(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??Jee}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sS9?n.slice(n.length-S9):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 h=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),g=this.getListParagraphMode(c,0,c.length,0);(h==="loose"||g==="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+Ko(i);t.lineCount=m;const w=this.getDocLineCount(e,m);return r.map&&(r.map[1]=w),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:w,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(g.length===0)return null;const m=s.lineEnd-2;m!==0&&this.shiftTokenLines(g,m);const w=h.tbodyCloseIndex>=0?h.tbodyCloseIndex:h.tableCloseIndex,_=t.lineCount??Ko(t.src);t.tokens.splice(w,0,...g),t.src=e,t.env=n,t.globalStateReason=null;const v=_+Ko(i);t.lineCount=v;const k=this.getDocLineCount(e,v);if(r.map&&(r.map[1]=k),h.tbodyOpenIndex>=0){const y=t.tokens[h.tbodyOpenIndex];y?.map&&(y.map[1]=k)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:k,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=Ko(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 yC={default:jee,zero:Vee,commonmark:Uee};function ote(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function ste(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 kC(e){return e.experimental?{...e,...e.experimental}:e}function gr(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 bC(e,t,n){for(let o=0;o=4?n.quotes=[S[0],S[1],S[2],S[3]]:n.quotes=["“","”","‘","’"]}let r=bC(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=bC(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=CC(i?.options,s,"fullChunkedFallback"),u=CC(i?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const h=new ZQ;let g=null;const m=()=>(g||(g=new Xee(n)),g);let w=null;const _=()=>(w||(w=new nte(h)),w);let v=null;const k=()=>(v||(v=new rE),v),y=S=>!c&&!!d&&!ste(S,d),x=(S,I)=>o==="default"&&!c&&g===null&&f!==null&&S.parse===f&&y(S)&&!S.stream.enabled&&I<(S.options.autoUnboundedThresholdChars??4e6)&&S.options.html===!1&&S.options.xhtmlOut===!1&&S.options.breaks===!1&&S.options.langPrefix==="language-"&&S.options.linkify===!1&&S.options.typographer===!1&&S.options.highlight===null,M=(S,I)=>o==="default"&&!c&&y(S)&&!S.stream.enabled&&!S.options.fullChunkedFallback&&I<(S.options.autoUnboundedThresholdChars??4e6)&&S.options.html===!1&&S.options.linkify===!1&&S.options.typographer===!1,$={core:h,block:h.block,inline:h.inline,get linkify(){const S=k();return Object.defineProperty(this,"linkify",{value:S,writable:!0,configurable:!0}),S},get renderer(){const S=m();return Object.defineProperty(this,"renderer",{value:S,writable:!0,configurable:!0}),S},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return y(this)},set(S){const I=kC(S);return this.options={...this.options,...I},(gr(S,"fullChunkSizeChars")||gr(S,"fullChunkSizeLines")||gr(S,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(gr(S,"streamChunkSizeChars")||gr(S,"streamChunkSizeLines")||gr(S,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),gr(S,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),gr(S,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),g&&g.set(I),typeof I.stream=="boolean"&&(this.stream.enabled=I.stream,w&&(w.reset(),w.resetStats())),this},configure(S){const I=typeof S=="string"?yC[S]:S;if(!I)throw new Error("Wrong `markdown-it` preset, can't be empty");if(I.options&&this.set(I.options),I.components){const P=I.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(S,I){const P=Array.isArray(S)?S:[S],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const L of D){if(!L)continue;const B=L.enable(P,!0);for(let H=0;H!T.has(B));if(L.length)throw new Error(`Rules manager: invalid rule name ${L.join(", ")}`)}return this},disable(S,I){const P=Array.isArray(S)?S:[S],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const L of D){if(!L)continue;const B=L.disable(P,!0);for(let H=0;H!T.has(B));if(L.length)throw new Error(`Rules manager: invalid rule name ${L.join(", ")}`)}return this},use(S,...I){const P=typeof S=="function"?S:S&&typeof S.default=="function"?S.default:void 0;if(!P)throw new TypeError("MarkdownIt.use: plugin must be a function");const D=[this,...I],T=S;return c=!0,P.apply(T,D),this},render(S,I){let P;if(x(this,S.length)){I!==void 0&&(mi(I),P=h9("render"));const L=P?rd():0,B=P?uC(S,P):aC(S);if(P&&(P.attemptMs=rd()-L,B===null&&(P.fallbackReason="unsupported-stock-subset"),t1(I,P)),B!==null)return I!==void 0&&ss(I,{area:"render",path:"stock-fast",reason:"stock-subset"}),B}const D=I??{},T=this.parse(S,D);return P&&t1(D,P),m().render(T,this.options,D)},async renderAsync(S,I){let P;if(x(this,S.length)){I!==void 0&&(mi(I),P=h9("render"));const L=P?rd():0,B=P?uC(S,P):aC(S);if(P&&(P.attemptMs=rd()-L,B===null&&(P.fallbackReason="unsupported-stock-subset"),t1(I,P)),B!==null)return I!==void 0&&ss(I,{area:"render",path:"stock-fast",reason:"stock-subset"}),B}const D=I??{},T=this.parse(S,D);return P&&t1(D,P),m().renderAsync(T,this.options,D)},renderIterable(S,I={}){const P=this.parseIterable(S,I);return m().render(P,this.options,I)},async renderAsyncIterable(S,I={}){const P=await this.parseAsyncIterable(S,I);return m().renderAsync(P,this.options,I)},renderInline(S,I={}){const P=this.parseInline(S,I);return m().render(P,this.options,I)},validateLink:OE,normalizeLink:PE,normalizeLinkText:DE,utils:xX,helpers:{...fJ},parse(S,I){if(typeof S!="string")throw new TypeError("Input data should be a String");if(I!==void 0&&mi(I),M(this,S.length)){const L=I===void 0?void 0:h9("parse"),B=L?rd():0,H=ree(S,L);if(L&&(L.attemptMs=rd()-B,H===null&&(L.fallbackReason="unsupported-stock-subset"),t1(I,L)),H!==null)return I!==void 0&&ss(I,{area:"parse",path:"stock-fast",reason:"stock-subset"}),H}const P=I??{};let D;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&y(this)){const L=YE(this,S.length);if(L==="yes"){const B=z1(this,S,P);return ss(I,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),B}L==="need-lines"&&(D=Ko(S))}if(!this.stream.enabled){const L=S.length,B=this.options.autoTuneChunks!==!1,H=r,O=!a&&y(this),F=!!this.options.fullChunkedFallback,W=O&&L>=2e5;let z;(F||W||D!==void 0)&&(z=D??Ko(S));const U=(F||W)&&B&&!H?Wee(L,z,this.options):null;if(F||W){const q=z??0;if(F?L>=(this.options.fullChunkThresholdChars??2e4)||q>=(this.options.fullChunkThresholdLines??400):W){if(U&&U.strategy!=="plain"){const K=qm(this,S,P,{maxChunkChars:U.maxChunkChars,maxChunkLines:U.maxChunkLines,fenceAware:U.fenceAware,maxChunks:U.maxChunks});return I&&wC(I,F?"explicit-full-chunk":"default-large-string"),K}if(F){const K=(oe,ve,G)=>oeG?G:oe,ie=this.options.fullChunkAdaptive!==!1,ne=this.options.fullChunkTargetChunks??8,Y=K(Math.ceil(L/ne),8e3,64e3),le=K(Math.ceil(q/ne),150,700),Ee=ie?Y:this.options.fullChunkSizeChars??1e4,de=ie?le:this.options.fullChunkSizeLines??200,he=ie?K(Math.ceil(L/64e3),ne,32):this.options.fullChunkMaxChunks,pe=qm(this,S,P,{maxChunkChars:Ee,maxChunkLines:de,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:he});return I&&wC(I,"explicit-full-chunk"),pe}}}if(D!==void 0&&y(this)&&GE(this,L,z??D)){const q=z1(this,S,P);return ss(I,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),q}}const T=Ni(S);return ss(I,{area:"parse",path:"plain",reason:"default-plain"}),zd(P,T,()=>h.parse(S,P,this).tokens)},parseIterable(S,I={}){return mi(I),Dee(this,S,I)},parseAsyncIterable(S,I={}){return mi(I),Bee(this,S,I)},parseIterableToSink(S,I,P={}){return mi(P),Hee(this,S,I,P)},parseAsyncIterableToSink(S,I,P={}){return mi(P),zee(this,S,I,P)},parseInline(S,I={}){if(typeof S!="string")throw new TypeError("Input data should be a String");mi(I),Wp(I)&&aa(I);const P=h.createState(S,I,this);return P.inlineMode=!0,h.process(P),P.tokens}};if($.stream={enabled:!!n.stream,parse(S,I){return $.stream.enabled?_().parse(S,I,$):$.parse(S,I??{})},reset(){_().reset()},peek(){return w?w.peek():[]},stats(){return w?w.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){w&&w.resetStats()}},i?.components){const S=i.components;S.core?.rules&&$.core.ruler.enableOnly(S.core.rules),S.block?.rules&&$.block.ruler.enableOnly(S.block.rules),S.inline?.rules&&$.inline.ruler.enableOnly(S.inline.rules),S.inline2?.rules&&$.inline.ruler2.enableOnly(S.inline2.rules)}return d=ote($),f=$.parse,$}var rte=ite;const tI=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],lte=["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"],nI=["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"],ate=["svg","g","path"],ute=["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"],cte=["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"],dte=["action","data","href","src","srcset","poster","xlink:href","formaction"],fte=["script"],pte=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],eu=new Set(tI),oI=new Set(nI),xp=new Set([...tI,...lte,...nI,...ate]),sI=new Set([...xp,...ute]),hte=new Set(cte),mte=new Set(dte),Vp=new Set(fte),iI=new Set(pte);function rI(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 gte={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function lI(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 gte[String(s??"").toLowerCase()]??t})}const fh=new Set(["http","https","mailto","tel"]),vte=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 aI(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const yte=/^https?:\/\//i;function kte(e){if(!yte.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 bte(e,t,n){if(!j1(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function j1(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Cte(e,t){return t==="href"||t==="xlink:href"?j1(e,t)?fh:Lu:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?Lu:(j1(e,t),fh)}function ic(e,t={}){if(kte(e))return!1;const n=rI(lI(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=aI(n);return i?i==="file"?!bte(n,o,s):j1(o,s)?vte.has(i):!Cte(o,s).has(i):!1}function wte(e){const t=lI(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=aI(rI(t).toLowerCase());return n==="http"||n==="https"}function _te(e,t={}){const n=String(e??"").trim();return n?ic(n,t)?"":n:""}function _C(e){return _te(e,{tagName:"img",attrName:"src"})}function xte(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,h,g,m,w){return f[h].nesting===1&&f[h].attrJoin("class",t),w.renderToken(f,h,g,m,w)}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,h,g,m){let w,_=!1,v=f.bMarks[h]+f.tShift[h],k=f.eMarks[h];if(l!==f.src.charCodeAt(v))return!1;for(w=v+1;w<=k&&r[(w-v)%a]===f.src[w];w++);const y=Math.floor((w-v)/a);if(y=g||(v=f.bMarks[$]+f.tShift[$],k=f.eMarks[$],v=4)){for(w=v+1;w<=k&&r[(w-v)%a]===f.src[w];w++);if(!(Math.floor((w-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)&&uI(s.children,t,n)}}function Ate(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(xte,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,h;const g=d.indexOf("{"),m=g>=0?d.slice(g).trimStart():void 0;if(g===-1)f=d||void 0;else{if(f=d.slice(0,g).trim()||void 0,m?.startsWith("{")){let M=0,$=-1;for(let S=0;S0&&(h=m.slice(0,$))}h||(f=d||void 0)}if(s)return!0;const w=!!i.env.__markstreamFinal;let _=n+1,v=!1;for(;_<=o;){const M=i.bMarks[_]+i.tShift[_],$=i.eMarks[_];if(i.src.slice(M,$).trim()===":::"){v=!0;break}_++}v||(_=o);const k=i.push("vmr_container_open","div",1);if(k.attrSet("class",`vmr-container vmr-container-${c}`),k.map=[n,v?_:o],k.meta={...k.meta??{},unclosed:!v&&!w},f&&k.attrSet("data-args",f),h)try{const M=JSON.parse(h);for(const[$,S]of Object.entries(M)){const I=S!=null&&typeof S=="object";k.attrSet(`data-${$}`,I?JSON.stringify(S):String(S))}}catch{const M=Ste(h);if(M)for(const[$,S]of Object.entries(M)){const I=S!=null&&typeof S=="object";k.attrSet(`data-${$}`,I?JSON.stringify(S):String(S))}else k.attrSet("data-attrs",h)}const y=[];for(let M=n+1;M<_;M++){const $=i.bMarks[M]+i.tShift[M],S=i.eMarks[M];y.push(i.src.slice($,S))}if(y.some(M=>M.trim().length>0)){let M=y.join(` -`);M.endsWith(` -`)||(M+=` -`),M.endsWith(` - -`)||(M+=` -`);const $=i.tokens[i.tokens.length-1];$&&($.raw=M);const S=[];i.md.block.parse(M,i.md,i.env,S),uI(S,n+1,n+1+y.length),i.tokens.push(...S)}const x=i.push("vmr_container_close","div",-1);return v||(x.hidden=!0,x.map=[o,o]),i.line=v?_+1:_,!0},{alt:["paragraph","reference","blockquote","list"]})}function Gr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yo(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function C2(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 Mte=/^[a-z][a-z0-9_-]*$/;function xC(e){return Mte.test(String(e??"").trim().toLowerCase())}function xr(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return xC(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":xC(s)?s:""}function Ec(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=xr(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function Tte(...e){const t=new Set,n=[];for(const o of e)for(const s of Ec(o))t.has(s)||(t.add(s),n.push(s));return n}function Ete(e){const t=Ec(e);return{key:t.join(","),tags:t}}function cI(e){return xr(e)}function Ite(e,t){const n=String(e??""),o=xr(t);if(!o)return!1;const s=Gr(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 dI(e,t){const n=xr(t);return!!n&&!xp.has(n)&&!Ite(e,n)}function Lte(e,t){const n=String(e??""),o=xr(t);if(!o)return n;const s=Gr(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 fI=eu,$te=xp,pI=new Set(oI);pI.delete("details");const Nte=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Fte=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,S3=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Rte=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Zm(e){return(e.match(S3)?.[1]??"").toLowerCase()}function q8(e){return/^\s*<\s*\//.test(e)}function K8(e,t){return fI.has(t)||/\/\s*>\s*$/.test(e)}function Ote(e,t){let n=0;for(let o=0;o0&&n--;continue}K8(s,i)||n++}}return n}function SC(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${Gr(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 Dte(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${Gr(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 Gm(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Bte(e){const t=e;return t.meta||(t.meta={}),t.meta}function A9(e,t,n){const o=Bte(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function Hte(e,t){if(!t.size)return;const n=Array.from(t,h=>new RegExp(String.raw`<\s*${Gr(h)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=h=>h?n.some(g=>g.test(h)):!1,r=h=>{if(!(!h||!o.length))for(const g of o)g.raw+=h,g.inner+=h},l=()=>{!o.length||!s||(r(` -`),s=!1)},a=h=>{r(h)},u=h=>{for(let m=0;m{const g=o[o.length-1]?.tag;if(!g)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${Gr(g)}\s*>`,"i");return h.match(m)?.[0]??null},d=h=>!!c(h),f=(h,g,m)=>{const w=m??(h.type==="html_inline"?Zm(g):"");if(!(w&&t.has(w))){r(g);return}const _=q8(g),v=!_&&K8(g,w);if(_){if(!o.length||o[o.length-1].tag!==w){r(g);return}u(g);return}if(r(g),v){A9(h,g,"");return}o.push({tag:w,token:h,raw:g,inner:""})};for(const h of e){if(h.type==="inline"&&Array.isArray(h.children)){const g=String(h.content??"");if(d(g)?s=!1:l(),!o.length&&!i(g)){s=!1;continue}let m=0,w=!0;for(const _ of h.children){const v=Gm(_),k=_.type==="html_inline"?Zm(v):"",y=k&&t.has(k);let x=v;if(w&&g&&v&&(o.length||y)){const M=g.indexOf(v,m);if(M!==-1)a(g.slice(m,M)),x=g.slice(M,M+v.length),m=M+v.length;else{if(o.length&&!y)continue;w=!1}}f(_,x,k)}w&&g&&m0;continue}if(o.length&&typeof h.content=="string"){const g=Gm(h),m=h.type==="html_block"?c(g):null;if(m){u(`${s?` -`:""}${m}`),s=o.length>0;continue}if(!h.content)continue;l(),r(h.content),s=!0}}for(const h of o)A9(h.token,h.raw,h.inner)}function zte(e){return/^\s*<\s*[!?]/.test(e)}function Wte(e){const t=new Set($te);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 AC(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function Ute(e,t){let n=null;for(const i of e.matchAll(Nte)){const r=i.index??-1;if(r<0)continue;const l=(i[1]??"").toLowerCase();AC(l,t)&&Yo(e.slice(r))===-1&&(!n||r")&&(!n||i")&&(!n||i{const h=f,g=new Set(n),m=Array.isArray(h.env?.__markstreamCustomHtmlTags)?h.env.__markstreamCustomHtmlTags:[];for(const k of m){const y=xr(String(k??""));y&&g.add(y)}const w=Wte(Array.from(g)),_=new Set(qte);for(const k of g)_.add(k);return{autoCloseInlineTagSet:_,commonHtmlTags:w,customTagSet:g,shouldMergeHtmlBlockTag:k=>g.has(k)||!w.has(k)||pI.has(k)}},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 h=f.children[0];return h?.type!=="html_block"?"":String(f.content??h.content??"")},i=(f,h)=>{f.type="html_block",f.content=h,f.raw=h,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,h)=>{const g=r(f);if(!/\S/.test(g))return[];if(l(g))return[{type:"code_block",content:a(g),raw:g}];const m=g.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const w={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return h==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},w,{type:"paragraph_close",tag:"p",nesting:-1}]:h==="text"?[{type:"text",content:m,raw:m}]:[w]},c=(f,h,g)=>f[h-1]?.type==="paragraph_open"&&f[h+1]?.type==="paragraph_close"?"inline":g,d=(f,h)=>{const g=r(h);return!/\S/.test(g)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${g}`,f.children.push({type:"text",content:g,raw:g}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const h=f.tokens??[],{commonHtmlTags:g,customTagSet:m}=o(f);for(const w of h){const _=w;if(_.type!=="inline"||!Array.isArray(_.children))continue;const v=String(_.content??""),k=_.children.length?_.children:v.includes("<")?[{type:"text",content:v,raw:v}]:null;if(k)try{const y=Vte(k,g);if(_.children=y.children,y.pendingBuffer){const x=v.lastIndexOf(y.pendingBuffer);if(x!==-1){const M=v.slice(0,x);_.content=M,typeof _.raw=="string"&&(_.raw=M)}}}catch(y){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",y)}}Hte(h,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const h=f.tokens??[],{autoCloseInlineTagSet:g,customTagSet:m,shouldMergeHtmlBlockTag:w}=o(f),_=[];for(let v=0;v0){const[x,M]=_[_.length-1];if(v!==M){if(k.type==="paragraph_open"||k.type==="paragraph_close"){h.splice(v,1),v--;continue}const $=String(k.content??k.raw??"");if($){const S=h[M],I=`${String(S.content||"")} -${$}`,P=Yo(I),D=P===-1?null:SC(I,x,P+1);if(D){const T=I.slice(0,D.end),L=I.slice(D.end);S.content=T,S.loading=!1,h.splice(v,1),_.pop();const B=d(S,L)?[]:u(L,c(h,v,"paragraph"));B.length&&h.splice(v,0,...B),v--;continue}S.content=I,S.loading!==!1&&(S.loading=!0)}h.splice(v,1),v--;continue}}const y=s(k);if(y){if(zte(y))continue;const x=(y.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),M=/^\s*<\s*\//.test(y);if(!x||!w(x))continue;if(i(k,y),!M)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(y)&&Dte(y,x)>0&&_.push([x,v]);else if(_.length>0&&x&&_[_.length-1][0]===x){const[,$]=_[_.length-1],S=h[$];S.content=`${String(S.content||"")} -${y}`,S.loading=!1,_.pop(),h.splice(v,1),v--}continue}else if(_.length>0){if(k.type==="paragraph_open"||k.type==="paragraph_close"){h.splice(v,1),v--;continue}const x=k.content||"",M=new RegExp(`<\\s*\\/\\s*${_[_.length-1][0]}\\s*>`,"i").test(x);if(x){const[,$]=_[_.length-1],S=h[$];S.content=`${S.content||""} -${x}`,S.loading!==!1&&(S.loading=!M)}M&&_.pop(),h.splice(v,1),v--}else continue}if(m.size>0){const v=new Map,k=new Map,y=$=>{let S=v.get($);return S||(S=new RegExp(`<\\s*${$}\\b`,"i"),v.set($,S)),S},x=$=>{let S=k.get($);return S||(S=new RegExp(`<\\s*\\/\\s*${$}\\s*>`,"i"),k.set($,S)),S},M=[];for(let $=0;$0){const D=M[M.length-1],T=h[D.index],L=S.type==="html_block"?x(D.tag).exec(I):null;if(L){const O=L.index+L[0].length,F=I.slice(0,O),W=I.slice(O);T.content=`${String(T.content??"")} -${F}`,Array.isArray(T.children)&&T.children.push({type:"html_inline",content:``,raw:``}),M.pop();const z=d(T,W)?[]:u(W,c(h,$,"paragraph"));z.length?h.splice($,1,...z):(h.splice($,1),$--);continue}if(S.type!=="inline")continue;const B=Array.isArray(S.children)?S.children:[],H=Ote(B,D.tag);if(H!==-1){const O=B.slice(0,H+1),F=B.slice(H+1),W=O.map(z=>String(z?.content??z?.raw??"")).join("");if(T.content=`${String(T.content??"")} -${W}`,Array.isArray(T.children)&&T.children.push(...O),F.length){const z=F.map(U=>String(U.content??U.raw??"")).join("");if(z.trim()){const U=z.replace(/^\s+/,"");if(d(T,z))h.splice($,1),$--;else if(U.startsWith("<"))h.splice($,1,{type:"html_block",content:U});else{const q=u(z,c(h,$,"paragraph"));h.splice($,1,...q)}}else h.splice($,1),$--}else h.splice($,1),$--;M.pop();continue}T.content=`${String(T.content??"")} -${I}`,Array.isArray(T.children)&&T.children.push(...B),h.splice($,1),$--;continue}if(S.type!=="inline")continue;const P=Array.isArray(S.children)?S.children:[];for(const D of m)if((P.length?Pte(P,D):y(D).test(I)&&!x(D).test(I)?1:0)>0){M.push({tag:D,index:$});break}}}{let v=0;for(let k=0;k0?v--:(h.splice(k,1),k--))}}for(let v=0;v/]+)/)?.[1]??"").toLowerCase();if(S.startsWith("!")||S.startsWith("?")){k.loading=!1;continue}if(m.has(S)){const H=String(k.content??""),O=Yo(H),F=O===-1?null:SC(H,S,O+1);k.loading=F?!1:k.loading!==void 0?k.loading:!0;const W=F?.start??-1,z=F?F.end-F.start:0;if(W!==-1){const U=H.slice(0,W+z);let q="";O!==-1&&O]+)))?/g;let P;for(;(P=I.exec(k.content||""))!==null;)P[1],P[2]||P[3]||P[4];const D=String(k.content??""),T=new RegExp(`<\\/\\s*${S}\\s*>`,"i").exec(D),L=T?T.index:-1,B=T?T[0].length:0;if(L!==-1){const H=D.slice(0,L+B),O=(D.slice(L+B)||"").replace(/^\s+/,"");k.children=[{type:"html_block",content:H,tag:S,loading:!1}],k.content=H,k.raw=H,O&&h.splice(v+1,0,O.startsWith("<")?{type:"html_block",content:O}:{type:"text",content:O,raw:O})}else k.children=[{type:"html_block",content:k.content,tag:S,loading:!0}];continue}if(!k||k.type!=="inline")continue;if(k.children.length===2&&k.children[0].type==="html_inline"){const S=(k.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),I=k.children[1],P=String(I?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(I?.type==="html_inline"&&P===S)continue;g.has(S)?(k.children[0].loading=!0,k.children[0].tag=S,k.children.push({type:"html_inline",tag:S,loading:!0,content:``})):k.children=[{type:"html_block",loading:!0,tag:S,content:String(k.children[0]?.content??"")+String(k.children[1]?.content??"")}];continue}else if(k.children.length===3&&k.children[0].type==="html_inline"&&k.children[2].type==="html_inline"){const S=(k.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(g.has(S))continue;k.children=[{type:"html_block",loading:!1,tag:S,content:k.children.map(I=>I.content).join("")}];continue}if(!k.content?.startsWith("<")||k.children?.length!==1)continue;const y=String(k.content),x=k,M=x.children[0];if(M?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(y)&&(x.children.length=0);continue}const $=String(M.content??y).match(Rte)?.[1]?.toLowerCase()??"";if($){if(/\/\s*>\s*$/.test(y)||fI.has($)){x.children=[{type:"html_inline",content:y}];continue}x.children.length=0}}})}function Zte(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 Gte(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&&!Zte(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 hI=/\.([a-z0-9]{1,15})$/i,Yte=/[_()[\]{}<>]/u,Xte=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Jte=/[?#@]/u,Qte=/[\\/]/u,ene=/^[\p{L}\p{N}./\\-]+$/u,tne=/^[A-Za-z0-9-]{1,63}$/u,nne=/^xn--[a-z0-9-]{2,59}$/i,one=/^(?:[A-Z]{1,6}|\d{1,8})$/u,sne=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,ine=/文件名\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,rne=/文件名\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,lne=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,ane=2e3,une=512,cne={},dne=new Set(["ai","md","py","rs","sh","zip"]),mI=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),fne=new Set([...mI,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),pne=new Set(["com","dev","io","page","site"]),hne=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),mne=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"]),Xu=new Map;function MC(e,t){if(!e||e.length>une)return t;for(Xu.set(e,t);Xu.size>ane;){const n=Xu.keys().next().value;if(!n)break;Xu.delete(n)}return t}function Sp(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function M9(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return Sp(n)?n:void 0}function TC(e,t){if(!Sp(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 EC(e){const t=qp(e);return Sp(t)?t:void 0}function gne(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function IC(e,t){if(!Sp(t))return;const n=String(e??"").trim().split(/\s+/u).map(gne).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>Ym(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>Ym(s,{marketTicker:!0}))&&(o.marketTicker=!0),Sp(o)?o:void 0}function du(e,t=!1){let n;return{options(o){return t||o==null?TC(e,n):TC(e,M9(EC(o),IC(o,n)))},remember(o){const s=EC(o);n=t?M9(n,s):M9(s,IC(o,n))},reset(){n=void 0}}}function LC(e){return tne.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function vne(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return LC(n)||nne.test(n)?t.every(LC):!1}function gI(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function yne(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function kne(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function vI(e,t,n){const o=yne(t);return gI(e)&&kne(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function bne(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 qp(e){const t=String(e??""),n=Xu.get(t);return n?(Xu.delete(t),Xu.set(t,n),n):bne(t)?MC(t,{explicitFilename:ine.test(t),filename:rne.test(t),marketTicker:lne.test(t)}):MC(t,cne)}function Cne(e){return vne(e.split(/[\\/]/)[0]??"")}function wne(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function _ne(e){if(Yte.test(e)||!ene.test(e))return!0;if(Qte.test(e))return!Cne(e);const t=e.replace(hI,"");return gI(t)?!0:t.split(".").filter(Boolean).some(wne)}function xne(e,t,n){if(!(n?fne:mI).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?sne:one).test(o)}function Ym(e,t={}){if(!e||Xte.test(e)||Jte.test(e))return!1;const n=e.match(hI);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return xne(e,o,t.marketTicker===!0)?!0:mne.has(o)?!dne.has(o)||t.filename?!0:_ne(e):!!(t.explicitFilename&&pne.has(o)||t.filename&&hne.has(o))}const $C=["!"];function Ii(e){return{type:"text",content:e,raw:e}}function $u(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 Nu(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 wa(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 Sne(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(Ii(t))}}function NC(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 Mne(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 FC(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?RC(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=qp(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 g=RC(u);g!==-1&&(d===-1||g=m.content.length){h-=m.content.length;continue}if(h<0)break;const w=m.content[h],_=m.content.slice(0,h);let v=m.content.slice(h);for(let x=g+1;x0&&(e.splice(g+1,k),a=g+1);let y=c;if(w==="!"&&f!==-1)y=c.slice(0,f);else if(v){const x=encodeURI(v);if(x&&c.endsWith(x))y=c.slice(0,c.length-x.length);else{const M=w?encodeURI(w):"",$=M?c.indexOf(M):-1;$!==-1&&(y=c.slice(0,$))}}y!==c&&Mne(l,y),v&&e.splice(a+1,0,Ii(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(wa(u,c,f));const h=e[r+3].content?.replace(/^\)\**/,"");h&&a.push(Ii(h)),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(_=>_[0]==="href")?.[1]||"",d=u.find(_=>_[0]==="title")?.[1]||"";let f=3,h=2;const g=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(g){h+=1;const _=g[1].length;$u(m,_)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let _=r+1;_w[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,h+=3}let g=!0;if(l.nesting===-1&&(d=d.replace(/\*+$/,"")),e[r+2]?.type==="text"){const m=(e[r+2]?.content??"").indexOf(")");g=m===-1,m===-1&&(f+=e[r+2]?.content?.slice(0,m)||"",e[r+2].content="")}a.push(wa(d,f,g)),Nu(a,2),e.splice(r-2,h,...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=[];$u(d,2),d.push(wa(u,c,!1)),Nu(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[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let w=c+1;for(;w=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let w=c+1;for(;w{const n=t;try{const o=Wne(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 OC(){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 PC(){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 DC(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 yI(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 T9(e){return yI(e)!==null}function kI(e){return/^:?-+:?$/.test(e.trim())}function Pne(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(kI)}function Dne(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Bne(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(kI)&&Dne(n)}function Hne(e){return e==="|"||e==="|:"}function zne(e){const t=yI(e);return t!==null&&t.every(n=>!n.includes(":"))}function Wne(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)&&T9(r);if(!t&&(r.includes(` -`)&&c.length===0&&T9(a)&&Bne(u)||d)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>DC(g)),h=[...OC(),...f,...PC()];o.splice(s-1,3,...h)}else if(r.includes(` -`)&&c.length===0&&T9(a)&&Pne(u)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>DC(g)),h=[...OC(),...f,...PC()];o.splice(s-1,3,...h)}else r.includes(` -`)&&c.length===0&&zne(a)&&Hne(u)&&(i.content=r.slice(0,-2),i.children.splice(2,1))}return o}function Une(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 jne=Une;const Vne=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],Xm=Vne.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),qne=/\\[a-z]+/i,bI="(?:\\\\|\\u0008)",Kne=new RegExp(String.raw`${bI}(?:${Xm})\s*\{[^}]+\}`,"i"),Zne=new RegExp(String.raw`(?:${bI})?(?:${Xm})\s*\{`,"i"),Gne=/\\(?:text|frac|left|right|times)/,Yne=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,Xne=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,Jne=/[A-Z]+\s*\([^)]+\)/i,Qne=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,eoe=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,toe=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,noe={"\b":"\\b","\v":"\\v","\f":"\\f"};function ooe(e){let t="";for(const n of e)t+=noe[n]??n;return t}function Ra(e){if(!e)return!1;const t=ooe(e),n=t.trim();if(toe.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=qne.test(t),s=Kne.test(t),i=Zne.test(t),r=Gne.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=Yne.test(t)&&!Xne.test(t),u=Jne.test(t),c=Qne.test(n),d=eoe.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),h=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||r||l||a||u||c||d||f||h}const CI="__markstreamMathPluginApplied",A3=80,wI=2e4,BC=wI+4096;function Z8(e){return!!e[CI]}function soe(e){e[CI]=!0}const _I=["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"],ioe=["cdot","mathbf{","partial","mu_{"],xI=_I.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),SI="[ \r\b\f\v]",roe=new RegExp(`([^\\\\])(${ioe.map(e=>e).join("|")})+`,"g"),loe=/span\{([^}]+)\}/,aoe=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,uoe=/(^|[^\\])\\\r?\n/g,coe=/(^|[^\\])\\$/g,doe=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,foe=new RegExp(`(${SI})|(${xI})\\b`,"g"),HC=new Map,zC=new Map;function poe(e){if(!e)return foe;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),o=HC.get(n);if(o)return o;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${SI})|(${s})\\b`,"g");return HC.set(n,i),i}function hoe(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const o=e?"__default__":n.join(""),s=zC.get(o);if(s)return s;const i=e?[Xm,xI].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),Xm].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return zC.set(o,r),r}const WC={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function UC(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function moe(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&doe.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function jC(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 _a(e,t){const n=t?.commands??_I,o=t?.escapeExclamation??!0,s=t?.commands==null,i=poe(s?void 0:n);let r=e.replace(i,(u,c,d,f,h)=>{if(c!==void 0&&WC[c]!==void 0)return`\\${WC[c]}`;if(d&&n.includes(d)){const g=h&&typeof f=="number"?h[f-1]:void 0;return g==="\\"||g&&/\w/.test(g)?u:`\\${d}`}return u});o&&(r=moe(r));let l=r;const a=hoe(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(loe,"span\\{$1\\}").replace(aoe,"\\operatorname{span}\\{$1\\}"),l=l.replace(uoe,`$1\\\\ -`),l=l.replace(coe,"$1\\\\"),l=l.replace(roe,"$1\\$2"),l}function VC(e){const t=e.trim();return!(!Ra(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 AI(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 M3(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=l)break;const u=Jm(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}Kp(e,a)||i++,r=a+Math.max(1,t.length)}return i}function G8(e,t,n){const o=Mp(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!Mp(o.slice(0,s)).trim()||Kp(o,s))return-1;const i=AI(o);if(Jm(i,s))return-1;const r=qC(o,t,0,s,i);if(t==="$$"){if(r%2===1)return-1}else if(r>qC(o,n,0,s,i))return-1;return s}function Ap(e){return e===" "||e===" "}function Mp(e){let t=e.length;for(;t>0&&Ap(e[t-1]);)t--;return e.slice(0,t)}function KC(e){let t=0;for(let n=0;n=48&&t<=57}function voe(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 yoe(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 koe(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(yoe)}function boe(e){let t=0;if(!ZC(e[t]))return!1;for(;ZC(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:Ap(e[t+1])}function MI(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&&Ap(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&Ap(t[1])||boe(t)||voe(t)||koe(t))}function GC(e,t){return e?t?`${e} -${t}`:e:t}function T3(e){const t=String(e??"").trim();return t?Ra(t):!1}function YC(e){let t=0;for(let n=0;nA3){h=!0;break}const m=s[g],w=gd(m,c);if(w!==-1){const _=GC(f,m.slice(0,w));if(!T3(_)){h=!0;break}const v=m.slice(w+c.length),k=v.trim()?`suffix:${YC(v)}`:"nosuffix";return["closed",u,o+l,d,o+g,w,YC(_),k].join(":")}if(MI(m)){h=!0;break}if(f=GC(f,m),f.length>wI){h=!0;break}}if(!h&&T3(f))return["pending",u,o+l,d].join(":")}}return null}function I9(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function woe(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 L9(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function _oe(e,t){soe(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,k)=>{let y=k;for(;y=3&&(!y||/\s/.test(y))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,v),a.pos=v,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],h=String(a.pending??""),g=Math.max(0,a.pos-h.length);let m=g,w=g;const _=g;for(const[v,k]of f){const y=a.src,x=AI(y),M=goe(y,c);let $=!1;v==="$$"&&m!==_&&(m=_);let S=-1,I=-1,P=0;const D=T=>{if((T==="undefined"||T==null)&&(T=""),T==="\\"){a.pos=a.pos+T.length,m=a.pos;return}if(T==="\\)"||T==="\\("){const H=a.push("text_special","",0);H.content=T==="\\)"?")":"(",H.markup=T,a.pos=a.pos+T.length,m=a.pos;return}if(!T)return;if(v==="$$"&&T.includes("$")){let H=0;for(;H0&&T[O-1]==="$"||O+10){const F=T.slice(0,L),W=a.push("text","",0);W.content=F,a.pos=a.pos+F.length,m=a.pos}const H=T.slice(L).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(H){const[,F,W]=H,z=W.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),U=z?z[1]:W,q=z&&z[2]?z[2]:null,K=a.push("image","img",0);K.attrs=[["src",U],["alt",F]],q&&K.attrs.push(["title",q]),K.content=F,K.children=[{type:"text",content:F,tag:""}],a.pos=a.pos+H[0].length,m=a.pos;const ie=T.slice(L+H[0].length);ie&&D(ie);return}const O=a.push("text","",0);O.content=T,a.pos=a.pos+T.length,m=a.pos;return}const B=a.push("text","",0);B.content=T,a.pos=a.pos+T.length,m=a.pos};for(;!(m>=y.length);){const T=y.indexOf(v,m);if(T===-1)break;if(Kp(y,T)){m=T+Math.max(1,v.length);continue}const L=Jm(x,T);if(L){m=L[1];continue}const B=Jm(M,T);if(B){m=B[1];continue}if(T===S&&m===I){if(P++,P>2){m=T+Math.max(1,v.length);continue}}else P=0,S=T,I=m;if(v==="("&&T>0){let ie=T-1;for(;ie>=0&&y[ie]===" ";)ie--;if(ie>=0&&y[ie]==="]"){m=T+v.length;continue}}if(v==="$"&&T>0&&y[T-1]==="$"){m=T+1;continue}if(v==="$"&&T=y.length);){const L=M3(y,T);if(L===-1)break;if(L+10&&y[L-1]==="$"){T=L+1;continue}const B=E9(y,L+1);if(B===-1)break;const H=y.slice(L+1,B),O=H.includes("`"),F=!H||!H.trim(),W=y[B+1],z=I9(H,W),U=L9(H);if(!O&&!F&&!z&&!U){const q=y.slice(m,L);q&&D(q);const K=a.push("math_inline","math",0);K.content=_a(H,t),K.markup="$",K.raw=`$${H}$`,K.loading=!1,m=B+1,T=B+1}else D("$"),T=L+1}T{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,h=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],g=c.bMarks[l]+c.tShift[l];let m=c.src.slice(g,c.eMarks[l]).trim(),w=!1,_="",v="",k=!1,y="",x=!1;for(const[q,K]of h)if(m.startsWith(q))if(q.includes("[")){const ie=q==="\\["?m.slice(q.length):"";if(q==="\\["&&gd(ie,K)===-1&&!/^\s*!\[/.test(ie)&&!ie.includes("`")&&Ra(ie)){w=!0,_=q,v=K;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1=0?"\\]":v,P=S>=0?S:gd(m,v,$);if(!k&&P>_.length){const q=m.slice(M+_.length,P),K=c.push("math_block","math",0);K.content=_a(q),K.markup=_==="$$"?"$$":_==="["?"[]":"\\[\\]",K.map=[l,l+1],K.raw=`${_}${q}${I}`,K.block=!0,K.loading=!1,c.line=l+1;const ie=m.slice(P+I.length);return ie.trim()&&n(c,ie,l),!0}let D=l,T="",L=!1,B="",H=l;const O=k?m:m===_?"":m.slice(_.length),F=!f&&_==="\\["?"]":"",W=gd(O,v);if(W!==-1){const q=W;T=O.slice(0,q),B=O.slice(q+v.length),H=k?l+1:l,L=!0,D=H}else for(O&&!k&&(T=O),D=l+1;D{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 xoe(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 Soe=/^\s]/i,Aoe=/^<\/a\s*>/i;function Moe(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??"");Soe.test(r)&&o>0&&o--,Aoe.test(r)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function Toe(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=>Moe(l,i));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:r}))})}function Eoe(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 Ioe(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 rte({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:r=>!ic(r,{tagName:"a",attrName:"href"})}),Eoe(i),Toe(i),(e.enableMath??!0)&&_oe(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&Ate(i),e.enableFixIndentedCodeBlock!==!1&&Gte(i),Tne(i),$ne(i),Ine(i),One(i),xoe(i),Kte(i,{customHtmlTags:e.customHtmlTags}),i}function rc(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=>rc(n))),t}function Loe(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function $oe(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 Noe(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function ph(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function JC(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function QC(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function Ooe(e,t){const n=[],o=[],s=[],i=[],r=e.split(Foe),l=/\r?\n$/.test(e),a=r.some(h=>h.startsWith("diff ")||h.startsWith("--- ")||h.startsWith("+++ ")||h.startsWith("@@ ")),u=h=>{const g=h;if(!II.some(m=>g.startsWith(m)))if(g.startsWith("-")){const m=g.slice(1);s.push(QC(m,a))}else if(g.startsWith("+")){const m=g.slice(1);i.push(QC(m,a))}else{JC(n,o,s,i);const m=a&&g.startsWith(" ")?g.slice(1):g;n.push(m),o.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let h=0;h0||i.length>0)&&JC(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 Y8(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(XC.test(a)&&(a=a.replace(XC,"")),r){const{original:u,updated:c}=Ooe(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 Poe(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function Doe(){return{type:"hardbreak",raw:`\\ -`}}function Boe(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i\s*$/.test(t)||eu.has(e)}function Hoe(e){if(!e||e.length===0)return ew();const t=N9.get(e);if(t)return t;const n=e.map(xr).filter(Boolean);if(!n.length){const s=ew();return N9.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:S2({customHtmlTags:e})};return N9.set(e,o),o}function FI(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function zoe(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function Qm(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 Woe(e,t,n){const o=e.slice();return Qm(o,"href")||o.push(["href",t]),n!=null&&!Qm(o,"title")&&o.push(["title",n]),o}function E3(e){return e.map(FI).join("")}function qh(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:qh(o.children)});continue}t.push(o)}return t}function Uoe(e,t,n){let o=0;for(let s=t;s`;m.toLowerCase().includes(x.toLowerCase())||(m+=x),_=!0,w=!0}const v=[],k=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let y;for(;(y=k.exec(l))!==null;){const x=y[1],M=y[2]||y[3]||y[4]||"";v.push([x,M])}if(u?.has(a)){const x=zoe(e);return[{type:a,tag:a,attrs:v,content:x?x.inner:h.innerTokens.length?E3(h.innerTokens):"",children:h.innerTokens.length?o(h.innerTokens,s,i,r):[],raw:x?.raw??m,loading:e.loading||w,autoClosed:_},h.nextIndex]}return[{type:"html_inline",tag:a,attrs:v,content:m,children:g,raw:m,loading:w,autoClosed:_},h.nextIndex]}function RI(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=>RI(t)).join(""):String(e.content??"")}function Voe(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>RI(t)).join("")}function tw(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=Voe(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 qoe(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function Koe(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 Goe(e,t,n){const o=e.slice();return eg(o,"href")||o.push(["href",t]),n!=null&&!eg(o,"title")&&o.push(["title",n]),o}function hh(e,t,n){const o=e[t],s=Zoe(o.attrs),i=String(eg(s,"href")??""),r=eg(s,"title"),l=r==null?null:String(r),a=Goe(s,i,l);let u=t+1;const c=[];let d=!0;for(;uw.type==="strong_open")){const w=String(h.content??""),_=String(h.raw??w),v=rc(h);v.content=w.slice(0,-2),v.raw=_.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=v}const g=No(f,void 0,void 0,n),m=g.map(w=>{const _=w;return"content"in w?String(_.content??""):String(_.raw??"")}).join("");return{node:{type:"link",href:i,title:l,text:m,children:g,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?@[\\\]^_`{|}~]/,ase=/\p{P}/u,use=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,cse=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,dse=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,fse=/:\/\//,I3=1,OI=2,pse=4,hse=8,PI=16,Ma=32,Kh=64,b1=128,DI=256,mse=512,C1=1024,gse=1982;function mh(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 tu(e){return!!e&&rse.test(e)}function nu(e){return!!e&&(lse.test(e)||ase.test(e))}function HI(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&use.test(e)}function zI(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&cse.test(e)}function yse(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||tu(o)?!1:!(nu(o)&&!HI(o,n)&&n&&!tu(n)&&!nu(n))}function kse(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||tu(n)?!1:!(nu(n)&&!zI(n,o)&&o&&!tu(o)&&!nu(o))}function bse(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||tu(o)?!1:!(nu(o)&&!HI(o,n)&&n&&!tu(n)&&!nu(n))}function wse(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||tu(n)?!1:!(nu(n)&&!zI(n,o)&&o&&!tu(o)&&!nu(o))}function _se(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const Mse=/[\p{L}\p{N}]/u,Tse=/^[\p{L}\p{N}]+$/u;function L3(e){return e?Mse.test(e):!1}function WI(e){return e?Tse.test(e):!1}function V1(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 $se(e){return e?dse.test(e)||fse.test(e):!1}function Nse(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function No(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=qp(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 h(){return e===f&&(e=e.slice()),e}function g(){u=null}function m(oe,ve){const G=e.length===1?t:String(ve.content??""),X=[],fe=Ese(oe);if(fe!==-1){x(oe.slice(0,fe),oe.slice(0,fe));const ge=oe.slice(fe);return ge&&(D({type:"text",content:ge,raw:ge}),c--),c++,!0}if(nse.test(oe)){const ge=oe.indexOf("~~");ge!==-1&&X.push({type:"strikethrough",index:ge})}if(ose.test(oe)){const ge=oe.indexOf("**");ge!==-1&&X.push({type:"strong",index:ge})}if(/[^*]*\*[^*]+/.test(oe)){const ge=G?BI(G,0):oe.indexOf("*");if(G&&ge===-1)return!1;ge!==-1&&X.push({type:"emphasis",index:ge})}X.sort((ge,Q)=>ge.index!==Q.index?ge.index-Q.index:ge.type===Q.type?0:ge.type==="strong"?-1:Q.type==="strong"?1:0);const Ce=X[0];if(!Ce)return!1;if(Ce.type==="strikethrough"){const ge=Ce.index,Q=ge>-1?oe.slice(0,ge):"";if(Q&&x(Q,Q),ge===-1)return c++,!0;const ee=oe.indexOf("~~",ge+2),ce=ee===-1?oe.slice(ge+2):oe.slice(ge+2,ee),ue=ee===-1?"":oe.slice(ee+2),{node:Se}=ow([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:ce,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return g(),y(Se),ue&&(D({type:"text",content:ue,raw:ue}),c--),c++,!0}if(Ce.type==="strong"){const ge=Ce.index,Q=ge>-1?oe.slice(0,ge):"";if(Q&&x(Q,Q),ge===-1)return c++,!0;if(t&&ge===0){let _e=!1,Te=0;for(;Te=2)return x(oe,oe),c++,!0}}if(t&&(oe.match(/\*/g)||[]).length>vse(t))return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0;const ee=V1(oe,ge);if(ee.len>=3){const _e=Lse(oe,ge+ee.len);if(_e!==-1){const Te=oe.slice(ge+ee.len,_e);if(Ise(Te)){const{node:st}=n1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Te,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);g(),y(st);const Fe=oe.slice(_e+3);return Fe&&(D({type:"text",content:Fe,raw:Fe}),c--),c++,!0}}}if(!Cse(oe,ge)){const _e=oe.slice(ge,ge+ee.len);x(_e,_e);const Te=oe.slice(ge+ee.len);return Te&&(D({type:"text",content:Te,raw:Te}),c--),c++,!0}const ce=_se(oe,ge+2);let ue="",Se="";if(ce.index!==-1){ue=oe.slice(ge+2,ce.index),Se=oe.slice(ce.index+2);const _e=ce.index,Te=V1(oe,_e);if(ee.intraword&&Te.intraword&&!WI(ue)||!ue&&ee.len>=4&&ee.intraword)return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0}else{if(d||ce.sawInvalidClose||ee.intraword)return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0;ue=oe.slice(ge+2),Se=""}if(!ue&&/^\*+$/.test(Se))return x(oe,oe),c++,!0;const{node:Ue}=n1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:ue,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return g(),y(Ue),Se&&(D({type:"text",content:Se,raw:Se}),c--),c++,!0}if(Ce.type==="emphasis"){let ge=Ce.index;ge===-1&&(ge=0);const Q=oe.slice(0,ge);if(Q&&x(Q,Q),!yse(oe,ge)){x(oe[ge],oe[ge]);const _e=oe.slice(ge+1);return _e&&(D({type:"text",content:_e,raw:_e}),c--),c++,!0}const ee=V1(oe,ge),ce=bse(G,oe,ge+1),ue=ce.index,Se=e[c+1];if(o?.final&&Se?.type==="em_open"&&ue!==-1&&oe.slice(ge+1,ue).trim()!==oe.slice(ge+1,ue)||ue===-1&&(ce.sawInvalidClose||o?.final||ee.intraword||!L3(oe[ge+1])))return x(oe.slice(ge),oe.slice(ge)),c++,!0;const{node:Ue}=ph([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:ue>-1?oe.slice(ge+1,ue):oe.slice(ge+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(g(),y(Ue),ue!==-1&&ue{for(let Ue=0;Ue=0&&Se[Te]==="\\";Te--)_e++;if(_e%2===0)return Ue}return-1})(oe);if(X===-1)return!1;let fe=1;for(let Se=X+1;SeCe?.type==="math_inline")||!sse.test(oe))return null;const G=ve.parseInline(oe,{__markstreamFinal:!!o?.final});if(!Array.isArray(G)||G.length===0)return null;const X=(G.find(Ce=>Ce?.type==="inline")?.children??[]).filter(Ce=>!(Ce?.type==="text"&&String(Ce.content??"")===""));if(!X.length||!X.some(Ce=>Ce?.type!=="text")||X.length===1&&X[0]?.type==="text"&&String(X[0].content??"")===oe)return null;const fe=No(X,oe,n,o);return fe.length?fe:null}function v(oe){g(),a.push(oe)}function k(oe){g();const ve=rc(oe);a.push(ve)}function y(oe){v(oe)}function x(oe,ve){u?(u.content+=oe,u.raw+=ve??oe):(u={type:"text",content:String(oe??""),raw:String(ve??oe??"")},a.push(u))}function M(oe,ve){if(!oe)return;const G=No([{...ve,type:"text",content:oe,raw:oe}],oe,n,o);if(G.length===1&&G[0]?.type==="text"){const X=G[0];x(String(X.content??""),String(X.raw??X.content??""));return}for(const X of G)y(X)}function $(oe,ve){return String(oe.markup??"").startsWith(ve)}function S(oe){if(!u||oe.loading!==!0||oe.markup!=="\\(\\)")return;const ve=e[c-1];!ve||ve.type!=="text"||!$(ve,"\\(")||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 I(oe){return oe.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(oe,ve,G=mh(oe)){let X=oe;const fe=String(ve.content??"");return(G&I3)!==0&&X.endsWith("\\")&&!$(ve,"\\\\")&&!fe.endsWith("\\\\")&&(X=X.slice(0,-1)),(G&C1)!==0&&X.endsWith("(")&&!$(ve,"\\(")&&!fe.endsWith("\\(")&&(X=X.slice(0,-1)),(G&OI)!==0&&/\*+$/.test(X)&&!$(ve,"\\*")&&!fe.endsWith("\\*")&&(X=X.replace(/\*+$/,"")),X}for(;c=0;_e--){const Te=a[_e];if(Te.type!=="text")break;ee=_e,ce=String(Te.content??"")+ce}eeQ==="href")?.[1],ge=String(Ce??"");if(t&&ge){const Q=t.indexOf("](");if(Q!==-1){const ee=t.indexOf(")",Q+2);ee===-1?ve.loading=!0:ve.loading&&t.slice(Q+2,ee).includes(ge)&&(ve.loading=!1)}}F(ve)||v(ve)}function H(oe){if(oe.markup!=="linkify")return!1;const{node:ve,nextIndex:G}=hh(e,c,o);return z(ve,G)?(c=G,!0):!1}function O(oe){g(),y(Yoe(oe)),c++}function F(oe){if(oe.type!=="link")return!1;const ve=a[a.length-1];if(!ve||ve.type!=="text")return!1;const G=String(ve.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!G)return!1;const X=oe,fe=String(X.href??""),Ce=String(X.text??""),ge=String(G[2]??""),Q=fe.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!fe||!(Ce===fe||Ce===Q||$se(Ce)))return!1;const ee=String(G[1]??"");return ee?(ve.content=ee,ve.raw=ee):a.pop(),v({...oe,text:ge,children:[{type:"text",content:ge,raw:ge}],raw:`[${ge}](${fe}${X.title?` "${X.title}"`:""})`}),!0}function W(oe){if(oe.type!=="link")return!1;const ve=oe,G=String(ve.href??"");return G?z({href:G,title:ve.title==null||ve.title===""?null:String(ve.title),loading:!!ve.loading},c+1):!1}function z(oe,ve){const G=a[a.length-1];if(G?.type!=="image"||G.src||!G.loading||!String(G.raw??"").endsWith("]("))return!1;const X=e[ve],fe=String(X?.content??"");if(X?.type!=="text"||!fe.startsWith(")"))return!1;a.pop(),u=null;const Ce=String(G.alt??"");v({type:"image",src:oe.href,alt:Ce,title:oe.title,raw:`![${Ce}](${oe.href}${oe.title?` "${oe.title}"`:""})`,loading:!!oe.loading});const ge=fe.slice(1),Q=rc(X);return Q.content=ge,Q.raw=ge,h()[ve]=Q,!0}function U(oe){if(oe.type!=="link")return!1;const ve=a[a.length-1],G=e[c-1];if(!ve||ve.type!=="text"||G?.type!=="text")return!1;const X=String(ve.content??""),fe=String(G.content??"");if(!X.endsWith("!")||!fe.endsWith("!")||$(G,"\\!"))return!1;const Ce=X.slice(0,-1);Ce?(ve.content=Ce,ve.raw=Ce,u=ve):(a.pop(),u=null);const ge=oe,Q=String(ge.text??ge.children?.map(ue=>String(ue?.content??ue?.raw??"")).join("")??""),ee=String(ge.href??""),ce=ge.title==null||ge.title===""?null:String(ge.title);return v({type:"image",src:ee,alt:Q,title:ce,raw:`![${Q}](${ee}${ce?` "${ce}"`:""})`,loading:!!ge.loading}),!0}function q(oe,ve="",G=null){const X=String(oe.alt??oe.raw??"");return{type:"link",href:ve,title:G,text:X,children:[oe],raw:`[${X}](${ve}${G?` "${G}"`:""})`,loading:!0}}function K(oe){const ve=oe.startsWith("![")?oe:`![${oe}`,G=ve.slice(2),X=G.indexOf("](");return{type:"image",src:"",alt:X===-1?G.replace(/\]$/,""):G.slice(0,X),title:null,raw:ve,loading:!0}}function ie(oe){const ve=oe.indexOf("[![");if(ve===-1||typeof t=="string"&&e.length===1&&Ase(t,ve,"["))return!1;const G=oe.slice(0,ve);return G&&x(G,G),v(q(K(oe.slice(ve+1)))),c++,!0}function ne(oe){if(o?.final)return!1;const ve=e[c-1];if(ve?.type!=="text"||!String(ve.content??"").endsWith("[")||$(ve,"\\["))return!1;const G=a[a.length-1];if(G?.type==="text"&&G.content.endsWith("[")){const X=G.content.slice(0,-1);X?(G.content=X,G.raw=X,u=G):(a.pop(),u=null)}return v(q(tw(oe))),c++,!0}function Y(oe){if(oe.type!=="link")return!1;const ve=oe,G=String(ve.raw??""),X=String(ve.text??"");if(!G.startsWith("[![")&&!X.startsWith("!["))return!1;const fe=ve.title==null||ve.title===""?null:String(ve.title);return v(q({type:"image",src:String(ve.href??""),alt:X.replace(/^!\[/,"").replace(/\]$/,""),title:fe,raw:G.startsWith("[![")?G.slice(1):G,loading:!0})),!0}function le(oe){if(!oe.startsWith("]("))return!1;const ve=e[c-2];if(ve?.type==="text"&&String(ve.content??"").endsWith("[")&&$(ve,"\\["))return!1;const G=a[a.length-1];if(G?.type!=="image"&&G?.type!=="link")return!1;const X=G,fe=G?.type==="link"&&Array.isArray(X.children)&&X.children.length===1&&X.children[0]?.type==="image"?a.pop():null,Ce=fe?fe.children[0]:a.pop();if(!Ce||Ce.type!=="image")return!1;const ge=e[c+1];let Q=String(fe?.href??""),ee=fe?.title==null?null:String(fe.title),ce=!0;if(ge?.type==="link_open"){const{node:Se,nextIndex:Ue}=hh(e,c+1,o);Q=Se.href,ee=Se.title,ce=!0,c=Ue}else{if(Q=oe.slice(2),Q.includes('"')){const Se=Q.split('"');Q=String(Se[0]??"").trim(),ee=Se[1]==null?null:String(Se[1]).trim()}c++}const ue=q(Ce,Q,ee);return ue.loading=ce,v(ue),!0}function Ee(){const oe=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&oe?.type==="text"&&String(oe.content??"").endsWith("[")&&$(oe,"\\[")}function de(oe,ve){const G=oe.indexOf("[");if(G===-1)return!1;let X=oe.slice(0,G);const fe=oe.indexOf("](",G);if(fe!==-1){const Ce=e[c+2];let ge=oe.slice(G+1,fe);if(ge.includes("[")){const _e=ge.indexOf("[");X+=oe.slice(0,G+_e+1);const Te=G+_e+1;ge=oe.slice(Te+1,fe)}const Q=e[c+1];if(oe.endsWith("](")&&Q?.type==="link_open"&&Ce){const _e=e[c+4];let Te=4,st=!0;if(_e?.type==="text"){const Oe=String(_e.content??"");if(Oe.startsWith(")")){st=!1;const Ye=Oe.slice(1);if(Ye){const ft=rc(_e);ft.content=Ye,ft.raw=Ye,h()[c+4]=ft}else Te++}else Oe==="."&&Te++}M(X,ve);const Fe=String(Ce.content??"");return o?.validateLink&&!o.validateLink(Fe)?x(ge,ge):v({type:"link",href:Fe,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:st}),c+=Te,!0}const ee=oe.indexOf(")",fe),ce=ee!==-1?oe.slice(fe+2,ee):"",ue=ee===-1;let Se=X.match(/\*+$/);if(Se&&(X=X.replace(/\*+$/,"")),M(X,ve),Se||(Se=ge.match(/^\*+/)),!d&&Se){const _e=Se[0].length;ge=ge.replace(/^\*+/,"").replace(/\*+$/,"");const Te=[];if(_e===1?Te.push({type:"em_open",tag:"em",nesting:1}):_e===2?Te.push({type:"strong_open",tag:"strong",nesting:1}):_e===3&&(Te.push({type:"strong_open",tag:"strong",nesting:1}),Te.push({type:"em_open",tag:"em",nesting:1})),Te.push({type:"link",href:ce,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:ue}),_e===1){Te.push({type:"em_close",tag:"em",nesting:-1});const{node:st}=ph(Te,0,o);y(st)}else if(_e===2){Te.push({type:"strong_close",tag:"strong",nesting:-1});const{node:st}=n1(Te,0,void 0,o);y(st)}else if(_e===3){Te.push({type:"em_close",tag:"em",nesting:-1}),Te.push({type:"strong_close",tag:"strong",nesting:-1});const{node:st}=n1(Te,0,void 0,o);y(st)}else{const{node:st}=ph(Te,0,o);y(st)}}else o?.validateLink&&!o.validateLink(ce)?x(ge,ge):v({type:"link",href:ce,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:ue});const Ue=ee!==-1?oe.slice(ee+1):"";return Ue&&(D({type:"text",content:Ue,raw:Ue}),c--),c++,!0}return!1}function he(oe){const ve=oe.indexOf("![");if(ve===-1)return!1;const G=oe.slice(0,ve);return G&&!u?u={type:"text",content:G,raw:G}:G&&u&&(u.content+=G),u&&(a.push(u),u=null),v(K(oe.slice(ve))),c++,!0}function pe(oe){if(!(oe?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ve=oe.slice(1).match(/[^\s\]]/);if(ve===null)return c++,!0;if(ve&&/x/i.test(ve[0])){const G=ve[0]==="x"||ve[0]==="X";return v({type:"checkbox_input",checked:G,raw:G?"[x]":"[ ]"}),c++,!0}return!1}return a}function J8(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 sw(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 Tp(e,t,n,o){const s=Fse(e,t,n);return J8(s.startLine,s.endLine,o)}function Rse(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:J8(o,s,t)}function On(e,t,n){if(!n?.includeSourceMap)return e;const o=Rse(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 Ose(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=J8(i,Math.max(r,l),o)),e}function Pse(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 Dse(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 Bse(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Cf(e,t,n){const o=e[t],s=[],i=du(n,!0);let r=t+1;for(;rd.raw).join("")};n?.includeSourceMap&&On(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&&On(l,o,n),[l,r+1]}function Hse(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=du(o,!0);let a=t+1;for(;au.raw).join(` -`)} -:::`},a+1]}const zse=new Set(["warning","info","note","tip","danger","caution"]);function Wse(e){let t=0;for(;t=0;m--){const w=f[m];if(w.type==="text"&&/:+/.test(w.content)){h=m;break}}const g={type:"paragraph",children:No((h!==-1?f.slice(0,h):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&On(g,e[u],n),l.push(g),a.remember(g.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Cf(e,u,a.options());n?.includeSourceMap&&On(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=wf(e,u,a.options());n?.includeSourceMap&&On(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=w2(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 jse=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Vse(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=jse.exec(String(o.info??""));return s?Hse(e,t,s,n):null}const Q8={parseContainer:(e,t,n)=>Use(e,t,n),matchAdmonition:Vse};function wf(e,t,n){const o=[],s=du(n,!0);let i=t+1;for(;il.raw).join(` -`)};return n?.includeSourceMap&&On(r,e[t],n),[r,i+1]}function qse(e){if(e.info?.startsWith("diff"))return Y8(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 Kse(e,t,n){const o=[];let s=t+1,i=[],r=[];const l=du(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 Zse(e,t,n){const o=e[t].meta??{},s=String(o?.label??"0"),i=[],r=du(n,!0);let l=t+1;for(;la.raw).join(` -`)}`},l+1]}function Gse(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:No(a.children||[],u,void 0,n),raw:u}}function Yse(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 UI(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!w.includes(">");else if(u)u=!w.includes("?>");else if(w.startsWith("");else if(w.startsWith("");else if(w.startsWith("");else{const _=s(w);if(_)if(_.closing){for(let v=r.length-1;v>=0;v--)if(r[v]===_.tag){r.length=v;break}}else _.selfClosing||i(_.after,_.tag)||r.push(_.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function Nie(e,t,n){if(!n?.length)return!1;const o=new Set(Ec(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 w=c.indexOf(">",d);if(w===-1)return null;let _=w-1;for(;_>=0&&i(c[_]);)_--;return{closing:f,tag:g,selfClosing:!f&&c[_]==="/",after:c.slice(w+1)}},l=(c,d)=>{const f=c.toLowerCase();let h=0;for(;h")return!0}}return!1},a=[];let u=0;for(;u=t?t:c,f=e.slice(u,d),h=f.endsWith("\r")?f.slice(0,-1):f,g=_f(h);if(g){const m=r(h.slice(g.index));if(m)if(m.closing){for(let w=a.length-1;w>=0;w--)if(a[w]===m.tag){a.length=w;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 Fie(e,t){const n=fie.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!_f(r.endsWith("\r")?r.slice(0,-1):r)||Lie(e,s)||$ie(e,s)||Nie(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function eL(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)&&!o1(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]==="`"&&!o1(e,l)){const a=eL(e,i,"`"),u=Rie(e,i+a,a);if(u===-1)break;i=u+a;continue}if(e.startsWith("\\[",i)&&!o1(e,l)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!o1(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return r}function Oie(e,t){if(!Z8(t))return e;const n=t,o=uw.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?tL(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:x2(e).state;uw.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 Ra(l)&&!c?e:e.slice(0,r)}function Pie(e,t,n,o,s){const i=n5(e),r=o5(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&s5(e)==null&&B9(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(l.rest)&&B9(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 pw(e,t,n,o,s)}else return pw(e,t,n,o,s);return!1}function x2(e,t=Aie(),n=null,o=!1,s=0){const i=q1(t);let r=q1(t),l="",a=!1,u=0;for(;uu&&e[c-1]==="\r"?c-1:d?c:e.length,h=e.slice(u,f);Pie(h,i,s+u,n,o)&&(a=!0),d?(r=q1(i),l=""):l=h,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:i,lineBuffer:l}}}function tL(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:q1(e.committedContext),context:q1(e.context),lineBuffer:e.lineBuffer+t}}:x2(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function Die(e,t){if(!Z8(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=_2.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?tL(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):x2(t),a=l.state,u=i&&s?l.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!u&&!Iie(s.source,r)&&!Tie(t)){s.source=t,s.explicitBracketMath=a;return}const c=Coe(t);(s&&(s&&!i||s.key!==c||u)||!s&&c)&&n.reset(),Mie(e,t,c,a)}function Bie(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function Hie(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 H9(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&&Hie(e,t)}function hw(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function zie(e){for(let t=0;t+5":""}function gw(e){return{type:"paragraph",children:e,raw:e.map(jie).join("")}}function vw(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function yw(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=Cie(t);if(!s?.size)return null;let i=-1;for(let c=0;ch?.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(gw(r)),a.push(l);const u=o.slice(i+1);return u.length&&a.push(gw(u)),a}function Vie(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 K1(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function qie(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*${Gr(t)}\s*>\s*$`,"i").test(n)}const z9=new Set(["iframe","script","style","textarea","title"]);function Zp(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:k===-1?e.length:k+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:k===-1?e.length:k+3,selfClosing:!1,tag:""}}const h=Yo(e.slice(f));if(h===-1)return null;const g=f+h+1,m=e.slice(f,g);if(/^<\s*[!?]/.test(m))return{closing:!1,end:g,selfClosing:!1,tag:""};let w=m.slice(1).trimStart();const _=w.startsWith("/");_&&(w=w.slice(1).trimStart());const v=w.match(/^([A-Z][\w:-]*)/i);return v?.[1]?{closing:_,end:g,selfClosing:/\/\s*>$/.test(m),tag:v[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,h)=>{const g=new RegExp(String.raw`<\s*\/\s*${Gr(f)}(?=\s|>)`,"gi");g.lastIndex=h;const m=g.exec(e);if(!m||m.index==null)return null;const w=s(m.index);return w?{start:m.index,end:w.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(z9.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 kw(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Gie(e,t,n){return n?e.includes(n,t)?!0:kw(e.slice(Math.max(0,t))).includes(kw(n)):!1}function Yie(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 oL(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Jie=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),Qie=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function ere(e){return/\n\s*\n/.test(e)||Qie.test(e)}function tre(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Jie.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(!ere(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function nre(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=Zp(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 ore(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,r=aw.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]:jd(u,t,n));return aw.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function sre(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"||iI.has(r)||Array.isArray(i.children))return s;const l=String(s.raw??i.content??"");if(!l)return s;const a=Yo(l);if(a===-1)return s;const u=Zp(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 h=oL(n,o),g=d?null:nre(f),m=g?ore(g,t,h,o):jd(f,t,h);return tre(f,m)?{...s,children:m}:s})}function ire(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function jd(e,t,n){return e.trim()?iL(e,t,{...n,__disableStreamParse:!0}):[]}function rre(e,t,n){const o=jd(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function lre(e,t,n){const o=UI({content:e}),s=Yo(e),i=nL(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const r=rre(e.slice(s+1,i),t,n);r.length>0&&(o.children=r)}return o.raw=e,o}function are(e,t,n){const o=Yo(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=Zp(s,"summary",0);if(!i)return jd(s,t,n);const r=s.slice(0,i.start),l=s.slice(i.end);return[...jd(r,t,n),lre(i.raw,t,n),...jd(l,t,n)]}function sL(e,t,n,o,s,i=0){const r=[];let l=i;for(let a=0;a{const U=nL(f,"details");return U!==-1?f.slice(0,U):f})():f,[k]=sL(_?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,o,s,h+f.length),y=are(v,n,oL(o,s)),x=m===-1?"":String(e[m].raw??K1(e[m])??""),M=_||m!==-1&&w?.closed===!0,$=x.replace(/[\t\r\n ]+$/,""),S=M?(()=>{const U=(w?.raw??"").lastIndexOf($);return U===-1?t.length:h+U})():t.length,I=Yo(f),P=_&&I!==-1?h+I+1:h+f.length,D=t.slice(P,S===-1?t.length:S),T=n.parse(D,{__markstreamFinal:s}),L=n.renderer.render(T,n.options,{__markstreamFinal:s}),B=S+$.length,H=M?Math.max(S+x.length,Yie(t,B)):t.length,O=M?t.slice(S,H):x,F=M?t.slice(h,H):t.slice(h),W=_&&I!==-1?f.slice(0,I+1):f,z={...u,tag:"details",attrs:C2(f.slice(0,I+1)),raw:F,content:`${W}${L}${O}`,children:[...y,...k],loading:!s&&!M};if(o.includeSourceMap&&(z.sourceMap=Tp(t,h,M?H:t.length,o)),r.push(z),l=M?H:t.length,m===-1&&!_)break;m!==-1&&(a=m)}return[r,l]}function ure(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let r=0;r=d.start&&I.end<=d.end){s.splice(M,1);continue}break}x=S+$.length,s.splice(M,1)}}return s}function cre(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 w=m.charCodeAt(0);return w>=65&&w<=90||w>=97&&w<=122},c=m=>{const w=m.charCodeAt(0);return w>=48&&w<=57},d=m=>m==="!"||u(m),f=m=>u(m)||c(m)||m===":"||m==="-",h=m=>u(m)||c(m)||m==="_"||m==="."||m===":"||m==="-",g=h;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(!h(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"||w==='"'||w==="'"||w==="`")break;a++}if(a>=l.length)return!0}}}return!0},o=(l,a)=>{let u=!1,c="",d=0;const f=v=>v===" "||v===" ",h=v=>{let k=0;for(;k{let k=0;for(;k";)for(y=!0,k++;k{const k=h(v);if(k)return k;const y=g(v);return y==null?null:h(y)};let w=0;const _=l.split(/\r?\n/);for(const v of _){const k=w,y=w+v.length;if(a=d&&/^\s*$/.test(x.rest)&&(u=!1,c="",d=0):(u=!0,c=M,d=$)}if(a<=y)break;w=y+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 Cw(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(g??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=g=>g===" "||g===" ",s=g=>{const m=g.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||g==="_"||g==="-"||g===":"},i=g=>{if(!g)return!1;if(g[0]===" ")return!0;let m=0;for(let w=0;w=4)return!0;continue}if(_===" ")return!0;break}return!1},r=g=>{let m=!1,w=!1;for(let _=0;_")return _}return-1},l=g=>{let m=0;for(;m{if(i(g))return-1;const w=g.replace(/^[ \t]+/,"");if(!w||w.startsWith(">")||w.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(w))return-1;let _=!1,v=0;for(;v=x.length){_=!0,v++;continue}const $=x[M];if($==="!"||$==="?"){_=!0,v+=y+1;continue}if($==="/"){_=!0,v+=y+1;continue}const S=M;for(;M"&&P!=="/"){_=!0,v++;continue}const D=new RegExp(String.raw`<\s*\/\s*${I}\s*>`,"i"),T=/\/\s*>$/.test(x),L=D.test(g.slice(v+y+1)),B=D.test(e.slice(m+v+y+1)),H=/[\r\n]/.test(e.slice(m+v+y+1));if(_&&n.has(I)&&!T&&!L&&(B||H))return v;_=!0,v+=y+1}return-1};let u=!1,c="",d=0,f="",h=0;for(;hh&&e[g-1]==="\r",_=m?w?g-1:g:e.length,v=e.slice(h,_),k=m?w?`\r -`:` -`:"",y=l(v);let x=v;if(!u&&!y){const M=a(v,h);if(M!==-1){const $=k||` -`;x=`${v.slice(0,M).replace(/[ \t]+$/,"")}${$}${$}${v.slice(M).replace(/^[ \t]+/,"")}`}}f+=x,f+=k,y&&(u?y.markerChar===c&&y.markerLen>=d&&/^\s*$/.test(y.rest)&&(u=!1,c="",d=0):(u=!0,c=y.markerChar,d=y.markerLen)),h=m?g+1:e.length}return f}function fre(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,h=!1;for(let g=0;g")return g}return-1},l=(d,f,h)=>{const g=h.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let w=m+1;for(;w=d.length||d[w]!=="/"){m=d.indexOf("<",m+1);continue}for(w++;wd.length){m=d.indexOf("<",m+1);continue}let _=!0;for(let k=0;k="A"&&y<="Z"?String.fromCharCode(y.charCodeAt(0)+32):y)!==g[k]){_=!1;break}}if(!_){m=d.indexOf("<",m+1);continue}let v=w+g.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 h=f;for(;fc&&e[d-1]==="\r",h=f?d-1:d,g=e.slice(c,h);u+=a(g),u+=f?`\r -`:` -`,c=d+1}return u}function pre(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 h=0,g=!1,m=0;for(;h=f.length||f[h]!==">")break;for(g=!0,h++;h{let h=0;for(;hnew 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=h?g?f-1:f:e.length,w=e.slice(d,m),_=h?g?`\r -`:` -`:"",v=s(w),k=v?.prefix??"",y=v?.content??w,x=i(y);x&&(l?x.markerChar===a&&x.markerLen>=u&&/^\s*$/.test(x.rest)&&(l=!1,a="",u=0):(l=!0,a=x.markerChar,u=x.markerLen));let M=y;if(!l&&M.includes("{if(D.replace(/^[\t ]+/,"").startsWith("|"))return S;const T=D.slice(0,P).replace(/^[\t ]+/,"");if(T.length>0){const L=I.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",B=T.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!L||!B||L!==B)return S}return`${I} - -`});if(k){const $=k+M.split(` -`).join(` -${k}`);c+=$}else c+=M;c+=_,d=h?f+1:e.length}return c}function hre(e,t){if(!e||!t.length)return e;const n=new Set(t.map(T=>String(T??"").toLowerCase()));if(!n.size)return e;const o=T=>T===" "||T===" ",s=T=>{if(!T)return!1;if(T[0]===" ")return!0;let L=0;for(let B=0;B=4)return!0;continue}if(H===" ")return!0;break}return!1},i=T=>{const L=T.charCodeAt(0);return L>=65&&L<=90||L>=97&&L<=122||L>=48&&L<=57||T==="_"||T==="-"||T===":"},r=T=>{let L=0;for(;L{let L=0,B=!1,H=0;for(;L=T.length||T[L]!==">")break;for(B=!0,L++;Lr(T).startsWith("<"),u=T=>{for(let L=0;L{if(s(T))return"";const L=r(T);if(!L.startsWith("<"))return"";let B=1;for(;B=L.length||L[B]==="/"||L[B]==="!"||L[B]==="?")return"";const H=B;for(;B"&&F!=="/"?"":O},d=T=>{if(s(T))return null;const L=r(T);if(!L.startsWith("<"))return null;let B=1;for(;B=L.length)return null;const H=L[B]==="/";if(H)for(B++;B"&&z!=="/")return null;if(H)return{type:"close",name:W};if(/\/\s*>\s*$/.test(L))return{type:"open",name:W,complete:!0};const U=L.indexOf(">",B);if(U!==-1){const q=L.slice(U+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=T=>{if(s(T))return null;const L=r(T).replace(/[ \t]+$/,"");if(!L.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(L))return null;const B=L.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(B?.[1])return B[1].toLowerCase();const H=L.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!H?.[1]||!H[2])return null;const O=H[1].toLowerCase();return O===H[2].toLowerCase()?O:null};let h=!1,g="",m=0;const w=T=>{let L=0;for(;Lw(T),v=T=>{const L=r(T);return L?s(T)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(L):!1},k=(T,L,B)=>{let H=T,O=0;for(;HH&&e[F-1]==="\r",U=W?z?F-1:F:e.length,q=e.slice(H,U),K=l(q),ie=K?.key??"";if(O>0&&L&&ie!==L)break;const ne=K?.content??q,Y=d(ne);if(Y?.name===B){if(Y.type==="open")Y.complete||O++;else if(O>0&&(O--,O===0))return!1}else if(O>0&&(u(ne)||v(ne)))return!0;if(W)H=F+1;else break}return!1};let y="",x=0,M=!0,$=!1,S=!1,I=` -`;const P=[];let D="";for(;xx&&e[T-1]==="\r",H=L?B?T-1:T:e.length,O=e.slice(x,H),F=L?B?`\r -`:` -`:"",W=l(O),z=W?.key??"",U=W?.content??O,q=_(U);q&&(h?q.markerChar===g&&q.markerLen>=m&&/^\s*$/.test(q.rest)&&(h=!1,g="",m=0):(h=!0,g=q.markerChar,m=q.markerLen));const K=P.length>0;if(!h&&!K){const ne=c(U),Y=!!ne&&!M&&$&&S&&k(x,z,ne);ne&&!M&&(!$||Y)&&(z&&D&&z===D?y+=`${z}${I}`:z||(y+=I))}if(y+=O,y+=F,F&&(I=F),!h){const ne=d(U);if(ne){if(ne.type==="open")ne.complete||P.push(ne.name);else for(let Y=P.length-1;Y>=0;Y--)if(P[Y]===ne.name){P.length=Y;break}}}const ie=u(U);M=ie,$=!ie&&a(U),S=!ie&&!!f(U),D=z,x=L?T+1:e.length}return y}function iL(e,t,n={}){const o=KI(n),s=o?af():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(xie(t,n)&&(t.stream.reset(),Sie(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,k,y)=>`${k}${y.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=Oie(l,t),l=Fie(l,n.customHtmlTags)??l),n.customHtmlTags?.length&&l.includes("<")){const v=Ec(n.customHtmlTags);if(v.length&&(l=dre(l,v),l=fre(l,v),l=hre(l,v),l=pre(l,v),l.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");l=l.replace(y,"$1$2$2")}}i||(l=cre(l));const a=Vie(l);if(a){if(n.includeSourceMap){const y={...n,__sourceLineMapper:Cw(r,l)};a[0].sourceMap=Tp(l,0,l.length,y)}const v=n.preTransformTokens,k=n.postTransformTokens;if(t5(t,n)||typeof v=="function"||typeof k=="function"){const y=mw(t,l,{__markstreamFinal:i},n),x=typeof v=="function"&&v(y)||y;typeof k=="function"&&k(x)}return cw(a,n,o,s)}const u=mw(t,l,{__markstreamFinal:i},n);if(!u||!Array.isArray(u))return cw([],n,o,s);const c=n.preTransformTokens,d=n.postTransformTokens;let f=u;c&&typeof c=="function"&&(f=c(f)||f);const h=t,g=typeof h.validateLink=="function"&&h.__markstreamOriginalValidateLink&&h.validateLink!==h.__markstreamOriginalValidateLink?h.validateLink:void 0,m=n.validateLink??g??h.options?.validateLink??(typeof h.validateLink=="function"?h.validateLink:void 0),w={...n,validateLink:m,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?Cw(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let _=bie(t,l,f,w,o);if(d&&typeof d=="function"){const v=d(f);if(Array.isArray(v)){const k=v[0],y=k?.type;k&&typeof y=="string"?_=Zh(v,{...w,__customHtmlBlockCursor:0},o):_=v}}if(ire(_)&&(_=ure(_,i,l,w),_=sL(_,l,t,w,i)[0],_=sre(_,t,w,i)),i){const v=new WeakSet,k=y=>{if(!y||typeof y!="object"||v.has(y))return;if(v.add(y),Array.isArray(y)){for(const M of y)k(M);return}const x=y;x.type==="html_block"&&x.loading===!0&&(x.loading=!1);for(const M of Object.values(x))k(M)};k(_)}return _=GI(_,n),n.debug&&console.log("Parsed Markdown Tree Structure:",_),ZI(_,o,s)}function ww(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=du(t),s=t?.includeSourceMap===!0;let i=0;for(;ic.type==="html_block")){if(s)for(const c of u)On(c,l,t);for(const c of u)al(c,l,t);n.push(...u)}else{const c={type:"paragraph",raw:a,children:u};s&&On(c,l,t);const d=yw(c,t);if(d){s&&vw(d,c);for(const f of d)al(f,l,t);n.push(...d)}else al(c,l,t),n.push(c)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const mre=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,gre=new Set([...Vp,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),vre=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 _w(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function yre(e){return typeof e=="string"?e:e==null?"":String(e)}function rL(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function Oa(e){return yre(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function lL(e){return Oa(e).replace(/`/g,"`")}function A2(e){return String(e??"").trim().toLowerCase()}function i5(e,t="safe"){const n=A2(e);return n?t==="escape"?!0:t==="trusted"?Vp.has(n):!vre.has(n):!1}function aL(e,t="safe"){const n=A2(e);return n?t==="escape"?!0:t==="trusted"?Vp.has(n):gre.has(n):!1}function xw(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${lL(o)}"`).join("")}function uL(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(mre);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function kre(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||ic(s,{tagName:t,attrName:"srcset"})})}function cL(e,t,n,o){return hte.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?kre(t,o):!!(mte.has(e)&&t&&ic(t,{tagName:o,attrName:e}))}function Ku(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function dL(e,t,n,o=!1){if(t!=="safe"||A2(n)!=="a")return e;const s=Ku(e,"href");if(o&&(!s||!e[s])){const a=Ku(e,"target"),u=Ku(e,"rel");return a&&delete e[a],u&&delete e[u],e}const i=Ku(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const r=Ku(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 Sw(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!rL(r)||cL(l,i,t,n)||(o[r]=i)}return dL(o,t,n,!!Ku(e,"href"))}function fL(e,t){const n=e.toLowerCase();return sI.has(n)?!1:_w(t,n)||_w(t,e)}function r5(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!rL(r)||cL(l,i,t,n)||(o[r]=i)}return dL(o,t,n,!!Ku(e,"href"))}function Z1(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 Gh(e,t="safe",n){const o=r5(Z1(e),t,n),s=Object.entries(o).map(([i,r])=>[i,r]);return s.length>0?s:void 0}function bre(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 Cre(e){const t={};for(const[n,o]of Object.entries(e))t[n]=bre(o,n);return t}function W9(e){return e.trim().length>0}function pL(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);W9(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=uL(e.slice(o+1,s));if(!i){const r=e.slice(o,s+1);W9(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||eu.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r})}n=s+1}return t}function wre(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=uL(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||eu.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r}),n=s+1}return t}function _re(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${Oa(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${Oa(o)}`:` ${Oa(o)}="${lL(s)}"`).join("");return e.type==="self_closing"?`<${Oa(t)}${n} />`:`<${Oa(t)}${n}>`}function xre(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of pL(e))if((n.type==="tag_open"||n.type==="self_closing")&&fL(n.tagName??"",t))return!0;return!1}function Vd(e,t="safe"){if(!e)return"";if(t==="escape")return Oa(e);const n=wre(e),o=[],s=[],i=[];for(const r of n){if(r.type==="text"){i.length===0&&s.push(Oa(r.content??""));continue}const l=A2(r.tagName);if(!l)continue;if(aL(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"&&i5(l,t)){s.push(_re(r));continue}if(r.type==="self_closing"){s.push(`<${l}${xw(Sw(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${xw(Sw(r.attrs??{},t,l))}>`),eu.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 Sre=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],Aw="http://www.w3.org/2000/svg",Are=new Set(["script","style","iframe","object","embed","link","meta"]),Mre=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"]),Tre=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),Ere=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),Ire=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function Lre(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function $re(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function Nre(e){const t=e.nodeName.toLowerCase();return t==="use"?Lre(e):t==="image"?$re(e):t==="text"||t==="tspan"?!!e.textContent?.trim():Ire.has(t)}function Fre(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 Rre(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")?ic(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?ic(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":ic(i,{tagName:o,attrName:s})?"":i:""}function Ore(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 mL(e){const t=hL(e),n=t.toLowerCase();let o=0;for(;on.test(t))||mL(t)}function Pre(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 vh(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function gL(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(!Are.has(o)){if(o==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))gL(s,t)}}function Dre(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];gL(t,n);const o=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=vh(t.getAttribute("width")),i=vh(t.getAttribute("height")),r=vh(t.getAttribute("x")),l=vh(t.getAttribute("y")),a=e.ownerDocument.createElementNS(Aw,"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 h=e.ownerDocument.createElementNS(Aw,"tspan");h.setAttribute("x",String(r+s/2)),h.setAttribute("dy",d===0?`${c}em`:"1.2em"),h.textContent=f,a.appendChild(h)}}t.parentNode?.replaceChild(a,t)}}function Bre(e){Dre(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!Mre.has(o)){n.remove();continue}if(o==="style"&&Mw(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&&Mw(i.value)){n.removeAttribute(i.name);continue}if(r==="srcdoc"){n.removeAttribute(i.name);continue}if(Tre.has(r)&&i.value){const l=Rre(o,r,i.value);if(!l){n.removeAttribute(i.name);continue}l!==i.value&&n.setAttribute(i.name,l);continue}if(Ere.has(r)&&i.value&&mL(i.value)){n.removeAttribute(i.name);continue}if(i.value){const l=Fre(i.value);l!==i.value&&n.setAttribute(i.name,l)}}Pre(n)}}function tVe(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 Bre(n),Hre(n)?null:n}catch{return null}}function Hre(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){Nre(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 yh=[];function U9(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function zre(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function Wre(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function Tw(e=`editor-${Date.now()}`,t={}){const n=Ioe(t),o=n;o.__markstreamRegisteredPluginCount=yh.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||yh.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 g=t.i18n;i=m=>g[m]??s[m]??m}else i=g=>s[g]??g;if(Array.isArray(t.plugin))for(const g of t.plugin){const m=g;if(Array.isArray(m)){const[w,..._]=m;typeof w=="function"&&n.use(w,..._)}else typeof m=="function"&&n.use(m)}if(Array.isArray(t.apply))for(const g of t.apply)try{g(n)}catch(m){console.error("[getMarkdown] apply function threw an error",m)}if(yh.length)for(const g of yh)if(Array.isArray(g)){const[m,...w]=g;typeof m=="function"&&n.use(m,...w)}else typeof g=="function"&&n.use(g);n.use(qY),n.use(GY),n.use(UY);const r=uX,l=r.default??r;n.use(l),n.use(WY),n.use(zY),n.core.ruler.after("block","mark_fence_closed",g=>{const m=g,w=m.src,_=!!m.env?.__markstreamFinal,v=w.split(/\r?\n/);for(const k of m.tokens){if(k.type!=="fence"||!k.map||!k.markup)continue;const y=k.map[0],x=k.map[1],M=k.markup,$=M[0],S=M.length,I=v[Math.max(0,x-1)]??"";let P=0;for(;Py+1&&D>=S&&T===I.length,B=k;B.meta=B.meta??{},B.meta.unclosed=!L,B.meta.closed=!!L}});const a=(g,m)=>{const w=g,_=w.pos;if(w.src[_]!=="~")return!1;const v=w.src[_-1],k=w.src[_+1];if(/\d/.test(v)&&/\d/.test(k)){if(!m){const y=w.push("text","",0);y.content="~"}return w.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(g,m)=>{const w=g[m],_=String(w.info??"").trim(),v=String(w.content??""),k=btoa(unescape(encodeURIComponent(v))),y=zre(_),x=U9(y),M=Wre(`editor-${e}-${m}-${y}`),$=U9(i("common.copy"));return`
        -
        - ${U9(y.toUpperCase())} - -
        -
        -
        `};const u=/^\[(\d+)\]/,c=/^\[([^\]\n]+)\]/,d=g=>{if(!g.startsWith("["))return!1;const m=c.exec(g);if(!m)return g!=="["&&!/^\[\d+$/.test(g);const w=String(m[1]??"");return g.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(w)},f=(g,m)=>{const w=g;if(w.src[w.pos]!=="[")return!1;const _=u.exec(w.src.slice(w.pos));if(!_)return!1;const v=w.src.slice(Math.max(0,w.pos-120),w.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(v))return!1;const k=w.src.slice(w.pos+_[0].length);if(k.startsWith("](")||k.startsWith("(")||d(k))return!1;if(!m){const y=_[1],x=w.push("reference","span",0);x.content=y,x.markup=_[0],x.raw=_[0]}return w.pos+=_[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(g,m)=>{const _=String(g[m].content??"");return`${_}`};const h=n.use.bind(n);return n.use=((...g)=>(o.__markstreamHasCustomParserExtensions=!0,h(...g))),n}function Ure({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 vL({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}:Ure({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const jre={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 Vre(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function yL(e){const t=Vre(e);return jre[t]??t}function qre(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>yL(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function Kre(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 Zre(e){return Kre(e)?.join("\0")??""}function Gre(e,t){return`${Zre(e)}\0\0${qre(t)?.join("\0")??""}`}function ld(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function Ew(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var Yre=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,h=this.pendingChars<=0;if(this.source+=d,h){const g=Iw();this.startedAt=f&&this.hasStarted?g-this.normalizedStartDelayMs:g,this.lastTick=g,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=Iw();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,w=ele(g/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(w-this.currentCps)*.2,this.charBudget+=this.currentCps*(h/1e3),this.charBudget<1){this.ensureLoop();return}const _=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),v=Qre(this.source.slice(this.visible.length),_,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=ld(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,ld(o,1e3,1)),this.normalizedTargetLatencyMs=ld(s,900,1),this.normalizedCatchUpLatencyMs=ld(i,350,1),this.normalizedCatchUpThreshold=Ew(r,600),this.normalizedStartDelayMs=Ew(a,80),this.maxCommitFps=Math.trunc(ld(l,30,1)),this.maxCharsPerCommit=Math.trunc(ld(u,80,1)),this.flushOnFinish=c,this.segmenter=Jre(),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 Xre(e={},t){const n=new Yre(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 Jre(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function Qre(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 Iw(){return typeof performance<"u"?performance.now():Date.now()}function ele(e,t,n){return Math.min(n,Math.max(t,e))}var tle=(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 F3=Symbol.for("markstream-vue:node-lifecycle");function nVe(){}const l5=new Map;let kL="material";const Md=new Map,Lw=new Map;let R3=null;function nle(e){l5.set(e.id,e)}function ole(e){const t=l5.get(kL);if(!t)return;const n=t.core[e];if(n)return n;const o=Md.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!Md.has(t.id)&&ile(t)}function sle(){var e,t;return(t=(e=l5.get(kL))==null?void 0:e.fallback)!=null?t:""}function ile(e){return tle(this,null,function*(){var t,n,o;if(Md.has(e.id))return(t=Md.get(e.id))!=null?t:null;let s=Lw.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(Md.set(e.id,i),R3?.(),i)).catch(()=>(Md.set(e.id,null),null)),Lw.set(e.id,s)),s})}const $w='',Nw='',rle={id:"material",core:{"":Nw,plain:'',text:Nw,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:$w,csharp:$w,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Go(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},lle=Xr(0);R3=()=>{lle.value++},nle(rle);const ale={"":"",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 M2(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=ale[n])!=null?t:n}function oVe(e){const t=M2(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 sVe(e){return ole(M2(e))||sle()}const Fw={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 T2=(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 vi=null,Ju=!1,Qu=null,E2=u5;function Gp(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function a5(){try{const e=globalThis;return Gp(e?.katex)}catch{return null}}function u5(){return T2(null,null,function*(){const e=a5();if(e)return e;const t=yield Go(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Go(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([0,1]))}catch{}return Gp(t)})}function bL(e){const t=Promise.resolve(e).then(n=>{var o;return Qu===t&&n?(vi=(o=Gp(n))!=null?o:n,vi):null}).catch(()=>null).finally(()=>{Qu===t&&(Qu=null)});return Qu=t,Ju=!0,t}function ule(e){E2=e,vi=null,Ju=!1,Qu=null}function cle(e){ule(u5)}function CL(){return typeof E2=="function"}function iVe(){var e;const t=E2;if(!t||t===u5)return null;if(vi)return vi;const n=a5();if(n)return vi=n,vi;if(Ju)return null;try{const o=t();return o?typeof o?.then=="function"?(bL(o),null):(vi=(e=Gp(o))!=null?e:o,vi):null}catch{return null}}function wL(){return T2(this,null,function*(){var e;const t=a5();if(t)return vi=t,vi;if(vi)return vi;if(Qu)return Qu;if(Ju)return null;const n=E2;if(!n)return Ju=!0,null;try{const o=n();if(typeof o?.then=="function")return bL(o);if(o)return vi=(e=Gp(o))!=null?e:o,Ju=!0,vi}catch{}return Ju=!0,null})}function _L(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let Ba=null,$a=null;const Bs=new Map,ta=new Map;let Ip=5;const lc=new Set;function G1(){if(Bs.size{const{id:n,html:o,error:s}=t.data,i=Bs.get(n);if(i)if(Bs.delete(n),clearTimeout(i.timeoutId),i.cleanup(),G1(),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(ta.set(a,o),ta.size>200){const u=ta.keys().next().value;ta.delete(u)}}i.aborted||i.resolve(o)}},Ba.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Bs.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Bs.clear(),xL()}}function fle(){var e;for(const t of Bs.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Bs.clear(),xL(),Ba&&((e=Ba.terminate)==null||e.call(Ba)),Ba=null,$a=null}function ple(e,t=!0,n=2e3,o){return T2(this,null,function*(){performance.now();const s=_L(e);if(!CL()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if($a)return Promise.reject($a);const i=`${t?"d":"i"}:${s}`,r=ta.get(i);if(r)return G1(),Promise.resolve(r);const l=Ba||($a=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),$a.name="WorkerInitError",$a.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject($a);if(Bs.size>=Ip){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Bs.size,a.max=Ip,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=Bs.get(c);if(!m)return;Bs.delete(c),m.cleanup();const w=new Error("Worker render timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT",m.aborted||m.reject(w),G1()},n);d=()=>{const m=Bs.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const w=new Error("Aborted");w.name="AbortError",u(w)},o&&o.addEventListener("abort",d,{once:!0});const h=a,g=u;Bs.set(c,{resolve:m=>{h(m)},reject:m=>{g(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 w=Bs.get(c);Bs.delete(c),clearTimeout(f),w?.cleanup(),w?.reject(m),G1()}})})}function rVe(e,t=!0,n){const o=`${t?"d":"i"}:${_L(e)}`;if(ta.set(o,n),ta.size>200){const s=ta.keys().next().value;ta.delete(s)}}const hle="WORKER_BUSY";function mle(e=2e3,t){return Bs.size{let s,i=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),lc.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{i||(i=!0,a(),n())},lc.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(()=>G1()),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 s1={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function lVe(e){return T2(this,arguments,function*(t,n=!0,o={}){var s,i,r,l;if(!CL()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:s1.timeout,u=(i=o.waitTimeout)!=null?i:s1.waitTimeout,c=(r=o.backoffMs)!=null?r:s1.backoffMs,d=(l=o.maxRetries)!=null?l:s1.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):s1.maxRetries,h=o.signal;let g=0;for(;;){if(h?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield ple(t,n,a,h)}catch(m){if(m?.code!==hle||g>=f)throw m;if(g++,yield mle(u,h).catch(()=>{}),h?.aborted){const w=new Error("Aborted");throw w.name="AbortError",w}c>0&&(yield new Promise(w=>globalThis.setTimeout(w,c*g)))}}})}function Td(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function gle(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 ng(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=gle(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 og(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 SL(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function sg(e,t=360,n=500){return SL(e,t,n)}function ig(e,t=360,n=500){return SL(e,t,n)}var vle=Object.defineProperty,yle=Object.defineProperties,kle=Object.getOwnPropertyDescriptors,Rw=Object.getOwnPropertySymbols,ble=Object.prototype.hasOwnProperty,Cle=Object.prototype.propertyIsEnumerable,Ow=(e,t,n)=>t in e?vle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AL=(e,t)=>{for(var n in t||(t={}))ble.call(t,n)&&Ow(e,n,t[n]);if(Rw)for(var n of Rw(t))Cle.call(t,n)&&Ow(e,n,t[n]);return e},Pw=(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 rg=()=>Go(()=>import("./mermaid.core-Cahi9cr1.js").then(e=>e.bp),__vite__mapDeps([2,3]));let jl=null,Ed=rg,_1=null,O3=!1,P3=!1,x1=0;function wle(e){Ed=e,x1++,jl=null,_1=null,O3=!1,P3=!1}function _le(e){wle(rg)}function Dw(){return typeof Ed=="function"}function Bw(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=AL({},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},yle(n,kle(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function Hw(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=AL({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 aVe(){return Pw(this,null,function*(){if(jl)return jl;const e=(function(){try{const o=globalThis;return Bw(o?.mermaid)}catch{return null}})();if(e)return jl=e,Hw(jl),jl;const t=Ed,n=x1;return t?t===rg&&O3?null:_1||(_1=Pw(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===rg)return n===x1&&t===Ed&&(O3=!0,(function(i){P3||(P3=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===x1&&t===Ed&&(_1=null)}return n!==x1||t!==Ed?null:o?(jl=Bw(o),Hw(jl),jl):null}),_1):null})}let Fi=null,Na=null;const Pr=new Map,Wu=new Map;function Yh(e){for(const t of Pr.values())t.reject(e);Pr.clear(),Wu.clear()}let zw=5,Ww=!1;const xle="WORKER_BUSY",Uw="MERMAID_DISABLED";function Sle(e){if(Fi&&Fi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",Yh(n)}Fi=e,Na=null;const t=e;Fi.onmessage=n=>{if(Fi!==t)return;const{id:o,ok:s,result:i,error:r}=n.data,l=Pr.get(o);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(i))},Fi.onerror=n=>{var o,s;if(Fi===t)if(Pr.size!==0){try{Ww?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}Yh(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Fi.onmessageerror=n=>{var o,s;if(Fi===t)if(Pr.size!==0){try{Ww?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}Yh(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function Ale(){var e;if(Fi)try{Yh(new Error("Worker cleared")),(e=Fi.terminate)==null||e.call(Fi)}catch{}Fi=null,Na=null}function ML(e,t,n,o){if(!Dw()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=Uw,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=Wu.get(s);return i||(i=(function(r,l,a=1400){if(!Dw()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=Uw,Promise.reject(c)}if(Na)return Promise.reject(Na);const u=Fi||(Na=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Na.name="WorkerInitError",Na.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(Na);if(Pr.size>=zw){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=xle,c.inFlight=Pr.size,c.max=zw,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let h,g=!1;const m=()=>{g||(g=!0,h!=null&&globalThis.clearTimeout(h),Pr.delete(f))},w={resolve:_=>{m(),c(_)},reject:_=>{m(),d(_)}};Pr.set(f,w);try{u.postMessage({id:f,action:r,payload:l})}catch(_){return Pr.delete(f),void d(_)}h=globalThis.setTimeout(()=>{const _=new Error("Worker call timed out");_.name="WorkerTimeout",_.code="WORKER_TIMEOUT";const v=Pr.get(f);v&&v.reject(_)},a)})})(e,t,n),Wu.set(s,i),i.then(()=>{Wu.get(s)===i&&Wu.delete(s)},()=>{Wu.get(s)===i&&Wu.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 uVe(e,t,n=1400,o){return ML("canParse",{code:e,theme:t},n,o)}function cVe(e,t,n=1400,o){return ML("findPrefix",{code:e,theme:t},n,o)}var Mle=Object.defineProperty,Tle=Object.defineProperties,Ele=Object.getOwnPropertyDescriptors,jw=Object.getOwnPropertySymbols,Ile=Object.prototype.hasOwnProperty,Lle=Object.prototype.propertyIsEnumerable,Vw=(e,t,n)=>t in e?Mle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mt=(e,t)=>{for(var n in t||(t={}))Ile.call(t,n)&&Vw(e,n,t[n]);if(jw)for(var n of jw(t))Lle.call(t,n)&&Vw(e,n,t[n]);return e},rn=(e,t)=>Tle(e,Ele(t)),vo=(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 $le="__global__",j9="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",D3=(()=>{const e=globalThis;if(e[j9])return e[j9];const t={scopedCustomComponents:{},revision:Xr(0)};return e[j9]=t,t})(),qw=D3.revision,Nle=Symbol("markstreamCustomComponents"),Fle=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 Yp(e){return Fle.has(String(e).trim().toLowerCase())}function Rle(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function V9(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([xr(n),xr(Rle(n))]))!s||Yp(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function fs(e){const t=on(Nle,null);return R(()=>{var n;return qw.value,(function(o,s={}){return qw.value,mt(mt(mt({},V9(D3.scopedCustomComponents[$le]||{})),V9(s)),V9((function(i){return i&&D3.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const Ole=["aria-label"],Ple={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"},Dle={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"},Kn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},er=Kn(tt({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(b(),A("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(b(),A("svg",Dle,[...n[1]||(n[1]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),C("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(b(),A("svg",Ple,[...n[0]||(n[0]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,Ole))}),[["__scopeId","data-v-be21ab83"]]);er.install=e=>{e.component(er.__name,er)};const Ble={class:"emoji-node"},Bi=Kn(tt({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(b(),A("span",Ble,N(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);Bi.install=e=>{e.component(Bi.__name,Bi)};const Hle=["id"],zle=["title"],tr=Kn(tt({__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)=>(b(),A("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[C("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+N(e.node.id)+"]",9,zle)],8,Hle))}}),[["__scopeId","data-v-c1463a29"]]);tr.install=e=>{e.component(tr.__name,tr)};const TL=(()=>{try{return!1}catch{}return!1})();function q9(e){TL&&console.warn(e)}function Kw(e,t="safe",n){return r5(e,t,n)}function EL(e){return Cre(e)}function K9(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function c5(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=Gh((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),K9(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),K9(r.value)]):Object.entries(s).map(([r,l])=>[r,K9(l)]):null,t,n);var s;if(!o)return;const i=EL(Z1(o));return Object.keys(i).length>0?i:void 0}function Zw(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 i1(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Z9(e,t,n,o,s,i,r=!1){const l=(function(d,f){return fL(d,f)})(e,o);if(Vp.has(e.toLowerCase())||!l&&aL(e,i))return null;if(!l&&i5(e,i))return r?[Zw(e,t,!0)]:[Zw(e,t),...n,``];const a=r5(t,i,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=o[e]||o[e.toLowerCase()],f=EL(a);return nn(d,rn(mt({},f),{key:c}),n.length>0?n:void 0)}return nn(e,rn(mt({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function IL(e,t){return xre(e,t)}function lg(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=Z9(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);i1(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 h=-1;for(let g=u.length-1;g>=0;g--)if(u[g].tagName.toLowerCase()===f){h=g;break}if(h!==-1)for(;u.length>h;){const g=u.pop(),m=Z9(g.tagName,g.attrs||{},g.children,r,g.autoKey,l);u.length>0?i1(u[u.length-1].children,m):i1(c,m),g.tagName.toLowerCase()!==f&&u.length>h&&q9(`Auto-closing unclosed tag: <${g.tagName}>`)}else q9(`Ignoring closing tag with no matching opening tag: `)}for(;u.length>0;){const d=u.pop(),f=Z9(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?i1(u[u.length-1].children,f):i1(c,f),q9(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(pL(e),t,n)}catch(s){return o=s,TL&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const Wle=["innerHTML"],nr=Kn(tt({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=on("markstreamHtmlPolicy",void 0),o=R(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=fs(()=>t.customId),i=tt({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=R(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:Vd(l,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=lg(l,s.value,o.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!IL(l,s.value))return{mode:"html",content:Vd(l,o.value)};const a=lg(l,s.value,o.value);return a===null?{mode:"html",content:Vd(l,o.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(b(),A("span",{key:0,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[V(p(i),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(b(),A("span",{key:1,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},N(r.value.content),3)):(b(),A("span",{key:2,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,Wle))}}),[["__scopeId","data-v-d17f12b0"]]);nr.install=e=>{e.component(nr.__name,nr)};const Ule={class:"inline-code"},jle={key:0},ii=Kn(tt({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=mf(),o=on("markstreamFade",void 0),s=on("markstreamTextStreamState",void 0),i=on("markstreamStreamVersion",void 0),r=R(()=>{const v=n.fade;return v===""||v===!0||v==="true"||v!==!1&&v!=="false"&&void 0}),l=R(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=R(()=>{var v;return String((v=t.node.code)!=null?v:"")}),u=R(()=>!l.value),c=R(()=>{var v;const k=(v=n["index-key"])!=null?v:n.indexKey;return k==null||k===""?"":String(k)}),d=Z(t.node.code),f=Z(""),h=Z(0);let g;function m(){g?.(),g=void 0}function w(){m(),f.value&&(d.value=d.value+f.value,f.value="")}et([()=>t.node.code,c,l],([v])=>{const k=String(v??""),y=c.value,x=vL({nextContent:k,persistedContent:y?s?.get(y):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=x.settledContent,f.value=x.streamedDelta,x.appended?(h.value+=1,(function(){if(!f.value||g||!i)return;const M=i.value;g=et(()=>i.value,$=>{$!==M&&w()},{flush:"sync"})})()):f.value||m(),y&&s?.set(y,k)},{immediate:!0}),pf(m);const _=R(()=>h.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(v,k)=>(b(),A("code",Ule,[u.value?(b(),A(Pe,{key:0},[Ve(N(a.value),1)],64)):(b(),A(Pe,{key:1},[d.value?(b(),A("span",jle,N(d.value),1)):te("",!0),f.value?(b(),A("span",{key:1,class:Re(["inline-code-stream-delta",[_.value]]),onAnimationend:w},N(f.value),35)):te("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);ii.install=e=>{e.component(ii.__name,ii)};const B3=Z(!1),Gw=Z(""),Yw=Z("top"),Y1=Z(null),X1=Z(null),H3=Z(null),z3=Z(null),Xw=Z(null);let Xh=null,Jh=null,W3=0;function LL(){Xh&&(clearTimeout(Xh),Xh=null),Jh&&(clearTimeout(Jh),Jh=null)}let kh=!1,bh=null,Jw=!1;function Vle(e,t,n="top",o=!1,s,i){if(!e)return;const r=++W3;LL();const l=()=>vo(null,null,function*(){var a,u;if(yield(function(){return vo(this,null,function*(){if(!kh&&!Jw&&typeof document<"u"){bh!=null||(bh=vo(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([Go(()=>import("./vue.runtime.esm-bundler-BX4cWW2k.js"),[]),Go(()=>import("./Tooltip-CPKMqLZA.js"),[])]),h=document.createElement("div");h.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(h),c({setup:()=>()=>{var g;return d(f,{visible:B3.value,"anchor-el":Y1.value,content:Gw.value,placement:Yw.value,id:X1.value,originX:H3.value,originY:z3.value,isDark:(g=Xw.value)!=null?g:void 0})}}).mount(h),kh=!0}));try{yield bh}catch(c){kh=!1,bh=null,Jw=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),kh&&r===W3){X1.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Y1.value=e,Gw.value=t,Yw.value=n,H3.value=(a=s?.x)!=null?a:null,z3.value=(u=s?.y)!=null?u:null,Xw.value=typeof i=="boolean"?i:null,B3.value=!0;try{e.setAttribute("aria-describedby",X1.value)}catch{}}});o?l():Xh=setTimeout(l,80)}function qle(e=!1){W3+=1,LL();const t=()=>{if(Y1.value&&X1.value)try{Y1.value.removeAttribute("aria-describedby")}catch{}B3.value=!1,Y1.value=null,X1.value=null,H3.value=null,z3.value=null};e?t():Jh=setTimeout(t,120)}const Kle={"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..."},Zle=Symbol("markstreamI18nFallback");function $L(e,t){var n;return(n=t?.[e])!=null?n:Kle[e]}const U3=(e,t)=>{var n;return(n=$L(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 Qw(e,t){return{t(n){const o=$L(n,t);if(e.te&&o!=null&&!e.te(n))return U3(n,t);const s=e.t(n);return s===n&&o!=null?U3(n,t):s}}}function Gle(){const e=(function(){var n,o,s;try{const i=ds(),r=Zle,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=ds(),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 Qw(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return Qw({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>U3(n,e)}}const NL=Symbol("ViewportPriority"),FL=Symbol("ViewportPriorityOptions"),RL=Symbol("OffscreenHeavyNodeDeferral"),Yle=R(()=>!1),gc="400px";function d5(){return on(FL,void 0)}function f5(){return on(RL,Yle)}function Xle(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?Z(t):t,r=s?(n=window.requestIdleCallback)!=null?n:$=>window.setTimeout(()=>$({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(o=window.cancelIdleCallback)!=null?o:$=>window.clearTimeout($):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let h=null,g=null;function m($){if(!$)return"viewport";let S=a.get($);return S||(S=u++,a.set($,S)),String(S)}function w(){if(h!=null){try{l?.(h)}catch{}h=null}}function _($){if($){const S=c.get($);if(S&&!S.targets.size){try{S.io.disconnect()}catch{}c.delete($)}}d.size||f.size||w()}function v($){const S=d.get($);if(!S)return;const I=c.get(S.bucketKey);if(!S.visible.value){S.visible.value=!0;try{S.resolve()}catch{}}try{I?.io.unobserve($)}catch{}I?.targets.delete($),d.delete($),f.delete($),_(S.bucketKey)}function k(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&h==null&&f.size&&(h=r(()=>{h=null;const $=f.values().next().value;$&&(f.delete($),v($),f.size&&k())},{timeout:1200}))}function y($,S){if(!s||typeof IntersectionObserver>"u")return null;const I=(function(H,O){var F,W,z;return{root:(F=e?.(H??null))!=null?F:null,rootMargin:(W=O?.rootMargin)!=null?W:gc,threshold:(z=O?.threshold)!=null?z:0}})($,S),P=[m((D=I).root),D.rootMargin,D.threshold].join("\0");var D;const T=c.get(P);if(T)return{key:P,bucket:T};let L;try{L=new IntersectionObserver(H=>{for(const O of H)(O.isIntersecting||O.intersectionRatio>0)&&v(O.target)},{root:I.root,rootMargin:I.rootMargin,threshold:I.threshold})}catch{return null}const B={io:L,targets:new Map};return c.set(P,B),{key:P,bucket:B}}function x(){if(s&&i.value)for(const[$,S]of Array.from(d.entries())){const I=y($,S.opts);if(!I){v($);continue}if(I.key===S.bucketKey)continue;const P=S.bucketKey,D=c.get(P);try{D?.io.unobserve($)}catch{}D?.targets.delete($),S.bucketKey=I.key,I.bucket.targets.set($,S),I.bucket.io.observe($),_(P)}}et(i,$=>{if(!$){for(const S of Array.from(d.keys()))v(S);w()}},{flush:"sync"});const M=($,S)=>{const I=Z(!1);let P,D=!1;const T=new Promise(O=>{P=()=>{D||(D=!0,O())}}),L=()=>{const O=d.get($);if(!O)return f.delete($),void _();const F=c.get(O.bucketKey);try{F?.io.unobserve($)}catch{}F?.targets.delete($),d.delete($),f.delete($),_(O.bucketKey)};if(!s||!i.value)return I.value=!0,P(),{isVisible:I,whenVisible:T,destroy:L};const B=y($,S);if(!B)return I.value=!0,P(),{isVisible:I,whenVisible:T,destroy:L};const H={resolve:P,visible:I,bucketKey:B.key,opts:S};return d.set($,H),B.bucket.targets.set($,H),B.bucket.io.observe($),s&&g==null&&(g=window.requestAnimationFrame(()=>{g=null,x()})),S?.allowIdle!==!1&&(f.add($),k()),{isVisible:I,whenVisible:T,destroy:L}};return M.refresh=x,En(NL,M),M}function p5(){var e,t;const n=on(NL,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:h=>window.setTimeout(()=>h({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:h=>window.clearTimeout(h):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=h=>{if(!h)return;const g=s.get(h);if(g&&!g.targets.size){try{g.io.disconnect()}catch{}s.delete(h)}},d=h=>{const g=o.get(h);if(!g)return;const m=s.get(g.bucketKey);if(!g.visible.value){g.visible.value=!0;try{g.resolve()}catch{}}try{m?.io.unobserve(h)}catch{}o.delete(h),m?.targets.delete(h),i.delete(h),c(g.bucketKey),i.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&i.size&&(r=l(()=>{r=null;const h=i.values().next().value;h&&(i.delete(h),d(h),i.size&&f())},{timeout:1200}))};return(h,g)=>{const m=Z(!1);let w,_=!1;const v=new Promise(x=>{w=()=>{_||(_=!0,x())}}),k=()=>{const x=o.get(h);if(!x)return i.delete(h),void(i.size||u());const M=s.get(x.bucketKey);try{M?.io.unobserve(h)}catch{}o.delete(h),M?.targets.delete(h),i.delete(h),c(x.bucketKey),i.size||u()},y=(x=>{var M,$;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const S=(L=>{var B,H;return[(B=L?.rootMargin)!=null?B:gc,(H=L?.threshold)!=null?H:0].join("\0")})(x),I=s.get(S);if(I)return{key:S,bucket:I};const P=(M=x?.rootMargin)!=null?M:gc;let D;try{D=new IntersectionObserver(L=>{for(const B of L)(B.isIntersecting||B.intersectionRatio>0)&&d(B.target)},{root:null,rootMargin:P,threshold:($=x?.threshold)!=null?$:0})}catch{return null}const T={io:D,targets:new Set};return s.set(S,T),{key:S,bucket:T}})(g);return y?(o.set(h,{resolve:w,visible:m,bucketKey:y.key}),y.bucket.targets.add(h),y.bucket.io.observe(h),g?.allowIdle!==!1&&(i.add(h),f()),{isVisible:m,whenVisible:v,destroy:k}):(m.value=!0,w(),{isVisible:m,whenVisible:v,destroy:k})}}function Jle(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 Qle=["data-markstream-viewport-pending"],eae=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],tae={key:1,class:"image-placeholder"},nae={key:1,class:"image-node__raw-text"},oae={key:2,class:"image-shimmer-overlay"},sae={key:1,class:"image-node__raw-text"},iae={key:3,class:"image-error"},Va=Kn(tt({__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=Z(!1),a=Z(!1),u=Z(""),c=Z("primary"),d=Z(null),f=mf(),h=on(F3,null),g=p5(),m=d5(),w=f5(),_=R(()=>_C(i.node.src)),v=R(()=>_C(i.fallbackSrc)),k=(s=(o=(n=ds())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),y=typeof window<"u"&&k?.getAttribute("src")===(_.value||v.value),x=Z(typeof window>"u"||y||!w.value),M=Xr(null);let $="",S=null;const I=R(()=>u.value),P=R(()=>!i.lazy),D=R(()=>typeof window<"u"&&w.value&&!y),T=R(()=>!D.value||x.value),L=R(()=>T.value?I.value:""),B=R(()=>{var de,he;return(he=(de=m?.value.heavyBlockMargin)!=null?de:m?.value.rootMargin)!=null?he:gc}),H=R(()=>!i.node.loading&&c.value!=="failed"&&u.value.length>0),O=R(()=>c.value==="failed"),F=R(()=>(!P.value||D.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),W=R(()=>Jle(i,f));function z(de=W.value){de&&d.value&&h?.reportHeight(de,d.value.offsetHeight)}function U(de=W.value){de&&yt(()=>{z(de)})}function q(){S&&(clearTimeout(S),S=null)}function K(){const de=W.value;de&&$!==de&&($&&h?.markSettled($),q(),$=de,h?.markPending(de),typeof window<"u"&&(S=window.setTimeout(()=>{$===de&&(U(de),ie())},8e3)))}function ie(){return vo(this,null,function*(){const de=$;de&&(q(),$="",yield yt(),z(de),h?.markSettled(de))})}function ne(){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 U();c.value="failed",a.value=!0,r("error",u.value),U()}function Y(){l.value=!0,a.value=!1,r("load",I.value),U()}function le(de){de.preventDefault(),l.value&&!a.value&&r("click",[de,I.value])}const{t:Ee}=Gle();return et([_,v,()=>i.node.loading],()=>(l.value=!1,a.value=!1,i.node.loading||_.value?(u.value=_.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"&&et([d,D],([de,he],pe,oe)=>{var ve;if((ve=M.value)==null||ve.destroy(),M.value=null,!he||x.value)return void(x.value=!0);if(!de)return void(x.value=!1);let G=!0;const X=g(de,{rootMargin:B.value,allowIdle:!1});M.value=X,x.value=X.isVisible.value,X.whenVisible.then(()=>{G&&M.value===X&&(x.value=!0)}),oe(()=>{G=!1,X.destroy(),M.value===X&&(M.value=null)})},{immediate:!0}),et([H,l,a,I,()=>i.lazy,T],([de,he,pe,oe,ve,G])=>de&&oe&&!pe&&G?he?(ie(),void U()):ve?(K(),void U()):void(he||pe||K()):(ie(),void U()),{flush:"post",immediate:!0}),Un(()=>{var de;(de=M.value)==null||de.destroy(),M.value=null,(function(){const he=$;he&&(q(),$="",h?.markSettled(he))})()}),(de,he)=>{var pe,oe,ve,G,X;return b(),A("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":D.value&&!x.value?"true":void 0},[H.value?(b(),A("img",{key:0,src:L.value||void 0,alt:String((oe=(pe=i.node.alt)!=null?pe:i.node.title)!=null?oe:""),title:String((G=(ve=i.node.title)!=null?ve:i.node.alt)!=null?G:""),class:Re(["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":(X=i.node.alt)!=null?X:p(Ee)("image.preview"),onError:ne,onLoad:Y,onClick:le},null,42,eae)):te("",!0),e.node.loading&&!a.value?(b(),A("span",tae,[i.usePlaceholder?Cn(de.$slots,"placeholder",{key:0,node:i.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[he[0]||(he[0]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),A("span",nae,N(e.node.raw),1))])):te("",!0),F.value&&!e.node.loading?(b(),A("span",oae,[i.usePlaceholder?Cn(de.$slots,"placeholder",{key:0,node:i.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[he[1]||(he[1]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),A("span",sae,N(e.node.raw),1))])):te("",!0),O.value?(b(),A("span",iae,[Cn(de.$slots,"error",{node:i.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[he[2]||(he[2]=C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[C("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)),C("span",null,N(p(Ee)("image.loadError")),1)],!0)])):te("",!0)],8,Qle)}}}),[["__scopeId","data-v-046e82ac"]]);Va.install=e=>{e.component(Va.__name,Va)};const rae={key:2},El=tt({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=fs(()=>t.customId),o=on("markstreamHtmlPolicy",void 0),s=on("markstreamNestedRendererProps",void 0),i=R(()=>{var g;return(g=o?.value)!=null?g:"safe"}),r=R(()=>{var g,m;const w=(g=s?.value)!=null?g:{};return rn(mt({},w),{customId:(m=t.customId)!=null?m:w.customId,htmlPolicy:i.value})}),l=zr({loader:()=>Promise.resolve().then(()=>x5),suspensible:!1}),a=R(()=>t.components[String(t.node.type)]),u=R(()=>!!(a.value&&n.value[t.node.type]&&!Yp(String(t.node.type)))),c=R(()=>u.value?c5(t.node,i.value):void 0),d=R(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=R(()=>{var g;return String((g=t.node.content)!=null?g:"")}),h=R(()=>{var g,m;return String((m=(g=t.node.content)!=null?g:t.node.raw)!=null?m:"")});return(g,m)=>a.value&&u.value?(b(),me(ys(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:ke(()=>[d.value?(b(),me(p(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?(b(),me(p(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"])):te("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(b(),me(ys(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(b(),A("span",rae,N(h.value),1)):te("",!0)}}),e_=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function lae(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return rn(mt(mt({},e_),n),{enabled:(t=n.enabled)==null||t})}return mt({},e_)}function h5(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 OL(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 t_(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function aae(e){var t;return e.diff===!0||t_(e.language)||t_(OL(String((t=e.raw)!=null?t:"")))}function uae(e,t,n){const o=(function(s){const i=OL(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 cae=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],dae={key:0,translate:"no",class:"markstream-pre__diff-code"},fae={class:"markstream-pre__diff-pane-content"},pae={class:"markstream-pre__diff-number","aria-hidden":"true"},hae={class:"markstream-pre__diff-content"},mae={class:"markstream-pre__diff-content-inner"},gae={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},vae=["textContent"],yae=["textContent"],Ri=tt({__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(Y,le){const Ee=String(Y??"");return le?Ee:Ee.replace(/\r\n$|\n$|\r$/,"")}const o=R(()=>{var Y,le,Ee;const de=String((le=(Y=t.node)==null?void 0:Y.language)!=null?le:"");return String((Ee=String(de).split(/\s+/g)[0])!=null?Ee:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=R(()=>`language-${o.value}`),i=R(()=>{var Y;return t.loading===!0||((Y=t.node)==null?void 0:Y.loading)===!0}),r=R(()=>{var Y;return n((Y=t.node)==null?void 0:Y.code,i.value)});let l="",a=1;const u=R(()=>(function(Y){let le=0,Ee=1;Y.startsWith(l)&&(le=l.length,Ee=a,le>0&&Y[le-1]==="\r"&&Y[le]===` -`&&le++);for(let de=le;der.value.split(/\r\n|\n|\r/));let d=0,f="";const h=R(()=>{const Y=u.value;Y{var Y;return t.showLineNumbers===!0&&((Y=t.node)==null?void 0:Y.diff)===!0}),m=R(()=>g.value&&t.diffInline===!0),w=R(()=>{const Y=Number(t.reservedHeightPx);if(!Number.isFinite(Y)||Y<=0)return;const le=`${Math.ceil(Y)}px`;return i.value?{maxHeight:le,overflow:"auto"}:{height:le,minHeight:le,maxHeight:le,overflow:"auto"}}),_=["diff ","index ","--- ","+++ ","@@ "];function v(Y){return String(Y??"").trim().length===0}function k(Y,le="context",Ee={}){const de=v(Y);return{code:Y,kind:de&&le!=="hunk"&&le!=="spacer"&&!Ee.preserveBlankKind?"context":le,empty:de}}function y(Y){const le=n(Y,i.value);return le?le.split(/\r\n|\n|\r/):[]}function x(Y,le){return!v(Y[le])||le_.some(Ee=>le.startsWith(Ee)))}function I(Y,le){return le||!Y.startsWith(" ")||Y.startsWith(" ")?Y:` ${Y}`}function P(Y,le){const Ee=Y.length,de=le.length,he=[];let pe=0;for(;pe=pe&&G>=pe&&Y[ve]===le[G];)oe.unshift({originalIndex:ve,modifiedIndex:G}),ve--,G--;const X=ve-pe+1,fe=G-pe+1;if(X<=0||fe<=0||i.value||(X+1)*(fe+1)>15e5)return he.concat(oe);const Ce=fe+1,ge=new Uint32Array((X+1)*(fe+1));for(let ue=X-1;ue>=0;ue--)for(let Se=fe-1;Se>=0;Se--){const Ue=ue*Ce+Se;if(Y[pe+ue]===le[pe+Se])ge[Ue]=ge[(ue+1)*Ce+Se+1]+1;else{const _e=ge[(ue+1)*Ce+Se],Te=ge[ue*Ce+Se+1];ge[Ue]=_e>=Te?_e:Te}}const Q=[];let ee=0,ce=0;for(;ee=ge[ee*Ce+ce+1]?ee++:ce++;return he.concat(Q,oe)}function D(Y){var le;const Ee=(function(){var G,X;const fe=t.diffHideUnchangedRegions;if(fe==null||fe===!1)return null;const Ce=fe===!0?{}:fe;return Ce.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((G=Ce.contextLineCount)!=null?G:2)),minimumLineCount:Math.max(1,Math.floor((X=Ce.minimumLineCount)!=null?X:4))}})();if(!Ee||Y.length<1||Y.length>2||Y.length===2&&Y[0].lines.length!==Y[1].lines.length)return Y;const de=Y[0].lines,he=(le=Y[1])==null?void 0:le.lines,pe=G=>de[G].kind==="context"&&(he===void 0||he[G].kind==="context"&&de[G].code===he[G].code),oe=[];let ve=0;for(;ve=Ee.minimumLineCount){const fe=G+(G===0?0:Ee.contextLineCount),Ce=X-(X===de.length?0:Ee.contextLineCount);Ce-fe>=Ee.minimumLineCount&&oe.push({start:fe,end:Ce})}ve===G&&ve++}return oe.length?Y.map((G,X)=>{const fe=[];let Ce=0;for(const ge of oe)fe.push(...G.lines.slice(Ce,ge.start)),fe.push({code:X===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${G.key}-collapsed-${ge.start}-${ge.end}`,number:""}),Ce=ge.end;return fe.push(...G.lines.slice(Ce)),rn(mt({},G),{lines:fe})}):Y}const T=R(()=>{var Y,le,Ee,de;if(!g.value)return[];const he=(function(X){const fe=X.some(ge=>M(ge)),Ce=X.some(ge=>$(ge));return fe&&Ce||(function(){var ge,Q,ee,ce;if(o.value==="diff")return!0;const ue=(ce=(ee=String((Q=(ge=t.node)==null?void 0:ge.raw)!=null?Q:"").split(/\r?\n/,1)[0])==null?void 0:ee.trim())!=null?ce:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(ue)})()&&(fe||Ce)})(c.value),pe=(function(){var X,fe;return((X=t.node)==null?void 0:X.originalCode)!=null||((fe=t.node)==null?void 0:fe.updatedCode)!=null})();if(m.value){const X=pe?(function(fe,Ce){const ge=y(fe),Q=y(Ce),ee=P(ge,Q);if(ee.length>0){const Te=[];let st=0,Fe=0;for(const Oe of ee){for(;st=ue&&Ue>=ue&&ge[Se]===Q[Ue];)_e.unshift(rn(mt({},k(Q[Ue])),{key:`inline-suffix-${Ue}`,number:Ue+1})),Se--,Ue--;for(let Te=ue;Te<=Se;Te++)ce.push(rn(mt({},k(ge[Te],"removed",{preserveBlankKind:x(ge,Te)})),{key:`inline-removed-source-${Te}`,number:Te+1}));for(let Te=ue;Te<=Ue;Te++)ce.push(rn(mt({},k(Q[Te],"added",{preserveBlankKind:x(Q,Te)})),{key:`inline-added-source-${Te}`,number:Te+1}));return ce.concat(_e)})((Y=t.node)==null?void 0:Y.originalCode,(le=t.node)==null?void 0:le.updatedCode):(function(fe){const Ce=[];let ge=1,Q=1;const ee=S(fe);for(const[ce,ue]of fe.entries())if(ue.startsWith("@@")){const Se=ue.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);Se&&(ge=Number(Se[1]),Q=Number(Se[2])),Ce.push(rn(mt({},k(ue,"hunk")),{key:`inline-hunk-${ce}`,number:""}))}else if(M(ue))Ce.push(rn(mt({},k(I(ue.slice(1),ee),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${ce}`,number:ge++}));else if($(ue))Ce.push(rn(mt({},k(I(ue.slice(1),ee),"added",{preserveBlankKind:!0})),{key:`inline-added-${ce}`,number:Q++}));else{const Se=ee&&ue.startsWith(" ")?ue.slice(1):ue;Ce.push(rn(mt({},k(Se)),{key:`inline-context-${ce}`,number:Q})),ge++,Q++}return Ce})(c.value);return D([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:X}])}if(!he&&pe)return(function(X,fe){const Ce=y(X),ge=y(fe),Q=P(Ce,ge),ee=[],ce=[];let ue=0,Se=0,Ue=0;const _e=(Te,st)=>{const Fe=Math.max(Te-ue,st-Se);for(let Oe=0;Oern(mt({},X),{key:`original-${fe}`,number:fe+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:ve.map((X,fe)=>rn(mt({},X),{key:`modified-${fe}`,number:fe+1}))}])}),L=R(()=>T.value.some(Y=>Y.lines.some(le=>le.kind==="collapsed"))),B=R(()=>{const Y=o.value;return Y?`Code block: ${Y}`:"Code block"}),H=Z(null),O=Z([]);let F=null,W=!1,z=null;function U(Y){const le=Number.parseFloat(String(Y??""));return Number.isFinite(le)&&le>0?le:0}function q(Y,le){var Ee;if(!Y)return le;if(Y.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const de=Y.querySelector(".markstream-pre__diff-content"),he=de?.getBoundingClientRect(),pe=(Ee=he?.height)!=null?Ee:0;return Math.max(le,Math.ceil(pe))}function K(){W||typeof window>"u"||(F!=null&&window.cancelAnimationFrame(F),F=window.requestAnimationFrame(()=>{F=null,W||(function(){var Y,le;F=null;const Ee=H.value;if(!Ee||!g.value||m.value||!Ee.classList.contains("is-wrap"))return void(O.value.length&&(O.value=[]));const de=(function(fe){const Ce=window.getComputedStyle(fe),ge=U(Ce.getPropertyValue("--markstream-pre-diff-line-height"));if(ge>0)return ge;const Q=U(Ce.lineHeight);return Q>0?Q:18})(Ee),he=Array.from(Ee.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),pe=Array.from(Ee.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),oe=Math.max(he.length,pe.length),ve=[];for(let fe=0;fe{const ge=X[Ce];return ge&&Math.abs(fe.rowHeight-ge.rowHeight)<=.5&&Math.abs(fe.originalHeight-ge.originalHeight)<=.5&&Math.abs(fe.modifiedHeight-ge.modifiedHeight)<=.5})||(O.value=ve)})()}))}function ie(Y){z?.disconnect(),z=null,Y&&g.value&&!m.value&&typeof ResizeObserver<"u"&&(z=new ResizeObserver(()=>{K()}),z.observe(Y))}function ne(Y,le){const Ee=O.value[Y];if(!Ee)return;const de=le==="original"?Ee.originalHeight:Ee.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(Ee.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(de)}px`}}return et(H,Y=>{ie(Y),yt(()=>K())},{flush:"post"}),et([g,m,T],()=>{ie(H.value),yt(()=>K())},{flush:"post",immediate:!0}),Un(()=>{W=!0,F!=null&&(window.cancelAnimationFrame(F),F=null),z?.disconnect(),z=null}),(Y,le)=>(b(),A("pre",{ref_key:"preRef",ref:H,style:Gt(w.value),class:Re([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":g.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":L.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"},[g.value?(b(),A("code",dae,[(b(!0),A(Pe,null,pt(T.value,Ee=>(b(),A("span",{key:Ee.key,class:Re(["markstream-pre__diff-pane",Ee.className])},[C("span",fae,[(b(!0),A(Pe,null,pt(Ee.lines,(de,he)=>(b(),A("span",{key:de.key,class:Re(["markstream-pre__diff-line",[`markstream-pre__diff-line--${de.kind}`,{"markstream-pre__diff-line--empty":de.empty}]]),style:Gt(ne(he,Ee.key))},[le[0]||(le[0]=C("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),C("span",pae,N(de.number),1),C("span",hae,[C("span",mae,N(de.code),1)])],6))),128))])],2))),128))])):(b(),A(Pe,{key:1},[t.showLineNumbers?(b(),A("span",gae,[C("span",{class:"markstream-pre__line-numbers-text",textContent:N(h.value)},null,8,vae)])):te("",!0),C("code",{translate:"no",class:"markstream-pre__code",textContent:N(r.value)},null,8,yae)],64))],14,cae))}});Ri.install=e=>{e.component(Ri.__name,Ri)};const kae={key:0},Xo=Kn(tt({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=mf(),o=on("markstreamFade",void 0),s=on("markstreamTextStreamState",void 0),i=on("markstreamStreamVersion",void 0),r=R(()=>{const w=n.fade;return w===""||w===!0||w==="true"||w!==!1&&w!=="false"&&void 0}),l=R(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=R(()=>{var w;const _=(w=n["index-key"])!=null?w:n.indexKey;return _==null||_===""?"":String(_)}),u=Z(t.node.content),c=Z(""),d=Z(0);let f;function h(){f?.(),f=void 0}function g(){h(),c.value&&(u.value=u.value+c.value,c.value="")}et([()=>t.node.content,a,l],([w])=>{const _=String(w??""),v=a.value,k=vL({nextContent:_,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=k.settledContent,c.value=k.streamedDelta,k.appended?(d.value+=1,(function(){if(!c.value||f||!i)return;const y=i.value;f=et(()=>i.value,x=>{x!==y&&g()},{flush:"sync"})})()):c.value||h(),v&&s?.set(v,_)},{immediate:!0}),pf(h);const m=R(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(w,_)=>(b(),A("span",{class:Re([[e.node.center?"text-node-center":""],"text-node"])},[u.value?(b(),A("span",kae,N(u.value),1)):te("",!0),c.value?(b(),A("span",{key:1,class:Re(["text-node-stream-delta",[m.value]]),onAnimationend:g},N(c.value),35)):te("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function S1(e,t,n){return tt({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var r,l;const a=p5(),u=d5(),c=f5(),d=typeof window<"u"&&((l=(r=ds())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=Z(typeof window>"u"||d||!c.value),h=Xr(null);let g=null;function m(w){const _=w&&"$el"in w?w.$el:w;h.value=_ instanceof HTMLElement?_:null}return typeof window<"u"&&et([h,c],([w,_],v,k)=>{if(g?.destroy(),g=null,!_||f.value)return void(f.value=!0);if(!w)return;let y=!0;const x=a(w,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});g=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{y&&g===x&&(f.value=!0)}),k(()=>{y=!1,x.destroy(),g===x&&(g=null)})},{immediate:!0}),Un(()=>{g?.destroy(),g=null}),()=>nn(f.value?t:n,rn(mt({},s),{ref:m}),i)}})}Xo.install=e=>{e.component(Xo.__name,Xo)};const ag=tt({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=M2(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=Fw[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):Fw[""]),f=aae(n.node),h=uae(String((r=(i=n.node)==null?void 0:i.raw)!=null?r:""),d,f),g=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:h5(g??{},typeof window>"u"?0:window.innerWidth)),w=g?.diffAppearance,_=w==="dark"||w!=="light"&&n.isDark===!0,v=typeof g?.fontSize=="number"&&Number.isFinite(g.fontSize)&&g.fontSize>0?g.fontSize:12,k=typeof g?.lineHeight=="number"&&Number.isFinite(g.lineHeight)&&g.lineHeight>0?g.lineHeight:v===12?18:Math.max(12,Math.round(1.5*v)),y=typeof g?.tabSize=="number"&&Number.isFinite(g.tabSize)&&g.tabSize>0?g.tabSize:4,x=f?0:8,M=typeof((a=g?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(g.padding.top)&&g.padding.top>=0?g.padding.top:x,$=typeof((u=g?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(g.padding.bottom)&&g.padding.bottom>=0?g.padding.bottom:x,S=typeof g?.fontFamily=="string"?g.fontFamily.trim():"",I=mt(mt({fontSize:`${v}px`,lineHeight:`${k}px`,tabSize:y,paddingTop:`${M}px`,paddingBottom:`${$}px`,"--markstream-pre-line-number-top":`${M}px`},f?{"--markstream-pre-diff-line-height":`${k}px`}:{}),S?{"--markstream-code-font-family":S}:{}),P=()=>nn("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"},[nn("svg",{class:"action-icon"})]),D=n.isShowPreview!==!1&&(c==="html"||c==="svg"),T=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||D&&n.showPreviewButton!==!1,L=H=>{if(H!=null)return typeof H=="number"?`${H}px`:String(H)},B=mt(mt(mt({"--markstream-code-layout-character-width":"1ch"},L(n.minWidth)?{minWidth:L(n.minWidth)}:{}),L(n.maxWidth)?{maxWidth:L(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 nn("div",rn(mt({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":_,"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:nn("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)]"},[nn("div",{class:"code-header-main"},[nn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),nn("div",{class:"code-header-copy"},[nn("div",{class:"code-header-title"},h.title),h.caption?nn("div",{class:"code-header-caption"},h.caption):null])]),nn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?nn("div",{class:"code-diff-stats","aria-hidden":"true"},[nn("span",{class:"code-diff-stat removed"},"-0"),nn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:P(),n.showCollapseButton===!1?null:P(),T?nn("div",{class:"relative"},[P()]):null])]),nn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[nn(Ri,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?lae(g?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:I,"data-markstream-code-loading":"1"})]),nn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[nn("div",{class:"loading-skeleton"},[nn("div",{class:"skeleton-line"}),nn("div",{class:"skeleton-line"}),nn("div",{class:"skeleton-line short"})])]),nn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),G9=S1("ViewportDeferredCodeBlockNode",zr({loader:()=>vo(null,null,function*(){try{return(yield Go(()=>import("./CodeBlockNode-ZZ-0lk3E.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),Ri}}),loadingComponent:ag,delay:0,suspensible:!1}),ag),Jr=zr(()=>vo(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 nn(Xo,rn(mt({},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 wL(),(yield Go(()=>import("./index7-CjjTl3F3.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 nn(Xo,rn(mt({},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:""}$`}}))}})),PL=zr(()=>vo(null,null,function*(){try{return yield wL(),(yield Go(()=>import("./index6-BS7x8iLz.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 nn(Xo,rn(mt({},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:""}$$`}}))}})),wi=Kn(tt({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(b(),A("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"]]);wi.install=e=>{e.component(wi.__name,wi)};const bae={class:"superscript-node"},Hi=Kn(tt({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,footnote_reference:tr,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,emoji:Bi,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("sup",bae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(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"]]);Hi.install=e=>{e.component(Hi.__name,Hi)};const Cae={class:"subscript-node"},zi=Kn(tt({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,footnote_reference:tr,strikethrough:xi,highlight:or,insert:Wi,superscript:Hi,emoji:Bi,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("sub",Cae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(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"]]);zi.install=e=>{e.component(zi.__name,zi)};const wae={class:"strong-node"},_i=Kn(tt({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,emphasis:Ai,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("strong",wae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(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"]]);_i.install=e=>{e.component(_i.__name,_i)};const _ae={class:"strikethrough-node"},xi=Kn(tt({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("del",_ae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(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"]]);xi.install=e=>{e.component(xi.__name,xi)};const xae=["href","title","aria-label","aria-hidden","target","rel"],Sae=["aria-hidden"],Aae={class:"link-text-wrapper relative inline-flex"},Mae={class:"leading-[normal] link-text"},Si=Kn(tt({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=on("markstreamShowTooltips",void 0),o=R(()=>{const _=n?.value;return typeof _=="boolean"?_:t.showTooltip}),s=R(()=>{var _,v,k,y,x;const M=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",$=(_=t.animationOpacity)!=null?_:.35,S=Math.max(.12,Math.min(.5*$,$)),I={"--underline-height":`${(v=t.underlineHeight)!=null?v:2}px`,"--underline-bottom":M,"--underline-opacity":String($),"--underline-rest-opacity":String(S),"--underline-duration":`${(k=t.animationDuration)!=null?k:1.6}s`,"--underline-timing":(y=t.animationTiming)!=null?y:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(I["--link-color"]=t.color),I}),i=fs(()=>t.customId),r=R(()=>mt({text:Xo,strong:_i,strikethrough:xi,emphasis:Ai,image:Va,html_inline:nr,inline_code:ii},i.value)),l=mf(),a=R(()=>{var _,v;const k=(_=t.node)==null?void 0:_.attrs;if(!k||typeof k!="object")return{};const y={};if(Array.isArray(k))for(const x of k)Array.isArray(x)&&x[0]&&(y[String(x[0])]=String((v=x[1])!=null?v:""));else for(const[x,M]of Object.entries(k))x&&M!=null&&M!==!1&&(y[x]=M===!0?"":String(M));return Kw(y,"safe","a")}),u=R(()=>mt(mt({},l),a.value)),c=R(()=>{var _,v;return Kw({href:String((v=(_=t.node)==null?void 0:_.href)!=null?v:"")},"safe","a").href}),d=R(()=>{if(!c.value)return;const _=u.value.target;return(typeof _=="string"?_.trim():String(_??"").trim())||(wte(c.value)?"_blank":void 0)}),f=R(()=>{var _;return String((_=d.value)!=null?_:"").trim().toLowerCase()==="_blank"}),h=R(()=>{if(!c.value)return;const _=u.value.rel,v=new Set((typeof _=="string"?_:String(_??"")).split(/\s+/).filter(Boolean)),k=new Set(Array.from(v).filter(y=>y.toLowerCase()!=="opener"));return f.value&&(k.add("noopener"),k.add("noreferrer")),k.size>0?Array.from(k).join(" "):void 0}),g=R(()=>{const _=mt({},u.value);return delete _.title,delete _.href,delete _.target,delete _.rel,_});function m(){o.value&&qle()}const w=R(()=>{var _,v;const k=(_=t.node)==null?void 0:_.title;return typeof k=="string"&&k.trim().length>0?k:String((v=c.value)!=null?v:"")});return(_,v)=>{var k,y;return e.node.loading?(b(),A("span",Dn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},p(l),{style:s.value}),[C("span",Aae,[C("span",Mae,[V(p(Xo),{class:"leading-[normal] link-text",node:{type:"text",content:String((k=e.node.text)!=null?k:""),raw:String((y=e.node.text)!=null?y:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),v[1]||(v[1]=C("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,Sae)):(b(),A("a",Dn({key:0,class:"link-node",href:c.value,title:o.value?"":w.value,"aria-label":`Link: ${w.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:h.value},g.value,{style:s.value,onMouseenter:v[0]||(v[0]=x=>(function(M){var $,S,I,P;if(!o.value)return;const D=M,T=D?.clientX!=null&&D?.clientY!=null?{x:D.clientX,y:D.clientY}:void 0,L=(($=t.node)==null?void 0:$.title)||((S=c.value)!=null&&S.includes("xn--")&&((P=(I=t.node)==null?void 0:I.text)!=null&&P.includes("://"))?t.node.text:c.value)||"";Vle(M.currentTarget,L,"top",!1,T)})(x)),onMouseleave:m}),[(b(!0),A(Pe,null,pt(e.node.children,(x,M)=>(b(),me(p(El),{key:`${e.indexKey||"emphasis"}-${M}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${M}`},null,8,["components","node","custom-id","index-key"]))),128))],16,xae))}}}),[["__scopeId","data-v-367e6ca4"]]);Si.install=e=>{e.component(Si.__name,Si)};const Tae={class:"insert-node"},Wi=Kn(tt({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,strikethrough:xi,highlight:or,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("ins",Tae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(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"]]);Wi.install=e=>{e.component(Wi.__name,Wi)};const Eae={class:"highlight-node"},or=Kn(tt({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,strikethrough:xi,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("mark",Eae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(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"]]);or.install=e=>{e.component(or.__name,or)};const Iae={class:"emphasis-node"},Ai=Kn(tt({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("em",Iae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(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"]]);Ai.install=e=>{e.component(Ai.__name,Ai)};const Lae={class:"hard-break"},qa=Kn(tt({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(b(),A("br",Lae))}),[["__scopeId","data-v-50c58f70"]]);qa.install=e=>{e.component(qa.__name,qa)};const Lp=tt({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=kt({checkbox:er,checkbox_input:er,emoji:Bi,emphasis:Ai,hardbreak:qa,highlight:or,inline_code:ii,insert:Wi,link:Si,reference:wi,strikethrough:xi,strong:_i,subscript:zi,superscript:Hi,text:Xo}),o=fs(()=>t.customId),s=R(()=>{const i=o.value;return Object.keys(i).length>0?mt(mt({},n),i):n});return(i,r)=>(b(!0),A(Pe,null,pt(e.nodes,(l,a)=>(b(),me(p(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 j3(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(j3)}function ug(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(j3))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(j3)?s:null}function vc(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 $ae=["cite"],Nae={key:0,dir:"auto",class:"paragraph-node"},Fae=["custom-id"],Qh=Kn(tt({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>!!n.value.paragraph),s=R(()=>!!n.value.text),i=R(()=>ug(t.node.children,!o.value)),r=R(()=>t.fade!==!1||s.value?null:vc(i.value));return En("markstreamShowTooltips",R(()=>t.showTooltips)),En("markstreamFade",R(()=>t.fade)),(l,a)=>(b(),A("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(b(),A("p",Nae,[r.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(r.value),9,Fae)):(b(),me(p(Lp),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(b(),me(p(Ui),{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,$ae))}}),[["__scopeId","data-v-abfecebc"]]);Qh.install=e=>{e.component(Qh.__name,Qh)};const Rae={class:"definition-list"},Oae={class:"definition-term"},Pae={class:"definition-desc"},em=Kn(tt({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(b(),A("dl",Rae,[(b(!0),A(Pe,null,pt(t.node.items,(s,i)=>(b(),A(Pe,{key:i},[C("dt",Oae,[V(p(Ui),{"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"])]),C("dd",Pae,[V(p(Ui),{"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"]]);em.install=e=>{e.component(em.__name,em)};const Dae=["href","title"],J1=Kn(tt({__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)=>(b(),A("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Dae))}}),[["__scopeId","data-v-e1eb37b6"]]);J1.install=e=>{e.component(J1.__name,J1)};const Bae=["id"],Hae={class:"flex-1"},tm=tt({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(b(),A("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[C("div",Hae,[V(p(Ui),{"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,Bae))}});tm.install=e=>{e.component(tm.__name,tm)};const zae=["custom-id"],V3=Kn(tt({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=on("markstreamFade",void 0),s=R(()=>o?.value!==!1||n.value.text?null:vc(t.node.children)),i=R(()=>mt({text:Xo,inline_code:ii,link:Si,image:Va,strong:_i,emphasis:Ai,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,checkbox:er,checkbox_input:er,footnote_reference:tr,hardbreak:qa,math_inline:Jr,reference:wi},n.value));return(r,l)=>(b(),me(ys(`h${e.node.level}`),Dn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ke(()=>[s.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(s.value),9,zae)):(b(!0),A(Pe,{key:1},pt(e.node.children,(a,u)=>(b(),me(p(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"]]),I2=V3;I2.install=e=>{e.component(V3.__name,V3)};const Wae={key:0,dir:"auto",class:"paragraph-node"},Uae=["custom-id"],jae={dir:"auto",class:"paragraph-node"},Vae=["custom-id"],qd=Kn(tt({__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=R(()=>{var h;return(h=t.node)!=null?h:t.item}),o=fs(()=>t.customId),s=R(()=>!!o.value.paragraph),i=R(()=>!!o.value.text),r=R(()=>{var h;return ug((h=n.value)==null?void 0:h.children,!s.value)}),l=R(()=>{var h;if(s.value)return null;const g=(h=n.value)==null?void 0:h.children;if(!Array.isArray(g)||g.length<2)return null;const m=g[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const w=g.slice(1);if(!w.every(v=>v?.type==="list"))return null;const _=ug([m]);return _?{paragraphChildren:_,nestedLists:w}:null});function a(){return t.fade===!1&&!i.value}const u=R(()=>a()?vc(r.value):null),c=R(()=>{var h;return a()?vc((h=l.value)==null?void 0:h.paragraphChildren):null}),d=Object.freeze({}),f=R(()=>{const{value:h}=t;return typeof h=="number"&&Number.isFinite(h)?{value:h}:d});return En("markstreamShowTooltips",R(()=>t.showTooltips)),En("markstreamFade",R(()=>t.fade)),(h,g)=>{var m,w;return b(),A("li",Dn({class:"list-item",dir:"auto"},f.value),[r.value?(b(),A("p",Wae,[u.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(u.value),9,Uae)):(b(),me(p(Lp),{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?(b(),A(Pe,{key:1},[C("p",jae,[c.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(c.value),9,Vae)):(b(),me(p(Lp),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(b(!0),A(Pe,null,pt(l.value.nestedLists,(_,v)=>(b(),me(p(Ui),{key:v,nodes:[_],"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:g[0]||(g[0]=k=>h.$emit("copy",k))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(b(),me(p(Ui),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(w=(m=n.value)==null?void 0:m.children)!=null?w:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:g[1]||(g[1]=_=>h.$emit("copy",_))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);qd.install=e=>{e.component(qd.__name,qd)};const Kd=Kn(tt({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=fs(()=>e.customId),n=R(()=>t.value.list_item||qd);return(o,s)=>(b(),me(ys(e.node.ordered?"ol":"ul"),{class:Re(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ke(()=>[(b(!0),A(Pe,null,pt(e.node.items,(i,r)=>{var l;return b(),me(ys(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"]]);Kd.install=e=>{e.component(Kd.__name,Kd)};const qae={key:2,class:"html-block-node__raw"},Kae=["innerHTML"],Zae={key:1,class:"html-block-node__placeholder"},Q1=Kn(tt({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=on("markstreamHtmlPolicy",void 0),o=on("markstreamNestedRendererProps",void 0),s=R(()=>{var T,L;return(L=(T=t.htmlPolicy)!=null?T:n?.value)!=null?L:"safe"}),i=R(()=>{var T,L;const B=(T=o?.value)!=null?T:{};return rn(mt({},B),{customId:(L=t.customId)!=null?L:B.customId,htmlPolicy:s.value})}),r=zr({loader:()=>Promise.resolve().then(()=>x5),suspensible:!1}),l=R(()=>{const T=Gh(t.node.attrs,s.value);if(!T)return;const L=Z1(T);return Object.keys(L).length>0?L:void 0}),a=R(()=>{const T=String(t.node.tag||"").trim(),L=Gh(t.node.attrs,s.value,T);if(!L)return;const B=Z1(L);return Object.keys(B).length>0?B:void 0}),u=fs(()=>t.customId),c=tt({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=Z(null),f=Z(typeof window>"u"),h=Z(t.node.content),g=R(()=>Array.isArray(t.node.children)?t.node.children:[]),m=R(()=>String(t.node.tag||"div")),w=R(()=>{var T;if(m.value.trim().toLowerCase()!=="details"||(T=t.node.attrs)!=null&&T.some(([B])=>String(B).toLowerCase()==="open"))return null;const L=g.value[0];return L?.type==="html_block"&&String(L.tag||"").toLowerCase()==="summary"?L:null}),_=R(()=>{var T;return vc((T=w.value)==null?void 0:T.children)}),v=R(()=>{const T=w.value;if(!T)return;const L=Gh(T.attrs,s.value,"summary");if(!L)return;const B=Z1(L);return Object.keys(B).length>0?B:void 0}),k=R(()=>_.value==null?g.value:g.value.slice(1)),y=R(()=>{const T=m.value.trim().toLowerCase();return iI.has(T)||i5(T,s.value)}),x=R(()=>g.value.length>0&&!!t.node.tag&&!y.value),M=R(()=>{var T,L,B;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(T=h.value)!=null?T:""};const H=(L=h.value)!=null?L:t.node.content;if(!H)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:Vd(H,s.value)};if(t.node.loading){const F=lg(H,u.value,s.value);return F===null?{mode:"text",content:(B=t.node.raw)!=null?B:H}:{mode:"dynamic",nodes:F}}if(!IL(H,u.value))return{mode:"html",content:Vd(H,s.value)};const O=lg(H,u.value,s.value);return O===null?{mode:"html",content:Vd(H,s.value)}:{mode:"dynamic",nodes:O}}),$=p5(),S=d5(),I=f5(),P=Xr(null),D=!!t.node.loading;return typeof window<"u"?(et([()=>d.value,()=>S?.value.heavyBlockMargin,()=>S?.value.rootMargin],([T],L,B)=>{var H,O,F,W;if((O=(H=P.value)==null?void 0:H.destroy)==null||O.call(H),P.value=null,!D)return f.value=!0,void(h.value=t.node.content);if(!T)return void(f.value=!1);let z=!0;const U=(W=(F=S?.value.heavyBlockMargin)!=null?F:S?.value.rootMargin)!=null?W:gc,q=$(T,{rootMargin:U,allowIdle:!I.value});P.value=q,f.value=f.value||q.isVisible.value,q.whenVisible.then(()=>{z&&P.value===q&&(f.value=!0)}),B(()=>{z=!1,q.destroy(),P.value===q&&(P.value=null)})},{immediate:!0}),et(()=>t.node.content,T=>{D&&!f.value||(h.value=T)})):f.value=!0,Un(()=>{var T,L;(L=(T=P.value)==null?void 0:T.destroy)==null||L.call(T),P.value=null}),(T,L)=>(b(),me(ys(x.value?m.value:"div"),Dn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":p(I)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:ke(()=>[f.value?(b(),A(Pe,{key:0},[M.value.mode==="structured"?(b(),A(Pe,{key:0},[_.value!==null?(b(),A(Pe,{key:0},[C("summary",bR(FA(v.value)),N(_.value),17),k.value.length?(b(),me(p(r),Dn({key:0},i.value,{nodes:k.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):te("",!0)],64)):(b(),me(p(r),Dn({key:1},i.value,{nodes:g.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):M.value.mode==="dynamic"?(b(),me(p(c),{key:1,nodes:M.value.nodes},null,8,["nodes"])):M.value.mode==="text"?(b(),A("pre",qae,N(M.value.content),1)):(b(),A("div",Dn({key:3},l.value,{innerHTML:M.value.content}),null,16,Kae))],64)):(b(),A("div",Zae,[Cn(T.$slots,"placeholder",{node:e.node},()=>[L[0]||(L[0]=C("span",{class:"html-block-node__placeholder-bar"},null,-1)),L[1]||(L[1]=C("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),L[2]||(L[2]=C("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);Q1.install=e=>{e.component(Q1.__name,Q1)};const Gae={dir:"auto",class:"paragraph-node"},Yae=["custom-id"],ac=Kn(tt({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=fs(()=>t.customId),o=on("markstreamHtmlPolicy",void 0),s=on("markstreamFade",void 0),i=on("markstreamParseOptions",void 0),r=on("markstreamCustomMarkdownIt",void 0),l=on("markstreamNestedRendererProps",void 0),a=R(()=>{var S;return(S=o?.value)!=null?S:"safe"}),u=R(()=>{var S;return(S=t.parseOptions)!=null?S:i?.value}),c=R(()=>{var S;return(S=t.customMarkdownIt)!=null?S:r?.value}),d=R(()=>{var S,I;return(I=t.customHtmlTags)!=null?I:(S=l?.value)==null?void 0:S.customHtmlTags}),f=R(()=>{var S,I;const P=(S=l?.value)!=null?S:{};return rn(mt({},P),{customId:(I=t.customId)!=null?I:P.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),h=zr({loader:()=>Promise.resolve().then(()=>x5),suspensible:!1});function g(S){var I;return S.type==="text"&&String((I=S.content)!=null?I:"").trim()===""}const m=R(()=>t.node.children.filter(S=>!g(S))),w=R(()=>m.value.length>0&&m.value.every(S=>S.type==="image"||(function(I){var P;const D=(function(T){return T.type==="link"&&Array.isArray(T.children)?T.children.filter(L=>!g(L)):[]})(I);return D.length===1&&((P=D[0])==null?void 0:P.type)==="image"})(S))),_=R(()=>new Set(Ec(d.value))),v=R(()=>{if(!w.value||m.value.length<=1)return t.node.children;const S=[];for(let I=0;I0,T=t.node.children.slice(I+1).some(L=>!g(L));D&&T&&S.push(rn(mt({},P),{content:" ",raw:" "}))}return S}),k=R(()=>s?.value===!1&&!n.value.text),y=R(()=>k.value?vc(v.value):null);function x(S,I){return{node:S,"index-key":`${t.indexKey}-${I}`,"custom-id":t.customId,"custom-html-tags":d.value}}const M=R(()=>mt({inline_code:ii,image:Va,link:Si,hardbreak:qa,emphasis:Ai,strong:_i,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,html_inline:nr,html_block:Q1,emoji:Bi,checkbox:er,math_inline:Jr,checkbox_input:er,reference:wi,footnote_anchor:J1,footnote_reference:tr,text:Xo},n.value)),$=R(()=>v.value.map((S,I)=>{var P;const D=(function(T){var L,B,H,O;if(T.type==="html_block"||T.type==="html_inline"){const F=String((L=T.tag)!=null?L:"").trim().toLowerCase()||cI(T.content);if(F&&!_.value.has(F)&&dI((B=T.content)!=null?B:T.raw,F)){const W=String((O=(H=T.content)!=null?H:T.raw)!=null?O:"");return{child:{type:"text",content:W,raw:W},component:Xo,isCustomComponent:!1}}}return{child:T,component:M.value[T.type],isCustomComponent:!!(n.value[T.type]&&!Yp(String(T.type)))}})(S);return rn(mt({},D),{index:I,key:`${t.indexKey||"paragraph"}-${I}`,customAttrs:D.isCustomComponent?c5(D.child,a.value):void 0,hasSlotChildren:Array.isArray(D.child.children)&&D.child.children.length>0,slotContent:String((P=D.child.content)!=null?P:""),originalChild:S})}));return(S,I)=>(b(),A("p",Gae,[y.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(y.value),9,Yae)):(b(!0),A(Pe,{key:1},pt($.value,P=>{return b(),A(Pe,{key:P.key},[w.value&&g(P.originalChild)?(b(),A(Pe,{key:0},[Ve(N((D=P.originalChild,String((T=D.content)!=null?T:""))),1)],64)):P.isCustomComponent?(b(),me(ys(P.component),Dn({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:ke(()=>[P.hasSlotChildren?(b(),me(p(h),Dn({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?(b(),me(p(h),Dn({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"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(b(),me(ys(P.component),Dn({key:2,ref_for:!0},x(P.child,P.index)),null,16))],64);var D,T}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);ac.install=e=>{e.component(ac.__name,ac)};const Xae={class:"table-node-wrapper"},Jae=["aria-busy"],Qae={key:0},eue=["custom-id"],tue=["aria-label","onPointerdown"],nue=["custom-id"],oue={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},ep=Kn(tt({__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=R(()=>{var _;return(_=t.node.loading)!=null&&_}),o=R(()=>{var _;return(_=t.node.rows)!=null?_:[]}),s=Z(null),i=Z([]);let r=null;const l=R(()=>t.node.header.cells.length),a=R(()=>i.value.some(_=>Number.isFinite(_)&&_>0)),u=R(()=>a.value?i.value.map(_=>_>0?{width:`${_}px`}:void 0):[]);En("markstreamShowTooltips",R(()=>t.showTooltips)),En("markstreamFade",R(()=>t.fade));const c=fs(()=>t.customId),d=R(()=>!!c.value.text),f=R(()=>!!c.value.paragraph),h=new WeakMap;function g(_){const v=t.fade===!1&&!d.value,k=!f.value,y=h.get(_);if(y?.children===_.children&&y.textFastPath===v&&y.paragraphFastPath===k)return y.info;const x=ug(_.children,k,!0),M={simpleChildren:x,plainText:x&&v?vc(x):null};return h.set(_,{children:_.children,textFastPath:v,paragraphFastPath:k,info:M}),M}function m(_){if(!r)return;_.preventDefault();const v=r.startWidth+r.nextStartWidth,k=Math.min(48,Math.floor(v/2)),y=Math.max(k,Math.min(v-k,Math.round(r.startWidth+_.clientX-r.startX))),x=[...r.widths];x[r.index]=y,x[r.index+1]=v-y,i.value=x}function w(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",w),r=null)}return et(l,()=>{w(),i.value=[]}),Un(w),(_,v)=>(b(),A("div",Xae,[C("table",{ref_key:"tableRef",ref:s,class:Re(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(b(),A("colgroup",Qae,[(b(!0),A(Pe,null,pt(e.node.header.cells,(k,y)=>(b(),A("col",{key:y,style:Gt(u.value[y])},null,4))),128))])):te("",!0),C("thead",null,[C("tr",null,[(b(!0),A(Pe,null,pt(e.node.header.cells,(k,y)=>(b(),A("th",{key:y,dir:"auto",class:Re([k.align==="right"?"text-right":k.align==="center"?"text-center":"text-left"])},[g(k).plainText!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(g(k).plainText),9,eue)):g(k).simpleChildren?(b(),me(p(Lp),{key:1,nodes:g(k).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${y}`},null,8,["nodes","custom-id","index-key"])):(b(),me(p(Ui),{key:2,nodes:k.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]=x=>_.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),y(function(M,$){if($.button!==0)return;const S=(function(){var D;const T=(D=s.value)==null?void 0:D.querySelectorAll("thead th");return Array.from(T??[],L=>Math.round(L.getBoundingClientRect().width))})(),I=S[M],P=S[M+1];I&&P&&($.preventDefault(),r={index:M,startX:$.clientX,startWidth:I,nextStartWidth:P,widths:S},i.value=S,window.addEventListener("pointermove",m),window.addEventListener("pointerup",w),window.addEventListener("pointercancel",w))})(y,x)},null,40,tue)):te("",!0)],2))),128))])]),C("tbody",null,[(b(!0),A(Pe,null,pt(o.value,(k,y)=>(b(),A("tr",{key:y},[(b(!0),A(Pe,null,pt(k.cells,(x,M)=>(b(),A("td",{key:M,class:Re([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[g(x).plainText!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(g(x).plainText),9,nue)):g(x).simpleChildren?(b(),me(p(Lp),{key:1,nodes:g(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${y}-${M}`},null,8,["nodes","custom-id","index-key"])):(b(),me(p(Ui),{key:2,nodes:x.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]=$=>_.$emit("copy",$))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Jae),V(as,{name:"table-node-fade"},{default:ke(()=>[n.value?(b(),A("div",oue,[Cn(_.$slots,"loading",{isLoading:n.value},()=>[v[2]||(v[2]=C("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),v[3]||(v[3]=C("span",{class:"sr-only"},"Loading",-1))],!0)])):te("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);ep.install=e=>{e.component(ep.__name,ep)};const sue={class:"hr-node"},nm=Kn({},[["render",function(e,t){return b(),A("hr",sue)}],["__scopeId","data-v-39b2349c"]]);nm.install=e=>{e.component(nm.__name,nm)};const iue={class:"unknown-node"},q3=tt({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(b(),A("div",iue,N(e.node.raw),1))}),om=Kn(tt({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=R(()=>`vmr-container vmr-container-${t.node.name}`),o=fs(()=>t.customId),s=R(()=>mt({text:Xo,paragraph:ac,heading:I2,inline_code:ii,link:Si,image:Va,strong:_i,emphasis:Ai,strikethrough:xi,insert:Wi,subscript:zi,superscript:Hi,checkbox:er,checkbox_input:er,hardbreak:qa,math_inline:Jr,reference:wi,list:Kd,math_block:PL,table:ep},o.value));return(i,r)=>(b(),A("div",Dn({class:n.value},e.node.attrs),[(b(!0),A(Pe,null,pt(e.node.children,(l,a)=>{return b(),me(ys((u=l.type,s.value[u]||q3)),{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"]]);om.install=e=>{e.component(om.__name,om)};const rue=["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"],n_=[[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 lue(e){if(e<=255)return rue[e];let t=0,n=n_.length-1;for(;t<=n;){const o=t+n>>1,s=n_[o];if(es[1]))return s[2];t=o+1}}return"L"}const aue=/[ \t\n\r\f]+/g,uue=/[\t\n\r\f]| {2,}|^ | $/;let Y9=null;const cue=new RegExp("\\p{Script=Arabic}","u"),ou=new RegExp("\\p{M}","u"),m5=new RegExp("\\p{Nd}","u");function o_(e){return cue.test(e)}function s_(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 vl(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(s_(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(s_(n))return!0}}return!1}const due=new Set([" "," ","⁠","\uFEFF"]),fue=new Set(["-","‐","–","—"]);function DL(e,t){return!((function(n){const o=tp(n);return o!==null&&due.has(o)})(e)||t&&((function(n){const o=tp(n);return o!==null&&(g5.has(o)||yc.has(o))})(e)||(function(n){const o=tp(n);return o!==null&&fue.has(o)})(e)))}const g5=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),L2=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),v5=new Set(["'","’"]),yc=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),pue=new Set([":",".","،","؛"]),hue=new Set(["၏"]),mue=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function gue(e){if(y5(e))return!0;let t=!1;for(const n of e)if(yc.has(n)||dg(n))t=!0;else if(!t||!ou.test(n))return!1;return t}function vue(e){for(const t of e)if(!g5.has(t)&&!yc.has(t))return!1;return e.length>0}function yue(e){if(y5(e))return!0;for(const t of e)if(!(L2.has(t)||v5.has(t)||ou.test(t)||dg(t)))return!1;return e.length>0}function y5(e){let t=!1;for(const n of e)if(n!=="\\"&&!ou.test(n)){if(!(L2.has(n)||yc.has(n)||v5.has(n)))return!1;t=!0}return t}function cg(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 tp(e){if(e.length===0)return null;const t=cg(e,e.length);return e.slice(t)}const kue=[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 dg(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,kue)}function bue(e){const t=(function(n){for(const o of n)if(!ou.test(o))return o;return null})(e);return t!==null&&m5.test(t)}function Cue(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(ou.test(o))n--;else{if(!L2.has(o)&&!v5.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function wue(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function i_(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 r_(e,t){return e&&t!==null&&pue.has(t)}function _ue(e){const t=tp(e);return t!==null&&hue.has(t)}function xue(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 K3(e){let t=e.length;for(;t>0;){const n=cg(e,t),o=e.slice(n,t);if(mue.has(o))return!0;if(!yc.has(o))return!1;t=n}return!1}function Sue(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 Aue=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Or(e){return e.length===1?e[0]:e.join("")}function Mue(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),Or(n)}function Tue(e,t,n,o){if(!Aue.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=Sue(c,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:Or(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:Or(r),isWordLike:a,kind:i,start:l}),s}function X9(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Eue=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Iue(e,t){const n=e.texts[t];return!!n.startsWith("www.")||Eue.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!Rue.has(e)&&!Fue.test(e)&&Nue.test(e)}function l_(e){let t=!1;for(const n of e)if(!ou.test(n)){if(!BL(n))return!1;t=!0}return t}function Oue(e,t,n,o){const s=!t&&l_(e),i=!o&&l_(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=cg(c,d),h=c.slice(f,d);if(!ou.test(h))return h;d=f}return null})(a);return u!==null&&dg(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=cg(a,u),d=a.slice(c,u);if(!ou.test(d))return BL(d)||dg(d);u=c}return!1})(e);return!!(s||i||l)&&!vl(e)&&!vl(n)&&(t||s||r)&&(o||i)}function a_(e){for(const t of e)if(m5.test(t))return!0;return!1}function sm(e){if(e.length===0)return!1;for(const t of e)if(!m5.test(t)&&!$ue.has(t))return!1;return!0}function Pue(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,h;const g=(Y9===null&&(Y9=new Intl.Segmenter(void 0,{granularity:"word"})),Y9);let m=0;const w=[],_=[],v=[],k=[],y=[],x=[],M=[],$=[],S=[],I=[],P=[],D=[];for(const O of g.segment(a))for(const F of Tue(O.segment,(d=O.isWordLike)!=null&&d,O.index,c)){let W=function(){x[le]!==null&&(_[le]=[i_(w,x,M,le)],x[le]=null),_[le].push(F.text),v[le]=v[le]||F.isWordLike,$[le]=$[le]||q,S[le]=S[le]||K,I[le]=ne,P[le]=Y,D[le]=r_(S[le],ie)};const z=F.kind==="text",U=wue(F.text,F.isWordLike,F.kind),q=vl(F.text),K=o_(F.text),ie=tp(F.text),ne=K3(F.text),Y=_ue(F.text),le=m-1;u.carryCJKAfterClosingQuote&&z&&m>0&&k[le]==="text"&&q&&$[le]&&I[le]||z&&m>0&&k[le]==="text"&&vue(F.text)&&$[le]||z&&m>0&&k[le]==="text"&&P[le]?W():z&&m>0&&k[le]==="text"&&F.isWordLike&&K&&D[le]?(W(),v[le]=!0):U!==null&&m>0&&k[le]==="text"&&x[le]===U?M[le]=((f=M[le])!=null?f:1)+1:z&&!F.isWordLike&&m>0&&k[le]==="text"&&!$[le]&&(gue(F.text)||F.text==="-"&&v[le])?W():(w[m]=F.text,_[m]=[F.text],v[m]=F.isWordLike,k[m]=F.kind,y[m]=F.start,x[m]=U,M[m]=U===null?0:1,$[m]=q,S[m]=K,I[m]=ne,P[m]=Y,D[m]=r_(K,ie),m++)}for(let O=0;Onull);let L=-1;for(let O=m-1;O>=0;O--){const F=w[O];if(F.length!==0){if(k[O]==="text"&&!v[O]&&L>=0&&k[L]==="text"&&(yue(F)||F==="-"&&bue(w[L]))){const W=(h=T[L])!=null?h:[];W.push(F),T[L]=W,y[L]=y[O],w[O]="";continue}L=O}}for(let O=0;Oq+1){F.push(Or(Y)),W.push(Ee),z.push("text"),U.push(O.starts[q]),q=le;continue}}F.push(K),W.push(ne),z.push(ie),U.push(O.starts[q]),q++}return{len:F.length,texts:F,isWordLike:W,kinds:z,starts:U}})((function(O){const F=[],W=[],z=[],U=[];for(let q=0;q1;for(let Y=0;Y=O.len||X9(O.kinds[ie]))continue;const ne=[],Y=O.starts[ie];let le=ie;for(;le0&&(F.push(Or(ne)),W.push(!0),z.push("text"),U.push(Y),q=le-1)}return{len:F.length,texts:F,isWordLike:W,kinds:z,starts:U}})((function(O){const F=O.texts.slice(),W=O.isWordLike.slice(),z=O.kinds.slice(),U=O.starts.slice();for(let K=0;K=0&&!DL(u.texts[k-1],c)&&v(k),m<0&&(m=k),w=w||vl(y))}return v(u.len),{len:d.length,texts:d,isWordLike:f,kinds:h,starts:g}})(i,r,t.breakKeepAllAfterPunctuation):r;return mt({normalized:i,chunks:Pue(l,s)},l)}let ad=null;const u_=new Map;let ud=null;const Bue=new RegExp("\\p{Emoji_Presentation}","u"),Hue=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let J9=null;const c_=new Map;function Z3(){if(ad!==null)return ad;if(typeof OffscreenCanvas<"u")return ad=new OffscreenCanvas(1,1).getContext("2d"),ad;if(typeof document<"u")return ad=document.createElement("canvas").getContext("2d"),ad;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function xa(e,t){let n=t.get(e);return n===void 0&&(n={width:Z3().measureText(e).width,containsCJK:vl(e)},t.set(e,n)),n}function fg(){if(ud!==null)return ud;if(typeof navigator>"u")return ud={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},ud;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 ud={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},ud}function HL(){return J9===null&&(J9=new Intl.Segmenter(void 0,{granularity:"grapheme"})),J9}function zue(e){return Bue.test(e)||e.includes("️")}function Fu(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=HL();for(const a of l.segment(i))zue(a.segment)&&r++;return r})(o)),s.emojiCount})(e,t)*n}function Wue(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function d_(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function f_(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function k5(e,t){return t===0?0:e+t}function Vue(e,t,n,o,s){return k5(o,t==="tab"?s+(function(i,r){return i.letterSpacing!==0&&i.spacingGraphemeCounts[r]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function p_(e,t,n,o){return k5(o,t==="tab"?0:e.lineEndFitAdvances[n])}function h_(e,t,n,o,s){return k5(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function que(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Kue(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Ch(e,t,n){let o=t;for(;oW){if(Ce!==null&&Q>G){le(ve,Q,ee),ce=Q,ge=Ch(Ce,ge,ce+1),Q=-1,ee=0;continue}le(),de(ve,ce,ue)}else U+=ue,K=ve,ie=ce+1;else de(ve,ce,ue);const Se=ce+1;Ce!==null&&Ce[ge]===Se&&(Q=Se,ee=U,ge++),ce++}q&&K===ve&&ie===fe.length&&(K=ve+1,ie=0)}let oe=0;for(;oe=B.length)));){const ve=B[oe],G=d_(H[oe]);if(q)if(U+ve>W){if(G){he(oe,ve),le(oe+1,0,U-ve),oe++;continue}if(ne>=0){if(K>ne||K===ne&&ie>0){le();continue}le(ne,0,Y);continue}if(ve>W&&O[oe]!==null){le(),pe(oe,0),oe++;continue}le()}else he(oe,ve),G&&(ne=oe+1,Y=U-ve),oe++;else ve>W&&O[oe]!==null?pe(oe,0):Ee(oe,ve),G&&(ne=oe+1,Y=U-ve),oe++}return q&&le(),z})(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=fg(),d=o+c.lineFitEpsilon;let f=0,h=0,g=!1,m=0,w=0,_=-1,v=0,k=null;function y(){_=-1,v=0,k=null}function x(T=m,L=w,B){f++,h=0,g=!1,y()}function M(T,L){g=!0,m=T+1,w=0,h=L}function $(T,L,B){g=!0,m=T,w=L+1,h=B}function S(T,L){g?(h+=L,m=T+1,w=0):M(T,L)}function I(T,L,B,H,O,F){if(!L)return;const W=p_(n,T,B,O);h_(n,T,B,O,H),_=B+1,v=h-F+W,k=T}function P(T,L){var B;const H=r[T],O=(B=l[T])!=null?B:null;let F=O===null?-1:Ch(O,0,L+1),W=-1,z=L;for(;zd){if(O!==null&&W>L){x(T,W),z=W,F=Ch(O,F,z+1),W=-1;continue}x(),$(T,z,U)}else h=ie,m=T,w=z+1}else $(T,z,U);const q=z+1;O!==null&&O[F]===q&&(W=q,F++),z++}g&&m===T&&w===H.length&&(m=T+1,w=0)}function D(T){f++,y()}for(let T=0;T=L.endSegmentIndex)));){const H=i[B],O=d_(H),F=jue(n,g,B),W=H==="tab"?Uue(h+F,n.tabStopAdvance):s[B],z=F+W,U=Vue(n,H,B,F,W);if(H!=="soft-hyphen")if(g){if(h+U>d){const q=h+p_(n,H,B,F);if(h_(n,H,B,F,W),k==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&v<=d){x(_,0);continue}if(O&&q<=d){S(B,z),x(B+1,0),B++;continue}if(_>=0&&v<=d){if(m>_||m===_&&w>0){x();continue}const K=_;x(K,0),B=K;continue}if(U>d&&r[B]!==null){x(),P(B,0),B++;continue}x();continue}S(B,z),I(H,O,B,W,F,z),B++}else U>d&&r[B]!==null?P(B,0):M(B,W),I(H,O,B,W,F,z),B++;else g&&(m=B+1,w=0,_=B+1,v=h+a,k=H),B++}g&&(L.consumedEndSegmentIndex,x(L.consumedEndSegmentIndex,0))}return f})(e,t)}let Q9=null;function b5(){return Q9===null&&(Q9=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Q9}function Gue(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,h){o=[d],s=f,i=h,r=K3(d),l=L2.has(d)}function c(d,f){o.push(d),i=i||f;const h=K3(d);r=d.length===1&&yc.has(d)&&r||h,l=!1}for(const d of b5().segment(e)){const f=d.segment,h=vl(f);o.length!==0?l||g5.has(f)||yc.has(f)||t.carryCJKAfterClosingQuote&&h&&r?c(f,h):i||h?(a(),u(f,d.index,h)):c(f,h):u(f,d.index,h)}return a(),n}function Yue(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&&!DL(t[l-1].text,n)&&r(l),s<0&&(s=l),i=i||vl(a.text)}return r(t.length),o}function m_(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=b5();for(const s of o.segment(e))n++;return n}function Xue(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Jue(e,t,n,o,s){const i=fg(),{cache:r,emojiCorrection:l}=(function(D,T){Z3().font=D;const L=(function(O){let F=u_.get(O);return F||(F=new Map,u_.set(O,F)),F})(D),B=(function(O){const F=O.match(/(\d+(?:\.\d+)?)\s*px/);return F?parseFloat(F[1]):16})(D),H=T?(function(O,F){let W=c_.get(O);if(W!==void 0)return W;const z=Z3();z.font=O;const U=z.measureText("😀").width;if(W=0,U>F+.5&&typeof document<"u"&&document.body!==null){const q=document.createElement("span");q.style.font=O,q.style.display="inline-block",q.style.visibility="hidden",q.style.position="absolute",q.textContent="😀",document.body.appendChild(q);const K=q.getBoundingClientRect().width;document.body.removeChild(q),U-K>.5&&(W=U-K)}return c_.set(O,W),W})(D,B):0;return{cache:L,fontSize:B,emojiCorrection:H}})(t,(a=e.normalized,Hue.test(a)));var a;const u=Fu("-",xa("-",r),l)+(s===0?0:2*s),c=8*Fu(" ",xa(" ",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=[],h=[],g=[],m=[];let w=e.chunks.length<=1&&!d;const _=null,v=[],k=[],y=[],x=null,M=Array.from({length:e.len});function $(D,T,L,B,H,O,F,W,z){H!=="text"&&H!=="space"&&H!=="zero-width-break"&&(w=!1),f.push(T),h.push(L),g.push(B),m.push(H),v.push(F),k.push(W),d&&y.push(z)}function S(D,T,L,B,H){const O=xa(D,r),F=d?m_(D,T):0,W=(function(K,ie,ne){return ie>1?K+(ie-1)*ne:K})(Fu(D,O,l),F,s),z=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:W,U=z===0?0:z+(F>0?s:0),q=T==="space"||T==="zero-width-break"?0:W;if(H&&B&&D.length>1){let K="sum-graphemes";s!==0?K="segment-prefixes":sm(D)?K="pair-context":i.preferPrefixWidthsForBreakableRuns&&(K="segment-prefixes");const ie=(function(Y,le,Ee,de,he){if(le.breakableFitAdvances!==void 0&&le.breakableFitMode===he)return le.breakableFitAdvances;le.breakableFitMode=he;const pe=HL(),oe=[];for(const fe of pe.segment(Y))oe.push(fe.segment);if(oe.length<=1)return le.breakableFitAdvances=null,le.breakableFitAdvances;if(he==="sum-graphemes"){const fe=[];for(const Ce of oe){const ge=xa(Ce,Ee);fe.push(Fu(Ce,ge,de))}return le.breakableFitAdvances=fe,le.breakableFitAdvances}if(he==="pair-context"||oe.length>96){const fe=[];let Ce=null,ge=0;for(const Q of oe){const ee=Fu(Q,xa(Q,Ee),de);if(Ce===null)fe.push(ee);else{const ce=Ce+Q,ue=xa(ce,Ee);fe.push(Fu(ce,ue,de)-ge)}Ce=Q,ge=ee}return le.breakableFitAdvances=fe,le.breakableFitAdvances}const ve=[];let G="",X=0;for(const fe of oe){G+=fe;const Ce=Fu(G,xa(G,Ee),de);ve.push(Ce-X),X=Ce}return le.breakableFitAdvances=ve,le.breakableFitAdvances})(D,O,r,l,K),ne=ie===null||o==="keep-all"?null:(function(Y){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(Y))return null;const le=[];let Ee=0;for(const de of b5().segment(Y))Ee++,Xue(de.segment)&&le.push(Ee);return le.length===0?null:le})(D);return void $(D,W,U,q,T,L,ie,ne,F)}$(D,W,U,q,T,L,null,null,F)}for(let D=0;D=55296&&Y<=56319&&ne+1=56320&&he<=57343&&(le=he-56320+(Y-55296<<10)+65536,Ee=2)}const de=lue(le);de!=="R"&&de!=="AL"&&de!=="AN"||(W=!0);for(let he=0;he=0&&F[Y]==="ET";Y--)F[Y]="EN";for(Y=ne+1;Y0?F[ne-1]:K)!=="L"?"R":"L";if(le===((Y{const e=globalThis;if(e[e4])return e[e4];const t={configs:{},controllers:{},revision:Xr(0),preparedCache:new Map,blockEstimateCache:new Map};return e[e4]=t,t})();let r1=null;const t4=gs.revision;function g_(e){var t;return e&&(t=gs.configs[e])!=null?t:null}function v_(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function ece(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function n4(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!ece(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 o4(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(r1!=null)return r1;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return r1=!!((i=r.getContext)!=null&&i.call(r,"2d")),r1}catch{return r1=!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=gs.blockEstimateCache.get(r);if(l)return gs.blockEstimateCache.delete(r),gs.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(h,g,m){const w=`${m}\0${g}\0${h}`,_=gs.preparedCache.get(w);if(_)return gs.preparedCache.delete(w),gs.preparedCache.set(w,_),_.prepared;const v=(function(k,y,x){return(function(M,$,S,I){var P,D;const T=(P=I?.wordBreak)!=null?P:"normal",L=(D=I?.letterSpacing)!=null?D:0;return Jue(Due(M,fg(),I?.whiteSpace,T),$,!1,T,L)})(k,y,0,x)})(h,g,{whiteSpace:m});for(gs.preparedCache.set(w,{prepared:v});gs.preparedCache.size>240;){const k=gs.preparedCache.keys().next().value;if(!k)break;gs.preparedCache.delete(k)}return v})(e,n.font,a),c=(function(h,g,m){const w=Zue(h,g);return{lineCount:w,height:w*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(gs.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});gs.blockEstimateCache.size>4e3;){const h=gs.blockEstimateCache.keys().next().value;if(!h)break;gs.blockEstimateCache.delete(h)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function zL(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=n4(e.children);return i&&n.paragraph?o4(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),r=n4(e.children),l=n.headings[i];return r&&l?o4(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=n4((s=i[0])==null?void 0:s.children);return r?o4(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=zL(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 l1(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function Ru(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function s4(e,t,n=0){return e.diff?h5(t??{},n)?(function(o){const s=Ru(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(r=>!Que.some(l=>r.startsWith(l))).length):Math.max(1,i.length)}return l1(Ru(o.originalCode))+l1(Ru(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(l1(Ru(s)),l1(Ru(i)));const r=Ru(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):l1(Ru(e.code,e.loading===!0))}function tce(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function i4(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=v_(o.lineHeight,1.5*v_(o.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:tce(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const nce=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function y_(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))nce.has(r)||s.has(r)||l.enumerable&&"value"in l&&(o[r]=l.value);return o}function k_(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,h){return Number.isFinite(f)?Math.min(Math.max(0,f),h):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 h=o.getNormalizedScrollTop(e,t,!1),g=Math.abs(h-r);gd&&(e.scrollTop=u)}function b_(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 C_(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const WL=Symbol("MarkstreamMathBlockMinHeightCache");function dVe(){return on(WL,null)}const oce=new Set(["text","inline_code","emoji","footnote_reference"]),sce=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function a1(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function Ou(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 UL(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(oce.has(o))return!0;if(!sce.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(UL)}function G3(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 h=u[f];if(Array.isArray(h)){const g=h.map(G3).filter(Boolean).join(" ");g&&d.push(g)}}return d.join(" ").replace(/\s+/g," ").trim()}function jL(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(jL)})}function ice(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 rce(e,t){var n,o,s,i,r,l,a,u,c,d,f,h,g,m;if(!e||typeof e!="object")return 32;const w=e,_=String((n=w.type)!=null?n:""),v=Number.isFinite(t)&&t>0?t:640;switch(_){case"heading":return(function(k){var y;const x=Number((y=k.level)!=null?y:k.depth);return x>=4?20:x===3?30:x===2?32:44})(w);case"paragraph":return(function(k,y){const x=String(k??"");if(!x)return 28;const M=Math.max(18,Math.floor(Math.max(320,y)/8)),$=x.split(/\r?\n/).length,S=Math.ceil(x.length/M);return Math.max(1,$,S)<=1?28:Ou(x,y,34)})(String((s=(o=w.raw)!=null?o:w.content)!=null?s:""),v);case"list":return(function(k,y){var x;const M=Array.isArray(k.items)?k.items:[];if(!M.length)return 48;const $=Math.max(48,30*M.length+12);let S=12;for(const D of M)S+=ice(G3(D)||String((x=D.raw)!=null?x:""),y);const I=Math.max(0,S-$);if(M.length>20){const D=Math.round(2.4*M.length);return Math.round($+Math.max(D,Math.min(I,3*M.length)))}if(I<=0)return $;const P=M.length>8?8*M.length:I;return Math.round($+Math.min(I,P))})(w,v);case"list_item":return Ou(String((r=(i=w.raw)!=null?i:w.content)!=null?r:""),v,34);case"blockquote":return Ou(String((a=(l=w.raw)!=null?l:w.content)!=null?a:""),v,56);case"table":return(function(k,y){const x=[...k.header?[k.header]:[],...Array.isArray(k.rows)?k.rows:[]];if(!x.length){const M=Array.isArray(k.children)?k.children.length:3;return Math.max(120,38*M+48)}return Math.max(120,Math.round(4+x.reduce((M,$)=>M+(function(S,I){const P=Math.max(1,S.length),D=Math.max(80,(I-32)/P),T=Math.max(10,Math.floor(D/8)),L=Math.max(1,...S.map(B=>{var H;const O=G3(B)||String((H=B?.raw)!=null?H:"");return Math.ceil(O.length/T)||1}));return 54+34*Math.max(0,L-1)+(P<=3&&S.some(jL)?14:0)})((function(S){var I;return Array.isArray(S?.cells)&&(I=S.cells)!=null?I:[]})($),y),0)))})(w,v);case"code_block":{const k=String((u=w.language)!=null?u:"").trim().toLowerCase(),y=String((d=(c=w.code)!=null?c:w.raw)!=null?d:"");return k==="mermaid"?sg(ng(y)):k==="infographic"?ig(og(y)):Ou(y,v,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(k,y){var x,M,$;const S=k.match(/^\s*]*)>/i);return S&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=S[1])!=null?x:"")?Ou((($=(M=k.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:M[1])==null?void 0:$.replace(/<[^>]*>/g,"").trim())||"Details",y,28,28):Ou(k,y,96)})(String((h=(f=w.raw)!=null?f:w.content)!=null?h:""),v);case"thematic_break":return 24;default:return Ou(String((m=(g=w.raw)!=null?g:w.content)!=null?m:""),v,40)}}function w_(e,t,n){return Math.min(Math.max(e,t),n)}const lce=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],ace=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],uce=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),VL=["raw","content","code","originalCode","updatedCode"],__=new WeakMap,x_=new WeakMap;let cce=1;function Rr(){return typeof performance<"u"?performance.now():Date.now()}function S_(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Xi(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=__.get(t);return n||(n=cce++,__.set(t,n)),String(n)}function A_(e,t,n,o={}){var s,i;const r=o.includeFinal!==!1,l={md:Xi(t),customMarkdownIt:Xi(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:Xi(e.validateLink),preTransformTokens:Xi(e.preTransformTokens),postTransformTokens:Xi(e.postTransformTokens),postTransformNodes:Xi(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function M_(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 T_(e){const t=qL(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function qL(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function KL(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function C5(e){const t=String(e??"");return`${t.length}:${KL(t)}`}function Y3(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?C5(r):`${r.length}:${KL(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Xi(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:${Xi(o)}`;const i=Xi(o);if(t.set(o,i),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>Y3(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}:${Y3(r[u],t,n+1)}`).join(";")}`}return typeof e}function pg(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function ZL(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>pg(o)?su(o,t,n+1):ZL(o,t,n+1)).join(",")}`:pg(e)?su(e,t,n):Y3(e,t,n)}function dce(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!VL.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${C5(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${Xi(s)}`:uce.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${ZL(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${Xi(s)}`:""}).filter(Boolean).join(";")}function fce(e){return VL.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${C5(n)}`:""}).filter(Boolean).join(";")}function su(e,t=new WeakMap,n=0){const o=x_.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}:${Xi(s)}`;const r=Xi(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],h=f.length?f.slice(0,200).map(g=>su(g,u,c+1)).join("|"):"";return[a.type,fce(d),dce(d,u,c),f.length,h].join(":")})(e,t,n);return x_.set(s,l),l}function GL(e,t){return su(e)===su(t)}function w5(e,t,n){const o=Rr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Rr()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function E_(e,t,n){return w5(t,n,()=>su(e))}function YL(e,t,n){return E_(e,n,"stabilizeSignatureMs")===E_(t,n,"stabilizeSignatureMs")}function wh(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function I_(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function L_(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function pce(e,t){return e.length===t.length&&e===t}function _5(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=_5(e,t)}),o??YL(e,t,n)}function gce(e,t){const n={};for(const o of lce){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function vce(e,t){var n;const o=Tw(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:R(()=>!1),r=Z(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let B="",H=0,O=!1,F=!1,W=!1,z=!1;function U(){B="",H=0,O=!1,F=!1,W=!1,z=!1}function q(K){let ie=!1;for(let ne=0;ne{if(!K||!ie.startsWith(K)||ie.length<=K.length)return U(),[!0,0];let ne=0;B!==K&&(U(),q(K),ne=K.length);const Y=ie.slice(K.length),le=q(Y);return B=ie,[le,ne+Y.length]}})();let h,g=0,m=0,w=Rr(),_=-1,v=0;function k(B){_=Number.isInteger(B)?B:0,v+=1}function y(){h&&(clearTimeout(h),h=void 0)}function x(){y();const B=t.renderContent.value;r.value!==B&&(r.value=B),w=Rr()}et([t.renderContent,t.effectiveFinal,i],([B,H,O])=>{r.value!==B&&(!O||H||(function(F,W){if(!F&&W||W.length<=80||W.length\s*|`{3,}|~{3,})/.test(z))||z.endsWith(` -`)&&!(function(U){const q=M_(U);if(T_(q))return!1;const K=qL(q);return K.length>=2&&K.some(ie=>ie.trim())})(W))})(r.value,B)?x():(function(){if(m+=1,h)return;const F=Math.max(0,(function(W){const z=W.parseCoalesceMs;return typeof z=="number"&&Number.isFinite(z)&&z>=0?z:80})(e)-(Rr()-w));F<=0?x():h=setTimeout(x,F)})())},{flush:"sync",immediate:!0}),pf(y);const M=R(()=>{var B,H,O,F;return Tte(e.customHtmlTags,(B=e.parseOptions)==null?void 0:B.customHtmlTags,(F=(O=(H=t.customComponentsMap)==null?void 0:H.value)!=null?O:{},Object.entries(F).map(([W,z])=>{const U=xr(W);return z==null||!U||Yp(U)||sI.has(U)||Vp.has(U)?"":U}).filter(Boolean)))}),$=R(()=>{const{key:B,tags:H}=Ete(M.value);if(!B)return o;const O=s.get(B);if(O)return O;const F=Tw(t.instanceMsgId,{customHtmlTags:H});return s.set(B,F),F}),S=R(()=>{const B=$.value;if(!e.customMarkdownIt)return B;const H=e.customMarkdownIt(B);return B.__markstreamHasCustomParserExtensions=!0,H.__markstreamHasCustomParserExtensions=!0,H}),I=R(()=>{var B,H;const O=(B=e.parseOptions)!=null?B:{},F=t.effectiveFinal.value,W=M.value,z=F!=null,U=W.length>0;return z||U||O.streamParse==null?mt(mt(rn(mt({},O),{streamParse:(H=O.streamParse)==null||H}),z?{final:F}:{}),U?{customHtmlTags:W}:{}):O}),P=R(()=>{var B;return new Set(((B=I.value.customHtmlTags)!=null?B:[]).map(H=>String(H).trim().toLowerCase()).filter(Boolean))}),D=R(()=>A_(I.value,S.value,e.customMarkdownIt,{includeFinal:!0})),T=R(()=>A_(I.value,S.value,e.customMarkdownIt,{includeFinal:!1}));et([D,T],([B,H],[O,F])=>{O&&(B===O&&H===F||(x(),H!==F&&(l=[],c="")))},{flush:"sync"});const L=R(()=>{var B,H,O,F,W,z,U,q,K,ie,ne;if((B=e.nodes)!=null&&B.length)return l=[],c="",k(0),kt(e.nodes.slice());const Y=r.value;if(!Y)return l=[],c="",k(-1),[];const le=t.debugPerformanceEnabled.value,Ee=le?Rr():0,de=S.value,he=D.value,pe=T.value;a&&he!==a&&(function(Fe){var Oe,Ye;(Ye=(Oe=Fe.stream)==null?void 0:Oe.reset)==null||Ye.call(Oe)})(de),u&&pe!==u&&(l=[],c="");const oe=Object.keys((O=(H=t.customComponentsMap)==null?void 0:H.value)!=null?O:{}).length>0||typeof I.value.postTransformNodes=="function";oe!==d&&(l=[],c="");const ve=!oe&&l.length>0&&Y.startsWith(c)&&pe===u,G=le?S_(de):null,X=le?{}:void 0,fe=L_(de),Ce=!fe&&!oe,ge=mt(mt(rn(mt({},I.value),{__reuseStableTopLevelNodes:Ce}),fe?{__disableStreamParse:!0}:{}),X?{__timing:X}:{}),Q=iL(Y,de,ge),ee=le?Rr():0,ce=le?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let ue,Se=le?wh(Q.length):void 0,Ue=0,_e=0,Te=0;if(ve){const Fe=le?Rr():0,[Oe,Ye]=(function($t){var Ht,Yt;const[_n,je]=$t.scanGlobalReferenceAppend($t.previousContent,$t.content),Ke=$t.parseOptions;return[$t.previousDirtyStartIndex>0&&Ke.final!==!0&&!$t.customMarkdownIt&&!L_($t.md)&&!_n&&typeof Ke.preTransformTokens!="function"&&typeof Ke.postTransformTokens!="function"&&typeof Ke.postTransformNodes!="function"&&((Yt=(Ht=Ke.customHtmlTags)==null?void 0:Ht.length)!=null?Yt:0)===0?$t.previousDirtyStartIndex:0,je]})({content:Y,previousContent:c,previousDirtyStartIndex:_,parseOptions:I.value,customMarkdownIt:e.customMarkdownIt,md:de,scanGlobalReferenceAppend:f});Te=Ye;const ft=Oe<=0;if(ce){const $t=(function(Ht,Yt,_n,je={}){var Ke;if(!Yt.length)return{nodes:Ht,metrics:wh(Ht.length)};const Ze=(Ke=je.scanStartIndex)!=null?Ke:0,zt=je.reuseDirtyTail!==!1,at=(function(fn,Sn,to,An=0){const ao=Math.min(fn.length,Sn.length);for(let Kt=Math.min(ao,Math.max(0,An));Ktsu(Fe[ft]))})(ue,ce,_e):(function(Fe,Oe=0){for(let Ye=Math.max(0,Oe);Ye((W=G?.total)!=null?W:0);t.logPerf(Oe?"parse(stream)":"parse(sync)",mt(mt(mt({rendererId:t.instanceMsgId,ms:Math.round(Rr()-Ee),nodes:ue.length,contentLength:Y.length,parseCommitCount:g,parseCoalescedCount:m,nodeReuseMs:st,referenceDefinitionScanChars:Te,signatureMs:(z=ce?.signatureMs)!=null?z:0,stabilizeSignatureMs:(U=ce?.stabilizeSignatureMs)!=null?U:0,primeSignatureMs:(q=ce?.primeSignatureMs)!=null?q:0,signatureCallCount:(K=ce?.signatureCallCount)!=null?K:0,stabilizeSignatureCallCount:(ie=ce?.stabilizeSignatureCallCount)!=null?ie:0,primeSignatureCallCount:(ne=ce?.primeSignatureCallCount)!=null?ne:0,stabilizeMs:Ue},Se??{}),X?Object.fromEntries(ace.map(Ye=>{var ft;return[Ye,(ft=X[Ye])!=null?ft:0]})):{}),Fe?{streamMode:Fe.lastMode,streamDelta:gce(Fe,G),streamStats:Fe}:{}))}return kt(ue)});return{effectiveCustomHtmlTags:M,effectiveCustomHtmlTagsSet:P,mdBase:$,mdInstance:S,mergedParseOptions:I,getParsedNodesDirtyStartIndex:()=>_,getParsedNodesRevision:()=>v,parsedNodes:L}}function yce(e){const{isClient:t}=e,n=Z(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,h){if((m=(g=e.shouldTrackVisibleNodeIndices)==null?void 0:g.call(e))!=null&&!m)return;var g,m;const w=n.value,_=w.has(f);if(h){if(_)return;const k=new Set(w);return k.add(f),void(n.value=k)}if(!_)return;const v=new Set(w);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,h]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=R(()=>Math.max(0,t.value.length-n.value.length)),a=R(()=>l.value===0),u=R(()=>o.value&&a.value);return Zg()&&pf(()=>{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 bce={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},$_=/auto|scroll|overlay/i;function Cce(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return $_.test(t)||$_.test(n)}function wce(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 _ce={class:"m-0 p-0"},xce=["data-probe"],Sce=Kn(tt(rn(mt({},{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)=>(b(),A("div",{class:"height-estimation-probes",style:Gt({width:`${e.width}px`}),"aria-hidden":"true"},[C("div",{ref:i=>e.setParagraphWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[V(p(ac),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),C("div",{ref:i=>e.setListItemWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[C("ul",_ce,[V(p(qd),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),C("div",{ref:i=>e.setListWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[V(p(Kd),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(b(),A(Pe,null,pt(6,i=>C("div",{key:`probe-heading-${i}`,ref_for:!0,ref:r=>e.setHeadingWrapper(i,r),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[V(p(I2),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,xce)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),N_=tt({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=R(()=>{var n,o;return ig((o=Td(e.estimatedPreviewHeightPx))!=null?o:og(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return nn("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?nn("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)"}},[nn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[nn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),nn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),nn("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},()=>nn("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,nn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[nn("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:"")),nn("div",{class:"absolute inset-0"},[nn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),F_=tt({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=R(()=>{var n,o;return sg((o=Td(e.estimatedPreviewHeightPx))!=null?o:ng(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return nn("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?nn("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)"}},[nn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[nn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),nn("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},()=>nn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[nn("span",{class:"action-icon block"})])))]):null,nn("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)"}},[nn("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:"")),nn("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"}})])])}}}),Ace={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 xs(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 Mce=["data-custom-id"],Tce=["data-node-index","data-node-type"],R_="typewriter-simple-cursor-target",XL=Kn(tt(rn(mt({},{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=ds(),l=on("markstreamNestedRendererProps",void 0);function a(E){const j=r?.vnode.props;return!!j&&(Object.prototype.hasOwnProperty.call(j,E)||Object.prototype.hasOwnProperty.call(j,String(E).replace(/[A-Z]/g,re=>`-${re.toLowerCase()}`)))}function u(E){var j,re;const ae=o[E];return a(E)?ae:(re=(j=l?.value)==null?void 0:j[E])!=null?re:ae}const c=R(()=>{return(E=u("mode"))==="chat"||E==="minimal"||E==="docs"?E:"docs";var E}),d=R(()=>C_(u("typewriter"))),f=R(()=>d.value!=="off"),h=R(()=>u("domMode")==="minimal"?"minimal":"full"),g=R(()=>{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=R(()=>Ace[c.value]),w=R(()=>{var E;return(E=u("showTooltips"))!=null?E:m.value.showTooltips}),_=R(()=>{var E;return(E=u("fade"))!=null?E:m.value.fade}),v=R(()=>{var E;return(E=u("batchRendering"))!=null?E:m.value.batchRendering}),k=R(()=>{var E;return(E=u("initialRenderBatchSize"))!=null?E:m.value.initialRenderBatchSize}),y=R(()=>{var E;return(E=u("renderBatchSize"))!=null?E:m.value.renderBatchSize}),x=R(()=>{var E;return(E=u("renderBatchDelay"))!=null?E:m.value.renderBatchDelay}),M=R(()=>{var E;return(E=u("renderBatchBudgetMs"))!=null?E:m.value.renderBatchBudgetMs}),$=R(()=>{var E;return(E=u("renderBatchIdleTimeoutMs"))!=null?E:m.value.renderBatchIdleTimeoutMs}),S=R(()=>{var E;return(E=u("deferNodesUntilVisible"))!=null?E:m.value.deferNodesUntilVisible}),I=R(()=>{var E;return(E=u("maxLiveNodes"))!=null?E:m.value.maxLiveNodes}),P=R(()=>{var E;return(E=u("liveNodeBuffer"))!=null?E:m.value.liveNodeBuffer}),D=R(()=>{var E;return(E=u("nodeVirtual"))!=null?E:m.value.nodeVirtual}),T={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 h.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 w.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 _.value},get batchRendering(){return v.value},get initialRenderBatchSize(){return k.value},get renderBatchSize(){return y.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return M.value},get renderBatchIdleTimeoutMs(){return $.value},get deferNodesUntilVisible(){return S.value},get maxLiveNodes(){return I.value},get liveNodeBuffer(){return P.value},get nodeVirtual(){return D.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function L(E){s("height-change",E)}function B(E){s("virtual-state-change",E)}function H(E){s("anchor-change",E)}const O=Z(),F=Z(null),W=Z(null),z=Z(null),U=Jo({1:null,2:null,3:null,4:null,5:null,6:null}),q=Z(!1),K=new Map,ie=Z(0),ne=Z(0),Y=Z({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function le(E,j){return typeof E!="string"?j:E.trim()||j}function Ee(E){const j=Number(E);return Number.isFinite(j)&&j>0?Math.max(1,Math.trunc(j)):640}const de=R(()=>{var E;const j=(E=T.viewportPriorityOptions)!=null?E:{},re=le(j.rootMargin,gc);return{rootMargin:re,heavyBlockMargin:le(j.heavyBlockMargin,re),maxTargets:Ee(j.maxTargets)}}),he=R(()=>{var E;return(E=de.value.rootMargin)!=null?E:gc}),pe=R(()=>{var E;return(E=de.value.maxTargets)!=null?E:640});function oe(){var E,j;if(((E=o.virtualScroll)==null?void 0:E.enabled)!==!0)return null;const re=(j=o.virtualScroll)==null?void 0:j.scrollRoot;return ve(typeof re=="function"?re():re)}function ve(E){return E?typeof HTMLElement<"u"&&E instanceof HTMLElement?E:typeof E=="object"&&"value"in E?ve(E.value):typeof E=="object"&&"$el"in E?ve(E.$el):null:null}En(FL,de);const{isClient:G,renderAsFragment:X,debugPerformanceEnabled:fe,resolvedShowTooltips:Ce,resolvedHtmlPolicy:ge,inheritedSmoothStreaming:Q,ownsTypewriterCursor:ee}=(function(E){const j=typeof window<"u",re=mf(),ae=on("markstreamHtmlPolicy",void 0),be=on("markstreamTypewriterCursor",void 0),Ne=on("markstreamSmoothStreaming",void 0),De=R(()=>E.renderAsFragment===!0),ze=R(()=>!!(E.debugPerformance&&j&&typeof console<"u")),ot=R(()=>{var nt;if(typeof E.showTooltips=="boolean")return E.showTooltips;const Be=(nt=re.showTooltips)!=null?nt:re["show-tooltips"];return Be===""||Be===!0||Be==="true"||Be!==!1&&Be!=="false"&&void 0}),We=R(()=>{var nt,Be;return(Be=(nt=E.htmlPolicy)!=null?nt:ae?.value)!=null?Be:"safe"}),Xe=R(()=>be?.value!==!0);return{isClient:j,renderAsFragment:De,debugPerformanceEnabled:ze,resolvedShowTooltips:ot,resolvedHtmlPolicy:We,inheritedSmoothStreaming:Ne,inheritedTypewriterCursor:be,ownsTypewriterCursor:Xe}})(T),{resolveViewportRoot:ce,resolveScrollContainer:ue,isReverseFlexScrollRoot:Se,getNormalizedScrollTop:Ue,getOffsetTopWithinRoot:_e}=(function(E,j){function re(){var ze,ot;return(ot=(ze=j.scrollRoot)==null?void 0:ze.call(j))!=null?ot:null}function ae(ze){if(typeof window>"u")return null;const ot=re();if(ot)return ot;const We=ze??E.value;if(!We)return null;const Xe=We.ownerDocument||document,nt=Xe.scrollingElement||Xe.documentElement;let Be=We;for(;Be&&Be!==Xe.body&&Be!==nt;){if(Cce(window.getComputedStyle(Be))&&wce(Be))return Be;Be=Be.parentElement}return null}function be(ze){if(!j.isClient)return!1;try{const ot=window.getComputedStyle(ze);return!!(ot.display||"").toLowerCase().includes("flex")&&(ot.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Ne(ze,ot,We){var Xe,nt;if(We)return De(ot);const Be=ze.scrollTop;if(!be(ze))return Be;const Je=Be<0?-Be:Be;return Math.max(0,((Xe=ze.scrollHeight)!=null?Xe:0)-((nt=ze.clientHeight)!=null?nt:0))-Je}function De(ze){var ot,We,Xe,nt,Be;const Je=Number((ot=ze.scrollingElement)==null?void 0:ot.scrollTop),lt=Number((Xe=(We=ze.documentElement)==null?void 0:We.scrollTop)!=null?Xe:0),rt=Number((Be=(nt=ze.body)==null?void 0:nt.scrollTop)!=null?Be:0);return Math.max(0,Number.isFinite(Je)?Je:0,Number.isFinite(lt)?lt:0,Number.isFinite(rt)?rt:0)}return{resolveViewportRoot:ae,resolveScrollContainer:function(ze){var ot,We,Xe,nt;const Be=re();if(Be)return Be;const Je=ae((ot=ze??E.value)!=null?ot:null);if(Je)return Je;const lt=(nt=(Xe=ze?.ownerDocument)!=null?Xe:(We=E.value)==null?void 0:We.ownerDocument)!=null?nt:typeof document<"u"?document:null;return lt?.scrollingElement||lt?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:Ne,getOffsetTopWithinRoot:function(ze,ot){const We=ot.ownerDocument||ze.ownerDocument||document;if((function(Je,lt){return Je===lt.documentElement||Je===lt.body||Je===lt.scrollingElement})(ot,We))return ze.getBoundingClientRect().top+De(We);const Xe=ot.getBoundingClientRect(),nt=ze.getBoundingClientRect(),Be=Ne(ot,We,!1);return nt.top-Xe.top+Be}}})(O,{isClient:G,scrollRoot:oe});En("markstreamShowTooltips",Ce),En("markstreamHtmlPolicy",ge),En("markstreamTypewriter",f),En("markstreamFade",R(()=>T.fade!==!1)),En("markstreamTypewriterCursor",R(()=>!0)),En("markstreamTextStreamState",K),En("markstreamStreamVersion",ie),En("markstreamParseOptions",R(()=>T.parseOptions)),En("markstreamCustomMarkdownIt",R(()=>T.customMarkdownIt));const{smoothStreamingEnabled:Te,renderContent:st,requestedFinal:Fe,effectiveFinal:Oe}=(function(E,j){const re=kce(mt(mt({},bce),E.smoothStreamingOptions)),ae=R(()=>{var Be,Je,lt;return E.smoothStreaming!==!1&&!((Be=E.nodes)!=null&&Be.length)&&(E.smoothStreaming===!0||!((Je=j.inheritedSmoothStreaming)!=null&&Je.value))&&(E.smoothStreaming===!0||C_(E.typewriter)!=="off"||((lt=E.maxLiveNodes)!=null?lt:0)<=0)}),be=Z(!j.isClient||E.smoothStreaming===!0);dn(()=>{be.value=!0});const Ne=R(()=>be.value&&ae.value),De=R(()=>{var Be;return Ne.value?re.visible.value:(Be=E.content)!=null?Be:""}),ze=R(()=>{var Be,Je;const lt=(Be=E.parseOptions)!=null?Be:{};return(Je=E.final)!=null?Je:lt.final}),ot=R(()=>{const Be=ze.value;return Ne.value&&Be!=null?!!Be&&re.caughtUp.value:Be});let We=0,Xe=!1;function nt(){We=0,Xe=!1}return et([()=>E.content,()=>E.nodes,Ne,ze],([Be,Je,lt,rt])=>{if(Je?.length)return nt(),void re.reset("");const wt=Be??"";if(!lt)return nt(),re.reset(wt),void(rt&&re.finish({flush:!0}));const dt=re.source.value;if(wt){if(wt!==dt)if(wt.startsWith(dt)){const Nt=wt.slice(dt.length),Dt=re.pendingChars.value;Nt.length<=8?(We++,Xe||We>=2&&Dt<=8?(Xe=!0,re.reset(wt)):re.enqueue(Nt)):(nt(),re.enqueue(Nt))}else nt(),re.reset(wt)}else nt(),re.reset("");rt&&re.finish()},{immediate:!0}),{smoothStream:re,smoothStreamingEligible:ae,smoothStreamingEnabled:Ne,renderContent:De,requestedFinal:ze,effectiveFinal:ot}})(T,{isClient:G,inheritedSmoothStreaming:Q}),Ye=Fe.value===!0;En("markstreamSmoothStreaming",Te);const ft=Z(!1),$t=Z(!1),Ht=Z(!1);let Yt="",_n=!1,je=null;function Ke(){G&&je!=null&&(window.clearTimeout(je),je=null)}function Ze(){ft.value=!1,Ke()}function zt(E,j){if(!fe.value)return;const re=(function(){if(!fe.value)return null;const ae=Sn(at),be=Sn(tn),Ne=Math.max(fn,be);if(ae<=0&&Ne<=0)return null;const De={total:ae,maxPerFrame:Ne,byLabel:(ze=at,Object.fromEntries(Array.from(ze.entries()).sort((ot,We)=>We[1]-ot[1]||ot[0].localeCompare(We[0]))))};var ze;return at.clear(),tn.clear(),fn=0,De})();console.info(`[markstream-vue][perf] ${E}`,re?rn(mt({},j),{layoutReads:re}):j)}et([()=>T.indexKey,()=>T.customId],()=>{var E,j;Ze(),$t.value=!1,Ht.value=!((E=o.nodes)!=null&&E.length)&&Fe.value!==!0&&!!o.content,Yt=(j=st.value)!=null?j:"",_n=Yt.length>0},{flush:"sync"}),et([()=>o.content,()=>o.nodes,Fe],([E,j,re])=>{!j?.length&&re!==!0&&E&&(Ht.value=!0)},{flush:"sync",immediate:!0}),et([st,()=>o.nodes,Fe],([E,j,re])=>{const ae=E??"";return j?.length||re===!0?(Ze(),$t.value=!1,Yt=ae,void(_n=!0)):(ae.length>0&&(Ht.value=!0),_n?(Yt&&ae.length>Yt.length&&ae.startsWith(Yt)?(ft.value=!0,$t.value=!0,G&&(Ke(),je=window.setTimeout(()=>{var be;je=null,Oe.value===!0||(be=o.nodes)!=null&&be.length||(Kc(),ft.value=!1,Pl())},1200))):(ae.length"u")return null;const Ne=window;if(Ne.__markstreamLayoutReadPerformance)return Ne.__markstreamLayoutReadPerformance;const De={total:0,maxPerFrame:0,byLabel:{}};return Ne.__markstreamLayoutReadPerformance=De,De})();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(()=>An(be),0):queueMicrotask(()=>An(be)):window.requestAnimationFrame(()=>An(be))))})(E),Wt||(Wt=!0,G&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(to):typeof queueMicrotask!="function"?setTimeout(to,0):queueMicrotask(to)))}function Kt(E,j){return ao(E),j()}const Co=T.customId?`renderer-${T.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Po=(function(E){const j=new Map;return{scope:E,cache:j,clear:()=>j.clear()}})(Co),Mn=Co;En(WL,Po);const bn=fs(()=>T.customId),{effectiveCustomHtmlTagsSet:Do,mergedParseOptions:po,parsedNodes:At,getParsedNodesDirtyStartIndex:qs,getParsedNodesRevision:Bo}=vce(T,{instanceMsgId:Co,renderContent:st,effectiveFinal:Oe,smoothStreamingEnabled:Te,debugPerformanceEnabled:fe,customComponentsMap:bn,logPerf:zt});et(At,()=>{ft.value||Po.clear(),ie.value+=1},{immediate:!0});const To=R(()=>({customId:T.customId,customHtmlTags:po.value.customHtmlTags,parseOptions:T.parseOptions,customMarkdownIt:T.customMarkdownIt,htmlPolicy:ge.value,viewportPriority:T.viewportPriority,viewportPriorityOptions:de.value,mode:c.value,domMode:T.domMode,codeRenderer:g.value,codeBlockStream:T.codeBlockStream,codeBlockDarkTheme:T.codeBlockDarkTheme,codeBlockLightTheme:T.codeBlockLightTheme,codeBlockMonacoOptions:T.codeBlockMonacoOptions,renderCodeBlocksAsPre:T.renderCodeBlocksAsPre,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockProps:T.codeBlockProps,mermaidProps:T.mermaidProps,d2Props:T.d2Props,infographicProps:T.infographicProps,showTooltips:Ce.value,themes:T.themes,langs:T.langs,isDark:T.isDark,typewriter:f.value,smoothStreamingOptions:T.smoothStreamingOptions,parseCoalesceMs:T.parseCoalesceMs,fade:T.fade}));En("markstreamNestedRendererProps",To);const ai=R(()=>At.value),Tn=R(()=>At.value.length),no=Z(null),Ks=Z(null),ps=Z(null),ui=Z(null),$s=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),yo=!$s&&T.customId?g_(T.customId):null,oo=R(()=>yo?(t4.value,g_(T.customId)):null),uo=R(()=>{var E;return!!(!X.value&&T.customId&&!$s&&((E=oo.value)!=null&&E.enabled))}),Xn=R(()=>!!(G&&uo.value)),co=R(()=>{var E;return!!(!X.value&&((E=o.virtualScroll)!=null&&E.enabled))}),Qe=R(()=>co.value),it=Z(!1);dn(()=>{it.value=!0});const Ct=R(()=>!!(G&&co.value));En("markstreamHostScrollManaged",Ct);const en=R(()=>!!(it.value&&Ct.value)),yn=R(()=>Xn.value||Ct.value),Ho=R(()=>Xn.value||en.value),Eo=R(()=>{var E;return yn.value&&((E=oo.value)==null?void 0:E.textEstimation)!==!1});function Io(){const E=ne.value||Kt("getMeasuredContainerWidth.clientWidth",()=>{var j;return((j=O.value)==null?void 0:j.clientWidth)||0});return Number.isFinite(E)&&E>0?E:0}const Zs=R(()=>{const E=Io();return E>0?Math.max(1,Math.round(E)):640}),zo=R(()=>{var E,j;return!(Oe.value!==!0||co.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(E=o.nodes)!=null&&E.length||Ht.value||!(((j=T.maxLiveNodes)!=null?j:0)<=0))}),Lo=R(()=>{var E;return zo.value?50:Math.max(1,(E=T.maxLiveNodes)!=null?E:320)}),Wo=R(()=>{var E;return zo.value?16:Math.max(0,(E=T.liveNodeBuffer)!=null?E:60)}),sn=R(()=>{var E;return!X.value&&T.nodeVirtual!==!1&&!(((E=T.maxLiveNodes)!=null?E:0)<=0&&!zo.value)&&(T.nodeVirtual===!0?At.value.length>0:At.value.length>Lo.value)}),ws=R(()=>sn.value||Xn.value||Ct.value),Uo=R(()=>T.viewportPriority!==!1),Mr=R(()=>!!Uo.value&&!q.value);var Gs;Gs=R(()=>Uo.value),En(RL,Gs);const Vi=R(()=>{var E;return!(X.value||T.deferNodesUntilVisible===!1||((E=T.maxLiveNodes)!=null?E:0)<=0||sn.value||At.value.length>900||T.viewportPriority===!1)}),Ys=Xle(E=>{var j;return ce((j=E??O.value)!=null?j:null)},Uo),{requestFrame:jo,cancelFrame:Vo,hasIdleCallback:Il,isTestEnv:cr}=(function(E){const j=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 Ne;if(typeof globalThis>"u"||!("process"in globalThis))return;const De=(Ne=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Ne.value;return De?.env})();return{requestFrame:j,cancelFrame:re,hasIdleCallback:ae,isTestEnv:be?.NODE_ENV==="test"}})({isClient:G}),Tr=R(()=>Oe.value===!0&&!co.value),{resolvedBatchSize:ho,resolvedInitialBatch:ko,batchingEnabled:qi,incrementalRenderingActive:gt,renderedCount:Le,previousRenderContext:Ge,adaptiveBatchSize:Xt,previousBatchConfig:hs}=(function(E,j){var re;const ae=R(()=>{var nt;const Be=Math.trunc((nt=E.renderBatchSize)!=null?nt:80);return Number.isFinite(Be)?Math.max(0,Be):0}),be=R(()=>{var nt;const Be=Math.trunc((nt=E.initialRenderBatchSize)!=null?nt:ae.value);return Number.isFinite(Be)?Math.max(0,Be):ae.value}),Ne=R(()=>!j.renderAsFragment.value&&E.batchRendering!==!1&&ae.value>0&&j.isClient&&!j.isTestEnv),De=Z(0),ze=Z({key:E.indexKey,total:0}),ot=Z(Math.max(1,ae.value||1)),We=R(()=>{var nt,Be,Je;return Ne.value&&!((nt=j.continuousStreaming)!=null&&nt.value)&&!((Be=j.forceFullRenderFinalContent)!=null&&Be.value)&&((Je=E.maxLiveNodes)!=null?Je:0)<=0}),Xe=Z({batchSize:ae.value,initial:be.value,delay:(re=E.renderBatchDelay)!=null?re:16,enabled:We.value});return{resolvedBatchSize:ae,resolvedInitialBatch:be,batchingEnabled:Ne,incrementalRenderingActive:We,renderedCount:De,previousRenderContext:ze,adaptiveBatchSize:ot,previousBatchConfig:Xe}})(T,{isClient:G,isTestEnv:cr,renderAsFragment:X,forceFullRenderFinalContent:Tr,continuousStreaming:R(()=>$t.value&&Oe.value!==!0)}),ts=R(()=>{var E;return!X.value&&T.batchRendering!==!1&&ho.value>0&&!cr&&((E=T.maxLiveNodes)!=null?E:0)<=0&&!Tr.value}),Ll=R(()=>ts.value),tl=R(()=>yn.value||Ll.value),Mi=R(()=>{var E;return tl.value&&((E=oo.value)==null?void 0:E.codeBlockEstimation)!==!1}),fo=new Map,Ki=new Map,Er=new WeakMap;let ci=null;const $l=new WeakMap,qo=new Map,Ir=[];let Xs=[],di=[],se=-1;const xe=Xr(Ir),J=new Set,we=Z(0);let $e=0;const He=Z(0),vt=R(()=>(He.value,Array.from(fo.entries()).sort((E,j)=>E[0]-j[0]))),ut=Z(null),Pt=Z(null);let Tt,ln=null,so=0,Rt=null;function Ot(){Tt.markFallbackHeightPrefixDirty()}function Zn(E){return Tt.getFallbackNodeHeight(E)}function bo(E,j){return Tt.estimateHeightRange(E,j)}function ms(E){return Tt.estimateIndexForOffset(E)}const{activeRestoreAnchor:Ns,getRelativeScrollTopWithinContainer:Js,setRelativeScrollTopWithinContainer:$c,resolveAnchorOffset:V2,clearRestoreReconcile:Nc,scheduleRestoreReconcile:vu,captureRestoreAnchor:Fc,restoreAnchor:Rc,getAnchorDrift:q2}=(function(E){const{isClient:j,containerRef:re,parsedNodeCount:ae,requestFrame:be,cancelFrame:Ne,resolveScrollContainer:De,getNormalizedScrollTop:ze,getOffsetTopWithinRoot:ot,isReverseFlexScrollRoot:We,estimateIndexForOffset:Xe,estimateHeightRange:nt,getFallbackNodeHeight:Be,clamp:Je}=E,lt=Z(null);let rt=null,wt=[];function dt(){const Zt=De(),pn=re.value;if(!Zt||!pn)return null;const vn=Zt.ownerDocument||pn.ownerDocument||document;if(Zt===vn.documentElement||Zt===vn.body||Zt===vn.scrollingElement){const Jn=pn.getBoundingClientRect();return Math.max(0,-Jn.top)}return Math.max(0,ze(Zt,vn,!1)-ot(pn,Zt))}function Nt(Zt){var pn;const vn=De(),Jn=re.value;if(!vn||!Jn)return;const Ps=Math.max(0,Zt),_s=vn.ownerDocument||Jn.ownerDocument||document,$r=_s.defaultView||(typeof window<"u"?window:null);if(vn===_s.documentElement||vn===_s.body||vn===_s.scrollingElement){const il=ze(vn,_s,!0)+Jn.getBoundingClientRect().top;return void((pn=$r?.scrollTo)==null||pn.call($r,0,Math.max(0,il+Ps)))}k_(vn,_s,ot(Jn,vn)+Ps,{isReverseFlexScrollRoot:il=>{var Zf;return(Zf=We?.(il))!=null&&Zf},getNormalizedScrollTop:ze})}function Dt(Zt){const pn=ae.value,vn=Je(Zt.nodeIndex,0,Math.max(0,pn-1));return nt(0,vn)+Math.max(0,Zt.offsetWithinNodePx)}function qt(){if(rt!=null&&(Ne?.(rt),rt=null),j)for(const Zt of wt)window.clearTimeout(Zt);wt=[]}function Ut(Zt){const pn=Dt(Zt),vn=dt();vn!=null&&Math.abs(vn-pn)<=.5||Nt(pn)}return{activeRestoreAnchor:lt,getRelativeScrollTopWithinContainer:dt,setRelativeScrollTopWithinContainer:Nt,resolveAnchorOffset:Dt,clearRestoreReconcile:qt,applyRestoreAnchor:Ut,scheduleRestoreReconcile:function(){lt.value&&j&&rt==null&&(rt=be?be(()=>{rt=null,lt.value&&Ut(lt.value)}):null,rt==null&<.value&&Ut(lt.value))},captureRestoreAnchor:function(){const Zt=dt(),pn=ae.value;if(Zt==null||pn<=0)return null;const vn=Je(Xe(Zt+1),0,pn-1),Jn=nt(0,vn),Ps=Be(vn);return{nodeIndex:vn,offsetWithinNodePx:Je(Zt-Jn,0,Math.max(0,Ps-1))}},restoreAnchor:function(Zt){const pn=ae.value;if(lt.value={nodeIndex:Je(Zt.nodeIndex,0,Math.max(0,pn-1)),offsetWithinNodePx:Math.max(0,Zt.offsetWithinNodePx)},qt(),Ut(lt.value),j)for(const vn of[0,120,280,480])wt.push(window.setTimeout(()=>{lt.value&&Ut(lt.value)},vn))},getAnchorDrift:function(Zt){const pn=dt();return pn==null?null:pn-Dt(Zt)}}})({isClient:G,containerRef:O,parsedNodeCount:Tn,requestFrame:jo,cancelFrame:Vo,resolveScrollContainer:()=>ut.value||ue(),getNormalizedScrollTop:Ue,getOffsetTopWithinRoot:_e,isReverseFlexScrollRoot:Se,estimateIndexForOffset:ms,estimateHeightRange:bo,getFallbackNodeHeight:Zn,clamp:Os}),{nodeHeights:Nl,heightStats:fi,heightTreeSize:Sf,heightSumTree:l0,heightKnownTree:a0,averageNodeHeight:Af,resetHeightMeasurements:u0,pruneHeightMeasurements:c0,rebuildHeightTrees:Oc,recordNodeHeight:K2,removeNodeHeights:Z2,exportHeightCache:ye,importHeightCache:Ae,fenwickRangeSum:qe}=(function(E={}){const j=Jo({}),re=Jo({total:0,count:0}),ae=Z(0),be=Z([]),Ne=Z([]);function De(){for(const Be of Object.keys(j))delete j[Number(Be)];re.total=0,re.count=0,ae.value=0,be.value=[],Ne.value=[]}function ze(Be,Je,lt){for(let rt=Je+1;rt0;rt-=rt&-rt)lt+=Be[rt];return lt}function We(Be){ae.value=Be;const Je=new Array(Be+1).fill(0),lt=new Array(Be+1).fill(0);for(const[rt,wt]of Object.entries(j)){const dt=Number(rt),Nt=Number(wt);!Number.isFinite(dt)||dt<0||dt>=Be||!Number.isFinite(Nt)||Nt<=0||(ze(Je,dt,Nt),ze(lt,dt,1))}be.value=Je,Ne.value=lt}function Xe(Be){if(!Number.isInteger(Be)||Be<0)return!1;const Je=j[Be];if(!Number.isFinite(Je)||Je<=0)return!1;if(delete j[Be],re.total=Math.max(0,re.total-Je),re.count=Math.max(0,re.count-1),ae.value>Be){const lt=be.value,rt=Ne.value;lt.length&&rt.length&&(ze(lt,Be,-Je),ze(rt,Be,-1))}return!0}const nt=R(()=>re.count>0?Math.max(12,re.total/re.count):32);return{nodeHeights:j,heightStats:re,heightTreeSize:ae,heightSumTree:be,heightKnownTree:Ne,averageNodeHeight:nt,resetHeightMeasurements:De,pruneHeightMeasurements:function(Be){if(Be<=0)return void De();let Je=0,lt=0;for(const[rt,wt]of Object.entries(j)){const dt=Number(rt),Nt=Number(wt);!Number.isFinite(dt)||dt<0||dt>=Be||!Number.isFinite(Nt)||Nt<=0?delete j[dt]:(Je+=Nt,lt++)}re.total=Je,re.count=lt},rebuildHeightTrees:We,recordNodeHeight:function(Be,Je,lt={}){(function(rt,wt,dt={}){var Nt;if(!Number.isFinite(wt)||wt<=0)return!1;const Dt=j[rt];if(Dt&&(dt.allowShrink===!1&&wtrt){const qt=be.value,Ut=Ne.value;if(qt.length&&Ut.length)if(Dt){const Zt=wt-Dt;Zt!==0&&ze(qt,rt,Zt)}else ze(qt,rt,wt),ze(Ut,rt,1)}dt.notify!==!1&&((Nt=E.onHeightRecorded)==null||Nt.call(E))})(Be,Je,rn(mt({},lt),{notify:!0}))},removeNodeHeight:function(Be,Je={}){var lt;const rt=Xe(Be);return rt&&Je.notify!==!1&&((lt=E.onHeightRecorded)==null||lt.call(E)),rt},removeNodeHeights:function(Be,Je={}){var lt;let rt=0;for(const wt of Be)Xe(Number(wt))&&rt++;return rt>0&&Je.notify!==!1&&((lt=E.onHeightRecorded)==null||lt.call(E)),rt},exportHeightCache:function(){return Object.entries(j).map(([Be,Je])=>({index:Number(Be),height:Number(Je)})).filter(Be=>Number.isFinite(Be.index)&&Be.index>=0&&Number.isFinite(Be.height)&&Be.height>0).sort((Be,Je)=>Be.index-Je.index)},importHeightCache:function(Be,Je={}){var lt;if(!Array.isArray(Be))return;const rt=ae.value;let wt=!1;if(Je.mode!=="merge"){const dt=Object.keys(j);if(dt.length>0){for(const Nt of dt)delete j[Number(Nt)];wt=!0}}for(const dt of Be){const Nt=Number(dt.index),Dt=Number(dt.height);if(!Number.isInteger(Nt)||Nt<0||rt>0&&Nt>=rt||!Number.isFinite(Dt)||Dt<=0)continue;const qt=j[Nt];qt&&Math.abs(qt-Dt)<=1||(j[Nt]=Dt,wt=!0)}wt&&((function(){let dt=0,Nt=0;const Dt=ae.value;for(const[qt,Ut]of Object.entries(j)){const Zt=Number(qt),pn=Number(Ut);!Number.isFinite(Zt)||Zt<0||Dt>0&&Zt>=Dt||!Number.isFinite(pn)||pn<=0?delete j[Zt]:(dt+=pn,Nt++)}re.total=dt,re.count=Nt})(),rt>0&&We(rt),(lt=E.onHeightRecorded)==null||lt.call(E))},fenwickRangeSum:function(Be,Je,lt){if(lt<=Je)return 0;const rt=ot(Be,lt-1);return Je<=0?rt:rt-ot(Be,Je-1)}}})({onHeightRecorded:()=>{Ot(),Ct.value&&Wf(),Ns.value&&vu(),Pt.value&&jc(),mo("node-resize")}});function Mt(E){Number.isInteger(E)&&E>=0&&J.add(E)}function Jt(E){for(const j of E)Mt(Number(j))}function an(E){$e++;let j=!0;try{const re=E();return j=re!==!1,re}finally{$e--,$e===0&&j&&we.value++}}function $n(){Xs=[],di=[],se=-1,J.clear(),xe.value=Ir}function io(){$n(),an(()=>u0()),qo.clear()}function Fs(E){!Number.isInteger(E)||E<0||E>=At.value.length||qo.set(E,Lf(E))}function yu(E,j,re={}){const ae=Nl[E];Mt(E),K2(E,j,re);const be=Nl[E];return Object.is(ae,be)?(J.delete(E),!1):(be&&be>0?Fs(E):ae&&qo.delete(E),!0)}function Mf(E,j){const re=Kt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ae,be;return(be=(ae=fo.get(E))==null?void 0:ae.offsetHeight)!=null?be:0});return re>0?re:Kt("getNodeLayoutHeight.content.offsetHeight",()=>j.offsetHeight)}function r6(E,j={}){j.mode!=="merge"?$n():Jt(E.map(re=>re.index)),an(()=>Ae(E,j)),wv()}const nl=R(()=>Vi.value&&Mr.value),yF=R(()=>{var E;return!X.value&&T.batchRendering!==!1&&ho.value>0&&((E=T.maxLiveNodes)!=null?E:0)<=0}),kF=R(()=>!X.value&&Ye&&Oe.value===!0&&!sn.value&&!co.value&&!uo.value&&!nl.value&&!yF.value),l6=R(()=>!!Ys&&nl.value),a6=R(()=>sn.value||Ct.value),{focusIndex:Fl,liveRange:Rs,updateLiveRange:Tf}=(function(E,j){const{parsedNodeCount:re,virtualizationEnabled:ae,maxLiveNodesResolved:be,liveNodeBufferResolved:Ne,clamp:De}=j,ze=Ne??R(()=>{var Xe;return Math.max(0,(Xe=E.liveNodeBuffer)!=null?Xe:60)}),ot=Z(0),We=Jo({start:0,end:0});return{liveNodeBufferResolved:ze,focusIndex:ot,liveRange:We,updateLiveRange:function(){const Xe=re.value;if(!ae.value||Xe===0)return We.start=0,void(We.end=Xe);const nt=Math.min(be.value,Xe),Be=ze.value,Je=De(ot.value-Be,0,Math.max(0,Xe-nt));We.start=Je,We.end=Math.min(Xe,Je+nt)}}})(T,{parsedNodeCount:Tn,virtualizationEnabled:sn,maxLiveNodesResolved:Lo,liveNodeBufferResolved:Wo,clamp:Os}),ol=new Map,ku=new Map,fa=new Map,d0=[],Rl=new Map,pa=new Set,u6=Z(0);let G2=!1;const c6=R(()=>(u6.value,pa.size)),Zi=new Map,sl=new Map,d6=Z(0),Y2=R(()=>{d6.value;let E=0;for(const j of Zi.values())E+=Math.max(0,j);return E});let Gi=null;const f0=R(()=>{if(!sn.value)return At.value.length;const E=Wo.value,j=Math.max(Rs.end+E,ko.value),re=Math.min(At.value.length,j);return Math.max(Le.value,re)});function p0(){G2||(G2=!0,queueMicrotask(()=>{G2=!1,u6.value+=1}))}function f6(E,j,re="node-resize"){if(!G||typeof window>"u")return null;const ae=window.setTimeout(()=>{pa.delete(ae)&&p0();try{j()}finally{mo(re)}},Math.max(0,E));return pa.add(ae),p0(),ae}function h0(E){G&&E!=null&&(pa.delete(E)&&p0(),window.clearTimeout(E))}function p6(){if(G&&typeof window<"u")for(const E of pa)window.clearTimeout(E);pa.size&&(pa.clear(),p0()),d0.length=0,fa.clear()}function bF(E){F.value=E}function CF(E){W.value=E}function wF(E){z.value=E}const{cancelScheduledFocusSync:X2,scheduleFocusSync:Lr}=(function(E){const{isClient:j,containerRef:re,virtualizationEnabled:ae,requestFrame:be,cancelFrame:Ne,syncFocusToScroll:De}=E;let ze=null;function ot(){var Xe,nt,Be;return(Be=(nt=(Xe=re.value)==null?void 0:Xe.ownerDocument)==null?void 0:nt.defaultView)!=null?Be:typeof window<"u"?window:null}function We(){if(!ze)return;const Xe=ot();ze.viaTimeout?Xe?Xe.clearTimeout(ze.id):clearTimeout(ze.id):Ne?.(ze.id),ze=null}return{cancelScheduledFocusSync:We,scheduleFocusSync:function(Xe={}){if(!ae.value)return;if(!j)return void De(!0);if(Xe.immediate)return We(),void De(!0);if(ze)return;const nt=()=>{ze=null,De()};if(be)return void(ze={id:be(nt),viaTimeout:!1});const Be=ot();ze={id:Be?Be.setTimeout(nt,16):setTimeout(nt,16),viaTimeout:!0}}}})({isClient:G,containerRef:O,virtualizationEnabled:sn,requestFrame:jo,cancelFrame:Vo,syncFocusToScroll:function(E=!1){var j;if(!sn.value)return;const re=ut.value||ue();if(!re)return;const ae=re.ownerDocument||((j=O.value)==null?void 0:j.ownerDocument)||document,be=ae?.defaultView||(typeof window<"u"?window:null),Ne=re===ae?.documentElement||re===ae?.body,De=At.value.length;if(De<=0)return;if(!Ne&&De>0&&Se(re)){const rt=Kt("syncFocusToScroll.clientHeight",()=>re.clientHeight||0),wt=Kt("syncFocusToScroll.scrollTop",()=>re.scrollTop),dt=wt<0?-wt:wt;return void v0(Os((ze=Math.max(0,dt)+.5*Math.max(0,rt),Tt.estimateIndexForOffsetFromEnd(ze)),0,Math.max(0,De-1)),E)}var ze;const ot=(function(rt,wt,dt,Nt){const Dt=O.value;if(!Dt)return null;const qt=Nt?0:Kt("syncFocusToScroll.model.root.getBoundingClientRect",()=>rt.getBoundingClientRect().top),Ut=Kt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Dt.getBoundingClientRect().top),Zt=Math.max(0,qt-Ut),pn=Nt?Kt("syncFocusToScroll.model.viewport.clientHeight",()=>{var vn,Jn,Ps,_s;return(_s=(Ps=(Jn=dt?.innerHeight)!=null?Jn:(vn=wt.documentElement)==null?void 0:vn.clientHeight)!=null?Ps:rt.clientHeight)!=null?_s:0}):Kt("syncFocusToScroll.model.root.clientHeight",()=>rt.clientHeight);return Os(ms(Zt+.5*Math.max(0,pn)),0,Math.max(0,At.value.length-1))})(re,ae,be,Ne);if(ot!=null)return void v0(ot,E);const We=Ne?null:Kt("syncFocusToScroll.root.getBoundingClientRect",()=>re.getBoundingClientRect()),Xe=Ne?0:We.top,nt=Ne?Kt("syncFocusToScroll.viewport.clientHeight",()=>{var rt,wt;return(wt=(rt=be?.innerHeight)!=null?rt:re.clientHeight)!=null?wt:0}):We.bottom,Be=vt.value;let Je=null,lt=null;for(const[rt,wt]of Be){if(!wt)continue;const dt=Kt("syncFocusToScroll.slot.getBoundingClientRect",()=>wt.getBoundingClientRect());dt.bottom<=Xe||dt.top>=nt||(Je==null&&(Je=rt),lt=rt)}if(Je==null||lt==null){const rt=O.value;if(!rt)return;const wt=Ne?{top:0}:Kt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>re.getBoundingClientRect()),dt=Kt("syncFocusToScroll.fallback.scrollTop",()=>Ue(re,ae,Ne)),Nt=Ne?(()=>{const qt=Kt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>rt.getBoundingClientRect()),Ut=(Ne?0:wt.top)-qt.top;return Math.max(0,Ut)})():(()=>{const qt=_e(rt,re);return Math.max(0,dt-qt)})(),Dt=Ne?Kt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var qt,Ut,Zt,pn;return(pn=(Zt=(Ut=be?.innerHeight)!=null?Ut:(qt=ae?.documentElement)==null?void 0:qt.clientHeight)!=null?Zt:re.clientHeight)!=null?pn:0}):Kt("syncFocusToScroll.fallback.root.clientHeight",()=>re.clientHeight);return void v0(Os(ms(Nt+.5*Math.max(0,Dt)),0,Math.max(0,At.value.length-1)),!0)}v0(Math.round((Je+lt)/2),E)}}),{visibleNodeIndices:J2,nodeVisibilityHandles:Pc,nodeVisibilityWatchStops:m0,nodeVisibilityFallbackTimers:h6,clearVisibilityFallback:g0,markNodeVisible:ha,cleanupNodeVisibility:_F,destroyNodeVisibilityState:Q2}=yce({isClient:G,shouldTrackVisibleNodeIndices:()=>nl.value,shouldCleanupNodeVisibility:()=>sn.value,onNodeMarkedVisible:E=>{sn.value?Lr():Fl.value=Os(E,0,Math.max(0,At.value.length-1))},onNodeVisibilityCleaned:E=>{fo.delete(E)&&W6()}}),{cleanupScrollListener:m6,setupScrollListener:xF}=(function(E){const{isClient:j,virtualizationEnabled:re,listenerEnabled:ae,scrollRootElement:be,resolveScrollContainer:Ne,scheduleFocusSync:De,onScroll:ze}=E;let ot=null,We=null;function Xe(){ot&&(ot(),ot=null),We=null,be.value=null}function nt(Be){const Je=E.getScrollTop?E.getScrollTop(Be):Be.scrollTop;return Math.max(0,Number.isFinite(Je)?Math.abs(Je):0)}return{cleanupScrollListener:Xe,setupScrollListener:function(){if(!j)return;if(!((Be=ae?.value)!=null?Be:re.value))return void Xe();var Be;const Je=Ne();if(!Je)return void Xe();if(be.value===Je&&ot)return;Xe(),We=nt(Je);const lt=()=>{if(ze?.(),re.value){const rt=(function(wt){const dt=nt(wt),Nt=We;We=dt;const Dt=Math.max(480,.75*(wt.clientHeight||0));return Nt==null?dt>Dt?{immediate:!0}:void 0:Math.abs(dt-Nt)>Dt?{immediate:!0}:void 0})(Je);rt?De(rt):De()}};Je.addEventListener("scroll",lt,{passive:!0}),be.value=Je,ot=()=>{Je.removeEventListener("scroll",lt)}}}})({isClient:G,virtualizationEnabled:sn,listenerEnabled:a6,scrollRootElement:ut,resolveScrollContainer:ue,scheduleFocusSync:Lr,onScroll:function(){const E=Pt.value;if(!E)return;const j=If();if(!j||(function(ae){if(Of()>=so)return Rt=null,!1;const be=Rt;if(be==null)return!0;const Ne=Math.abs(ae.scrollTop-be)<=2;return Ne||(Rt=null),Ne})(j))return;const re=I6(j);re!=null?(re<-32||Math.abs(Math.max(0,re)-Math.max(0,E.distanceFromBottomPx))>32)&&Uc("restore"):Uc("restore")},getScrollTop:E=>{var j;const re=E.ownerDocument||((j=O.value)==null?void 0:j.ownerDocument)||document,ae=E===re.documentElement||E===re.body||E===re.scrollingElement;return Kt("scrollListener.getScrollTop",()=>Ue(E,re,ae))}});function v0(E,j=!1){const re=Os(E,0,Math.max(0,At.value.length-1));!j&&Math.abs(re-Fl.value)<=1||(Fl.value=re,Tf())}function Os(E,j,re){return Math.min(Math.max(E,j),re)}function ev(E=At.value.length){const j=qs();return!Number.isInteger(j)||j<0?E:Os(j,0,E)}function tv(E){return E?.firstElementChild}function g6(E,j){var re;return E?(re=E.matches)!=null&&re.call(E,j)?E:E.querySelector(j):null}function SF(E,j){E<1||E>6||(U[E]=j)}function v6(){if(!yn.value)return void(ne.value=0);const E=Kt("updateExperimentContainerWidth.clientWidth",()=>{var j,re;return(re=(j=O.value)==null?void 0:j.clientWidth)!=null?re:0});ne.value=E>0?E:0}let Ef=null;function nv(){Ef?.disconnect(),Ef=null}const y6=S1("ViewportDeferredMarkdownCodeBlockNode",zr({loader:()=>vo(null,null,function*(){return(yield Go(()=>import("./index5-DRizs5us.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:ag,delay:0,suspensible:!1}),ag);function k6(E){return E===y6}const b6=R(()=>g.value==="pre"?Ri:g.value==="shiki"?y6:G9);function C6(){var E;return((E=T.codeBlockProps)==null?void 0:E.showHeader)!==!1}function w6(E,j,re){const ae=Nl[j],be=typeof ae=="number"&&ae>0;if(Eo.value&&!be&&!(function(Ne){return!!bn.value.paragraph&&(Ne.type==="paragraph"||Ne.type==="list_item"||Ne.type==="list")})(E)){const Ne=zL(E,re,Y.value);if(Ne)return Ne}if(Mi.value&&E.type==="code_block"){const Ne=(function(De){if(De.type!=="code_block")return null;const ze=e7(De,M0(De));return k6(ze)?"markdown":ze===Ri?"pre":ze===b6.value||ze===G9?"monaco":null})(E);if(Ne==="monaco"||Ne==="markdown"||Ne==="pre")return(function(De,ze){var ot,We,Xe;if(!De||De.type!=="code_block")return null;const nt=ze.rendererKind,Be=nt!=="pre"&&ze.showHeader!==!1,Je=!!De.diff;let lt=0,rt=500;if(nt==="monaco"){const dt=(ot=ze.monacoOptions)!=null?ot:{},Nt=s4(De,dt,ze.width),Dt=(function(Ut){const Zt=typeof Ut?.fontSize=="number"&&Ut.fontSize>0?Ut.fontSize:12;return typeof Ut?.lineHeight=="number"&&Ut.lineHeight>0?Ut.lineHeight:Math.round(1.5*Zt)})(dt),qt=(function(Ut,Zt){var pn,vn;const Jn=typeof((pn=Ut?.padding)==null?void 0:pn.top)=="number"?Ut.padding.top:Zt?0:8,Ps=typeof((vn=Ut?.padding)==null?void 0:vn.bottom)=="number"?Ut.padding.bottom:Zt?0:8;return Math.max(0,Jn)+Math.max(0,Ps)})(dt,Je);rt=typeof dt.MAX_HEIGHT=="number"&&dt.MAX_HEIGHT>0?dt.MAX_HEIGHT:500,lt=Math.round(Nt*Dt+qt)}else if(nt==="markdown"){const dt=s4(De);lt=Math.round(21*dt+32)}else{const dt=s4(De);lt=Math.round(28*dt),rt=Number.POSITIVE_INFINITY}const wt=Math.max(1,Math.min(lt,rt));return mt({kind:"code-block",height:Math.round(wt+(Be?40:0)),contentHeight:wt,rendererKind:nt},Je&&nt==="monaco"?{diffInline:h5((We=ze.monacoOptions)!=null?We:{},(Xe=ze.width)!=null?Xe:0)}:{})})(E,{rendererKind:Ne,monacoOptions:T.codeBlockMonacoOptions,showHeader:C6(),width:re})}return null}JS(()=>{if(we.value,$e>0)return;const E=At.value,j=Bo();if(!E.length||!tl.value)return Xs=[],di=[],se=-1,J.clear(),void(xe.value=Ir);const re=ne.value||Kt("estimatedNodeHeights.clientWidth",()=>{var We;return((We=O.value)==null?void 0:We.clientWidth)||0});if(!Number.isFinite(re)||re<=0)return Xs=[],di=[],se=-1,J.clear(),void(xe.value=Ir);const ae=(function(We){return[Math.round(We),Eo.value,Mi.value,Y.value,T.codeBlockMonacoOptions,C6(),g.value,bn.value,t4.value]})(re),be=Xs.length<=E.length&&(De=ae,(Ne=di).length===De.length&&Ne.every((We,Xe)=>Object.is(We,De[Xe])));var Ne,De;const ze=be&&se===j?E.length:be?ev(E.length):0,ot=be?Array.from(J):[];Xs.length=E.length;for(let We=ze;We=0&&Wexe.value);Tt=(function(E){let j=!0,re=[0],ae="";function be(Xe){var nt;const Be=E.nodeHeights[Xe];if(Number.isFinite(Be)&&Be>0)return Be;const Je=E.parsedNodes.value[Xe],lt=Je?.type,rt=!!((nt=E.hasCustomParagraphComponent)!=null&&nt.call(E)),wt=E.estimatedNodeHeights.value[Xe],dt=wt?.height;if(!(function(Dt,qt,Ut){return!!(Ut&&qt?.kind==="simple-text"&&(Dt==="paragraph"||Dt==="list_item"||Dt==="list"))})(lt,wt,rt)&&Number.isFinite(dt)&&dt>0)return dt;const Nt=rce(Je,E.getContainerWidth()||640);return lt==="heading"||lt==="paragraph"&&Nt<=28&&(function(Dt,qt){if(qt)return!1;const Ut=Dt.children;return!Array.isArray(Ut)||!Ut.length||Ut.every(UL)})(Je,rt)?Nt:Math.max(E.averageNodeHeight.value,Nt)}function Ne(){var Xe;const nt=E.parsedNodes.value.length,Be=E.getPrefixCacheKeyParts().join(":");if(!j&&ae===Be)return re;const Je=new Array(nt+1);Je[0]=0;for(let lt=0;lt=((nt=lt[Je])!=null?nt:0))return Je-1;let rt=0,wt=Je-1,dt=Je-1;for(;rt<=wt;){const Nt=rt+wt>>1;((Be=lt[Nt+1])!=null?Be:0)>=Xe?(dt=Nt,wt=Nt-1):rt=Nt+1}return dt}function ze(Xe,nt){var Be,Je;if(Xe>=nt)return 0;if(E.heightEstimationActive.value)return(function(wt,dt){var Nt,Dt;const qt=E.parsedNodes.value.length,Ut=w_(Math.trunc(wt),0,qt),Zt=w_(Math.trunc(dt),Ut,qt);if(Ut>=Zt)return 0;const pn=Ne();return((Nt=pn[Zt])!=null?Nt:0)-((Dt=pn[Ut])!=null?Dt:0)})(Xe,nt);if(E.heightTreeSize.value!==E.parsedNodes.value.length){let wt=0;for(let dt=Xe;dtUt<=0?0:E.fenwickRangeSum(rt,0,Ut)+(Ut-E.fenwickRangeSum(wt,0,Ut))*lt;let Nt=0,Dt=Be.length-1,qt=Be.length-1;for(;Nt<=Dt;){const Ut=Nt+Dt>>1;dt(Ut+1)>=Xe?(qt=Ut,Dt=Ut-1):Nt=Ut+1}return qt}let Je=Xe;for(let lt=0;lt0||Xe++}return Xe}return{markFallbackHeightPrefixDirty:function(){j=!0},getFallbackNodeHeight:be,estimateHeightRange:ze,estimateIndexForOffset:ot,estimateIndexForOffsetFromEnd:function(Xe){var nt,Be;const Je=E.parsedNodes.value;if(!Je.length)return 0;if(Xe<=0)return Math.max(0,Je.length-1);if(E.heightEstimationActive.value){const rt=(nt=Ne()[Je.length])!=null?nt:0;return De(Math.max(0,rt-Xe))}if(E.heightTreeSize.value===Je.length){const rt=ze(0,Je.length);return ot(Math.max(0,rt-Xe))}let lt=Xe;for(let rt=Je.length-1;rt>=0;rt--){const wt=(Be=E.nodeHeights[rt])!=null?Be:E.averageNodeHeight.value;if(lt<=wt)return rt;lt-=wt}return 0},getEstimatedNodeHeightCount:We,buildVirtualHeightSummary:function(Xe){var nt;const Be=E.parsedNodes.value.length;return{totalNodes:Be,measuredCount:E.heightStats.count,estimatedCount:We(),averageNodeHeight:E.averageNodeHeight.value,topSpacerHeight:Xe.topSpacerHeight,bottomSpacerHeight:Xe.bottomSpacerHeight,estimatedTotalHeight:ze(0,Be),width:(nt=Xe.width)!=null?nt:E.getContainerWidth()}}}})({parsedNodes:At,nodeHeights:Nl,heightStats:fi,heightTreeSize:Sf,heightSumTree:l0,heightKnownTree:a0,averageNodeHeight:Af,heightEstimationActive:yn,estimatedNodeHeights:Dc,getContainerWidth:Io,hasCustomParagraphComponent:()=>!!bn.value.paragraph,getPrefixCacheKeyParts:()=>{var E;const j=a1(ne.value||Kt("getFallbackHeightPrefix.clientWidth",()=>{var ae;return((ae=O.value)==null?void 0:ae.clientWidth)||0})),re=((E=o.virtualScroll)==null?void 0:E.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[At.value.length,fi.count,Math.round(fi.total),Math.round(100*Af.value),re,j,yn.value?1:0,t4.value,ie.value,bn.value.paragraph?1:0]},fenwickRangeSum:qe}),et(()=>At.value.length,E=>{var j;Ot(),E<=0?io():(Ec0(j))),E!==Sf.value&&Oc(E))},{immediate:!0});const AF=R(()=>{if(!sn.value)return At.value.map((ae,be)=>({node:ae,index:be}));const E=At.value.length,j=Os(Rs.start,0,E),re=Os(Rs.end,j,E);return At.value.slice(j,re).map((ae,be)=>({node:ae,index:j+be}))}),ov=R(()=>sn.value?bo(0,Math.min(Rs.start,At.value.length)):0),sv=R(()=>{if(!sn.value)return 0;const E=At.value.length;return bo(Math.min(Rs.end,E),E)});function _6(){return Tt.buildVirtualHeightSummary({topSpacerHeight:ov.value,bottomSpacerHeight:sv.value,width:bu()})}function MF(){const E=At.value,j=_6();return rn(mt({},j),{probe:{paragraphReady:!!Y.value.paragraph,listItemReady:!!Y.value.listItem,listWrapperOverhead:Y.value.listWrapperOverhead,headingReadyLevels:Object.entries(Y.value.headings).filter(([,re])=>!!re).map(([re])=>Number(re))},nodes:E.map((re,ae)=>{var be,Ne,De,ze,ot,We,Xe,nt,Be;return{index:ae,type:re.type,estimateKind:(Ne=(be=Dc.value[ae])==null?void 0:be.kind)!=null?Ne:null,rendererKind:(ze=(De=Dc.value[ae])==null?void 0:De.rendererKind)!=null?ze:null,estimatedHeight:(We=(ot=Dc.value[ae])==null?void 0:ot.height)!=null?We:null,estimatedContentHeight:(nt=(Xe=Dc.value[ae])==null?void 0:Xe.contentHeight)!=null?nt:null,measuredHeight:(Be=Nl[ae])!=null?Be:null}})})}function iv(){return o.indexKey!=null?String(o.indexKey):co.value?`virtual-${wo()}`:"markdown-renderer"}function x6(E){const j=String(E),re=`${iv()}-`;if(!j.startsWith(re))return null;const ae=j.slice(re.length).match(/^(\d+)(?:$|-)/);if(!ae)return null;const be=Number(ae[1]);return!Number.isInteger(be)||be<0||be>=At.value.length?null:be}function wo(){var E,j,re;const ae=(E=o.virtualScroll)==null?void 0:E.sessionKey;return String(ae!=null&&ae!==""?ae:(re=(j=o.indexKey)!=null?j:T.customId)!=null?re:Co)}function ns(){var E;const j=(E=o.virtualScroll)==null?void 0:E.threadKey;return j==null||j===""?void 0:String(j)}const TF=R(()=>{var E,j,re;return(re=ns())!=null?re:String((j=(E=o.indexKey)!=null?E:T.customId)!=null?j:Co)});function rv(E){var j;return(E??"")===((j=ns())!=null?j:"")}function Ol(){var E,j,re;return j=(E=o.virtualScroll)==null?void 0:E.measurementKey,re=(function(){const ae=g.value;return(function(be){var Ne,De;const ze=be.renderer,ot=ze==="monaco"?be.codeBlockMonacoOptions:void 0,We=be.codeBlockProps,Xe=ze==="shiki";return[be.isDark?"dark":"light",ze==="monaco"?"code-rich":ze==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",xs(be.codeBlockMinWidth),xs(be.codeBlockMaxWidth),...Xe?[Gre((Ne=We?.themes)!=null?Ne:be.themes,(De=We?.langs)!=null?De:be.langs)]:[],xs(ot?.fontSize),xs(ot?.lineHeight),xs(ot?.fontFamily),xs(ot?.tabSize),xs(ot?.MAX_HEIGHT),xs(ot?.wordWrap),xs(ot?.wrappingIndent),xs(ot?.padding),xs(We?.showHeader),xs(We?.showCopyButton),xs(We?.showExpandButton),xs(We?.showPreviewButton),xs(We?.showCollapseButton),xs(We?.showFontSizeButtons)].join("\0")})({renderer:ae,isDark:T.isDark,codeBlockStream:T.codeBlockStream,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockMonacoOptions:ae==="monaco"?T.codeBlockMonacoOptions:void 0,codeBlockProps:T.codeBlockProps,themes:ae==="shiki"?T.themes:void 0,langs:ae==="shiki"?T.langs:void 0})})(),[j==null?"":String(j),re].join("\0")}function bu(){return Io()}const y0=R(()=>a1(bu())),Yi=R(()=>[Ol(),y0.value].join("\0")),EF=R(()=>{var E;return co.value?["virtual",(E=ns())!=null?E:"",wo(),Yi.value].join("\0"):o.indexKey});function Bc(){d6.value+=1}function lv(E){return!(!E||!Number.isInteger(E.index)||E.index<0||E.index>=At.value.length||E.sessionKey!==wo()||E.threadKey!==ns()||E.layoutEpochKey!==Yi.value)}function S6(E){const j=String(E),re=sl.get(j);return re?lv(re)?re.index:null:x6(j)}function A6(E="async-node"){(Zi.size||sl.size)&&(Zi.clear(),sl.clear(),Bc(),mo(E))}const Hc=on(F3,null),av={reportHeight(E,j){if(!Ct.value)return;const re=S6(E);if(re==null)return;const ae=ol.get(re);if(!ae)return;const be=Number(j),Ne=Mf(re,ae);(function(De,ze,ot={}){an(()=>yu(De,ze,ot))})(re,Number.isFinite(be)&&be>0?Math.max(be,Ne||0):Ne)},markPending(E){if(!Ct.value)return;const j=x6(E);j!=null&&(function(re,ae){var be;const Ne=sl.get(re);if(Ne&&lv(Ne))return Zi.set(re,Math.max(0,(be=Zi.get(re))!=null?be:0)+1),Bc(),void mo("async-node");Zi.set(re,1),sl.set(re,(function(De){return{index:De,sessionKey:wo(),threadKey:ns(),layoutEpochKey:Yi.value}})(ae)),Bc(),mo("async-node")})(String(E),j)},markSettled(E){if(!Ct.value)return;const j=String(E),re=S6(E);(re!=null||(function(ae){return Zi.has(String(ae))})(j))&&(function(ae){var be;const Ne=(be=Zi.get(ae))!=null?be:0;return!(Ne<=0||(Ne<=1?(Zi.delete(ae),sl.delete(ae)):Zi.set(ae,Ne-1),Bc(),Ne===1&&mo("async-node"),0))})(j)&&re!=null&&Pl()}};function IF(){let E=0;for(const j of ol.values())E+=Kt("getVisibleDomHeight.offsetHeight",()=>{var re;return(re=j?.offsetHeight)!=null?re:0});return Math.ceil(Math.max(0,E))}En(F3,{reportHeight(E,j){av.reportHeight(E,j),Hc?.reportHeight(E,j)},markPending(E){av.markPending(E),Hc?.markPending(E)},markSettled(E){av.markSettled(E),Hc?.markSettled(E)}});let uv,cv=null,zc=null;function k0(E){return E!==!1&&E!=null&&E!==""}function M6(){return sn.value?(function(){if(!sn.value)return!0;const E=At.value.length,j=Os(Rs.start,0,E),re=Os(Rs.end,j,E);if(j>=re)return!0;for(let ae=j;ae=f0.value}function dv(){return Oe.value===!0&&!ft.value&&Y2.value===0&&pa.size===0&&Rl.size===0&&Gi==null&&M6()}function T6(){var E,j;if(((E=o.virtualScroll)==null?void 0:E.settleMode)!=="manual"||cv===wo()&&uv===ns())return!0;const re=(j=o.virtualScroll)==null?void 0:j.settledToken;return!!k0(re)&&zc===Uf(re)}function fv(){return dv()&&T6()}function LF(E,j){return j.totalNodes<=0?E==="final"?"final":"estimate":j.measuredCount>=j.totalNodes?E==="final"?"final":"measured":j.measuredCount>0||j.estimatedCount>0?"mixed":"estimate"}function Cu(E="manual",j){const re=_6(),ae=(function(be){return be||(Oe.value!==!0?At.value.length>0?"streaming":"estimating":!M6()||Rl.size>0||Gi!=null?"measuring":fv()?"settled":"settling")})(j);return{sessionKey:wo(),threadKey:ns(),phase:ae,nodeCount:re.totalNodes,liveRange:{start:Rs.start,end:Rs.end},renderedCount:Le.value,measuredCount:re.measuredCount,estimatedCount:re.estimatedCount,averageNodeHeight:re.averageNodeHeight,topSpacerHeight:re.topSpacerHeight,bottomSpacerHeight:re.bottomSpacerHeight,visibleDomHeight:IF(),totalHeight:E6(),width:re.width,final:Oe.value===!0,stable:fv(),confidence:LF(ae,re),reason:E}}function If(){const E=ut.value||ue(),j=O.value;if(!E||!j)return null;const re=E.ownerDocument||j.ownerDocument||document,ae=E===re.documentElement||E===re.body||E===re.scrollingElement,be=Kt("getScrollBox.scrollTop",()=>Ue(E,re,ae)),Ne=Kt("getScrollBox.scrollHeight",()=>{var ze,ot,We,Xe,nt;return ae?Math.max((ot=(ze=re.documentElement)==null?void 0:ze.scrollHeight)!=null?ot:0,(Xe=(We=re.body)==null?void 0:We.scrollHeight)!=null?Xe:0,(nt=E.scrollHeight)!=null?nt:0):E.scrollHeight}),De=Kt("getScrollBox.clientHeight",()=>{var ze;return ae?((ze=re.documentElement)==null?void 0:ze.clientHeight)||E.clientHeight||0:E.clientHeight});return{root:E,doc:re,isViewportRoot:ae,scrollTop:be,scrollHeight:Ne,clientHeight:De}}function E6(){const E=At.value.length,j=Math.max(0,bo(0,E)),re=Kt("getRendererLogicalHeight.offsetHeight",()=>{var be,Ne;return(Ne=(be=O.value)==null?void 0:be.offsetHeight)!=null?Ne:0}),ae=Math.max(0,re>0?re:Kt("getRendererLogicalHeight.scrollHeight",()=>{var be,Ne;return(Ne=(be=O.value)==null?void 0:be.scrollHeight)!=null?Ne:0}));return E<=0?Math.ceil(re):sn.value?j>0?Math.max(1,Math.ceil(j),(function(){let be=ov.value+sv.value;for(const Ne of fo.values())Ne&&(be+=Math.max(0,Kt("getVirtualizedDomLogicalHeight.offsetHeight",()=>Ne.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,Ne){return be<=0||Ne<=0?0:Ne<=be+Math.max(512,.05*be)?Math.ceil(Ne):0})(j,ae)):Math.max(1,Math.ceil(ae)):Ct.value?j>0||fi.count>0||Tt.getEstimatedNodeHeightCount()>0?(gt.value&&Le.value,Math.max(1,Math.ceil(ae),Math.ceil(j))):Math.ceil(ae):Math.max(1,Math.ceil(ae),Math.ceil(j))}function I6(E){const j=O.value;if(!j)return null;const re=Kt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>j.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:Kt("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(E)-re.bottom}function $F(E={}){const j=E.requireViewport!==!1,re=(function(Ne=64){const De=If(),ze=O.value;if(!De||!ze)return!1;const ot=(function(Xe){if(Xe.isViewportRoot)return{top:0,bottom:Xe.clientHeight};const nt=Kt("getVirtualViewportRect.getBoundingClientRect",()=>Xe.root.getBoundingClientRect());return{top:nt.top,bottom:nt.bottom}})(De),We=Kt("isRendererNearVirtualViewport.getBoundingClientRect",()=>ze.getBoundingClientRect());return We.bottom>=ot.top-Ne&&We.top<=ot.bottom+Ne})();if(j&&!re)return null;const ae=(function(){const Ne=If(),De=O.value;if(!Ne||!De||Math.max(0,Ne.scrollHeight-Ne.scrollTop-Ne.clientHeight)>64)return null;const ze=I6(Ne);return ze==null?null:ze>=-8&&ze<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,ze)}:null})();if(ae)return{anchor:ae,captured:!0};const be=Fc();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:re};if(E.allowFallback===!0){const Ne=(function(){const De=At.value.length;return De<=0?null:{type:"node",nodeIndex:Os(Fl.value,0,Math.max(0,De-1)),offsetWithinNodePx:0}})();return Ne?{anchor:Ne,captured:!1}:null}return null}function pv(E){let j=2166136261;for(let re=0;re>>0).toString(36)}function NF(E,j){let re=E;for(let ae=0;ae8192?`${ae.slice(0,8192)}...${ae.length}`:ae;return`${ae.length}:${pv(be)}`})(E)}`;if(typeof E=="function")return"fn";if(typeof E!="object")return typeof E;if(j.has(E))return"cycle";if(re>=6)return"max-depth";j.add(E);try{if(Array.isArray(E)){if(E.length<=160){const We=[];for(let Xe=0;Xe=ze&&De.push(Xe)}return[`a:${E.length}`,`h=${Ne.join(",")}`,`t=${De.join(",")}`,`all=${(ot>>>0).toString(36)}`].join(":")}const ae=E,be=Object.keys(ae).filter(Ne=>{const De=ae[Ne];return Ne!=="parent"&&Ne!=="el"&&Ne!=="component"&&(De==null||typeof De=="string"||typeof De=="number"||typeof De=="boolean"||FF.has(Ne))}).sort();return`o:${be.length}:${be.map(Ne=>`${Ne}=${b0(ae[Ne],j,re+1)}`).join(";")}`}finally{j.delete(E)}}let hv=-1,mv="",wu=[2166136261];function Lf(E){const j=At.value[E];return j?pv(b0(j)):""}function RF(E,j){let re=E;for(let ae=0;ae>>0}function gv(){var E,j;const re=ie.value;if(hv===re)return mv;const ae=At.value.length;let be=ev(ae);(hv!==re-1||be>ae||wu.length>>0).toString(36),hv=re,mv}function Wc(E,j={}){var re;const ae=j.includeHeightCache===!0,be=(re=j.includeContentHash)!=null?re:ae,Ne=ae?(function(ze){const ot=(function(){var rt,wt;const dt=Number((wt=(rt=o.virtualScroll)==null?void 0:rt.heightCacheLimit)!=null?wt:5e3);return!Number.isFinite(dt)||dt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(dt))})();if(!Number.isFinite(ot)||ze.length<=ot)return ze;const We=new Map,Xe=rt=>{!rt||We.size>=ot||We.set(rt.index,rt)},nt=At.value.length,Be=Os(Rs.start-2*Wo.value,0,nt),Je=Os(Rs.end+2*Wo.value,Be,nt);for(const rt of ze)rt.index>=Be&&rt.index=0&&We.sizert.index-wt.index).slice(0,ot)})(ye().map(ze=>{var ot;const We=At.value[ze.index];return We?rn(mt({},ze),{nodeType:String((ot=We.type)!=null?ot:""),signature:Lf(ze.index)}):null}).filter(ze=>!!ze)):[],De=$F({allowFallback:j.allowAnchorFallback===!0,requireViewport:j.requireViewport});return De||Ne.length||j.includeEmptyState===!0?rn(mt({sessionKey:E.sessionKey,threadKey:E.threadKey},De?{anchor:De.anchor,anchorCaptured:De.captured}:{anchorCaptured:!1}),{metrics:E,width:E.width,contentHash:be?gv():void 0,measurementKey:Ol()||void 0,heightCache:Ne.length?Ne:void 0}):null}function vv(E){var j,re;const ae=If();if(!ae)return;const be=(function(ze){const ot=O.value;if(!ot)return null;const We=_e(ot,ze.root),Xe=At.value.length,nt=Kt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>ot.offsetHeight||0),Be=Math.max(0,nt>0?nt:Xe>0?Kt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>ot.scrollHeight||0):0),Je=E6();return We+Math.max(Be,Je)})(ae);if(be==null)return;const Ne=Math.max(0,E.distanceFromBottomPx),De=Math.max(0,be-ae.clientHeight-Ne);(function(ze){so=Of()+120,Rt=ze})(De),ae.isViewportRoot?(re=(j=ae.doc.defaultView)==null?void 0:j.scrollTo)==null||re.call(j,0,De):k_(ae.root,ae.doc,De,{isReverseFlexScrollRoot:Se,getNormalizedScrollTop:Ue})}const yv=[];function L6(){if(G)for(ln!=null&&(Vo?.(ln),ln=null);yv.length;){const E=yv.pop();E!=null&&window.clearTimeout(E)}}function Uc(E){const j=!!Pt.value;Pt.value=null,so=0,Rt=null,L6(),j&&E&&mo(E)}function jc(){if(!Pt.value||!G||ln!=null)return;const E=()=>{ln=null;const j=Pt.value;j&&vv(j)};ln=jo?jo(E):null,ln==null&&E()}function $6(E,j={}){const re=At.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)&&!(j.requireSignature&&!ae.signature)&&!(j.requireCompatibilityMetadata&&!ae.nodeType&&!ae.signature)&&(function(be){var Ne;const De=At.value[be.index];return!(!De||be.nodeType&&be.nodeType!==String((Ne=De.type)!=null?Ne:"")||be.signature&&be.signature!==Lf(be.index))})(ae))}function N6(E){const j=a1(bu()),re=a1(E);return j!==-1&&re!==-1&&j===re}function kv(E){var j;const re=Number(E?.width);if(Number.isFinite(re)&&re>0)return re;const ae=Number((j=E?.metrics)==null?void 0:j.width);return Number.isFinite(ae)&&ae>0?ae:null}function F6(E){var j;return E.sessionKey===wo()&&!!rv(E.threadKey)&&((j=E.measurementKey)!=null?j:"")===Ol()&&!!N6(kv(E))&&!!(function(re){const ae=re.heightCache;return!!ae?.length&&(R6(re)?ae.some(be=>!!(be.nodeType||be.signature)):ae.some(be=>!!be.signature))})(E)}function R6(E){return!!(E.contentHash&&E.contentHash===gv())}function OF(E){return!R6(E)}let _u=null,xu=null,C0=null,$f=null,Nf=null;function bv(E){var j;const re=E.map(be=>{var Ne,De;return[be.index,Math.round(10*be.height),(Ne=be.nodeType)!=null?Ne:"",(De=be.signature)!=null?De:""].join("")}).join(""),ae=a1(bu());return[(j=ns())!=null?j:"",wo(),Ol(),At.value.length,ae,E.length,pv(re)].join(":")}function O6(E=(j=>(j=o.virtualScroll)==null?void 0:j.heightCache)()){if(!Ct.value||!E?.length||At.value.length<=0||!N6((j=o.virtualScroll)==null?void 0:j.heightCacheWidth))return!1;var j;const re=$6(E,{requireSignature:!0});if(!re.length)return!1;const ae=bv(re);return ae===_u?(xu="standalone",!0):(r6(re,{mode:"merge"}),Ot(),_u=ae,xu="standalone",Df(),mo("restore"),!0)}function Cv(E,j={}){var re,ae,be;if(!Ct.value||!E||E.sessionKey!==wo()||!rv(E.threadKey)||At.value.length<=0)return!1;const Ne=!!((re=E.heightCache)!=null&&re.length)&&!w0(),De=!E.anchor||E.anchorCaptured===!1&&j.allowUncapturedAnchor!==!0?null:E.anchor,ze=j.restoreAnchor===!0&&!!De&&!w0()&&Number(kv(E))>0;let ot=!1;if((ae=E.heightCache)!=null&&ae.length&&F6(E)){const Xe=$6(E.heightCache,{requireCompatibilityMetadata:!E.contentHash,requireSignature:OF(E)});Xe.length&&(r6(Xe,{mode:"merge"}),Ot(),_u=bv(Xe),xu="restore",Df(),ot=!0)}if(Ne||ze)return!1;if(!j.restoreAnchor||!De)return ot&&mo("restore"),!0;const We=(function(Xe,nt){var Be;const Je=Xe.anchor,lt=Je?Je.type==="bottom"?`bottom:${Math.round(Je.distanceFromBottomPx)}`:`node:${Je.nodeIndex}:${Math.round(Je.offsetWithinNodePx)}`:"none";return[(Be=ns())!=null?Be:"",wo(),Ol(),y0.value,nt,lt].join(":")})(E,(be=j.restoreToken)!=null?be:"imperative");return C0===We?(ot&&mo("restore"),!0):(C0=We,(function(Xe){const nt=()=>{if(Xe.type==="node")return Uc(),void Rc({nodeIndex:Xe.nodeIndex,offsetWithinNodePx:Xe.offsetWithinNodePx});if(Nc(),Ns.value=null,Pt.value=Xe,L6(),vv(Xe),G)for(const Be of[0,120,280,480])yv.push(window.setTimeout(()=>{const Je=Pt.value;Je&&vv(Je)},Be))};(function(Be){if(!sn.value)return!1;const Je=At.value.length;return!(Je<=0||(Fl.value=Be.type==="node"?Os(Be.nodeIndex,0,Je-1):Je-1,Tf(),0))})(Xe)?yt(nt):nt()})(De),mo("restore"),!0)}function w0(){const E=bu();return Number.isFinite(E)&&E>0}function P6(E){var j;return E.sessionKey===wo()&&!!rv(E.threadKey)&&(At.value.length<=0||!(!((j=E.heightCache)!=null&&j.length)||w0())||!(!(E.anchor&&Number(kv(E))>0)||w0()))}function wv(){qo.clear();for(const E of Object.keys(Nl)){const j=Number(E);Number.isInteger(j)&&j>=0&&j{let j=!1,re=null;const ae=()=>{j||(j=!0,re!=null&&window.clearTimeout(re),E())};if(jo)return jo(ae),void(re=window.setTimeout(ae,50));re=window.setTimeout(ae,0)})}function _v(E,j=ns(),re=Yi.value){return wo()===E&&ns()===j&&Yi.value===re}function xv(){return vo(this,arguments,function*(E={}){var j,re,ae,be,Ne;const De=wo(),ze=ns(),ot=Yi.value,We=(j=E.frames)!=null?j:2,Xe=(re=E.timeoutMs)!=null?re:120,nt=(ae=E.reason)!=null?ae:"manual",Be=E.expectedSettledTokenKey,Je=E.flushPendingTimers===!0,lt=Cu(nt),rt=()=>rn(mt({},lt),{phase:lt.final?"settling":lt.phase,stable:!1,confidence:lt.confidence==="final"?"mixed":lt.confidence,reason:nt}),wt=()=>_v(De,ze,ot)&&(Be==null||Pf()===Be);for(let qt=0;qtwindow.setTimeout(Ut,qt))})(Xe),!wt()||(Je&&p6(),Pl(),Ff(),!wt()))return rt();const dt=dv();dt&&(cv=De,uv=ze,((be=o.virtualScroll)==null?void 0:be.settleMode)==="manual"&&Be!=null&&k0((Ne=o.virtualScroll)==null?void 0:Ne.settledToken)&&Pf()===Be&&(zc=Uf(o.virtualScroll.settledToken)));const Nt=wt()&&dt&&T6(),Dt=Cu(nt,Nt?"final":void 0);return Ev(Dt,!0),Dt})}let Sv="content",Su=null,Au=null,Av=0,Rf=null,Vc=null,Mv=null,Tv=null;function Of(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function B6(E){var j,re;const ae=Rf;if(!ae)return!0;const be=(re=(j=o.virtualScroll)==null?void 0:j.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 Pf(E=(j=>(j=o.virtualScroll)==null?void 0:j.settledToken)()){return xs(E)}function H6(E,j){var re,ae;return[E,j.sessionKey,(re=j.threadKey)!=null?re:"",Ol(),gv(),xs((ae=o.virtualScroll)==null?void 0:ae.settledToken),Math.round(j.totalHeight),Math.round(j.width)].join("\0")}function Df(){Mv=null,Tv=null,Vc=null}function PF(E){const j=E.heightCache;return j?.length?bv(j):""}function Bf(E){var j,re,ae;const be=E.metrics,Ne=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,(j=E.threadKey)!=null?j:"",(re=E.measurementKey)!=null?re:Ol(),(ae=E.contentHash)!=null?ae:"",PF(E),Ne,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 Ev(E,j=!1){if(!Ct.value||(function(De=!1){return!De&&co.value&&!en.value})(j))return;const re=j||B6(E),ae=(function(De,ze=!1){return ze||De.stable||De.phase==="final"?{state:Wc(De,{includeHeightCache:!0})}:{state:Wc(De)}})(E,j),be=ae.state,Ne=!!(be&&(re||(function(De,ze=!1){return!!ze||Bf(De)!==Vc})(be,j)));if(re&&(L(E),Rf=E,Av=Of()),be&&Ne&&(B(be),be.anchor&&H(be.anchor),Vc=Bf(be)),E.stable){const De=H6("settled",E);if(De!==Mv){Mv=De;const ze=Wc(E,{includeHeightCache:!0});ze&&(B(ze),Vc=Bf(ze)),(function(ot){s("render-settled",ot)})(E)}}if(E.phase==="final"){const De=H6("final",E);if(De!==Tv){Tv=De;const ze=Wc(E,{includeHeightCache:!0});ze&&(B(ze),Vc=Bf(ze)),(function(ot){s("render-final",ot)})(E)}}}function Iv(){Su!=null&&(Vo?.(Su),Su=null),Au!=null&&G&&(window.clearTimeout(Au),Au=null)}function z6(){Su=null,Au=null,(function(E){if(Rl.size>0||Gi!=null)return!0;switch(E){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(Sv)&&(Pl(),Ff()),Ev(Cu(Sv))}function mo(E){var j,re;if(!Ct.value||(Sv=E,Su!=null||Au!=null))return;const ae=Math.max(0,(re=(j=o.virtualScroll)==null?void 0:j.emitIntervalMs)!=null?re:32),be=Math.max(0,ae-(Of()-Av)),Ne=()=>{Au=null,Su=jo?jo(z6):null,Su==null&&z6()};G&&be>0?Au=window.setTimeout(Ne,be):Ne()}function W6(){He.value+=1}function _0(E){if(gt.value&&E>=Le.value){const j=At.value[E],re=Fe.value===!0&&Oe.value!==!0&&E>=At.value.length-2,ae=j?.type==="code_block"||j?.type==="image"||j?.type==="mermaid"||j?.type==="infographic";if(!re||ae)return!1}return!nl.value||E=pe.value&&(q.value||(q.value=!0,Q2()),!l6.value||!Ys))return qc(E),void(j&&ha(E,!0));if(E{if(h6.delete(Ne),!nl.value||J2.value.has(Ne))return;const ot=fo.get(Ne);if(!ot)return;const We=ue(ot),Xe=ot.ownerDocument||document,nt=Xe.defaultView||window,Be=!We||We===Xe.documentElement||We===Xe.body,Je=!Be&&We?Kt("nodeVisibilityFallback.root.getBoundingClientRect",()=>We.getBoundingClientRect()):null,lt=Be?0:Je.top,rt=Be?Kt("nodeVisibilityFallback.clientHeight",()=>{var dt,Nt;return(Nt=(dt=nt.innerHeight)!=null?dt:We?.clientHeight)!=null?Nt:0}):Je.bottom,wt=Kt("nodeVisibilityFallback.node.getBoundingClientRect",()=>ot.getBoundingClientRect());wt.bottom>=lt-500&&wt.top<=rt+500&&ha(Ne,!0)},1800+De);h6.set(Ne,ze)})(E);let be=null;be=et(()=>ae.isVisible.value,Ne=>{if(Ne){g0(E),ha(E,!0),be?.(),m0.delete(E),Pc.get(E)===ae&&Pc.delete(E);try{ae.destroy()}catch{}}},{immediate:!0}),m0.set(E,be),sn.value&&Lr()}function Lv(){Gi=null,an(()=>{let E=!1;for(const[j,re]of Rl)Rl.delete(j),ol.get(j)===re.el&&ku.get(j)===re.version&&(E=yu(j,re.height,{allowShrink:re.allowShrink})||E);return E})}function Kc(){Gi!=null&&(Vo?.(Gi),Gi=null),Rl.clear()}function S0(E,j){(function(re,ae,be){var Ne;if(!Number.isFinite(be)||be<=0||ol.get(re)!==ae)return;const De=ku.get(re);if(De==null)return;const ze=At.value[re],ot=ft.value&&Oe.value!==!0&&!((Ne=o.nodes)!=null&&Ne.length)&&re>=At.value.length-2,We=!(ze?.loading===!0||ot),Xe=Rl.get(re),nt=Xe?Xe.allowShrink&&We:We,Be=Xe&&!nt?Math.max(Xe.height,be):be;Rl.set(re,{height:Be,allowShrink:nt,version:De,el:ae}),Gi==null&&(Gi=jo?jo(Lv):null,Gi==null&&Lv())})(E,j,Mf(E,j))}function Pl(){for(const[E,j]of ol)j&&S0(E,j)}function U6(){ci?.disconnect(),ci=null,Ki.clear()}function $v(){for(;d0.length;)h0(d0.pop())}et(en,E=>{E&&mo("content")},{flush:"post"}),t({getVirtualMetrics:Cu,captureVirtualState:function(E={}){var j;return Wc(Cu("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:E.allowFallbackAnchor===!0,requireViewport:E.requireViewport===!0,includeEmptyState:(j=E.includeEmptyState)==null||j})},restoreVirtualState:function(E,j={}){const re=j.restoreAnchor===!0,ae=j.restoreToken==null?"imperative":String(j.restoreToken);$f=E,Nf={restoreAnchor:re,restoreToken:ae,allowUncapturedAnchor:j.allowUncapturedAnchor===!0},!Cv(E,{restoreAnchor:re,restoreToken:ae,allowUncapturedAnchor:j.allowUncapturedAnchor===!0})&&P6(E)||($f=null,Nf=null)},forceMeasure:function(E="manual"){return vo(this,null,function*(){yield yt(),yield D6(),Pl(),Ff(),yield yt();const j=Cu(E);return Ev(j,!0),j})},settle:xv,scrollToNode:function(E,j="start"){Uc(),Nc();const re=At.value.length;if(re<=0)return;const ae=Os(E,0,re-1),be=()=>{var Ne;const De=V2({nodeIndex:ae,offsetWithinNodePx:0}),ze=Zn(ae),ot=If(),We=(Ne=ot?.clientHeight)!=null?Ne:0,Xe=Js();let nt=De;if(j==="center")nt=De-We/2+ze/2;else if(j==="end")nt=De-We+ze;else if(j==="nearest"&&Xe!=null){if(De>=Xe&&De+ze<=Xe+We)return;nt=Dews.value,E=>{if(!E){U6();for(const j of fa.values())for(const re of j)h0(re);fa.clear(),ku.clear(),$v(),Kc()}},{immediate:!0}),et(Oe,E=>{E&&(function(){if(G&&Oe.value&&ol.size){$v();for(const j of[80,240,640]){const re=f6(j,()=>{for(const[ae,be]of ol)be&&S0(ae,be)},"final");re!=null&&d0.push(re)}}})(),mo(E?"final":"content")});const DF=b_(()=>mo("content"),16),BF=b_(()=>mo("batch"),16);et([()=>At.value.length,()=>Le.value],()=>{Pt.value&&jc(),DF()},{flush:"post",immediate:!0}),et([()=>Rs.start,()=>Rs.end],()=>{BF()},{flush:"post"});const{cleanupBatchScheduler:HF}=(function(E){const{props:j,isClient:re,isTestEnv:ae,parsedNodesIdentity:be,parsedNodeCount:Ne,desiredRenderedCount:De,datasetKey:ze,batchingEnabled:ot,incrementalRenderingActive:We,resolvedBatchSize:Xe,resolvedInitialBatch:nt,renderedCount:Be,adaptiveBatchSize:Je,previousRenderContext:lt,previousBatchConfig:rt,requestFrame:wt,cancelFrame:dt,hasIdleCallback:Nt,cleanupNodeVisibility:Dt,onDatasetKeyChanged:qt,onDatasetChanged:Ut}=E;let Zt=null,pn="raf",vn=null,Jn=0,Ps=!1,_s=!1;const $r=new Set,il=new Set;function Zf(){if(re){Zt!=null&&(pn==="raf"&&dt?dt(Zt):pn==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(Zt):pn==="timeout"&&window.clearTimeout(Zt),Zt=null),Jn+=1;for(const Qs of $r)dt&&dt(Qs);for(const Qs of il)window.clearTimeout(Qs);$r.clear(),il.clear(),vn=null,Ps=!1,_s=!1}}function F0(){return typeof performance<"u"?performance.now():Date.now()}function l7(Qs){(function(Dl){var ga;if(!We.value)return;const Bl=Math.max(2,(ga=j.renderBatchBudgetMs)!=null?ga:6),Hl=Math.max(1,Xe.value||1),Nr=Math.max(1,Math.floor(Hl/4));Dl>1.5*Bl?Je.value=Math.max(Nr,Math.floor(.8*Je.value)):Dl<.6*Bl&&Je.value=Bl)return;const Hl=Math.max(1,Qs),Nr=()=>{const Yc=F0();Zt=null;const Gf=vn??Hl;vn=null;const Xc=F0();Be.value=Math.min(Bl,Be.value+Gf),Dt(Be.value),(function(Bv,R0){if(!re)return void l7(R0);Ps=!0;const d7=++Jn;yt().then(()=>{var f7;if(d7!==Jn)return;const lR=F0(),aR=Math.max(R0,lR-Bv),p7=()=>{d7===Jn&&l7(aR)};if(wt){let Tu=null,Jc=null,m7=!1;const g7=()=>{m7||(m7=!0,Tu!==null&&($r.delete(Tu),Tu=null),Jc!==null&&(il.delete(Jc),window.clearTimeout(Jc),Jc=null),p7())};return Tu=wt(()=>{g7()}),$r.add(Tu),Jc=window.setTimeout(()=>{Tu!==null&&dt&&dt(Tu),g7()},Math.max(32,(f7=j.renderBatchIdleTimeoutMs)!=null?f7:120)),void il.add(Jc)}const h7=window.setTimeout(()=>{il.delete(h7),p7()},0);il.add(h7)})})(Yc,F0()-Xc)};if(!re||Ei.immediate)return void Nr();const va=Math.max(0,(Dl=j.renderBatchDelay)!=null?Dl:16);if(vn=vn!=null?Math.max(vn,Hl):Hl,Zt==null){if(!ae&&Nt&&window.requestIdleCallback){const Yc=Math.max(0,(ga=j.renderBatchIdleTimeoutMs)!=null?ga:120);return pn="idle",void(Zt=window.requestIdleCallback(()=>Nr(),{timeout:Yc}))}if(wt&&!ae)return pn="raf",void(Zt=wt(()=>{va===0?Nr():(pn="timeout",Zt=window.setTimeout(()=>Nr(),va))}));pn="timeout",Zt=window.setTimeout(()=>Nr(),va)}}function u7(Qs,Ei={}){Ps?_s=!0:Qs==null?c7():a7(Qs,Ei)}function c7(){We.value&&a7(ot.value?Math.max(1,Math.round(Je.value)):Math.max(1,Xe.value))}return et([be,Ne,ze,We,Xe,nt,()=>j.renderBatchDelay],()=>{var Qs;const Ei=Ne.value,Dl=lt.value,ga=ze.value,Bl=!Object.is(ga,Dl.key),Hl=Ei!==Dl.total,Nr=Bl||Hl;lt.value={key:ga,total:Ei};const va=rt.value,Yc=(Qs=j.renderBatchDelay)!=null?Qs:16,Gf=va.batchSize!==Xe.value||va.initial!==nt.value||va.delay!==Yc||va.enabled!==We.value;rt.value={batchSize:Xe.value,initial:nt.value,delay:Yc,enabled:We.value},Bl&&qt(Ei),(Nr||Gf||!We.value)&&Zf(),(Nr||Gf)&&(Je.value=Math.max(1,Xe.value||1)),Nr&&Ut();const Xc=De.value;if(!Ei)return Be.value=0,void Dt(0);if(!We.value)return Be.value=Xc,void Dt(Be.value);const Bv=Bl||Dl.total===0;Be.value=Bv||Gf?Math.min(Xc,nt.value):Math.min(Be.value,Xc);const R0=Math.max(1,nt.value||Xe.value||Ei);Be.value{We.value&&(typeof Ei=="number"&&Qs<=Ei||Qs>Be.value&&u7())}),{cleanupBatchScheduler:Zf}})({props:T,isClient:G,isTestEnv:cr,parsedNodesIdentity:ai,parsedNodeCount:Tn,desiredRenderedCount:f0,datasetKey:EF,batchingEnabled:qi,incrementalRenderingActive:gt,resolvedBatchSize:ho,resolvedInitialBatch:ko,renderedCount:Le,adaptiveBatchSize:Xt,previousRenderContext:Ge,previousBatchConfig:hs,requestFrame:jo,cancelFrame:Vo,hasIdleCallback:Il,cleanupNodeVisibility:_F,onDatasetKeyChanged:E=>{Kc(),io(),Ot(),Df(),E>0&&Oc(E)},onDatasetChanged:()=>{sn.value&&Lr({immediate:!0})}});et([a6,sn,()=>O.value,()=>oe()],([E,j])=>{if(!E)return m6(),void X2();xF(),j?Lr({immediate:!0}):X2()},{flush:"post",immediate:!0}),et([()=>At.value.length,()=>sn.value],E=>vo(null,[E],function*([j,re]){re&&j&&G&&(yield yt(),Lr({immediate:!0}))}),{flush:"post"}),et(yn,E=>{E&&(function(){var j;if(no.value&&Ks.value&&ps.value&&((j=ui.value)!=null&&j[1]))return;const re=kt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ae=kt({type:"list_item",children:[re],raw:"- Probe paragraph text"}),be=kt({type:"list",ordered:!1,items:[ae],raw:"- Probe paragraph text"});no.value=re,Ks.value=ae,ps.value=be;const Ne={1:null,2:null,3:null,4:null,5:null,6:null};for(let De=1;De<=6;De++)Ne[De]=kt({type:"heading",level:De,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(De)} Probe heading`});ui.value=Ne})()},{immediate:!0}),et([()=>O.value,yn],()=>{if(!yn.value)return nv(),void(ne.value=0);v6(),nv(),yn.value&&O.value&&typeof ResizeObserver<"u"&&(Ef=new ResizeObserver(()=>{v6(),Ns.value&&vu(),Pt.value&&jc(),mo("resize")}),Ef.observe(O.value))},{immediate:!0}),et([yn,Zs,Yi],()=>vo(null,null,function*(){if(!yn.value)return Y.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Ot();yield yt(),(function(){if(!yn.value||typeof window>"u")return Y.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Ot();const E={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},j=g6(tv(F.value),".paragraph-node");E.paragraph=i4(F.value,j,"pre-wrap");const re=tv(W.value),ae=re?.querySelector(".paragraph-node");E.listItem=i4(W.value,ae,"pre-wrap");const be=Kt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var De,ze;return(ze=(De=z.value)==null?void 0:De.offsetHeight)!=null?ze:0}),Ne=Kt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var De,ze;return(ze=(De=W.value)==null?void 0:De.offsetHeight)!=null?ze:0});E.listWrapperOverhead=Math.max(0,be-Ne);for(let De=1;De<=6;De++){const ze=g6(tv(U[De]),`h${De}`);E.headings[De]=i4(U[De],ze,"pre-wrap")}Y.value=E,Ot()})()}),{flush:"post",immediate:!0}),et(()=>At.value.length,()=>{sn.value&&Lr({immediate:!0})}),et([yn,ne],()=>{Ot(),sn.value&&Lr({immediate:!0}),Ns.value&&vu(),Pt.value&&jc(),mo("resize")},{immediate:!1}),et(()=>nl.value,E=>{if(E)for(const[j,re]of fo)x0(j,re);else if(Q2(),sn.value)Lr({immediate:!0});else for(const[j,re]of fo)re&&ha(j,!0)},{immediate:!1}),et([he,pe,()=>oe()],()=>{var E;(E=Ys.refresh)==null||E.call(Ys);for(const[j,re]of fo)x0(j,re)},{immediate:!1}),et([()=>T.viewportPriority,()=>At.value.length,pe],([E,j,re])=>{if(E!==!1){if(q.value&&(j<=200||j<=re)){q.value=!1;for(const[ae,be]of fo)x0(ae,be)}}else q.value=!1}),et(()=>Le.value,()=>{sn.value&&Lr({immediate:!0})}),et([Fl,Lo,Wo,()=>At.value.length,sn],()=>{Tf()},{immediate:!0});let Hf=null,zf=!1,Zc=null;function Wf(){Hf=null,cv=null,uv=void 0,zc=null,Df()}function Nv(){Kc(),io(),Ot(),qo.clear();const E=At.value.length;E>0&&Oc(E),wv()}function Fv(){Iv(),p6(),Rf=null,_u=null,xu=null,C0=null,$f=null,Nf=null,zf=!1,Wf(),A6("restore"),Nc(),Uc()}function Uf(E){var j;return[(j=ns())!=null?j:"",wo(),Ol(),y0.value,Pf(E),At.value.length,Math.round(bo(0,At.value.length)),Math.round(bu()),fi.count,Math.round(fi.total)].join(":")}function j6(){return vo(this,null,function*(){var E,j,re,ae;const be=(E=o.virtualScroll)==null?void 0:E.settledToken,Ne=Pf(be),De=wo(),ze=ns(),ot=Yi.value;if(Ct.value&&((j=o.virtualScroll)==null?void 0:j.settleMode)==="manual"&&k0(be))if(dv()){if(Uf(be)!==zc&&!zf){zf=!0;try{const We=yield xv({reason:"manual",expectedSettledTokenKey:Ne}),Xe=Pf()===Ne;_v(De,ze,ot)&&We.sessionKey===De&&We.threadKey===ze&&Xe&&We.stable&&We.phase==="final"&&(zc=Uf((re=o.virtualScroll)==null?void 0:re.settledToken))}finally{zf=!1,yield yt();const We=(ae=o.virtualScroll)==null?void 0:ae.settledToken,Xe=k0(We)?Uf(We):"";_v(De,ze,ot)&&Xe&&zc!==Xe&&j6()}}}else mo("manual")})}et(Ct,(E,j)=>{if(E!==j){if(!E)return Fv(),void Iv();Fv(),Nv(),Zc=Yi.value,mo("content")}},{flush:"post"}),et([Ct,Yi],([E,j])=>{E?Zc!=null?Zc!==j&&(Zc=j,(function(re="resize"){Kc(),io(),Ot(),qo.clear();const ae=At.value.length;ae>0&&Oc(ae),wv(),_u=null,xu=null,C0=null,Rf=null,zf=!1,Wf(),O6(),yt(()=>{Pl(),Ns.value&&vu(),Pt.value&&jc(),mo(re)})})("resize")):Zc=j:Zc=null},{flush:"post",immediate:!0}),et([Ct,()=>wo(),()=>ns()],([E])=>{E&&(Fv(),Nv(),A6("content"),mo("content"))}),et([Ct,()=>wo(),()=>ns(),Yi,()=>At.value.length],([E])=>{E&&(function(j="async-node"){let re=!1;for(const[ae,be]of Array.from(sl.entries()))lv(be)||(sl.delete(ae),Zi.delete(ae),re=!0);re&&(Bc(),mo(j))})("async-node")},{flush:"post"}),et([Ct,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.sessionKey},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>o.indexKey,()=>ie.value],([E])=>{E&&(Df(),(function(j="content"){if(!Ct.value)return;const re=[],ae=At.value.length,be=ev(ae);for(const Ne of Array.from(qo.keys())){if(Ne>=ae){re.push(Ne);continue}if(Ne=ae&&qo.delete(Ne);re.length&&((function(Ne,De={}){const ze=Array.from(Ne,Number);Jt(ze);let ot=0;if(an(()=>(ot=Z2(ze,De),ot>0)),ot>0)(function(We){for(const Xe of We)qo.delete(Xe)})(ze);else for(const We of ze)J.delete(We)})(re,{notify:!1}),Ot(),Wf(),Ns.value&&vu(),Pt.value&&jc(),mo(j))})("content"))},{flush:"post",immediate:!0}),et([Ct,()=>At.value.length,()=>wo(),()=>ns()],([E,j,re,ae],[be,Ne,De,ze])=>{E&&be&&re===De&&ae===ze&&j!==Ne&&Wf()},{flush:"post"}),et([Ct,()=>{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},()=>At.value.length,()=>wo(),ne],()=>{O6()},{flush:"post",immediate:!0}),et([Ct,()=>{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},()=>At.value.length,()=>wo(),ne],E=>vo(null,[E],function*([j,re]){if(!j||!re)return;yield yt();const ae=(function(){var be;const Ne=(be=o.virtualScroll)==null?void 0:be.restoreAnchor;return Ne==null||Ne===!1?null:Ne===!0?"true":String(Ne)})();Cv(re,{restoreAnchor:ae!=null,restoreToken:ae??void 0})}),{flush:"post",immediate:!0}),et([Ct,ne,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey}],([E])=>{var j;if(!E)return;const re=(j=o.virtualScroll)==null?void 0:j.restoreState;re&&_u&&xu==="restore"&&(F6(re)||(Nv(),_u=null,xu=null,mo("resize")))},{flush:"post"}),et([Ct,()=>At.value.length,()=>wo(),ne],E=>vo(null,[E],function*([j]){var re;const ae=$f,be=Nf;j&&ae&&(yield yt(),!Cv(ae,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(re=be?.restoreToken)!=null?re:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&P6(ae)||($f=null,Nf=null))}),{flush:"post",immediate:!0}),et([Ct,Oe,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>wo(),()=>ns(),Yi,Y2,c6,()=>Le.value,f0,()=>fi.count,()=>fi.total],([E,j,re])=>{if(!E||j!==!0||re==="manual"||!fv())return;const ae=(function(){var be;const Ne=At.value.length;return[(be=ns())!=null?be:"",wo(),Ol(),y0.value,Ne,Math.round(bo(0,Ne)),Math.round(bu()),fi.count,Math.round(fi.total)].join(":")})();Hf!==ae&&(Hf=ae,xv({reason:"final"}).then(be=>{be.stable||Hf!==ae||(Hf=null)}))},{flush:"post",immediate:!0}),et([Ct,Oe,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settledToken},()=>wo(),()=>ns(),Yi,Y2,c6,()=>Le.value,f0,()=>At.value.length,()=>fi.count,()=>fi.total],()=>{j6()},{flush:"post",immediate:!0}),et([()=>At.value.length,sn,Lo,Wo,()=>Rs.start,()=>Rs.end],([E,j,re,ae,be,Ne])=>{fe.value&&zt("virtualization",{nodes:E,virtualization:j,maxLiveNodes:re,buffer:ae,focusIndex:Fl.value,scroll:j?(()=>{const De=ut.value||ue();return De?{reverse:Se(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:be,end:Ne},rendered:Le.value})}),et([()=>T.customId],([E],j,re)=>{if(!E||$s)return;const ae=(function(be,Ne){return be?(gs.controllers[be]=Ne,()=>{gs.controllers[be]===Ne&&delete gs.controllers[be]}):()=>{}})(E,{captureRestoreAnchor:Fc,restoreAnchor:Rc,getAnchorDrift:q2,getReport:MF});re(()=>{ae()})},{immediate:!0}),Un(()=>{(function(){if(Ct.value)try{Pl(),Ff();const E=Cu("manual");B6(E)&&(L(E),Rf=E,Av=Of());const j=Wc(E,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});j&&(B(j),j.anchor&&H(j.anchor),Vc=Bf(j))}catch{}})(),HF(),Q2(),Ke(),U6();for(const E of fa.values())for(const j of E)h0(j);fa.clear(),ku.clear(),qo.clear(),$v(),Kc(),nv(),Nc(),Uc(),Iv(),m6(),X2()});const zF=S1("ViewportDeferredMermaidBlockNode",zr({loader:()=>vo(null,null,function*(){try{return(yield Go(()=>import("./index11-DvlSNaLO.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),Ri}}),loadingComponent:F_,delay:0}),F_),WF=S1("ViewportDeferredInfographicBlockNode",zr({loader:()=>vo(null,null,function*(){try{return(yield Go(()=>import("./index10-BZ-Q5Z-w.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),Ri}}),loadingComponent:N_,delay:0}),N_),UF=S1("ViewportDeferredD2BlockNode",zr(()=>vo(null,null,function*(){try{return(yield Go(()=>import("./index8-BwJHsPMm.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),Ri}})),Ri),V6={text:Xo,paragraph:ac,heading:I2,code_block:G9,list:Kd,list_item:qd,blockquote:Qh,table:ep,definition_list:em,footnote:tm,footnote_reference:tr,footnote_anchor:J1,admonition:im,vmr_container:om,hardbreak:qa,link:Si,image:Va,thematic_break:nm,math_inline:Jr,math_block:PL,strong:_i,emphasis:Ai,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,checkbox:er,checkbox_input:er,inline_code:ii,html_inline:nr,reference:wi,html_block:Q1},jF=R(()=>iv()),q6=R(()=>y_(T.codeBlockProps)),VF=R(()=>y_(T.codeBlockProps,{omit:["langs"]})),K6=R(()=>mt(mt({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,monacoOptions:T.codeBlockMonacoOptions,themes:T.themes,langs:g.value==="shiki"?T.langs:void 0,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{}),VF.value)),Z6=R(()=>mt(rn(mt({},K6.value),{langs:T.langs}),q6.value));function G6(E){return typeof E=="boolean"?E:void 0}const qF=R(()=>{const E=T.codeBlockProps||{},j={},re=G6(E.showLineNumbers);re!==void 0&&(j.showLineNumbers=re);const ae=G6(E.diffInline);ae!==void 0&&(j.diffInline=ae);const be=(function(Ne){const De=Number(Ne);return Number.isFinite(De)&&De>0?De:void 0})(E.reservedHeightPx);return be!==void 0&&(j.reservedHeightPx=be),j}),KF=R(()=>mt(mt({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,themes:T.themes,langs:T.langs,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{}),q6.value)),ZF=R(()=>mt({},T.mermaidProps||{})),Y6=R(()=>mt({},T.d2Props||{})),GF=R(()=>mt({},T.infographicProps||{})),jf=R(()=>({typewriter:f.value,fade:T.fade,customHtmlTags:po.value.customHtmlTags})),YF=R(()=>mt(mt({},jf.value),typeof Ce.value=="boolean"?{showTooltip:Ce.value}:{})),XF=R(()=>mt(mt({},jf.value),typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{})),JF=R(()=>mt(mt({},jf.value),typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{})),QF=R(()=>mt(mt({},jf.value),typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{}));function eR(E){return Array.isArray(E.children)&&E.children.length>0}const A0=R(()=>AF.value.map(E=>{var j,re,ae,be,Ne,De,ze,ot;let We=(function(dt){var Nt,Dt,qt,Ut,Zt,pn,vn;if(dt.type!=="code_block")return dt;const Jn=dt,Ps=[String((Nt=Jn.language)!=null?Nt:""),String((Dt=Jn.loading)!=null?Dt:""),String((qt=Jn.diff)!=null?qt:""),String((Ut=Jn.code)!=null?Ut:""),String((Zt=Jn.originalCode)!=null?Zt:""),String((pn=Jn.updatedCode)!=null?pn:""),String((vn=Jn.raw)!=null?vn:"")].join("\0"),_s=$l.get(Jn);if(_s&&_s.signature===Ps)return _s.node;const $r=mt({},Jn);return $l.set(Jn,{signature:Ps,node:$r}),$r})(E.node);const Xe=M0(We);let nt=e7(We,Xe);if((We.type==="html_block"||We.type==="html_inline")&&nt===V6[We.type]){const dt=We,Nt=String((j=dt.tag)!=null?j:"").trim().toLowerCase()||cI(dt.content);if(Nt){const Dt=bn.value[Nt];if(Do.value.has(Nt)&&Dt)nt=Dt,We=rn(mt({},dt),{type:Nt,tag:Nt,content:Lte(dt.content,Nt)});else if(dI((re=dt.content)!=null?re:dt.raw,Nt)){const qt=String((be=(ae=dt.content)!=null?ae:dt.raw)!=null?be:"");We.type==="html_inline"?(nt=Xo,We={type:"text",content:qt,raw:qt}):(nt=ac,We={type:"paragraph",children:[{type:"text",content:qt,raw:qt}],raw:qt})}}}const Be=We.type==="code_block"&&g.value==="pre"&&nt===Ri&&!Rv(bn.value,Xe);let Je=mt({},(function(dt,Nt,Dt){const qt=Nt??M0(dt);if(dt.type==="code_block"){const Ut=qt?Rv(bn.value,qt):void 0;if(Dt&&g.value==="pre"&&!Ut&&Dt===Ri)return qF.value;if(Dt&&qt&&Dt===Ut)return qt==="mermaid"?J6(dt):qt==="infographic"?Q6(dt):qt==="d2"||qt==="d2lang"?Y6.value:Z6.value;if(Dt&&Dt===bn.value.code_block)return Z6.value;if(k6(Dt))return KF.value}return qt==="mermaid"?J6(dt):qt==="infographic"?Q6(dt):qt==="d2"||qt==="d2lang"?Y6.value:dt.type==="link"?YF.value:dt.type==="list"?XF.value:dt.type==="blockquote"?JF.value:dt.type==="table"?QF.value:dt.type==="code_block"?K6.value:jf.value})(We,Xe,nt));const lt=yn.value?Dc.value[E.index]:null;We.type==="code_block"&<?.kind==="code-block"&&(Je=rn(mt({},Je),Be?{reservedHeightPx:(Ne=lt.height)!=null?Ne:lt.contentHeight}:{estimatedHeightPx:lt.height,estimatedContentHeightPx:lt.contentHeight,estimatedDiffInline:lt.diffInline})),Be||We.type!=="code_block"||Xe!=="mermaid"||Td(Je.estimatedPreviewHeightPx)!=null||(Je=rn(mt({},Je),{estimatedPreviewHeightPx:sg(ng(String((De=We.code)!=null?De:"")))})),Be||We.type!=="code_block"||Xe!=="infographic"||Td(Je.estimatedPreviewHeightPx)!=null||(Je=rn(mt({},Je),{estimatedPreviewHeightPx:ig(og(String((ze=We.code)!=null?ze:"")))})),We.type==="math_block"&&(Je=rn(mt({},Je),{cacheScope:Mn}));const rt=(function(dt,Nt){const Dt=String(dt.type);return!Yp(Dt)&&bn.value[Dt]===Nt})(We,nt),wt=rt?c5(We,ge.value):void 0;return rn(mt({},E),{node:We,component:nt,bindings:Je,customBindings:mt(mt({},wt??{}),Je),rendersCustomNode:rt,hasSlotChildren:eR(We),slotContent:String((ot=We.content)!=null?ot:""),isCodeBlock:We.type==="code_block",indexKey:`${jF.value}-${E.index}`,vnodeKey:`${TF.value}\0${E.index}\0${We.type}`})}));function M0(E){var j;return E?.type==="code_block"?String((j=E.language)!=null?j:"").trim().toLowerCase():""}function Rv(E,j){const re=j.trim().toLowerCase();if(re)for(const ae of[re,M2(re),yL(re)]){const be=ae&&E[ae];if(be)return be}}function X6(E,j,re,ae){var be,Ne;const De=mt({},E.value);return Td(De.estimatedPreviewHeightPx)==null&&(De.estimatedPreviewHeightPx=ae(re(String((be=j?.code)!=null?be:"")),void 0,De.maxHeight==="none"?null:(Ne=Td(De.maxHeight))!=null?Ne:void 0)),De}function J6(E){return X6(ZF,E,ng,sg)}function Q6(E){return X6(GF,E,og,ig)}function e7(E,j){if(!E)return q3;const re=bn.value,ae=re[String(E.type)];if(E.type==="code_block"){const be=j??M0(E),Ne=be?Rv(re,be):void 0;return Ne||(g.value==="pre"?re.code_block||Ri:be==="mermaid"?re.mermaid||zF:be==="infographic"?re.infographic||WF:be==="d2"||be==="d2lang"?re.d2||UF:ae||re.code_block||b6.value)}return ae||V6[String(E.type)]||q3}function Ov(E){s("click",E)}function tR(E){var j;(j=E.target)!=null&&j.closest("[data-node-index]")&&s("mouseover",E)}function nR(E){var j;(j=E.target)!=null&&j.closest("[data-node-index]")&&s("mouseout",E)}function t7(E){s("mouseover",E)}function n7(E){s("mouseout",E)}const Mu=Z(null),Ti=Z(!1),Vf=Z(null),oR=R(()=>!(T.domMode!=="minimal"||X.value||T.fade!==!1||f.value||Ti.value||ts.value||sn.value||Qe.value||uo.value||Vi.value||Object.keys(bn.value).length!==0));let qf,Gc=null,Pv=0,T0=0,E0=0;const o7=["code_block","admonition","table","math_block","html_block","image","thematic_break"],sR=new Set(o7),s7=[".typewriter-cursor",".height-estimation-probes",...o7.map(E=>`[data-node-type="${E}"]`),"script","style"].join(",");function i7(E){if(!E||typeof E!="object")return!1;const j=E.type;return typeof j=="string"&&sR.has(j)}function I0(E){var j,re;if(!E||typeof E!="object")return 0;const ae=E,be=(re=(j=ae.raw)!=null?j:ae.content)!=null?re:ae.code;if(typeof be=="string")return be.length;const Ne=ae.children;if(Array.isArray(Ne))return Ne.reduce((ze,ot)=>ze+I0(ot),0);const De=ae.items;return Array.isArray(De)?De.reduce((ze,ot)=>ze+I0(ot),0):0}function L0(){qf&&(clearTimeout(qf),qf=void 0)}function Dv(){Pv+=1,Gc!=null&&(Vo?.(Gc),Gc=null)}function Kf(){Dv(),ma(),Mu.value&&(Mu.value.style.visibility="hidden")}function iR(E){var j;if(E.nodeType!==Node.TEXT_NODE||!((j=E.textContent)!=null?j:"").trim())return!1;const re=E.parentElement;return!!re&&!re.closest(s7)}function rR(E){let j=E.lastChild;for(;j;){if(iR(j))return j;if(j.nodeType===Node.ELEMENT_NODE){const re=j;if(!re.matches(s7)&&re.lastChild){j=re.lastChild;continue}}for(;j&&j!==E&&!j.previousSibling;)j=j.parentNode;if(!j||j===E)break;j=j.previousSibling}return null}function r7(){const E=A0.value;for(let j=E.length-1;j>=0;j--){const re=E[j];if(!re||i7(re.node)||!_0(re.index))continue;const ae=fo.get(re.index);if(!ae)continue;const be=rR(ae);if(be)return be}return null}function ma(){Vf.value&&(Vf.value.classList.remove(R_),Vf.value=null)}function $0(){if(d.value!=="simple"||!G||!Ti.value||!O.value)return void ma();const E=r7(),j=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;j!==Vf.value&&(ma(),j&&(j.classList.add(R_),Vf.value=j))}function N0(){if(d.value!=="precise"||!G||!Ti.value||Gc!=null)return;const E=Pv,j=()=>{Gc=null,E===Pv&&(function(){var re,ae;if(d.value!=="precise"||!(G&&Ti.value&&O.value&&Mu.value))return;const be=O.value,Ne=Mu.value;Ne.style.visibility="hidden";const De=r7();if(!De)return;let ze=0,ot=0,We=20,Xe=!1;if(De?.textContent){const nt=De.textContent.length,Be=document.createRange();Be.setStart(De,Math.max(0,nt-1)),Be.setEnd(De,nt);const Je=typeof Be.getClientRects=="function"?Be.getClientRects():void 0,lt=(ae=Je?.[Je.length-1])!=null?ae:(re=De.parentElement)==null?void 0:re.getBoundingClientRect();if(lt){const rt=Kt("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());ze=lt.right-rt.left+be.scrollLeft,ot=lt.top-rt.top+be.scrollTop,We=lt.height||We,Xe=!0}Be.detach()}Xe&&(Ne.style.transform=`translate(${Math.max(0,ze)}px, ${Math.max(0,ot)}px)`,Ne.style.height=`${We}px`,Ne.style.visibility="visible")})()};jo?Gc=jo(j):j()}return et([st,()=>o.content,()=>o.nodes,()=>T.typewriter,Oe],()=>vo(null,null,function*(){var E,j;if(!G||X.value||!ee.value)return;if(Oe.value)return Ti.value=!1,L0(),void Kf();if((E=o.nodes)!=null&&E.length)return Ti.value=!1,L0(),Kf(),T0=((j=o.content)!=null?j:"").length,void(E0=st.value.length);const re=(function(){var ze,ot;return(ze=o.nodes)!=null&&ze.length?o.nodes.reduce((We,Xe)=>We+I0(Xe),0):((ot=o.content)!=null?ot:"").length})(),ae=(function(){var ze;return(ze=o.nodes)!=null&&ze.length?o.nodes.reduce((ot,We)=>ot+I0(We),0):st.value.length})(),be=!i7(At.value[At.value.length-1]),Ne=re>T0,De=ae>E0;if(!f.value||!be||!Ne&&!De)return f.value&&be||(Ti.value=!1,Kf()),T0=re,void(E0=ae);T0=re,E0=ae,Ti.value=!0,d.value==="precise"&&Mu.value&&(Mu.value.style.visibility="hidden"),L0(),yield yt(),d.value==="simple"?$0():(ma(),N0()),qf=setTimeout(()=>{qf=void 0,Ti.value=!1},3e3)}),{flush:"post",immediate:!0}),et(Ti,E=>vo(null,null,function*(){E?(yield yt(),d.value!=="simple"?(ma(),d.value==="precise"&&N0()):$0()):Kf()}),{flush:"post"}),et(d,()=>vo(null,null,function*(){if(G&&!X.value&&ee.value&&Ti.value){if(yield yt(),d.value==="simple")return Dv(),void $0();ma(),d.value!=="precise"?Kf():N0()}}),{flush:"post"}),et([()=>Le.value,()=>Rs.start,()=>Rs.end],()=>vo(null,null,function*(){G&&!X.value&&ee.value&&Ti.value&&(yield yt(),d.value!=="simple"?(ma(),d.value==="precise"&&N0()):$0())}),{flush:"post"}),Un(()=>{L0(),Dv(),ma(),Po.clear()}),(E,j)=>{const re=PO("NodeRenderer",!0);return p(X)?(b(!0),A(Pe,{key:0},pt(A0.value,ae=>(b(),A(Pe,{key:ae.vnodeKey},[ae.rendersCustomNode?(b(),me(ys(ae.component),Dn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onClick:Ov,onMouseover:t7,onMouseout:n7,onCopy:j[0]||(j[0]=be=>i(be)),onHandleArtifactClick:j[1]||(j[1]=be=>s("handleArtifactClick",be))}),{default:ke(()=>[ae.hasSlotChildren?(b(),me(re,Dn({key:0,ref_for:!0},To.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?(b(),me(re,Dn({key:1,ref_for:!0},To.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"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),me(ys(ae.component),Dn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onClick:Ov,onMouseover:t7,onMouseout:n7,onCopy:j[2]||(j[2]=be=>i(be)),onHandleArtifactClick:j[3]||(j[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(b(),A("div",{key:1,ref_key:"containerRef",ref:O,class:Re(["markstream-vue markdown-renderer",[{dark:T.isDark},{virtualized:sn.value},{"virtual-scroll-coordinated":en.value},{"stable-layout":kF.value},{"typewriter-simple-cursor":Ti.value&&d.value==="simple"}]]),"data-custom-id":T.customId,onClick:Ov,onMouseover:tR,onMouseout:nR},[Ho.value||sn.value?(b(),A(Pe,{key:0},[Ho.value?(b(),me(Sce,{key:0,width:Zs.value,"flow-root":sn.value||en.value,"paragraph-node":no.value,"list-item-node":Ks.value,"list-node":ps.value,"heading-nodes":ui.value,"set-paragraph-wrapper":bF,"set-list-item-wrapper":CF,"set-list-wrapper":wF,"set-heading-wrapper":SF},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):te("",!0),sn.value?(b(),A("div",{key:1,class:"node-spacer",style:Gt({height:`${ov.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],64)):te("",!0),oR.value?(b(!0),A(Pe,{key:1},pt(A0.value,ae=>(b(),A(Pe,{key:ae.vnodeKey},[_0(ae.index)?(b(),me(ys(ae.component),Dn({key:0,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onMouseover:j[4]||(j[4]=be=>s("mouseover",be)),onMouseout:j[5]||(j[5]=be=>s("mouseout",be)),onCopy:j[6]||(j[6]=be=>i(be)),onHandleArtifactClick:j[7]||(j[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):te("",!0)],64))),128)):(b(!0),A(Pe,{key:2},pt(A0.value,ae=>(b(),A("div",{key:ae.vnodeKey,ref_for:!0,ref:be=>x0(ae.index,be),class:"node-slot","data-node-index":ae.index,"data-node-type":ae.node.type},[_0(ae.index)?(b(),A("div",{key:0,ref_for:!0,ref:be=>(function(Ne,De){var ze;De||(function(nt){const Be=`${iv()}-${nt}`;let Je=!1;for(const lt of Array.from(Zi.keys())){const rt=sl.get(lt);(rt?.index===nt||lt===Be||lt.startsWith(`${Be}-`))&&(Zi.delete(lt),sl.delete(lt),Je=!0)}Je&&(Bc(),mo("async-node"))})(Ne),Rl.delete(Ne),(function(nt){var Be;const Je=((Be=ku.get(nt))!=null?Be:0)+1;ku.set(nt,Je)})(Ne);const ot=fa.get(Ne);if(ot){for(const nt of ot)h0(nt);fa.delete(Ne)}if((function(nt){const Be=Ki.get(nt);Be&&(ci?.unobserve(Be),Er.delete(Be),Ki.delete(nt))})(Ne),!De||!ws.value)return ol.delete(Ne),void ku.delete(Ne);ol.set(Ne,De);const We=()=>{S0(Ne,De)};queueMicrotask(We);const Xe=(ci||typeof ResizeObserver>"u"||(ci=new ResizeObserver(nt=>{if(nt.length)for(const Be of nt){const Je=Er.get(Be.target),lt=Ki.get(Je??-1);Je!=null&<&&S0(Je,lt)}else Pl()})),ci);if(Xe&&(Ki.set(Ne,De),Er.set(De,Ne),Xe.observe(De)),typeof window<"u"){const nt=((ze=At.value[Ne])==null?void 0:ze.type)==="code_block"?[16,80,240,800]:Oe.value?[80]:[];if(nt.length){const Be=nt.map(Je=>f6(Je,We,"node-resize")).filter(Je=>Je!=null);Be.length&&fa.set(Ne,Be)}}})(ae.index,be),class:"node-content"},[ae.isCodeBlock?ae.rendersCustomNode?(b(),me(ys(ae.component),Dn({key:1,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:j[12]||(j[12]=be=>i(be)),onHandleArtifactClick:j[13]||(j[13]=be=>s("handleArtifactClick",be))}),{default:ke(()=>[ae.hasSlotChildren?(b(),me(re,Dn({key:0,ref_for:!0},To.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?(b(),me(re,Dn({key:1,ref_for:!0},To.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"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),me(ys(ae.component),Dn({key:2,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:j[14]||(j[14]=be=>i(be)),onHandleArtifactClick:j[15]||(j[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(b(),me(as,{key:0,name:"fade",css:T.fade!==!1,appear:T.fade!==!1},{default:ke(()=>[ae.rendersCustomNode?(b(),me(ys(ae.component),Dn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:j[8]||(j[8]=be=>i(be)),onHandleArtifactClick:j[9]||(j[9]=be=>s("handleArtifactClick",be))}),{default:ke(()=>[ae.hasSlotChildren?(b(),me(re,Dn({key:0,ref_for:!0},To.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?(b(),me(re,Dn({key:1,ref_for:!0},To.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"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),me(ys(ae.component),Dn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:j[10]||(j[10]=be=>i(be)),onHandleArtifactClick:j[11]||(j[11]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(b(),A("div",{key:1,class:"node-placeholder",style:Gt({height:`${Zn(ae.index)}px`})},null,4))],8,Tce))),128)),Ti.value&&d.value==="precise"?(b(),A("span",{key:3,ref_key:"typewriterCursorRef",ref:Mu,class:"typewriter-cursor","aria-hidden":"true"},null,512)):te("",!0),sn.value?(b(),A("div",{key:4,class:"node-spacer",style:Gt({height:`${sv.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],42,Mce))}}})),[["__scopeId","data-v-a9489508"]]),Ui=XL;Ui.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Ui.__name,Ui.name].filter(n=>!!n));for(const n of t)e.component(n,XL)};const x5=Object.freeze(Object.defineProperty({__proto__:null,default:Ui},Symbol.toStringTag,{value:"Module"})),Ece={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"},Ice={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"},Lce={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"},$ce={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"},Nce={class:"admonition-title"},Fce=["aria-expanded","aria-controls"],Rce=["id"],im=Kn(tt({__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=R(()=>{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=Z(!!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)=>(b(),A("div",{class:Re(["admonition",[`admonition-${o.node.kind}`]])},[C("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(b(),A("svg",Ece,[...c[1]||(c[1]=[C("circle",{cx:"12",cy:"12",r:"10"},null,-1),C("path",{d:"M12 16v-4"},null,-1),C("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(b(),A("svg",Ice,[...c[2]||(c[2]=[C("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),C("path",{d:"M9 18h6"},null,-1),C("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(b(),A("svg",Lce,[...c[3]||(c[3]=[C("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),C("path",{d:"M12 9v4"},null,-1),C("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(b(),A("svg",$ce,[...c[4]||(c[4]=[C("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),C("path",{d:"M12 8v4"},null,-1),C("path",{d:"M12 16h.01"},null,-1)])])):te("",!0),C("span",Nce,N(i.value),1),o.node.collapsible?(b(),A("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(b(),A("svg",{style:Gt({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]=[C("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,Fce)):te("",!0)]),In(C("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[V(p(Ui),{"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,Rce),[[Es,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);im.install=e=>{e.component(im.__name,im)};const X3=()=>Go(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let _h=null,xh=X3,Sh=null,O_=!1,P_=!1;function fVe(){return vo(this,null,function*(){if(_h)return _h;const e=xh;return e?e===X3&&O_?null:Sh||(Sh=vo(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===X3)return e===xh&&(O_=!0,(function(o){P_||(P_=!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===xh&&(Sh=null)}return e!==xh?null:t?(_h=(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),_h):null}),Sh):null})}let Ah=null,JL=null,Mh=null;function pVe(){return typeof JL=="function"}function hVe(){return vo(this,null,function*(){if(Ah)return Ah;const e=JL;return e?Mh||(Mh=vo(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?(Ah=n,Ah):null}).finally(()=>{Mh=null}),Mh):null})}const mVe=Symbol("markstreamLanguageIconResolver"),QL=["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"],Oce=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),J3=[...QL].sort((e,t)=>t.length-e.length).join("|"),r4=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${J3}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${J3})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?,。;!?)])`].join(""),"gi"),e$=/[),.;!?,。;!?)]+$/;function Pce(e){const t=e.toLowerCase();return QL.some(n=>t.endsWith(`.${n}`))}function Dce(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${J3}))["']`,"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 Bce(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(e$,"");if(!s)return null;const i=s.split("/").pop()??s,r=s.includes("/"),l=Oce.has(i),a=Pce(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 Hce(e,t={}){const n=[];r4.lastIndex=0;let o;for(;(o=r4.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(e$,""),c=a.length-u.length;a=u;const d=Bce(a,t);if(!d)continue;const f=o.index+r,h=f+a.length;n.push({...d,start:f,end:h,text:a}),c>0&&(r4.lastIndex-=c)}return n}function l4(e,t){let n=0,o=t-1;for(;o>=0&&e[o]==="\\";)n++,o--;return n%2===1}const zce=/\s/,Wce=/\p{Nd}/u;function kc(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function Uce(e,t){if(t<=0)return;const n=e.charCodeAt(t-1),o=n>=56320&&n<=57343&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function D_(e){return e!==void 0&&zce.test(e)}function uf(e){return e!==void 0&&Wce.test(e)}function jce(e,t){const n=e[t+1];return uf(kc(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&uf(kc(e,t+2))}function hg(e){return e!==void 0&&e>="A"&&e<="Z"}const t$=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 Vce(e,t){if(!hg(e[t-1]))return!1;let n=t-1;for(;n>0&&hg(e[n-1]);)n--;return t$.test(e.slice(n,t))||uf(kc(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(kc(e,t+1)??"")}function qce(e,t){if(!hg(e[t-1]))return!1;let n=t-1;for(;n>0&&hg(e[n-1]);)n--;return t$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}const Kce=/^[-–—,,、;;::~~(([【//]$/;function Zce(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!uf(kc(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&Kce.test(o)}function Gce(e){const t=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;let n=e.replace(new RegExp(String.raw`^(?:${t})+`,"u"),"");for(;;){const s=n.replace(new RegExp(String.raw`^\p{L}+(?:${t})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(s===n)break;n=s}if(!/\p{Nd}/u.test(n))return!1;const o=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${o}(?:\p{L}+)?(?:(?:${t})+${o}(?:\p{L}+)?)*$`,"u").test(n)}const ul=-1,B_=1,H_=2,z_=3;function Yce(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(ul),s=new Int32Array(t+1),i=new Int32Array(t+1),r=[],l=[];{const F=[];for(let q=0;q{for(;a=(l[a]?.[1]??0);)a++;const W=l[a];return W!==void 0&&F>=W[0]},c=new Set(' \n\r)。,、;:!?"<>`「」『』【】〔〕()*—–“”‘’'),d=[];for(const F of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))d.push(F.index);for(const F of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))d.push(F.index);for(const F of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(F.index===0||!/[\w~/.-]/.test(e[F.index-1]))&&d.push(F.index);d.sort((F,W)=>F-W);let f=-1;for(const F of d){if(FF+7&&!/[\w/?#@~.+&=%-]/.test(e[W+1]??""))break}W++}r.push([F,W]),f=W}const h=[];for(let F=0;F]/.test(q))continue;let K=W,ie=ul,ne=ul;for(;K"){ne=K;break}if(!z&&Y==="/"&&e[K+1]===">"){ne=K+1;break}if(!/\s/.test(Y)){ie=K;break}for(;K"){ne=K;break}if(z){ie=K;break}if(le==="/"&&e[K+1]===">"){ne=K+1;break}const Ee=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(K));if(!Ee){ie=K;break}K+=Ee[0].length;let de=K;for(;de`]+/.exec(e.slice(de));if(!pe){ie=de;break}K=de+pe[0].length}}}if(ne!==ul)h.push([F,ne+1]),F=ne;else if(ie!==ul){const Y=e.indexOf("<",F+1);F=(Y!==-1&&Y",F+2);ie===-1?m=!1:(h.push([F,ie+2]),F=ie+1,z=!0)}else if(W==="!"){if(e[F+2]==="-"&&e[F+3]==="-"){if(g){const ie=e.indexOf("-->",F+4);ie===-1?g=!1:(h.push([F,ie+3]),F=ie+2,z=!0)}}else if(e.startsWith("[CDATA[",F+2)){if(w){const ie=e.indexOf("]]>",F+9);ie===-1?w=!1:(h.push([F,ie+3]),F=ie+2,z=!0)}}else if(_&&/[A-Z]/.test(e[F+2]??"")){const ie=e.indexOf(">",F+3);ie===-1?_=!1:(h.push([F,ie+1]),F=ie,z=!0)}}if(z)continue;if(W!==void 0&&/[a-zA-Z]/.test(W)){const ie=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(F+1));if(ie){let ne=F+1+ie[0].length;for(;ne"&&e[ne]!=="<"&&!/\s/.test(e[ne]);)ne++;if(e[ne]===">"){h.push([F,ne+1]),F=ne;continue}}}if(W===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(W))continue;let U=F+1;for(;U"&&(h.push([F,U+1]),F=U)}}h.sort((F,W)=>F[0]-W[0]);const v=[];for(const[F,W]of h){const z=v[v.length-1];z&&F<=z[1]?z[1]=Math.max(z[1],W):v.push([F,W])}r.push(...v);let k=0;const y=F=>{for(;k=(v[k]?.[1]??0);)k++;const W=v[k];return W!==void 0&&F>=W[0]},x=[];let M=null,$=0,S=!1;for(let F=0;F"&&(S=!1);else if(!(u(F)||y(F))){if(M!==null)e[F]===M&&(M=null);else if(x.length>0&&(e[F]==='"'||e[F]==="'")&&F>0&&/\s/.test(e[F-1]))M=e[F];else if(e[F]==="[")$++;else if(e[F]==="]")$>0&&e[F+1]==="("&&(x.push(F),S=e[F+2]==="<",F++),$=Math.max(0,$-1);else if(e[F]==="("&&x.length>0)x.push(-1);else if(e[F]===")"&&x.length>0){const W=x.pop();if(W!==void 0&&W>=0){const z=e.slice(W+2,F);(/\s/.exec(z)===null||z.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(z)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(z))&&r.push([W,F+1])}}}r.sort((F,W)=>F[0]-W[0]);const I=[];for(const[F,W]of r){const z=I[I.length-1];z&&F<=z[1]?z[1]=Math.max(z[1],W):I.push([F,W])}const P=F=>{let W=0,z=I.length-1;for(;W<=z;){const U=W+z>>1,q=I[U];if(q===void 0)return!1;if(F=q[1])W=U+1;else return!0}return!1};for(let F=0;F=0;F--)n[F]===z_&&(D=F),o[F]=D;const T=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,L=/[^\p{L}\p{Nd}\s]$/u,B=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,H=/(?:^|\s)[a-z]{2,}/,O=(F,W)=>{const z=kc(e,F+1);if(z===void 0||!T.test(z))return!1;const U=o[F+1]??ul;if(U!==ul){const q=e.slice(F+1,U);return!(q.length===((q.codePointAt(0)??0)>65535?2:1))&&B.test(q)||/[,;:!?]$/.test(q)||/^[a-z]{2,}$/.test(q)?!1:(s[U]??0)-(s[F+1]??0)===0&&(i[U]??0)-(i[F+1]??0)===0}return L.test(W)||B.test(W)||H.test(W)};return(F,W=-1)=>{if(e[F]!=="$"||n[F]===B_||e[F+1]==="$"||e[F-1]==="$"&&W!==F||Vce(e,F)||F+1>=t||D_(e[F+1]))return null;const z=o[F+1]??ul;if(z===ul||(s[z]??0)-(s[F+1]??0)>0||(i[z]??0)-(i[F+1]??0)>0)return null;const U=e.slice(F+1,z);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(U)||e[z+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(U)||uf(Uce(e,F))&&Gce(U)||jce(e,F)&&(O(z,U)||qce(e,z)||/\s/.test(U)&&/\p{Nd}$/u.test(U)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(U)||e[z+1]==="$"&&!/\p{L}/u.test(U)&&/[^\p{L}\p{Nd}\s]$/u.test(U))?null:{content:U,end:z+1}}}const W_=new WeakMap;function Xce(e,t){if(e.src[e.pos]!=="$")return!1;let n=W_.get(e);(!n||n.src!==e.src)&&(n={src:e.src,match:Yce(e.src),lastEnd:-1},W_.set(e,n));const o=n.match(e.pos,n.lastEnd);if(!o||o.end>e.posMax)return!1;if(n.lastEnd=o.end,t)return e.pos=o.end,!0;const s=e.push("math_inline","math",0);return s.content=o.content,s.markup="$",s.raw=e.src.slice(e.pos,o.end),s.loading=!1,e.pos=o.end,!0}function Jce(e){return e.inline.ruler.disable("math"),e.inline.ruler.before("escape","math",Xce),e}const Qce=12e4,ede=6e4,tde=32,nde=3e4,U_=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function ode(e){let t=0,n=0,o=0;U_.lastIndex=0;let s;for(;(s=U_.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,o=Math.max(o,r.length)}return{codeRenderer:e.length>=Qce||n>=ede||t>=tde||o>=nde?"pre":"shiki",codeFenceCount:t,codeChars:n}}async function n$(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 ide(e)}function sde(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||n$(e)}function ide(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 o$="md-table-wide",s$="md-table-toggle",i$="md-table-fade",j_="md-table-toggle--show",rde="md-table-at-end",lde="kimi-table-layout",r$='',ade='';function Xp(e){return e.querySelector(`button.${s$}`)}function l$(e){return e.querySelector(`.${i$}`)}const ude=26;function cde(e){const t=Xp(e);if(!t)return;const n=e.querySelector("thead tr")??e.querySelector("tr");if(!n)return;const o=n.getBoundingClientRect(),s=e.getBoundingClientRect().top,i=Math.max(2,Math.round(o.top-s+(o.height-ude)/2));t.style.top=`${i}px`,t.style.right=`${i}px`}function dde(e){return e.closest(".a-msg .msg")!==null}function fde(e){const t=e.querySelector("table");return t!==null&&t.scrollWidth>e.clientWidth+1}function a$(e){const t=`translateX(${e.scrollLeft}px)`,n=l$(e);n&&(n.style.transform=t);const o=Xp(e);o&&(o.style.transform=t);const s=e.scrollLeft+e.clientWidth>=e.scrollWidth-2;e.classList.toggle(rde,s)}function pde(e,t){const n=Xp(e);if(n)return n;if(!dde(e))return null;const o=document.createElement("div");o.className=i$,o.setAttribute("aria-hidden","true");const s=document.createElement("button");return s.type="button",s.className=s$,s.innerHTML=r$,s.setAttribute("aria-label",t.widen),s.title=t.widen,s.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),hde(e,t)}),e.appendChild(o),e.appendChild(s),e.addEventListener("scroll",()=>a$(e),{passive:!0}),S5(e),s}function hde(e,t){const n=e.classList.toggle(o$),o=Xp(e);if(o){o.innerHTML=n?ade:r$;const s=n?t.restore:t.widen;o.setAttribute("aria-label",s),o.title=s}S5(e),e.dispatchEvent(new CustomEvent(lde,{bubbles:!0}))}function S5(e){const t=Xp(e);if(!t)return;const n=fde(e),o=e.classList.contains(o$);t.classList.toggle(j_,n||o);const s=l$(e);s&&s.classList.toggle(j_,n),cde(e),a$(e)}function mde(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function gde(e){return new Worker("/assets/mermaidParser.worker-BFSlSHEW.js",{type:"module",name:e?.name})}const vde={key:1,class:"diff-wrap"},yde={class:"diff-bar"},kde=["aria-label","onClick"],bde={class:"diff-pre"},Cde={key:0,class:"diff-sign"},wde={class:"diff-text"},_de="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",V_="github-light",q_="github-dark",xde=tt({__name:"Markdown",props:{text:{},openFile:{},streaming:{type:Boolean,default:!1}},setup(e){cle(),_le(),fle(),Ale(),dle(new mde),Sle(new gde);const{t}=vf(),n=on("resolveImage"),o=Z(null),s=e,i=R(()=>!s.streaming),r=R(()=>Dce(s.text??"")),l=R(()=>s.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:ode(s.text??"")),a=p2(),u=R(()=>!s.streaming),c=Jo(new Map),d=new Set,f=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,h=/(]*?\bsrc=")([^"]+)(")/gi;function g(F){return!/^(https?:|data:|blob:)/i.test(F)}function m(F){if(!n)return;const W=[];for(const z of[f,h]){z.lastIndex=0;let U;for(;(U=z.exec(F))!==null;)W.push(U[2]??"")}for(const z of W)!z||!g(z)||c.has(z)||d.has(z)||(d.add(z),n(z).then(U=>{c.set(z,U!==z?U:"")}).catch(()=>{c.set(z,"")}).finally(()=>{d.delete(z)}))}function w(F){if(!n)return F;const W=z=>{if(!g(z))return null;const U=c.get(z);return U===void 0?_de:U===""?null:U};return F.replace(f,(z,U,q,K)=>{const ie=W(q);return ie===null?z:`${U}${ie}${K}`}).replace(h,(z,U,q,K)=>{const ie=W(q);return ie===null?z:`${U}${ie}${K}`})}et(()=>s.text,F=>m(F??""),{immediate:!0});function _(){if(!o.value||!s.openFile||s.streaming)return;const F=document.createTreeWalker(o.value,NodeFilter.SHOW_TEXT),W=[];let z=F.nextNode();for(;z;){const U=z,q=U.parentElement;q&&!q.closest("a, pre, .md-file-link, svg")&&U.data.trim().length>0&&W.push(U),z=F.nextNode()}for(const U of W){const q=Hce(U.data,{aliases:r.value});if(q.length===0||!U.parentNode)continue;const K=document.createDocumentFragment();let ie=0;for(const ne of q){ne.start>ie&&K.append(document.createTextNode(U.data.slice(ie,ne.start)));const Y=document.createElement("button");Y.type="button",Y.className="md-file-link",Y.textContent=ne.text,Y.title=ne.line?`${ne.path}:${ne.line}`:ne.path,Y.addEventListener("click",le=>{le.preventDefault(),le.stopPropagation(),s.openFile?.({path:ne.path,line:ne.line})}),K.append(Y),ie=ne.end}ie{U.preventDefault(),U.stopPropagation(),s.openFile?.({path:k(z)})}))}}function x(){return{widen:t("conversation.widenTable"),restore:t("conversation.restoreTableWidth")}}function M(){if(!o.value||s.streaming)return;const F=x();for(const W of o.value.querySelectorAll(".table-node-wrapper"))pde(W,F)}function $(){if(!(!o.value||s.streaming))for(const F of o.value.querySelectorAll(".table-node-wrapper"))S5(F)}function S(){yt().then(()=>{_(),y(),M()})}et(()=>s.text,S),et(()=>s.streaming,S);let I=null,P=null;dn(()=>{S(),o.value&&(I=new MutationObserver(S),I.observe(o.value,{childList:!0,subtree:!0}),P=new ResizeObserver($),P.observe(o.value))}),kn(()=>{I?.disconnect(),P?.disconnect()});const D={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}}},T=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,L=R(()=>{const F=w(s.text??""),W=[];let z=0;T.lastIndex=0;let U;for(;(U=T.exec(F))!==null;){const K=U[1]??"",ie=F.slice(z,U.index)+(K||"");ie.trim()&&W.push({kind:"md",text:ie}),W.push({kind:"diff",code:U[2]??""}),z=T.lastIndex}const q=F.slice(z);return(q.trim()||W.length===0)&&W.push({kind:"md",text:q}),W});function B(F){return F.split(` -`).map(W=>W.startsWith("@@")?{type:"hunk",sign:"",text:W}:/^\+(?!\+\+)/.test(W)?{type:"add",sign:"+",text:W.slice(1)}:/^-(?!--)/.test(W)?{type:"del",sign:"-",text:W.slice(1)}:W.startsWith(" ")?{type:"ctx",sign:"",text:W.slice(1)}:{type:"ctx",sign:"",text:W})}const H=Z(null);function O(F,W){n$(F).then(z=>{z&&(H.value=W,setTimeout(()=>{H.value=null},1400))})}return(F,W)=>(b(),A("div",{ref_key:"mdRef",ref:o,class:"md"},[(b(!0),A(Pe,null,pt(L.value,(z,U)=>(b(),A(Pe,{key:U},[z.kind==="md"?(b(),me(p(Ui),{key:0,content:z.text,"custom-markdown-it":p(Jce),mode:"chat","code-renderer":l.value.codeRenderer,"is-dark":p(a),"code-block-light-theme":V_,"code-block-dark-theme":q_,themes:[V_,q_],"code-block-props":D,final:i.value,"smooth-streaming":e.streaming,"batch-rendering":u.value,"defer-nodes-until-visible":!1,onCopy:p(sde)},null,8,["content","custom-markdown-it","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(b(),A("div",vde,[C("div",yde,[W[0]||(W[0]=C("span",{class:"diff-lang"},"diff",-1)),V(p(Pn),{text:p(t)("filePreview.copyCode")},{default:ke(()=>[C("button",{class:"diff-copy","aria-label":p(t)("filePreview.copyCode"),onClick:q=>O(z.code,U)},[V(p(Ie),{name:H.value===U?"check":"copy",size:"sm"},null,8,["name"])],8,kde)]),_:2},1032,["text"])]),C("pre",bde,[C("code",null,[(b(!0),A(Pe,null,pt(B(z.code),(q,K)=>(b(),A("span",{key:K,class:Re(["diff-line",`diff-${q.type}`])},[q.type!=="hunk"?(b(),A("span",Cde,N(q.sign),1)):te("",!0),C("span",wde,N(q.text),1)],2))),128))])])]))],64))),128))],512))}}),Ic=ht(xde,[["__scopeId","data-v-2ec518c1"]]),Sde={state:"idle"};function Ade(e){const t=Z(Sde),n=Z(li(cn.updateSkippedVersion)),o=Z(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(i=>{o.value=i}).catch(()=>{}),e!==void 0){let i=!1;e.onUpdateStatus(r=>{i=!0,t.value=r}),e.getUpdateStatus().then(r=>{i||(t.value=r)}).catch(()=>{})}const s=R(()=>{const i=t.value;return!(i.state==="idle"||i.state==="available"&&i.version!==void 0&&i.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:o,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:i=>{o.value=i,e?.setUpdateAutoDownload?.(i).catch(()=>{})},skipVersion:()=>{const i=t.value.version;t.value.state==="available"&&i!==void 0&&(n.value=i,Ls(cn.updateSkippedVersion,i))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const i=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return i.outcome==="available"&&i.version!==void 0&&i.version===n.value&&(n.value=null,lr(cn.updateSkippedVersion)),i},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let a4=null;function u$(){return a4===null&&(a4=Ade(window.kimiDesktop)),a4}const Mde=["data-state"],Tde=["aria-label"],Ede={class:"upd-pill-text"},Ide={key:0,class:"upd-meta"},Lde={key:1,class:"upd-notes"},$de={class:"upd-notes-title"},Nde={key:2,class:"upd-progress"},Fde={key:3,class:"upd-message"},Rde={class:"upd-foot"},Ode={class:"upd-foot-actions"},Pde=tt({__name:"UpdateIndicator",setup(e){const{t,locale:n}=Lt(),{status:o,visible:s,skipVersion:i,download:r,install:l,autoDownload:a,setAutoDownload:u,canToggleAutoDownload:c}=u$(),d=Z(!1),f="0.33.0".trim()?"0.33.0":"",h=R(()=>{switch(o.value.state){case"available":return t("sidebar.update");case"downloading":return`${o.value.percent??0}%`;case"downloaded":return t("sidebar.updateDone");case"error":return t("sidebar.updateFailed");default:return""}}),g=R(()=>{switch(o.value.state){case"available":return t("sidebar.updateAvailable",{version:o.value.version??""});case"downloading":return t("sidebar.updateDownloading",{percent:o.value.percent??0});case"downloaded":return t("sidebar.updateReady",{version:o.value.version??""});case"error":return t("sidebar.updateFailed");default:return""}}),m=R(()=>{const $=o.value.releaseDate;if($===void 0||$==="")return"";const S=new Date($),I=Number.isNaN(S.getTime())?$:S.toLocaleDateString();return t("sidebar.updateReleaseDate",{date:I})}),w=R(()=>{const $=[];return m.value!==""&&$.push(m.value),f!==""&&$.push(t("sidebar.updateCurrentVersion",{version:f})),$.join(" · ")}),_=R(()=>o.value.percent??0),v=R(()=>{const $=o.value.releaseNotes;return $===void 0?"":((n.value.toLowerCase().startsWith("zh")?$.zh:$.en)??$.zh??$.en??"").trim()}),k=R(()=>{switch(o.value.state){case"error":return"alert-triangle";default:return"download"}});function y(){r()}function x(){i(),d.value=!1}function M(){l(),d.value=!1}return($,S)=>p(s)?(b(),A("span",{key:0,class:"upd","data-state":p(o).state},[C("button",{class:"upd-pill",type:"button","aria-label":h.value,onClick:S[0]||(S[0]=I=>d.value=!0)},[V(p(Ie),{class:"upd-pill-icon",name:k.value,size:"sm"},null,8,["name"]),C("span",Ede,N(h.value),1)],8,Tde),V(p(ca),{open:d.value,title:g.value,size:"lg","onUpdate:open":S[4]||(S[4]=I=>d.value=I)},{foot:ke(()=>[C("div",Rde,[C("div",Ode,[p(o).state==="available"?(b(),A(Pe,{key:0},[V(p(Ft),{variant:"ghost",onClick:x},{default:ke(()=>[Ve(N(p(t)("sidebar.updateSkip")),1)]),_:1}),V(p(Ft),{onClick:y},{default:ke(()=>[Ve(N(p(t)("sidebar.updateDownloadNow")),1)]),_:1})],64)):p(o).state==="downloading"?(b(),me(p(Ft),{key:1,variant:"secondary",onClick:S[1]||(S[1]=I=>d.value=!1)},{default:ke(()=>[Ve(N(p(t)("sidebar.updateBackground")),1)]),_:1})):p(o).state==="downloaded"?(b(),A(Pe,{key:2},[V(p(Ft),{variant:"ghost",onClick:S[2]||(S[2]=I=>d.value=!1)},{default:ke(()=>[Ve(N(p(t)("sidebar.updateRestartLater")),1)]),_:1}),V(p(Ft),{onClick:M},{default:ke(()=>[Ve(N(p(t)("sidebar.updateRestartNow")),1)]),_:1})],64)):p(o).state==="error"?(b(),me(p(Ft),{key:3,variant:"danger-soft",onClick:y},{default:ke(()=>[Ve(N(p(t)("sidebar.updateRetry")),1)]),_:1})):te("",!0)]),p(c)?(b(),me(p(eW),{key:0,class:"upd-auto","model-value":p(a),"onUpdate:modelValue":S[3]||(S[3]=I=>p(u)(I))},{default:ke(()=>[Ve(N(p(t)("sidebar.updateAutoDownload")),1)]),_:1},8,["model-value"])):te("",!0)])]),default:ke(()=>[(p(o).state==="available"||p(o).state==="downloaded")&&w.value?(b(),A("p",Ide,N(w.value),1)):te("",!0),v.value?(b(),A("section",Lde,[C("h4",$de,N(p(t)("sidebar.updateWhatsNew")),1),V(p(Ic),{text:v.value},null,8,["text"])])):te("",!0),p(o).state==="downloading"?(b(),A("div",Nde,[C("div",{class:"upd-progress-fill",style:Gt({width:`${_.value}%`})},null,4)])):te("",!0),p(o).state==="error"&&p(o).message?(b(),A("p",Fde,N(p(o).message),1)):te("",!0)]),_:1},8,["open","title"])],8,Mde)):te("",!0)}}),Dde=ht(Pde,[["__scopeId","data-v-fdb68462"]]),mg=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],Wn=_z({locale:IM()});function A5(e){Wn.global.locale.value=e,Ls(cn.locale,e)}function Bde(){return window.kimiDesktop}function c$(e,t,n){const o=n.length===0?void 0:n.length===1?n[0]:n;try{Bde()?.log?.(e,t,o)}catch{}}function gl(e,...t){console.warn(e,...t),c$("warn",e,t)}function Jl(e,...t){console.error(e,...t),c$("error",e,t)}const Hde=["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"],d$=500,gg=256*1024,K_=200,u4=16384,c4=500,d4=50,f4=50,zde=6,Wde=/api[_-]?key|authorization|token|secret|password|cookie|credential|email|phone|nickname|avatar/i,Ude=/^[A-Za-z0-9+/=_-]{200,}$/;let p4=null;function Qr(){if(p4!==null)return p4;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=li(cn.debug)==="1"),p4=e,e}const Ka=[],Id=[];let A1=0;const Zu=[];let M1=0,jde=1;const vg=new TextEncoder,Vde=new Set(Hde),M5=Z(0),T1=Xr(!1);function qde(){return Ka}function Kde(){Ka.length=0,Id.length=0,A1=0,Zu.length=0,M1=0,M5.value++}function da(e){if(!T1.value){try{const t={id:jde++,ts:Date.now(),source:e.source,kind:String(Zd(e.kind)),label:String(Zd(e.label)),sessionId:e.sessionId===void 0?void 0:String(Zd(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:fu(e.detail)},n=JSON.stringify(t),o=vg.encode(n).byteLength;if(o>gg)return;for(Ka.push(t),Id.push(n),A1+=o+(Id.length>1?1:0);Ka.length>d$||A1>gg;){const s=Id.shift();Ka.shift(),s!==void 0&&(A1-=vg.encode(s).byteLength,Id.length>0&&(A1-=1))}}catch{return}M5.value++}}function Pu(e){if(typeof e=="string")return e.length<=K_?e:e.slice(0,K_)}function pr(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Zde(e,t){if(Vde.has(e))try{const n={ts:Date.now(),event:e,sessionId:Pu(t?.sessionId),status:Pu(t?.status),operation:Pu(t?.operation),seq:pr(t?.seq),durationMs:pr(t?.durationMs),messageCount:pr(t?.messageCount),contentCount:pr(t?.contentCount),mediaCount:pr(t?.mediaCount),sessionCount:pr(t?.sessionCount),workspaceCount:pr(t?.workspaceCount),promptId:Pu(t?.promptId),zipBytes:pr(t?.zipBytes),errorName:Pu(t?.errorName),errorCode:pr(t?.errorCode),requestId:Pu(t?.requestId),phase:Pu(t?.phase),httpStatus:pr(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:pr(t?.line),col:pr(t?.col)},o=JSON.stringify(n),s=vg.encode(o).byteLength;if(s>gg)return;for(Zu.push(o),M1+=s+(Zu.length>1?1:0);Zu.length>d$||M1>gg;){const i=Zu.shift();i!==void 0&&(M1-=vg.encode(i).byteLength,Zu.length>0&&(M1-=1))}}catch{return}}function Zd(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 Ude.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>c4?`${i.slice(0,c4)}… [+${i.length-c4} chars]`:i}if(n!=="object")return String(e);if(t>=zde)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,d4).map(r=>Zd(r,t+1));return e.length>d4&&i.push(`[+${e.length-d4} more items]`),i}const o={},s=Object.entries(e);for(const[i,r]of s.slice(0,f4))o[i]=Wde.test(i)?"[redacted]":Zd(r,t+1);return s.length>f4&&(o._truncatedKeys=s.length-f4),o}function fu(e){if(e===void 0)return;const t=Zd(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>u4)return{_truncated:`detail JSON was ${n.length} chars; first ${u4} kept`,preview:n.slice(0,u4)}}catch{return"[unserializable detail]"}return t}function Gde(e){Qr()&&da({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:fu(e.body)}})}function Yde(e){if(!Qr())return;const t=e.code!==0;da({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:fu(e.data)}})}function Xde(e){Qr()&&da({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 Jde(e,t){Qr()&&da({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:fu(t)})}function Qde(e){if(!Qr())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;da({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:fu(e)})}function efe(e){if(!Qr())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);da({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:fu(t.payload)})}const tfe={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function nfe(e,t,n){Qr()&&da({source:"client",kind:`client:${e}`,label:`${tfe[e]} ${t}`,detail:fu(n)})}function ofe(e,t){Qr()&&da({source:"client",kind:"client:event",label:`· ${e}`,detail:fu(t)})}function yi(e,t){Zde(e,t),da({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 h4=!1,Th=null;function sfe(){if(h4)return()=>Th?.();h4=!0;const e=[];try{if(typeof window<"u"){const n=s=>{yi("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno}),Jl(`[kimi-web] window error: ${s.message}`,s.error instanceof Error?s.error.stack:void 0)},o=s=>{const i=s.reason;yi("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i}),Jl(`[kimi-web] unhandled rejection: ${rfe(i)}`,i instanceof Error?i.stack:void 0)};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(Qr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{nfe(n,i.map(ife).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(Th===t){for(const n of e.toReversed())n();Th=null,h4=!1}};return Th=t,t}function ife(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 rfe(e){if(e instanceof Error)return e.message;try{return String(e)}catch{return"[unstringifiable reason]"}}function f$(e=Ka){if(typeof document>"u")return;const t=new Blob([lfe(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`kimi-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 lfe(e=Ka){return e===Ka?Id.join(` -`):e.map(t=>JSON.stringify(t)).join(` -`)}function afe(){return Zu.join(` -`)}const Ds="kimi-web.server-credential",ufe="token",cfe=10080*60*1e3;let yl;const Q3=new Set;function dfe(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(ufe);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 ey(e){return{version:1,credential:e,expiresAt:Date.now()+cfe}}function ffe(e){return JSON.stringify(e)}function T5(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 ty(e){globalThis.localStorage?.setItem(Ds,ffe(e))}function pfe(){try{const e=globalThis.localStorage?.getItem(Ds);if(e){const n=T5(e);if(n===void 0){const o=ey(e);let s=!1;try{ty(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(Ds)===e&&globalThis.localStorage?.removeItem(Ds),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ds)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Ds),globalThis.localStorage?.getItem(Ds)===e&&globalThis.localStorage?.removeItem(Ds);return}const t=globalThis.sessionStorage?.getItem(Ds);if(t){const n=ey(t);let o=!1;try{ty(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ds),o=!0}catch{}return o?n:void 0}return}catch{return}}function hfe(){const e=dfe();return e?(p$(e),!0):(yl=pfe(),yl!==void 0)}function mfe(){if(yl!==void 0){if(yl.expiresAt<=Date.now()){gfe(yl);return}return yl.credential}}function gfe(e){yl=void 0;try{globalThis.sessionStorage?.removeItem(Ds);const t=globalThis.localStorage?.getItem(Ds),n=t==null?void 0:T5(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Ds)}catch{}}function p$(e){const t=ey(e);yl=t;try{ty(t)}catch{}try{globalThis.sessionStorage?.removeItem(Ds)}catch{}}function vfe(){const e=yl;yl=void 0;try{const t=globalThis.localStorage?.getItem(Ds),o=(t==null?void 0:T5(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(Ds),globalThis.sessionStorage?.removeItem(Ds)}catch{}}function yfe(e){return Q3.add(e),()=>{Q3.delete(e)}}function kfe(){vfe();for(const e of Q3)try{e()}catch{}}const Z_=cn.clientId,bfe="kimi-code-web",Cfe="web";function wfe(){return{serverHttpUrl:xfe(),clientId:Afe(),clientName:bfe,clientVersion:Mfe(),clientUiMode:Cfe}}function _fe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function xfe(){const e=h$();return ny(e||void 0)}const G_="kimi-desktop-server-origin";function h$(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get("kimi_origin");try{return e?(window.sessionStorage.setItem(G_,e),e):window.sessionStorage.getItem(G_)??void 0}catch{return e??void 0}}function ny(e){const t=e&&e.trim()?e:_fe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Y_(e){return e.replace(/^https?:\/\//,"").replace(/\/$/,"")}function Sfe(){if(typeof window<"u"){const t=h$();if(t)return Y_(ny(t))}const e=typeof window<"u"&&window.location?.origin?window.location.origin:"";return Y_(e)}function Afe(){const e=li(Z_);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Ls(Z_,t),t}function Mfe(){return"0.33.0".trim()?"0.33.0":"0.0.0-dev"}const Tfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Efe(e,t){return b(),A("svg",Tfe,[...t[0]||(t[0]=[C("path",{d:"M12.0684 2.03418C12.5654 2.03421 12.9687 2.43755 12.9688 2.93457V11.0996H21.0654C21.5625 11.0996 21.9658 11.503 21.9658 12C21.9658 12.497 21.5625 12.9004 21.0654 12.9004H12.9688V21.0654C12.9687 21.5624 12.5654 21.9658 12.0684 21.9658C11.5713 21.9658 11.168 21.5625 11.168 21.0654V12.9004H2.93457C2.43751 12.9004 2.03418 12.4971 2.03418 12C2.03418 11.5029 2.43751 11.0996 2.93457 11.0996H11.168V2.93457C11.168 2.43753 11.5713 2.03418 12.0684 2.03418Z",fill:"currentColor"},null,-1)])])}const Ife=kt({name:"kimi-add",render:Efe}),Lfe={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function $fe(e,t){return b(),A("svg",Lfe,[...t[0]||(t[0]=[C("path",{id:"p0",d:"M 0 -9.9 C -5.468 -9.9 -9.9 -5.468 -9.9 0 C -9.9 1.923 -9.351 3.719 -8.402 5.239 C -8.402 5.239 -9.483 7.821 -9.483 7.821 C -9.896 8.809 -9.171 9.9 -8.099 9.9 C -8.099 9.9 0 9.9 0 9.9 C 5.468 9.9 9.9 5.468 9.9 0 C 9.9 -5.468 5.468 -9.9 0 -9.9 Z M -8.1 0 C -8.1 -4.474 -4.474 -8.1 0 -8.1 C 4.473 -8.1 8.1 -4.474 8.1 0 C 8.1 4.473 4.473 8.1 -0.001 8.1 C -0.001 8.1 -7.648 8.1 -7.648 8.1 L -6.365 5.035 C -6.365 5.035 -6.648 4.629 -6.648 4.629 C -7.563 3.317 -8.1 1.723 -8.1 0 Z",transform:"matrix(1 0 0 1 12 12)",fill:"currentColor","fill-rule":"evenodd"},null,-1),C("path",{id:"p1",d:"M 3.6 0.5 L -2.6 0.5 M 0.5 -2.573 L 0.5 3.573",transform:"translate(11.5 11.5)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"},null,-1)])])}const Nfe=kt({name:"kimi-add-conversation",render:$fe}),Ffe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Rfe(e,t){return b(),A("svg",Ffe,[...t[0]||(t[0]=[C("path",{d:"M15.0996 12C15.5967 12 16 12.4033 16 12.9004C15.9998 13.3973 15.5965 13.7998 15.0996 13.7998H8.90039C8.40346 13.7998 8.00021 13.3973 8 12.9004C8 12.4033 8.40333 12 8.90039 12H15.0996Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 3.2002C20.5464 3.2002 21.7998 4.4536 21.7998 6V7C21.7998 8.03565 21.2363 8.93754 20.4004 9.42188V17C20.4004 19.1539 18.6539 20.9004 16.5 20.9004H7.5C5.34609 20.9004 3.59961 19.1539 3.59961 17V9.42188C2.76374 8.93754 2.2002 8.03565 2.2002 7V6C2.2002 4.4536 3.4536 3.2002 5 3.2002H19ZM5.40039 17C5.40039 18.1598 6.3402 19.0996 7.5 19.0996H16.5C17.6598 19.0996 18.5996 18.1598 18.5996 17V9.7998H5.40039V17ZM4.89746 5.00488C4.39333 5.05621 4 5.48232 4 6V7L4.00488 7.10254C4.05278 7.57297 4.42703 7.94722 4.89746 7.99512L5 8H19C19.5523 8 20 7.55228 20 7V6C20 5.44772 19.5523 5 19 5H5L4.89746 5.00488Z",fill:"currentColor"},null,-1)])])}const Ofe=kt({name:"kimi-archive",render:Rfe}),Pfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dfe(e,t){return b(),A("svg",Pfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 21.6387C11.7378 21.988 12.3059 21.987 12.6565 21.6364L18.1949 16.098C18.5464 15.7465 18.5464 15.1766 18.1949 14.8252C17.8434 14.4737 17.2736 14.4737 16.9221 14.8252L12.9201 18.8272V3.00002C12.9201 2.50297 12.5171 2.10003 12.0201 2.10003C11.523 2.10003 11.1201 2.50297 11.1201 3.00002V18.8383L7.07554 14.8229C6.7228 14.4727 6.15295 14.4747 5.80275 14.8275C5.45255 15.1802 5.45461 15.7501 5.80735 16.1003L11.386 21.6387Z",fill:"currentColor"},null,-1)])])}const Bfe=kt({name:"kimi-arrow-down",render:Dfe}),Hfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zfe(e,t){return b(),A("svg",Hfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.16127 12.814C1.81197 12.4622 1.81299 11.8941 2.16357 11.5435L7.70203 6.00506C8.0535 5.65359 8.62335 5.65359 8.97482 6.00506C9.32629 6.35653 9.32629 6.92638 8.97482 7.27785L4.97276 11.2799H20.8C21.297 11.2799 21.7 11.6829 21.7 12.1799C21.7 12.677 21.297 13.0799 20.8 13.0799H4.96171L8.97712 17.1244C9.32732 17.4772 9.32526 18.047 8.97252 18.3972C8.61978 18.7474 8.04993 18.7454 7.69973 18.3926L2.16127 12.814Z",fill:"currentColor"},null,-1)])])}const Wfe=kt({name:"kimi-arrow-left",render:zfe}),Ufe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jfe(e,t){return b(),A("svg",Ufe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.4387 12.814C21.788 12.4622 21.787 11.8941 21.4364 11.5436L15.8979 6.0051C15.5464 5.65363 14.9766 5.65363 14.6251 6.0051C14.2737 6.35657 14.2737 6.92642 14.6251 7.27789L18.6272 11.28H2.79998C2.30293 11.28 1.89998 11.6829 1.89998 12.18C1.89998 12.677 2.30293 13.08 2.79998 13.08H18.6382L14.6228 17.1245C14.2726 17.4772 14.2747 18.0471 14.6274 18.3973C14.9802 18.7475 15.55 18.7454 15.9002 18.3927L21.4387 12.814Z",fill:"currentColor"},null,-1)])])}const Vfe=kt({name:"kimi-arrow-right",render:jfe}),qfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kfe(e,t){return b(),A("svg",qfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 2.36129C11.7378 2.01198 12.3059 2.013 12.6565 2.36358L18.1949 7.90204C18.5464 8.25351 18.5464 8.82336 18.1949 9.17483C17.8434 9.52631 17.2736 9.52631 16.9221 9.17483L12.9201 5.17277V21C12.9201 21.497 12.5171 21.9 12.0201 21.9C11.523 21.9 11.1201 21.497 11.1201 21V5.16172L7.07554 9.17713C6.7228 9.52733 6.15295 9.52527 5.80275 9.17253C5.45255 8.81979 5.45461 8.24995 5.80735 7.89975L11.386 2.36129Z",fill:"currentColor"},null,-1)])])}const Zfe=kt({name:"kimi-arrow-up",render:Kfe}),Gfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Yfe(e,t){return b(),A("svg",Gfe,[...t[0]||(t[0]=[C("path",{d:"M19.3027 5.9053C19.6542 5.55397 20.2247 5.55388 20.5761 5.9053C20.9273 6.25675 20.9273 6.82734 20.5761 7.17874L9.65911 18.0948C9.30773 18.4461 8.73814 18.446 8.38665 18.0948L3.42376 13.1328C3.0726 12.7814 3.07263 12.2118 3.42376 11.8604C3.77524 11.509 4.34575 11.5089 4.6972 11.8604L9.02239 16.1856L19.3027 5.9053Z",fill:"currentColor"},null,-1)])])}const Xfe=kt({name:"kimi-check",render:Yfe}),Jfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Qfe(e,t){return b(),A("svg",Jfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 16.7134C11.743 17.0627 12.3111 17.0617 12.6617 16.7111L19.6364 9.73641C19.9878 9.38494 19.9878 8.81509 19.6364 8.46362C19.2849 8.11215 18.7151 8.11215 18.3636 8.46362L12.023 14.8042L5.63407 8.46132C5.28133 8.11112 4.71149 8.11318 4.36129 8.46592C4.01109 8.81866 4.01314 9.3885 4.36588 9.73871L11.3912 16.7134Z",fill:"currentColor"},null,-1)])])}const e1e=kt({name:"kimi-chevron-down",render:Qfe}),t1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function n1e(e,t){return b(),A("svg",t1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.1261 12.6088C16.4754 12.257 16.4743 11.6889 16.1238 11.3383L9.14904 4.36363C8.79757 4.01216 8.22772 4.01216 7.87625 4.36363C7.52477 4.7151 7.52477 5.28495 7.87625 5.63642L14.2169 11.977L7.87395 18.3659C7.52375 18.7187 7.52581 19.2885 7.87855 19.6387C8.23129 19.9889 8.80113 19.9869 9.15133 19.6341L16.1261 12.6088Z",fill:"currentColor"},null,-1)])])}const o1e=kt({name:"kimi-chevron-right",render:n1e}),s1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i1e(e,t){return b(),A("svg",s1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 8.46132C11.743 8.11202 12.3111 8.11304 12.6617 8.46362L19.6364 15.4383C19.9878 15.7898 19.9878 16.3597 19.6364 16.7111C19.2849 17.0626 18.7151 17.0626 18.3636 16.7111L12.023 10.3705L5.63407 16.7134C5.28133 17.0636 4.71149 17.0616 4.36129 16.7088C4.01109 16.3561 4.01314 15.7862 4.36588 15.436L11.3912 8.46132Z",fill:"currentColor"},null,-1)])])}const r1e=kt({name:"kimi-chevron-up",render:i1e}),l1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function a1e(e,t){return b(),A("svg",l1e,[...t[0]||(t[0]=[C("path",{d:"M11.8999 6.79965C12.397 6.79965 12.7997 7.20235 12.7997 7.69941V11.7266L14.7359 13.6629C15.0873 14.0143 15.0879 14.584 14.7366 14.9355C14.3852 15.287 13.8148 15.287 13.4633 14.9355L11.2632 12.7355C11.0947 12.5668 11.0002 12.338 11.0001 12.0995V7.69941C11.0001 7.20238 11.4029 6.7997 11.8999 6.79965Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 1.89893C17.4677 1.89893 21.9001 6.33147 21.9002 11.7991C21.9002 17.2669 17.4678 21.6993 12 21.6993C6.53228 21.6993 2.09985 17.2669 2.09985 11.7991C2.09998 6.33147 6.53236 1.89893 12 1.89893ZM20.1 11.7998C20.1 7.32616 16.4737 3.69984 12 3.69984C7.5264 3.69984 3.90008 7.32616 3.90008 11.7998C3.90032 16.2732 7.52655 19.8998 12 19.8998C16.4735 19.8998 20.0998 16.2732 20.1 11.7998Z",fill:"currentColor"},null,-1)])])}const u1e=kt({name:"kimi-clock",render:a1e}),c1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function d1e(e,t){return b(),A("svg",c1e,[...t[0]||(t[0]=[C("path",{d:"M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z",fill:"currentColor"},null,-1)])])}const f1e=kt({name:"kimi-close",render:d1e}),p1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h1e(e,t){return b(),A("svg",p1e,[...t[0]||(t[0]=[C("path",{d:"M9.85815 11.957C10.9074 11.957 11.7583 12.8083 11.7585 13.8574V19.8574C11.7585 20.3545 11.3552 20.7578 10.8582 20.7578C10.3611 20.7578 9.95776 20.3545 9.95776 19.8574V13.8574C9.95755 13.8024 9.91325 13.7578 9.85815 13.7578H3.85815C3.3611 13.7578 2.95776 13.3545 2.95776 12.8574C2.95798 12.3605 3.36123 11.957 3.85815 11.957H9.85815Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8582 2.95703C13.3551 2.95703 13.7583 3.36054 13.7585 3.85742V9.85742C13.7585 9.91265 13.8029 9.95703 13.8582 9.95703H19.8582C20.3551 9.95703 20.7583 10.3605 20.7585 10.8574C20.7585 11.3545 20.3552 11.7578 19.8582 11.7578H13.8582C12.8088 11.7578 11.9578 10.9068 11.9578 9.85742V3.85742C11.958 3.36054 12.3612 2.95703 12.8582 2.95703Z",fill:"currentColor"},null,-1)])])}const m1e=kt({name:"kimi-collapse",render:h1e}),g1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function v1e(e,t){return b(),A("svg",g1e,[...t[0]||(t[0]=[C("path",{d:"M11.9004 2.19995C17.3678 2.20016 21.7998 6.63285 21.7998 12.1003C21.7996 17.5677 17.3677 21.9995 11.9004 21.9998H3.80078C2.72946 21.9996 2.00334 20.9089 2.41699 19.9207L3.49805 17.3386C2.54871 15.8189 2.00007 14.0226 2 12.1003C2 6.63272 6.43277 2.19995 11.9004 2.19995ZM11.9004 3.99976C7.42688 3.99976 3.7998 7.62684 3.7998 12.1003C3.79989 13.8228 4.33669 15.4175 5.25195 16.7292L5.53516 17.1345L4.25195 20.2H11.8994C16.3727 20.1999 19.9998 16.5736 20 12.1003C20 7.62697 16.3737 3.99997 11.9004 3.99976ZM8.9541 10.8005C9.75473 10.8006 10.4041 11.4491 10.4043 12.2498C10.4043 13.0505 9.75482 13.6998 8.9541 13.7C8.15329 13.7 7.50391 13.0506 7.50391 12.2498C7.50406 11.4491 8.15339 10.8005 8.9541 10.8005ZM15.1533 10.8005C15.9539 10.8006 16.6034 11.4491 16.6035 12.2498C16.6035 13.0505 15.954 13.6998 15.1533 13.7C14.3525 13.7 13.7031 13.0506 13.7031 12.2498C13.7033 11.4491 14.3526 10.8005 15.1533 10.8005Z",fill:"currentColor"},null,-1)])])}const y1e=kt({name:"kimi-comment",render:v1e}),k1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b1e(e,t){return b(),A("svg",k1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 7.09961C19.1539 7.09961 20.9004 8.84609 20.9004 11V17C20.9004 19.1539 19.1539 20.9004 17 20.9004H11C8.84609 20.9004 7.09961 19.1539 7.09961 17V11C7.09961 8.84609 8.84609 7.09961 11 7.09961H17ZM11 8.90039C9.8402 8.90039 8.90039 9.8402 8.90039 11V17C8.90039 18.1598 9.8402 19.0996 11 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V11C19.0996 9.8402 18.1598 8.90039 17 8.90039H11Z",fill:"currentColor"},null,-1),C("path",{d:"M13 3.09961C14.4447 3.09961 15.705 3.88644 16.3779 5.0498C16.6265 5.47999 16.4789 6.03049 16.0488 6.2793C15.6186 6.52781 15.0681 6.38029 14.8193 5.9502C14.4548 5.32041 13.776 4.90039 13 4.90039H7C5.8402 4.90039 4.90039 5.8402 4.90039 7V13C4.90039 13.776 5.32041 14.4548 5.9502 14.8193C6.38029 15.0681 6.52781 15.6186 6.2793 16.0488C6.03049 16.4789 5.47999 16.6265 5.0498 16.3779C3.88644 15.705 3.09961 14.4447 3.09961 13V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H13Z",fill:"currentColor"},null,-1)])])}const C1e=kt({name:"kimi-copy",render:b1e}),w1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _1e(e,t){return b(),A("svg",w1e,[...t[0]||(t[0]=[C("path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.2797 2.43414 8.66074 3.19922 7.24707C3.20172 7.24246 3.20453 7.23801 3.20703 7.2334C3.33385 6.99995 3.47181 6.77351 3.61621 6.55176C3.73214 6.37355 3.85079 6.19744 3.97754 6.02734C5.35905 4.17471 7.36856 2.81959 9.68945 2.27051C9.69952 2.26813 9.70965 2.26602 9.71973 2.26367C9.85224 2.23276 9.98563 2.2043 10.1201 2.17871C10.1542 2.17221 10.1884 2.16631 10.2227 2.16016C10.3466 2.13791 10.4712 2.11724 10.5967 2.09961C10.6301 2.09489 10.6637 2.0913 10.6973 2.08691C10.8216 2.07073 10.9465 2.05552 11.0723 2.04395C11.1125 2.04022 11.153 2.0384 11.1934 2.03516C11.4595 2.0139 11.7284 2 12 2ZM11.9941 3.7998C11.9968 3.86623 12 3.93292 12 4C12 6.76142 9.76142 9 7 9C6.14209 9 5.33517 8.78324 4.62988 8.40234C4.09862 9.48861 3.7998 10.7093 3.7998 12C3.7998 12.4438 3.83644 12.8791 3.9043 13.3037C4.52807 12.5673 5.45945 12.0996 6.5 12.0996C8.37777 12.0996 9.90039 13.6222 9.90039 15.5C9.90039 17.0702 8.83532 18.3903 7.38867 18.7812C8.70267 19.6765 10.2901 20.2002 12 20.2002C12.468 20.2002 12.9264 20.1583 13.373 20.083C13.1323 19.4342 13 18.7327 13 18C13 14.6863 15.6863 12 19 12C19.4098 12 19.8098 12.0416 20.1963 12.1201C20.1969 12.0801 20.2002 12.0401 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998H11.9941ZM19 13.7998C16.6804 13.7998 14.7998 15.6804 14.7998 18C14.7998 18.5617 14.9112 19.0972 15.1113 19.5869C17.5225 18.597 19.3558 16.4929 19.9727 13.9141C19.6605 13.8399 19.3349 13.7998 19 13.7998ZM6.5 13.9004C5.61634 13.9004 4.90039 14.6163 4.90039 15.5C4.90039 16.3837 5.61634 17.0996 6.5 17.0996C7.38366 17.0996 8.09961 16.3837 8.09961 15.5C8.09961 14.6163 7.38366 13.9004 6.5 13.9004ZM15.5 6.09961C16.8255 6.09961 17.9004 7.17452 17.9004 8.5C17.9004 9.82548 16.8255 10.9004 15.5 10.9004C14.1745 10.9004 13.0996 9.82548 13.0996 8.5C13.0996 7.17452 14.1745 6.09961 15.5 6.09961ZM15.5 7.90039C15.1686 7.90039 14.9004 8.16863 14.9004 8.5C14.9004 8.83137 15.1686 9.09961 15.5 9.09961C15.8314 9.09961 16.0996 8.83137 16.0996 8.5C16.0996 8.16863 15.8314 7.90039 15.5 7.90039ZM10.1992 4C8.35326 4.41375 6.74333 5.44923 5.59961 6.87598C6.02235 7.08306 6.49716 7.2002 7 7.2002C8.76731 7.2002 10.1992 5.76731 10.1992 4Z",fill:"currentColor"},null,-1)])])}const x1e=kt({name:"kimi-dark-mode",render:_1e}),S1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A1e(e,t){return b(),A("svg",S1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.90002C12.4971 2.90002 12.9 3.30297 12.9 3.80002V12.2939L15.8081 9.38585C16.1595 9.03438 16.7294 9.03438 17.0808 9.38585C17.4323 9.73732 17.4323 10.3072 17.0808 10.6586L12.6364 15.1031C12.4676 15.2719 12.2387 15.3667 12 15.3667C11.7613 15.3667 11.5324 15.2719 11.3636 15.1031L6.91917 10.6586C6.5677 10.3072 6.5677 9.73732 6.91917 9.38585C7.27064 9.03438 7.84049 9.03438 8.19196 9.38585L11.1 12.2939V3.80002C11.1 3.30297 11.503 2.90002 12 2.90002ZM4.00001 13.5874C4.49706 13.5874 4.90001 13.9903 4.90001 14.4874V18.043C4.90001 18.2758 4.99249 18.499 5.1571 18.6636C5.32172 18.8282 5.54498 18.9207 5.77778 18.9207H18.2222C18.455 18.9207 18.6783 18.8283 18.8429 18.6636C19.0075 18.499 19.1 18.2758 19.1 18.043V14.4874C19.1 13.9903 19.5029 13.5874 20 13.5874C20.4971 13.5874 20.9 13.9903 20.9 14.4874V18.043C20.9 18.7531 20.6179 19.4342 20.1157 19.9364C19.6135 20.4386 18.9324 20.7207 18.2222 20.7207H5.77778C5.06759 20.7207 4.38649 20.4386 3.88431 19.9364C3.38213 19.4342 3.10001 18.7531 3.10001 18.043V14.4874C3.10001 13.9903 3.50295 13.5874 4.00001 13.5874Z",fill:"currentColor"},null,-1)])])}const M1e=kt({name:"kimi-download",render:A1e}),T1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function E1e(e,t){return b(),A("svg",T1e,[...t[0]||(t[0]=[C("path",{d:"M18.0179 3.09998C18.3963 3.10003 18.7709 3.17491 19.1205 3.31971C19.4701 3.46454 19.7884 3.67614 20.056 3.94373C20.3237 4.21144 20.5362 4.52965 20.681 4.87928C20.8258 5.22887 20.8997 5.60423 20.8997 5.9828C20.8997 6.36118 20.8257 6.73591 20.681 7.08533C20.5362 7.43497 20.3237 7.75317 20.056 8.02088L17.639 10.4379L9.15756 18.9183C8.5296 19.5463 7.74274 19.992 6.8812 20.2074L4.21811 20.8734C3.91148 20.95 3.5871 20.8596 3.36362 20.6361C3.14017 20.4126 3.05063 20.0883 3.12729 19.7816L3.79233 17.1185C4.00771 16.257 4.45344 15.4701 5.08139 14.8422L15.9798 3.94373C16.5203 3.40346 17.2536 3.09998 18.0179 3.09998ZM19.0003 19.1C19.4972 19.1002 19.8997 19.5034 19.8997 20.0004C19.8995 20.4971 19.4971 20.8996 19.0003 20.8998H12.0003C11.5034 20.8998 11.1001 20.4973 11.0999 20.0004C11.0999 19.5033 11.5033 19.1 12.0003 19.1H19.0003ZM18.0179 4.89979C17.7309 4.89979 17.4553 5.01417 17.2523 5.21717L6.35385 16.1146C5.95661 16.5119 5.67469 17.01 5.53842 17.5551L5.23666 18.7631L6.44467 18.4613C6.98971 18.3251 7.48782 18.0431 7.8851 17.6459L18.7826 6.74744C18.883 6.64702 18.9635 6.52821 19.0179 6.39686C19.0723 6.26558 19.0999 6.1247 19.0999 5.9828C19.0999 5.84075 19.0723 5.69916 19.0179 5.56776C18.9635 5.43645 18.883 5.31757 18.7826 5.21717C18.6821 5.11678 18.5631 5.03716 18.432 4.9828C18.3008 4.92845 18.16 4.89983 18.0179 4.89979Z",fill:"currentColor"},null,-1)])])}const I1e=kt({name:"kimi-edit",render:E1e}),L1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $1e(e,t){return b(),A("svg",L1e,[...t[0]||(t[0]=[C("path",{d:"M5 11.0996C5.49693 11.0996 5.90018 11.5031 5.90039 12V18C5.90039 18.0552 5.94477 18.0996 6 18.0996H12C12.4969 18.0996 12.9002 18.5031 12.9004 19C12.9004 19.4971 12.4971 19.9004 12 19.9004H6C4.95066 19.9004 4.09961 19.0493 4.09961 18V12C4.09982 11.5031 4.50307 11.0996 5 11.0996ZM18 4.09961C19.0492 4.09961 19.9002 4.95084 19.9004 6V12C19.9004 12.4971 19.4971 12.9004 19 12.9004C18.5029 12.9004 18.0996 12.4971 18.0996 12V6C18.0994 5.94495 18.0551 5.90039 18 5.90039H12C11.5029 5.90039 11.0996 5.49706 11.0996 5C11.0998 4.50312 11.5031 4.09961 12 4.09961H18Z",fill:"currentColor"},null,-1)])])}const N1e=kt({name:"kimi-expand",render:$1e}),F1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function R1e(e,t){return b(),A("svg",F1e,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1723 2.1001C13.9413 2.10018 14.6793 2.40592 15.2231 2.94971L19.0512 6.77783C19.595 7.32162 19.9007 8.0596 19.9008 8.82861V18.0005C19.9008 20.1544 18.1543 21.9009 16.0004 21.9009H8.0004C5.84649 21.9009 4.10001 20.1544 4.10001 18.0005V6.00049C4.10001 3.84658 5.84649 2.1001 8.0004 2.1001H13.1723ZM8.0004 3.90088C6.8406 3.90088 5.90079 4.84069 5.90079 6.00049V18.0005C5.90079 19.1603 6.8406 20.1001 8.0004 20.1001H16.0004C17.1602 20.1001 18.1 19.1603 18.1 18.0005V9.90088H15.0004C13.3988 9.90088 12.1 8.60211 12.1 7.00049V3.90088H8.0004ZM13.9008 7.00049C13.9008 7.608 14.3929 8.1001 15.0004 8.1001H17.8217C17.8072 8.08375 17.7933 8.06681 17.7777 8.05127L13.9496 4.22314C13.9339 4.20745 13.9173 4.19286 13.9008 4.17822V7.00049Z",fill:"currentColor"})],-1)])])}const X_=kt({name:"kimi-file",render:R1e}),O1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P1e(e,t){return b(),A("svg",O1e,[...t[0]||(t[0]=[C("path",{d:"M15.4795 15.4971C15.9765 15.4971 16.3799 15.9004 16.3799 16.3975C16.3799 16.8945 15.9765 17.2978 15.4795 17.2979H8.52051C8.02345 17.2979 7.62012 16.8945 7.62012 16.3975C7.62012 15.9004 8.02345 15.4971 8.52051 15.4971H15.4795Z",fill:"currentColor"},null,-1),C("path",{d:"M12.3359 11.0996C12.8329 11.0997 13.2354 11.503 13.2354 12C13.2354 12.497 12.8329 12.9003 12.3359 12.9004H8.52051C8.02345 12.9004 7.62012 12.4971 7.62012 12C7.62012 11.5029 8.02345 11.0996 8.52051 11.0996H12.3359Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1719 2.09961C13.9408 2.09969 14.6789 2.40555 15.2227 2.94922L19.0508 6.77734C19.5946 7.32113 19.9003 8.05911 19.9004 8.82812V18C19.9004 20.1539 18.1539 21.9004 16 21.9004H8C5.84626 21.9002 4.09961 20.1538 4.09961 18V6C4.09961 3.84621 5.84626 2.09981 8 2.09961H13.1719ZM8 3.90039C6.84037 3.90059 5.90039 4.84032 5.90039 6V18C5.90039 19.1597 6.84037 20.0994 8 20.0996H16C17.1598 20.0996 18.0996 19.1598 18.0996 18V9.90039H15C13.3985 9.90019 12.0996 8.6015 12.0996 7V3.90039H8ZM13.9004 7C13.9004 7.60739 14.3927 8.09941 15 8.09961H17.8213C17.8068 8.08333 17.7928 8.06626 17.7773 8.05078L13.9492 4.22266C13.9335 4.20696 13.9169 4.19237 13.9004 4.17773V7Z",fill:"currentColor"},null,-1)])])}const D1e=kt({name:"kimi-file-text",render:P1e}),B1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H1e(e,t){return b(),A("svg",B1e,[...t[0]||(t[0]=[C("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 z1e=kt({name:"kimi-folder",render:H1e}),W1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U1e(e,t){return b(),A("svg",W1e,[...t[0]||(t[0]=[C("g",null,[C("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"})],-1)])])}const j1e=kt({name:"kimi-folder-open",render:U1e}),V1e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function q1e(e,t){return b(),A("svg",V1e,[...t[0]||(t[0]=[C("path",{id:"af-p0",d:"M -2.619 -8.3 C -1.815 -8.3 -1.048 -7.97 -0.499 -7.39 C -0.499 -7.39 0.141 -6.712 0.141 -6.712 C 0.141 -6.712 5.75 -6.712 5.75 -6.712 C 7.904 -6.712 9.65 -4.986 9.65 -2.858 C 9.65 -2.858 9.65 -1.71 9.65 -1.71 C 9.65 -1.219 9.247 -0.821 8.75 -0.821 C 8.253 -0.821 7.85 -1.219 7.85 -1.71 C 7.85 -1.71 7.85 -2.858 7.85 -2.858 C 7.849 -4.004 6.91 -4.934 5.75 -4.934 C 5.75 -4.934 -0.207 -4.934 -0.207 -4.934 C -0.484 -4.934 -0.749 -5.047 -0.938 -5.247 C -0.938 -5.247 -1.815 -6.177 -1.815 -6.177 C -2.023 -6.397 -2.315 -6.521 -2.619 -6.521 C -2.619 -6.521 -6.25 -6.521 -6.25 -6.521 C -7.41 -6.521 -8.35 -5.592 -8.35 -4.446 C -8.35 -4.446 -8.35 4.446 -8.35 4.446 C -8.35 5.592 -7.41 6.521 -6.25 6.521 C -6.25 6.521 1.25 6.521 1.25 6.521 C 1.747 6.521 2.15 6.919 2.15 7.41 C 2.15 7.901 1.747 8.3 1.25 8.3 C 1.25 8.3 -6.25 8.3 -6.25 8.3 C -8.404 8.3 -10.15 6.574 -10.15 4.446 C -10.15 4.446 -10.15 -4.446 -10.15 -4.446 C -10.15 -6.574 -8.404 -8.3 -6.25 -8.3 C -6.25 -8.3 -2.619 -8.3 -2.619 -8.3 Z M 3.75 -2.5 C 4.247 -2.5 4.65 -2.097 4.65 -1.6 C 4.65 -1.103 4.247 -0.699 3.75 -0.699 C 3.75 -0.699 -4.25 -0.699 -4.25 -0.699 C -4.747 -0.699 -5.15 -1.103 -5.15 -1.6 C -5.15 -2.097 -4.747 -2.5 -4.25 -2.5 C -4.25 -2.5 3.75 -2.5 3.75 -2.5 Z",transform:"matrix(1 0 0 1 11.75 12)",fill:"currentColor"},null,-1),C("g",{id:"af-p1"},[C("path",{d:"M 2.635 0 L -2.635 0 M 0 -2.635 L 0 2.635",transform:"matrix(1 0 0 1 18.4 16.3)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1)])])}const K1e=kt({name:"kimi-folder-plus",render:q1e}),Z1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G1e(e,t){return b(),A("svg",Z1e,[...t[0]||(t[0]=[C("path",{d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 19.2002C15.9764 19.2002 19.2002 15.9764 19.2002 12C19.2002 8.02355 15.9764 4.7998 12 4.7998V19.2002Z",fill:"currentColor"},null,-1)])])}const Y1e=kt({name:"kimi-follow-system",render:G1e}),X1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J1e(e,t){return b(),A("svg",X1e,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7ZM12 15.6992C12.4968 15.6992 12.8994 16.1028 12.8994 16.5996C12.8994 17.0964 12.4968 17.5 12 17.5C11.5024 17.5 11.0996 17.0964 11.0996 16.5996C11.0996 16.1028 11.5024 15.6992 12 15.6992ZM12 6.49902C12.4969 6.49922 12.8994 6.86908 12.8994 7.3252V13.6729C12.8994 14.129 12.4969 14.4988 12 14.499C11.5029 14.499 11.0996 14.1291 11.0996 13.6729V7.3252C11.0996 6.86896 11.5029 6.49902 12 6.49902Z",fill:"currentColor"},null,-1)])])}const Q1e=kt({name:"kimi-full-access",render:J1e}),epe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tpe(e,t){return b(),A("svg",epe,[...t[0]||(t[0]=[C("path",{d:"M12.5092 2.11279C17.7402 2.37781 21.8998 6.70364 21.8998 12.0005C21.8996 17.4153 17.5524 21.8108 12.1576 21.895C12.1056 21.898 12.0532 21.8999 12.0004 21.8999C11.948 21.8999 11.8954 21.8968 11.8432 21.896L11.8422 21.895C6.44751 21.8107 2.10022 17.4152 2.10001 12.0005C2.10001 6.53287 6.53278 2.1001 12.0004 2.1001L12.5092 2.11279ZM8.92715 13.0005C9.02896 14.9787 9.42581 16.721 9.99356 17.9985C10.3249 18.7441 10.6971 19.292 11.0639 19.6411C11.4259 19.9855 11.741 20.1001 12.0004 20.1001C12.2598 20.1 12.5749 19.9856 12.9369 19.6411C13.3037 19.292 13.6749 18.7441 14.0063 17.9985C14.574 16.721 14.9718 14.9788 15.0736 13.0005H8.92715ZM3.96329 13.0005C4.31462 15.8522 6.14714 18.2427 8.66837 19.3823C8.55544 19.1733 8.44916 18.9552 8.34903 18.73C7.66574 17.1926 7.22657 15.1926 7.12344 13.0005H3.96329ZM16.8764 13.0005C16.7732 15.1926 16.3341 17.1926 15.6508 18.73C15.5506 18.9554 15.4435 19.1732 15.3305 19.3823C17.8522 18.2429 19.6851 15.8525 20.0365 13.0005H16.8764ZM8.66934 4.6167C6.08869 5.78266 4.22826 8.25964 3.93985 11.1997H7.11661C7.20176 8.92954 7.64512 6.85497 8.34903 5.271C8.4494 5.04516 8.5561 4.82619 8.66934 4.6167ZM12.0004 3.8999C11.7411 3.8999 11.4259 4.01454 11.0639 4.35889C10.6971 4.70797 10.3249 5.25587 9.99356 6.00146C9.40671 7.32188 9.00186 9.13885 8.91739 11.1997H15.0834C14.9989 9.13884 14.5931 7.32189 14.0063 6.00146C13.6749 5.2559 13.3037 4.70796 12.9369 4.35889C12.5749 4.0144 12.2598 3.90002 12.0004 3.8999ZM15.3295 4.61572C15.443 4.82559 15.5502 5.04471 15.6508 5.271C16.3547 6.85498 16.799 8.92949 16.8842 11.1997H20.06C19.7715 8.25914 17.9108 5.78143 15.3295 4.61572Z",fill:"currentColor"},null,-1)])])}const npe=kt({name:"kimi-globe",render:tpe}),ope={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function spe(e,t){return b(),A("svg",ope,[...t[0]||(t[0]=[C("path",{d:"M8 17C8.82834 17 9.5 17.6717 9.5 18.5C9.5 19.3283 8.82834 20 8 20C7.17166 20 6.5 19.3283 6.5 18.5C6.5 17.6717 7.17166 17 8 17ZM16 17C16.8283 17 17.5 17.6717 17.5 18.5C17.5 19.3283 16.8283 20 16 20C15.1717 20 14.5 19.3283 14.5 18.5C14.5 17.6717 15.1717 17 16 17ZM8 10.5C8.82834 10.5 9.5 11.1717 9.5 12C9.5 12.8283 8.82834 13.5 8 13.5C7.17166 13.5 6.5 12.8283 6.5 12C6.5 11.1717 7.17166 10.5 8 10.5ZM16 10.5C16.8283 10.5 17.5 11.1717 17.5 12C17.5 12.8283 16.8283 13.5 16 13.5C15.1717 13.5 14.5 12.8283 14.5 12C14.5 11.1717 15.1717 10.5 16 10.5ZM8 4C8.82834 4 9.5 4.67166 9.5 5.5C9.5 6.32834 8.82834 7 8 7C7.17166 7 6.5 6.32834 6.5 5.5C6.5 4.67166 7.17166 4 8 4ZM16 4C16.8283 4 17.5 4.67166 17.5 5.5C17.5 6.32834 16.8283 7 16 7C15.1717 7 14.5 6.32834 14.5 5.5C14.5 4.67166 15.1717 4 16 4Z",fill:"currentColor"},null,-1)])])}const ipe=kt({name:"kimi-grip",render:spe}),rpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lpe(e,t){return b(),A("svg",rpe,[...t[0]||(t[0]=[C("path",{d:"M7.22264 6.10352C7.22264 5.5078 7.48259 4.95449 7.91405 4.56055C8.34271 4.16918 8.90831 3.96198 9.48241 3.96191C9.64155 3.96191 9.80001 3.97936 9.95507 4.01074C10.0127 3.5042 10.2586 3.04178 10.6338 2.69922C11.0625 2.30778 11.6279 2.09961 12.2021 2.09961C12.7763 2.09966 13.3418 2.30783 13.7705 2.69922C13.9947 2.90401 14.1709 3.15244 14.29 3.42676C14.4947 3.37044 14.7071 3.34182 14.9209 3.3418C15.4951 3.3418 16.0605 3.549 16.4892 3.94043C16.8644 4.28293 17.1093 4.74548 17.167 5.25195C17.3223 5.22045 17.4812 5.20312 17.6406 5.20312C18.2147 5.20318 18.7803 5.41135 19.209 5.80273C19.6402 6.19663 19.9004 6.74922 19.9004 7.34473V14.6543C19.9004 17.413 19.2914 19.0434 18.0137 20.21C16.82 21.2998 15.2175 21.9004 13.5615 21.9004C11.7538 21.9004 10.2315 21.5696 8.95702 20.8535C7.67664 20.1341 6.71683 19.0652 5.97362 17.708L3.3496 12.916C3.18848 12.6213 3.10112 12.2914 3.0996 11.9531C3.09812 11.6147 3.18309 11.2835 3.34179 10.9873C3.5001 10.692 3.72639 10.4416 3.99706 10.251C4.26771 10.0604 4.57776 9.93235 4.90136 9.87305C5.56617 9.75102 6.25934 9.84517 6.86425 10.1445C6.9942 10.2088 7.11461 10.2788 7.22264 10.3477V6.10352ZM9.02343 12.7969C9.02336 13.1912 8.76624 13.5395 8.38964 13.6562C8.0129 13.773 7.60387 13.6309 7.38085 13.3057L6.53514 12.0723C6.51218 12.0529 6.48411 12.0282 6.45018 12.002C6.34595 11.9213 6.20986 11.8289 6.06639 11.7578C5.81525 11.6335 5.51637 11.5904 5.22655 11.6436H5.22557C5.15055 11.6573 5.08558 11.6865 5.03417 11.7227C4.98289 11.7588 4.94815 11.7998 4.92772 11.8379C4.90762 11.8755 4.90023 11.9122 4.90038 11.9453C4.90057 11.9782 4.9084 12.0144 4.9287 12.0518L7.55272 16.8438C8.16912 17.9693 8.90989 18.7622 9.83886 19.2842C10.7737 19.8094 11.9704 20.0996 13.5615 20.0996C14.7902 20.0996 15.9536 19.6533 16.7998 18.8809C17.5619 18.185 18.0996 17.1383 18.0996 14.6543V7.34473C18.0996 7.28204 18.0734 7.20342 17.9951 7.13184C17.9139 7.05771 17.7875 7.00396 17.6406 7.00391C17.4937 7.00391 17.3674 7.05771 17.2861 7.13184C17.2077 7.20347 17.1807 7.28199 17.1807 7.34473V11.0693C17.1805 11.5661 16.778 11.9685 16.2812 11.9688C15.7843 11.9688 15.381 11.5662 15.3808 11.0693V5.48242C15.3808 5.41973 15.3537 5.34107 15.2754 5.26953C15.1941 5.19547 15.0677 5.1416 14.9209 5.1416C14.774 5.14166 14.6476 5.19541 14.5664 5.26953C14.4881 5.34105 14.462 5.41974 14.4619 5.48242V11.0693C14.4617 11.5662 14.0584 11.9688 13.5615 11.9688C13.0646 11.9687 12.6613 11.5662 12.6611 11.0693V4.24121C12.6611 4.17852 12.635 4.09989 12.5566 4.02832C12.4754 3.95419 12.349 3.90045 12.2021 3.90039C12.0552 3.90039 11.9289 3.95421 11.8476 4.02832C11.7692 4.09992 11.7422 4.17849 11.7422 4.24121V11.0693C11.742 11.5661 11.3395 11.9685 10.8428 11.9688C10.3458 11.9688 9.94257 11.5662 9.94237 11.0693V6.10352L9.93651 6.05371C9.92534 6.00177 9.89573 5.94433 9.8369 5.89062C9.75567 5.81647 9.62938 5.76172 9.48241 5.76172C9.33554 5.76179 9.2091 5.81651 9.12792 5.89062C9.04964 5.96222 9.02343 6.04084 9.02343 6.10352V12.7969Z",fill:"currentColor"},null,-1)])])}const ape=kt({name:"kimi-hand",render:lpe}),upe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cpe(e,t){return b(),A("svg",upe,[...t[0]||(t[0]=[C("path",{d:"M4 3.33203C4.55224 3.33203 4.99993 3.7798 5 4.33203V18.0908H20.0674C20.6195 18.0908 21.0671 18.5388 21.0674 19.0908C21.0674 19.6431 20.6197 20.0908 20.0674 20.0908H5C3.89543 20.0908 3 19.1954 3 18.0908V4.33203C3.00007 3.7798 3.44776 3.33203 4 3.33203ZM8.19922 9.28418C8.7515 9.28418 9.19922 9.73189 9.19922 10.2842V15.6045C9.19908 16.1567 8.75142 16.6045 8.19922 16.6045C7.64719 16.6043 7.19936 16.1565 7.19922 15.6045V10.2842C7.19922 9.73202 7.6471 9.28438 8.19922 9.28418ZM17.2227 6.85645C17.7748 6.85658 18.2226 7.3043 18.2227 7.85645V15.6045C18.2225 16.1566 17.7747 16.6044 17.2227 16.6045C16.6705 16.6045 16.2228 16.1566 16.2227 15.6045V7.85645C16.2227 7.30422 16.6704 6.85645 17.2227 6.85645ZM12.7109 3.96387C13.2631 3.96387 13.7107 4.41175 13.7109 4.96387V15.6035C13.7109 16.1558 13.2632 16.6035 12.7109 16.6035C12.1587 16.6035 11.7109 16.1558 11.7109 15.6035V4.96387C11.7111 4.41175 12.1588 3.96387 12.7109 3.96387Z",fill:"currentColor"},null,-1)])])}const dpe=kt({name:"kimi-histogram",render:cpe}),fpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ppe(e,t){return b(),A("svg",fpe,[...t[0]||(t[0]=[C("path",{d:"M8.00916 7.50488C8.47326 7.50488 8.91828 7.68943 9.24646 8.01758C9.57465 8.34577 9.75916 8.79075 9.75916 9.25488C9.75916 9.71901 9.57465 10.164 9.24646 10.4922C8.91828 10.8203 8.47326 11.0049 8.00916 11.0049C7.54507 11.0049 7.10001 10.8203 6.77185 10.4922C6.4437 10.164 6.25916 9.71898 6.25916 9.25488C6.25916 8.79078 6.4437 8.34576 6.77185 8.01758C7.10001 7.68942 7.54507 7.50492 8.00916 7.50488Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8998 4.09961C20.0537 4.09961 21.8002 5.84609 21.8002 8V16C21.8002 18.1539 20.0537 19.9004 17.8998 19.9004H5.89978C3.74598 19.9003 1.99939 18.1538 1.99939 16V8C1.99939 5.84617 3.74598 4.09974 5.89978 4.09961H17.8998ZM15.4867 12.2539C15.448 12.2184 15.3885 12.2192 15.351 12.2559L11.7338 15.8027C11.0146 16.5079 9.87305 16.5222 9.13708 15.835L6.98669 13.8262C6.95049 13.7924 6.89516 13.791 6.85681 13.8223L3.82361 16.2988C3.96873 17.3168 4.84165 18.0995 5.89978 18.0996H17.8998C18.9375 18.0996 19.7964 17.3466 19.9662 16.3574L15.4867 12.2539ZM5.89978 5.90039C4.74009 5.90052 3.80017 6.84028 3.80017 8V14.002L5.73181 12.4238C6.46046 11.8286 7.51253 11.8634 8.20056 12.5059L10.351 14.5146C10.3897 14.5508 10.4498 14.5497 10.4877 14.5127L14.1049 10.9658C14.819 10.2656 15.9506 10.2466 16.6879 10.9219L19.9994 13.9551V8C19.9994 6.8402 19.0596 5.90039 17.8998 5.90039H5.89978Z",fill:"currentColor"},null,-1)])])}const hpe=kt({name:"kimi-image",render:ppe}),mpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gpe(e,t){return b(),A("svg",mpe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.09375 2.81174C5.4825 2.50796 6.04376 2.56488 6.34766 2.93869L20.1855 19.9602C20.4895 20.3341 20.421 20.8836 20.0322 21.1877C19.6435 21.4917 19.0823 21.4355 18.7783 21.0617L17.9971 20.1008H5.99609C3.84224 20.1008 2.0958 18.3552 2.0957 16.2014V8.13889C2.09589 6.26755 3.41429 4.70428 5.17285 4.32639L4.93945 4.03928C4.63577 3.66536 4.7051 3.11573 5.09375 2.81174ZM7.13184 14.1096C7.09416 14.0738 7.03659 14.0713 6.99609 14.1037L3.92871 16.5569C4.09761 17.5472 4.95753 18.301 5.99609 18.301H16.5342L13.373 14.4133L11.9072 15.9455C11.1531 16.7324 9.92202 16.7621 9.13281 16.0119L7.13184 14.1096ZM5.99609 6.03928C4.83643 6.03928 3.89669 6.97927 3.89648 8.13889V14.1408L5.83496 12.5901C6.60469 11.9742 7.69929 12.022 8.41504 12.7024L10.416 14.6037C10.4575 14.6431 10.5218 14.642 10.5615 14.6008L12.1641 12.926L9.78906 10.0051C9.70282 10.2646 9.55682 10.5038 9.35645 10.7004C9.02202 11.0285 8.56767 11.2131 8.09473 11.2131C7.62195 11.213 7.1683 11.0284 6.83398 10.7004C6.49961 10.3724 6.31152 9.92701 6.31152 9.46311C6.3116 8.99941 6.49981 8.55474 6.83398 8.22678C7.12986 7.93654 7.51931 7.75901 7.93262 7.7219L6.56543 6.03928H5.99609Z",fill:"currentColor"},null,-1),C("path",{d:"M18.0049 4.31272C20.1587 4.31288 21.9043 6.0593 21.9043 8.21311V13.718C21.9039 15.4743 19.7248 16.2906 18.5713 14.966L14.9141 10.7658C14.5882 10.3912 14.6278 9.82271 15.002 9.49631C15.3768 9.16994 15.9451 9.20948 16.2715 9.5842L19.9287 13.7844C19.9528 13.812 19.9696 13.8167 19.9775 13.8186C19.9908 13.8216 20.0141 13.8213 20.04 13.8117C20.0655 13.8021 20.0826 13.7875 20.0908 13.7766C20.0955 13.7702 20.1044 13.7552 20.1045 13.718V8.21311C20.1045 7.05341 19.1645 6.11366 18.0049 6.1135H10.6328C10.1361 6.11327 9.73267 5.70981 9.73242 5.21311C9.73242 4.71619 10.136 4.31295 10.6328 4.31272H18.0049Z",fill:"currentColor"},null,-1)])])}const vpe=kt({name:"kimi-image-failed",render:gpe}),ype={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kpe(e,t){return b(),A("svg",ype,[...t[0]||(t[0]=[C("path",{d:"M12 2.1001C17.4676 2.10031 21.8994 6.53286 21.8994 12.0005C21.8992 17.4679 17.4674 21.8997 12 21.8999C6.53237 21.8999 2.09982 17.4681 2.09961 12.0005C2.09961 6.53273 6.53224 2.1001 12 2.1001ZM12 3.8999C7.52636 3.8999 3.89941 7.52684 3.89941 12.0005C3.89963 16.474 7.52649 20.1001 12 20.1001C16.4733 20.0999 20.0994 16.4738 20.0996 12.0005C20.0996 7.52697 16.4735 3.90011 12 3.8999ZM12 9.50049C12.4969 9.50068 12.8994 9.87055 12.8994 10.3267V16.6743C12.8992 17.1303 12.4968 17.5003 12 17.5005C11.503 17.5005 11.0998 17.1304 11.0996 16.6743V10.3267C11.0996 9.87043 11.5029 9.50049 12 9.50049ZM12 6.49951C12.4968 6.49951 12.8994 6.90313 12.8994 7.3999C12.8992 7.8965 12.4966 8.30029 12 8.30029C11.5025 8.30028 11.0998 7.8965 11.0996 7.3999C11.0996 6.90313 11.5024 6.49952 12 6.49951Z",fill:"currentColor"},null,-1)])])}const bpe=kt({name:"kimi-info",render:kpe}),Cpe={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function wpe(e,t){return b(),A("svg",Cpe,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const _pe=kt({name:"kimi-left-panel",render:wpe}),xpe={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Spe(e,t){return b(),A("svg",xpe,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow-expand",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const Ape=kt({name:"kimi-left-panel-expand",render:Spe}),Mpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tpe(e,t){return b(),A("svg",Mpe,[...t[0]||(t[0]=[Ac('',1)])])}const Epe=kt({name:"kimi-light-mode",render:Tpe}),Ipe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Lpe(e,t){return b(),A("svg",Ipe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.97427 8.06961C4.99348 7.33581 6.18946 7.1 7.00001 7.1H9.00001C9.49706 7.1 9.90001 7.50294 9.90001 8C9.90001 8.49706 9.49706 8.9 9.00001 8.9H7.00001C6.47755 8.9 5.67353 9.06419 5.02599 9.53039C4.42434 9.96356 3.90001 10.6934 3.90001 12C3.90001 13.3066 4.42434 14.0364 5.02599 14.4696C5.67353 14.9358 6.47755 15.1 7.00001 15.1H9.00001C9.49706 15.1 9.90001 15.5029 9.90001 16C9.90001 16.4971 9.49706 16.9 9.00001 16.9H7.00001C6.18946 16.9 4.99348 16.6642 3.97427 15.9304C2.90917 15.1636 2.10001 13.8934 2.10001 12C2.10001 10.1066 2.90917 8.83644 3.97427 8.06961ZM14.1 8C14.1 7.50294 14.5029 7.1 15 7.1H17C17.8105 7.1 19.0065 7.33581 20.0257 8.06961C21.0908 8.83644 21.9 10.1066 21.9 12C21.9 13.8934 21.0908 15.1636 20.0257 15.9304C19.0065 16.6642 17.8105 16.9 17 16.9H15C14.5029 16.9 14.1 16.4971 14.1 16C14.1 15.5029 14.5029 15.1 15 15.1H17C17.5225 15.1 18.3265 14.9358 18.974 14.4696C19.5757 14.0364 20.1 13.3066 20.1 12C20.1 10.6934 19.5757 9.96356 18.974 9.53039C18.3265 9.06419 17.5225 8.9 17 8.9H15C14.5029 8.9 14.1 8.49706 14.1 8ZM7.10001 12C7.10001 11.5029 7.50295 11.1 8.00001 11.1H16C16.4971 11.1 16.9 11.5029 16.9 12C16.9 12.4971 16.4971 12.9 16 12.9H8.00001C7.50295 12.9 7.10001 12.4971 7.10001 12Z",fill:"currentColor"},null,-1)])])}const $pe=kt({name:"kimi-link",render:Lpe}),Npe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fpe(e,t){return b(),A("svg",Npe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.10001 5.99998C4.10001 5.50292 4.50295 5.09998 5.00001 5.09998H19C19.4971 5.09998 19.9 5.50292 19.9 5.99998C19.9 6.49703 19.4971 6.89998 19 6.89998H5.00001C4.50295 6.89998 4.10001 6.49703 4.10001 5.99998ZM4.10001 12C4.10001 11.5029 4.50295 11.1 5.00001 11.1H19C19.4971 11.1 19.9 11.5029 19.9 12C19.9 12.497 19.4971 12.9 19 12.9H5.00001C4.50295 12.9 4.10001 12.497 4.10001 12ZM4.10001 18C4.10001 17.5029 4.50295 17.1 5.00001 17.1H19C19.4971 17.1 19.9 17.5029 19.9 18C19.9 18.497 19.4971 18.9 19 18.9H5.00001C4.50295 18.9 4.10001 18.497 4.10001 18Z",fill:"currentColor"},null,-1)])])}const Rpe=kt({name:"kimi-list",render:Fpe}),Ope={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ppe(e,t){return b(),A("svg",Ope,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 4.09961C20.1539 4.09961 21.9004 5.84609 21.9004 8V16C21.9004 18.1539 20.1539 19.9004 18 19.9004H6C3.84609 19.9004 2.09961 18.1539 2.09961 16V8C2.09961 5.84609 3.84609 4.09961 6 4.09961H18ZM3.90039 16C3.90039 17.1598 4.8402 18.0996 6 18.0996H18C19.1598 18.0996 20.0996 17.1598 20.0996 16V9.49805L13.5361 13.5361C12.5955 14.1147 11.4075 14.1084 10.4727 13.5205L3.90039 9.38672V16ZM6 5.90039C5.0746 5.90039 4.29039 6.49909 4.01074 7.33008L11.4316 11.9971C11.7861 12.2199 12.2361 12.2222 12.5928 12.0029L20.0195 7.43457C19.7725 6.54993 18.9636 5.90039 18 5.90039H6Z",fill:"currentColor"})],-1)])])}const Dpe=kt({name:"kimi-mail",render:Ppe}),Bpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hpe(e,t){return b(),A("svg",Bpe,[...t[0]||(t[0]=[C("path",{d:"M17 11.0996C17.4971 11.0996 17.9004 11.5029 17.9004 12C17.9004 12.4971 17.4971 12.9004 17 12.9004H7C6.50294 12.9004 6.09961 12.4971 6.09961 12C6.09961 11.5029 6.50294 11.0996 7 11.0996H17Z",fill:"currentColor"},null,-1)])])}const zpe=kt({name:"kimi-minus",render:Hpe}),Wpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Upe(e,t){return b(),A("svg",Wpe,[...t[0]||(t[0]=[C("path",{d:"M15.182 3.32802C15.9304 2.72235 17.0309 2.76978 17.724 3.46767L18.5424 4.29189L18.6722 4.43642C19.2377 5.13495 19.234 6.1404 18.6635 6.83486L18.5326 6.97841L18.0248 7.48232C17.9549 7.55172 17.8793 7.61254 17.8021 7.66884C17.9794 8.18027 17.9316 8.7498 17.6595 9.22841C17.6847 9.24522 17.7091 9.2635 17.7328 9.2831L17.8002 9.3456L17.9847 9.53798C19.8515 11.5442 20.4549 14.0022 19.6224 16.2196C19.1921 17.3657 18.4025 18.3827 17.2992 19.203H19.0873L19.1801 19.2079C19.6337 19.2542 19.9877 19.6375 19.9877 20.1034C19.9876 20.5692 19.6337 20.9527 19.1801 20.9989L19.0873 21.0028H13.0385C13.0244 21.0033 13.0104 21.0031 12.9965 21.0028H4.9115C4.41448 21.0028 4.01117 20.6004 4.01111 20.1034C4.01111 19.6064 4.41444 19.203 4.9115 19.203H12.9047C15.7614 18.5471 17.3679 17.1023 17.9369 15.5868C18.4678 14.1726 18.179 12.4782 16.807 10.9188L16.5189 10.6093L16.4574 10.5399C16.4549 10.5368 16.453 10.5333 16.4506 10.5302L12.3011 14.6522C11.6031 15.3454 10.5023 15.3845 9.75818 14.7733L9.61365 14.6425L7.31091 12.3231C6.5717 11.5786 6.57617 10.376 7.32068 9.63662L12.3676 4.62392L12.5121 4.49404C13.0358 4.06988 13.7318 3.96755 14.3402 4.18251C14.3969 4.10597 14.4591 4.03197 14.5287 3.96279L15.0365 3.45791L15.182 3.32802ZM4.83044 12.9335C5.16112 12.6052 5.68305 12.5863 6.03552 12.8759L6.10291 12.9384L9.07361 15.9286L9.13513 15.997C9.42218 16.3514 9.3992 16.8727 9.06873 17.2011C8.7381 17.5294 8.21712 17.5482 7.86462 17.2587L7.79626 17.1972L4.82654 14.2069L4.76501 14.1376C4.47792 13.7831 4.49979 13.2619 4.83044 12.9335ZM13.6693 5.87978L13.6361 5.90126L8.58826 10.914C8.54935 10.9529 8.54943 11.0165 8.58826 11.0556L10.891 13.3739L10.9242 13.3964C10.9602 13.4111 11.0032 13.404 11.0326 13.3749L16.0795 8.3622L16.1019 8.329C16.1117 8.3049 16.1117 8.2779 16.1019 8.2538L16.0804 8.2206L13.7777 5.90224C13.7486 5.87289 13.7054 5.86535 13.6693 5.87978ZM16.3383 4.71376L16.3051 4.73525L15.7972 5.24013C15.7584 5.27904 15.7585 5.34166 15.7972 5.38076L16.6146 6.20498L16.6478 6.22744C16.6838 6.24221 16.7268 6.23487 16.7562 6.20595L17.264 5.70107L17.2865 5.66787C17.2962 5.64382 17.2963 5.61672 17.2865 5.59267L17.265 5.55947L16.4467 4.73623C16.4174 4.70681 16.3744 4.6992 16.3383 4.71376Z",fill:"currentColor"},null,-1)])])}const jpe=kt({name:"kimi-microscope",render:Upe}),Vpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qpe(e,t){return b(),A("svg",Vpe,[...t[0]||(t[0]=[C("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),C("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),C("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 Kpe=kt({name:"kimi-more",render:qpe}),Zpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gpe(e,t){return b(),A("svg",Zpe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 12.0993C8.49691 12.0993 8.90016 12.5028 8.90039 12.9997V17.9997C8.90039 19.6013 7.60163 20.9001 6 20.9001C4.39837 20.9001 3.09961 19.6013 3.09961 17.9997C3.09984 16.3982 4.39852 15.0993 6 15.0993C6.38939 15.0993 6.76033 15.1778 7.09961 15.317V12.9997C7.09984 12.5028 7.50309 12.0993 8 12.0993ZM6 16.9001C5.39263 16.9001 4.90062 17.3923 4.90039 17.9997C4.90039 18.6072 5.39249 19.0993 6 19.0993C6.60751 19.0993 7.09961 18.6072 7.09961 17.9997C7.09938 17.3923 6.60737 16.9001 6 16.9001Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.627 3.35611C19.8025 3.12106 20.9001 4.02068 20.9004 5.21939V15.9997C20.9004 17.6013 19.6016 18.9001 18 18.9001C16.3984 18.9001 15.0996 17.6013 15.0996 15.9997C15.0998 14.3982 16.3985 13.0993 18 13.0993C18.3894 13.0993 18.7603 13.1778 19.0996 13.317V9.21939C19.0993 9.15657 19.0421 9.10946 18.9805 9.12173L12.6768 10.3825C12.1894 10.4799 11.7148 10.1637 11.6172 9.67642C11.52 9.18922 11.8361 8.71439 12.3232 8.61685L18.627 7.35611C18.7868 7.32415 18.9452 7.31502 19.0996 7.32291V5.21939C19.0993 5.15657 19.0421 5.10946 18.9805 5.12173L12.6768 6.38248C12.1894 6.47994 11.7148 6.16372 11.6172 5.67642C11.52 5.18922 11.8361 4.71439 12.3232 4.61685L18.627 3.35611ZM18 14.9001C17.3926 14.9001 16.9006 15.3923 16.9004 15.9997C16.9004 16.6072 17.3925 17.0993 18 17.0993C18.6075 17.0993 19.0996 16.6072 19.0996 15.9997C19.0994 15.3923 18.6074 14.9001 18 14.9001Z",fill:"currentColor"},null,-1),C("path",{d:"M7.32422 5.38931C7.61669 4.87032 8.38346 4.87015 8.67578 5.38931L8.73047 5.50845L8.89551 5.95376L8.97949 6.1481C9.19937 6.58817 9.57968 6.93145 10.0459 7.10415L10.4912 7.26919C11.127 7.50461 11.1666 8.36217 10.6104 8.67544L10.4912 8.73013L10.0459 8.89517C9.5799 9.06783 9.19939 9.41141 8.97949 9.85123L8.89551 10.0456L8.73047 10.4909C8.49495 11.1267 7.63737 11.1665 7.32422 10.61L7.26953 10.4909L7.10449 10.0456C6.93172 9.57931 6.58767 9.19898 6.14746 8.97916L5.9541 8.89517L5.50879 8.73013C4.83054 8.47903 4.83061 7.52037 5.50879 7.26919L5.9541 7.10415L6.14746 7.02017C6.58757 6.80032 6.93176 6.41995 7.10449 5.95376L7.26953 5.50845L7.32422 5.38931Z",fill:"currentColor"},null,-1)])])}const Ype=kt({name:"kimi-music",render:Gpe}),Xpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Jpe(e,t){return b(),A("svg",Xpe,[...t[0]||(t[0]=[C("path",{d:"M17.9551 6.32648C17.955 5.82951 17.5517 5.42706 17.0547 5.42706H15.4844C14.9875 5.42717 14.5851 5.82958 14.585 6.32648V17.6732C14.585 18.1701 14.9874 18.5734 15.4844 18.5735H17.0547C17.5518 18.5735 17.9551 18.1702 17.9551 17.6732V6.32648ZM19.7549 17.6732C19.7549 19.1643 18.5459 20.3734 17.0547 20.3734H15.4844C13.9933 20.3732 12.7842 19.1643 12.7842 17.6732V6.32648C12.7843 4.83546 13.9934 3.62639 15.4844 3.62628H17.0547C18.5458 3.62628 19.7548 4.8354 19.7549 6.32648V17.6732Z",fill:"currentColor"},null,-1),C("path",{d:"M9.41571 6.32648C9.41561 5.82951 9.01231 5.42706 8.51532 5.42706H6.94501C6.44811 5.42717 6.0457 5.82958 6.04559 6.32648V17.6732C6.04559 18.1701 6.44804 18.5734 6.94501 18.5735H8.51532C9.01238 18.5735 9.41571 18.1702 9.41571 17.6732V6.32648ZM11.2155 17.6732C11.2155 19.1643 10.0065 20.3734 8.51532 20.3734H6.94501C5.45393 20.3732 4.24481 19.1643 4.24481 17.6732V6.32648C4.24492 4.83546 5.45399 3.62639 6.94501 3.62628H8.51532C10.0064 3.62628 11.2154 4.8354 11.2155 6.32648V17.6732Z",fill:"currentColor"},null,-1)])])}const Qpe=kt({name:"kimi-pause",render:Jpe}),e0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function t0e(e,t){return b(),A("svg",e0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0176 4.89998C17.7305 4.89998 17.4552 5.014 17.2522 5.217L6.35429 16.1149C5.957 16.5122 5.67517 17.01 5.53889 17.5551L5.23691 18.763L6.44486 18.4611C6.98994 18.3248 7.48773 18.0429 7.88502 17.6456L18.783 6.74773C18.8834 6.64728 18.9631 6.52797 19.0176 6.39658C19.072 6.26517 19.1 6.12441 19.1 5.98236C19.1 5.84031 19.072 5.69956 19.0176 5.56815C18.9631 5.43676 18.8834 5.31745 18.783 5.217C18.6825 5.11649 18.5631 5.03676 18.4318 4.98237C18.3005 4.92798 18.1597 4.89998 18.0176 4.89998ZM15.9794 3.94421C16.52 3.40366 17.2531 3.09998 18.0176 3.09998C18.3961 3.09998 18.7709 3.17452 19.1207 3.31938C19.4704 3.46424 19.7881 3.67656 20.0558 3.94421C20.3235 4.21192 20.5357 4.52969 20.6805 4.87932C20.8254 5.22895 20.9 5.60375 20.9 5.98236C20.9 6.36098 20.8254 6.73578 20.6805 7.08541C20.5357 7.43504 20.3235 7.75281 20.0558 8.02052L17.6385 10.4378L9.15781 18.9184C8.52984 19.5464 7.74301 19.9919 6.88142 20.2073L4.21828 20.8731C3.91158 20.9498 3.58714 20.8599 3.3636 20.6364C3.14006 20.4128 3.05019 20.0884 3.12686 19.7817L3.79264 17.1185C4.00803 16.257 4.45351 15.4701 5.0815 14.8421L15.9794 3.94421Z",fill:"currentColor"},null,-1)])])}const n0e=kt({name:"kimi-pencil",render:t0e}),o0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s0e(e,t){return b(),A("svg",o0e,[...t[0]||(t[0]=[C("path",{d:"M7.76251 3.10547C8.25776 3.10552 8.74422 3.23849 9.17072 3.49023L19.533 9.60742C20.8536 10.3869 21.2922 12.0901 20.5174 13.4121C20.2785 13.8195 19.9398 14.1604 19.533 14.4004L9.16974 20.5156C7.84721 21.2958 6.14595 20.8511 5.36993 19.5273C5.1196 19.1003 4.98719 18.6142 4.98712 18.1191V5.88672C4.98716 4.3537 6.2273 3.10547 7.76251 3.10547ZM6.7879 18.1191C6.78797 18.2945 6.8343 18.4664 6.92267 18.6172C7.19638 19.0841 7.79336 19.2377 8.25568 18.9648L18.618 12.8496C18.7607 12.7654 18.8803 12.6458 18.9647 12.502C19.2393 12.0334 19.082 11.4311 18.618 11.1572L8.25568 5.04102C8.1061 4.95273 7.93562 4.9063 7.76251 4.90625C7.22703 4.90625 6.78794 5.34218 6.7879 5.88672V18.1191Z",fill:"currentColor"},null,-1)])])}const i0e=kt({name:"kimi-play",render:s0e}),r0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function l0e(e,t){return b(),A("svg",r0e,[...t[0]||(t[0]=[C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 3.7998C7.47126 3.7998 3.7998 7.47126 3.7998 12C3.7998 16.5287 7.47126 20.2002 12 20.2002C16.5287 20.2002 20.2002 16.5287 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998Z",fill:"currentColor"},null,-1)])])}const a0e=kt({name:"kimi-question",render:l0e}),u0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c0e(e,t){return b(),A("svg",u0e,[...t[0]||(t[0]=[C("path",{d:"M12 2C13.1046 2 14 2.89543 14 4C14 4.78019 13.552 5.45353 12.9004 5.7832V7H16.5C18.1569 7 19.5 8.34315 19.5 10V17C19.5 18.6051 18.2394 19.9158 16.6543 19.9961L16.5 20H7.5L7.3457 19.9961C5.81166 19.9184 4.58163 18.6883 4.50391 17.1543L4.5 17V10C4.5 8.34315 5.84315 7 7.5 7H11.0996V5.7832C10.448 5.45353 10 4.78019 10 4C10 2.89543 10.8954 2 12 2ZM7.5 8.7998C6.83726 8.7998 6.2998 9.33726 6.2998 10V17C6.2998 17.6627 6.83726 18.2002 7.5 18.2002H16.5C17.1627 18.2002 17.7002 17.6627 17.7002 17V10C17.7002 9.33726 17.1627 8.7998 16.5 8.7998H7.5ZM3 10.7666C3.49706 10.7666 3.90039 11.1699 3.90039 11.667V15C3.90039 15.4971 3.49706 15.9004 3 15.9004C2.50294 15.9004 2.09961 15.4971 2.09961 15V11.667C2.09961 11.1699 2.50294 10.7666 3 10.7666ZM21 10.7666C21.4971 10.7666 21.9004 11.1699 21.9004 11.667V15C21.9004 15.4971 21.4971 15.9004 21 15.9004C20.5029 15.9004 20.0996 15.4971 20.0996 15V11.667C20.0996 11.1699 20.5029 10.7666 21 10.7666ZM9.5 11.0996C9.99706 11.0996 10.4004 11.5029 10.4004 12V14.5C10.4004 14.9971 9.99706 15.4004 9.5 15.4004C9.00294 15.4004 8.59961 14.9971 8.59961 14.5V12C8.59961 11.5029 9.00294 11.0996 9.5 11.0996ZM14.5 11.0996C14.9971 11.0996 15.4004 11.5029 15.4004 12V14.5C15.4004 14.9971 14.9971 15.4004 14.5 15.4004C14.0029 15.4004 13.5996 14.9971 13.5996 14.5V12C13.5996 11.5029 14.0029 11.0996 14.5 11.0996ZM12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5Z",fill:"currentColor"},null,-1)])])}const d0e=kt({name:"kimi-robot",render:c0e}),f0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function p0e(e,t){return b(),A("svg",f0e,[...t[0]||(t[0]=[C("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 h0e=kt({name:"kimi-search",render:p0e}),m0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g0e(e,t){return b(),A("svg",m0e,[...t[0]||(t[0]=[C("path",{d:"M16.5364 10.1636C16.8879 10.5151 16.8879 11.0849 16.5364 11.4364C16.1849 11.7879 15.6151 11.7879 15.2636 11.4364L12.9 9.07281V17.1C12.9 17.597 12.4971 18 12 18C11.503 18 11.1 17.597 11.1 17.1V9.07281L8.73641 11.4364C8.38494 11.7879 7.81509 11.7879 7.46362 11.4364C7.11214 11.0849 7.11214 10.5151 7.46362 10.1636L11.3636 6.2636C11.7151 5.91211 12.2849 5.91211 12.6364 6.2636L16.5364 10.1636Z",fill:"currentColor"},null,-1)])])}const v0e=kt({name:"kimi-send",render:g0e}),y0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k0e(e,t){return b(),A("svg",y0e,[...t[0]||(t[0]=[C("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),C("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 b0e=kt({name:"kimi-setting",render:k0e}),C0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function w0e(e,t){return b(),A("svg",C0e,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1)])])}const _0e=kt({name:"kimi-shield-question",render:w0e}),x0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function S0e(e,t){return b(),A("svg",x0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.90005 12C2.90005 11.503 3.303 11.1 3.80005 11.1H12.2939L9.38588 8.19197C9.03441 7.8405 9.03441 7.27065 9.38588 6.91918C9.73735 6.56771 10.3072 6.56771 10.6587 6.91918L15.1031 11.3636C15.2719 11.5324 15.3667 11.7613 15.3667 12C15.3667 12.2387 15.2719 12.4676 15.1031 12.6364L10.6587 17.0809C10.3072 17.4323 9.73735 17.4323 9.38588 17.0809C9.03441 16.7294 9.03441 16.1595 9.38588 15.8081L12.2939 12.9H3.80005C3.303 12.9 2.90005 12.4971 2.90005 12ZM13.5874 20C13.5874 19.503 13.9904 19.1 14.4874 19.1H18.043C18.2758 19.1 18.4991 19.0075 18.6637 18.8429C18.8283 18.6783 18.9208 18.455 18.9208 18.2222V5.7778C18.9208 5.545 18.8283 5.32174 18.6637 5.15712C18.499 4.9925 18.2758 4.90002 18.043 4.90002H14.4874C13.9904 4.90002 13.5874 4.49708 13.5874 4.00002C13.5874 3.50297 13.9904 3.10003 14.4874 3.10003H18.043C18.7532 3.10003 19.4343 3.38215 19.9365 3.88433C20.4386 4.38651 20.7208 5.06761 20.7208 5.7778V18.2222C20.7208 18.9324 20.4386 19.6135 19.9365 20.1157C19.4343 20.6179 18.7532 20.9 18.043 20.9H14.4874C13.9904 20.9 13.5874 20.4971 13.5874 20Z",fill:"currentColor"},null,-1)])])}const A0e=kt({name:"kimi-sign-in",render:S0e}),M0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T0e(e,t){return b(),A("svg",M0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.6364 11.3636C20.9879 11.7151 20.9879 12.2849 20.6364 12.6364L16.1919 17.0808C15.8405 17.4323 15.2706 17.4323 14.9192 17.0808C14.5677 16.7293 14.5677 16.1595 14.9192 15.808L17.8272 12.9H9.33333C8.83627 12.9 8.43333 12.497 8.43333 12C8.43333 11.5029 8.83627 11.1 9.33333 11.1H17.8272L14.9192 8.19193C14.5677 7.84046 14.5677 7.27061 14.9192 6.91914C15.2706 6.56766 15.8405 6.56766 16.1919 6.91914L20.6364 11.3636ZM10.2333 3.99998C10.2333 4.49703 9.83038 4.89998 9.33333 4.89998H5.77777C5.54497 4.89998 5.3217 4.99246 5.15709 5.15707C4.99247 5.32169 4.89999 5.54495 4.89999 5.77775V18.2222C4.89999 18.455 4.99247 18.6783 5.15709 18.8429C5.32171 19.0075 5.54497 19.1 5.77777 19.1H9.33333C9.83038 19.1 10.2333 19.5029 10.2333 20C10.2333 20.497 9.83038 20.9 9.33333 20.9H5.77777C5.06758 20.9 4.38648 20.6179 3.8843 20.1157C3.38212 19.6135 3.09999 18.9324 3.09999 18.2222V5.77775C3.09999 5.06756 3.38212 4.38646 3.8843 3.88428C4.38648 3.3821 5.06758 3.09998 5.77777 3.09998H9.33333C9.83038 3.09998 10.2333 3.50292 10.2333 3.99998Z",fill:"currentColor"},null,-1)])])}const E0e=kt({name:"kimi-sign-out",render:T0e}),I0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L0e(e,t){return b(),A("svg",I0e,[...t[0]||(t[0]=[Ac('',9)])])}const $0e=kt({name:"kimi-sliders",render:L0e}),N0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F0e(e,t){return b(),A("svg",N0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.78027 8.90405C7.5 9.45411 7.5 10.1742 7.5 11.6144V12.3856C7.5 13.8258 7.5 14.5459 7.78027 15.096C8.02681 15.5798 8.42019 15.9732 8.90405 16.2197C9.45411 16.5 10.1742 16.5 11.6144 16.5H12.3856C13.8258 16.5 14.5459 16.5 15.096 16.2197C15.5798 15.9732 15.9732 15.5798 16.2197 15.096C16.5 14.5459 16.5 13.8258 16.5 12.3856V11.6144C16.5 10.1742 16.5 9.45411 16.2197 8.90405C15.9732 8.42019 15.5798 8.02681 15.096 7.78027C14.5459 7.5 13.8258 7.5 12.3856 7.5H11.6144C10.1742 7.5 9.45411 7.5 8.90405 7.78027C8.42019 8.02681 8.02681 8.42019 7.78027 8.90405Z",fill:"currentColor"},null,-1)])])}const R0e=kt({name:"kimi-stop",render:F0e}),O0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P0e(e,t){return b(),A("svg",O0e,[...t[0]||(t[0]=[C("path",{d:"M7.01562 3.41459C7.4446 3.16449 7.9954 3.30924 8.24609 3.73784C8.49645 4.167 8.35189 4.71868 7.92285 4.96928C5.51497 6.37506 3.90054 8.98498 3.90039 11.9703C3.90076 16.4435 7.52672 20.0699 12 20.0699C16.4733 20.0699 20.0992 16.4435 20.0996 11.9703C20.0996 11.2291 20 10.5116 19.8145 9.83159C19.6838 9.35222 19.967 8.85702 20.4463 8.72612C20.9256 8.59541 21.4207 8.87778 21.5518 9.35698C21.7792 10.1901 21.9004 11.0674 21.9004 11.9703C21.9 17.4376 17.4674 21.8697 12 21.8697C6.53261 21.8697 2.09998 17.4376 2.09961 11.9703C2.09976 8.31904 4.07782 5.12972 7.01562 3.41459ZM8.39258 8.24077C8.75015 7.89591 9.3199 7.90591 9.66504 8.26323C10.01 8.62076 9.99985 9.19051 9.64258 9.53569C9.00203 10.1541 8.60558 11.02 8.60547 11.979C8.60584 13.8536 10.1253 15.3736 12 15.3736C13.8746 15.3735 15.3942 13.8536 15.3945 11.979C15.3945 11.6847 15.3577 11.3989 15.2881 11.1285C15.1646 10.6474 15.4536 10.1568 15.9346 10.0328C16.4158 9.9089 16.9071 10.1991 17.0312 10.6802C17.1383 11.096 17.1943 11.5321 17.1943 11.979C17.194 14.8477 14.8688 17.1733 12 17.1734C9.1312 17.1734 6.80506 14.8478 6.80469 11.979C6.8048 10.5117 7.41519 9.18431 8.39258 8.24077ZM11.5459 1.12651C11.8216 0.965605 12.1631 0.963306 12.4414 1.11967L19.1953 4.91752C19.4859 5.08108 19.662 5.39277 19.6533 5.72612C19.6443 6.05972 19.4515 6.36154 19.1523 6.50932L12.9004 9.5933V12.2583C12.9004 12.7554 12.4971 13.1587 12 13.1587C11.5029 13.1587 11.0996 12.7554 11.0996 12.2583V1.90385C11.0999 1.58444 11.2702 1.2878 11.5459 1.12651ZM12.9004 7.58549L16.8252 5.64897L12.9004 3.44194V7.58549Z",fill:"currentColor"},null,-1)])])}const D0e=kt({name:"kimi-target",render:P0e}),B0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H0e(e,t){return b(),A("svg",B0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.9893 6.60743C20.5897 6.60757 21.8877 7.8926 21.8877 9.47736C21.8877 10.7416 21.0607 11.8129 19.9141 12.1955V14.257C19.914 15.8428 18.6152 17.1288 17.0137 17.1289H12.8438V20.1381C12.8437 20.6301 12.4412 21.0293 11.9443 21.0296C11.4473 21.0296 11.044 20.6302 11.0439 20.1381V16.4356C11.0441 15.8343 11.5363 15.3461 12.1436 15.3458H17.0137C17.6211 15.3457 18.1133 14.8585 18.1133 14.257V12.2129C16.9408 11.8451 16.0909 10.7598 16.0908 9.47736C16.0908 7.89251 17.3887 6.60743 18.9893 6.60743ZM18.9893 8.38953C18.3828 8.38953 17.8906 8.87684 17.8906 9.47736C17.8907 10.0778 18.3828 10.5642 18.9893 10.5642C19.5956 10.5641 20.0869 10.0777 20.0869 9.47736C20.0869 8.87693 19.5956 8.38967 18.9893 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.89844 6.60743C6.49899 6.60747 7.79688 7.89254 7.79688 9.47736C7.79684 10.7388 6.97371 11.8078 5.83105 12.1926V14.4021C5.83105 15.0036 6.32315 15.4918 6.93066 15.4918H8.37109C8.86789 15.492 9.27038 15.8905 9.27051 16.3824C9.27051 16.8744 8.86797 17.2737 8.37109 17.2739H6.93066C5.32904 17.2739 4.03027 15.9879 4.03027 14.4021V12.2158C2.85382 11.8504 2.00004 10.7627 2 9.47736C2 7.89251 3.29784 6.60743 4.89844 6.60743ZM4.89844 8.38953C4.29196 8.38953 3.7998 8.87684 3.7998 9.47736C3.79985 10.0778 4.29198 10.5642 4.89844 10.5642C5.50485 10.5642 5.99605 10.0778 5.99609 9.47736C5.99609 8.87687 5.50488 8.38958 4.89844 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9434 2.9707C13.5439 2.97075 14.8418 4.25581 14.8418 5.84063C14.8418 7.11413 14.0035 8.1923 12.8438 8.56745V13.0135C12.8436 13.5056 12.4403 13.9041 11.9434 13.9041C11.4466 13.9039 11.0431 13.5055 11.043 13.0135V8.56745C9.8836 8.19209 9.04496 7.11387 9.04492 5.84063C9.04492 4.25592 10.343 2.97093 11.9434 2.9707ZM11.9434 4.75281C11.3371 4.75303 10.8447 5.24026 10.8447 5.84063C10.8448 6.44097 11.3371 6.92726 11.9434 6.92749C12.5498 6.92745 13.041 6.44108 13.041 5.84063C13.041 5.24014 12.5498 4.75285 11.9434 4.75281Z",fill:"currentColor"},null,-1)])])}const z0e=kt({name:"kimi-task",render:H0e}),W0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U0e(e,t){return b(),A("svg",W0e,[...t[0]||(t[0]=[C("path",{d:"M16.5293 15.0596C16.9496 15.1021 17.2772 15.4572 17.2773 15.8887C17.2773 16.3202 16.9497 16.6753 16.5293 16.7178L16.4443 16.7217H12C11.5399 16.7216 11.167 16.3488 11.167 15.8887C11.1671 15.4286 11.54 15.0558 12 15.0557H16.4443L16.5293 15.0596Z",fill:"currentColor"},null,-1),C("path",{d:"M6.96582 7.52246C7.27077 7.21751 7.75375 7.1983 8.08105 7.46484L8.14453 7.52246L10.8232 10.2002C11.5102 10.8872 11.5102 12.0014 10.8232 12.6885L8.14453 15.3672L8.08105 15.4248C7.75377 15.6913 7.27075 15.6721 6.96582 15.3672C6.66114 15.0621 6.64234 14.5791 6.90918 14.252L6.96582 14.1885L9.64453 11.5098C9.68057 11.4736 9.68062 11.415 9.64453 11.3789L6.96582 8.7002C6.64116 8.37488 6.6411 7.84774 6.96582 7.52246Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 3.09961C19.1539 3.09966 20.9004 4.84612 20.9004 7V17C20.9004 19.1539 19.1539 20.9003 17 20.9004H7C4.84609 20.9004 3.09961 19.1539 3.09961 17V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H17ZM7 4.90039C5.8402 4.90039 4.90039 5.8402 4.90039 7V17C4.90039 18.1598 5.8402 19.0996 7 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V7C19.0996 5.84024 18.1598 4.90044 17 4.90039H7Z",fill:"currentColor"},null,-1)])])}const j0e=kt({name:"kimi-terminal",render:U0e}),V0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function q0e(e,t){return b(),A("svg",V0e,[...t[0]||(t[0]=[C("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 K0e=kt({name:"kimi-thinking",render:q0e}),Z0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G0e(e,t){return b(),A("svg",Z0e,[...t[0]||(t[0]=[Ac('',6)])])}const Y0e=kt({name:"kimi-todo",render:G0e}),X0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J0e(e,t){return b(),A("svg",X0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.09752 2.19507C8.5421 1.97278 9.08271 2.15298 9.305 2.59756L10.0562 4.10005H13.5C13.9971 4.10005 14.4 4.50299 14.4 5.00005C14.4 5.49711 13.9971 5.90005 13.5 5.90005H12.3106C12.2556 6.2319 12.1667 6.64073 12.0226 7.0987C11.7254 8.04355 11.191 9.20402 10.2334 10.3239C11.4166 11.196 12.5606 11.7524 13.4512 12.0987C13.978 12.3036 14.4136 12.434 14.7124 12.5122L14.7348 12.5181L15.695 10.5976C15.8475 10.2927 16.1591 10.1 16.5 10.1C16.8409 10.1 17.1525 10.2927 17.305 10.5976L20.7969 17.5814L20.8044 17.5959L20.8137 17.615L21.805 19.5976C22.0273 20.0421 21.8471 20.5827 21.4025 20.805C20.9579 21.0273 20.4173 20.8471 20.195 20.4025L19.4438 18.9H13.5562L12.805 20.4025C12.5827 20.8471 12.0421 21.0273 11.5975 20.805C11.1529 20.5827 10.9727 20.0421 11.195 19.5976L12.1863 17.615C12.1917 17.6036 12.1973 17.5924 12.2031 17.5814L13.9146 14.1583C13.6034 14.0667 13.2256 13.9423 12.7988 13.7764C11.7294 13.3605 10.3442 12.6802 8.92538 11.5924C7.79753 12.5167 6.69473 13.0764 5.83285 13.4112C5.33899 13.603 4.92286 13.7216 4.62401 13.7931C4.47449 13.8288 4.35399 13.8529 4.26741 13.8684C4.2241 13.8762 4.18924 13.8818 4.16343 13.8858L4.13156 13.8904L4.12084 13.8919L4.11682 13.8924L4.11514 13.8927C4.11514 13.8927 4.11368 13.8928 4.00001 13L4.11368 13.8928C3.62061 13.9556 3.17 13.6068 3.10722 13.1137C3.0446 12.6219 3.39148 12.1723 3.88256 12.1077L3.94947 12.0967C4.00428 12.0869 4.09114 12.0698 4.20543 12.0424C4.43422 11.9877 4.77156 11.8924 5.18106 11.7334C5.84103 11.477 6.68484 11.0564 7.56458 10.3753C7.15054 9.93496 6.78945 9.48388 6.50421 9.10102C6.26672 8.78224 6.07517 8.50172 5.94227 8.29973C5.87571 8.19858 5.82359 8.11671 5.78748 8.05909C5.76942 8.03027 5.75535 8.00749 5.74545 7.99135L5.73377 7.9722L5.73032 7.96651L5.72864 7.96371C5.71133 7.9349 5.69582 7.9055 5.68208 7.87566C5.49265 7.46416 5.6393 6.96717 6.03659 6.72853C6.09037 6.69623 6.14617 6.6702 6.20315 6.65023C6.59739 6.51205 7.04758 6.66421 7.27129 7.03623L7.27266 7.0385L7.28001 7.05054C7.28695 7.06186 7.29793 7.07964 7.31274 7.10328C7.34239 7.15059 7.38731 7.2212 7.44595 7.31032C7.56343 7.48886 7.73484 7.73997 7.94765 8.02562C8.21085 8.37889 8.52772 8.77187 8.8756 9.14201C9.64226 8.24147 10.0681 7.3133 10.3056 6.55854C10.381 6.3186 10.4372 6.09683 10.4791 5.90005H9.51951C9.50696 5.90031 9.49442 5.90031 9.48191 5.90005H4.00001C3.50296 5.90005 3.10001 5.49711 3.10001 5.00005C3.10001 4.50299 3.50296 4.10005 4.00001 4.10005H8.04378L7.69503 3.40254C7.67314 3.35877 7.65516 3.31407 7.64094 3.26883C7.51078 2.8546 7.69671 2.39547 8.09752 2.19507ZM16.5 13.0125L18.5438 17.1H14.4562L16.5 13.0125Z",fill:"currentColor"},null,-1),C("path",{d:"M15.1 4.00007C15.1 3.50301 15.5029 3.10007 16 3.10007H18C19.6016 3.10007 20.9 4.39844 20.9 6.00007V8.00007C20.9 8.49712 20.497 8.90007 20 8.90007C19.5029 8.90007 19.1 8.49712 19.1 8.00007V6.00007C19.1 5.39255 18.6075 4.90007 18 4.90007H16C15.5029 4.90007 15.1 4.49712 15.1 4.00007Z",fill:"currentColor"},null,-1),C("path",{d:"M3.99998 15.1001C4.49703 15.1001 4.89998 15.503 4.89998 16.0001V18.0001C4.89998 18.6076 5.39246 19.1001 5.99998 19.1001H7.99998C8.49703 19.1001 8.89998 19.503 8.89998 20.0001C8.89998 20.4971 8.49703 20.9001 7.99998 20.9001H5.99998C4.39835 20.9001 3.09998 19.6017 3.09998 18.0001V16.0001C3.09998 15.503 3.50292 15.1001 3.99998 15.1001Z",fill:"currentColor"},null,-1)])])}const Q0e=kt({name:"kimi-translate",render:J0e}),ehe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function the(e,t){return b(),A("svg",ehe,[...t[0]||(t[0]=[C("path",{d:"M8.10001 3C8.10001 2.50294 8.50295 2.1 9.00001 2.1H15C15.4971 2.1 15.9 2.50294 15.9 3C15.9 3.49706 15.4971 3.9 15 3.9H9.00001C8.50295 3.9 8.10001 3.49706 8.10001 3Z",fill:"currentColor"},null,-1),C("path",{d:"M10 15.9C9.50295 15.9 9.10001 15.4971 9.10001 15L9.10001 10C9.10001 9.50294 9.50295 9.1 10 9.1C10.4971 9.1 10.9 9.50294 10.9 10L10.9 15C10.9 15.4971 10.4971 15.9 10 15.9Z",fill:"currentColor"},null,-1),C("path",{d:"M13.1 15C13.1 15.4971 13.5029 15.9 14 15.9C14.4971 15.9 14.9 15.4971 14.9 15L14.9 10C14.9 9.50294 14.4971 9.1 14 9.1C13.5029 9.1 13.1 9.50294 13.1 10V15Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.10001 6C2.10001 5.50294 2.50295 5.1 3.00001 5.1H4.99152C4.99785 5.09993 5.00417 5.09993 5.01048 5.1H18.9895C18.9958 5.09993 19.0021 5.09993 19.0085 5.1H21C21.4971 5.1 21.9 5.50294 21.9 6C21.9 6.49706 21.4971 6.9 21 6.9H19.8281L18.8448 18.6993C18.7412 19.9432 17.7013 20.9 16.4531 20.9H7.54686C6.29865 20.9 5.25881 19.9432 5.15515 18.6993L4.17188 6.9H3.00001C2.50295 6.9 2.10001 6.49706 2.10001 6ZM5.97811 6.9L18.0219 6.9L17.0511 18.5498C17.0251 18.8608 16.7652 19.1 16.4531 19.1H7.54686C7.23481 19.1 6.97485 18.8608 6.94893 18.5498L5.97811 6.9Z",fill:"currentColor"},null,-1)])])}const nhe=kt({name:"kimi-trash",render:the}),ohe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function she(e,t){return b(),A("svg",ohe,[...t[0]||(t[0]=[C("path",{d:"M7.36336 3.3634C7.71483 3.01192 8.28533 3.01192 8.6368 3.3634C8.98817 3.71488 8.98824 4.2854 8.6368 4.63683L6.17391 7.09972H15.0001C18.2585 7.09977 20.9005 9.74166 20.9005 13.0001C20.9004 16.2585 18.2585 18.9005 15.0001 18.9005H7.00008C6.50307 18.9005 6.09976 18.4971 6.09969 18.0001C6.09969 17.5031 6.50302 17.0997 7.00008 17.0997H15.0001C17.2644 17.0997 19.0996 15.2644 19.0997 13.0001C19.0997 10.7358 17.2644 8.90055 15.0001 8.90051H6.17391L8.6368 11.3634L8.69832 11.4318C8.98668 11.7853 8.96632 12.3073 8.6368 12.6368C8.30728 12.9663 7.78521 12.9867 7.43172 12.6984L7.36336 12.6368L3.36336 8.63683C3.33098 8.60445 3.30286 8.56908 3.27645 8.53332C3.25597 8.50559 3.23607 8.47741 3.21883 8.44738C3.20492 8.42311 3.19221 8.39837 3.18074 8.37316C3.1764 8.36365 3.17109 8.35453 3.16707 8.34484C3.1627 8.33427 3.1593 8.32331 3.15535 8.31261C3.12946 8.24274 3.11237 8.16872 3.10457 8.09191C3.09258 7.97426 3.10262 7.85446 3.1368 7.74035C3.14281 7.72035 3.15094 7.70114 3.15828 7.68176C3.16165 7.67283 3.16341 7.66325 3.16707 7.65441C3.17216 7.64216 3.17806 7.63025 3.18367 7.61828C3.19055 7.60356 3.19744 7.58874 3.20516 7.57433C3.24709 7.49624 3.3012 7.42556 3.36336 7.3634L7.36336 3.3634Z",fill:"currentColor"},null,-1)])])}const ihe=kt({name:"kimi-undo",render:she}),rhe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lhe(e,t){return b(),A("svg",rhe,[...t[0]||(t[0]=[C("path",{d:"M11.9997 12.8779C16.0197 12.878 19.4393 15.3848 20.7048 18.8828C21.0812 19.9234 20.2782 20.8962 19.2038 21.0137L18.9861 21.0264H5.0134L4.79562 21.0137C3.7213 20.8961 2.91743 19.9233 3.29367 18.8828C4.55905 15.3847 7.9797 12.8781 11.9997 12.8779ZM11.9997 14.6777C8.84467 14.6779 6.17462 16.5794 5.09152 19.2256H18.9079C17.8248 16.5793 15.1549 14.6778 11.9997 14.6777ZM12.2312 3.00586C14.6088 3.1264 16.4997 5.09239 16.4997 7.5L16.4939 7.73145C16.3734 10.1091 14.4073 11.9999 11.9997 12C9.59225 11.9998 7.62604 10.109 7.50558 7.73145L7.49973 7.5C7.49973 5.01485 9.51462 3.00021 11.9997 3L12.2312 3.00586ZM11.9997 4.7998C10.5087 4.80001 9.29953 6.00896 9.29953 7.5C9.29953 8.99104 10.5087 10.2 11.9997 10.2002C13.4908 10.2001 14.6999 8.99112 14.6999 7.5C14.6999 6.00888 13.4908 4.79989 11.9997 4.7998Z",fill:"currentColor"},null,-1)])])}const ahe=kt({name:"kimi-user",render:lhe}),uhe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function che(e,t){return b(),A("svg",uhe,[...t[0]||(t[0]=[C("path",{d:"M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z",fill:"currentColor"},null,-1)])])}const dhe=kt({name:"kimi-warning",render:che}),fhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function phe(e,t){return b(),A("svg",fhe,[...t[0]||(t[0]=[C("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[C("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-2zm11-2v16"}),C("path",{d:"m9 10l2 2l-2 2"})],-1)])])}const hhe=kt({name:"tabler-layout-sidebar-right-collapse",render:phe}),mhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ghe(e,t){return b(),A("svg",mhe,[...t[0]||(t[0]=[C("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 vhe=kt({name:"tabler-paperclip",render:ghe}),yhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function khe(e,t){return b(),A("svg",yhe,[...t[0]||(t[0]=[C("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 bhe=kt({name:"ri-braces-line",render:khe}),Che={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function whe(e,t){return b(),A("svg",Che,[...t[0]||(t[0]=[C("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 _he=kt({name:"ri-calendar-close-line",render:whe}),xhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function She(e,t){return b(),A("svg",xhe,[...t[0]||(t[0]=[C("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 Ahe=kt({name:"ri-calendar-schedule-line",render:She}),Mhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function The(e,t){return b(),A("svg",Mhe,[...t[0]||(t[0]=[C("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 Ehe=kt({name:"ri-calendar-todo-line",render:The}),Ihe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Lhe(e,t){return b(),A("svg",Ihe,[...t[0]||(t[0]=[C("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 $he=kt({name:"ri-code-line",render:Lhe}),Nhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fhe(e,t){return b(),A("svg",Nhe,[...t[0]||(t[0]=[C("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-4-7h8a4 4 0 0 1-8 0m0-2a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3"},null,-1)])])}const Rhe=kt({name:"ri-emotion-line",render:Fhe}),Ohe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Phe(e,t){return b(),A("svg",Ohe,[...t[0]||(t[0]=[C("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 Dhe=kt({name:"ri-external-link-line",render:Phe}),Bhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Hhe(e,t){return b(),A("svg",Bhe,[...t[0]||(t[0]=[C("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 zhe=kt({name:"ri-eye-line",render:Hhe}),Whe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Uhe(e,t){return b(),A("svg",Whe,[...t[0]||(t[0]=[C("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 jhe=kt({name:"ri-eye-off-line",render:Uhe}),Vhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qhe(e,t){return b(),A("svg",Vhe,[...t[0]||(t[0]=[C("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 Khe=kt({name:"ri-file-add-line",render:qhe}),Zhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ghe(e,t){return b(),A("svg",Zhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const Yhe=kt({name:"ri-flashlight-line",render:Ghe}),Xhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Jhe(e,t){return b(),A("svg",Xhe,[...t[0]||(t[0]=[C("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 Qhe=kt({name:"ri-folder-fill",render:Jhe}),eme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function tme(e,t){return b(),A("svg",eme,[...t[0]||(t[0]=[C("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 nme=kt({name:"ri-git-fork-line",render:tme}),ome={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function sme(e,t){return b(),A("svg",ome,[...t[0]||(t[0]=[C("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 ime=kt({name:"ri-git-pull-request-line",render:sme}),rme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function lme(e,t){return b(),A("svg",rme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M2 18h7v2H2zm0-7h9v2H2zm0-7h20v2H2zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4 4 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391a4 4 0 0 1-1.435.83L19 21h-2l-.24-1.196a4 4 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4 4 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196a4 4 0 0 1 1.434.83M18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const ame=kt({name:"ri-list-settings-line",render:lme}),ume={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function cme(e,t){return b(),A("svg",ume,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm9 16h-4v2h4zm0-8h-4v2h4zM9 4H5v2h4z"},null,-1)])])}const dme=kt({name:"ri-node-tree",render:cme}),fme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function pme(e,t){return b(),A("svg",fme,[...t[0]||(t[0]=[C("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 hme=kt({name:"ri-pushpin-line",render:pme}),mme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gme(e,t){return b(),A("svg",mme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const vme=kt({name:"ri-sort-desc",render:gme}),yme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function kme(e,t){return b(),A("svg",yme,[...t[0]||(t[0]=[C("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 bme=kt({name:"ri-star-fill",render:kme}),Cme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function wme(e,t){return b(),A("svg",Cme,[...t[0]||(t[0]=[C("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 _me=kt({name:"ri-star-line",render:wme}),xme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Sme(e,t){return b(),A("svg",xme,[...t[0]||(t[0]=[C("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 Ame=kt({name:"ri-tools-line",render:Sme}),Mme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Tme(e,t){return b(),A("svg",Mme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m20.97 17.172l-1.414 1.414l-3.535-3.535l-.073.074l-.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.243L5.34 8.761l3.536-.707l.073-.074l-3.536-3.536L6.828 3.03zM10.365 9.394l-.502.502l-2.822.565l6.5 6.5l.564-2.822l.502-.502zm8.411.074l-1.34 1.34l1.414 1.415l1.34-1.34l.707.707l1.415-1.415l-8.486-8.485l-1.414 1.414l.707.707l-1.34 1.34l1.414 1.415l1.34-1.34z"},null,-1)])])}const Eme=kt({name:"ri-unpin-line",render:Tme}),Ime=` - - -`,Lme=` - - - -`,$me=` - - - -`,Nme=` - - -`,Fme=` - - -`,Rme=` - - -`,Ome=` - - -`,Pme=` - - -`,Dme=` - - -`,Bme=` - - -`,Hme=` - - -`,zme=` - - - -`,Wme=` - - -`,Ume=` - - - -`,jme=` - - -`,Vme=` - - - -`,qme=` - - -`,Kme=` - - -`,Zme=` - - -`,Gme=` - - -`,J_=` - - - - -`,Yme=` - - - - -`,Xme=` - - -`,Jme=` - - - - -`,Qme=` - - - - - -`,ege=` - - -`,tge=` - - -`,nge=` - - -`,oge=` - - -`,sge=` - - -`,ige=` - - -`,rge=` - - - -`,lge=` - - - -`,age=` - - -`,uge=` - - - - -`,cge=` - - - - -`,dge=` - - - - - - - - - - - - -`,fge=` - - -`,pge=` - - -`,hge=` - - - - -`,mge=` - - -`,gge=` - - -`,vge=` - - - - -`,yge=` - - - - -`,kge=` - - - -`,bge=` - - -`,Cge=` - - -`,wge=` - - - - -`,_ge=` - - -`,xge=` - - -`,Sge=` - - -`,Age=` - - - -`,Mge=` - - - - -`,Tge=` - - -`,Ege=` - - -`,Ige='',Lge=` - - -`,$ge=` - - -`,Nge=` - - - - -`,Fge=` - - - - -`,Rge=` - - -`,Oge=` - - - - - - - -`,Pge=` - - - - -`,Dge=` - - - - - -`,Bge=` - - -`,Hge=` - - -`,zge=` - - - - -`,Wge='',Uge='',jge='',Vge='',qge='',Kge='',Zge='',Gge='',Yge='',Xge='',Jge='',Qge='',e2e='',t2e='',n2e='',o2e='',s2e='',i2e='',r2e='',l2e='',a2e='',u2e='',c2e='',d2e='',f2e={sm:14,md:16,lg:20};function xt(e,t){return{component:e,svg:t}}const m$={plus:xt(Ife,Ime),"chat-new":xt(Nfe,Lme),"calendar-close":xt(_he,Vge),"calendar-schedule":xt(Ahe,qge),"calendar-todo":xt(Ehe,Kge),close:xt(f1e,Wme),check:xt(Xfe,Pme),archive:xt(Ofe,$me),search:xt(h0e,xge),copy:xt(C1e,Vme),link:xt($pe,fge),"external-link":xt(Dhe,Yge),download:xt(M1e,Kme),undo:xt(ihe,Bge),send:xt(v0e,Sge),image:xt(hpe,rge),settings:xt(b0e,Age),sliders:xt($0e,Ige),"light-mode":xt(Epe,dge),"dark-mode":xt(x1e,qme),"follow-system":xt(Y1e,ege),"log-in":xt(A0e,Tge),"log-out":xt(E0e,Ege),hand:xt(ape,sge),"full-access":xt(Q1e,tge),"shield-question":xt(_0e,Mge),"chevron-down":xt(e1e,Dme),"chevron-right":xt(o1e,Bme),"chevron-up":xt(r1e,Hme),"arrow-up":xt(Zfe,Ome),"arrow-down":xt(Bfe,Nme),"arrow-right":xt(Vfe,Rme),"arrow-left":xt(Wfe,Fme),minus:xt(zpe,mge),microscope:xt(jpe,gge),"panel-collapse":xt(_pe,uge),"panel-collapse-right":xt(hhe,Wge),"panel-expand":xt(Ape,cge),expand:xt(N1e,Gme),collapse:xt(m1e,Ume),list:xt(Rpe,pge),"list-settings":xt(ame,s2e),"tree-view":xt(dme,i2e),sort:xt(vme,l2e),grip:xt(ipe,oge),folder:xt(j1e,Jme),"folder-closed":xt(z1e,Xme),"folder-plus":xt(K1e,Qme),"folder-solid":xt(Qhe,t2e),file:xt(X_,J_),"file-text":xt(D1e,Yme),"file-edit":xt(I1e,Zme),"file-plus":xt(Khe,Qge),"file-off":xt(X_,J_),attachment:xt(vhe,Uge),"image-off":xt(vpe,lge),eye:xt(zhe,Xge),"eye-off":xt(jhe,Jge),code:xt($he,Zge),terminal:xt(j0e,Fge),pencil:xt(n0e,bge),tool:xt(Ame,c2e),glob:xt(bhe,jge),globe:xt(npe,nge),translate:xt(Q0e,Pge),"check-list":xt(Y0e,Oge),bolt:xt(Yhe,e2e),trash:xt(nhe,Dge),"git-fork":xt(nme,n2e),"git-pull-request":xt(ime,o2e),message:xt(y1e,jme),mail:xt(Dpe,hge),user:xt(ahe,Hge),info:xt(bpe,age),"help-circle":xt(a0e,wge),"alert-triangle":xt(dhe,zge),clock:xt(u1e,zme),robot:xt(d0e,_ge),sparkles:xt(z0e,Nge),histogram:xt(dpe,ige),music:xt(Ype,yge),emoji:xt(Rhe,Gge),target:xt(D0e,$ge),pause:xt(Qpe,kge),play:xt(i0e,Cge),pin:xt(hme,r2e),stop:xt(R0e,Lge),star:xt(bme,a2e),"star-outline":xt(_me,u2e),unpin:xt(Eme,d2e),"dots-horizontal":xt(Kpe,vge),thinking:xt(K0e,Rge)};function p2e(e){return m$[e]}function h2e(e,t){return e.replace(/]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^