diff --git a/.changeset/agent-card-fgbg-badge.md b/.changeset/agent-card-fgbg-badge.md new file mode 100644 index 0000000000..7cb8e2a23d --- /dev/null +++ b/.changeset/agent-card-fgbg-badge.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Label inline subagent cards in the message stream with their foreground or background mode. diff --git a/.changeset/copy-server-info.md b/.changeset/copy-server-info.md new file mode 100644 index 0000000000..c07b85beb5 --- /dev/null +++ b/.changeset/copy-server-info.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Add copy buttons next to the server version and server address in settings. diff --git a/.changeset/fix-empty-workspace-group-legacy-sidebar.md b/.changeset/fix-empty-workspace-group-legacy-sidebar.md new file mode 100644 index 0000000000..6e1a31912f --- /dev/null +++ b/.changeset/fix-empty-workspace-group-legacy-sidebar.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Keep empty workspace groups visible in the legacy sidebar after their last session is archived. diff --git a/.changeset/fix-menu-tooltip-stuck.md b/.changeset/fix-menu-tooltip-stuck.md new file mode 100644 index 0000000000..e52dbea0e8 --- /dev/null +++ b/.changeset/fix-menu-tooltip-stuck.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Hide button hover tooltips outside a menu while the menu is open. diff --git a/.changeset/fix-model-menu-viewport.md b/.changeset/fix-model-menu-viewport.md new file mode 100644 index 0000000000..c73955c7cb --- /dev/null +++ b/.changeset/fix-model-menu-viewport.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Keep the model picker menu on the workspace home within the viewport. diff --git a/.changeset/fix-search-dialog-workspaces-label.md b/.changeset/fix-search-dialog-workspaces-label.md new file mode 100644 index 0000000000..f3c22ddc90 --- /dev/null +++ b/.changeset/fix-search-dialog-workspaces-label.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Fix the workspace group title showing untranslated text in the search dialog. diff --git a/.changeset/fix-settings-select-teleport.md b/.changeset/fix-settings-select-teleport.md new file mode 100644 index 0000000000..3d3a855ca9 --- /dev/null +++ b/.changeset/fix-settings-select-teleport.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Fix the settings dialog dropdown list being clipped by the scroll area, and lock the content behind it while the list is open. diff --git a/.changeset/fix-slash-mention-menu-viewport.md b/.changeset/fix-slash-mention-menu-viewport.md new file mode 100644 index 0000000000..a0747af7d0 --- /dev/null +++ b/.changeset/fix-slash-mention-menu-viewport.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Keep the slash command and @ mention panels on the workspace home within the viewport. diff --git a/.changeset/fix-user-menu-text-select.md b/.changeset/fix-user-menu-text-select.md new file mode 100644 index 0000000000..7cf40aee56 --- /dev/null +++ b/.changeset/fix-user-menu-text-select.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Prevent text selection in the sidebar user menu and its plan usage submenu. diff --git a/.changeset/grouped-session-list-load.md b/.changeset/grouped-session-list-load.md new file mode 100644 index 0000000000..f81e586c60 --- /dev/null +++ b/.changeset/grouped-session-list-load.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Fix slow session list loading when there are many workspaces. diff --git a/.changeset/login-wake-and-waiting-page.md b/.changeset/login-wake-and-waiting-page.md new file mode 100644 index 0000000000..6644811ee8 --- /dev/null +++ b/.changeset/login-wake-and-waiting-page.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Auto-open the browser authorization page after choosing a login region, redesign the authorization waiting page, and refresh the login state as soon as the window regains focus instead of waiting for the poll. diff --git a/.changeset/mention-menu-fs-suggest.md b/.changeset/mention-menu-fs-suggest.md new file mode 100644 index 0000000000..1bd6d1ca86 --- /dev/null +++ b/.changeset/mention-menu-fs-suggest.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Upgrade the @ mention menu: file and skill candidates are merged and ranked by match quality, file search is faster, with path-fragment matching and hit highlighting. diff --git a/.changeset/menu-radius-concentric.md b/.changeset/menu-radius-concentric.md new file mode 100644 index 0000000000..a598eadf55 --- /dev/null +++ b/.changeset/menu-radius-concentric.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Round menu items concentric with their menu frames. diff --git a/.changeset/pin-session-from-chat-header.md b/.changeset/pin-session-from-chat-header.md new file mode 100644 index 0000000000..fb5bbbe542 --- /dev/null +++ b/.changeset/pin-session-from-chat-header.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Add a Pin action to the chat header more-menu to pin the current session to the sidebar pinned section. diff --git a/.changeset/pinned-section-resize.md b/.changeset/pinned-section-resize.md new file mode 100644 index 0000000000..7c8d8aae36 --- /dev/null +++ b/.changeset/pinned-section-resize.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Allow dragging the divider between the pinned section and the session list to resize both areas, with fade hints at the edges when the pinned section scrolls. diff --git a/.changeset/queue-interaction.md b/.changeset/queue-interaction.md new file mode 100644 index 0000000000..f1026bb0bd --- /dev/null +++ b/.changeset/queue-interaction.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Improve the prompt queue interaction, with per-row steer and send. diff --git a/.changeset/region-login-entries.md b/.changeset/region-login-entries.md new file mode 100644 index 0000000000..db9fc72bee --- /dev/null +++ b/.changeset/region-login-entries.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Add kimi.com and kimi.ai OAuth login entries, and switch update and help links to the site matching the current login. diff --git a/.changeset/remote-session-archive-sync.md b/.changeset/remote-session-archive-sync.md new file mode 100644 index 0000000000..15a6726b86 --- /dev/null +++ b/.changeset/remote-session-archive-sync.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Remove sessions archived from another client from the session list immediately, without a manual refresh. diff --git a/.changeset/session-menu-last-active.md b/.changeset/session-menu-last-active.md new file mode 100644 index 0000000000..1a3e8f1f3c --- /dev/null +++ b/.changeset/session-menu-last-active.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Label the timestamp at the bottom of the session menu as last active and tighten that row's padding. diff --git a/.changeset/sidebar-action-button-alignment.md b/.changeset/sidebar-action-button-alignment.md new file mode 100644 index 0000000000..984cb5a9ba --- /dev/null +++ b/.changeset/sidebar-action-button-alignment.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Fix misaligned action buttons between the sidebar section headers and the session rows. diff --git a/.changeset/skill-activation-card.md b/.changeset/skill-activation-card.md new file mode 100644 index 0000000000..78cedd46db --- /dev/null +++ b/.changeset/skill-activation-card.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Remove the skill-activated card from skill activation messages. diff --git a/.changeset/skill-turn-undo.md b/.changeset/skill-turn-undo.md new file mode 100644 index 0000000000..09556731c2 --- /dev/null +++ b/.changeset/skill-turn-undo.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Make skill-activation turns undoable so they can be withdrawn and resent. diff --git a/.changeset/user-menu-density.md b/.changeset/user-menu-density.md new file mode 100644 index 0000000000..c948592f7c --- /dev/null +++ b/.changeset/user-menu-density.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Tighten the row height and spacing of the account menu and its submenus to match the standard menu density. diff --git a/.changeset/waitfor-tool-card.md b/.changeset/waitfor-tool-card.md new file mode 100644 index 0000000000..e16b80625a --- /dev/null +++ b/.changeset/waitfor-tool-card.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Give WaitFor tool calls a dedicated quiet-line display showing completed tasks, wait timeouts, and how many tasks are still running. diff --git a/apps/kimi-code/dist-web/assets/CodeBlockNode-EUGAgT_h.js b/apps/kimi-code/dist-web/assets/CodeBlockNode-h5qcRgnj.js similarity index 99% rename from apps/kimi-code/dist-web/assets/CodeBlockNode-EUGAgT_h.js rename to apps/kimi-code/dist-web/assets/CodeBlockNode-h5qcRgnj.js index 57790a8221..ab0a42de7d 100644 --- a/apps/kimi-code/dist-web/assets/CodeBlockNode-EUGAgT_h.js +++ b/apps/kimi-code/dist-web/assets/CodeBlockNode-h5qcRgnj.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DXophRCW.js","assets/index-yKYHPeXU.js","assets/index-DBtc5buz.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as Ho,M as pl,bl as Ci,af as fl,bY as Mi,cc as Bi,b$ as hl,aU as $,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Mo,aD as No,bE as ue,az as Li,cd as wn,c8 as mt,aI as To,aL as Y,s as Sn,aw as Vt,au as pt,bk as J,ce as Bo,u as ie,I as Ro,A as Oi,bJ as Gt,aY as ht,bL as vl,v as w,t as we,bB as ml,bb as Be,q as b,b7 as $i,cf as zi,cg as bn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as A,cl as Eo,cm as Di,cn as Ai,co as Wt,cp as Fo,bO as Do,T as ji,G as qi,F as Po,g as Wi,c7 as _i,b_ as Ii}from"./index-yKYHPeXU.js";import{i as fe,t as kn}from"./safeRaf-DGuzXxDK.js";var xn=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});let Lo=!1,_t=null,It=null,Ut=null;function Ui(){return xn(this,null,function*(){if(Ut)return Ut;Ut=xn(null,null,function*(){if(!It)try{if(It=(function(k){const M=k;if(typeof M?.useMonaco=="function")return M;const y=k?.default;return typeof y?.useMonaco=="function"?y:null})(yield xi(()=>import("./index-DXophRCW.js"),__vite__mapDeps([0,1,2]))),!It)return null}catch{return null}try{return yield(function(k){return xn(this,null,function*(){return Lo?void 0:_t||(_t=xn(null,null,function*(){const y=globalThis?.MonacoEnvironment;y&&(typeof y.getWorker=="function"||typeof y.getWorkerUrl=="function")||typeof k?.preloadMonacoWorkers!="function"||(yield k.preloadMonacoWorkers()),Lo=!0}).finally(()=>{_t=null}),_t)})})(It),Si(),It}catch{return null}});try{return yield Ut}finally{Ut=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,$o=(k,M,y)=>M in k?Vi(k,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):k[M]=y,U=(k,M)=>{for(var y in M||(M={}))Yi.call(M,y)&&$o(k,y,M[y]);if(Oo)for(var y of Oo(M))Qi.call(M,y)&&$o(k,y,M[y]);return k},Me=(k,M)=>Gi(k,Ji(M)),j=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,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=pl({__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(k,{emit:M}){const y=k,te=M,ne=$(!1),be=$(null),ke=$(null);function r(){mt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",H,{once:!0,capture:!0})}function P(){mt(!0),ne.value=!1}function H(Q){var v,z;const wt=Q.target;(v=be.value)!=null&&v.contains(wt)||(z=ke.value)!=null&&z.contains(wt)?document.addEventListener("click",H,{once:!0,capture:!0}):P()}const re=b(()=>y.showFontSizeButtons&&y.enableFontSizeControl||y.showExpandButton||y.isPreviewable&&y.showPreviewButton),{t:T}=hl(),gt=b(()=>y.showTooltips!==!1);function Ge(Q,v){gt.value&&_i(Q.currentTarget,v,"top",!1,void 0,y.isDark)}function Ee(){gt.value&&mt()}function yt(Q){Ge(Q,y.copyText?T("common.copied")||"Copied":T("common.copy")||"Copy")}const gl=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)<=((v=y.codeFontMin)!=null?v:0)}),Jt=b(()=>!y.fontBaselineReady||y.codeFontSize===y.defaultCodeFontSize),Yt=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)>=((v=y.codeFontMax)!=null?v:100)});return(Q,v)=>(Y(),ie(Po,null,[y.showHeader?(Y(),ie("div",Xi,[ht(Q.$slots,"header-left"),ht(Q.$slots,"header-right",{},()=>[w("div",Ki,[k.diffStats?(Y(),ie("div",{key:0,class:"code-diff-stats","aria-label":k.diffStatsAriaLabel},[w("span",er,"-"+Be(k.diffStats.removed),1),w("span",tr,"+"+Be(k.diffStats.added),1)],8,Zi)):we("",!0),y.showCopyButton?(Y(),ie("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":k.copyText?J(T)("common.copied")||"Copied":J(T)("common.copy")||"Copy",onClick:v[0]||(v[0]=z=>te("copy")),onMouseenter:v[1]||(v[1]=z=>yt(z)),onFocus:v[2]||(v[2]=z=>yt(z)),onMouseleave:Ee,onBlur:Ee},[k.copyText?(Y(),ie("svg",or,[...v[14]||(v[14]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(Y(),ie("svg",lr,[...v[13]||(v[13]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),w("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)):we("",!0),y.showCollapseButton?(Y(),ie("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":k.isCollapsed,onClick:v[3]||(v[3]=z=>te("toggleCollapse")),onMouseenter:v[4]||(v[4]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onFocus:v[5]||(v[5]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onMouseleave:Ee,onBlur:Ee},[(Y(),ie("svg",{style:Vt({rotate:k.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"},[...v[15]||(v[15]=[w("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)):we("",!0),re.value?(Y(),ie("div",rr,[w("button",{ref_key:"moreBtnRef",ref:ke,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:Do(r,["stop"]),onMouseenter:v[6]||(v[6]=z=>Ge(z,J(T)("common.more")||"More")),onFocus:v[7]||(v[7]=z=>Ge(z,J(T)("common.more")||"More")),onMouseleave:Ee,onBlur:Ee},[...v[16]||(v[16]=[qi('',1)])],40,ar),Ro(Wi,{name:"code-menu"},{default:Gt(()=>[ne.value?(Y(),ie("div",{key:0,ref_key:"moreMenuRef",ref:be,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"},[y.showFontSizeButtons&&y.enableFontSizeControl?(Y(),ie(Po,{key:0},[w("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:gl.value,onClick:v[8]||(v[8]=z=>{J(mt)(!0),te("decreaseFont")})},[v[17]||(v[17]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),w("span",null,Be(J(T)("common.fontSmaller")||"Font size −"),1)],8,ur),w("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:Jt.value,onClick:v[9]||(v[9]=z=>{J(mt)(!0),te("resetFont")})},[v[18]||(v[18]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),w("path",{d:"M3 3v5h5"})])],-1)),w("span",null,Be(J(T)("common.fontReset")||"Font size reset"),1)],8,sr),w("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:Yt.value,onClick:v[10]||(v[10]=z=>{J(mt)(!0),te("increaseFont")})},[v[19]||(v[19]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),w("span",null,Be(J(T)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):we("",!0),y.showExpandButton?(Y(),ie("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:v[11]||(v[11]=z=>{P(),te("toggleExpand")})},[k.isExpanded?(Y(),ie("svg",cr,[...v[20]||(v[20]=[w("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)])])):(Y(),ie("svg",fr,[...v[21]||(v[21]=[w("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)])])),w("span",null,Be(k.isExpanded?J(T)("common.collapse")||"Collapse":J(T)("common.expand")||"Expand"),1)])):we("",!0),k.isPreviewable&&y.showPreviewButton?(Y(),ie("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:v[12]||(v[12]=z=>{P(),te("preview")})},[v[22]||(v[22]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("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"}),w("circle",{cx:"12",cy:"12",r:"3"})])],-1)),w("span",null,Be(J(T)("common.preview")||"Preview"),1)])):we("",!0)],512)):we("",!0)]),_:1})])):we("",!0)])])])):we("",!0),vl(w("div",{class:pt(["code-block-shell-content",{"code-block-shell-content--collapsed":k.isCollapsed}])},[ht(Q.$slots,"default")],2),[[ml,!!k.stream||!k.loading]]),vl(w("div",vr,[ht(Q.$slots,"loading",{},()=>[v[23]||(v[23]=w("div",{class:"loading-skeleton"},[w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line short"})],-1))])],512),[[ml,!k.stream&&k.loading]]),w("span",mr,Be(k.copyText?J(T)("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=Ho(pl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(k){const M=k,y=import.meta!==void 0&&!1;let te=null;const{t:ne}=hl(),be=b(()=>{const P=M.code||"",H=P.trim().toLowerCase();return H.startsWith(" +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-mCncasKK.js","assets/index-BkUUBejk.js","assets/index-SEzwqHoC.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as Ho,M as pl,bl as Ci,af as fl,bY as Mi,cc as Bi,b$ as hl,aU as $,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Mo,aD as No,bE as ue,az as Li,cd as wn,c8 as mt,aI as To,aL as Y,s as Sn,aw as Vt,au as pt,bk as J,ce as Bo,u as ie,I as Ro,A as Oi,bJ as Gt,aY as ht,bL as vl,v as w,t as we,bB as ml,bb as Be,q as b,b7 as $i,cf as zi,cg as bn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as A,cl as Eo,cm as Di,cn as Ai,co as Wt,cp as Fo,bO as Do,T as ji,G as qi,F as Po,g as Wi,c7 as _i,b_ as Ii}from"./index-BkUUBejk.js";import{i as fe,t as kn}from"./safeRaf-DGuzXxDK.js";var xn=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});let Lo=!1,_t=null,It=null,Ut=null;function Ui(){return xn(this,null,function*(){if(Ut)return Ut;Ut=xn(null,null,function*(){if(!It)try{if(It=(function(k){const M=k;if(typeof M?.useMonaco=="function")return M;const y=k?.default;return typeof y?.useMonaco=="function"?y:null})(yield xi(()=>import("./index-mCncasKK.js"),__vite__mapDeps([0,1,2]))),!It)return null}catch{return null}try{return yield(function(k){return xn(this,null,function*(){return Lo?void 0:_t||(_t=xn(null,null,function*(){const y=globalThis?.MonacoEnvironment;y&&(typeof y.getWorker=="function"||typeof y.getWorkerUrl=="function")||typeof k?.preloadMonacoWorkers!="function"||(yield k.preloadMonacoWorkers()),Lo=!0}).finally(()=>{_t=null}),_t)})})(It),Si(),It}catch{return null}});try{return yield Ut}finally{Ut=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,$o=(k,M,y)=>M in k?Vi(k,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):k[M]=y,U=(k,M)=>{for(var y in M||(M={}))Yi.call(M,y)&&$o(k,y,M[y]);if(Oo)for(var y of Oo(M))Qi.call(M,y)&&$o(k,y,M[y]);return k},Me=(k,M)=>Gi(k,Ji(M)),j=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,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=pl({__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(k,{emit:M}){const y=k,te=M,ne=$(!1),be=$(null),ke=$(null);function r(){mt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",H,{once:!0,capture:!0})}function P(){mt(!0),ne.value=!1}function H(Q){var v,z;const wt=Q.target;(v=be.value)!=null&&v.contains(wt)||(z=ke.value)!=null&&z.contains(wt)?document.addEventListener("click",H,{once:!0,capture:!0}):P()}const re=b(()=>y.showFontSizeButtons&&y.enableFontSizeControl||y.showExpandButton||y.isPreviewable&&y.showPreviewButton),{t:T}=hl(),gt=b(()=>y.showTooltips!==!1);function Ge(Q,v){gt.value&&_i(Q.currentTarget,v,"top",!1,void 0,y.isDark)}function Ee(){gt.value&&mt()}function yt(Q){Ge(Q,y.copyText?T("common.copied")||"Copied":T("common.copy")||"Copy")}const gl=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)<=((v=y.codeFontMin)!=null?v:0)}),Jt=b(()=>!y.fontBaselineReady||y.codeFontSize===y.defaultCodeFontSize),Yt=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)>=((v=y.codeFontMax)!=null?v:100)});return(Q,v)=>(Y(),ie(Po,null,[y.showHeader?(Y(),ie("div",Xi,[ht(Q.$slots,"header-left"),ht(Q.$slots,"header-right",{},()=>[w("div",Ki,[k.diffStats?(Y(),ie("div",{key:0,class:"code-diff-stats","aria-label":k.diffStatsAriaLabel},[w("span",er,"-"+Be(k.diffStats.removed),1),w("span",tr,"+"+Be(k.diffStats.added),1)],8,Zi)):we("",!0),y.showCopyButton?(Y(),ie("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":k.copyText?J(T)("common.copied")||"Copied":J(T)("common.copy")||"Copy",onClick:v[0]||(v[0]=z=>te("copy")),onMouseenter:v[1]||(v[1]=z=>yt(z)),onFocus:v[2]||(v[2]=z=>yt(z)),onMouseleave:Ee,onBlur:Ee},[k.copyText?(Y(),ie("svg",or,[...v[14]||(v[14]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(Y(),ie("svg",lr,[...v[13]||(v[13]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),w("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)):we("",!0),y.showCollapseButton?(Y(),ie("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":k.isCollapsed,onClick:v[3]||(v[3]=z=>te("toggleCollapse")),onMouseenter:v[4]||(v[4]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onFocus:v[5]||(v[5]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onMouseleave:Ee,onBlur:Ee},[(Y(),ie("svg",{style:Vt({rotate:k.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"},[...v[15]||(v[15]=[w("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)):we("",!0),re.value?(Y(),ie("div",rr,[w("button",{ref_key:"moreBtnRef",ref:ke,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:Do(r,["stop"]),onMouseenter:v[6]||(v[6]=z=>Ge(z,J(T)("common.more")||"More")),onFocus:v[7]||(v[7]=z=>Ge(z,J(T)("common.more")||"More")),onMouseleave:Ee,onBlur:Ee},[...v[16]||(v[16]=[qi('',1)])],40,ar),Ro(Wi,{name:"code-menu"},{default:Gt(()=>[ne.value?(Y(),ie("div",{key:0,ref_key:"moreMenuRef",ref:be,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"},[y.showFontSizeButtons&&y.enableFontSizeControl?(Y(),ie(Po,{key:0},[w("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:gl.value,onClick:v[8]||(v[8]=z=>{J(mt)(!0),te("decreaseFont")})},[v[17]||(v[17]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),w("span",null,Be(J(T)("common.fontSmaller")||"Font size −"),1)],8,ur),w("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:Jt.value,onClick:v[9]||(v[9]=z=>{J(mt)(!0),te("resetFont")})},[v[18]||(v[18]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),w("path",{d:"M3 3v5h5"})])],-1)),w("span",null,Be(J(T)("common.fontReset")||"Font size reset"),1)],8,sr),w("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:Yt.value,onClick:v[10]||(v[10]=z=>{J(mt)(!0),te("increaseFont")})},[v[19]||(v[19]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),w("span",null,Be(J(T)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):we("",!0),y.showExpandButton?(Y(),ie("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:v[11]||(v[11]=z=>{P(),te("toggleExpand")})},[k.isExpanded?(Y(),ie("svg",cr,[...v[20]||(v[20]=[w("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)])])):(Y(),ie("svg",fr,[...v[21]||(v[21]=[w("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)])])),w("span",null,Be(k.isExpanded?J(T)("common.collapse")||"Collapse":J(T)("common.expand")||"Expand"),1)])):we("",!0),k.isPreviewable&&y.showPreviewButton?(Y(),ie("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:v[12]||(v[12]=z=>{P(),te("preview")})},[v[22]||(v[22]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("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"}),w("circle",{cx:"12",cy:"12",r:"3"})])],-1)),w("span",null,Be(J(T)("common.preview")||"Preview"),1)])):we("",!0)],512)):we("",!0)]),_:1})])):we("",!0)])])])):we("",!0),vl(w("div",{class:pt(["code-block-shell-content",{"code-block-shell-content--collapsed":k.isCollapsed}])},[ht(Q.$slots,"default")],2),[[ml,!!k.stream||!k.loading]]),vl(w("div",vr,[ht(Q.$slots,"loading",{},()=>[v[23]||(v[23]=w("div",{class:"loading-skeleton"},[w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line short"})],-1))])],512),[[ml,!k.stream&&k.loading]]),w("span",mr,Be(k.copyText?J(T)("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=Ho(pl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(k){const M=k,y=import.meta!==void 0&&!1;let te=null;const{t:ne}=hl(),be=b(()=>{const P=M.code||"",H=P.trim().toLowerCase();return H.startsWith(" diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-B4B2cx0C.js b/apps/kimi-code/dist-web/assets/DesignSystemView-B4B2cx0C.js deleted file mode 100644 index e2afff6d49..0000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-B4B2cx0C.js +++ /dev/null @@ -1,13 +0,0 @@ -import{M as z,aD as q,aI as A,aL as n,u as l,v as t,G as c,H as e,F as u,aX as y,bb as k,I as s,bk as d,cx as o,cy as B,cz as x,cA as M,cB as h,cC as I,cD as E}from"./index-yKYHPeXU.js";const D={class:"ds-page"},H={class:"layout"},V={class:"content"},L={class:"content-inner"},R={id:"tokens"},O={class:"icon-sizes"},W={class:"sz"},N={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"sz"},j={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},G={class:"icon-grid"},K={class:"icon-group-label"},J={class:"ic-name"},Y={id:"primitives"},Q={class:"stage-wrap"},Z={class:"stage p"},X={class:"p-pill",style:{color:"var(--p-warning)"}},$={class:"stage-wrap"},_={class:"stage p col"},aa={class:"demo-row"},ta={class:"p-btn primary disabled"},ea={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},sa={class:"stage-wrap"},da={class:"stage p col"},oa={class:"demo-row"},ca={class:"stage-wrap"},ia={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},na={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},la={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ra={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ba={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},va={id:"chat"},pa={class:"stage-wrap"},ha={class:"stage p col"},ua={style:{"max-width":"560px",width:"100%"}},ga={class:"stage-wrap"},ma={class:"stage p col",style:{"align-items":"center",background:"#fff"}},fa={class:"p-composer",style:{width:"100%","max-width":"620px"}},wa={class:"p-composer-bar"},ya={class:"p-composer-left"},ka={class:"p-pill",style:{color:"var(--p-warning)"}},xa={class:"stage-wrap"},Ta={class:"stage p",style:{background:"var(--p-bg)"}},Sa={class:"am-mock"},Ca={class:"am-mock-row focus"},za={class:"am-mock-row"},qa={class:"am-mock-row"},Aa={class:"am-mock-row"},Ba={class:"dt"},Ma={class:"dw-spin"},Ia={class:"stage-wrap"},Ea={class:"stage p",style:{background:"var(--p-bg)"}},Da={class:"dw-bar"},Ha={class:"dw-pill"},Va={class:"dw-pill"},La={class:"dw-pill on"},Ra={class:"dw-running"},Oa={class:"dw-pill"},Wa={class:"stage-wrap"},Na={class:"stage p col",style:{background:"var(--p-bg)",gap:"var(--space-4)"}},Pa={class:"dw-panel"},Ua={class:"dw-head"},Fa={class:"dw-tab"},ja={class:"dw-chips"},Ga={class:"dw-chip on"},Ka={class:"dw-chip"},Ja={class:"dw-chip"},Ya={class:"dw-chip"},Qa={class:"dw-body col"},Za={class:"dw-row"},Xa={class:"dw-row"},$a={class:"dw-row fail"},_a={class:"dw-row cancelled"},at={class:"dw-panel"},tt={class:"dw-head"},et={class:"dw-tab"},st={class:"dw-chips"},dt={class:"dw-chip on"},ot={class:"dw-chip"},ct={class:"dw-chip"},it={class:"dw-chip"},nt={class:"dw-body grid"},lt={class:"dw-card"},rt={class:"cf"},bt={class:"cm"},vt={class:"cs"},pt={class:"sl"},ht={class:"tm"},ut={class:"dw-card"},gt={class:"cf"},mt={class:"cm"},ft={class:"cs"},wt={class:"sl"},yt={class:"tm"},kt={class:"dw-card fail"},xt={class:"cf"},Tt={class:"cm"},St={class:"cs"},Ct={class:"sl"},zt={class:"tm"},qt={class:"dw-card"},At={class:"cf"},Bt={class:"cm"},Mt={class:"cs"},It={class:"sl"},Et={class:"tm"},Dt="/repo",Ht=z({__name:"DesignSystemView",emits:["close"],setup(Vt,{emit:T}){const S=[{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 g(){}const C=T;function m(){C("close")}let p=null;function f(v){v.key==="Escape"&&m()}return q(()=>{document.addEventListener("keydown",f);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;v.forEach(b=>{const i=b.getAttribute("href");if(!i)return;const w=document.getElementById(i.slice(1));w&&a.set(w,b)});let r=null;p=new IntersectionObserver(b=>{b.forEach(i=>{i.isIntersecting&&(r&&r.classList.remove("active"),r=a.get(i.target)??null,r&&r.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((b,i)=>p.observe(i)),v.length&&v[0].classList.add("active")}),A(()=>{document.removeEventListener("keydown",f),p&&(p.disconnect(),p=null)}),(v,a)=>(n(),l("div",D,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:m},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",H,[a[146]||(a[146]=c('',1)),t("main",V,[t("div",L,[a[144]||(a[144]=c('
● 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",R,[a[7]||(a[7]=c(`
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-selected-hoverrgba(0,0,0,.08)rgba(255,255,255,.14)Hover of a control RESTING at the selected fill (work cards) — one rung above f2, below f3: hover deepens/brightens a step, never drops below the rest state
--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)),t("div",O,[t("div",W,[(n(),l("svg",N,[...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",P,[(n(),l("svg",U,[...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",F,[(n(),l("svg",j,[...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",G,[(n(!0),l(u,null,y(d(B),([r,b])=>(n(),l(u,{key:r},[t("div",K,k(r),1),(n(!0),l(u,null,y(b,i=>(n(),l("div",{key:i,class:"icon-cell"},[s(d(o),{name:i},null,8,["name"]),t("span",J,k(i),1)]))),128))],64))),128))]),a[10]||(a[10]=c('

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-1-5 · 6
workbar pill icon ↔ label
--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-menu-rowvar(--radius-sm)Menu rows inset 6px inside the plain --radius-lg menu frame (concentric: 12px − 6px hug)product-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-raised1in-component local stacking (menu scroll thumbs, strip badges, floating pills) — never a global layer
--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)
--duration-spin700msspinner rotation period (mention-tip probe spinner)
--duration-flash1200msone-shot attention flashes (search locate, provider-row added) — a highlight timeout, past the show/hide ramp on purpose
--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",Y,[a[27]||(a[27]=c(`
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)),t("div",Q,[a[14]||(a[14]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),t("div",Z,[a[12]||(a[12]=c('kimi-k2· thinking',1)),t("span",X,[s(d(o),{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]=c(`

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",$,[a[18]||(a[18]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Spinner · common scenarios")],-1)),t("div",_,[t("div",aa,[a[17]||(a[17]=c('Loading…',2)),t("button",ta,[(n(),l("svg",ea,[...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",sa,[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",oa,[s(x,{label:"Requesting…"}),s(x,{label:"Working…"})])])]),a[30]||(a[30]=c('
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)),t("div",ca,[a[26]||(a[26]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Sidebar · group title")],-1)),t("div",ia,[a[25]||(a[25]=t("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),t("div",na,[(n(),l("svg",la,[...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",ra,[(n(),l("svg",ba,[...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",va,[a[136]||(a[136]=c('
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",pa,[a[31]||(a[31]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),t("div",ha,[t("div",ua,[s(M,{changes:S,cwd:Dt,onOpenDiff:g,onOpenFile:g})])])]),a[137]||(a[137]=c('
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 composer input (a ProseMirror contenteditable on desktop, a textarea on the web during the migration) 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 or work panel is open, the dock temporarily joins --z-dropdown, ensuring permission, work-mode, and model menus — and the work panel — 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 input 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>.

Mention pills: @-mentions render as inline pills in the editor — one element of the cross-surface rich-text vocabulary specified in §05 Rich Text Messages (visual recipe, wire forms, and behavior contract live there).

',12)),t("div",ga,[a[38]||(a[38]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Composer")],-1)),t("div",ma,[t("div",fa,[a[36]||(a[36]=t("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),t("div",wa,[t("div",ya,[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",ka,[s(d(o),{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]=c('
kimi-k2· thinking
',1))])]),a[37]||(a[37]=c('
kimi-code-web
',1))])]),a[138]||(a[138]=c('
i
Site-wide consistency: the composer uses one 32px superellipse shell and one 32px desktop control height. The add (+), permission, 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 work pills and panels — pill vocabulary, panel shell and motion, the two-tone head, per-kind bodies, filtering, and the open/cancel model — are specified in Dock · work pills & panels below.

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.

Autocomplete menus

The slash, mention, and add popups share one geometry, all on dedicated tokens: the --color-menu-bg-frost surface (the frostier recipe), frame padding --menu-row-hug, rows at --menu-row-padding-block × --menu-row-padding-inline with --radius-menu-row caps (plain corners — the frame is --radius-lg with NO corner-shape, and the row radius stays concentric: 12px frame − 6px hug = 6px), an icon-to-label gap of --menu-row-gap-icon, and a --menu-rows-seam between stacked rows. Touch rows pad to --menu-row-touch-padding-block with a hard floor of --touch-target-min. Scroll height caps at --p-slash-menu-h / --p-mention-menu-h / --p-add-menu-h; the scroll-edge fade is --menu-scroll-fade, and the overlay thumb rides --menu-scrollbar-width / --menu-scrollbar-edge / --menu-scrollbar-track-inset / --menu-scrollbar-thumb-min in --color-menu-scrollbar (hover --color-menu-scrollbar-hover) — 3px visually, with a wider invisible drag strip.

Add menu

The composer's + button opens the add menu — the autocomplete family's action-list member: one column of icon + label (+ muted description) rows (Files, Goal, Plan, Swarm) on the same frost surface and row geometry as the slash/mention popups, capped at --p-add-menu-h. Semantically it is an action menu, not an autocomplete listbox: rows are menuitem commands, DOM focus moves into the menu (arrows navigate, Enter activates, Escape closes), and the + button carries aria-haspopup="menu" — the textarea's combobox ARIA never points at it.

Design decision: deliberately NOT the §03 Menu/MenuItem primitives. Those are the trigger-dropdown family (sidebar, user menu, session rows) — --color-menu-bg, --radius-lg, a min-width box. The add menu instead shares the composer menus' material (the frostier surface, the composer corner curve, rows hugging the frame at the composer's text column, muted description sub-lines). Bending MenuItem into that material would require exactly the per-screen appearance overrides the primitive contract forbids, so the add menu keeps bespoke rows built directly on the shared --menu-row-* tokens. This paragraph is the canonical record of that choice — reviews should not re-litigate it.

',7)),t("div",xa,[a[46]||(a[46]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Add menu — family surface, icon + label + desc rows, keyboard focus wash")],-1)),t("div",Ta,[t("div",Sa,[t("span",Ca,[s(d(o),{name:"attachment",size:"sm"}),a[39]||(a[39]=t("span",{class:"n"},"Files",-1))]),t("span",za,[s(d(o),{name:"target",size:"sm"}),a[40]||(a[40]=t("span",{class:"n"},"Goal",-1)),a[41]||(a[41]=t("span",{class:"d"},"Set a goal to keep pursuing",-1))]),t("span",qa,[s(d(o),{name:"file-edit",size:"sm"}),a[42]||(a[42]=t("span",{class:"n"},"Plan",-1)),a[43]||(a[43]=t("span",{class:"d"},"Turn plan mode on",-1))]),t("span",Aa,[s(d(o),{name:"sparkles",size:"sm"}),a[44]||(a[44]=t("span",{class:"n"},"Swarm",-1)),a[45]||(a[45]=t("span",{class:"d"},"Turn swarm mode on",-1))])])])]),a[139]||(a[139]=c('

Work modes

Plan and Goal are the primary work modes — mutually exclusive, at most one armed at a time. Arming happens only through the slash commands (/plan, /goal) or the add menu; an armed mode renders as the input row's leading pill — a neutral --color-surface chip with the mode's 14px icon, its label, and a × that disarms. The × is an IconButton sized --wm-x-size (below the sm default, so its hover wash never outgrows the pill's rounded end) with a --wm-x-ring hit reserve that stays inside the textarea's indent; on touch it meets --touch-target-min. The input's first-line text indent reserves exactly the pill's width (the desktop ProseMirror editor applies it to the first paragraph), so the caret and placeholder slide right rather than colliding; arming Goal also swaps the placeholder to its objective prompt. Sending with Goal armed creates the goal and the pill hands off to the dock's goal pill; a live goal does NOT lock the primary modes — /goal then just focuses the goal's panel, and /plan still arms (the only hard rule: one message cannot both create a goal and enter plan — the goal write carries the plan disarm atomically — and a failed mode write is treated as a send failure: the optimistic message rolls back, the error toasts). Swarm is deliberately NOT a mode: an orthogonal toolbar chip with its own enable confirmation, disarmed from the chip's ×.

Dock · work pills & panels

Work pills (WorkPill.vue): the dock's workbar above the composer carries one pill vocabulary — font-driven by flex computation: the 1.5em leading icon and the label's own line box (--text-base at --leading-normal) both come to 21px at the 14px UI text, and 8px block padding wraps them to 37px, nothing pinning pixels, so the pills rescale with the font; borderless, with --radius-lg rounded-square corners, filled at the fills ladder's --color-selected rung over the shared --p-menu-backdrop blur — the panel's frosted recipe scaled down to a chip, so transcript text never reads through the light fill (the neutral hover wash layers on top — one layer, never two), the icon at full text colour, --space-2 / --space-3 block / inline padding — the trailing side adds a --space-05 optical compensation against the leading glyph — and a --space-1-5 content gap. Every pill stays expanded — the Code client does not collapse status chips — carrying icon + label and a trailing meta that answers one question — what is live on this surface right now — for background bash tasks, background sub-agents, todos, and the goal alike; the row insets to the composer's text column — dock inline inset + the card's 0.5px border + the input wrap's 16px inline padding — not the card edge. The active pill keeps the wash on permanently — one fills-ladder step deeper, neutral. The meta is always muted ink and surface-specific: the goal carries its status word, colour-coded by state (active --color-success, paused --color-warning, blocked --color-danger); the bash and sub-agent pills carry a pulsing dot and the running count, only while something runs (a quiet absence otherwise); the todos carry the done/total fraction. The plan pill joins the row only once plan mode is live server-side or a persisted plan exists — a merely armed directive stays in the composer's inline work-mode pill (its × cancels) and never reaches this bar, so every pill here reads as live server truth rather than local intent. Narrow panes wrap the row instead of clipping (the dock height observes); below the --p-bp-sm breakpoint the pills collapse to their icons — label and meta hide (the threshold is read from the token, never a hardcoded width).

Panel shell & motion: a pill toggles the shared work panel — the menu family material: 70% page background via color-mix over the shared --p-menu-backdrop blur (the frostier recipe, see §06 Glassmorphism exemption), a 0.5px --color-line edge, --radius-2xl, and the menu panel's --shadow-menu. The panel pops from the clicked pill along the trigger-corner motion tokens (--motion-panel-scale / --motion-panel-shift), and switching pills replays the pop from the newly clicked pill (the shell is keyed by panel kind); while it is open the dock raises to --z-dropdown so it clears the transcript's new-message pill, and every window-drag strip pauses so an outside press reaches the page and dismisses. The panel owns Escape while open (a document-capture handler guarded by the shared IME latch, so a candidate-cancelling Escape is never swallowed), and a scrolled body dissolves toward the head through the --menu-scroll-fade alpha mask instead of hard-clipping. Height is content-sized up to min(360px, 50vh); the filtered panels pin instead — see Filtering & sizing. The panel is chrome: nothing inside it is text-selectable, the head's filter chips included.

Panel head (WorkPanelHead.vue): every work panel head is one tab row — a leading icon at the pill's 1.5em glyph size, the panel title at full text colour, and a muted trailing meta (--color-text-muted) carrying that panel's one live number, joined by the row's --space-2 gap with no separator glyph: the goal's wall-clock time, the bash / sub-agent running count, the todos' done/total. Actions right-align in the head: the goal's pause / resume / cancel / close as quiet neutral IconButtons (cancel deliberately shares that neutral vocabulary), the plan's open-in-side-panel, dismiss-directive (shown only while the directive is live), and close, and the bash / sub-agent filter chips as a SegmentedControl. The plan head's meta carries the latest plan's review outcome. On touch these meet the 44px minimum (--touch-target-min) via the hover: none capability query — a width-only gate would miss tablets — and below 480px the head wraps so the actions take a full row.

Panel bodies: todos read as a quiet list — a green circle-check for done, a hollow ring for pending, an xs Spinner for in-progress. The goal's detail (full objective, completion criterion, rendered with the chat Markdown renderer) fills the body — no footer strip. Bash tasks are long rows (TasksPane.vue): a StatusDot while running, circle-check when done, a close glyph for failed and for cancelled (a user stop is neutral, never reported as a failure), the command as the meta line, and a bare duration that renders only when computable — never the raw protocol status word. Sub-agents form a card grid (SubagentGrid.vue) — an auto-fill grid (minmax --p-subagent-card-min) of cards at the --color-selected rung with --radius-lg corners; each card carries the task name, a stable session-wide number (creation order across the session's background sub-agents — unique even across swarms; once shown it sticks, so late-arriving history takes the next tail number), an optional prompt meta line one size down (--text-sm), an icon-led model · effort line and the status row a further size down (--text-xs) — the status row pairs the task-row state glyph with the localized label, plus a clock-led bare duration that renders only when computable; the full-bleed circle-check (drawn for the todo rows' ring family) is scaled onto the shared icon grid wherever it sits beside other glyphs (task rows, cards, filter chips). A failed row tints its name --color-danger; a cancelled one stays neutral. Rows hover with a rounded strip that grows by padding and a matching negative margin — the row metrics never shift. The row stop is danger-coloured; the card cancel reveals on hover and is always visible on touch as a --touch-target-min corner target. Every pane's empty state is centered and muted. State and time labels — the head meta included — set text-autospace: normal, the transcript's mixed CJK/numeric spacing rule, so durations like 9小时2分 breathe.

State vocabulary: two glyph families meet here by design — the activity dot (shared with the transcript's tool rows and swarm members) backs the task rows, the todo rows speak the default loader ring, and the sub-agent cards skip glyphs in favour of a localized text label:

',8)),t("table",Ba,[a[83]||(a[83]=t("thead",null,[t("tr",null,[t("th",null,"Surface"),t("th",null,"State"),t("th",null,"Meaning"),t("th",null,"Glyph"),t("th",null,"Ink")])],-1)),t("tbody",null,[t("tr",null,[a[48]||(a[48]=t("td",null,"Bash rows",-1)),a[49]||(a[49]=t("td",{class:"tk"},"running",-1)),a[50]||(a[50]=t("td",null,"Task in flight",-1)),t("td",null,[s(d(h),{status:"running"}),a[47]||(a[47]=e(" pulsing dot",-1))]),a[51]||(a[51]=t("td",null,[t("code",null,"--color-accent")],-1))]),t("tr",null,[a[54]||(a[54]=t("td",null,null,-1)),a[55]||(a[55]=t("td",{class:"tk"},"done",-1)),a[56]||(a[56]=t("td",null,"Finished cleanly",-1)),t("td",null,[s(d(o),{name:"circle-check",size:"sm"}),a[52]||(a[52]=e()),a[53]||(a[53]=t("code",null,"circle-check",-1))]),a[57]||(a[57]=t("td",null,[t("code",null,"--color-success")],-1))]),t("tr",null,[a[60]||(a[60]=t("td",null,null,-1)),a[61]||(a[61]=t("td",{class:"tk"},"failed",-1)),a[62]||(a[62]=t("td",null,"Errored — the row's name tints to match",-1)),t("td",null,[s(d(o),{name:"close",size:"sm"}),a[58]||(a[58]=e()),a[59]||(a[59]=t("code",null,"close",-1))]),a[63]||(a[63]=t("td",null,[t("code",null,"--color-danger")],-1))]),t("tr",null,[a[66]||(a[66]=t("td",null,null,-1)),a[67]||(a[67]=t("td",{class:"tk"},"cancelled",-1)),a[68]||(a[68]=t("td",null,"User stop — neutral, never a failure",-1)),t("td",null,[s(d(o),{name:"close",size:"sm"}),a[64]||(a[64]=e()),a[65]||(a[65]=t("code",null,"close",-1))]),a[69]||(a[69]=t("td",null,[t("code",null,"--color-text-muted")],-1))]),t("tr",null,[a[71]||(a[71]=t("td",null,"Todo rows",-1)),a[72]||(a[72]=t("td",{class:"tk"},"in_progress",-1)),a[73]||(a[73]=t("td",null,"Being worked on",-1)),t("td",null,[t("span",Ma,[s(d(I),{size:"xs"})]),a[70]||(a[70]=e(" xs Spinner ring",-1))]),a[74]||(a[74]=t("td",null,[e("the row's own ink ("),t("code",null,"--color-text"),e(")")],-1))]),a[81]||(a[81]=t("tr",null,[t("td"),t("td",{class:"tk"},"pending"),t("td",null,"Not started"),t("td",null,[t("span",{class:"dw-ring"}),e(" hollow ring")]),t("td",null,[t("code",null,"--color-line-strong"),e(" stroke")])],-1)),t("tr",null,[a[77]||(a[77]=t("td",null,null,-1)),a[78]||(a[78]=t("td",{class:"tk"},"done",-1)),a[79]||(a[79]=t("td",null,"Completed",-1)),t("td",null,[s(d(o),{name:"circle-check",size:"md"}),a[75]||(a[75]=e()),a[76]||(a[76]=t("code",null,"circle-check",-1))]),a[80]||(a[80]=t("td",null,[t("code",null,"--color-success")],-1))]),a[82]||(a[82]=t("tr",null,[t("td",null,"Sub-agent cards"),t("td",{class:"tk"},"all"),t("td",null,"The task-row glyph plus a localized label — failed alone tints danger — with a clock-led bare duration trailing"),t("td",null,"glyph + label"),t("td",null,"muted / danger")],-1))])]),a[140]||(a[140]=c("

Filtering & sizing: the bash and sub-agent heads carry the same four icon-led filter chips — recent (clock; running + the five most recently finished), running (play), done (circle-check; every terminal state), all (list) — and both filtered panels pin to --p-dock-panel-h so filtering never resizes the panel; the body scrolls inside. When the head runs out of room the chips collapse into a dropdown menu (FilterControl.vue measures the head itself, so the switch follows the panel's own width, not the viewport; the menu teleports to <body> and anchors to the trigger, so the panel's clip and backdrop-filter never squeeze it); the head title never wraps and is never clipped — once the filter is a dropdown the head always fits. An empty pane names its filter (no completed tasks is not no tasks).

Opening & cancelling: clicking a row or card opens the task's detail in the right-side panel. Opening is gated: the overlay navigation button renders only when a stable agentId (on-demand transcript) or locally held output exists, so a REST-only cold-loaded row stays inert instead of opening an empty panel — and says so with the not-allowed cursor. Open and cancel are sibling controls (a full-cover overlay button, the stop IconButton floating above it): no nested interactives, and the stop action exists only while the task runs.

",2)),t("div",Ia,[a[94]||(a[94]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Work pills — one vocabulary, a live count or status where one exists")],-1)),t("div",Ea,[t("div",Da,[t("span",Ha,[s(d(o),{name:"target",size:"md"}),a[84]||(a[84]=t("span",null,"Goal",-1)),a[85]||(a[85]=e()),a[86]||(a[86]=t("span",{class:"dw-live"},"Active",-1))]),t("span",Va,[s(d(o),{name:"terminal",size:"md"}),a[87]||(a[87]=t("span",null,"Bash",-1))]),t("span",La,[s(d(o),{name:"sparkles",size:"md"}),a[89]||(a[89]=t("span",null,"Background Agent",-1)),a[90]||(a[90]=e()),t("span",Ra,[s(d(h),{status:"running"}),a[88]||(a[88]=e("3",-1))])]),t("span",Oa,[s(d(o),{name:"list",size:"md"}),a[91]||(a[91]=t("span",null,"Progress",-1)),a[92]||(a[92]=e()),a[93]||(a[93]=t("span",{class:"dw-count"},"3/7",-1))])])])]),t("div",Wa,[a[135]||(a[135]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Work panels — two-tone head, filter chips, rows & card grid")],-1)),t("div",Na,[t("div",Pa,[t("div",Ua,[t("span",Fa,[s(d(o),{name:"terminal",size:"md"}),a[95]||(a[95]=e("Bash ",-1)),a[96]||(a[96]=t("span",{class:"dw-meta"},"1 running",-1))]),t("span",ja,[t("span",Ga,[s(d(o),{name:"clock",size:"sm"}),a[97]||(a[97]=e("Recent",-1))]),t("span",Ka,[s(d(o),{name:"play",size:"sm"}),a[98]||(a[98]=e("Running",-1))]),t("span",Ja,[s(d(o),{name:"circle-check",size:"sm"}),a[99]||(a[99]=e("Done",-1))]),t("span",Ya,[s(d(o),{name:"list",size:"sm"}),a[100]||(a[100]=e("All",-1))])])]),t("div",Qa,[t("div",Za,[s(d(h),{status:"running"}),a[101]||(a[101]=t("span",{class:"nm"},"pnpm test -- --watch",-1)),a[102]||(a[102]=t("span",{class:"tm"},"0:42",-1))]),t("div",Xa,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),a[103]||(a[103]=t("span",{class:"nm"},"pnpm run build",-1)),a[104]||(a[104]=t("span",{class:"tm"},"3m12s",-1))]),t("div",$a,[s(d(o),{name:"close",size:"sm"}),a[105]||(a[105]=t("span",{class:"nm"},"pnpm lint",-1)),a[106]||(a[106]=t("span",{class:"tm"},"1m05s",-1))]),t("div",_a,[s(d(o),{name:"close",size:"sm"}),a[107]||(a[107]=t("span",{class:"nm"},"node scripts/migrate.mjs",-1)),a[108]||(a[108]=t("span",{class:"tm"},"0:18",-1))])])]),t("div",at,[t("div",tt,[t("span",et,[s(d(o),{name:"sparkles",size:"md"}),a[109]||(a[109]=e("Background Agent ",-1)),a[110]||(a[110]=t("span",{class:"dw-meta"},"1 running",-1))]),t("span",st,[t("span",dt,[s(d(o),{name:"clock",size:"sm"}),a[111]||(a[111]=e("Recent",-1))]),t("span",ot,[s(d(o),{name:"play",size:"sm"}),a[112]||(a[112]=e("Running",-1))]),t("span",ct,[s(d(o),{name:"circle-check",size:"sm"}),a[113]||(a[113]=e("Done",-1))]),t("span",it,[s(d(o),{name:"list",size:"sm"}),a[114]||(a[114]=e("All",-1))])])]),t("div",nt,[t("div",lt,[a[118]||(a[118]=t("div",{class:"ct"},[t("span",{class:"nu"},"01"),t("span",{class:"nm"},"Explore the auth module")],-1)),a[119]||(a[119]=t("div",{class:"ds"},"Map every callsite of the legacy token refresh and report findings",-1)),t("div",rt,[t("div",bt,[s(d(o),{name:"robot",size:"sm"}),a[115]||(a[115]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",vt,[t("span",pt,[s(d(h),{status:"running"}),a[116]||(a[116]=e("Running",-1))]),t("span",ht,[s(d(o),{name:"clock",size:"sm"}),a[117]||(a[117]=e("0:42",-1))])])])]),t("div",ut,[a[123]||(a[123]=t("div",{class:"ct"},[t("span",{class:"nu"},"02"),t("span",{class:"nm"},"Draft the release notes")],-1)),a[124]||(a[124]=t("div",{class:"ds"},"Summarize the merged PRs since the last tag into user-facing notes",-1)),t("div",gt,[t("div",mt,[s(d(o),{name:"robot",size:"sm"}),a[120]||(a[120]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",ft,[t("span",wt,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),a[121]||(a[121]=e("Done",-1))]),t("span",yt,[s(d(o),{name:"clock",size:"sm"}),a[122]||(a[122]=e("3m12s",-1))])])])]),t("div",kt,[a[128]||(a[128]=t("div",{class:"ct"},[t("span",{class:"nu"},"03"),t("span",{class:"nm"},"Run the integration tests")],-1)),a[129]||(a[129]=t("div",{class:"ds"},"pnpm test against the staging daemon",-1)),t("div",xt,[t("div",Tt,[s(d(o),{name:"robot",size:"sm"}),a[125]||(a[125]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",St,[t("span",Ct,[s(d(o),{name:"close",size:"sm"}),a[126]||(a[126]=e("Failed",-1))]),t("span",zt,[s(d(o),{name:"clock",size:"sm"}),a[127]||(a[127]=e("1m05s",-1))])])])]),t("div",qt,[a[133]||(a[133]=t("div",{class:"ct"},[t("span",{class:"nu"},"04"),t("span",{class:"nm"},"Migrate the config files")],-1)),a[134]||(a[134]=t("div",{class:"ds"},"Rewrite the workspace configs to the new schema",-1)),t("div",At,[t("div",Bt,[s(d(o),{name:"robot",size:"sm"}),a[130]||(a[130]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",Mt,[t("span",It,[s(d(o),{name:"close",size:"sm"}),a[131]||(a[131]=e("Cancelled",-1))]),t("span",Et,[s(d(o),{name:"clock",size:"sm"}),a[132]||(a[132]=e("0:18",-1))])])])])])])])]),a[141]||(a[141]=t("h3",{class:"sub"},"Responsive",-1)),a[142]||(a[142]=t("p",null,[e("See §02 "),t("code",null,"--p-bp-sm"),e(" 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.")],-1)),a[143]||(a[143]=t("div",{class:"callout info"},[t("span",{class:"ico"},"i"),t("div",null," 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. ")],-1))]),a[145]||(a[145]=c('
05

Rich Text Messages

Structured references travel as plain text on the wire and render as pills at both ends: the composer's editing surface and the rendered message stream share one pill vocabulary, so what you type is what the message shows. This section is the category spec — every future rich-text element (marks, embeds, interactive chips) joins it here.

Mention pill

The mention is the first rich-text element. It exists in two synchronized forms: an atom inside the desktop composer's ProseMirror document, and a pill in the message stream — assistant Markdown decorates local links with the same classes, and user/queue bubbles (verbatim wire text, never Markdown) render through the declarative ComposerText component. Both are the same mark: not a filled chip — no background, no vertical padding — just body text in a heavier weight (--weight-ui-strong) on a lighter ink (--color-text-muted), so the baseline stays flush with the surrounding text; a 2px horizontal inset (padding-inline: var(--space-05)) supplies the CJK/Latin autospacing that can't cross element boundaries and sets the mention apart from plain text; a 13px muted kind glyph leads, and the label is the basename — never the full path, which lives on the tooltip. Hover deepens the ink (glyph included) toward --color-text on every surface; in the message stream the clickable kinds (file, skill) also take the pointer cursor and the link underline, while the composer keeps pure editing semantics — I-beam, no underline, a click just places the caret. The shared classes live in app-ui's global sheet; the kind → glyph mapping is single-sourced in app-composer (mentionIcons) and also drives the mention menu rows, so a file looks identical in the menu, the editor, and the sent bubble. Copying from a bubble re-serializes the selection back to the wire text — pills carry their full attrs in data-mention-*, so a copy/paste round trip restores the link instead of a truncated basename.

Kinds and wire forms (serialization is a Markdown link, so the daemon payload stays plain text and the TUI needs nothing new):

KindGlyphWire formClick (in messages)
Filesingle folded-corner file glyph for every file (no per-extension variants)[name](path) — the dest is canonically encoded per path segment (every non-unreserved ASCII character → %XX; non-ASCII stays literal, so a CJK path reads as itself — one decodeURIComponent restores it on every surface)opens the file preview
Folderfolder glyph[name](path/) — trailing slash marks the kind (dest %%25 as above)inert (no target yet)
Skillsparkling glyph[name](kimi-code://skill/<name>) — the app's deep-link protocolopens the skill's SKILL.md in the preview panel

Hover tooltip: one document-level singleton (mentionTooltip) serves every pill — composer NodeViews, ComposerText-rendered bubbles, and Markdown anchors are all raw DOM a Vue wrapper can't reach, so it delegates on document mouseover into a single shared bubble. The bubble keeps the design-system tooltip's dark skin but is interactive. File and folder pills show the full path, wrapping anywhere within a fixed max width: every / separator muted, the basename bold (--weight-semibold). Skill pills show a card — the name with an open button at the right (opens the skill's SKILL.md in the preview panel; the path rides the wire skill descriptor through AppSkill.path), the description below, clamped to four lines; an unresolvable skill degrades to the name alone. Timing mirrors TooltipBubble (150ms show delay, top placement with flip, viewport clamping) and the bubble stays open while hovered so the button is reachable; native title tooltips are removed wherever a pill appears. The bubble is a documented structural exception to the component-primitive rule (like the dock overlay): its anchors are ProseMirror NodeViews and pillified spans a Vue wrapper can't reach, so the open/copy buttons re-implement the Button primitive's contract (size, hover, :focus-visible ring) by hand instead of importing it.

Edge cases: labels cap at 32 chars — a longer name takes a middle ellipsis that keeps the head of the base name and the whole extension (the full name stays in the data attributes, the full path on the tooltip). A pill whose target was deleted after the fact: hovering fires a one-byte existence probe (an inline spinner sits at the tail of the tooltip's path text while in flight), and a definitive not-found fades the pill and strikes it through — in messages and in the composer alike. Clicks are never gated on the verdict (the preview's own not-found state is the final answer); only confirmed-existing verdicts are cached, scoped to the session, so a recreated file recovers on the next hover and a flaky daemon can never strike a pill by mistake.

Behavior contract: a bare @ opens the menu instantly with the workspace root listing (Esc dismisses); with a query, the menu groups Files (debounced daemon search) above Skills (instant local filter), captions shown only when both exist, and an in-flight search never hides the current rows (a corner spinner marks it). Full-width from IMEs triggers identically. Insertion replaces the @token and adds a separating trailing space; the pill is one atom — Backspace removes it whole, and a zero-width caret anchor keeps the caret on the pill's line when it ends a paragraph. Drafts, history recall, and queue reloads revive pills from their link form on load, and pasting mention-link text (e.g. a copied pill) revives them too — the serializer round-trips both ways. Skill activation: sending a message with exactly one skill pill activates that skill via the existing channel (the pill form of /skill:<name>, the full text — the pill traveling as its mention link — becomes the args, attachments ride along), and the sent bubble shows the original message verbatim with the pill revived in place (a slash-typed activation, whose bare args carry no pill, keeps the identity card instead); two or more skill pills degrade to plain references, because each activation is its own turn.

Implementation map: schema/serialization/offset mapping in app-composer's composerTextDoc (pure, node-tested); the editor surface in composerEditor; user/queue bubbles render via app-composer's ComposerText (one segment pass, declarative tree — no post-processing); assistant-side classification (classifyMentionHref) and decoration in app-markdown's Markdown.vue link pass; hover + skill-click routing in app-composer's mentionTooltip singleton, wired per app shell. When editing these, keep the two surfaces in lockstep — a pill that serializes one way in the composer must read the same way in a message.

06

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.
07

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 and the composer dropdowns use the --color-menu-bg token (a 95% surface), while the autocomplete family — slash/mention popups and the dock work panel — deliberately runs a frostier recipe of its own: 70% page background (single-sourced as --color-menu-bg-frost) over the shared --p-menu-backdrop blur, which stays the single-sourced blur token across all of them. The dock's work surfaces — the work panel and its pills, persistent over the scrolling transcript — ride that same frostier recipe (specified per-surface in §04 (Dock · work pills & panels)) rather than a bespoke one. 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.
08

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). Pinned rows render in pure recency order (updatedAt desc — no manual ordering, no attention tiering): drag a session row in to pin it (the drop spot carries no position meaning), drag a pinned row out to unpin. 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 (used-percent values via settings.planUsage.usedPct, 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, and the whole menu (flyouts included) runs one step above the §03 default density — base-size labels, taller rows
!
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.
i
实验室 multi-tab sidebar toggle (Settings → 实验室, kimi-web.sidebar-multi-tab, default OFF) forks the sidebar into two forms. OFF = the legacy single session list: no 进行中/已完成/工作空间 tabs (statusTab pinned to open, tab shortcuts inert), no session-admin entries (the 列表管理 menu item hides and the workspace home itself falls back to the classic 新建会话 doodle hero — no workspace head, no recent-sessions list), the row hover action + context menu and the chat-header ⋯ menu read 归档 with the archive glyph (no success-hover variant, the header's Done pill + reopen button hide), and the archive ActionToast is the legacy «撤销 · 或到 · 设置 · 查看已归档的会话» linking to Settings → Archived. ON = the status-tabs form documented in this section (tabs, session admin page, the complete/reopen relabel, «已完成 · 撤销» toast). The preference is an app-core singleton (useSidebarTabs) consumed directly by Sidebar / SessionRow / ConversationPane / App.vue — no prop threading.

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; empty while an attention Badge owns the row — one status at a time, decided by the shared SessionDisplayStatus enum (app-core sessionDisplayStatus.ts: approval › question › running › aborted › unread)
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 small tag (git-pull-request icon + #number, 2xs medium on a soft ground with a hairline edge and radius-sm corners — a mini §03 Badge) sits at the line's right edge, state-colored the GitHub way (open = --color-success-soft ground + --color-success text, merged = --color-done-soft + --color-done purple, closed = neutral sunken) 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.
09

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.
10

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 (sidebar-style alignment: one icon gutter, shared left text edge, shared right meta edge; workspace rows single-line name + right-aligned path, session rows title + time over a workspace · snippet meta line; quiet uppercase section heads with counts; empty query shows a few top workspaces + recent sessions) + 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 (stays "发现新版本 vX" even while downloading) + quiet meta line (release date · current version) + height-capped scrolling what's-new list + right-aligned action row (skip → download; downloading → background + disabled live-percent button; 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.
11

Session Admin Page

The session admin page (/admin/sessions, opened from the sidebar's list-management menu) is a full-pane management view for cross-workspace session triage: filters, a server-side paged table, and batch lifecycle actions. It is a main-view peer of the conversation pane (mainView in the facade, switched with v-show so the chat stays alive) and page-private by decision — everything lives under components/admin/ (SessionAdminView/Table/Pagination, FilterSelect, MultiSelectMenu, SessionAdminMenu, useAnchoredMenu); nothing here promotes to §03 until a second consumer exists. Data is one GET /api/v2/sessions page-mode call per filter/page change (all conditions pushed down, no client-side aggregation); batch archive/restore go through the v2 batch endpoints with per-item outcomes.

Page skeleton — a full-pane admin surface

A 48px title bar (a back IconButton — chevron-left, tooltip 返回, closing the page back to the chat underneath via closeSessionAdmin — then the page title, semibold base; hairline bottom edge; on macOS desktop it doubles as the window-drag region and takes the chat header's collapsed-sidebar clearance — 146px / 78px / Windows fallback — so ONLY the bar insets, the body never does) → muted subtitle → query-form filter bar → table card → pager. The title bar and the scroll container are siblings (bar fixed, body scrolls). The page wrapper spans the whole conversation column — do not apply the chat content measure (--p-content-max) here: under table-layout: fixed a narrow wrapper crushes the table's flexible columns to zero width (the title/prompt columns collapsed in practice). An admin table surface owns the pane width. The status filter defaults to 全部 (all) — the page is the whole inventory, 重置 restores that same default.

!
Lesson (content measure): --p-content-max is a READING measure for prose-like content (chat, dialogs). Full-bleed work surfaces — tables, grids, dashboards — span the pane instead. Pick one deliberately; inheriting the chat measure by default is the bug.

Table

The card is the flat shell: 0.5px --color-line hairline, --radius-lg, no shadow. Inside, table-layout: fixed with a colgroup: fixed-width utility columns (checkbox, workspace, status, the two time columns, actions) and two flexible content columns (title at max(200px, 20%) — a floor, not a bare percentage — last prompt taking the rest). The head row is a pinned-height 32px box (it hosts the batch transform below); body rows are 40px. Rows are separated by 0.5px --color-subtle hairlines (none after the last row), with a --color-hover wash on hover. Every cell truncates single-line with ellipsis and carries a title tooltip. Time columns are absolute (YYYY-MM-DD HH:mm) in --font-mono xs with tabular-nums — the admin page is an audit view, so no relative times; empty values render a faint . The status column sits right after the workspace column and reuses the sidebar row's lifecycle glyphs: state-open (dashed ring, --color-success) for 进行中 and state-done (checked ring, --color-done) for 已完成, icon + label. First load swaps the body for a centered §03 Spinner; refetches keep the stale rows and dim the card (opacity + pointer-events: none) rather than flashing it away; filters with no matches render the centered faint empty line.

Responsive steps (the card is the query container; web's narrow panes matter too): the time columns give ground FIRST — at ≤1020px their values swap to the compact MM-DD HH:mm at 108px (each time cell carries both spans, CSS toggles them — no JS measuring); at ≤760px the time columns hide outright (the col and the cells share sa-c-time/sa-col-time classes) and the workspace column drops its folder icon. The table itself floors at 640px and the card takes overflow-x: auto — past the floor the card scrolls horizontally instead of crushing title/prompt to zero, and auto still clips the rounded corners like hidden did.

ColumnWidthContent
checkbox36pxheader select-this-page (indeterminate) + row checkboxes
会话名20%title (emoji verbatim), weight 475, ellipsis; hosts inline rename
工作空间116pxfolder-closed icon + workspace name (cwd basename fallback)
状态88pxstate-open/state-done glyph + label
最后一条 promptflexmuted, ellipsis, faint when null
最后更新 / 完成时间140px ×2mono tabular-nums absolute time; completed shows while open
操作84pxlifecycle IconButton (state-done completes an open row, undo reopens a done one; tooltips carry 标记完成/恢复进行中) + ⋯ IconButton dropdown (Rename… / Fork / Export)

Batch header — the zero-offset transform

GitHub issues/PR semantics: while a selection exists, the head row transforms IN PLACE — the checkbox column stays put, and the remaining column headers swap for a single <th colspan> batch bar ("已选 n 项" + Mark-as-done / Reopen, each disabled when the selection holds no row of that lifecycle) inside the SAME pinned 32px box, so the table body does not move a pixel. Mark-as-done is the bar's one accent-primary button (fill + on-accent icon/label); Reopen stays a quiet hairline button. The selection itself is facade-owned (a reactive id set plus a per-id lifecycle map, reconciled against fresh rows on every landing) and survives page and filter changes — the batch count deliberately includes rows no longer visible. Successful batch items leave the selection and the current page is silently re-pulled; failures stay selected. There is deliberately no "clear selection" button for ordinary selections: unchecking rows or the header checkbox is the way out. Toasts ride App.vue's shared ActionToast channel (succeeded count, failed count when partial, Undo through the inverse batch endpoint); an all-failed batch has nothing to undo and surfaces as a WarningToast instead.

Select-all-matching — the Gmail move

Page-size caps (≤100) make "mark everything done" hopeless against thousands of rows, so the batch bar borrows Gmail's escalation: once the header checkbox has the whole page selected and total says more rows exist, a link-style button appears IN the bar (zero-offset — no banner pushing the table down): "选中当前条件下的全部 N 项" (busy-label 正在选中… while fetching). Activating it materializes every matching id into the selection via the ids projection (GET /api/v2/sessions?fields=id,archived — the one cheap shape whose page_size ceiling relaxes to 10000; cursor-walked for larger sets), merging atomically: a filter change mid-flight discards the fetch entirely. While active the count reads "已选中全部 n 项" and the link becomes 清除选择. Exclusions are free — unchecking a row just drops it from the set; emptying the selection drops the mode, as does a right-click single-row collapse. The mode ties itself to the filter fingerprint it was built from: a real condition change (query-form apply with different values, or any granular setter) clears the whole selection — re-applying the SAME conditions keeps it. Batch executions chunk at the wire's 5000-unique-ids ceiling (sequential, merged per-item outcomes; a thrown chunk aborts the rest and counts everything unexecuted as failed — the succeeded ids still reconcile).

The quiet-button border reset

All quiet icon/text buttons on the page (the batch bar's Reopen, the pager buttons) set border: none; background: transparent explicitly — or, for the bordered shapes (the filter triggers), an explicit 0.5px hairline. Row actions are pure §03 IconButtons (the sidebar row's language): the lifecycle glyph (state-done completes an open row, undo reopens a done one — tooltips carry the labels) plus the ⋯ dropdown; a text button per row read as visual noise once every row carried one.

!
Lesson (UA borders): the global reset clears button backgrounds only — a bare <button> still inherits the UA stylesheet's outset border, which reads as a stray box around every quiet control. Any quiet button outside the §03 primitives must reset both properties.

Quiet filter controls (query form)

The filter bar is a query form (antd Pro semantics): the controls edit a local DRAFT only — nothing is requested until an explicit apply. 查询 (a §03 Button variant=primary size=sm) applies the whole draft through the facade in one shot (applySessionAdminFilters — atomic write + page reset + exactly one request, never the per-setter debounce dribble), 重置 (a ghost sibling) restores defaults the same way, and Enter inside the bar queries too — except while any overlay (a select dropdown) is open, where Enter belongs to the overlay. Pagination is exempt: page/page-size changes still fetch immediately. Entry paths can pre-seed the conditions: the workspace home's 查看更多 opens the page with its workspace already selected in the filter (openSessionAdmin(workspaceId) applies the filter atomically with the navigation), and because the page is v-show-kept, the draft re-seeds from the applied filters on EVERY entry so the controls always show the true conditions. The controls themselves are muted sm labels plus a family of quiet 30px hairline controls (0.5px --color-line, --radius-md, transparent ground, --color-hover on hover/open) — deliberately NOT the §03 Select (a 32px+ form control with an accent focus ring, too heavy for a filter strip):

Point-anchored context menus

useAnchoredMenu is the page's one menu mechanic: fixed-position §03 Menu surface, pop-from-anchor motion (fade + 0.97 scale on the menu tokens, origin and nudge following the upward flip at the viewport edge), closed by outside mousedown / Esc / scroll / resize. Three anchor modes — left-aligned under a trigger (filter selects), right-edge under a trigger (the row ⋯), and openAt(x, y) at a raw viewport point for the row contextmenu. The contextmenu has two shapes: on a row outside the multi-selection the selection first collapses to just that row and the menu is the single shape (Open session / Rename… / Fork / Export / — / the lifecycle action); on a row inside it, the multi shape (a muted count head + Mark-as-done (n) / Reopen (n), disabled per availability). Open session is the facade's selectSession — a user navigation that also leaves the admin page back to chat.

Inline rename

The title cell swaps for an accent-ringed input (--color-accent border + --color-accent-bd ring, --radius-sm) — Enter commits, Esc cancels, blur commits, settled once. The table is server-fed, so a commit is followed by a silent re-pull of the current page (the facade's pool update never reaches it).

',7))])])])]))}}),Rt=E(Ht,[["__scopeId","data-v-a3290cb2"]]);export{Rt as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-BxQYZjpo.css b/apps/kimi-code/dist-web/assets/DesignSystemView-BxQYZjpo.css deleted file mode 100644 index 6c83daba92..0000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-BxQYZjpo.css +++ /dev/null @@ -1 +0,0 @@ -.ds-page[data-v-a3290cb2]{--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-a3290cb2] *,.ds-page[data-v-a3290cb2] *:before,.ds-page[data-v-a3290cb2] *:after{box-sizing:border-box}.ds-page[data-v-a3290cb2]{scroll-behavior:smooth}.ds-page[data-v-a3290cb2]{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-a3290cb2],h2[data-v-a3290cb2],h3[data-v-a3290cb2],h4[data-v-a3290cb2]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-a3290cb2]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-a3290cb2]{color:var(--d-accent-2);text-decoration:none}a[data-v-a3290cb2]:hover{text-decoration:underline}code[data-v-a3290cb2],pre[data-v-a3290cb2],.mono[data-v-a3290cb2]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-a3290cb2]{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-a3290cb2]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-a3290cb2]{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-a3290cb2]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-a3290cb2]{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-a3290cb2]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-a3290cb2]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-a3290cb2]{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-a3290cb2]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-a3290cb2]{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-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-a3290cb2]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-a3290cb2]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-a3290cb2]{color:var(--d-fg-soft)}.content[data-v-a3290cb2]{min-width:0}.content-inner[data-v-a3290cb2]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-a3290cb2]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-a3290cb2]{margin-top:72px}.hero[data-v-a3290cb2]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-a3290cb2]{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-a3290cb2]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-a3290cb2]{color:var(--d-accent)}.hero p.lead[data-v-a3290cb2]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-a3290cb2]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-a3290cb2]{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-a3290cb2]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-a3290cb2]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-a3290cb2]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-a3290cb2]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-a3290cb2]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-a3290cb2]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-a3290cb2]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-a3290cb2]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-a3290cb2]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-a3290cb2]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-a3290cb2]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-a3290cb2]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-a3290cb2]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-a3290cb2]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-a3290cb2]{color:var(--d-amber)}.stat.bad[data-v-a3290cb2]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-a3290cb2]{color:var(--d-red)}.stat.good[data-v-a3290cb2]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-a3290cb2]{color:var(--d-green)}.panel[data-v-a3290cb2]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-a3290cb2]{padding:22px}.panel-soft[data-v-a3290cb2]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-a3290cb2]{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-a3290cb2]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-a3290cb2]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-a3290cb2]{background:var(--d-accent);color:#fff}.callout.warn[data-v-a3290cb2]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-a3290cb2]{background:var(--d-amber);color:#fff}.callout.good[data-v-a3290cb2]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-a3290cb2]{background:var(--d-green);color:#fff}table.dt[data-v-a3290cb2]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{border-bottom:none}table.dt td.tk[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-a3290cb2]{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-a3290cb2]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-a3290cb2]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-a3290cb2]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-a3290cb2]{padding:10px 12px 12px}.color-meta .cn[data-v-a3290cb2]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-a3290cb2]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-a3290cb2]:last-child{border-bottom:none}.type-sample[data-v-a3290cb2]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-a3290cb2]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-a3290cb2]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-a3290cb2]:last-child{border-bottom:none}.space-bar[data-v-a3290cb2]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-a3290cb2]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-a3290cb2]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-a3290cb2]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-a3290cb2]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-a3290cb2]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-a3290cb2]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-a3290cb2]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-a3290cb2]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-a3290cb2]{display:flex;gap:6px}.tab[data-v-a3290cb2]{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-a3290cb2]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-a3290cb2]{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-a3290cb2]{flex-direction:column;align-items:stretch}.stage.dark[data-v-a3290cb2]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-a3290cb2]{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-a3290cb2]{color:#6b7280}.ba[data-v-a3290cb2]{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-a3290cb2]{min-width:0}.ba-col+.ba-col[data-v-a3290cb2]{border-left:.5px solid var(--d-line)}.ba-head[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-a3290cb2]{background:var(--d-red-soft)}.ba-head.after[data-v-a3290cb2]{background:var(--d-green-soft)}.ba-head .bh[data-v-a3290cb2]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-a3290cb2]{color:var(--d-red)}.ba-head.after .bh[data-v-a3290cb2]{color:var(--d-green)}.ba-head .bh small[data-v-a3290cb2]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-a3290cb2]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-a3290cb2]{background:#fff}.code[data-v-a3290cb2]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-a3290cb2]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-a3290cb2]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-a3290cb2]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-a3290cb2]{color:#8b949e}.code .k[data-v-a3290cb2]{color:#ff7b72}.code .s[data-v-a3290cb2]{color:#a5d6ff}.code .p[data-v-a3290cb2]{color:#79c0ff}.code .n[data-v-a3290cb2]{color:#d2a8ff}.code .v[data-v-a3290cb2]{color:#ffa657}.pill[data-v-a3290cb2]{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-a3290cb2]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-a3290cb2]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-a3290cb2]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-a3290cb2]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-a3290cb2]{font-family:JetBrains Mono,monospace}ul.clean[data-v-a3290cb2]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-a3290cb2]{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-a3290cb2]:last-child{border-bottom:none}ul.clean li[data-v-a3290cb2]: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-a3290cb2]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-a3290cb2]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-a3290cb2]{color:var(--d-fg)}ul.clean li .path[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-a3290cb2]{position:relative;margin:24px 0}.phase[data-v-a3290cb2]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-a3290cb2]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-a3290cb2]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-a3290cb2]{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-a3290cb2]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-a3290cb2]{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-a3290cb2]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-a3290cb2]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-a3290cb2]{margin:0}.matrix[data-v-a3290cb2]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-a3290cb2]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-a3290cb2]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-a3290cb2]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-a3290cb2]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-a3290cb2]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-a3290cb2]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-a3290cb2]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{grid-template-columns:1fr}.sidebar[data-v-a3290cb2]{position:static;height:auto}.nav[data-v-a3290cb2]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-a3290cb2]{padding:40px 22px 80px}.stat-grid[data-v-a3290cb2]{grid-template-columns:repeat(2,1fr)}.ba[data-v-a3290cb2]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-a3290cb2]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-a3290cb2]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-a3290cb2]{grid-template-columns:1fr}}.ds-page .p[data-v-a3290cb2],.ds-page .stage.p-skin[data-v-a3290cb2],.ds-page [data-p][data-v-a3290cb2]{--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-a3290cb2]{--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-a3290cb2]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-a3290cb2]{--_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-a3290cb2]:active{transform:scale(.98)}.p-btn[data-v-a3290cb2]: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-a3290cb2]{width:16px;height:16px}.p-btn.sm[data-v-a3290cb2]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-a3290cb2]{width:14px;height:14px}.p-btn.lg[data-v-a3290cb2]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-a3290cb2]{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-a3290cb2]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-a3290cb2]{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-a3290cb2]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-a3290cb2]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-a3290cb2]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-a3290cb2]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-a3290cb2]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-a3290cb2]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-a3290cb2],.p-btn.disabled[data-v-a3290cb2]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-a3290cb2]{--_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-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-a3290cb2]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-a3290cb2]{--_s: 44px}.p-icon-btn .p-ic[data-v-a3290cb2]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-a3290cb2]{width:20px;height:20px}.p-badge[data-v-a3290cb2]{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-a3290cb2]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-a3290cb2]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-a3290cb2]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-a3290cb2]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-a3290cb2]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-a3290cb2]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-a3290cb2]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-a3290cb2]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-a3290cb2]{width:12px;height:12px}.p-kbd[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-a3290cb2]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-a3290cb2]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-a3290cb2]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-a3290cb2]{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-a3290cb2]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-a3290cb2]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-a3290cb2]{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-a3290cb2]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-a3290cb2]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-a3290cb2],.p-select[data-v-a3290cb2],.p-textarea[data-v-a3290cb2]{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-a3290cb2]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-a3290cb2]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-a3290cb2]:hover,.p-select[data-v-a3290cb2]:hover,.p-textarea[data-v-a3290cb2]:hover{border-color:var(--p-line-strong)}.p-input[data-v-a3290cb2]:focus,.p-select[data-v-a3290cb2]:focus,.p-textarea[data-v-a3290cb2]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-a3290cb2]::placeholder,.p-textarea[data-v-a3290cb2]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-a3290cb2]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-a3290cb2]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-a3290cb2]{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-a3290cb2]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-a3290cb2]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-a3290cb2]{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-a3290cb2]{padding:4px 22px 18px}.p-dialog-foot[data-v-a3290cb2]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-a3290cb2]{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-a3290cb2]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-a3290cb2]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-a3290cb2]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-a3290cb2]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-a3290cb2]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-a3290cb2]{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-a3290cb2]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-a3290cb2]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-a3290cb2]{width:18px;height:18px;animation:p-spin-a3290cb2 .85s linear infinite}.p-spinner.sm[data-v-a3290cb2]{width:14px;height:14px}.p-spinner circle[data-v-a3290cb2]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-a3290cb2]{stroke:var(--p-line)}.p-spinner .arc[data-v-a3290cb2]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-a3290cb2{to{transform:rotate(360deg)}}.p-thinking[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{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-a3290cb2]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{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-a3290cb2]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-a3290cb2]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-a3290cb2]{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-a3290cb2]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-a3290cb2]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-a3290cb2]{font-weight:500}.p-opt-text .d[data-v-a3290cb2]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-a3290cb2]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-a3290cb2]{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-a3290cb2]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-a3290cb2]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-a3290cb2]{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-a3290cb2]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-a3290cb2]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-a3290cb2]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-a3290cb2]{color:var(--p-accent);font-weight:500}.p-dot[data-v-a3290cb2]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-a3290cb2]{background:var(--p-success)}.p-dot.error[data-v-a3290cb2]{background:var(--p-danger)}.p-dot.running[data-v-a3290cb2]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-a3290cb2 1.4s ease-out infinite}@keyframes p-pulse-a3290cb2{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-a3290cb2]{overflow:hidden}.p-tool-group-head[data-v-a3290cb2]{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-a3290cb2]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-a3290cb2]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-a3290cb2]{font-weight:500}.p-tool-group-head .tg-meta[data-v-a3290cb2]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-a3290cb2]{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-a3290cb2]{transform:rotate(90deg)}.p-tool-row[data-v-a3290cb2]{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-a3290cb2]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-a3290cb2]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-a3290cb2]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-a3290cb2]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-a3290cb2]{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-a3290cb2],.p-tool-row .tr-add~.tr-add[data-v-a3290cb2]{margin-left:0}.p-tool-row .tr-del[data-v-a3290cb2]{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-a3290cb2]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-a3290cb2]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-a3290cb2]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{width:14px;height:14px}.p-agent-card .pa-main[data-v-a3290cb2]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-a3290cb2]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-a3290cb2]{transform:rotate(90deg)}.p-tool-detail[data-v-a3290cb2]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-a3290cb2]{margin-top:4px}.p-composer[data-v-a3290cb2]{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-a3290cb2]: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-a3290cb2]:focus-within:after{opacity:1}.p-composer-ta[data-v-a3290cb2]{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-a3290cb2]{color:var(--p-text-faint)}.p-composer-bar[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-a3290cb2]{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-a3290cb2]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-a3290cb2],.p-composer-right[data-v-a3290cb2]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-a3290cb2]{border-radius:var(--p-r-full)}.p-send[data-v-a3290cb2]{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-a3290cb2]: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-a3290cb2]:hover:after{opacity:.28}.p-send[data-v-a3290cb2]:active{transform:scale(.92)}.p-send .p-ic[data-v-a3290cb2]{width:16px;height:16px}.dw-bar[data-v-a3290cb2]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5)}.am-mock[data-v-a3290cb2]{display:flex;flex-direction:column;gap:var(--menu-rows-seam);width:100%;max-width:420px;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--p-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--p-sh-menu);font-family:var(--font-ui)}.am-mock-row[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border-radius:var(--radius-menu-row);color:var(--p-text);font-size:var(--p-font-size-base)}.am-mock-row.focus[data-v-a3290cb2]{background:var(--color-selected)}.am-mock-row .n[data-v-a3290cb2]{font-weight:var(--weight-medium)}.am-mock-row .d[data-v-a3290cb2]{margin-left:var(--space-1);color:var(--p-text-muted);font-size:var(--text-sm)}.dw-pill[data-v-a3290cb2]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-normal)}.dw-pill[data-v-a3290cb2] svg{width:1.5em;height:1.5em}.dw-pill.on[data-v-a3290cb2]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);pointer-events:none}.dw-pill .dw-count[data-v-a3290cb2]{color:var(--p-text-muted)}.dw-pill .dw-running[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted)}.dw-pill .dw-live[data-v-a3290cb2]{color:var(--p-success);font-weight:var(--weight-medium)}.dw-panel[data-v-a3290cb2]{width:100%;border:.5px solid var(--p-line);border-radius:var(--radius-2xl);background:color-mix(in srgb,var(--p-bg) 70%,transparent);box-shadow:var(--p-sh-menu);overflow:hidden}.dw-head[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-4) var(--space-4) 0}.dw-tab[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-2);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-tab[data-v-a3290cb2] svg{width:1.5em;height:1.5em}.dw-tab .dw-meta[data-v-a3290cb2]{color:var(--p-text-muted)}.dw-chips[data-v-a3290cb2]{margin-left:auto;display:inline-flex;gap:var(--space-05);padding:var(--space-05);background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md)}.dw-chip[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--p-sp-3);border-radius:var(--p-r-sm);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-chip.on[data-v-a3290cb2]{color:var(--p-text);background:var(--p-surface-raised);box-shadow:var(--p-sh-sm)}.dw-body[data-v-a3290cb2]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dw-body.col[data-v-a3290cb2]{display:flex;flex-direction:column}.dw-row[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--p-text);font-size:var(--p-font-size-base)}.dw-row .nm[data-v-a3290cb2]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-row .tm[data-v-a3290cb2]{flex:none;color:var(--p-text-muted);font-variant-numeric:tabular-nums}.dw-row .ok[data-v-a3290cb2]{color:var(--p-success);transform:scale(.91)}.dw-row.fail .nm[data-v-a3290cb2],.dw-row.fail[data-v-a3290cb2] svg{color:var(--p-danger)}.dw-row.cancelled[data-v-a3290cb2] svg{color:var(--p-text-muted)}.dw-body.grid[data-v-a3290cb2]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.dw-card[data-v-a3290cb2]{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.dw-card .ct[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-2)}.dw-card .nm[data-v-a3290cb2]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium)}.dw-card .nu[data-v-a3290cb2]{flex:none;color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-variant-numeric:tabular-nums}.dw-card .ds[data-v-a3290cb2]{color:var(--p-text-muted);font-size:var(--p-font-size-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dw-card .cs[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cf[data-v-a3290cb2]{display:flex;flex-direction:column;gap:var(--space-1)}.dw-card .cm[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cm span[data-v-a3290cb2]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-card .cs .sl[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-1)}.dw-card .cs .sl .ok[data-v-a3290cb2]{color:var(--p-success);transform:scale(.91)}.dw-card .cs .tm[data-v-a3290cb2]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);font-variant-numeric:tabular-nums}.dw-card.fail .cs .sl[data-v-a3290cb2]{color:var(--p-danger)}.dw-ring[data-v-a3290cb2]{display:inline-block;width:var(--p-ic-md);height:var(--p-ic-md);border:1.5px solid var(--p-line-strong);border-radius:var(--radius-full);vertical-align:middle}.dw-spin[data-v-a3290cb2]{display:inline-flex;color:var(--p-text);vertical-align:middle}.dt td .kw-dot[data-v-a3290cb2],.dt td[data-v-a3290cb2] svg{vertical-align:middle}.p[data-v-a3290cb2] ::selection,[data-p][data-v-a3290cb2] ::selection{background:var(--p-selection)}.p-link[data-v-a3290cb2]{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-a3290cb2]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-a3290cb2]{color:var(--p-text-muted)}.p-link.muted[data-v-a3290cb2]:hover{color:var(--p-text)}.p-link .p-ic[data-v-a3290cb2]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-a3290cb2],.p-menu-item.active[data-v-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-a3290cb2]{color:var(--p-danger)}.p-menu-item.danger[data-v-a3290cb2]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-a3290cb2]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-a3290cb2]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-a3290cb2]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-a3290cb2]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-a3290cb2]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-a3290cb2]{color:var(--p-danger)}.p-menu-item.lg[data-v-a3290cb2]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-a3290cb2]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]:hover{color:var(--p-text)}.p-seg-item.on[data-v-a3290cb2]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-a3290cb2]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-a3290cb2]{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-a3290cb2]:hover{color:var(--p-text)}.p-tab.on[data-v-a3290cb2]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-a3290cb2]{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-a3290cb2]: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-a3290cb2]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-a3290cb2]{background:var(--p-accent)}.p-switch.on[data-v-a3290cb2]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-a3290cb2]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-a3290cb2]{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-a3290cb2]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-a3290cb2]{width:12px;height:12px}.p-avatar[data-v-a3290cb2]{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-a3290cb2]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-a3290cb2]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-a3290cb2]{width:13px;height:13px}.p-empty[data-v-a3290cb2]{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-a3290cb2]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-a3290cb2]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-a3290cb2]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-a3290cb2]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-a3290cb2]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-a3290cb2]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-a3290cb2]{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-a3290cb2],.p-turn-failed .tf-meta[data-v-a3290cb2]{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-a3290cb2]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-a3290cb2]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-a3290cb2]{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-a3290cb2]{opacity:1}.p-banner[data-v-a3290cb2]{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-a3290cb2]{width:18px;height:18px;flex:none}.p-banner.info[data-v-a3290cb2]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-a3290cb2]{color:var(--p-accent)}.p-banner.warning[data-v-a3290cb2]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-a3290cb2]{color:var(--p-warning)}.p-banner.danger[data-v-a3290cb2]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-a3290cb2]{color:var(--p-danger)}.p-sheet[data-v-a3290cb2]{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-a3290cb2]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-a3290cb2]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-a3290cb2 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-a3290cb2{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-a3290cb2]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-a3290cb2]{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-a3290cb2]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-a3290cb2]{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-a3290cb2]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-a3290cb2]{width:15px;height:15px}.p-topbar[data-v-a3290cb2]{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-a3290cb2]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-a3290cb2]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-a3290cb2]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-a3290cb2]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-a3290cb2]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-a3290cb2]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-a3290cb2]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-a3290cb2]{flex:1;min-width:0}.demo-chat[data-v-a3290cb2]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-a3290cb2]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-a3290cb2]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-a3290cb2]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]{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-a3290cb2]{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-a3290cb2]{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-a3290cb2]{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-a3290cb2]{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-a3290cb2]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-a3290cb2]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-a3290cb2]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-a3290cb2]{color:var(--p-success)}.p-diff-row.del[data-v-a3290cb2]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-a3290cb2]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-a3290cb2]{color:var(--p-text)}.p-field-error[data-v-a3290cb2]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-a3290cb2]{vertical-align:middle}.p-btn .p-spinner .track[data-v-a3290cb2]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-a3290cb2]{stroke:currentColor}.ds-page[data-v-a3290cb2]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-a3290cb2]{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-a3290cb2]{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-a3290cb2]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-a3290cb2]{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-DWfyweO9.js b/apps/kimi-code/dist-web/assets/DesignSystemView-DWfyweO9.js new file mode 100644 index 0000000000..ba52c7be5b --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-DWfyweO9.js @@ -0,0 +1,13 @@ +import{M as A,aD as B,aI as M,aL as l,u as r,v as a,G as i,H as t,F as g,aX as k,bb as x,I as d,bk as s,cx as o,cy as I,bJ as h,cz as T,cA as S,cB as E,cC as u,cD as D,cE as H}from"./index-BkUUBejk.js";const O={class:"ds-page"},V={class:"layout"},L={class:"content"},R={class:"content-inner"},W={id:"tokens"},N={class:"icon-sizes"},P={class:"sz"},U={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"sz"},j={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},G={class:"sz"},K={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},J={class:"icon-grid"},Y={class:"icon-group-label"},Q={class:"ic-name"},Z={id:"primitives"},X={class:"stage-wrap"},$={class:"stage p"},_={class:"p-pill",style:{color:"var(--p-warning)"}},ee={class:"stage-wrap"},ae={class:"stage p col"},te={class:"stage-wrap"},de={class:"stage p col"},se={class:"demo-row"},oe={class:"p-btn primary disabled"},ie={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},ne={class:"stage-wrap"},le={class:"stage p col"},re={class:"demo-row"},ce={class:"stage-wrap"},be={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},ve={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},he={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},pe={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ue={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ge={id:"chat"},me={class:"stage-wrap"},fe={class:"stage p col"},we={style:{"max-width":"560px",width:"100%"}},ye={class:"stage-wrap"},ke={class:"stage p col",style:{"align-items":"center",background:"#fff"}},xe={class:"p-composer",style:{width:"100%","max-width":"620px"}},Te={class:"p-composer-bar"},Se={class:"p-composer-left"},Ce={class:"p-pill",style:{color:"var(--p-warning)"}},ze={class:"stage-wrap"},qe={class:"stage p",style:{background:"var(--p-bg)"}},Ae={class:"am-mock"},Be={class:"am-mock-row focus"},Me={class:"am-mock-row"},Ie={class:"am-mock-row"},Ee={class:"am-mock-row"},De={class:"dt"},He={class:"dw-spin"},Oe={class:"stage-wrap"},Ve={class:"stage p",style:{background:"var(--p-bg)"}},Le={class:"dw-bar"},Re={class:"dw-pill"},We={class:"dw-pill"},Ne={class:"dw-pill on"},Pe={class:"dw-running"},Ue={class:"dw-pill"},Fe={class:"stage-wrap"},je={class:"stage p col",style:{background:"var(--p-bg)",gap:"var(--space-4)"}},Ge={class:"dw-panel"},Ke={class:"dw-head"},Je={class:"dw-tab"},Ye={class:"dw-chips"},Qe={class:"dw-chip on"},Ze={class:"dw-chip"},Xe={class:"dw-chip"},$e={class:"dw-chip"},_e={class:"dw-body col"},ea={class:"dw-row"},aa={class:"dw-row"},ta={class:"dw-row fail"},da={class:"dw-row cancelled"},sa={class:"dw-panel"},oa={class:"dw-head"},ia={class:"dw-tab"},na={class:"dw-chips"},la={class:"dw-chip on"},ra={class:"dw-chip"},ca={class:"dw-chip"},ba={class:"dw-chip"},va={class:"dw-body grid"},ha={class:"dw-card"},pa={class:"cf"},ua={class:"cm"},ga={class:"cs"},ma={class:"sl"},fa={class:"tm"},wa={class:"dw-card"},ya={class:"cf"},ka={class:"cm"},xa={class:"cs"},Ta={class:"sl"},Sa={class:"tm"},Ca={class:"dw-card fail"},za={class:"cf"},qa={class:"cm"},Aa={class:"cs"},Ba={class:"sl"},Ma={class:"tm"},Ia={class:"dw-card"},Ea={class:"cf"},Da={class:"cm"},Ha={class:"cs"},Oa={class:"sl"},Va={class:"tm"},La="/repo",Ra=A({__name:"DesignSystemView",emits:["close"],setup(Wa,{emit:C}){const z=[{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 m(){}const q=C;function f(){q("close")}let p=null;function w(v){v.key==="Escape"&&f()}return B(()=>{document.addEventListener("keydown",w);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),e=new Map;v.forEach(b=>{const n=b.getAttribute("href");if(!n)return;const y=document.getElementById(n.slice(1));y&&e.set(y,b)});let c=null;p=new IntersectionObserver(b=>{b.forEach(n=>{n.isIntersecting&&(c&&c.classList.remove("active"),c=e.get(n.target)??null,c&&c.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),e.forEach((b,n)=>p.observe(n)),v.length&&v[0].classList.add("active")}),M(()=>{document.removeEventListener("keydown",w),p&&(p.disconnect(),p=null)}),(v,e)=>(l(),r("div",O,[a("div",{class:"ds-topbar"},[a("button",{class:"ds-back",type:"button",onClick:f},"← Back"),e[0]||(e[0]=a("span",{class:"ds-topbar-title"},"Design system",-1))]),a("div",V,[e[152]||(e[152]=i('',1)),a("main",L,[a("div",R,[e[150]||(e[150]=i('
● 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",W,[e[7]||(e[7]=i(`
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-selected-hoverrgba(0,0,0,.08)rgba(255,255,255,.14)Hover of a control RESTING at the selected fill (work cards) — one rung above f2, below f3: hover deepens/brightens a step, never drops below the rest state
--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-ring-w3pxThe focus ring's spread width — the rings below derive from it, and so does anything that must reserve room for the ring (clip protection)
--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",N,[a("div",P,[(l(),r("svg",U,[...e[1]||(e[1]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[2]||(e[2]=t("sm · 14",-1))]),a("div",F,[(l(),r("svg",j,[...e[3]||(e[3]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[4]||(e[4]=t("md · 16",-1))]),a("div",G,[(l(),r("svg",K,[...e[5]||(e[5]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[6]||(e[6]=t("lg · 20",-1))])]),e[8]||(e[8]=a("h4",{class:"mini"},"Icon library",-1)),e[9]||(e[9]=a("p",null,[t("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),a("code",null,"ICON_GROUPS"),t(" in "),a("code",null,"lib/icons.ts"),t(" (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",J,[(l(!0),r(g,null,k(s(I),([c,b])=>(l(),r(g,{key:c},[a("div",Y,x(c),1),(l(!0),r(g,null,k(b,n=>(l(),r("div",{key:n,class:"icon-cell"},[d(s(o),{name:n},null,8,["name"]),a("span",Q,x(n),1)]))),128))],64))),128))]),e[10]||(e[10]=i('

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-1-5 · 6
workbar pill icon ↔ label
--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-menu-rowvar(--radius-sm)Menu rows inset 6px inside the plain --radius-lg menu frame (concentric: 12px − 6px hug)product-specific
--radius-menu-itemcalc(--radius-lg − --menu-pad − --p-hairline)Items of the §03 dropdown Menu — concentric with the frame: 12px − the 3.5px panel inset − the 0.5px hairline = 8pxproduct-specific
--radius-select-optioncalc(--radius-md − --space-1 − --p-hairline)Options of the §03 Select listbox family (Select, SecondaryModelPicker) — concentric: 8px frame − 4px pad − hairline = 3.5pxproduct-specific
--radius-dropdown-rowcalc(--radius-lg − --space-1 − --p-hairline)Rows of the composer dropdowns (model / permission) and the workspace picker — concentric: 12px frame − 4px pad − hairline = 7.5pxproduct-specific
--radius-window14pxmacOS hidden-titlebar window corner (measured on macOS 26 Tahoe) — referenced only through calc(), never directlyplatform constant
--radius-window-chipcalc(--radius-window − --space-2)Sidebar footer chip's bottom-left corner on macOS desktop — concentric with the window corner (14px − the footer's 8px inset = 6px, exactly --radius-sm)product-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-raised1in-component local stacking (menu scroll thumbs, strip badges, floating pills) — never a global layer
--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)
--duration-spin700msspinner rotation period (mention-tip probe spinner)
--duration-flash1200msone-shot attention flashes (search locate, provider-row added) — a highlight timeout, past the show/hide ramp on purpose
--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",Z,[e[32]||(e[32]=i(`
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

6 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. The text variant is the exception to the box: a chromeless inline action — underlined muted text, sized and weighted by its context — for quiet fallbacks such as a copy-link next to a muted label. Use it wherever a native link-styled button would tempt you; never hand-roll one.

Variant matrix lightpreview
medium · default
Didn't open?
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 | text
+    // 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",X,[e[14]||(e[14]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),a("div",$,[e[12]||(e[12]=i('kimi-k2· thinking',1)),a("span",_,[d(s(o),{name:"shield-question",size:"sm"}),e[11]||(e[11]=t("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"})]),t("12k / 200k")],-1))])]),e[33]||(e[33]=i('

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
',9)),a("div",ee,[e[19]||(e[19]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"ActionCard · clickable choice row (normal / disabled)")],-1)),a("div",ae,[d(s(T),{style:{"max-width":"460px"}},{leading:h(()=>[d(s(o),{name:"globe",size:"lg"})]),hint:h(()=>[...e[15]||(e[15]=[t("Sign in with your kimi.com account",-1)])]),default:h(()=>[e[16]||(e[16]=t(" Kimi Code (kimi.com/code) ",-1))]),_:1}),d(s(T),{style:{"max-width":"460px"},disabled:""},{leading:h(()=>[d(s(o),{name:"bolt",size:"lg"})]),hint:h(()=>[...e[17]||(e[17]=[t("Bring your own API key for OpenAI-compatible and other services",-1)])]),default:h(()=>[e[18]||(e[18]=t(" Add a custom provider ",-1))]),_:1})])]),e[34]||(e[34]=i(`

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. The listbox teleports to <body> with position: fixed — anchored to the trigger (opening toward the roomier side: flipping upward near the viewport bottom and shrinking its max-height to fit when neither side has room; re-anchoring on scroll/resize; closing when focus tabs away) on the --z-modal-dropdown rung, so it floats above modal dialogs and no scrolling container can clip it; while it is open, scroll gestures outside the menu are swallowed so the surface behind it cannot scroll. Listbox options round at --radius-select-option, concentric with the menu frame (--radius-md--space-1 pad − the 0.5px hairline = 3.5px).

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 four widths — sm 360 / md 440 / lg 640 / xl 760 (--p-content-max) — chosen by content weight; sm is for quiet single-purpose dialogs (login, confirm). 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)

`,30)),a("div",te,[e[23]||(e[23]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Spinner · common scenarios")],-1)),a("div",de,[a("div",se,[e[22]||(e[22]=i('Loading…',2)),a("button",oe,[(l(),r("svg",ie,[...e[20]||(e[20]=[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[21]||(e[21]=t("Submitting",-1))])])])]),e[35]||(e[35]=a("h4",{class:"mini"},"WorkingIndicator · 小蓝 mascot (only the chat working state)",-1)),a("div",ne,[e[25]||(e[25]=a("div",{class:"stage-bar"},[a("span",{class:"st"},[t("WorkingIndicator · chat working state only "),a("span",{class:"tag spec"},"signature")])],-1)),a("div",le,[e[24]||(e[24]=a("span",{class:"stage-label"},"Usage · only while the chat has an unfinished prompt",-1)),a("div",re,[d(S,{label:"Requesting…"}),d(S,{label:"Working…"})])])]),e[36]||(e[36]=i('
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 inset their items by --menu-pad (3.5px, so the hairline plus inset lands exactly on the 4px grid), and item corners stay concentric with the frame at --radius-menu-item (--radius-lg--menu-pad − the 0.5px hairline = 8px — the item arc shares the panel's corner center instead of cutting across it). Standard items pad from the shared --menu-item-padding-block × --menu-item-padding-inline tokens (5px × 9px) with 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.

Component behavior contract (the Tooltip primitive and IconButton's tooltip prop, both backed by TooltipBubble): while any menu surface is open, every tooltip OUTSIDE it hides immediately and no new one may appear — a menu owns the screen, so a trigger's hint must never hang above its own dropdown (native menu behavior). Hints anchored INSIDE an open menu stay live, and ordinary hover behavior resumes once the last menu closes. Menu.vue and the Select listbox register as menu surfaces automatically; a bespoke menu surface (composer dropdowns, the slash/mention autocomplete popups, pickers) wires its open ref + panel element through trackMenuSurface from @moonshot-ai/app-ui.

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.

',56)),a("div",ce,[e[31]||(e[31]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Sidebar · group title")],-1)),a("div",be,[e[30]||(e[30]=a("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),a("div",ve,[(l(),r("svg",he,[...e[26]||(e[26]=[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[27]||(e[27]=t(" kimi-code-web ",-1))]),a("div",pe,[(l(),r("svg",ue,[...e[28]||(e[28]=[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[29]||(e[29]=t(" playground ",-1))])])])]),a("section",ge,[e[142]||(e[142]=i('
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 + a meta line leading with the 前台/后台 mode then agent type · model · effort; 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",me,[e[37]||(e[37]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),a("div",fe,[a("div",we,[d(E,{changes:z,cwd:La,onOpenDiff:m,onOpenFile:m})])])]),e[143]||(e[143]=i('
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 composer input (a ProseMirror contenteditable on desktop, a textarea on the web during the migration) 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 or work panel is open, the dock temporarily joins --z-dropdown, ensuring permission, work-mode, and model menus — and the work panel — 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 input 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>.

Mention pills: @-mentions render as inline pills in the editor — one element of the cross-surface rich-text vocabulary specified in §05 Rich Text Messages (visual recipe, wire forms, and behavior contract live there).

',12)),a("div",ye,[e[44]||(e[44]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Composer")],-1)),a("div",ke,[a("div",xe,[e[42]||(e[42]=a("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),a("div",Te,[a("div",Se,[e[39]||(e[39]=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",Ce,[d(s(o),{name:"shield-question",size:"sm"}),e[38]||(e[38]=t("yolo",-1))]),e[40]||(e[40]=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"})]),t("plan")],-1))]),e[41]||(e[41]=i('
kimi-k2· thinking
',1))])]),e[43]||(e[43]=i('
kimi-code-web
',1))])]),e[144]||(e[144]=i('
i
Site-wide consistency: the composer uses one 32px superellipse shell and one 32px desktop control height. The add (+), permission, 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 work pills and panels — pill vocabulary, panel shell and motion, the two-tone head, per-kind bodies, filtering, and the open/cancel model — are specified in Dock · work pills & panels below.

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.

Autocomplete menus

The slash, mention, and add popups share one geometry, all on dedicated tokens: the --color-menu-bg-frost surface (the frostier recipe), frame padding --menu-row-hug, rows at --menu-row-padding-block × --menu-row-padding-inline with --radius-menu-row caps (plain corners — the frame is --radius-lg with NO corner-shape, and the row radius stays concentric: 12px frame − 6px hug = 6px), an icon-to-label gap of --menu-row-gap-icon, and a --menu-rows-seam between stacked rows. Touch rows pad to --menu-row-touch-padding-block with a hard floor of --touch-target-min. Scroll height caps at --p-slash-menu-h / --p-mention-menu-h / --p-add-menu-h; the scroll-edge fade is --menu-scroll-fade, and the overlay thumb rides --menu-scrollbar-width / --menu-scrollbar-edge / --menu-scrollbar-track-inset / --menu-scrollbar-thumb-min in --color-menu-scrollbar (hover --color-menu-scrollbar-hover) — 3px visually, with a wider invisible drag strip.

Add menu

The composer's + button opens the add menu — the autocomplete family's action-list member: one column of icon + label (+ muted description) rows (Files, Goal, Plan, Swarm) on the same frost surface and row geometry as the slash/mention popups, capped at --p-add-menu-h. Semantically it is an action menu, not an autocomplete listbox: rows are menuitem commands, DOM focus moves into the menu (arrows navigate, Enter activates, Escape closes), and the + button carries aria-haspopup="menu" — the textarea's combobox ARIA never points at it.

Design decision: deliberately NOT the §03 Menu/MenuItem primitives. Those are the trigger-dropdown family (sidebar, user menu, session rows) — --color-menu-bg, --radius-lg, a min-width box. The add menu instead shares the composer menus' material (the frostier surface, the composer corner curve, rows hugging the frame at the composer's text column, muted description sub-lines). Bending MenuItem into that material would require exactly the per-screen appearance overrides the primitive contract forbids, so the add menu keeps bespoke rows built directly on the shared --menu-row-* tokens. This paragraph is the canonical record of that choice — reviews should not re-litigate it.

',7)),a("div",ze,[e[52]||(e[52]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Add menu — family surface, icon + label + desc rows, keyboard focus wash")],-1)),a("div",qe,[a("div",Ae,[a("span",Be,[d(s(o),{name:"attachment",size:"sm"}),e[45]||(e[45]=a("span",{class:"n"},"Files",-1))]),a("span",Me,[d(s(o),{name:"target",size:"sm"}),e[46]||(e[46]=a("span",{class:"n"},"Goal",-1)),e[47]||(e[47]=a("span",{class:"d"},"Set a goal to keep pursuing",-1))]),a("span",Ie,[d(s(o),{name:"file-edit",size:"sm"}),e[48]||(e[48]=a("span",{class:"n"},"Plan",-1)),e[49]||(e[49]=a("span",{class:"d"},"Turn plan mode on",-1))]),a("span",Ee,[d(s(o),{name:"sparkles",size:"sm"}),e[50]||(e[50]=a("span",{class:"n"},"Swarm",-1)),e[51]||(e[51]=a("span",{class:"d"},"Turn swarm mode on",-1))])])])]),e[145]||(e[145]=i('

Work modes

Plan and Goal are the primary work modes — mutually exclusive, at most one armed at a time. Arming happens only through the slash commands (/plan, /goal) or the add menu; an armed mode renders as the input row's leading pill — a neutral --color-surface chip with the mode's 14px icon, its label, and a × that disarms. The × is an IconButton sized --wm-x-size (below the sm default, so its hover wash never outgrows the pill's rounded end) with a --wm-x-ring hit reserve that stays inside the textarea's indent; on touch it meets --touch-target-min. The input's first-line text indent reserves exactly the pill's width (the desktop ProseMirror editor applies it to the first paragraph), so the caret and placeholder slide right rather than colliding; arming Goal also swaps the placeholder to its objective prompt. Sending with Goal armed creates the goal and the pill hands off to the dock's goal pill; a live goal does NOT lock the primary modes — /goal then just focuses the goal's panel, and /plan still arms (the only hard rule: one message cannot both create a goal and enter plan — the goal write carries the plan disarm atomically — and a failed mode write is treated as a send failure: the optimistic message rolls back, the error toasts). Swarm is deliberately NOT a mode: an orthogonal toolbar chip with its own enable confirmation, disarmed from the chip's ×.

Dock · work pills & panels

Work pills (WorkPill.vue): the dock's workbar above the composer carries one pill vocabulary — font-driven by flex computation: the 1.5em leading icon and the label's own line box (--text-base at --leading-normal) both come to 21px at the 14px UI text, and 8px block padding wraps them to 37px, nothing pinning pixels, so the pills rescale with the font; borderless, with --radius-lg rounded-square corners, filled at the fills ladder's --color-selected rung over the shared --p-menu-backdrop blur — the panel's frosted recipe scaled down to a chip, so transcript text never reads through the light fill (the neutral hover wash layers on top — one layer, never two), the icon at full text colour, --space-2 / --space-3 block / inline padding — the trailing side adds a --space-05 optical compensation against the leading glyph — and a --space-1-5 content gap. Every pill stays expanded — the Code client does not collapse status chips — carrying icon + label and a trailing meta that answers one question — what is live on this surface right now — for background bash tasks, background sub-agents, todos, and the goal alike; the row insets to the composer's text column — dock inline inset + the card's 0.5px border + the input wrap's 16px inline padding — not the card edge. The active pill keeps the wash on permanently — one fills-ladder step deeper, neutral. The meta is always muted ink and surface-specific: the goal carries its status word, colour-coded by state (active --color-success, paused --color-warning, blocked --color-danger); the bash and sub-agent pills carry a pulsing dot and the running count, only while something runs (a quiet absence otherwise); the todos carry the done/total fraction. The plan pill joins the row only once plan mode is live server-side or a persisted plan exists — a merely armed directive stays in the composer's inline work-mode pill (its × cancels) and never reaches this bar, so every pill here reads as live server truth rather than local intent. Narrow panes wrap the row instead of clipping (the dock height observes); below the --p-bp-sm breakpoint the pills collapse to their icons — label and meta hide (the threshold is read from the token, never a hardcoded width).

Panel shell & motion: a pill toggles the shared work panel — the menu family material: 70% page background via color-mix over the shared --p-menu-backdrop blur (the frostier recipe, see §06 Glassmorphism exemption), a 0.5px --color-line edge, --radius-2xl, and the menu panel's --shadow-menu. The panel pops from the clicked pill along the trigger-corner motion tokens (--motion-panel-scale / --motion-panel-shift), and switching pills replays the pop from the newly clicked pill (the shell is keyed by panel kind); while it is open the dock raises to --z-dropdown so it clears the transcript's new-message pill, and every window-drag strip pauses so an outside press reaches the page and dismisses. The panel owns Escape while open (a document-capture handler guarded by the shared IME latch, so a candidate-cancelling Escape is never swallowed), and a scrolled body dissolves toward the head through the --menu-scroll-fade alpha mask instead of hard-clipping. Height is content-sized up to min(360px, 50vh); the filtered panels pin instead — see Filtering & sizing. The panel is chrome: nothing inside it is text-selectable, the head's filter chips included.

Panel head (WorkPanelHead.vue): every work panel head is one tab row — a leading icon at the pill's 1.5em glyph size, the panel title at full text colour, and a muted trailing meta (--color-text-muted) carrying that panel's one live number, joined by the row's --space-2 gap with no separator glyph: the goal's wall-clock time, the bash / sub-agent running count, the todos' done/total. Actions right-align in the head: the goal's pause / resume / cancel / close as quiet neutral IconButtons (cancel deliberately shares that neutral vocabulary), the plan's open-in-side-panel, dismiss-directive (shown only while the directive is live), and close, and the bash / sub-agent filter chips as a SegmentedControl. The plan head's meta carries the latest plan's review outcome. On touch these meet the 44px minimum (--touch-target-min) via the hover: none capability query — a width-only gate would miss tablets — and below 480px the head wraps so the actions take a full row.

Panel bodies: todos read as a quiet list — a green circle-check for done, a hollow ring for pending, an xs Spinner for in-progress. The goal's detail (full objective, completion criterion, rendered with the chat Markdown renderer) fills the body — no footer strip. Bash tasks are long rows (TasksPane.vue): a StatusDot while running, circle-check when done, a close glyph for failed and for cancelled (a user stop is neutral, never reported as a failure), the command as the meta line, and a bare duration that renders only when computable — never the raw protocol status word. Sub-agents form a card grid (SubagentGrid.vue) — an auto-fill grid (minmax --p-subagent-card-min) of cards at the --color-selected rung with --radius-lg corners; each card carries the task name, a stable session-wide number (creation order across the session's background sub-agents — unique even across swarms; once shown it sticks, so late-arriving history takes the next tail number), an optional prompt meta line one size down (--text-sm), an icon-led model · effort line and the status row a further size down (--text-xs) — the status row pairs the task-row state glyph with the localized label, plus a clock-led bare duration that renders only when computable; the full-bleed circle-check (drawn for the todo rows' ring family) is scaled onto the shared icon grid wherever it sits beside other glyphs (task rows, cards, filter chips). A failed row tints its name --color-danger; a cancelled one stays neutral. Rows hover with a rounded strip that grows by padding and a matching negative margin — the row metrics never shift. The row stop is danger-coloured; the card cancel reveals on hover and is always visible on touch as a --touch-target-min corner target. Every pane's empty state is centered and muted. State and time labels — the head meta included — set text-autospace: normal, the transcript's mixed CJK/numeric spacing rule, so durations like 9小时2分 breathe.

State vocabulary: two glyph families meet here by design — the activity dot (shared with the transcript's tool rows and swarm members) backs the task rows, the todo rows speak the default loader ring, and the sub-agent cards skip glyphs in favour of a localized text label:

',8)),a("table",De,[e[89]||(e[89]=a("thead",null,[a("tr",null,[a("th",null,"Surface"),a("th",null,"State"),a("th",null,"Meaning"),a("th",null,"Glyph"),a("th",null,"Ink")])],-1)),a("tbody",null,[a("tr",null,[e[54]||(e[54]=a("td",null,"Bash rows",-1)),e[55]||(e[55]=a("td",{class:"tk"},"running",-1)),e[56]||(e[56]=a("td",null,"Task in flight",-1)),a("td",null,[d(s(u),{status:"running"}),e[53]||(e[53]=t(" pulsing dot",-1))]),e[57]||(e[57]=a("td",null,[a("code",null,"--color-accent")],-1))]),a("tr",null,[e[60]||(e[60]=a("td",null,null,-1)),e[61]||(e[61]=a("td",{class:"tk"},"done",-1)),e[62]||(e[62]=a("td",null,"Finished cleanly",-1)),a("td",null,[d(s(o),{name:"circle-check",size:"sm"}),e[58]||(e[58]=t()),e[59]||(e[59]=a("code",null,"circle-check",-1))]),e[63]||(e[63]=a("td",null,[a("code",null,"--color-success")],-1))]),a("tr",null,[e[66]||(e[66]=a("td",null,null,-1)),e[67]||(e[67]=a("td",{class:"tk"},"failed",-1)),e[68]||(e[68]=a("td",null,"Errored — the row's name tints to match",-1)),a("td",null,[d(s(o),{name:"close",size:"sm"}),e[64]||(e[64]=t()),e[65]||(e[65]=a("code",null,"close",-1))]),e[69]||(e[69]=a("td",null,[a("code",null,"--color-danger")],-1))]),a("tr",null,[e[72]||(e[72]=a("td",null,null,-1)),e[73]||(e[73]=a("td",{class:"tk"},"cancelled",-1)),e[74]||(e[74]=a("td",null,"User stop — neutral, never a failure",-1)),a("td",null,[d(s(o),{name:"close",size:"sm"}),e[70]||(e[70]=t()),e[71]||(e[71]=a("code",null,"close",-1))]),e[75]||(e[75]=a("td",null,[a("code",null,"--color-text-muted")],-1))]),a("tr",null,[e[77]||(e[77]=a("td",null,"Todo rows",-1)),e[78]||(e[78]=a("td",{class:"tk"},"in_progress",-1)),e[79]||(e[79]=a("td",null,"Being worked on",-1)),a("td",null,[a("span",He,[d(s(D),{size:"xs"})]),e[76]||(e[76]=t(" xs Spinner ring",-1))]),e[80]||(e[80]=a("td",null,[t("the row's own ink ("),a("code",null,"--color-text"),t(")")],-1))]),e[87]||(e[87]=a("tr",null,[a("td"),a("td",{class:"tk"},"pending"),a("td",null,"Not started"),a("td",null,[a("span",{class:"dw-ring"}),t(" hollow ring")]),a("td",null,[a("code",null,"--color-line-strong"),t(" stroke")])],-1)),a("tr",null,[e[83]||(e[83]=a("td",null,null,-1)),e[84]||(e[84]=a("td",{class:"tk"},"done",-1)),e[85]||(e[85]=a("td",null,"Completed",-1)),a("td",null,[d(s(o),{name:"circle-check",size:"md"}),e[81]||(e[81]=t()),e[82]||(e[82]=a("code",null,"circle-check",-1))]),e[86]||(e[86]=a("td",null,[a("code",null,"--color-success")],-1))]),e[88]||(e[88]=a("tr",null,[a("td",null,"Sub-agent cards"),a("td",{class:"tk"},"all"),a("td",null,"The task-row glyph plus a localized label — failed alone tints danger — with a clock-led bare duration trailing"),a("td",null,"glyph + label"),a("td",null,"muted / danger")],-1))])]),e[146]||(e[146]=i("

Filtering & sizing: the bash and sub-agent heads carry the same four icon-led filter chips — recent (clock; running + the five most recently finished), running (play), done (circle-check; every terminal state), all (list) — and both filtered panels pin to --p-dock-panel-h so filtering never resizes the panel; the body scrolls inside. When the head runs out of room the chips collapse into a dropdown menu (FilterControl.vue measures the head itself, so the switch follows the panel's own width, not the viewport; the menu teleports to <body> and anchors to the trigger, so the panel's clip and backdrop-filter never squeeze it); the head title never wraps and is never clipped — once the filter is a dropdown the head always fits. An empty pane names its filter (no completed tasks is not no tasks).

Opening & cancelling: clicking a row or card opens the task's detail in the right-side panel. Opening is gated: the overlay navigation button renders only when a stable agentId (on-demand transcript) or locally held output exists, so a REST-only cold-loaded row stays inert instead of opening an empty panel — and says so with the not-allowed cursor. Open and cancel are sibling controls (a full-cover overlay button, the stop IconButton floating above it): no nested interactives, and the stop action exists only while the task runs.

",2)),a("div",Oe,[e[100]||(e[100]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Work pills — one vocabulary, a live count or status where one exists")],-1)),a("div",Ve,[a("div",Le,[a("span",Re,[d(s(o),{name:"target",size:"md"}),e[90]||(e[90]=a("span",null,"Goal",-1)),e[91]||(e[91]=t()),e[92]||(e[92]=a("span",{class:"dw-live"},"Active",-1))]),a("span",We,[d(s(o),{name:"terminal",size:"md"}),e[93]||(e[93]=a("span",null,"Bash",-1))]),a("span",Ne,[d(s(o),{name:"sparkles",size:"md"}),e[95]||(e[95]=a("span",null,"Background Agent",-1)),e[96]||(e[96]=t()),a("span",Pe,[d(s(u),{status:"running"}),e[94]||(e[94]=t("3",-1))])]),a("span",Ue,[d(s(o),{name:"list",size:"md"}),e[97]||(e[97]=a("span",null,"Progress",-1)),e[98]||(e[98]=t()),e[99]||(e[99]=a("span",{class:"dw-count"},"3/7",-1))])])])]),a("div",Fe,[e[141]||(e[141]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Work panels — two-tone head, filter chips, rows & card grid")],-1)),a("div",je,[a("div",Ge,[a("div",Ke,[a("span",Je,[d(s(o),{name:"terminal",size:"md"}),e[101]||(e[101]=t("Bash ",-1)),e[102]||(e[102]=a("span",{class:"dw-meta"},"1 running",-1))]),a("span",Ye,[a("span",Qe,[d(s(o),{name:"clock",size:"sm"}),e[103]||(e[103]=t("Recent",-1))]),a("span",Ze,[d(s(o),{name:"play",size:"sm"}),e[104]||(e[104]=t("Running",-1))]),a("span",Xe,[d(s(o),{name:"circle-check",size:"sm"}),e[105]||(e[105]=t("Done",-1))]),a("span",$e,[d(s(o),{name:"list",size:"sm"}),e[106]||(e[106]=t("All",-1))])])]),a("div",_e,[a("div",ea,[d(s(u),{status:"running"}),e[107]||(e[107]=a("span",{class:"nm"},"pnpm test -- --watch",-1)),e[108]||(e[108]=a("span",{class:"tm"},"0:42",-1))]),a("div",aa,[d(s(o),{name:"circle-check",size:"sm",class:"ok"}),e[109]||(e[109]=a("span",{class:"nm"},"pnpm run build",-1)),e[110]||(e[110]=a("span",{class:"tm"},"3m12s",-1))]),a("div",ta,[d(s(o),{name:"close",size:"sm"}),e[111]||(e[111]=a("span",{class:"nm"},"pnpm lint",-1)),e[112]||(e[112]=a("span",{class:"tm"},"1m05s",-1))]),a("div",da,[d(s(o),{name:"close",size:"sm"}),e[113]||(e[113]=a("span",{class:"nm"},"node scripts/migrate.mjs",-1)),e[114]||(e[114]=a("span",{class:"tm"},"0:18",-1))])])]),a("div",sa,[a("div",oa,[a("span",ia,[d(s(o),{name:"sparkles",size:"md"}),e[115]||(e[115]=t("Background Agent ",-1)),e[116]||(e[116]=a("span",{class:"dw-meta"},"1 running",-1))]),a("span",na,[a("span",la,[d(s(o),{name:"clock",size:"sm"}),e[117]||(e[117]=t("Recent",-1))]),a("span",ra,[d(s(o),{name:"play",size:"sm"}),e[118]||(e[118]=t("Running",-1))]),a("span",ca,[d(s(o),{name:"circle-check",size:"sm"}),e[119]||(e[119]=t("Done",-1))]),a("span",ba,[d(s(o),{name:"list",size:"sm"}),e[120]||(e[120]=t("All",-1))])])]),a("div",va,[a("div",ha,[e[124]||(e[124]=a("div",{class:"ct"},[a("span",{class:"nu"},"01"),a("span",{class:"nm"},"Explore the auth module")],-1)),e[125]||(e[125]=a("div",{class:"ds"},"Map every callsite of the legacy token refresh and report findings",-1)),a("div",pa,[a("div",ua,[d(s(o),{name:"robot",size:"sm"}),e[121]||(e[121]=a("span",null,"kimi-k2 · thinking",-1))]),a("div",ga,[a("span",ma,[d(s(u),{status:"running"}),e[122]||(e[122]=t("Running",-1))]),a("span",fa,[d(s(o),{name:"clock",size:"sm"}),e[123]||(e[123]=t("0:42",-1))])])])]),a("div",wa,[e[129]||(e[129]=a("div",{class:"ct"},[a("span",{class:"nu"},"02"),a("span",{class:"nm"},"Draft the release notes")],-1)),e[130]||(e[130]=a("div",{class:"ds"},"Summarize the merged PRs since the last tag into user-facing notes",-1)),a("div",ya,[a("div",ka,[d(s(o),{name:"robot",size:"sm"}),e[126]||(e[126]=a("span",null,"kimi-k2 · thinking",-1))]),a("div",xa,[a("span",Ta,[d(s(o),{name:"circle-check",size:"sm",class:"ok"}),e[127]||(e[127]=t("Done",-1))]),a("span",Sa,[d(s(o),{name:"clock",size:"sm"}),e[128]||(e[128]=t("3m12s",-1))])])])]),a("div",Ca,[e[134]||(e[134]=a("div",{class:"ct"},[a("span",{class:"nu"},"03"),a("span",{class:"nm"},"Run the integration tests")],-1)),e[135]||(e[135]=a("div",{class:"ds"},"pnpm test against the staging daemon",-1)),a("div",za,[a("div",qa,[d(s(o),{name:"robot",size:"sm"}),e[131]||(e[131]=a("span",null,"kimi-k2 · thinking",-1))]),a("div",Aa,[a("span",Ba,[d(s(o),{name:"close",size:"sm"}),e[132]||(e[132]=t("Failed",-1))]),a("span",Ma,[d(s(o),{name:"clock",size:"sm"}),e[133]||(e[133]=t("1m05s",-1))])])])]),a("div",Ia,[e[139]||(e[139]=a("div",{class:"ct"},[a("span",{class:"nu"},"04"),a("span",{class:"nm"},"Migrate the config files")],-1)),e[140]||(e[140]=a("div",{class:"ds"},"Rewrite the workspace configs to the new schema",-1)),a("div",Ea,[a("div",Da,[d(s(o),{name:"robot",size:"sm"}),e[136]||(e[136]=a("span",null,"kimi-k2 · thinking",-1))]),a("div",Ha,[a("span",Oa,[d(s(o),{name:"close",size:"sm"}),e[137]||(e[137]=t("Cancelled",-1))]),a("span",Va,[d(s(o),{name:"clock",size:"sm"}),e[138]||(e[138]=t("0:18",-1))])])])])])])])]),e[147]||(e[147]=a("h3",{class:"sub"},"Responsive",-1)),e[148]||(e[148]=a("p",null,[t("See §02 "),a("code",null,"--p-bp-sm"),t(" 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.")],-1)),e[149]||(e[149]=a("div",{class:"callout info"},[a("span",{class:"ico"},"i"),a("div",null," 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. ")],-1))]),e[151]||(e[151]=i('
05

Rich Text Messages

Structured references travel as plain text on the wire and render as pills at both ends: the composer's editing surface and the rendered message stream share one pill vocabulary, so what you type is what the message shows. This section is the category spec — every future rich-text element (marks, embeds, interactive chips) joins it here.

Mention pill

The mention is the first rich-text element. It exists in two synchronized forms: an atom inside the desktop composer's ProseMirror document, and a pill in the message stream — assistant Markdown decorates local links with the same classes, and user/queue bubbles (verbatim wire text, never Markdown) render through the declarative ComposerText component. Both are the same mark: not a filled chip — no background, no vertical padding — just body text in a heavier weight (--weight-ui-strong) on a lighter ink (--color-text-muted), so the baseline stays flush with the surrounding text; a 2px horizontal inset (padding-inline: var(--space-05)) supplies the CJK/Latin autospacing that can't cross element boundaries and sets the mention apart from plain text; a 13px muted kind glyph leads, and the label is the basename — never the full path, which lives on the tooltip. Hover deepens the ink (glyph included) toward --color-text on every surface; in the message stream the clickable kinds (file, skill) also take the pointer cursor and the link underline, while the composer keeps pure editing semantics — I-beam, no underline, a click just places the caret. The shared classes live in app-ui's global sheet; the kind → glyph mapping is single-sourced in app-composer (mentionIcons) and also drives the mention menu rows, so a file looks identical in the menu, the editor, and the sent bubble. Copying from a bubble re-serializes the selection back to the wire text — pills carry their full attrs in data-mention-*, so a copy/paste round trip restores the link instead of a truncated basename.

Kinds and wire forms (serialization is a Markdown link, so the daemon payload stays plain text and the TUI needs nothing new):

KindGlyphWire formClick (in messages)
Filesingle folded-corner file glyph for every file (no per-extension variants)[name](path) — the dest is canonically encoded per path segment (every non-unreserved ASCII character → %XX; non-ASCII stays literal, so a CJK path reads as itself — one decodeURIComponent restores it on every surface)opens the file preview
Folderfolder glyph[name](path/) — trailing slash marks the kind (dest %%25 as above)inert (no target yet)
Skillsparkling glyph[name](kimi-code://skill/<name>) — the app's deep-link protocolopens the skill's SKILL.md in the preview panel

Hover tooltip: one document-level singleton (mentionTooltip) serves every pill — composer NodeViews, ComposerText-rendered bubbles, and Markdown anchors are all raw DOM a Vue wrapper can't reach, so it delegates on document mouseover into a single shared bubble. The bubble keeps the design-system tooltip's dark skin but is interactive. File and folder pills show the full path, wrapping anywhere within a fixed max width: every / separator muted, the basename bold (--weight-semibold). Skill pills show a card — the name with an open button at the right (opens the skill's SKILL.md in the preview panel; the path rides the wire skill descriptor through AppSkill.path), the description below, clamped to four lines; an unresolvable skill degrades to the name alone. Timing mirrors TooltipBubble (150ms show delay, top placement with flip, viewport clamping) and the bubble stays open while hovered so the button is reachable; native title tooltips are removed wherever a pill appears. The bubble is a documented structural exception to the component-primitive rule (like the dock overlay): its anchors are ProseMirror NodeViews and pillified spans a Vue wrapper can't reach, so the open/copy buttons re-implement the Button primitive's contract (size, hover, :focus-visible ring) by hand instead of importing it.

Edge cases: labels cap at 32 chars — a longer name takes a middle ellipsis that keeps the head of the base name and the whole extension (the full name stays in the data attributes, the full path on the tooltip). A pill whose target was deleted after the fact: hovering fires a one-byte existence probe (an inline spinner sits at the tail of the tooltip's path text while in flight), and a definitive not-found fades the pill and strikes it through — in messages and in the composer alike. Clicks are never gated on the verdict (the preview's own not-found state is the final answer); only confirmed-existing verdicts are cached, scoped to the session, so a recreated file recovers on the next hover and a flaky daemon can never strike a pill by mistake.

Behavior contract: a bare @ opens the menu instantly with the workspace root listing (Esc dismisses); with a query, the menu is ONE merged list — no sections — ranked by match strength: exact skill > prefix skill > strong file hits (substring-or-better on the basename; a query containing / matches path segments and is always strong) > substring skill > subsequence skill (tokens of 3+ chars, separator-bridging — larkim matches lark-im) > weak file hits (a bare subsequence), with the search firing per keystroke (rg-backed fs:suggest, no debounce; older daemons fall back to fs:search). An in-flight search never hides the current rows (a corner spinner marks it; superseded rows dim as stale and stay unselectable until fresh results land). File and skill rows highlight the matched characters with ink emphasis only — semibold strong ink in the name, body ink in the muted directory, never a background, so the row rhythm never shifts. The default highlight is simply the top row of the ranking — skill rows included — and follows its row by identity across async landings. Full-width from IMEs triggers identically. Insertion replaces the @token and adds a separating trailing space; the pill is one atom — Backspace removes it whole, and a zero-width caret anchor keeps the caret on the pill's line when it ends a paragraph. Drafts, history recall, and queue reloads revive pills from their link form on load, and pasting mention-link text (e.g. a copied pill) revives them too — the serializer round-trips both ways. Skill activation: sending a message with exactly one skill pill activates that skill via the existing channel (the pill form of /skill:<name>, the full text — the pill traveling as its mention link — becomes the args, attachments ride along), and the sent bubble shows the original message verbatim with the pill revived in place (a slash-typed activation, whose bare args carry no pill, keeps the identity card instead); two or more skill pills degrade to plain references, because each activation is its own turn.

Implementation map: schema/serialization/offset mapping in app-composer's composerTextDoc (pure, node-tested); the editor surface in composerEditor; user/queue bubbles render via app-composer's ComposerText (one segment pass, declarative tree — no post-processing); assistant-side classification (classifyMentionHref) and decoration in app-markdown's Markdown.vue link pass; hover + skill-click routing in app-composer's mentionTooltip singleton, wired per app shell. When editing these, keep the two surfaces in lockstep — a pill that serializes one way in the composer must read the same way in a message.

06

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.
07

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 and the composer dropdowns use the --color-menu-bg token (a 95% surface), while the autocomplete family — slash/mention popups and the dock work panel — deliberately runs a frostier recipe of its own: 70% page background (single-sourced as --color-menu-bg-frost) over the shared --p-menu-backdrop blur, which stays the single-sourced blur token across all of them. The dock's work surfaces — the work panel and its pills, persistent over the scrolling transcript — ride that same frostier recipe (specified per-surface in §04 (Dock · work pills & panels)) rather than a bespoke one. 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.
08

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 5 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
--sb-action-insetcalc((max(--ui-font-size-sm × --leading-tight, --p-ic-md) + 2 × --space-2 − --icon-button-sm) / 2) ≈ 3pxtrailing action buttons sit this far inside the row box's right edge — exactly the buttons' vertical inset: half the font-driven row height's slack over the fixed IconButton sm box. The row height is the title line box floored at the group-head / directory rows' 16px folder icon, plus the vertical row padding, so the inset tracks the user's font scale without dropping below the icon-floored rows' slack; the session row's hover cluster, the group head's ⋯/+, and the section labels' buttons all share this one right edge
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. On the trailing side, the list's custom 4px scrollbar is classic — it reserves layout width whenever it shows — so .sessions (and the pinned rows' scroller) keeps its gutter reserved at all times (scrollbar-gutter: stable), and the section labels' right padding is --space-1 (the track width) + --sb-action-inset: every trailing button — section-label buttons included — stays on the same right line whether or not the list scrolls, and the compensation lives on the labels (not .sessions-head) so the pinned section's drop-active frame stays symmetric. On Firefox (no ::-webkit-scrollbar) the global thin scrollbar stays — users keep a draggable bar — and since its gutter width is browser-owned and unmeasurable from CSS, the two section labels get the SAME gutter environment (overflow: hidden + scrollbar-gutter: stable, which the browser sizes identically to the list's at any thin width) and drop the track-width padding: every trailing button shares the right line with nothing measured or hard-coded. The labels' padding/negative-margin pairs reserve the focus ring's spread (--p-focus-ring-w) against the overflow clip — always on top, and on the right only when the font scale shrinks --sb-action-inset below the ring (max/min clamped, so the button's right edge never leaves the shared line).

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 --p-sidebar-seam-h (13px), 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). Pinned rows render in pure recency order (updatedAt desc — no manual ordering, no attention tiering): drag a session row in to pin it (the drop spot carries no position meaning), drag a pinned row out to unpin. 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 (40vh at rest) with their own scroll so a long pinned set can't push the list or footer out of view. Once the pinned content exceeds a few rows, a horizontal ResizeHandle twin renders between the rows and the section label (a shorter set keeps its natural height and no handle): dragging it re-caps the rows (two rows min; the max is 60% of the viewport, narrowed further on short windows so the list below always keeps ~3 rows — both bounds measured off the rendered rows, so they track the font-scale setting — and a gesture never targets positions past the content's natural height so the separator always tracks what renders; 40vh default; persisted per device, kimi-web.sidebar-pinned-height) and the list below takes what remains — same 4px strip / centred 2px bar, neutral f2/f3 ramp, row-resize with directional hints at the limits, useResizable axis: 'y' with imperative height writes, and the §08 separator keyboard model (↑/↓). While the rows scroll internally, their edges carry the session list's scroll-linked seam language: a --p-sidebar-seam-h three-layer text-tint veil plus a 0.5px --line hairline at the content edge, at the top once scrolled and at the bottom while more rows remain — absolutely positioned (no layout shift), --duration-slow opacity fade, below the resize handle so its hover/drag bar always wins. The rows scroller owns the same inset as .sessions (the wrapper stretches to the full column width), so the rows' right edge and the scrollbar track land exactly where the session list's do
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 (used-percent values via settings.planUsage.usedPct, 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, and the whole menu (flyouts included) runs at the §03 default density — same row inset, label size and separator rhythm as every other menu; the usage flyout's custom rows read the same --menu-item-padding-* inset tokens as the primitive, with the reset hint one rung down at --text-xs. On macOS desktop the trigger's bottom-left corner rounds at --radius-window-chip — concentric with the window's corner (the window rounds at the measured 14px --radius-window, and the footer's --sb-inset row inset and --space-2 block padding both resolve to 8px, so the chip hugs 8px from the window's left and bottom edges and 14px − 8px lands exactly on --radius-sm); web and other platforms have no rounded container corner there and keep the uniform --radius-sm
!
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.
i
实验室 multi-tab sidebar toggle (Settings → 实验室, kimi-web.sidebar-multi-tab, default OFF) forks the sidebar into two forms. OFF = the legacy single session list: no 进行中/已完成/工作空间 tabs (statusTab pinned to open, tab shortcuts inert), no session-admin entries (the 列表管理 menu item hides and the workspace home itself falls back to the classic 新建会话 doodle hero — no workspace head, no recent-sessions list), the row hover action + context menu and the chat-header ⋯ menu read 归档 with the archive glyph (no success-hover variant, the header's Done pill + reopen button hide), and the archive ActionToast is the legacy «撤销 · 或到 · 设置 · 查看已归档的会话» linking to Settings → Archived. ON = the status-tabs form documented in this section (tabs, session admin page, the complete/reopen relabel, «已完成 · 撤销» toast). The preference is an app-core singleton (useSidebarTabs) consumed directly by Sidebar / SessionRow / ConversationPane / App.vue — no prop threading.

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; empty while an attention Badge owns the row — one status at a time, decided by the shared SessionDisplayStatus enum (app-core sessionDisplayStatus.ts: approval › question › running › aborted › unread)
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 small tag (git-pull-request icon + #number, 2xs medium on a soft ground with a hairline edge and radius-sm corners — a mini §03 Badge) sits at the line's right edge, state-colored the GitHub way (open = --color-success-soft ground + --color-success text, merged = --color-done-soft + --color-done purple, closed = neutral sunken) 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.
09

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.
10

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 sm 360 / 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 (sidebar-style alignment: one icon gutter, shared left text edge, shared right meta edge; workspace rows single-line name + right-aligned path, session rows title + time over a workspace · snippet meta line; quiet uppercase section heads with counts; empty query shows a few top workspaces + recent sessions) + 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 (stays "发现新版本 vX" even while downloading) + quiet meta line (release date · current version) + height-capped scrolling what's-new list + right-aligned action row (skip → download; downloading → background + disabled live-percent button; 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.
11

Session Admin Page

The session admin page (/admin/sessions, opened from the sidebar's list-management menu) is a full-pane management view for cross-workspace session triage: filters, a server-side paged table, and batch lifecycle actions. It is a main-view peer of the conversation pane (mainView in the facade, switched with v-show so the chat stays alive) and page-private by decision — everything lives under components/admin/ (SessionAdminView/Table/Pagination, FilterSelect, MultiSelectMenu, SessionAdminMenu, useAnchoredMenu); nothing here promotes to §03 until a second consumer exists. Data is one GET /api/v2/sessions page-mode call per filter/page change (all conditions pushed down, no client-side aggregation); batch archive/restore go through the v2 batch endpoints with per-item outcomes.

Page skeleton — a full-pane admin surface

A 48px title bar (a back IconButton — chevron-left, tooltip 返回, closing the page back to the chat underneath via closeSessionAdmin — then the page title, semibold base; hairline bottom edge; on macOS desktop it doubles as the window-drag region and takes the chat header's collapsed-sidebar clearance — 146px / 78px / Windows fallback — so ONLY the bar insets, the body never does) → muted subtitle → query-form filter bar → table card → pager. The title bar and the scroll container are siblings (bar fixed, body scrolls). The page wrapper spans the whole conversation column — do not apply the chat content measure (--p-content-max) here: under table-layout: fixed a narrow wrapper crushes the table's flexible columns to zero width (the title/prompt columns collapsed in practice). An admin table surface owns the pane width. The status filter defaults to 全部 (all) — the page is the whole inventory, 重置 restores that same default.

!
Lesson (content measure): --p-content-max is a READING measure for prose-like content (chat, dialogs). Full-bleed work surfaces — tables, grids, dashboards — span the pane instead. Pick one deliberately; inheriting the chat measure by default is the bug.

Table

The card is the flat shell: 0.5px --color-line hairline, --radius-lg, no shadow. Inside, table-layout: fixed with a colgroup: fixed-width utility columns (checkbox, workspace, status, the two time columns, actions) and two flexible content columns (title at max(200px, 20%) — a floor, not a bare percentage — last prompt taking the rest). The head row is a pinned-height 32px box (it hosts the batch transform below); body rows are 40px. Rows are separated by 0.5px --color-subtle hairlines (none after the last row), with a --color-hover wash on hover. Every cell truncates single-line with ellipsis and carries a title tooltip. Time columns are absolute (YYYY-MM-DD HH:mm) in --font-mono xs with tabular-nums — the admin page is an audit view, so no relative times; empty values render a faint . The status column sits right after the workspace column and reuses the sidebar row's lifecycle glyphs: state-open (dashed ring, --color-success) for 进行中 and state-done (checked ring, --color-done) for 已完成, icon + label. First load swaps the body for a centered §03 Spinner; refetches keep the stale rows and dim the card (opacity + pointer-events: none) rather than flashing it away; filters with no matches render the centered faint empty line.

Responsive steps (the card is the query container; web's narrow panes matter too): the time columns give ground FIRST — at ≤1020px their values swap to the compact MM-DD HH:mm at 108px (each time cell carries both spans, CSS toggles them — no JS measuring); at ≤760px the time columns hide outright (the col and the cells share sa-c-time/sa-col-time classes) and the workspace column drops its folder icon. The table itself floors at 640px and the card takes overflow-x: auto — past the floor the card scrolls horizontally instead of crushing title/prompt to zero, and auto still clips the rounded corners like hidden did.

ColumnWidthContent
checkbox36pxheader select-this-page (indeterminate) + row checkboxes
会话名20%title (emoji verbatim), weight 475, ellipsis; hosts inline rename
工作空间116pxfolder-closed icon + workspace name (cwd basename fallback)
状态88pxstate-open/state-done glyph + label
最后一条 promptflexmuted, ellipsis, faint when null
最后更新 / 完成时间140px ×2mono tabular-nums absolute time; completed shows while open
操作84pxlifecycle IconButton (state-done completes an open row, undo reopens a done one; tooltips carry 标记完成/恢复进行中) + ⋯ IconButton dropdown (Rename… / Fork / Export)

Batch header — the zero-offset transform

GitHub issues/PR semantics: while a selection exists, the head row transforms IN PLACE — the checkbox column stays put, and the remaining column headers swap for a single <th colspan> batch bar ("已选 n 项" + Mark-as-done / Reopen, each disabled when the selection holds no row of that lifecycle) inside the SAME pinned 32px box, so the table body does not move a pixel. Mark-as-done is the bar's one accent-primary button (fill + on-accent icon/label); Reopen stays a quiet hairline button. The selection itself is facade-owned (a reactive id set plus a per-id lifecycle map, reconciled against fresh rows on every landing) and survives page and filter changes — the batch count deliberately includes rows no longer visible. Successful batch items leave the selection and the current page is silently re-pulled; failures stay selected. There is deliberately no "clear selection" button for ordinary selections: unchecking rows or the header checkbox is the way out. Toasts ride App.vue's shared ActionToast channel (succeeded count, failed count when partial, Undo through the inverse batch endpoint); an all-failed batch has nothing to undo and surfaces as a WarningToast instead.

Select-all-matching — the Gmail move

Page-size caps (≤100) make "mark everything done" hopeless against thousands of rows, so the batch bar borrows Gmail's escalation: once the header checkbox has the whole page selected and total says more rows exist, a link-style button appears IN the bar (zero-offset — no banner pushing the table down): "选中当前条件下的全部 N 项" (busy-label 正在选中… while fetching). Activating it materializes every matching id into the selection via the ids projection (GET /api/v2/sessions?fields=id,archived — the one cheap shape whose page_size ceiling relaxes to 10000; cursor-walked for larger sets), merging atomically: a filter change mid-flight discards the fetch entirely. While active the count reads "已选中全部 n 项" and the link becomes 清除选择. Exclusions are free — unchecking a row just drops it from the set; emptying the selection drops the mode, as does a right-click single-row collapse. The mode ties itself to the filter fingerprint it was built from: a real condition change (query-form apply with different values, or any granular setter) clears the whole selection — re-applying the SAME conditions keeps it. Batch executions chunk at the wire's 5000-unique-ids ceiling (sequential, merged per-item outcomes; a thrown chunk aborts the rest and counts everything unexecuted as failed — the succeeded ids still reconcile).

The quiet-button border reset

All quiet icon/text buttons on the page (the batch bar's Reopen, the pager buttons) set border: none; background: transparent explicitly — or, for the bordered shapes (the filter triggers), an explicit 0.5px hairline. Row actions are pure §03 IconButtons (the sidebar row's language): the lifecycle glyph (state-done completes an open row, undo reopens a done one — tooltips carry the labels) plus the ⋯ dropdown; a text button per row read as visual noise once every row carried one.

!
Lesson (UA borders): the global reset clears button backgrounds only — a bare <button> still inherits the UA stylesheet's outset border, which reads as a stray box around every quiet control. Any quiet button outside the §03 primitives must reset both properties.

Quiet filter controls (query form)

The filter bar is a query form (antd Pro semantics): the controls edit a local DRAFT only — nothing is requested until an explicit apply. 查询 (a §03 Button variant=primary size=sm) applies the whole draft through the facade in one shot (applySessionAdminFilters — atomic write + page reset + exactly one request, never the per-setter debounce dribble), 重置 (a ghost sibling) restores defaults the same way, and Enter inside the bar queries too — except while any overlay (a select dropdown) is open, where Enter belongs to the overlay. Pagination is exempt: page/page-size changes still fetch immediately. Entry paths can pre-seed the conditions: the workspace home's 查看更多 opens the page with its workspace already selected in the filter (openSessionAdmin(workspaceId) applies the filter atomically with the navigation), and because the page is v-show-kept, the draft re-seeds from the applied filters on EVERY entry so the controls always show the true conditions. The controls themselves are muted sm labels plus a family of quiet 30px hairline controls (0.5px --color-line, --radius-md, transparent ground, --color-hover on hover/open) — deliberately NOT the §03 Select (a 32px+ form control with an accent focus ring, too heavy for a filter strip):

Point-anchored context menus

useAnchoredMenu is the page's one menu mechanic: fixed-position §03 Menu surface, pop-from-anchor motion (fade + 0.97 scale on the menu tokens, origin and nudge following the upward flip at the viewport edge), closed by outside mousedown / Esc / scroll / resize. Three anchor modes — left-aligned under a trigger (filter selects), right-edge under a trigger (the row ⋯), and openAt(x, y) at a raw viewport point for the row contextmenu. The contextmenu has two shapes: on a row outside the multi-selection the selection first collapses to just that row and the menu is the single shape (Open session / Rename… / Fork / Export / — / the lifecycle action); on a row inside it, the multi shape (a muted count head + Mark-as-done (n) / Reopen (n), disabled per availability). Open session is the facade's selectSession — a user navigation that also leaves the admin page back to chat.

Inline rename

The title cell swaps for an accent-ringed input (--color-accent border + --color-accent-bd ring, --radius-sm) — Enter commits, Esc cancels, blur commits, settled once. The table is server-fed, so a commit is followed by a silent re-pull of the current page (the facade's pool update never reaches it).

',7))])])])]))}}),Pa=H(Ra,[["__scopeId","data-v-32d6bee4"]]);export{Pa as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-Dlq9_Pf2.css b/apps/kimi-code/dist-web/assets/DesignSystemView-Dlq9_Pf2.css new file mode 100644 index 0000000000..b97848612c --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-Dlq9_Pf2.css @@ -0,0 +1 @@ +.ds-page[data-v-32d6bee4]{--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-32d6bee4] *,.ds-page[data-v-32d6bee4] *:before,.ds-page[data-v-32d6bee4] *:after{box-sizing:border-box}.ds-page[data-v-32d6bee4]{scroll-behavior:smooth}.ds-page[data-v-32d6bee4]{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-32d6bee4],h2[data-v-32d6bee4],h3[data-v-32d6bee4],h4[data-v-32d6bee4]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-32d6bee4]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-32d6bee4]{color:var(--d-accent-2);text-decoration:none}a[data-v-32d6bee4]:hover{text-decoration:underline}code[data-v-32d6bee4],pre[data-v-32d6bee4],.mono[data-v-32d6bee4]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-32d6bee4]{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-32d6bee4]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-32d6bee4]{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-32d6bee4]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-32d6bee4]{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-32d6bee4]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-32d6bee4]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-32d6bee4]{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-32d6bee4]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-32d6bee4]{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-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-32d6bee4]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-32d6bee4]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-32d6bee4]{color:var(--d-fg-soft)}.content[data-v-32d6bee4]{min-width:0}.content-inner[data-v-32d6bee4]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-32d6bee4]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-32d6bee4]{margin-top:72px}.hero[data-v-32d6bee4]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-32d6bee4]{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-32d6bee4]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-32d6bee4]{color:var(--d-accent)}.hero p.lead[data-v-32d6bee4]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-32d6bee4]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-32d6bee4]{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-32d6bee4]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-32d6bee4]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-32d6bee4]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-32d6bee4]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-32d6bee4]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-32d6bee4]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-32d6bee4]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-32d6bee4]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-32d6bee4]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-32d6bee4]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-32d6bee4]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-32d6bee4]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-32d6bee4]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-32d6bee4]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-32d6bee4]{color:var(--d-amber)}.stat.bad[data-v-32d6bee4]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-32d6bee4]{color:var(--d-red)}.stat.good[data-v-32d6bee4]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-32d6bee4]{color:var(--d-green)}.panel[data-v-32d6bee4]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-32d6bee4]{padding:22px}.panel-soft[data-v-32d6bee4]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-32d6bee4]{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-32d6bee4]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-32d6bee4]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-32d6bee4]{background:var(--d-accent);color:#fff}.callout.warn[data-v-32d6bee4]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-32d6bee4]{background:var(--d-amber);color:#fff}.callout.good[data-v-32d6bee4]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-32d6bee4]{background:var(--d-green);color:#fff}table.dt[data-v-32d6bee4]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{border-bottom:none}table.dt td.tk[data-v-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-32d6bee4]{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-32d6bee4]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-32d6bee4]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-32d6bee4]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-32d6bee4]{padding:10px 12px 12px}.color-meta .cn[data-v-32d6bee4]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-32d6bee4]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-32d6bee4]:last-child{border-bottom:none}.type-sample[data-v-32d6bee4]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-32d6bee4]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-32d6bee4]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-32d6bee4]:last-child{border-bottom:none}.space-bar[data-v-32d6bee4]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-32d6bee4]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-32d6bee4]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-32d6bee4]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-32d6bee4]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-32d6bee4]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-32d6bee4]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-32d6bee4]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-32d6bee4]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-32d6bee4]{display:flex;gap:6px}.tab[data-v-32d6bee4]{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-32d6bee4]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-32d6bee4]{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-32d6bee4]{flex-direction:column;align-items:stretch}.stage.dark[data-v-32d6bee4]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-32d6bee4]{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-32d6bee4]{color:#6b7280}.ba[data-v-32d6bee4]{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-32d6bee4]{min-width:0}.ba-col+.ba-col[data-v-32d6bee4]{border-left:.5px solid var(--d-line)}.ba-head[data-v-32d6bee4]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-32d6bee4]{background:var(--d-red-soft)}.ba-head.after[data-v-32d6bee4]{background:var(--d-green-soft)}.ba-head .bh[data-v-32d6bee4]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-32d6bee4]{color:var(--d-red)}.ba-head.after .bh[data-v-32d6bee4]{color:var(--d-green)}.ba-head .bh small[data-v-32d6bee4]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-32d6bee4]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-32d6bee4]{background:#fff}.code[data-v-32d6bee4]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-32d6bee4]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-32d6bee4]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-32d6bee4]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-32d6bee4]{color:#8b949e}.code .k[data-v-32d6bee4]{color:#ff7b72}.code .s[data-v-32d6bee4]{color:#a5d6ff}.code .p[data-v-32d6bee4]{color:#79c0ff}.code .n[data-v-32d6bee4]{color:#d2a8ff}.code .v[data-v-32d6bee4]{color:#ffa657}.pill[data-v-32d6bee4]{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-32d6bee4]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-32d6bee4]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-32d6bee4]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-32d6bee4]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-32d6bee4]{font-family:JetBrains Mono,monospace}ul.clean[data-v-32d6bee4]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-32d6bee4]{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-32d6bee4]:last-child{border-bottom:none}ul.clean li[data-v-32d6bee4]: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-32d6bee4]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-32d6bee4]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-32d6bee4]{color:var(--d-fg)}ul.clean li .path[data-v-32d6bee4]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-32d6bee4]{position:relative;margin:24px 0}.phase[data-v-32d6bee4]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-32d6bee4]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-32d6bee4]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-32d6bee4]{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-32d6bee4]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-32d6bee4]{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-32d6bee4]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-32d6bee4]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-32d6bee4]{margin:0}.matrix[data-v-32d6bee4]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-32d6bee4]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-32d6bee4]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-32d6bee4]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-32d6bee4]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-32d6bee4]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-32d6bee4]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-32d6bee4]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{grid-template-columns:1fr}.sidebar[data-v-32d6bee4]{position:static;height:auto}.nav[data-v-32d6bee4]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-32d6bee4]{padding:40px 22px 80px}.stat-grid[data-v-32d6bee4]{grid-template-columns:repeat(2,1fr)}.ba[data-v-32d6bee4]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-32d6bee4]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-32d6bee4]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-32d6bee4]{grid-template-columns:1fr}}.ds-page .p[data-v-32d6bee4],.ds-page .stage.p-skin[data-v-32d6bee4],.ds-page [data-p][data-v-32d6bee4]{--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-32d6bee4]{--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-32d6bee4]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-32d6bee4]{--_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-32d6bee4]:active{transform:scale(.98)}.p-btn[data-v-32d6bee4]: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-32d6bee4]{width:16px;height:16px}.p-btn.sm[data-v-32d6bee4]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-32d6bee4]{width:14px;height:14px}.p-btn.lg[data-v-32d6bee4]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-32d6bee4]{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-32d6bee4]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-32d6bee4]{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-32d6bee4]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-32d6bee4]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-32d6bee4]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-32d6bee4]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-32d6bee4]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-32d6bee4]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-32d6bee4]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn.text[data-v-32d6bee4]{height:auto;padding:0;background:transparent;border-color:transparent;border-radius:var(--p-r-xs);color:var(--p-text-muted);font-size:inherit;font-weight:inherit;text-decoration:underline;text-underline-offset:2px}.p-btn.text[data-v-32d6bee4]:hover{color:var(--p-text)}.p-btn.text[data-v-32d6bee4]:active{transform:none}.demo-inline-text[data-v-32d6bee4]{font-size:12px;color:var(--p-text-faint, var(--p-text-muted))}.p-btn[disabled][data-v-32d6bee4],.p-btn.disabled[data-v-32d6bee4]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-32d6bee4]{--_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-32d6bee4]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-32d6bee4]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-32d6bee4]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-32d6bee4]{--_s: 44px}.p-icon-btn .p-ic[data-v-32d6bee4]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-32d6bee4]{width:20px;height:20px}.p-badge[data-v-32d6bee4]{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-32d6bee4]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-32d6bee4]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-32d6bee4]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-32d6bee4]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-32d6bee4]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-32d6bee4]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-32d6bee4]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-32d6bee4]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-32d6bee4]{width:12px;height:12px}.p-kbd[data-v-32d6bee4]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-32d6bee4]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-32d6bee4]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-32d6bee4]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-32d6bee4]{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-32d6bee4]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-32d6bee4]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-32d6bee4]{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-32d6bee4]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-32d6bee4]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-32d6bee4],.p-select[data-v-32d6bee4],.p-textarea[data-v-32d6bee4]{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-32d6bee4]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-32d6bee4]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-32d6bee4]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-32d6bee4]:hover,.p-select[data-v-32d6bee4]:hover,.p-textarea[data-v-32d6bee4]:hover{border-color:var(--p-line-strong)}.p-input[data-v-32d6bee4]:focus,.p-select[data-v-32d6bee4]:focus,.p-textarea[data-v-32d6bee4]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-32d6bee4]::placeholder,.p-textarea[data-v-32d6bee4]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-32d6bee4]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-32d6bee4]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-32d6bee4]{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-32d6bee4]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-32d6bee4]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-32d6bee4]{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-32d6bee4]{padding:4px 22px 18px}.p-dialog-foot[data-v-32d6bee4]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-32d6bee4]{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-32d6bee4]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-32d6bee4]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-32d6bee4]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-32d6bee4]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-32d6bee4]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-32d6bee4]{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-32d6bee4]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-32d6bee4]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-32d6bee4]{width:18px;height:18px;animation:p-spin-32d6bee4 .85s linear infinite}.p-spinner.sm[data-v-32d6bee4]{width:14px;height:14px}.p-spinner circle[data-v-32d6bee4]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-32d6bee4]{stroke:var(--p-line)}.p-spinner .arc[data-v-32d6bee4]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-32d6bee4{to{transform:rotate(360deg)}}.p-thinking[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{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-32d6bee4]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{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-32d6bee4]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-32d6bee4]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-32d6bee4]{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-32d6bee4]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-32d6bee4]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-32d6bee4]{font-weight:500}.p-opt-text .d[data-v-32d6bee4]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-32d6bee4]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-32d6bee4]{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-32d6bee4]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-32d6bee4]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-32d6bee4]{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-32d6bee4]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-32d6bee4]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-32d6bee4]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-32d6bee4]{color:var(--p-accent);font-weight:500}.p-dot[data-v-32d6bee4]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-32d6bee4]{background:var(--p-success)}.p-dot.error[data-v-32d6bee4]{background:var(--p-danger)}.p-dot.running[data-v-32d6bee4]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-32d6bee4 1.4s ease-out infinite}@keyframes p-pulse-32d6bee4{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-32d6bee4]{overflow:hidden}.p-tool-group-head[data-v-32d6bee4]{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-32d6bee4]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-32d6bee4]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-32d6bee4]{font-weight:500}.p-tool-group-head .tg-meta[data-v-32d6bee4]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-32d6bee4]{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-32d6bee4]{transform:rotate(90deg)}.p-tool-row[data-v-32d6bee4]{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-32d6bee4]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-32d6bee4]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-32d6bee4]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-32d6bee4]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-32d6bee4]{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-32d6bee4],.p-tool-row .tr-add~.tr-add[data-v-32d6bee4]{margin-left:0}.p-tool-row .tr-del[data-v-32d6bee4]{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-32d6bee4]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-32d6bee4]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-32d6bee4]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{width:14px;height:14px}.p-agent-card .pa-main[data-v-32d6bee4]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-32d6bee4]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-32d6bee4]{transform:rotate(90deg)}.p-tool-detail[data-v-32d6bee4]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-32d6bee4]{margin-top:4px}.p-composer[data-v-32d6bee4]{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-32d6bee4]: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-32d6bee4]:focus-within:after{opacity:1}.p-composer-ta[data-v-32d6bee4]{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-32d6bee4]{color:var(--p-text-faint)}.p-composer-bar[data-v-32d6bee4]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-32d6bee4]{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-32d6bee4]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-32d6bee4],.p-composer-right[data-v-32d6bee4]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-32d6bee4]{border-radius:var(--p-r-full)}.p-send[data-v-32d6bee4]{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-32d6bee4]: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-32d6bee4]:hover:after{opacity:.28}.p-send[data-v-32d6bee4]:active{transform:scale(.92)}.p-send .p-ic[data-v-32d6bee4]{width:16px;height:16px}.dw-bar[data-v-32d6bee4]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5)}.am-mock[data-v-32d6bee4]{display:flex;flex-direction:column;gap:var(--menu-rows-seam);width:100%;max-width:420px;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--p-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--p-sh-menu);font-family:var(--font-ui)}.am-mock-row[data-v-32d6bee4]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border-radius:var(--radius-menu-row);color:var(--p-text);font-size:var(--p-font-size-base)}.am-mock-row.focus[data-v-32d6bee4]{background:var(--color-selected)}.am-mock-row .n[data-v-32d6bee4]{font-weight:var(--weight-medium)}.am-mock-row .d[data-v-32d6bee4]{margin-left:var(--space-1);color:var(--p-text-muted);font-size:var(--text-sm)}.dw-pill[data-v-32d6bee4]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-normal)}.dw-pill[data-v-32d6bee4] svg{width:1.5em;height:1.5em}.dw-pill.on[data-v-32d6bee4]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);pointer-events:none}.dw-pill .dw-count[data-v-32d6bee4]{color:var(--p-text-muted)}.dw-pill .dw-running[data-v-32d6bee4]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted)}.dw-pill .dw-live[data-v-32d6bee4]{color:var(--p-success);font-weight:var(--weight-medium)}.dw-panel[data-v-32d6bee4]{width:100%;border:.5px solid var(--p-line);border-radius:var(--radius-2xl);background:color-mix(in srgb,var(--p-bg) 70%,transparent);box-shadow:var(--p-sh-menu);overflow:hidden}.dw-head[data-v-32d6bee4]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-4) var(--space-4) 0}.dw-tab[data-v-32d6bee4]{display:inline-flex;align-items:center;gap:var(--space-2);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-tab[data-v-32d6bee4] svg{width:1.5em;height:1.5em}.dw-tab .dw-meta[data-v-32d6bee4]{color:var(--p-text-muted)}.dw-chips[data-v-32d6bee4]{margin-left:auto;display:inline-flex;gap:var(--space-05);padding:var(--space-05);background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md)}.dw-chip[data-v-32d6bee4]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--p-sp-3);border-radius:var(--p-r-sm);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-chip.on[data-v-32d6bee4]{color:var(--p-text);background:var(--p-surface-raised);box-shadow:var(--p-sh-sm)}.dw-body[data-v-32d6bee4]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dw-body.col[data-v-32d6bee4]{display:flex;flex-direction:column}.dw-row[data-v-32d6bee4]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--p-text);font-size:var(--p-font-size-base)}.dw-row .nm[data-v-32d6bee4]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-row .tm[data-v-32d6bee4]{flex:none;color:var(--p-text-muted);font-variant-numeric:tabular-nums}.dw-row .ok[data-v-32d6bee4]{color:var(--p-success);transform:scale(.91)}.dw-row.fail .nm[data-v-32d6bee4],.dw-row.fail[data-v-32d6bee4] svg{color:var(--p-danger)}.dw-row.cancelled[data-v-32d6bee4] svg{color:var(--p-text-muted)}.dw-body.grid[data-v-32d6bee4]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.dw-card[data-v-32d6bee4]{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.dw-card .ct[data-v-32d6bee4]{display:flex;align-items:center;gap:var(--space-2)}.dw-card .nm[data-v-32d6bee4]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium)}.dw-card .nu[data-v-32d6bee4]{flex:none;color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-variant-numeric:tabular-nums}.dw-card .ds[data-v-32d6bee4]{color:var(--p-text-muted);font-size:var(--p-font-size-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dw-card .cs[data-v-32d6bee4]{display:flex;align-items:center;justify-content:space-between;color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cf[data-v-32d6bee4]{display:flex;flex-direction:column;gap:var(--space-1)}.dw-card .cm[data-v-32d6bee4]{display:flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cm span[data-v-32d6bee4]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-card .cs .sl[data-v-32d6bee4]{display:inline-flex;align-items:center;gap:var(--space-1)}.dw-card .cs .sl .ok[data-v-32d6bee4]{color:var(--p-success);transform:scale(.91)}.dw-card .cs .tm[data-v-32d6bee4]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);font-variant-numeric:tabular-nums}.dw-card.fail .cs .sl[data-v-32d6bee4]{color:var(--p-danger)}.dw-ring[data-v-32d6bee4]{display:inline-block;width:var(--p-ic-md);height:var(--p-ic-md);border:1.5px solid var(--p-line-strong);border-radius:var(--radius-full);vertical-align:middle}.dw-spin[data-v-32d6bee4]{display:inline-flex;color:var(--p-text);vertical-align:middle}.dt td .kw-dot[data-v-32d6bee4],.dt td[data-v-32d6bee4] svg{vertical-align:middle}.p[data-v-32d6bee4] ::selection,[data-p][data-v-32d6bee4] ::selection{background:var(--p-selection)}.p-link[data-v-32d6bee4]{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-32d6bee4]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-32d6bee4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-32d6bee4]{color:var(--p-text-muted)}.p-link.muted[data-v-32d6bee4]:hover{color:var(--p-text)}.p-link .p-ic[data-v-32d6bee4]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-32d6bee4]{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:var(--menu-pad);min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-32d6bee4]{display:flex;align-items:center;gap:7px;padding:var(--menu-item-padding-block) var(--menu-item-padding-inline);border-radius:var(--radius-menu-item);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-32d6bee4]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-32d6bee4],.p-menu-item.active[data-v-32d6bee4]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-32d6bee4]{color:var(--p-danger)}.p-menu-item.danger[data-v-32d6bee4]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-32d6bee4]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-32d6bee4]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-32d6bee4]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-32d6bee4]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-32d6bee4]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-32d6bee4]{color:var(--p-danger)}.p-menu-item.lg[data-v-32d6bee4]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-32d6bee4]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]:hover{color:var(--p-text)}.p-seg-item.on[data-v-32d6bee4]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-32d6bee4]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-32d6bee4]{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-32d6bee4]:hover{color:var(--p-text)}.p-tab.on[data-v-32d6bee4]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-32d6bee4]{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-32d6bee4]: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-32d6bee4]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-32d6bee4]{background:var(--p-accent)}.p-switch.on[data-v-32d6bee4]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-32d6bee4]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-32d6bee4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-32d6bee4]{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-32d6bee4]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-32d6bee4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-32d6bee4]{width:12px;height:12px}.p-avatar[data-v-32d6bee4]{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-32d6bee4]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-32d6bee4]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-32d6bee4]{width:13px;height:13px}.p-empty[data-v-32d6bee4]{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-32d6bee4]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-32d6bee4]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-32d6bee4]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-32d6bee4]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-32d6bee4]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-32d6bee4]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-32d6bee4]{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-32d6bee4],.p-turn-failed .tf-meta[data-v-32d6bee4]{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-32d6bee4]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-32d6bee4]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-32d6bee4]{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-32d6bee4]{opacity:1}.p-banner[data-v-32d6bee4]{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-32d6bee4]{width:18px;height:18px;flex:none}.p-banner.info[data-v-32d6bee4]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-32d6bee4]{color:var(--p-accent)}.p-banner.warning[data-v-32d6bee4]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-32d6bee4]{color:var(--p-warning)}.p-banner.danger[data-v-32d6bee4]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-32d6bee4]{color:var(--p-danger)}.p-sheet[data-v-32d6bee4]{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-32d6bee4]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-32d6bee4]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-32d6bee4 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-32d6bee4{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-32d6bee4]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-32d6bee4]{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-32d6bee4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-32d6bee4]{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-32d6bee4]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-32d6bee4]{width:15px;height:15px}.p-topbar[data-v-32d6bee4]{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-32d6bee4]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-32d6bee4]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-32d6bee4]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-32d6bee4]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-32d6bee4]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-32d6bee4]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-32d6bee4]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-32d6bee4]{flex:1;min-width:0}.demo-chat[data-v-32d6bee4]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-32d6bee4]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-32d6bee4]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-32d6bee4]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]{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-32d6bee4]{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-32d6bee4]{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-32d6bee4]{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-32d6bee4]{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-32d6bee4]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-32d6bee4]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-32d6bee4]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-32d6bee4]{color:var(--p-success)}.p-diff-row.del[data-v-32d6bee4]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-32d6bee4]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-32d6bee4]{color:var(--p-text)}.p-field-error[data-v-32d6bee4]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-32d6bee4]{vertical-align:middle}.p-btn .p-spinner .track[data-v-32d6bee4]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-32d6bee4]{stroke:currentColor}.ds-page[data-v-32d6bee4]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-32d6bee4]{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-32d6bee4]{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-32d6bee4]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-32d6bee4]{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-OrMK9Tfr.js b/apps/kimi-code/dist-web/assets/Tooltip-LZbLRS_l.js similarity index 98% rename from apps/kimi-code/dist-web/assets/Tooltip-OrMK9Tfr.js rename to apps/kimi-code/dist-web/assets/Tooltip-LZbLRS_l.js index 4b970a7127..2e0ff39713 100644 --- a/apps/kimi-code/dist-web/assets/Tooltip-OrMK9Tfr.js +++ b/apps/kimi-code/dist-web/assets/Tooltip-LZbLRS_l.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-yKYHPeXU.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-BkUUBejk.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-BN8tpheJ.js b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-CCujN1-u.js similarity index 86% rename from apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-BN8tpheJ.js rename to apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-CCujN1-u.js index ef1d6d6ede..b2a1180dd0 100644 --- a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-BN8tpheJ.js +++ b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-CCujN1-u.js @@ -1 +1 @@ -import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-BWl8WxOI.js";import{p as f}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{_ as n,l as o}from"./mermaid.core-BKBZnrB_.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.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-DZKHYQ2C.js";import{p as f}from"./chunk-JWPE2WC7-Bsi9VFLA.js";import{_ as n,l as o}from"./mermaid.core-DcHEQi2N.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import"./index-BkUUBejk.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-myf2kRJl.js b/apps/kimi-code/dist-web/assets/arc-DTXD5_h1.js similarity index 98% rename from apps/kimi-code/dist-web/assets/arc-myf2kRJl.js rename to apps/kimi-code/dist-web/assets/arc-DTXD5_h1.js index 4860d6d42a..dc2ee539a0 100644 --- a/apps/kimi-code/dist-web/assets/arc-myf2kRJl.js +++ b/apps/kimi-code/dist-web/assets/arc-DTXD5_h1.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-BKBZnrB_.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-Bsi9VFLA.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-DcHEQi2N.js";import{p as fr}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import{c as Fe}from"./cytoscape.esm-OyMbaexL.js";import{g as cr}from"./_commonjsHelpers-CqkleIqs.js";import"./index-BkUUBejk.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-DAH71x1Q.js b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-B8WNXDHs.js similarity index 99% rename from apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-DAH71x1Q.js rename to apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-B8WNXDHs.js index 00c6788fa9..023ff8042c 100644 --- a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-DAH71x1Q.js +++ b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-B8WNXDHs.js @@ -1,4 +1,4 @@ -import{g as de}from"./chunk-5VM5RSS4-BxdGGlTY.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-BKBZnrB_.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-C2KMAw2n.js";import"./index-yKYHPeXU.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-xUH0x0y-.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-DcHEQi2N.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-DtBwLLpC.js";import"./index-BkUUBejk.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-Pb2vyZDT.js b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-cCXlDJau.js similarity index 99% rename from apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Pb2vyZDT.js rename to apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-cCXlDJau.js index 352c27be29..52ced14e58 100644 --- a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Pb2vyZDT.js +++ b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-cCXlDJau.js @@ -1,4 +1,4 @@ -import{g as Oe,d as Re}from"./chunk-32BRIVSS-CZoTGle4.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-BKBZnrB_.js";import"./index-yKYHPeXU.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-BSinQ2vi.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-DcHEQi2N.js";import"./index-BkUUBejk.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-C2KMAw2n.js b/apps/kimi-code/dist-web/assets/channel-C2KMAw2n.js deleted file mode 100644 index cef64dad48..0000000000 --- a/apps/kimi-code/dist-web/assets/channel-C2KMAw2n.js +++ /dev/null @@ -1 +0,0 @@ -import{U as a,C as n}from"./mermaid.core-BKBZnrB_.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-DtBwLLpC.js b/apps/kimi-code/dist-web/assets/channel-DtBwLLpC.js new file mode 100644 index 0000000000..5d1983b20c --- /dev/null +++ b/apps/kimi-code/dist-web/assets/channel-DtBwLLpC.js @@ -0,0 +1 @@ +import{U as a,C as n}from"./mermaid.core-DcHEQi2N.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-vvrZ7MG7.js b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-SieFmbHy.js similarity index 67% rename from apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-vvrZ7MG7.js rename to apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-SieFmbHy.js index 7e0b10f30d..15953719e3 100644 --- a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-vvrZ7MG7.js +++ b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-SieFmbHy.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-BKBZnrB_.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-DcHEQi2N.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-CZoTGle4.js b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-BSinQ2vi.js similarity index 96% rename from apps/kimi-code/dist-web/assets/chunk-32BRIVSS-CZoTGle4.js rename to apps/kimi-code/dist-web/assets/chunk-32BRIVSS-BSinQ2vi.js index 48da1a1994..52648d4de1 100644 --- a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-CZoTGle4.js +++ b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-BSinQ2vi.js @@ -1 +1 @@ -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-BKBZnrB_.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-DcHEQi2N.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-BxdGGlTY.js b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-xUH0x0y-.js similarity index 83% rename from apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-BxdGGlTY.js rename to apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-xUH0x0y-.js index b2ab05e6fa..0234d532ff 100644 --- a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-BxdGGlTY.js +++ b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-xUH0x0y-.js @@ -1,4 +1,4 @@ -import{_ as e}from"./mermaid.core-BKBZnrB_.js";var l=e(()=>` +import{_ as e}from"./mermaid.core-DcHEQi2N.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-CfpEIqXB.js b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-M4c9S0ap.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-CfpEIqXB.js rename to apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-M4c9S0ap.js index fd0304d47b..2eb2408f0d 100644 --- a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-CfpEIqXB.js +++ b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-M4c9S0ap.js @@ -1,4 +1,4 @@ -import{g as te}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as ee}from"./chunk-VR4S4FIN-CTR9P-lT.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-BKBZnrB_.js";import{f as fe}from"./chunk-32BRIVSS-CZoTGle4.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-B-lbKVoI.js";import{s as ee}from"./chunk-VR4S4FIN-A096m_fZ.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-DcHEQi2N.js";import{f as fe}from"./chunk-32BRIVSS-BSinQ2vi.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-D0FrOBtU.js b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-Bsi9VFLA.js similarity index 71% rename from apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-D0FrOBtU.js rename to apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-Bsi9VFLA.js index 198d2d4e80..7d5b0a7b87 100644 --- a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-D0FrOBtU.js +++ b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-Bsi9VFLA.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-BKBZnrB_.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-DcHEQi2N.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-BWl8WxOI.js b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-DZKHYQ2C.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-BWl8WxOI.js rename to apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-DZKHYQ2C.js index 5137cf21a8..ca111d684c 100644 --- a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-BWl8WxOI.js +++ b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-DZKHYQ2C.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-BKBZnrB_.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-DcHEQi2N.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-DPVXfp-M.js b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-PhVqSDKq.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DPVXfp-M.js rename to apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-PhVqSDKq.js index da580cd26e..bd75bceff9 100644 --- a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DPVXfp-M.js +++ b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-PhVqSDKq.js @@ -1 +1 @@ -import{_ as u,l as i}from"./mermaid.core-BKBZnrB_.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-DcHEQi2N.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-CySsnTrI.js b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-1czOTPZ2.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-CySsnTrI.js rename to apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-1czOTPZ2.js index 106af85b1e..a7edbdfb67 100644 --- a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-CySsnTrI.js +++ b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-1czOTPZ2.js @@ -1,4 +1,4 @@ -import{g as tt}from"./chunk-5VM5RSS4-BxdGGlTY.js";import{g as st}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as it}from"./chunk-VR4S4FIN-CTR9P-lT.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-BKBZnrB_.js";import{f as gt}from"./chunk-32BRIVSS-CZoTGle4.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-xUH0x0y-.js";import{g as st}from"./chunk-XXDRQBXY-B-lbKVoI.js";import{s as it}from"./chunk-VR4S4FIN-A096m_fZ.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-DcHEQi2N.js";import{f as gt}from"./chunk-32BRIVSS-BSinQ2vi.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-CTR9P-lT.js b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-A096m_fZ.js similarity index 87% rename from apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CTR9P-lT.js rename to apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-A096m_fZ.js index 95b2028cae..93196b4df9 100644 --- a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CTR9P-lT.js +++ b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-A096m_fZ.js @@ -1 +1 @@ -import{_ as a,e as w,l as x}from"./mermaid.core-BKBZnrB_.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-DcHEQi2N.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-BeefoqH0.js b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-B-lbKVoI.js similarity index 72% rename from apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BeefoqH0.js rename to apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-B-lbKVoI.js index 1b071626db..76134ca010 100644 --- a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BeefoqH0.js +++ b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-B-lbKVoI.js @@ -1 +1 @@ -import{_ as a,d as o}from"./mermaid.core-BKBZnrB_.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-DcHEQi2N.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-C4oeFc7A.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-C4oeFc7A.js deleted file mode 100644 index 3855241bf8..0000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-C4oeFc7A.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-CySsnTrI.js";import{_ as i}from"./mermaid.core-BKBZnrB_.js";import"./chunk-5VM5RSS4-BxdGGlTY.js";import"./chunk-XXDRQBXY-BeefoqH0.js";import"./chunk-VR4S4FIN-CTR9P-lT.js";import"./chunk-32BRIVSS-CZoTGle4.js";import"./index-yKYHPeXU.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-DDgksZfE.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-DDgksZfE.js new file mode 100644 index 0000000000..bd9bf9c492 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-DDgksZfE.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-1czOTPZ2.js";import{_ as i}from"./mermaid.core-DcHEQi2N.js";import"./chunk-5VM5RSS4-xUH0x0y-.js";import"./chunk-XXDRQBXY-B-lbKVoI.js";import"./chunk-VR4S4FIN-A096m_fZ.js";import"./chunk-32BRIVSS-BSinQ2vi.js";import"./index-BkUUBejk.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-C4oeFc7A.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-C4oeFc7A.js deleted file mode 100644 index 3855241bf8..0000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-C4oeFc7A.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-CySsnTrI.js";import{_ as i}from"./mermaid.core-BKBZnrB_.js";import"./chunk-5VM5RSS4-BxdGGlTY.js";import"./chunk-XXDRQBXY-BeefoqH0.js";import"./chunk-VR4S4FIN-CTR9P-lT.js";import"./chunk-32BRIVSS-CZoTGle4.js";import"./index-yKYHPeXU.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-DDgksZfE.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-DDgksZfE.js new file mode 100644 index 0000000000..bd9bf9c492 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-DDgksZfE.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-1czOTPZ2.js";import{_ as i}from"./mermaid.core-DcHEQi2N.js";import"./chunk-5VM5RSS4-xUH0x0y-.js";import"./chunk-XXDRQBXY-B-lbKVoI.js";import"./chunk-VR4S4FIN-A096m_fZ.js";import"./chunk-32BRIVSS-BSinQ2vi.js";import"./index-BkUUBejk.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-Br_qiVSQ.js b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B707gonm.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Br_qiVSQ.js rename to apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B707gonm.js index a43614392f..548a01a897 100644 --- a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Br_qiVSQ.js +++ b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B707gonm.js @@ -1 +1 @@ -import{_ as V,l as k,d as lt}from"./mermaid.core-BKBZnrB_.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-yKYHPeXU.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-DcHEQi2N.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-BkUUBejk.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-BGL2vhde.js b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-CO8bzRUZ.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BGL2vhde.js rename to apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-CO8bzRUZ.js index 3e7c81024e..10cb515ce4 100644 --- a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BGL2vhde.js +++ b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-CO8bzRUZ.js @@ -1,4 +1,4 @@ -import{bR as et}from"./index-yKYHPeXU.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-BkUUBejk.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-Bsi9VFLA.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-DcHEQi2N.js";import{p as Bt}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import"./index-BkUUBejk.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-LDM5VIAI.js b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-aIePsRuY.js similarity index 97% rename from apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-LDM5VIAI.js rename to apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-aIePsRuY.js index a6803a2374..a8d8c195e0 100644 --- a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-LDM5VIAI.js +++ b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-aIePsRuY.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-DPVXfp-M.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-BKBZnrB_.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-yKYHPeXU.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-PhVqSDKq.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-DcHEQi2N.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-BkUUBejk.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-D5pIW94l.js b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-BhT2tNp-.js similarity index 98% rename from apps/kimi-code/dist-web/assets/diagram-FQU43EPY-D5pIW94l.js rename to apps/kimi-code/dist-web/assets/diagram-FQU43EPY-BhT2tNp-.js index bc02506748..ce8afef1c8 100644 --- a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-D5pIW94l.js +++ b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-BhT2tNp-.js @@ -1,3 +1,3 @@ -import{p as re}from"./chunk-JWPE2WC7-D0FrOBtU.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-BKBZnrB_.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.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-Bsi9VFLA.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-DcHEQi2N.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import"./index-BkUUBejk.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-Xp-lqyAs.js b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-CfFdx7kf.js similarity index 97% rename from apps/kimi-code/dist-web/assets/diagram-G47NLZAW-Xp-lqyAs.js rename to apps/kimi-code/dist-web/assets/diagram-G47NLZAW-CfFdx7kf.js index 7bb5a39081..8b41e271ca 100644 --- a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-Xp-lqyAs.js +++ b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-CfFdx7kf.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-D0FrOBtU.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-BKBZnrB_.js";import{s as Fe}from"./chunk-VR4S4FIN-CTR9P-lT.js";import{p as Ne}from"./cynefin-VYW2F7L2-BGL2vhde.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-yKYHPeXU.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-Bsi9VFLA.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-DcHEQi2N.js";import{s as Fe}from"./chunk-VR4S4FIN-A096m_fZ.js";import{p as Ne}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-BkUUBejk.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-arIhWcCl.js b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-B8zys9ER.js similarity index 93% rename from apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-arIhWcCl.js rename to apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-B8zys9ER.js index d4c37bc765..b7f18c082e 100644 --- a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-arIhWcCl.js +++ b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-B8zys9ER.js @@ -1,4 +1,4 @@ -import{p as B}from"./chunk-JWPE2WC7-D0FrOBtU.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-BKBZnrB_.js";import{p as _}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.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-Bsi9VFLA.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-DcHEQi2N.js";import{p as _}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import"./index-BkUUBejk.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-DRlqkiV7.js b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DhIVEyvH.js similarity index 96% rename from apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DRlqkiV7.js rename to apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DhIVEyvH.js index 9eb3c5027d..eb0d6bacce 100644 --- a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DRlqkiV7.js +++ b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DhIVEyvH.js @@ -1,4 +1,4 @@ -import{I as X}from"./chunk-2Q5K7J3B-vvrZ7MG7.js";import{p as O}from"./chunk-JWPE2WC7-D0FrOBtU.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-BKBZnrB_.js";import{p as ne}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.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-SieFmbHy.js";import{p as O}from"./chunk-JWPE2WC7-Bsi9VFLA.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-DcHEQi2N.js";import{p as ne}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import"./index-BkUUBejk.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-zMSIhP2J.js b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-EaA2s02K.js similarity index 95% rename from apps/kimi-code/dist-web/assets/diagram-WEI45ONY-zMSIhP2J.js rename to apps/kimi-code/dist-web/assets/diagram-WEI45ONY-EaA2s02K.js index 623c8da644..2889501158 100644 --- a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-zMSIhP2J.js +++ b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-EaA2s02K.js @@ -1,4 +1,4 @@ -import{p as k}from"./chunk-JWPE2WC7-D0FrOBtU.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-BKBZnrB_.js";import{p as H}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.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-DZKHYQ2C.js";import{p}from"./chunk-JWPE2WC7-Bsi9VFLA.js";import{_ as t,l as o}from"./mermaid.core-DcHEQi2N.js";import{M as u,a as f}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import"./index-BkUUBejk.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-qDRc-Mjq.js b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DzxN4Mze.js similarity index 99% rename from apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-qDRc-Mjq.js rename to apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DzxN4Mze.js index e87a2e7137..eeb39d756d 100644 --- a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-qDRc-Mjq.js +++ b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DzxN4Mze.js @@ -1,4 +1,4 @@ -import{g as Mt}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as Bt}from"./chunk-VR4S4FIN-CTR9P-lT.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-BKBZnrB_.js";import{c as Jt}from"./channel-C2KMAw2n.js";import"./index-yKYHPeXU.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-B-lbKVoI.js";import{s as Bt}from"./chunk-VR4S4FIN-A096m_fZ.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-DcHEQi2N.js";import{c as Jt}from"./channel-DtBwLLpC.js";import"./index-BkUUBejk.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-CLFIXYkh.js b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-C4sUGsxh.js similarity index 99% rename from apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CLFIXYkh.js rename to apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-C4sUGsxh.js index fee6ef8f89..32dd5c06a8 100644 --- a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CLFIXYkh.js +++ b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-C4sUGsxh.js @@ -1,4 +1,4 @@ -import{g as He}from"./chunk-5VM5RSS4-BxdGGlTY.js";import{g as Xe}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as Qe}from"./chunk-VR4S4FIN-CTR9P-lT.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-BKBZnrB_.js";import{f as ft}from"./chunk-32BRIVSS-CZoTGle4.js";import{c as gt}from"./channel-C2KMAw2n.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-xUH0x0y-.js";import{g as Xe}from"./chunk-XXDRQBXY-B-lbKVoI.js";import{s as Qe}from"./chunk-VR4S4FIN-A096m_fZ.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-DcHEQi2N.js";import{f as ft}from"./chunk-32BRIVSS-BSinQ2vi.js";import{c as gt}from"./channel-DtBwLLpC.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-CWQOrsH8.js b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-JeMudyj4.js similarity index 99% rename from apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-CWQOrsH8.js rename to apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-JeMudyj4.js index 041301e786..6ca12a71a9 100644 --- a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-CWQOrsH8.js +++ b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-JeMudyj4.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-BKBZnrB_.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-oD38CRgN.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-yKYHPeXU.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-DcHEQi2N.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-CUFUEmlX.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-BkUUBejk.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-DT7ncN8L.js b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-6JPdDAb5.js similarity index 99% rename from apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-DT7ncN8L.js rename to apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-6JPdDAb5.js index c7e944d058..447216e229 100644 --- a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-DT7ncN8L.js +++ b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-6JPdDAb5.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-vvrZ7MG7.js";import{p as he}from"./chunk-JWPE2WC7-D0FrOBtU.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-BKBZnrB_.js";import{p as Ee}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.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-SieFmbHy.js";import{p as he}from"./chunk-JWPE2WC7-Bsi9VFLA.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-DcHEQi2N.js";import{p as Ee}from"./cynefin-VYW2F7L2-CO8bzRUZ.js";import"./index-BkUUBejk.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-C6iX4-LJ.js b/apps/kimi-code/dist-web/assets/index-B0Im24JB.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-C6iX4-LJ.js rename to apps/kimi-code/dist-web/assets/index-B0Im24JB.js index 33a934d18f..897d6f2bb9 100644 --- a/apps/kimi-code/dist-web/assets/index-C6iX4-LJ.js +++ b/apps/kimi-code/dist-web/assets/index-B0Im24JB.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-yKYHPeXU.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-CDF-FRTI.js b/apps/kimi-code/dist-web/assets/index-BTfIAWz_.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-CDF-FRTI.js rename to apps/kimi-code/dist-web/assets/index-BTfIAWz_.js index 4c124b465a..98b7f2a0a3 100644 --- a/apps/kimi-code/dist-web/assets/index-CDF-FRTI.js +++ b/apps/kimi-code/dist-web/assets/index-BTfIAWz_.js @@ -1,4 +1,4 @@ -import{t as pe,b as Ln,n as Or,c as Nr,a as Fr,d as zr,s as Ur,g as Vr,e as Br}from"./index-C6iX4-LJ.js";import{f as Ld}from"./index-C6iX4-LJ.js";import{bR as k}from"./index-yKYHPeXU.js";const Ei="diffs-container",$r=(()=>{try{return!1}catch{return!1}})(),Wr=/(?=^From [a-f0-9]+ .+$)/m,Ti=/(?=^diff --git)/gm,Ul=/(?=^---\s+\S)/gm,Vl=/(?=^@@ )/gm,Gr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,jr=/(?<=\n)/,qr=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Kr=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Yr=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Xr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Bl=/^<{7,}(?:\s.*)?$/,$l=/^\|{7,}(?:\s.*)?$/,Wl=/^={7,}$/,Gl=/^>{7,}(?:\s.*)?$/,on="header-prefix",sn="header-metadata",an="header-custom",_={dark:"pierre-dark",light:"pierre-light"},Ii="data-theme-css",Ri="data-unsafe-css",Qr="data-core-css",Jr="data-diffs-scrollbar-measure",Ai="--diffs-scrollbar-gutter-measured",jl=1,Zr=1e5,ln={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},_e={...ln,hunkLineCount:1},eo={paddingTop:8,paddingBottom:8,gap:8},to={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},no=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Hi={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ie=new Set;let Re=null;function Y(e){Ie.add(e),Re??=requestAnimationFrame(Mi)}function io(e){Ie.delete(e),Ie.size===0&&Re!=null&&(cancelAnimationFrame(Re),Re=null)}function Mi(e){const t=new Set(Ie);Ie.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ie.size>0?Re=requestAnimationFrame(Mi):Re=null}function He(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function De(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function dn(e,t){const n=e?.theme??_,i=t?.theme??_,r=kn(e),o=kn(t);return De(n,i)&&He(e,t,["theme","parseDiffOptions"])&&He(r,o)}function kn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Wt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Gt({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function ro(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function W(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function pt({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function oo(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Ee(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Di(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[W(`${t}`)]})]:void 0})}function j(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function so(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[pt({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function ao(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Pi=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Wt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&et(e.composedPath())||(he(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(he(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(he(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){he(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();he(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);he(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const g=Tt(r)&&this.hoveredLine?.lineElement===r.lineElement;ut(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ut(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),g||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Tt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(co(r)&&f!=null){f(r);break}if(ho(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Tt(r))break;ut(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const g=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...g,event:t}):o?.({...g,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:g}=this.options,b=g!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||b;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,he(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const C=[];return(t==="both"||t==="click")&&(i!=null&&C.push("onLineClick"),r!=null&&C.push("onLineNumberClick"),h!=null&&C.push("expandable hunk separators"),c!=null&&C.push("merge conflict actions")),C})()),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const m=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",p=this.pointerSession.mode==="gutterSelecting";(!f&&m||!b&&p)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();et(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(ao(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=pe(so());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Ve(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Ze(r));if(Ve(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Ve(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Ve(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&et(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ze(e);if(t&&et(n))return;const i=fo(e);return i!=null?Ze(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=go(po(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ze(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=En(t)?t:En(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Wt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;cs)break;if(g==null||gNumber.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Ke({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p},C,v,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:lo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:C,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p,getLineIndex:v}}function lo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Ve(e){return e!=null&&"kind"in e&&e.kind==="line"}function ut(e){return e!=null&&"kind"in e&&e.kind==="token"}function Tt(e){return Ve(e)||ut(e)}function ho(e){return"type"in e&&e.type==="line-info"}function co(e){return"kind"in e&&e.kind==="merge-conflict-action"}function uo(e){return e==="current"||e==="incoming"||e==="both"}function wn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ze(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function fo(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function po(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function go(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function En(e){return e!=null&&typeof e.elementFromPoint=="function"}function Tn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function In(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function et(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function he(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var _i=class ue{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ue.resizeObserver??new ResizeObserver(ue.handleSharedResizeEntries);return ue.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ue.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let g=o.get(u);if(g!=null){this.observedNodes.set(u,g),this.observedNodes.set(f,g),o.delete(u),o.delete(f);continue}const b=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;g={type:"annotations",column1:{container:h,child:u,childHeight:b},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:g,newHeight:Math.max(b,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?bo(l):Co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ue,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ue.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ue,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ue.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?mo(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?vo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function mo(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function vo(e){return Math.max(Math.ceil(e),0)}function bo(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function Co(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Se=new Map,It=new Map,jt=new Map,gt=new Set;function mt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!gt.has(t))return!1;return!0}function Rn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(gt.has(n.name))continue;let i=Se.get(n.name);i==null&&(i=n,Se.set(n.name,i)),gt.add(i.name),t.loadLanguageSync(i.data)}}function So(){Se.clear(),gt.clear()}function Oi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Ni(e){if(Oi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=It.get(e);if(t!=null)return t;try{let n=jt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Ln,e)&&(n=Ln[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Se.has(e)||Se.set(e,o),o});return It.set(e,i),await i}finally{It.delete(e)}}function Fi(e){return Se.get(e)??Ni(e)}const vt=new Set;function Ye(e){const t=[],n=new Set;for(const c of yo(e.themes)){const u=zi(c)?c.getThemes():[c];for(const f of u){if(n.has(f.name))throw new Error(`Theme collection already contains theme "${f.name}"`);n.add(f.name),t.push(f)}}const i=Object.freeze([...t]),r=Object.freeze(i.filter(c=>c.colorScheme==="light")),o=Object.freeze(i.filter(c=>c.colorScheme==="dark")),s=new Map(i.map(c=>[c.name,c])),l=Object.freeze(i.map(c=>c.name)),a=Object.freeze(r.map(c=>c.name)),d=Object.freeze(o.map(c=>c.name));function h(c){if(c==null)return i;const{colorScheme:u,collection:f}=c;return f==null?u==="light"?r:u==="dark"?o:i:i.filter(g=>g.collection!==f?!1:u==null||g.colorScheme===u)}return{getTheme(c){return s.get(c)},getThemes(c){return h(c)},getThemeNames(c){return c?.collection==null?c?.colorScheme==="light"?a:c?.colorScheme==="dark"?d:l:h(c).map(u=>u.name)},hasTheme(c){return s.has(c)},orderBy(c){return Ye({themes:i.map((u,f)=>({descriptor:u,index:f})).sort((u,f)=>{const g=c(u.descriptor,f.descriptor);return g!==0?g:u.index-f.index}).map(u=>u.descriptor)})},pick(c){const u=[],f=new Set;for(const g of c){if(f.has(g))throw new Error(`Theme collection pick already includes theme "${g}"`);f.add(g);const b=s.get(g);if(b==null)throw new Error(`Theme collection does not contain theme "${g}"`);u.push(b)}return Ye({themes:u})},registerInto(c){for(const u of i)c.registerThemeIfAbsent(u.name,u.load)}}}function yo(e){return xo(e)?[e]:e}function xo(e){return zi(e)||Lo(e)}function Lo(e){return typeof e.name=="string"&&typeof e.load=="function"}function zi(e){return typeof e.getThemes=="function"}function Ui(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Vi=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},ko=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},wo=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function Eo(){const e=new Map,t=new Map,n=new Map;let i=0;function r(m,p){if(e.has(m))throw new Vi(m);e.set(m,p)}function o(m,p){return e.has(m)?!1:(e.set(m,p),!0)}function s(m){return e.has(m)}function l(m){const p=t.get(m);if(p!==void 0)return Promise.resolve(p);const C=n.get(m);if(C!==void 0)return C;const v=e.get(m);if(v===void 0)return Promise.reject(new ko(m));const x=i,S=v().then(L=>{const E=Ui(L);return x===i&&t.set(m,E),n.get(m)===S&&n.delete(m),E}).catch(L=>{throw n.get(m)===S&&n.delete(m),L});return n.set(m,S),S}function a(m){return Promise.all(m.map(p=>l(p)))}function d(m,p){t.set(m,p)}function h(m){for(const[p,C]of m)d(p,C)}function c(m){return t.get(m)}function u(m){const p=[];for(const C of m){const v=t.get(C);if(v===void 0)throw new wo(C);p.push(v)}return p}function f(m){return t.has(m)}function g(m){for(const p of m)if(!t.has(p))return!1;return!0}function b(m){const p=t.get(m);return p!==void 0?p:l(m)}function y(){i++,t.clear(),n.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:b,getResolvedTheme:c,getResolvedThemes:u,hasRegisteredTheme:s,hasResolvedTheme:f,hasResolvedThemes:g,registerTheme:r,registerThemeIfAbsent:o,resolveTheme:l,resolveThemes:a,seedResolvedTheme:d,seedResolvedThemes:h}}const X=Eo();function An(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=X.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,X.getResolvedTheme(n)==null&&X.seedResolvedTheme(n,i);vt.has(n)||(vt.add(n),t.loadThemeSync(i))}}function To(){X.clearResolvedThemes(),vt.clear()}function hn({name:e,load:t,colorScheme:n,collection:i,displayName:r}){return{name:e,colorScheme:n,collection:i,displayName:r,load:Io(t)}}function Io(e){return async()=>Or(Ui(await e()))}const Ro="pierre",Ao=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Bi=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Ho=[...Bi,...Ao],Mo=new Set(Bi);function Do(e){return Mo.has(e)?"light":"dark"}const Po={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},_o={"pierre-dark":()=>k(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>k(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>k(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>k(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>k(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>k(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>k(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>k(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>k(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>k(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function Oo(e){return hn({name:e,collection:Ro,colorScheme:Do(e),displayName:Po[e],load:_o[e]})}const $i=Ye({themes:Ho.map(e=>Oo(e))}),No="shiki",Wi=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],Fo=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],zo=new Set(Wi);function Uo(e){return zo.has(e)?"light":"dark"}const Vo={andromeeda:()=>k(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>k(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>k(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>k(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>k(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>k(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>k(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>k(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>k(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>k(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>k(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>k(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>k(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>k(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>k(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>k(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>k(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>k(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>k(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>k(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>k(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>k(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>k(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>k(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>k(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>k(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>k(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>k(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>k(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>k(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>k(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>k(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>k(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>k(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>k(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>k(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>k(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>k(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>k(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>k(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>k(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>k(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>k(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>k(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>k(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>k(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>k(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>k(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>k(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>k(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>k(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>k(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>k(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>k(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>k(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>k(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>k(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>k(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>k(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>k(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>k(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>k(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>k(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>k(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>k(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function Hn(e){return hn({name:e,collection:No,colorScheme:Uo(e),load:Vo[e]})}const Gi=Ye({themes:Object.freeze([...Wi.map(e=>Hn(e)),...Fo.map(e=>Hn(e))])});Ye({themes:[$i,Gi]});function ji(e){if(Oi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(X.hasRegisteredTheme(e))return;const t=Gi.getTheme(e);if(t!=null){X.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function qi(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Bo(e){ji(e);const t=await X.resolveTheme(e);return qi(e,t),t}function $o(e){return X.getResolvedTheme(e)??Bo(e)}let $;async function xt({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){$??=Nr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Fr(k(()=>import("./wasm-CG6Dc4jp.js"),[])):zr()});const i=Wo($)?await $:$;$=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Fi(s);"then"in l?r.push(l):Rn(l,i)}const o=[];for(const s of e){const l=$o(s);"then"in l?o.push(l):An(l,$)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Rn(s,i)}),Promise.all(o).then(s=>{An(s,i)})]),i}function ql(e=$){return e!=null&&!("then"in e)}function Ki(){if($!=null&&!("then"in $))return $}function Wo(e=$){return e!=null&&"then"in e}function Kl(e=$){return e==null}async function Yl(e){await xt(e)}async function Xl(){$!=null&&((await $).dispose(),So(),To(),$=void 0)}for(const e of $i.getThemes())X.registerThemeIfAbsent(e.name,e.load);function cn(e=_){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ge(e){for(const t of cn(e))if(!vt.has(t))return!1;return!0}function Go(e){return X.hasResolvedThemes(e)}function Oe(e,t){return De(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ae(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Lt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function qt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function jo(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Yi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:an}}):qo({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[Ko(i)]],properties:r})}function qo({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:on}}),pt({name:jo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(t)]})],properties:{"data-prev-name":""}})),i.push(pt({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function Ko(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[W(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[W(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:sn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Xi(e){return A({tagName:"pre",properties:Yo(e)})}function Yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const Z=new Map;let bt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Q(e){if(Z.has(e))return Z.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Z.has(t[1]))return Z.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Z.has(n)?Z.get(n)??"text":Ne[n]??"text"}function Ql(e,t){if(e<=bt)return!1;Z.clear();for(const n in t){const i=t[n];i!=null&&Z.set(n,i)}return bt=e,!0}function Jl(){return bt}function Xo(e,t){const n=Z.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),Z.set(e,t),bt++,!0)}function Zl(){return Object.fromEntries(Z)}function un(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:cn(t),preferredHighlighter:n}}function ge(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function xe(e){return e.replace(/\n$|\r\n$/,"")}function Qo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push(W(` +import{t as pe,b as Ln,n as Or,c as Nr,a as Fr,d as zr,s as Ur,g as Vr,e as Br}from"./index-B0Im24JB.js";import{f as Ld}from"./index-B0Im24JB.js";import{bR as k}from"./index-BkUUBejk.js";const Ei="diffs-container",$r=(()=>{try{return!1}catch{return!1}})(),Wr=/(?=^From [a-f0-9]+ .+$)/m,Ti=/(?=^diff --git)/gm,Ul=/(?=^---\s+\S)/gm,Vl=/(?=^@@ )/gm,Gr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,jr=/(?<=\n)/,qr=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Kr=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Yr=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Xr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Bl=/^<{7,}(?:\s.*)?$/,$l=/^\|{7,}(?:\s.*)?$/,Wl=/^={7,}$/,Gl=/^>{7,}(?:\s.*)?$/,on="header-prefix",sn="header-metadata",an="header-custom",_={dark:"pierre-dark",light:"pierre-light"},Ii="data-theme-css",Ri="data-unsafe-css",Qr="data-core-css",Jr="data-diffs-scrollbar-measure",Ai="--diffs-scrollbar-gutter-measured",jl=1,Zr=1e5,ln={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},_e={...ln,hunkLineCount:1},eo={paddingTop:8,paddingBottom:8,gap:8},to={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},no=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Hi={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ie=new Set;let Re=null;function Y(e){Ie.add(e),Re??=requestAnimationFrame(Mi)}function io(e){Ie.delete(e),Ie.size===0&&Re!=null&&(cancelAnimationFrame(Re),Re=null)}function Mi(e){const t=new Set(Ie);Ie.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ie.size>0?Re=requestAnimationFrame(Mi):Re=null}function He(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function De(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function dn(e,t){const n=e?.theme??_,i=t?.theme??_,r=kn(e),o=kn(t);return De(n,i)&&He(e,t,["theme","parseDiffOptions"])&&He(r,o)}function kn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Wt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Gt({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function ro(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function W(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function pt({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function oo(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Ee(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Di(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[W(`${t}`)]})]:void 0})}function j(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function so(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[pt({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function ao(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Pi=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Wt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&et(e.composedPath())||(he(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(he(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(he(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){he(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();he(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);he(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const g=Tt(r)&&this.hoveredLine?.lineElement===r.lineElement;ut(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ut(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),g||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Tt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(co(r)&&f!=null){f(r);break}if(ho(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Tt(r))break;ut(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const g=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...g,event:t}):o?.({...g,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:g}=this.options,b=g!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||b;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,he(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const C=[];return(t==="both"||t==="click")&&(i!=null&&C.push("onLineClick"),r!=null&&C.push("onLineNumberClick"),h!=null&&C.push("expandable hunk separators"),c!=null&&C.push("merge conflict actions")),C})()),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const m=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",p=this.pointerSession.mode==="gutterSelecting";(!f&&m||!b&&p)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();et(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(ao(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=pe(so());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Ve(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Ze(r));if(Ve(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Ve(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Ve(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&et(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ze(e);if(t&&et(n))return;const i=fo(e);return i!=null?Ze(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=go(po(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ze(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=En(t)?t:En(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Wt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;cs)break;if(g==null||gNumber.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Ke({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p},C,v,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:lo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:C,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p,getLineIndex:v}}function lo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Ve(e){return e!=null&&"kind"in e&&e.kind==="line"}function ut(e){return e!=null&&"kind"in e&&e.kind==="token"}function Tt(e){return Ve(e)||ut(e)}function ho(e){return"type"in e&&e.type==="line-info"}function co(e){return"kind"in e&&e.kind==="merge-conflict-action"}function uo(e){return e==="current"||e==="incoming"||e==="both"}function wn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ze(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function fo(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function po(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function go(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function En(e){return e!=null&&typeof e.elementFromPoint=="function"}function Tn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function In(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function et(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function he(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var _i=class ue{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ue.resizeObserver??new ResizeObserver(ue.handleSharedResizeEntries);return ue.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ue.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let g=o.get(u);if(g!=null){this.observedNodes.set(u,g),this.observedNodes.set(f,g),o.delete(u),o.delete(f);continue}const b=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;g={type:"annotations",column1:{container:h,child:u,childHeight:b},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:g,newHeight:Math.max(b,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?bo(l):Co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ue,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ue.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ue,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ue.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?mo(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?vo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function mo(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function vo(e){return Math.max(Math.ceil(e),0)}function bo(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function Co(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Se=new Map,It=new Map,jt=new Map,gt=new Set;function mt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!gt.has(t))return!1;return!0}function Rn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(gt.has(n.name))continue;let i=Se.get(n.name);i==null&&(i=n,Se.set(n.name,i)),gt.add(i.name),t.loadLanguageSync(i.data)}}function So(){Se.clear(),gt.clear()}function Oi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Ni(e){if(Oi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=It.get(e);if(t!=null)return t;try{let n=jt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Ln,e)&&(n=Ln[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Se.has(e)||Se.set(e,o),o});return It.set(e,i),await i}finally{It.delete(e)}}function Fi(e){return Se.get(e)??Ni(e)}const vt=new Set;function Ye(e){const t=[],n=new Set;for(const c of yo(e.themes)){const u=zi(c)?c.getThemes():[c];for(const f of u){if(n.has(f.name))throw new Error(`Theme collection already contains theme "${f.name}"`);n.add(f.name),t.push(f)}}const i=Object.freeze([...t]),r=Object.freeze(i.filter(c=>c.colorScheme==="light")),o=Object.freeze(i.filter(c=>c.colorScheme==="dark")),s=new Map(i.map(c=>[c.name,c])),l=Object.freeze(i.map(c=>c.name)),a=Object.freeze(r.map(c=>c.name)),d=Object.freeze(o.map(c=>c.name));function h(c){if(c==null)return i;const{colorScheme:u,collection:f}=c;return f==null?u==="light"?r:u==="dark"?o:i:i.filter(g=>g.collection!==f?!1:u==null||g.colorScheme===u)}return{getTheme(c){return s.get(c)},getThemes(c){return h(c)},getThemeNames(c){return c?.collection==null?c?.colorScheme==="light"?a:c?.colorScheme==="dark"?d:l:h(c).map(u=>u.name)},hasTheme(c){return s.has(c)},orderBy(c){return Ye({themes:i.map((u,f)=>({descriptor:u,index:f})).sort((u,f)=>{const g=c(u.descriptor,f.descriptor);return g!==0?g:u.index-f.index}).map(u=>u.descriptor)})},pick(c){const u=[],f=new Set;for(const g of c){if(f.has(g))throw new Error(`Theme collection pick already includes theme "${g}"`);f.add(g);const b=s.get(g);if(b==null)throw new Error(`Theme collection does not contain theme "${g}"`);u.push(b)}return Ye({themes:u})},registerInto(c){for(const u of i)c.registerThemeIfAbsent(u.name,u.load)}}}function yo(e){return xo(e)?[e]:e}function xo(e){return zi(e)||Lo(e)}function Lo(e){return typeof e.name=="string"&&typeof e.load=="function"}function zi(e){return typeof e.getThemes=="function"}function Ui(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Vi=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},ko=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},wo=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function Eo(){const e=new Map,t=new Map,n=new Map;let i=0;function r(m,p){if(e.has(m))throw new Vi(m);e.set(m,p)}function o(m,p){return e.has(m)?!1:(e.set(m,p),!0)}function s(m){return e.has(m)}function l(m){const p=t.get(m);if(p!==void 0)return Promise.resolve(p);const C=n.get(m);if(C!==void 0)return C;const v=e.get(m);if(v===void 0)return Promise.reject(new ko(m));const x=i,S=v().then(L=>{const E=Ui(L);return x===i&&t.set(m,E),n.get(m)===S&&n.delete(m),E}).catch(L=>{throw n.get(m)===S&&n.delete(m),L});return n.set(m,S),S}function a(m){return Promise.all(m.map(p=>l(p)))}function d(m,p){t.set(m,p)}function h(m){for(const[p,C]of m)d(p,C)}function c(m){return t.get(m)}function u(m){const p=[];for(const C of m){const v=t.get(C);if(v===void 0)throw new wo(C);p.push(v)}return p}function f(m){return t.has(m)}function g(m){for(const p of m)if(!t.has(p))return!1;return!0}function b(m){const p=t.get(m);return p!==void 0?p:l(m)}function y(){i++,t.clear(),n.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:b,getResolvedTheme:c,getResolvedThemes:u,hasRegisteredTheme:s,hasResolvedTheme:f,hasResolvedThemes:g,registerTheme:r,registerThemeIfAbsent:o,resolveTheme:l,resolveThemes:a,seedResolvedTheme:d,seedResolvedThemes:h}}const X=Eo();function An(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=X.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,X.getResolvedTheme(n)==null&&X.seedResolvedTheme(n,i);vt.has(n)||(vt.add(n),t.loadThemeSync(i))}}function To(){X.clearResolvedThemes(),vt.clear()}function hn({name:e,load:t,colorScheme:n,collection:i,displayName:r}){return{name:e,colorScheme:n,collection:i,displayName:r,load:Io(t)}}function Io(e){return async()=>Or(Ui(await e()))}const Ro="pierre",Ao=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Bi=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Ho=[...Bi,...Ao],Mo=new Set(Bi);function Do(e){return Mo.has(e)?"light":"dark"}const Po={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},_o={"pierre-dark":()=>k(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>k(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>k(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>k(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>k(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>k(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>k(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>k(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>k(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>k(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function Oo(e){return hn({name:e,collection:Ro,colorScheme:Do(e),displayName:Po[e],load:_o[e]})}const $i=Ye({themes:Ho.map(e=>Oo(e))}),No="shiki",Wi=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],Fo=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],zo=new Set(Wi);function Uo(e){return zo.has(e)?"light":"dark"}const Vo={andromeeda:()=>k(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>k(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>k(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>k(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>k(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>k(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>k(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>k(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>k(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>k(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>k(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>k(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>k(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>k(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>k(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>k(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>k(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>k(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>k(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>k(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>k(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>k(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>k(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>k(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>k(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>k(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>k(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>k(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>k(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>k(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>k(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>k(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>k(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>k(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>k(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>k(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>k(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>k(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>k(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>k(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>k(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>k(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>k(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>k(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>k(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>k(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>k(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>k(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>k(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>k(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>k(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>k(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>k(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>k(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>k(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>k(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>k(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>k(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>k(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>k(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>k(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>k(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>k(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>k(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>k(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function Hn(e){return hn({name:e,collection:No,colorScheme:Uo(e),load:Vo[e]})}const Gi=Ye({themes:Object.freeze([...Wi.map(e=>Hn(e)),...Fo.map(e=>Hn(e))])});Ye({themes:[$i,Gi]});function ji(e){if(Oi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(X.hasRegisteredTheme(e))return;const t=Gi.getTheme(e);if(t!=null){X.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function qi(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Bo(e){ji(e);const t=await X.resolveTheme(e);return qi(e,t),t}function $o(e){return X.getResolvedTheme(e)??Bo(e)}let $;async function xt({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){$??=Nr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Fr(k(()=>import("./wasm-CG6Dc4jp.js"),[])):zr()});const i=Wo($)?await $:$;$=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Fi(s);"then"in l?r.push(l):Rn(l,i)}const o=[];for(const s of e){const l=$o(s);"then"in l?o.push(l):An(l,$)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Rn(s,i)}),Promise.all(o).then(s=>{An(s,i)})]),i}function ql(e=$){return e!=null&&!("then"in e)}function Ki(){if($!=null&&!("then"in $))return $}function Wo(e=$){return e!=null&&"then"in e}function Kl(e=$){return e==null}async function Yl(e){await xt(e)}async function Xl(){$!=null&&((await $).dispose(),So(),To(),$=void 0)}for(const e of $i.getThemes())X.registerThemeIfAbsent(e.name,e.load);function cn(e=_){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ge(e){for(const t of cn(e))if(!vt.has(t))return!1;return!0}function Go(e){return X.hasResolvedThemes(e)}function Oe(e,t){return De(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ae(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Lt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function qt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function jo(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Yi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:an}}):qo({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[Ko(i)]],properties:r})}function qo({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:on}}),pt({name:jo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(t)]})],properties:{"data-prev-name":""}})),i.push(pt({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function Ko(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[W(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[W(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:sn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Xi(e){return A({tagName:"pre",properties:Yo(e)})}function Yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const Z=new Map;let bt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Q(e){if(Z.has(e))return Z.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Z.has(t[1]))return Z.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Z.has(n)?Z.get(n)??"text":Ne[n]??"text"}function Ql(e,t){if(e<=bt)return!1;Z.clear();for(const n in t){const i=t[n];i!=null&&Z.set(n,i)}return bt=e,!0}function Jl(){return bt}function Xo(e,t){const n=Z.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),Z.set(e,t),bt++,!0)}function Zl(){return Object.fromEntries(Z)}function un(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:cn(t),preferredHighlighter:n}}function ge(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function xe(e){return e.replace(/\n$|\r\n$/,"")}function Qo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push(W(` `)),e}const tt=Symbol("no-token"),Rt=Symbol("multiple-tokens");function Qi(e){const t=Jo(e);if(t!=null)return t;let n=tt;const i=[];let r=[],o;const s=()=>{if(r.length===0||o==null){r=[],o=void 0;return}if(r.length===1){const a=r[0];if(a?.type==="element"){Zo(a,o);for(const d of a.children)ft(d)}else ft(a);i.push(a),r=[],o=void 0;return}for(const a of r)ft(a);i.push(A({tagName:"span",properties:{"data-char":o},children:r})),r=[],o=void 0},l=a=>{if(a!==tt){if(a===Rt){n=Rt;return}if(n===tt){n=a;return}n!==a&&(n=Rt)}};for(const a of e.children){const d=a.type==="element"?Qi(a):tt;if(l(d),typeof d!="number"){s(),i.push(a);continue}o!=null&&o!==d&&s(),o??=d,r.push(a)}return s(),e.children=i,n}function Jo(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function ft(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)ft(t)}}function Zo(e,t){e.properties["data-char"]=t}function es(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=l=>l}=e,r=new Map;function o(l){return Object.entries(l).map(([a,d])=>`${a}:${d}`).join(";")}function s(l){let a=t+ts(typeof l=="string"?l:o(l))+n;return a=i(a),r.has(a)||r.set(a,typeof l=="string"?l:{...l}),a}return{name:"@shikijs/transformers:style-to-class",pre(l){if(!l.properties.style)return;const a=s(l.properties.style);delete l.properties.style,this.addClassToHast(l,a)},tokens(l){for(const a of l)for(const d of a){if(!d.htmlStyle)continue;const h=s(d.htmlStyle);d.htmlStyle={},d.htmlAttrs||={},d.htmlAttrs.class?d.htmlAttrs.class+=` ${h}`:d.htmlAttrs.class=h}},getClassRegistry(){return r},getCSS(){let l="";for(const[a,d]of r.entries())l+=`.${a}{${typeof d=="string"?d:o(d)}}`;return l},clearRegistry(){r.clear()}}}function ts(e,t=0){let n=3735928559^t,i=1103547991^t;for(let r=0,o;r>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&i)+(n>>>0)).toString(36).slice(0,6)}function Ji(e=!1,t=!1){const n={lineInfo:[]},i=[{line(r){return delete r.properties.class,r},pre(r){const o=oo(r),s=[];if(o!=null){let l=1;for(const a of o.children)a.type==="element"&&(e&&Qi(a),s.push(Qo(a,l,n)),l++);o.children=s}return r},...e?{tokens(r){for(const o of r){let s=0;for(const l of o){const a=l;a.__lineChar??=s,s+=l.content.length}}},preprocess(r,o){o.mergeWhitespaces="never"},span(r,o,s,l,a){if(a?.offset!=null&&a.content!=null){const d=a.__lineChar;return d!=null&&(r.properties["data-char"]=d),r}return r}}:null}];return t&&i.push(ns,Mn),{state:n,transformers:i,toClass:Mn}}const Mn=es({classPrefix:"hl-"}),ns={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const i={};n.color!=null&&(i.color=n.color),n.bgColor!=null&&(i["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(i["font-style"]="italic"),(n.fontStyle&2)!==0&&(i["font-weight"]="bold"),(n.fontStyle&4)!==0&&(i["text-decoration"]="underline")),Object.keys(i).length>0&&(n.htmlStyle=i)}}};function B(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const is=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,rs=/^0(?:\.0+)?%?$/;function os(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const i=e.slice(t+1,-1).trim();if(i.length===0)return;const r=i.lastIndexOf("/");if(r!==-1)return i.slice(r+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const o=i.split(",");if(o.length===4)return o[3]?.trim()}}function ss(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let i,r=1;return n.length===3?i=n.split("").map(o=>o+o).join(""):n.length===6?i=n:(i=n.slice(0,6),r=parseInt(n.slice(6,8),16)/255),[parseInt(i.slice(0,2),16),parseInt(i.slice(2,4),16),parseInt(i.slice(4,6),16),r]}function At(e){if(e==null)return null;const t=ss(e);if(t==null)return null;const n=t[0]/255,i=t[1]/255,r=t[2]/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(i)+.0722*o(r)}function Dn(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||is.test(t))return!0;const n=os(t);return n!=null&&rs.test(n)}function as(e,t,n){if(t==null||n==null)return!1;const i=At(e),r=At(t),o=At(n);return i==null||r==null||o==null?!1:Math.abs(i-o){const s=e.at(-1);return s===""||s===` `||s===`\r `||s==="\r"?Math.max(0,e.length-2):e.length-1})();for(let s=t;s0||l<1/0,{state:h,transformers:c}=Ji(r),u=o?"text":e.lang??Q(e.name),f=typeof n=="string"?t.getTheme(n).type:void 0,g=fn({theme:n,highlighter:t});h.lineInfo=p=>({type:"context",lineIndex:p-1+s,lineNumber:p+s});const b=typeof n=="string"?{lang:u,theme:n,transformers:c,defaultColor:!1,cssVariablePrefix:B("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0}:{lang:u,themes:n,transformers:c,defaultColor:!1,cssVariablePrefix:B("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0},y=Kt(t.codeToHast(d?cs(a??St(e.contents),s,l):xe(e.contents),b)),m=d?new Array(s):y;return d&&m.push(...y),{code:m,themeStyles:g,baseThemeType:f}}function cs(e,t,n){let i="";return Ct({lines:e,startingLine:t,totalLines:n,callback({content:r}){i+=r}}),i}const Zi="-1,-1";function Yt(e){return e?.some(t=>t.lineNumber===0)??!1}function Xt(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function kt(e){return e.startingLine===0&&e.totalLines>0}function er(e,t){return A({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Qt(e){return(e.lang??Q(e.name))==="text"}function tr(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}let us=-1;var fs=class{options;onRenderUpdate;workerManager;__id=`file-renderer:${++us}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;constructor(e={theme:_},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Ge(e.theme??_)?Ki():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0}clearRenderCache(){this.renderCache=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e),n=Pt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let i=this.workerManager?.getFileResultCache(e);i!=null&&!Oe(t,i.options)&&(i=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!Qt(e),result:n?void 0:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??Q(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:i=_,tokenizeMaxLineLength:r=1e3}=this.options;return{theme:i,useTokenTransformer:tr(this.options),tokenizeMaxLineLength:r}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!ae(e,n.file)||!Oe(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,St(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:St(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=Ae){if(e==null)return;let{options:n,forceHighlight:i}=this.getRenderOptions(e);const r=this.getMatchingWorkerResultCache(e,n);r!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...r},i=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const o=this.getOrCreateLineCache(e),s=e.contents.length>0,l=!s||Qt(e)||Pt(o.length,this.getTokenizeMaxLength()),a=!ae(e,this.renderCache.file),d=!Lt(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(l||this.renderCache.result==null||!this.renderCache.highlighted&&(a||d))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||a||d||i)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,o)),this.renderCache.renderRange=t),!l&&s&&(!this.renderCache.highlighted||i)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??Q(e.name);const h=this.highlighter!=null&&Ge(n.theme),c=this.highlighter!=null&&mt(this.computedLang),u=!l&&c;if(this.highlighter!=null&&h&&(i||l||!this.renderCache.highlighted&&u||this.renderCache.result==null)){const{result:f,options:g}=this.renderFileWithHighlighter(e,this.highlighter,l||!c);this.renderCache={file:e,options:g,highlighted:u,result:f,renderRange:void 0}}(!h||!l&&!c)&&this.asyncHighlight(e).then(({result:f,options:g})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,f,g,!l)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=Ae){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=Pt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Q(e.name);const n=this.highlighter!=null&&Go(cn(this.options.theme)),i=t||this.highlighter!=null&&mt(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e);return{result:hs(e,t,i,{forcePlainText:n}),options:i}}processFileResult(e,t,{code:n,themeStyles:i,baseThemeType:r}){const{disableFileHeader:o=!1}=this.options,s=[],l=Ee(),a=this.getOrCreateLineCache(e);let d=0;const h=kt(t)?Xt(this.lineAnnotations):void 0;return h!=null&&(l.children.push(j("context","annotation",1)),s.push(qt({hunkIndex:-1,lineIndex:-1,annotations:h.map(c=>ge(c))})),d++),Ct({lines:a,startingLine:t.startingLine,totalLines:t.totalLines,callback:({lineIndex:c,lineNumber:u})=>{const f=n[c];if(f==null){const g="FileRenderer.processFileResult: Line doesnt exist";throw console.error(g,{name:e.name,lineIndex:c,lineNumber:u,lines:a}),new Error(g)}if(f!=null){l.children.push(Di("context",u,`${c}`)),s.push(f),d++;const g=this.lineAnnotations[u];g!=null&&(l.children.push(j("context","annotation",1)),s.push(qt({hunkIndex:0,lineIndex:u,annotations:g.map(b=>ge(b))})),d++)}}}),l.properties.style=`grid-row: span ${d}`,{gutterAST:l.children??[],contentAST:s,preAST:this.createPreElement(a.length),headerAST:o?void 0:this.renderHeader(e),totalLines:a.length,rowCount:d,themeStyles:i,baseThemeType:r,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return Yi({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return pe(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(A({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=Ee();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,er(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return t?pe(A({tagName:"code",children:e,properties:{"data-code":""}})):pe(e)}async initializeHighlighter(){return this.highlighter=await xt(un(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n,i=!0){if(this.renderCache==null)return;const r=!ae(e,this.renderCache.file)||!this.renderCache.highlighted||!Oe(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:i,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!Oe(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&ae(e,n.file)&&Oe(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return Xi({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function Pt(e,t){return e>t}const nr=`
+`:`
+`)+`
+
    +`}function z8e(){return`
+
+`}function R8e(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),`
  • `}function O8e(){return`
  • +`}function P8e(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),` ↩︎`}function j8e(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=B8e,e.renderer.rules.footnote_block_open=$8e,e.renderer.rules.footnote_block_close=z8e,e.renderer.rules.footnote_open=R8e,e.renderer.rules.footnote_close=O8e,e.renderer.rules.footnote_anchor=P8e,e.renderer.rules.footnote_caption=D8e,e.renderer.rules.footnote_anchor_name=F8e;function i(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 y=l.bMarks[a],b=l.tShift[a],A=l.sCount[a],w=l.parentType,k=h,x=l.sCount[a]+h-(l.bMarks[a]+l.tShift[a]);let _=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 o(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 w=0;w?@[\]^_`{|}~-])/g;function U8e(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==94||t||i+2>=n)return!1;e.pos=i+1;let s=!1;for(;e.pos{t.exports=function(m,y){y=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},y),m.core.ruler.after("inline","github-task-lists",function(b){for(var A=b.tokens,w=0,k=2;k=0;A--)if(m[A].level===b)return A;return-1}function s(m,y){return d(m[y])&&f(m[y-1])&&h(m[y-2])&&g(m[y])}function o(m,y,b,A){var w=b.idPrefix+y;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(w,A)),m.children.push(a(A)),m.children.unshift(r(m,w,b,A)),b.divWrap&&(m.children.unshift(u(b,A)),m.children.push(c(A)))}function r(m,y,b,A){var w=new A("checkbox_input","input",0);return w.attrs=[["type","checkbox"],["id",y]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&w.attrs.push(["checked","true"]),b.disabled===!0&&w.attrs.push(["disabled","true"]),w}function l(m,y){var b=new y("label_open","label",1);return b.attrs=[["for",m]],b}function a(m){return new m("label_close","label",-1)}function u(m,y){var b=new y("checkbox_open","div",0);return b.attrs=[["class",m.divClass]],b}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)}})});const Z8e=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]]);function G8e(e){return e>=55296&&e<=57343||e>1114111?65533:Z8e.get(e)??e}function Q8e(e){const t=atob(e),n=t.length&-2,i=new Uint16Array(n/2);for(let s=0,o=0;s=fs.ZERO&&e<=fs.NINE}function J8e(e){return e>=fs.UPPER_A&&e<=fs.UPPER_F||e>=fs.LOWER_A&&e<=fs.LOWER_F}function X8e(e){return e>=fs.UPPER_A&&e<=fs.UPPER_Z||e>=fs.LOWER_A&&e<=fs.LOWER_Z||p8(e)}function e5e(e){return e===fs.EQUALS||X8e(e)}var ho;(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"})(ho||(ho={}));var tc;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(tc||(tc={}));var t5e=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=ho.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=tc.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=ho.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case ho.EntityStart:return e.charCodeAt(t)===fs.NUM?(this.state=ho.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ho.NamedEntity,this.stateNamedEntity(e,t));case ho.NumericStart:return this.stateNumericStart(e,t);case ho.NumericDecimal:return this.stateNumericDecimal(e,t);case ho.NumericHex:return this.stateNumericHex(e,t);case ho.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|q_)===fs.LOWER_X?(this.state=ho.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ho.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t>14;for(;t>7;if(this.runConsumed===0){const l=i&rr.JUMP_TABLE;if(e.charCodeAt(t)!==l)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed=e.length)return-1;const l=this.runConsumed-1,a=n[this.treeIndex+1+(l>>1)],u=l%2===0?a&255:a>>8&255;if(e.charCodeAt(t)!==u)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(r>>1),i=n[this.treeIndex],s=(i&rr.VALUE_LENGTH)>>14}if(t>=e.length)break;const o=e.charCodeAt(t);if(o===fs.SEMI&&s!==0&&(i&rr.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=i5e(n,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===tc.Attribute&&(s===0||e5e(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],s=(i&rr.VALUE_LENGTH)>>14,s!==0){if(o===fs.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==tc.Strict&&(i&rr.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){const{result:e,decodeTree:t}=this,n=(t[e]&rr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:i}=this;return this.emitCodePoint(t===1?i[e]&~(rr.VALUE_LENGTH|rr.FLAG13):i[e+1],n),t===3&&this.emitCodePoint(i[e+2],n),n}end(){switch(this.state){case ho.NamedEntity:return this.result!==0&&(this.decodeMode!==tc.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ho.NumericDecimal:return this.emitNumericEntity(0,2);case ho.NumericHex:return this.emitNumericEntity(0,3);case ho.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ho.EntityStart:return 0}}};function n5e(e){let t="";const n=new t5e(e,i=>t+=String.fromCodePoint(i));return function(s,o){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(o);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 i5e(e,t,n,i){const s=(t&rr.BRANCH_LENGTH)>>7,o=t&rr.JUMP_TABLE;if(s===0)return o!==0&&i===o?n:-1;if(o){const u=i-o;return u<0||u>=s?-1:e[n+u]-1}const r=s+1>>1;let l=0,a=s-1;for(;l<=a;){const u=l+a>>>1,c=e[n+(u>>1)]>>(u&1)*8&255;if(ci)a=u-1;else return e[n+r+u]}return-1}const s5e=n5e(Y8e);function V6(e,t=tc.Legacy){return s5e(e,t)}var o5e=gz(V8e());const U_={};function r5e(e){let t=U_[e];if(t)return t;t=U_[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),o+=6;continue}}if((l&248)===240&&o+91114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}s+="�"}return s})}p9.defaultChars=";/?:@&=+$,#";p9.componentChars="";var g8=p9;const K_={};function l5e(e){let t=K_[e];if(t)return t;t=K_[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const i=l5e(t);let s="";for(let o=0,r=e.length;o=55296&&l<=57343){if(l>=55296&&l<=56319&&o+1=56320&&a<=57343){s+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[o])}return s}g9.defaultChars=";/?:@&=+$,-_.!~*'()#";g9.componentChars="-_.!~*'()";var mz=g9;function Z6(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 R2(){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 a5e=/^([a-z0-9.+-]+:)/i,u5e=/:[0-9]*$/,c5e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d5e=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` +`," "]),f5e=["'"].concat(d5e),V_=["%","/","?",";","#"].concat(f5e),Z_=["/","?","#"],h5e=255,G_=/^[+a-z0-9A-Z_-]{0,63}$/,p5e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Q_={javascript:!0,"javascript:":!0},Y_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function g5e(e,t){if(e&&e instanceof R2)return e;const n=new R2;return n.parse(e,t),n}R2.prototype.parse=function(e,t){let n,i,s,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=c5e.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=a5e.exec(o);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,o=o.substr(r.length)),(t||r||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=o.substr(0,2)==="//",s&&!(r&&Q_[r])&&(o=o.substr(2),this.slashes=!0)),!Q_[r]&&(s||r&&!Y_[r])){let u=-1;for(let g=0;g127?A+="x":A+=b[w];if(!A.match(G_)){const w=g.slice(0,m),k=g.slice(m+1),x=b.match(p5e);x&&(w.push(x[1]),k.unshift(x[2])),k.length&&(o=k.join(".")+o),this.hostname=w.join(".");break}}}}this.hostname.length>h5e&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=o.indexOf("#");l!==-1&&(this.hash=o.substr(l),o=o.slice(0,l));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),Y_[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};R2.prototype.parseHost=function(e){let t=u5e.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 G6=g5e,vz=L8e({decode:()=>g8,encode:()=>mz,format:()=>Z6,parse:()=>G6}),m5e=Object.defineProperty,yz=e=>{let t={};for(var n in e)m5e(t,n,{get:e[n],enumerable:!0});return t},so=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,i=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}`}},v5e=yz({arrayReplaceAt:()=>x5e,assign:()=>C5e,countLines:()=>Cs,escapeHtml:()=>F5e,escapeRE:()=>B5e,fromCodePoint:()=>x0,has:()=>A5e,isMdAsciiPunct:()=>j2,isPunctChar:()=>P2,isPunctCode:()=>m8,isSpace:()=>w5e,isString:()=>k5e,isValidEntityCode:()=>v9,isWhiteSpace:()=>w0,lib:()=>$5e,mdurl:()=>vz,normalizeReference:()=>m9,ucmicro:()=>O2,unescapeAll:()=>S0,unescapeMd:()=>I5e});const O2={Any:/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cc:/[\0-\x1F\x7F-\x9F]/,Cf:/[\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]/,P:/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,S:/[\$\+<->\^`\|~\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]/,Z:/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/};function y5e(e){return Object.prototype.toString.call(e)}function k5e(e){return y5e(e)==="[object String]"}const b5e=Object.prototype.hasOwnProperty;function A5e(e,t){return b5e.call(e,t)}function C5e(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(i=>{e[i]=n[i]})}}),e}function w5e(e){return e===9||e===32}function w0(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 P2(e){return O2.P.test(e)||O2.S.test(e)}const J_=new Map;function m8(e){if(j2(e))return!0;if(e>=0&&e<128)return!1;const t=J_.get(e);if(t!==void 0)return t;const n=P2(String.fromCharCode(e));return J_.set(e,n),n}function j2(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 m9(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function x5e(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function v9(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 x0(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 kz=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,S5e=new RegExp(`${kz.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),_5e=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function M5e(e,t){if(t.charCodeAt(0)===35&&_5e.test(t)){const i=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return v9(i)?x0(i):e}const n=V6(e);return n!==e?n:e}function I5e(e){return e.includes("\\")?e.replace(kz,"$1"):e}function S0(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(S5e,(t,n,i)=>n||M5e(t,i))}const E5e=/[&<>"]/,T5e=/[&<>"]/g,L5e={"&":"&","<":"<",">":">",'"':"""};function N5e(e){return L5e[e]}function F5e(e){return E5e.test(e)?e.replace(T5e,N5e):e}const D5e=/[.?*+^$[\]\\(){}|-]/g;function B5e(e){return e.replace(D5e,"\\$&")}const $5e={mdurl:vz,ucmicro:O2};function Cs(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` +`,n+1))!==-1;)t++;return t}const z5e=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,R5e=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,O5e=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,Q6=["references","footnotes","abbreviations","abbr","abbrs"],Y6=Symbol.for("markdown-it-ts.global-state"),J6=Object.prototype.hasOwnProperty;function X_(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function Yl(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function dc(e){if(Array.isArray(e))return e.map(t=>dc(t));if(Yl(e)){const t={};for(const n of Object.keys(e))t[n]=dc(e[n]);return t}return e}function H2(e){return Array.isArray(e)?e.map((t,n)=>String(n)):Yl(e)?Object.keys(e):[]}function v8(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;no.has(r)?!v8(s[r],bz(i.value,r)):!0)}}function bu(e){const t=X6(e);if(t){for(const n of Q6){const i=t.snapshot[n];if(!i){delete e[n];continue}if(i.ownedKeys){j5e(e,n,i);continue}i.existed?e[n]=P5e(e[n],i.value):delete e[n]}delete e[Y6]}}function wk(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 y8=Symbol.for("markdown-it-ts.diagnostics");function rg(e,t){if(e)try{const n=e[y8];if(n&&typeof n=="object")return n;if(!t)return;const i={};return e[y8]=i,i}catch{return}}function tu(e){return rg(e,!1)}function W5e(e){if(e)try{const t=e[y8];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function ar(e){W5e(e)}function O1(e,t){const n=rg(e,!0);n&&(n.stockFast=t)}function Ps(e,t){const n=rg(e,!0);n&&(n.strategy=t)}function xk(e,t){const n=rg(e,!0);n&&(n.chunk=t)}function Az(e,t){const n=rg(e,!0);n&&(n.unbounded=t)}const q5e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,U5e=/[\0-\x1F\x7F-\x9F]/,K5e=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\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[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\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\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,V5e=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var Z5e=class{src_Any=q5e.source;src_Cc=U5e.source;src_Z=V5e.source;src_P=K5e.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),s=this.escapeRE(t),o=`(?:(?!${this.src_ZCc}|${i}|${s}).)`;let r=`${i}${o}{0,1000}${s}`;for(let l=2;l<=n;l++)r=`${i}(?:${o}|${r}){0,1000}${s}`;return r}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},Sk={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},G5e={"http:":Sk,"https:":Sk,"ftp:":Sk,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const s=i.exec(e);return s?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:s[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},Q5e="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|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",Y5e="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function J5e(){const e=Y5e.split("|");return Q5e.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const s of t.slice(n+1))e.push(i+s)}),e}var X5e={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:J5e(),urlAuth:!1,maxLength:1e4},eM=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,i){const s=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=s,this.text=s,this.url=s}},Cz=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:t,...n}=e;this.__opts__={...X5e,...n},this.__schemas__={...G5e},this.re=t||new Z5e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,s)=>s.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const o=e.slice(Math.max(0,t.index-65),t.index);if(s.test(o))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,s,o,r,l,a,u=!1,c=!1,d=!1,f=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,o=this.re.get_mail_name_validator());;){const h=Math.max(f-1,0);if(s&&o&&!d&&(!l||l.index=f)break;s.lastIndex=f)break;i.lastIndexg.lastIndex))&&(g=r);let m;if(!u)for(;;){if(!a){n.lastIndexg.index)break;const A=a;a=void 0;const w=this.testSchemaAt(e,A.schema,A.lastIndex);if(w){m={schema:A.schema,index:A.index,lastIndex:A.lastIndex+w};break}}let y=m;if((!y||l&&(l.indexy.lastIndex))&&(y=l),(!y||r&&(r.indexy.lastIndex))&&(y=r),!y)break;y===l?l=void 0:y===r&&(r=void 0);const b=new eM(e,y.schema,y.index,y.lastIndex);b.schema?this.__schemas__[b.schema].normalize(b,this):this.normalize(b),t.push(b),f=y.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new eM(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}},e6e=pz({"../../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.js":((e,t)=>{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,y=Math.floor,b=String.fromCharCode;function A(O){throw new RangeError(g[O])}function w(O,R){const q=[];let j=O.length;for(;j--;)q[j]=R(O[j]);return q}function k(O,R){const q=O.split("@");let j="";q.length>1&&(j=q[0]+"@",O=q[1]),O=O.replace(h,".");const H=w(O.split("."),R).join(".");return j+H}function x(O){const R=[];let q=0;const j=O.length;for(;q=55296&&H<=56319&&qString.fromCodePoint(...O),S=function(O){return O>=48&&O<58?26+(O-48):O>=65&&O<91?O-65:O>=97&&O<123?O-97:36},M=function(O,R){return O+22+75*(O<26)-((R!=0)<<5)},I=function(O,R,q){let j=0;for(O=q?y(O/700):O>>1,O+=y(O/R);O>m*26>>1;j+=36)O=y(O/m);return y(j+(m+1)*O/(O+38))},L=function(O){const R=[],q=O.length;let j=0,H=128,z=72,W=O.lastIndexOf("-");W<0&&(W=0);for(let X=0;X=128&&A("not-basic"),R.push(O.charCodeAt(X));for(let X=W>0?W+1:0;X=q&&A("invalid-input");const se=S(O.charCodeAt(X++));se>=36&&A("invalid-input"),se>y((2147483647-j)/le)&&A("overflow"),j+=se*le;const ie=Z<=z?1:Z>=z+26?26:Z-z;if(sey(2147483647/he)&&A("overflow"),le*=he}const ne=R.length+1;z=I(j-U,ne,U==0),y(j/ne)>2147483647-H&&A("overflow"),H+=y(j/ne),j%=ne,R.splice(j++,0,H)}return String.fromCodePoint(...R)},N=function(O){const R=[];O=x(O);const q=O.length;let j=128,H=0,z=72;for(const U of O)U<128&&R.push(b(U));const W=R.length;let X=W;for(W&&R.push("-");X=j&&ley((2147483647-H)/ne)&&A("overflow"),H+=(U-j)*ne,j=U;for(const le of O)if(le2147483647&&A("overflow"),le===j){let Z=H;for(let se=36;;se+=36){const ie=se<=z?1:se>=z+26?26:se-z;if(Z32))return o;if(i===41){if(r===0)break;r--}s++}return t===s||r!==0||(o.str=S0(e.slice(t,s)),o.pos=s,o.ok=!0),o}var xz=nA;const yv=-2;function t6e(e,t,n,i){let s=1,o=t+1;for(;o=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=t6e(l,t,a,n);if(f!==yv)return f;for(e.pos=t+1;e.pos=n)return r;let l=e.charCodeAt(o);if(l!==34&&l!==39&&l!==40)return r;t++,o++,l===40&&(l=41),r.marker=l}for(;o=0?e.attrs[n][1]:null}function s6e(e,t,n){const i=y9(e,t);i<0?oA(e,[t,n]):e.attrs[i][1]=`${e.attrs[i][1]} ${n}`}var o6e=yz({attrGet:()=>i6e,attrIndex:()=>y9,attrJoin:()=>s6e,attrPush:()=>oA,attrSet:()=>n6e,parseLinkDestination:()=>nA,parseLinkLabel:()=>iA,parseLinkTitle:()=>sA});function r6e(e){return e.includes("\r")||e.includes("\0")}function _z(e){return typeof e=="string"?e:e.toString()}function l6e(e){if(e.inlineMode){const t=new so("inline","",0);t.content=_z(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 a6e=/^([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])?)*)$/,u6e=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function c6e(e,t){let n=e.pos;const i=e.src;if(i.charCodeAt(n)!==60)return!1;const s=n,o=e.posMax;for(;;){if(++n>=o)return!1;const l=i.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=i.slice(s+1,n);if(u6e.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(a6e.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 Mz=c6e;function d6e(e,t){const n=e.src;let i=e.pos;if(n.charCodeAt(i)!==96)return!1;const s=i;i++;const o=e.posMax;for(;i2&&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 Iz=d6e;function tM(e){const t={},n=e.length;if(!n)return;let i=0,s=-2;const o=[];for(let r=0;ra;u-=o[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?o[u-1]+1:0;o[r]=r-u+h,o[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 f6e(e){const t=e.tokens_meta,n=e.tokens_meta.length;tM(e.delimiters);for(let i=0;i=0;s--){const o=t[s],r=o.marker;if(r!==95&&r!==42||o.end===-1)continue;const l=t[o.end],a=o.token,u=l.token,c=s>0&&t[s-1].end===o.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[o.end+1].token===u+1,d=r===42?Ez:Tz,f=i[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=i[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&&(i[t[s-1].token].content="",i[t[o.end+1].token].content="",s--)}}function g6e(e){const t=e.tokens_meta,n=e.tokens_meta.length;nM(e,e.delimiters);for(let i=0;i=48&&e<=57}function m6e(e){const t=e|32;return rA(e)||t>=97&&t<=102}function Nz(e){const t=e|32;return t>=97&&t<=122}function v6e(e){return Nz(e)||rA(e)}function y6e(e,t,n){let i=t+2;if(i>=n)return null;let s=!1,o=7,r=i;for((e.charCodeAt(i)|32)===120&&(s=!0,o=6,i++,r=i);i=n||e.charCodeAt(i)!==59?null:e.slice(t,i+1)}function k6e(e,t,n){let i=t+1;if(i>=n||!Nz(e.charCodeAt(i)))return null;for(i++;i=n||e.charCodeAt(i)!==59)return null;const s=e.slice(t,i+1);return Lz(s)!==s?s:null}function b6e(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const s=y6e(e.src,n,i);if(s){if(!t){const o=(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=v9(o)?x0(o):x0(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=k6e(e.src,n,i);if(s){const o=Lz(s);if(!t){const r=e.push("text_special","",0);r.content=o,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var Fz=b6e;const Dz=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),b8=new Array(128),Bz=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);b8[e]=`\\${t}`,Bz[e]=Dz[e]?t:b8[e]}function iM(e,t,n){e.pending&&e.pushPending();const i=new so("text_special","",0);i.level=e.level,i.content=t,i.markup=n,i.info="escape",e.pendingLevel=e.level,e.tokens.push(i),e.tokens_meta.push(null)}function A6e(e,t){let n=e.pos;const i=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=i))return!1;let o=s.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(o>=55296&&o<=56319&&n+1=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return iM(e,o<256&&Dz[o]?r:l,l),e.pos=n+1,!0}var $z=A6e;function C6e(e){let t,n,i=0;const s=e.tokens,o=e.tokens.length;for(t=n=0;t0&&i++,r.type==="text"&&t+1\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,Rz="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",x6e=new RegExp(`^(?:${zz}|${Rz}||<\\?[\\s\\S]*?\\?>|]*>|)`),S6e=new RegExp(`^(?:${zz}|${Rz})`);function Oz(e){return e===32||e===9||e===10||e===12||e===13}function _6e(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||Oz(t)}function M6e(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 E6e(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos,s=e.src;if(s.charCodeAt(i)!==60||i+2>=n)return!1;const o=s.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!I6e(o))return!1;const r=s.slice(i).match(x6e);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,_6e(l)&&e.linkLevel++,M6e(l)&&e.linkLevel--}return e.pos+=l.length,!0}var Pz=E6e;function T6e(e,t){let n,i,s,o,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=W2(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o=f)return!1;if(l=xz(e.src,o,e.posMax),l.ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?o=l.pos:c="",u=o;o=f||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?s=e.src.slice(u,o++):o=g+1):o=g+1,s||(s=e.src.slice(h,g)),r=e.env.references[m9(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){i=e.src.slice(h,g);const m=[];e.md.inline.parse(i,e.md,e.env,m);const y=e.push("image","img",0);y.attrs=[["src",c],["alt",""]],y.children=m,y.content=i,a&&y.attrs.push(["title",a])}return e.pos=o,e.posMax=f,!0}var jz=T6e;function _k(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(o,r)),l=g+1):d=n.slice(o,r)}else d=n.slice(o,r);const f=e.env.references[m9(d)];if(!f)return e.pos=i,!1;a=f.href,u=f.title}if(!t){e.pos=o,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 Hz=L6e;function Wz(e){const t=e|32;return t>=97&&t<=122}function N6e(e){return e>=48&&e<=57}function F6e(e){return Wz(e)||N6e(e)||e===43||e===45||e===46}function D6e(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&F6e(e.charCodeAt(t));)t--;return t++,t>=e.length||!Wz(e.charCodeAt(t))?null:e.slice(t)}function B6e(e,t,n){let i=t;for(;i0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=D6e(e.pending);if(!s)return!1;const o=B6e(e.src,n-s.length,i),r=e.md.linkify.matchAtStart(o);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 $6e(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,s=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),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||oM(n.charCodeAt(i)))return!1;let o=i+1;for(;oi-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function j6e(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 Vz(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,i={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:lA(),records:Object.create(null)};return t.__mdtsRuleProfile=i,i}function Lh(e,t,n,i,s,o){const r=Vz(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=j6e(t,n));a.calls++,a.inclusiveMs+=i,i>a.maxMs&&(a.maxMs=i),a.samples.push(i),o?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=lA()}function H6e(e){const t=Vz(e);if(!t)return null;const n=Object.keys(t.records);for(let i=0;is.name===e);i>=0&&this.rules.splice(i,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const i=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(i<0)return;const s=this.rules[i];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(i<0)throw new Error(`Parser rule not found: ${e}`);this.rules[i].fn=t,n?.alt!==void 0&&(this.rules[i].alt=n.alt),this.invalidateCache()}before(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.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 i of this.rules)if(i.enabled&&i.alt)for(const s of i.alt)e.add(s);const t=new Map,n=new Map;for(const i of e){const s=[],o=[];for(const r of this.rules)r.enabled&&(i!==""&&!r.alt?.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t.set(i,s),n.set(i,o)}this.cache=t,this.namedCache=n}},Zz=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,i){this.src=e,this.md=t,this.env=n,this.tokens=i,this.tokens_meta=new Array(i.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 so("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 so(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 i=new so(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.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(i),this.tokens_meta.push(s),i}scanDelims(e,t){const{src:n,posMax:i}=this,s=n.charCodeAt(e);let o=e;for(;o0?n.charCodeAt(e-1):32,a=o@[\]\\^_`{}~]/;function lM(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return Uz(e,t);case 33:return jz(e,t);case 38:return Fz(e,t);case 42:case 95:return k8.tokenize(e,t);case 58:return e.md.options.linkify&&qz(e,t);case 60:return Mz(e,t)||Pz(e,t);case 91:return Hz(e,t);case 92:return $z(e,t);case 96:return Iz(e,t);case 126:return A8.tokenize(e,t);default:return Kz(e,t)}}function Gz(e){return!W6e.test(e)}var q6e=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new rM,this.ruler2=new rM,this.ruler.push("text",Kz),this.ruler.push("linkify",qz),this.ruler.push("newline",Uz),this.ruler.push("escape",$z),this.ruler.push("backticks",Iz),this.ruler.push("strikethrough",A8.tokenize),this.ruler.push("emphasis",k8.tokenize),this.ruler.push("link",Hz),this.ruler.push("image",jz),this.ruler.push("autolink",Mz),this.ruler.push("html_inline",Pz),this.ruler.push("entity",Fz),this.ruler2.push("balance_pairs",h6e),this.ruler2.push("strikethrough",A8.postProcess),this.ruler2.push("emphasis",k8.postProcess),this.ruler2.push("fragments_join",w6e),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),i=n.length,s=e.cache,o=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(o!==void 0){e.pos=o;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=lM(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,i=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const o=this.isDefaultRuleset();for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=i)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>=i)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,i){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&Gz(e)){const a=new so("text","",0);a.content=e,i.push(a);return}const s=new Zz(e,t,n,i);this.tokenize(s);const o=this.getRules2(),r=o.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a0&&Gz(o.content)){const r=new so("text","",0);r.content=o.content,o.children.push(r);continue}e.md.inline.parse(o.content,e.md,e.env,o.children)}}}const K6e=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,V6e=/[0-9a-z]/i;function Z6e(e){return/^\s]/i.test(e)}function G6e(e){return/^<\/a\s*>/i.test(e)}function Q6e(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"&&(Z6e(l.content)&&o>0&&o--,G6e(l.content)&&o++),o>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let u=(e.md.linkify.match(a)||[]).map(h=>Q6e(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 so("text","",0);x.content=a.slice(f,b),x.level=d,c.push(x)}const A=new so("link_open","a",1);A.attrs=[["href",m]],A.level=d++,A.markup="linkify",A.info="auto",c.push(A);const w=new so("text","",0);w.content=y,w.level=d,c.push(w);const k=new so("link_close","a",-1);k.level=--d,k.markup="linkify",k.info="auto",c.push(k),f=g.lastIndex}if(f!==0){if(f=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(nAe,sAe)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function rAe(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&Qz.test(i.content)&&(i.content=i.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–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function lAe(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 i=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");tAe.test(i)&&oAe(n.children||[]),Qz.test(i)&&rAe(n.children||[])}}var aAe=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(i=>i.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(i=>i.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 i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.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 uAe=/['"]/,aM=/['"]/g,uM="’";function Lm(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function cAe(e,t){let n;const i=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let o=0;o=0&&!(i[n].level<=l);n--);if(i.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=o-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 y=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=b,h=A),!f&&!h){g&&(r.content=Lm(r.content,d.index,uM));continue}if(h)for(n=i.length-1;n>=0;n--){let x=i[n];if(i[n].level=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const i=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!uAe.test(i)||!n.children||cAe(n.children,e)}}function fAe(e){const t=e.tokens||[],n=t.length;for(let i=0;i=4||s.charCodeAt(c)!==62)return!1;if(i)return!0;const h=[],g=[],m=[],y=[],b=e.md.block.ruler.getRulesForState(e,"blockquote"),A=e.parentType;e.parentType="blockquote";let w=!1,k;for(k=t;k=d)break;if(s.charCodeAt(c++)===62&&!I){let N=a[k]+1,T,D;s.charCodeAt(c)===32?(c++,N++,D=!1,T=!0):s.charCodeAt(c)===9?(T=!0,(u[k]+N)%4===3?(c++,N++,D=!1):D=!0):T=!1;let P=N;for(h.push(o[k]),o[k]=c;c=d,g.push(u[k]),u[k]=a[k]+1+(T?1:0),m.push(a[k]),a[k]=P-N,y.push(l[k]),l[k]=c-o[k];continue}if(w)break;let L=!1;for(let N=0,T=b.length;N";const S=[t,0];_.map=S,e.md.block.tokenize(e,t,k);const M=e.push("blockquote_close","blockquote",-1);M.markup=">",e.lineMax=f,e.parentType=A,S[1]=e.line;for(let I=0;I=4){i++,s=i;continue}break}e.line=s;const o=e.push("code_block","code",0);return o.content=`${e.getLines(t,s,4+e.blkIndent,!1)} +`,o.map=[t,e.line],!0}function yAe(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>o)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,o);if(r===96&&c.includes(String.fromCharCode(r)))return!1;if(i)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],o=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&&fM(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const h=e.push("heading_open",cM[d],1);h.markup=dM[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",cM[d],-1);return m.markup=dM[d],!0}function bAe(e){switch(e){case 9:case 32:return!0}return!1}function AAe(e,t,n,i){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(o++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;o|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp(`^|$))`,"i"),/^$/,!0],[new RegExp(`${S6e.source}\\s*$`),/^$/,!1]];function CAe(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=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,o),l=0;for(;l=48&&e<=57}var tR=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,i){this.src=e,this.md=t,this.env=n,this.tokens=i;const s=this.src;let o=0,r=0,l=0,a=!1,u=0;for(let c=0,d=s.length;c0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,i=this.eMarks;for(let s=this.lineMax;et;){const i=n.charCodeAt(--e);if(i!==9&&i!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let i=n.length;en;)if(t!==i.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";if(e+1===t){const c=e,d=this.bMarks[c];let f=d;const h=i?this.eMarks[c]+1:this.eMarks[c];let g=0;const m=this.src,y=this.bsCount,b=this.tShift;for(;fn?new Array(g-n+1).join(" ")+m.slice(f,h):m.slice(f,h)}const s=new Array(t-e),o=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(" ")+o.slice(g,m):s[c]=o.slice(g,m)}return s.join("")}};tR.prototype.Token=so;function xAe(e,t,n){for(let i=t;i=s)return!1;const o=n.charCodeAt(i);switch(o){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return o>=48&&o<=57?!0:xAe(n,i,s)}const pM=["","h1","h2"];function SAe(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,u=e.blkIndent,c=nR(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(k),h===45||h===61)){let S=k+1,M=S;for(;S=x){f=h===61?1:2;break}if(M-k>1)continue}if(a[g]<0||c&&!iR(e,g,s,k,x))continue;let _=!1;for(let S=0,M=i.length;Sk;){const _=s.charCodeAt(x-1);if(_!==9&&_!==32)break;x--}m=s.slice(k,x)}else m=e.getLines(t,g,u,!1).trim();e.line=g+1;const y=h===61?"=":"-",b=e.push("heading_open",pM[f],1);b.markup=y,b.map=[t,e.line];const A=e.push("inline","",0);A.content=m,A.map=[t,e.line-1],A.children=[];const w=e.push("heading_close",pM[f],-1);return w.markup=y,e.parentType=d,!0}function sR(e){switch(e){case 9:case 32:return!0}return!1}function gM(e,t){const n=e.eMarks,i=e.bMarks,s=e.tShift,o=e.src,r=n[t];let l=i[t]+s[t];const a=o.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l=l)return-1;let u=o.charCodeAt(a++);if(u<48||u>57)return-1;for(;;){if(a>=l)return-1;if(u=o.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,y=e.eMarks,b=e.sCount,A=e.bsCount,w=g[l]+m[l];if(w>=y[l])return!1;const k=h.charCodeAt(w);if(k>=48&&k<=57){if(f=mM(e,l),f<0||(c=!0,r=w,d=_Ae(e,l,f),u&&d!==1))return!1}else if(k===42||k===45||k===43){if(f=gM(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=y[l])return!1;if(i)return!0;const x=h.charCodeAt(f-1),_=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 S=[l,0];e.tokens[e.tokens.length-1].map=S,e.tokens[e.tokens.length-1].markup=_;let M=!1;const I=e.tokens.length-1,L=e.md.block.ruler.getRulesForState(e,"list"),N=e.parentType;for(e.parentType="list";l=s?O=1:O=D-T,O>4&&(O=1);const R=T+O,q=e.push("list_item_open","li",1);q.markup=_;const j=[l,0];q.map=j,c&&(q.info=f-r-1===1?MAe[h.charCodeAt(r)-48]:h.slice(r,f-1));const H=e.tight,z=e.tShift[l],W=e.sCount[l],X=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=P-g[l],e.sCount[l]=D,P>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||M)&&(a=!1),M=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=X,e.tShift[l]=z,e.sCount[l]=W,e.tight=H,e.push("list_item_close","li",-1).markup=_,l=e.line,j[1]=l,l>=n||e.sCount[l]=4)break;let U=!1;for(let ne=0,le=L.length;ne3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const w=r[f]+l[f],k=a[f];if(w=k||vM(o.charCodeAt(w+1)))break}else if(x>=48&&x<=57&&w+1=k){_=-1;break}const S=o.charCodeAt(_++);if(S>=48&&S<=57){if(_-w>=10){_=-1;break}continue}if((S===41||S===46)&&(_>=k||vM(o.charCodeAt(_))))break;_=-1;break}if(_>=0)break}}}const y=r[f]+l[f],b=a[f];if(d&&!iR(e,f,o,y,b))continue;let A=!1;for(let w=0,k=i.length;w=4||e.src.charCodeAt(s)!==91)return!1;function a(w){const k=e.lineMax;if(w>=k||e.isEmpty(w))return null;let x=!1;if(e.sCount[w]-e.blkIndent>3&&(x=!0),e.sCount[w]<0&&(x=!0),!x){const M=e.parentType;e.parentType="reference";let I=!1;for(let L=0,N=l.length;L"u"&&(e.env.references={}),typeof e.env.references[A]>"u"&&(e.env.references[A]={title:b,href:f}),e.line=r),!0):!1}function Mk(e){switch(e){case 9:case 32:return!0}return!1}const NAe=65536;function Ik(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function FAe(e,t){if(e.lineFlags)return(e.lineFlags[t]&Fp.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];nn)return!1;let s=t+1;if(e.sCount[s]=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;const r=e.src.charCodeAt(o++);if(r!==124&&r!==45&&r!==58||o>=e.eMarks[s])return!1;const l=e.src.charCodeAt(o++);if(l!==124&&l!==45&&l!==58&&!Mk(l)||r===45&&Mk(l)||!FAe(e,t))return!1;for(;o=4)return!1;u=yM(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(i)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 y=e.push("thead_open","thead",1);y.map=[t,t+1];const b=e.push("tr_open","tr",1);b.map=[t,t+1];for(let k=0;k=4||(u=yM(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),w+=d-u.length,w>NAe))break;if(s===t+2){const _=e.push("tbody_open","tbody",1);_.map=A=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let _=0;_r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:i?.alt||[]}),this.invalidateCache()}after(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:i?.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:i,fn:s})=>(o,r,l,a)=>{const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),c=s(o,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return Lh(o?.env,"block",i,d-u,c,!!a),c}):this.getRules(t)}at(e,t,n){const i=this._rules.findIndex(s=>s.name===e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[i].fn=t,n?.alt&&(this._rules[i].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this._rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const i of this._rules)if(i.enabled)for(const s of i.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const i of e){const s=[],o=[];for(const r of this._rules)r.enabled&&(i!==""&&!r.alt.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t[i]=s,n[i]=o}this.cache=t,this.namedCache=n}};const Fm=[["table",DAe,["paragraph","reference"]],["code",vAe],["fence",yAe,["paragraph","reference","blockquote","list"]],["blockquote",mAe,["paragraph","reference","blockquote","list"]],["hr",AAe,["paragraph","reference","blockquote","list"]],["list",EAe,["paragraph","reference","blockquote"]],["reference",LAe],["html_block",CAe,["paragraph","reference","blockquote"]],["heading",kAe,["paragraph","reference","blockquote"]],["lheading",SAe],["paragraph",TAe]];var $Ae=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new BAe;for(let e=0;e=a[c];)c++;if(e.line=c,c>=n||u[c]=o){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]=o){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,i){if(!e||e.length===0)return;const s=new tR(e,t,n,i);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}},oR=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}};oR.prototype.Token=so;const kM=[["normalize",eAe],["block",l6e],["inline",U6e],["linkify",Y6e],["replacements",lAe],["smartquotes",dAe],["text_join",fAe]],zAe={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},RAe={parseLinkLabel:iA,parseLinkDestination:nA,parseLinkTitle:sA};function OAe(){return{...zAe}}function PAe(){return{...RAe}}var jAe=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new $Ae,this.inline=new q6e,this.ruler=new aAe;for(let e=0;e@[\]\\^_`{}~]/;function q2(e){return!HAe.test(e)}function pp(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function kv(e,t,n){for(let i=t;i3)return q2(e);for(let t=0;t=i||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(!q2(c))return!1;const d=qAe[o],f=UAe[o],h=Ml("heading_open",d,1,0);h.map=[s,s+1],h.markup=f,e.push(h),e.push(aA(c,s,1));const g=Ml("heading_close",d,-1,0);return g.markup=f,e.push(g),!0}function VAe(e,t,n){const i=Ml("paragraph_open","p",1,0);i.map=[n,n+1],e.push(i),e.push(aA(t,n,1)),e.push(Ml("paragraph_close","p",-1,0))}function ZAe(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function Nk(e,t){for(;t=1e5?AM:Lk,s="",o=!1,r=!1,l=0,a=0;for(;l"]/,CM=/[&<>"]/g,t7e=/&/g,n7e=/[<>"]/g,i7e={"&":"&","<":"<",">":">",'"':"""};function Fk(e){return i7e[e]||e}function _i(e){if(e.length===0)return"";if(e.length<32)return e7e.test(e)?e.replace(CM,Fk):e;const t=e.includes("&"),n=e.includes("<"),i=e.includes(">"),s=e.includes('"');return!t&&!n&&!i&&!s?e:t&&!n&&!i&&!s?e.replace(t7e,"&"):t?e.replace(CM,Fk):e.replace(n7e,Fk)}const s7e=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),o7e=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function rR(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(s7e,(t,n,i)=>{if(n)return n;if(o7e.test(i)){const o=i[1].toLowerCase()==="x"?Number.parseInt(i.slice(2),16):Number.parseInt(i.slice(1),10);return v9(o)?x0(o):"�"}const s=V6(t);return s!==t?s:t})}const r7e=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,l7e=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,a7e=/"/g;function fh(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function U2(e,t,n){for(let i=t;i=e.length||e.charCodeAt(t)===10?!1:!U2(e,t,fh(e,t))}function wM(e,t,n){return t+2=n||e.charCodeAt(s)!==32)return null;let o=s+1;for(;oo&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>o&&e.charCodeAt(l-1)===35;)l--;if(l>o&&e.charCodeAt(l-1)===32)for(r=l-1;r>o&&e.charCodeAt(r-1)===32;)r--;const a=uA(e.slice(o,r));return a===null?null:`${a} +`}function xM(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 h7e(e,t,n){const i=t+2;if(n===i+1)return f7e(e,i);const s=uA(e.slice(t+2,n));return s===null?null:`
  • ${s}
  • +`}function p7e(e,t,n){for(;tt;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let i=n;for(let s=t;s`:"
    ",i.lang=o,i.open=d),{html:`${d}${_i(c)}
    +`,nextPos:u=25e4,o=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n +`;k +`,l=b,a=A}let w=Dm(e,y);for(;w${y}

    +`,u=h,c=g}const m=de.core.parse(t,n,e).tokens);let r=bv(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=b7e(r,s.maxChunks)),Av(t,r))return xk(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),Th(n,o,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return xk(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:o||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!o}),Th(n,o,()=>{for(let u=0;u=3&&(c?c.marker===w&&x>=c.length&&(c=null):c={marker:w,length:x})}}const y=g-f;s+=y,o+=1,l+=1,m?(a=0,u=0):(a+=1,u+=y);const b=m;if((s>=t.maxChunkChars||o>=t.maxChunkLines)&&!c)if(b)d(g);else{const A=Math.max(10,Math.floor(t.maxChunkLines*.5)),w=Math.max(t.maxChunkChars,8e3);(a>=A||u>=w)&&d(g)}f=g}return n&&d(e.length),i}function Av(e,t,n={rangesCoverWholeSource:!0}){const i=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 i=n+1;i=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function k7e(e,t){for(let n=0;n=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function zu(e){return e.length===0?0:Cs(e)+(e.charCodeAt(e.length-1)===10?0:1)}function M7e(e,t,n){for(let i=t;i=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}i=s===e.length?e.length:s+1}return n!==null}function E7e(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 M7e(e,n+1,e.length-1)?!I7e(e,t):!1}function T7e(e,t,n,i={}){const s=i.mode??"full",o=i.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(i.maxChunkChars!==void 0||i.maxChunkLines!==void 0||i.autoTune===!1){const r=i.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??x7e:e.options.fullChunkSizeChars??C7e),l=i.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??S7e:e.options.fullChunkSizeLines??w7e);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:o}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:o}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:o}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}}var lg=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=zu(this.pending);if(this.pending.length=i||n>=s}function fR(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??aR))return"yes";const i=e.options.autoUnboundedThresholdLines??uR;return n!==void 0?n>=i?"yes":"no":t+1e.core.parse(t,n,e).tokens);const o=[],r=new lg(e,{mode:"full",...i,retainTokens:!1,onChunkTokens(l){cR(o,l)}});if(s&&eA(n,s),r.feed(t),r.flushForce(n),s&&(tA(n),i.fallbackOnGlobalState===!1)){const l=tu(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return o}const Nh=(e,t,n)=>en?n:e;function hR(e){return e.experimental?{...e,...e.experimental}:e}const MM=[{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"}],IM=[{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 pR(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function B7e(e,t=Math.max(0,e/40|0),n={}){const i=hR(n),s=i.fullChunkFenceAware??!0,o=i.fullChunkTargetChunks??8,r=i.fullChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:Nh(Math.ceil(e/o),8e3,64e3),maxChunkLines:Nh(Math.ceil(t/o),150,700),maxChunks:Nh(Math.ceil(e/64e3),o,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.fullChunkSizeChars??1e4,maxChunkLines:i.fullChunkSizeLines??200,fenceAware:s,maxChunks:i.fullChunkMaxChunks}}function EM(e,t=Math.max(0,e/40|0),n={}){const i=hR(n),s=i.streamChunkFenceAware??!0,o=i.streamChunkTargetChunks??8,r=i.streamChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:Nh(Math.ceil(e/o),8e3,64e3),maxChunkLines:Nh(Math.ceil(t/o),150,700),maxChunks:Nh(Math.ceil(e/64e3),o,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.streamChunkSizeChars??1e4,maxChunkLines:i.streamChunkSizeLines??200,maxChunks:i.streamChunkMaxChunks,fenceAware:s}}var $7e={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"]}}},z7e={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},R7e={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 k9(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function Cv(e,t){if(k9(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const TM=e=>k9(e)?e:Promise.resolve(e);function Bp(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 _i(e)}}function xc(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${Bp(t[0])}="${_i(t[1])}"`;for(let i=1;i=e.length)return{langName:e,langAttrs:""};let n=t;for(;n${t} +`;const o=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${i}`;return o<0?r.push(["class",l]):(r[o]=r[o].slice(),r[o][1]+=` ${l}`),`
    ${t}
    +`}return`
    ${t}
    +`}function _0(e){return!e.attrs||e.attrs.length===0?`${_i(e.content)}`:`${_i(e.content)}`}function C8(e){const t=_i(e.content);return e.attrs?`${t} +`:`
    ${t}
    +`}function O7e(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 LM(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function P7e(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 NM(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 V2(e,t){if(e.hidden)return"";const n=e.attrs,i=e.nesting,s=e.tag;if(!n||n.length===0)return i===0?t?`<${s} />`:`<${s}>`:i===-1?``:`<${s}>`;let o=(i===-1?"`}const j7e={langPrefix:"language-",xhtmlOut:!1,breaks:!1},Bm=Object.prototype.hasOwnProperty,ei={code_inline(e,t){return _0(e[t])},code_block(e,t){return C8(e[t])},fence(e,t,n,i,s){const o=e[t],r=o.info?rR(o.info).trim():"",{langName:l,langAttrs:a}=gR(r),u=n.highlight,c=_i(o.content);if(!u)return $p(o,c,r,l,n);const d=u(o.content,l,a);return k9(d)?d.then(f=>$p(o,f||c,r,l,n)):$p(o,d||c,r,l,n)},image(e,t,n,i,s){const o=e[t],r=s.renderInlineAsText(o.children||[],n,i),l=o.attrIndex("alt");return l>=0&&o.attrs?o.attrs[l][1]=r:o.attrs?o.attrs.push(["alt",r]):o.attrs=[["alt",r]],V2(o,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
    +`:`
    +`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
    +`:`
    +`:` +`},text(e,t){return _i(e[t].content)},text_special(e,t){return _i(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function FM(e,t,n){const i=e.info?rR(e.info).trim():"",{langName:s,langAttrs:o}=gR(i),r=t.highlight,l=_i(e.content);if(!r)return $p(e,l,i,s,t);const a=r(e.content,s,o);if(k9(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return $p(e,a||l,i,s,t)}function Dk(e,t,n,i){switch(e.type){case"text":return t.text===ei.text?e.content.length===0?"":_i(e.content):null;case"text_special":return t.text_special===ei.text_special?e.content.length===0?"":_i(e.content):null;case"softbreak":return t.softbreak===ei.softbreak?i:null;case"hardbreak":return t.hardbreak===ei.hardbreak?n:null;case"html_inline":return t.html_inline===ei.html_inline?e.content:null;case"code_inline":return t.code_inline===ei.code_inline?_0(e):null;default:return null}}function H7e(e,t,n,i,s){const o=e[0];switch(o.type){case"text":if(s.text===ei.text)return o.content.length===0?"":_i(o.content);break;case"text_special":if(s.text_special===ei.text_special)return o.content.length===0?"":_i(o.content);break;case"softbreak":if(s.softbreak===ei.softbreak)return t.breaks?t.xhtmlOut?`
    +`:`
    +`:` +`;break;case"hardbreak":if(s.hardbreak===ei.hardbreak)return t.xhtmlOut?`
    +`:`
    +`;break;case"html_inline":if(s.html_inline===ei.html_inline)return o.content;break;case"code_inline":if(s.code_inline===ei.code_inline)return _0(o);break}const r=s[o.type];if(!r)return V2(o,t.xhtmlOut===!0);const l=r(e,0,t,n,i);return typeof l=="string"?l:Cv(l,o.type)}var W7e=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...ei}}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 i=this.mergeOptions(t),s=n??{},o=this.rules,r=i.xhtmlOut===!0;let l,a,u,c,d,f,h="",g="",m=!1,y="";for(let b=0;b0&&e[b-1].hidden?` +`:"";if(w==="list_item_open"&&(!A.attrs||A.attrs.length===0)&&b+3${this.renderInlineTokens(M.children||[],i,s)}`,b+=3;continue}}if(b+2 +`,b+=2;continue}}}if(w==="inline"){const S=A.children||[];if(S.length===1){m||(l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,h=i.xhtmlOut?`
    +`:`
    +`,g=i.breaks?h:` +`,m=!0);const M=S[0];switch(M.type){case"text":if(l===ei.text){y+=_i(M.content);continue}break;case"text_special":if(a===ei.text_special){y+=_i(M.content);continue}break;case"softbreak":if(u===ei.softbreak){y+=g;continue}break;case"hardbreak":if(c===ei.hardbreak){y+=h;continue}break;case"html_inline":if(d===ei.html_inline){y+=M.content;continue}break;case"code_inline":if(f===ei.code_inline){y+=_0(M);continue}break}}y+=this.renderInlineTokens(S,i,s);continue}const x=o[w];if(!x){const S=A.attrs;if(!A.hidden){if(!S||S.length===0)switch(w){case"hr":y+=r?`


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

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

    +`;continue;case"list_item_open":{const M=e[b+1];y+=k+(M&&(M.type==="inline"||M.hidden||M.nesting===-1&&M.tag==="li")?"
  • ":`
  • +`);continue}case"list_item_close":y+=`
  • +`;continue;case"bullet_list_open":y+=`${k}
      +`;continue;case"bullet_list_close":y+=`
    +`;continue;case"blockquote_open":y+=k+(e[b+1]&&e[b+1].nesting===-1&&e[b+1].tag==="blockquote"?"
    ":`
    +`);continue;case"blockquote_close":y+=`
    +`;continue;case"ordered_list_open":y+=`${k}
      +`;continue;case"ordered_list_close":y+=`
    +`;continue;case"table_open":y+=`${k} +`;continue;case"table_close":y+=`
    +`;continue;case"thead_open":y+=`${k} +`;continue;case"thead_close":y+=` +`;continue;case"tbody_open":y+=`${k} +`;continue;case"tbody_close":y+=` +`;continue;case"tr_open":y+=`${k} +`;continue;case"tr_close":y+=` +`;continue;case"td_open":y+=`${k}`;continue;case"td_close":y+=` +`;continue;case"th_open":y+=`${k}`;continue;case"th_close":y+=` +`;continue}else if(S.length===1){const M=S[0];if(w==="ordered_list_open"&&M[0]==="start"){y+=`${k}
      +`;continue}if(w==="td_open"&&M[0]==="style"){y+=`${k}`;continue}if(w==="th_open"&&M[0]==="style"){y+=`${k}`;continue}}}y+=this.renderToken(e,b,i);continue}if(w==="code_block"&&x===ei.code_block){y+=C8(A);continue}if(w==="fence"&&x===ei.fence){y+=FM(A,i);continue}if(w==="html_block"&&x===ei.html_block){y+=A.content;continue}const _=x(e,b,i,s,this);typeof _=="string"?y+=_:y+=Cv(_,A.type)}return y}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const i=this.mergeOptions(t),s=n??{},o=this.rules;let r="";for(let l=0;l0&&e[t-1].hidden?` +`:"",c=a?`> +`:">";if(!l||l.length===0)return o===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:o===-1?`${u}(n||(n={...t}),n);if(Bm.call(e,"highlight")&&e.highlight!==t.highlight&&(i().highlight=e.highlight),Bm.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(i().langPrefix=s)}if(Bm.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(i().xhtmlOut=s)}if(Bm.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(i().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...j7e,...this.baseOptions})}renderSingleToken(e,t,n,i){const s=this.rules,o=t.type;if(o==="code_block"&&s.code_block===ei.code_block)return C8(t);if(o==="html_block"&&s.html_block===ei.html_block)return t.content;const r=this.mergeOptions(n),l=i??{};if(o==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[o];if(!a)return t.block?this.renderToken(e,0,r):V2(t,r.xhtmlOut===!0);if(o==="fence"&&a===ei.fence)return FM(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:Cv(u,o)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const i=this.rules;if(e.length===1)return H7e(e,t,n,this,i);const s=t.xhtmlOut===!0,o=s?`
      +`:`
      +`,r=t.breaks?o:` +`,l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,h=i.link_open,g=i.link_close,m=i.em_open,y=i.em_close,b=i.strong_open,A=i.strong_close;let w="";for(let k=0;k`;if(u===ei.softbreak&&k+3`,k+=1;continue}if(x.type==="em_open"&&!m&&!y&&k+2${I}`,k+=2;continue}}}if(x.type==="strong_open"&&!b&&!A&&k+2${I}`,k+=2;continue}}}switch(x.type){case"text":if(l===ei.text){const M=x.content.length===0?"":_i(x.content);if(d===ei.html_inline&&k+1=4)return!0;continue}if(l===9){if(r+=4-r%4,o++,r>=4)return!0;continue}break}if(o0&&u<=6){if(a=3)return!0;break}default:if(l>=48&&l<=57){let a=o+1;for(;a57)break;a++}if(a=ie,!J&&he!==void 0&&(Ee=Cs(e),J=Ee>=he)),J){const G=this.parseFullDocument(e,D,n,Ee,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Ps(D,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!tu(D)?.unbounded}),G.tokens}else if(j){const G=(ge,be,Le)=>geLe?Le:ge;Ee===void 0&&(Ee=Cs(e));const ue=le&&!ne?EM(e.length,Ee,n.options):null,Ae=ue?.maxChunkChars??(H?G(Math.ceil(e.length/z),8e3,64e3):W??1e4),ae=ue?.maxChunkLines??(H?G(Math.ceil(Ee/z),150,700):X??200),re=ue?.maxChunks??(H?G(Math.ceil(e.length/64e3),z,32):U),Q=e.length>0&&e.charCodeAt(e.length-1)===10,oe=q&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&ue?.strategy!=="plain";if((R||oe)&&(e.length>=Ae*2||Ee>=ae*2)&&Q){const ge=K2(n,e,D,{maxChunkChars:Ae,maxChunkLines:ae,fenceAware:ue?.fenceAware??Z,maxChunks:re});return this.cache={src:e,tokens:ge,env:D,lineCount:Ee,lastSegment:void 0,globalStateReason:Tr(e)},this.updateCacheLineCount(this.cache,Ee),this.recordChunkedParseResult(D,R?"explicit-initial-large-doc":"default-initial-large-doc"),ge}}const ve=this.parseFullDocument(e,D,n,Ee);return Ee=ve.lineCount,this.cache={src:e,tokens:ve.tokens,env:D,lineCount:Ee,lastSegment:void 0,globalStateReason:Tr(e)},this.updateCacheLineCount(this.cache,Ee),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Ps(D,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!tu(D)?.unbounded}),ve.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",Ps(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const o=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=Tr(s.src),s.globalStateReason=r);const l=r?null:o!==null?this.detectGlobalStateForAppend(s,o):Tr(e),a=r||l;if(a){const D=i??s.env;bu(D);const P=Tr(e),O=this.parseFullDocument(e,D,n),R=O.tokens,q=O.lineCount;return this.cache={src:e,tokens:R,env:D,lineCount:q,lastSegment:void 0,globalStateReason:P},this.updateCacheLineCount(this.cache,q),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Ps(D,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!tu(D)?.unbounded}),R}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?P=8:c.length>1e3?P=6:c.length>200&&(P=4),P=Math.min(P,D);let O=null;const R=n.options?.streamContextParseStrategy??"chars",q=n.options?.streamContextParseMinChars??200,j=n.options?.streamContextParseMinLines??2;let H;const z=()=>(H===void 0&&(H=Cs(c)),H),W=this.canDirectlyParseAppend(s),X=W&&this.shouldUseUnboundedAppend(e,s,c);let U=!1;if(!W)switch(R){case"lines":U=z()>=j;break;case"constructs":if(c.length>=q){U=!0;break}if(K7e(c)){U=!0;break}U=z()>=j;break;case"chars":default:U=c.length>=q}if(P>0&&U){const Z=this.getTailLines(s.src,P)+c;try{const se=this.core.parse(Z,s.env,n).tokens,ie=se.findIndex(he=>he.map&&typeof he.map[1]=="number"&&he.map[1]>P);if(ie!==-1){const he=se.slice(ie),Ee=D-P;Ee!==0&&this.shiftTokenLines(he,Ee),O={tokens:he}}}catch{O=null}}else O=null;if(!O){const Z=D;if(X)O={tokens:Dp(n,c,s.env,{mode:"stream"})},Z>0&&this.shiftTokenLines(O.tokens,Z);else{const se=this.core.parse(c,s.env,n);Z>0&&this.shiftTokenLines(se.tokens,Z),O=se}}let ne=0;if(s.tokens.length>0&&O.tokens.length>0){const Z=s.tokens[s.tokens.length-1],se=O.tokens[0];try{Z.type==="inline"&&se.type==="inline"&&(se.children&&se.children.length>0&&(Z.children||(Z.children=[]),this.appendTokens(Z.children,se.children)),Z.content=(Z.content||"")+(se.content||""),ne=1)}catch{ne=0}}const le=s.tokens.length;if(O.tokens.length>ne){const Z=s.tokens,se=O.tokens,ie=Math.min(Z.length,se.length-ne);let he=0;for(let Ee=ie;Ee>0;Ee--){let J=!0;for(let ve=0;ve0&&(ne+=he),se.length>ne&&this.appendTokens(s.tokens,se,ne)}if(s.src=e,s.globalStateReason=null,s.lineCount=D+(H??z()),s.tokens.length>le){const Z=this.getLastSegment(s.tokens,e,le,s.tokens.length,e.length-c.length,D);Z?s.lastSegment=Z:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,X&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",Ps(s.env,{area:"stream",path:X?"stream-unbounded-append":"stream-append",reason:X?"large-delta":"safe-append",unbounded:X}),s.tokens}const d=i??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",Ps(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,y=!h&&!c&&g,b=m||y,A=n.options?.streamChunkAdaptive!==!1,w=n.options?.streamChunkTargetChunks??8,k=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,_=n.options?.streamChunkMaxChunks,S=!!n.__explicitStreamChunkConfig,M=n.options?.autoTuneChunks!==!1,I=n.options?.streamChunkFenceAware??!0;let L=c&&s.lineCount!==void 0?s.lineCount+Cs(c):void 0;if(b){L===void 0&&(L=Cs(e));const D=(z,W,X)=>zX?X:z,P=M&&!S?EM(e.length,L,n.options):null,O=P?.maxChunkChars??(A?D(Math.ceil(e.length/w),8e3,64e3):k??1e4),R=P?.maxChunkLines??(A?D(Math.ceil(L/w),150,700):x??200),q=P?.maxChunks??(A?D(Math.ceil(e.length/64e3),w,32):_),j=e.length>0&&e.charCodeAt(e.length-1)===10,H=y&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&P?.strategy!=="plain";if((m||H)&&(e.length>=O*2||L>=R*2)&&j){const z=K2(n,e,d,{maxChunkChars:O,maxChunkLines:R,fenceAware:P?.fenceAware??I,maxChunks:q});return this.cache={src:e,tokens:z,env:d,lineCount:L,lastSegment:void 0,globalStateReason:Tr(e)},this.updateCacheLineCount(this.cache,L),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),z}}const N=this.parseFullDocument(e,d,n,L),T=N.tokens;return L=N.lineCount,this.cache={src:e,tokens:T,env:d,lineCount:L,lastSegment:void 0,globalStateReason:Tr(e)},this.updateCacheLineCount(this.cache,L),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Ps(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!tu(d)?.unbounded}),T}recordChunkedParseResult(e,t){const n=tu(e)?.chunk,i=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,i){this.stats.fullParses+=1,this.stats.lastMode="full",Ps(e,{area:"stream",path:"stream-full",reason:`global-state:${i}`,unbounded:!!tu(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",Ps(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,i,s=!0){const o=Tr(e);og(t)&&bu(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?fR(n,e.length,i):"no";if(r==="yes"){const a=Dp(n,e,t);return Ps(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:i??(s?Cs(e):0)}}let l=i;if(r==="need-lines"&&(l=Cs(e),dR(n,e.length,l))){const a=Dp(n,e,t);return Ps(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?Cs(e):0),{tokens:Th(t,o,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:Cs(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` +`))return null;const i=n??t.slice(e.length);if(!i)return null;const s=i.length;if(i.charCodeAt(s-1)!==10)return null;let o=0,r=-1;for(let a=0;a=2));a++);if(o<2)return null;const l=(r===-1?i:i.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(i)?null:i}tryTailSegmentReparse(e,t,n,i){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const o=t.src.slice(0,s.srcOffset);if(!e.startsWith(o))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,i,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,i),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+Cs(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 i=e.length-1;i>=0;i--)if(e.charCodeAt(i)===10&&(n--,n===0))return e.slice(i+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,i=e.slice(n),s=i.length;let o=null,r=0;for(;r<=s;){let l=i.indexOf(` +`,r);l===-1&&(l=s);let a=r;for(;a=3&&(o?o.marker===u&&d>=o.length&&(o=null):o={marker:u,length:d})}}if(l===s)break;r=l+1}return o!==null}peek(){return this.cache?.tokens??U7e}getStats(){return{...this.stats}}appendTokens(e,t,n=0,i=t.length){for(let s=n;sBk?n.slice(n.length-Bk):n,i&&(e.globalStateReason=i),i}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,i=e.length,s,o){if(i<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=i-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:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}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:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}}return null}getLineStartOffset(e,t,n,i){if(n!==void 0&&i!==void 0&&t>=i)return this.getLineStartOffsetFrom(e,n,t-i);if(t<=0)return 0;let s=t,o=-1;for(;s>0;){if(o=e.indexOf(` +`,o+1),o===-1)return e.length;s--}return o+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let i=n,s=t-1;for(;i>0;){if(s=e.indexOf(` +`,s+1),s===-1)return e.length;i--}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,i,s,o){if(!o||this.mayContainReferenceDefinition(o))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,i,s,o,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,i,s,o,r);default:return null}}tryListTailAppendMerge(e,t,n,i,s,o,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+Cs(o);t.lineCount=m;const y=this.getDocLineCount(e,m);return r.map&&(r.map[1]=y),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,i,s,o,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(o))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 y=h.tbodyCloseIndex>=0?h.tbodyCloseIndex:h.tableCloseIndex,b=t.lineCount??Cs(t.src);t.tokens.splice(y,0,...g),t.src=e,t.env=n,t.globalStateReason=null;const A=b+Cs(o);t.lineCount=A;const w=this.getDocLineCount(e,A);if(r.map&&(r.map[1]=w),h.tbodyOpenIndex>=0){const k=t.tokens[h.tbodyOpenIndex];k?.map&&(k.map[1]=w)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:w,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,i){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===i){s=l;break}}if(s<0)return null;let o=-1,r=-1;for(let l=t+1;l=0){for(let l=s-1;l>o;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===i+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:o,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,i){if(e.length<2)return!1;const s=e[0],o=e[e.length-1];if(s.type!==t||o.type!==n||s.level!==0||o.level!==0||i!==void 0&&s.markup!==i)return!1;let r=0;for(let l=0;l0&&l0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,i){let s=!1,o=!1;const r=i+2;for(let l=t;l=0;){const i=e.charCodeAt(n);if(i===32||i===9){n--;continue}return i===10}return!0}getDocLineCount(e,t=Cs(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 i=0;i=0;o--)n.push(s.children[o]);for(;n.length>0;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let r=o.children.length-1;r>=0;r--)n.push(o.children[r])}}}}};const BM={default:z7e,zero:R7e,commonmark:$7e};function Q7e(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Y7e(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 $M(e){return e.experimental?{...e,...e.experimental}:e}function bl(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 zM(e,t,n){for(let i=0;i=4?n.quotes=[M[0],M[1],M[2],M[3]]:n.quotes=["“","”","‘","’"]}let r=zM(o?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=zM(o?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=RM(o?.options,s,"fullChunkedFallback"),u=RM(o?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const h=new jAe;let g=null;const m=()=>(g||(g=new q7e(n)),g);let y=null;const b=()=>(y||(y=new G7e(h)),y);let A=null;const w=()=>(A||(A=new Cz({fuzzyLink:!0})),A),k=M=>!c&&!!d&&!Y7e(M,d),x=(M,I)=>i==="default"&&!c&&g===null&&f!==null&&M.parse===f&&k(M)&&!M.stream.enabled&&I<(M.options.autoUnboundedThresholdChars??4e6)&&M.options.html===!1&&M.options.xhtmlOut===!1&&M.options.breaks===!1&&M.options.langPrefix==="language-"&&M.options.linkify===!1&&M.options.typographer===!1&&M.options.highlight===null,_=(M,I)=>i==="default"&&!c&&k(M)&&!M.stream.enabled&&!M.options.fullChunkedFallback&&I<(M.options.autoUnboundedThresholdChars??4e6)&&M.options.html===!1&&M.options.linkify===!1&&M.options.typographer===!1,S={core:h,block:h.block,inline:h.inline,get linkify(){const M=w();return Object.defineProperty(this,"linkify",{value:M,writable:!0,configurable:!0}),M},get renderer(){const M=m();return Object.defineProperty(this,"renderer",{value:M,writable:!0,configurable:!0}),M},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return k(this)},set(M){const I=$M(M);return this.options={...this.options,...I},(bl(M,"fullChunkSizeChars")||bl(M,"fullChunkSizeLines")||bl(M,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(bl(M,"streamChunkSizeChars")||bl(M,"streamChunkSizeLines")||bl(M,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),bl(M,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),bl(M,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),g&&g.set(I),typeof I.stream=="boolean"&&(this.stream.enabled=I.stream,y&&(y.reset(),y.resetStats())),this},configure(M){const I=typeof M=="string"?BM[M]:M;if(!I)throw new Error("Wrong `markdown-it` preset, can't be empty");if(I.options&&this.set(I.options),I.components){const L=I.components;L.core?.rules&&this.core.ruler.enableOnly(L.core.rules),L.block?.rules&&this.block.ruler.enableOnly(L.block.rules),L.inline?.rules&&this.inline.ruler.enableOnly(L.inline.rules),L.inline2?.rules&&this.inline.ruler2.enableOnly(L.inline2.rules)}return this},enable(M,I){const L=Array.isArray(M)?M:[M],N=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const D of N){if(!D)continue;const P=D.enable(L,!0);for(let O=0;O!T.has(P));if(D.length)throw new Error(`Rules manager: invalid rule name ${D.join(", ")}`)}return this},disable(M,I){const L=Array.isArray(M)?M:[M],N=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const D of N){if(!D)continue;const P=D.disable(L,!0);for(let O=0;O!T.has(P));if(D.length)throw new Error(`Rules manager: invalid rule name ${D.join(", ")}`)}return this},use(M,...I){const L=typeof M=="function"?M:M&&typeof M.default=="function"?M.default:void 0;if(!L)throw new TypeError("MarkdownIt.use: plugin must be a function");const N=[this,...I],T=M;return c=!0,L.apply(T,N),this},render(M,I){let L;if(x(this,M.length)){I!==void 0&&(ar(I),L=wk("render"));const D=L?qf():0,P=L?_M(M,L):SM(M);if(L&&(L.attemptMs=qf()-D,P===null&&(L.fallbackReason="unsupported-stock-subset"),O1(I,L)),P!==null)return I!==void 0&&Ps(I,{area:"render",path:"stock-fast",reason:"stock-subset"}),P}const N=I??{},T=this.parse(M,N);return L&&O1(N,L),m().render(T,this.options,N)},async renderAsync(M,I){let L;if(x(this,M.length)){I!==void 0&&(ar(I),L=wk("render"));const D=L?qf():0,P=L?_M(M,L):SM(M);if(L&&(L.attemptMs=qf()-D,P===null&&(L.fallbackReason="unsupported-stock-subset"),O1(I,L)),P!==null)return I!==void 0&&Ps(I,{area:"render",path:"stock-fast",reason:"stock-subset"}),P}const N=I??{},T=this.parse(M,N);return L&&O1(N,L),m().renderAsync(T,this.options,N)},renderIterable(M,I={}){const L=this.parseIterable(M,I);return m().render(L,this.options,I)},async renderAsyncIterable(M,I={}){const L=await this.parseAsyncIterable(M,I);return m().renderAsync(L,this.options,I)},renderInline(M,I={}){const L=this.parseInline(M,I);return m().render(L,this.options,I)},validateLink:Jz,normalizeLink:Xz,normalizeLinkText:eR,utils:v5e,helpers:{...o6e},parse(M,I){if(typeof M!="string")throw new TypeError("Input data should be a String");if(I!==void 0&&ar(I),_(this,M.length)){const D=I===void 0?void 0:wk("parse"),P=D?qf():0,O=XAe(M,D);if(D&&(D.attemptMs=qf()-P,O===null&&(D.fallbackReason="unsupported-stock-subset"),O1(I,D)),O!==null)return I!==void 0&&Ps(I,{area:"parse",path:"stock-fast",reason:"stock-subset"}),O}const L=I??{};let N;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&k(this)){const D=fR(this,M.length);if(D==="yes"){const P=Dp(this,M,L);return Ps(I,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),P}D==="need-lines"&&(N=Cs(M))}if(!this.stream.enabled){const D=M.length,P=this.options.autoTuneChunks!==!1,O=r,R=!a&&k(this),q=!!this.options.fullChunkedFallback,j=R&&D>=2e5;let H;(q||j||N!==void 0)&&(H=N??Cs(M));const z=(q||j)&&P&&!O?B7e(D,H,this.options):null;if(q||j){const W=H??0;if(q?D>=(this.options.fullChunkThresholdChars??2e4)||W>=(this.options.fullChunkThresholdLines??400):j){if(z&&z.strategy!=="plain"){const X=K2(this,M,L,{maxChunkChars:z.maxChunkChars,maxChunkLines:z.maxChunkLines,fenceAware:z.fenceAware,maxChunks:z.maxChunks});return I&&OM(I,q?"explicit-full-chunk":"default-large-string"),X}if(q){const X=(J,ve,G)=>JG?G:J,U=this.options.fullChunkAdaptive!==!1,ne=this.options.fullChunkTargetChunks??8,le=X(Math.ceil(D/ne),8e3,64e3),Z=X(Math.ceil(W/ne),150,700),se=U?le:this.options.fullChunkSizeChars??1e4,ie=U?Z:this.options.fullChunkSizeLines??200,he=U?X(Math.ceil(D/64e3),ne,32):this.options.fullChunkMaxChunks,Ee=K2(this,M,L,{maxChunkChars:se,maxChunkLines:ie,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:he});return I&&OM(I,"explicit-full-chunk"),Ee}}}if(N!==void 0&&k(this)&&dR(this,D,H??N)){const W=Dp(this,M,L);return Ps(I,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),W}}const T=Tr(M);return Ps(I,{area:"parse",path:"plain",reason:"default-plain"}),Th(L,T,()=>h.parse(M,L,this).tokens)},parseIterable(M,I={}){return ar(I),L7e(this,M,I)},parseAsyncIterable(M,I={}){return ar(I),N7e(this,M,I)},parseIterableToSink(M,I,L={}){return ar(L),F7e(this,M,I,L)},parseAsyncIterableToSink(M,I,L={}){return ar(L),D7e(this,M,I,L)},parseInline(M,I={}){if(typeof M!="string")throw new TypeError("Input data should be a String");ar(I),og(I)&&bu(I);const L=h.createState(M,I,this);return L.inlineMode=!0,h.process(L),L.tokens}};if(S.stream={enabled:!!n.stream,parse(M,I){return S.stream.enabled?b().parse(M,I,S):S.parse(M,I??{})},reset(){b().reset()},peek(){return y?y.peek():[]},stats(){return y?y.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){y&&y.resetStats()}},o?.components){const M=o.components;M.core?.rules&&S.core.ruler.enableOnly(M.core.rules),M.block?.rules&&S.block.ruler.enableOnly(M.block.rules),M.inline?.rules&&S.inline.ruler.enableOnly(M.inline.rules),M.inline2?.rules&&S.inline.ruler2.enableOnly(M.inline2.rules)}return d=Q7e(S),f=S.parse,S}var X7e=J7e;const vR=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],eCe=["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"],yR=["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"],tCe=["svg","g","path"],nCe=["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"],iCe=["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"],sCe=["action","data","href","src","srcset","poster","xlink:href","formaction"],oCe=["script"],rCe=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],Sc=new Set(vR),kR=new Set(yR),M0=new Set([...vR,...eCe,...yR,...tCe]),bR=new Set([...M0,...nCe]),lCe=new Set(iCe),aCe=new Set(sCe),ag=new Set(oCe),AR=new Set(rCe);function CR(e){let t="";for(const n of e){const i=n.charCodeAt(0);i<=31||i>=127&&i<=159||/\s/u.test(n)||(t+=n)}return t}const uCe={amp:"&",bsol:"\\",colon:":",newline:` +`,sol:"/",tab:" "};function wR(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,i,s)=>{const o=n??i;if(o){const r=Number.parseInt(o,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return uCe[String(s??"").toLowerCase()]??t})}const $m=new Set(["http","https","mailto","tel"]),cCe=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),fd=new Set(["http","https"]);function xR(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const dCe=/^https?:\/\//i;function fCe(e){if(!dCe.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 hCe(e,t,n){if(!zp(t,n)||!e.startsWith("file:///"))return!1;const i=e.charAt(8);return i!=="/"&&i!=="\\"}function zp(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function pCe(e,t){return t==="href"||t==="xlink:href"?zp(e,t)?$m:fd:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?fd:(zp(e,t),$m)}function qd(e,t={}){if(fCe(e))return!1;const n=CR(wR(e)).toLowerCase(),i=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 i==="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 o=xR(n);return o?o==="file"?!hCe(n,i,s):zp(i,s)?cCe.has(o):!pCe(i,s).has(o):!1}function gCe(e){const t=wR(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=xR(CR(t).toLowerCase());return n==="http"||n==="https"}function mCe(e,t={}){const n=String(e??"").trim();return n?qd(n,t)?"":n:""}function PM(e){return mCe(e,{tagName:"img",attrName:"src"})}function vCe(e,t,n){function i(f){return f.trim().split(" ",2)[0]===t}function s(f,h,g,m,y){return f[h].nesting===1&&f[h].attrJoin("class",t),y.renderToken(f,h,g,m,y)}n=n||{};const o=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||i,c=n.render||s;function d(f,h,g,m){let y,b=!1,A=f.bMarks[h]+f.tShift[h],w=f.eMarks[h];if(l!==f.src.charCodeAt(A))return!1;for(y=A+1;y<=w&&r[(y-A)%a]===f.src[y];y++);const k=Math.floor((y-A)/a);if(k=g||(A=f.bMarks[S]+f.tShift[S],w=f.eMarks[S],A=4)){for(y=A+1;y<=w&&r[(y-A)%a]===f.src[y];y++);if(!(Math.floor((y-A)/a)=2){const r=Number(o[0]),l=Number(o[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&SR(s.children,t,n)}}function kCe(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(vCe,t,{render(n,i){return n[i].nesting===1?`
      `:`
      +`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,i,s)=>{const o=t,r=o.bMarks[n]+o.tShift[n],l=o.eMarks[n],a=o.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 _=0,S=-1;for(let M=0;M0&&(h=m.slice(0,S))}h||(f=d||void 0)}if(s)return!0;const y=!!o.env.__markstreamFinal;let b=n+1,A=!1;for(;b<=i;){const _=o.bMarks[b]+o.tShift[b],S=o.eMarks[b];if(o.src.slice(_,S).trim()===":::"){A=!0;break}b++}A||(b=i);const w=o.push("vmr_container_open","div",1);if(w.attrSet("class",`vmr-container vmr-container-${c}`),w.map=[n,A?b:i],w.meta={...w.meta??{},unclosed:!A&&!y},f&&w.attrSet("data-args",f),h)try{const _=JSON.parse(h);for(const[S,M]of Object.entries(_)){const I=M!=null&&typeof M=="object";w.attrSet(`data-${S}`,I?JSON.stringify(M):String(M))}}catch{const _=yCe(h);if(_)for(const[S,M]of Object.entries(_)){const I=M!=null&&typeof M=="object";w.attrSet(`data-${S}`,I?JSON.stringify(M):String(M))}else w.attrSet("data-attrs",h)}const k=[];for(let _=n+1;__.trim().length>0)){let _=k.join(` +`);_.endsWith(` +`)||(_+=` +`),_.endsWith(` + +`)||(_+=` +`);const S=o.tokens[o.tokens.length-1];S&&(S.raw=_);const M=[];o.md.block.parse(_,o.md,o.env,M),SR(M,n+1,n+1+k.length),o.tokens.push(...M)}const x=o.push("vmr_container_close","div",-1);return A||(x.hidden=!0,x.map=[i,i]),o.line=A?b+1:b,!0},{alt:["paragraph","reference","blockquote","list"]})}function oa(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _s(e){let t=!1,n=!1;for(let i=0;i")return i}return-1}function b9(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=i[2]||i[3]||i[4]||"";t.push([s,o])}return t}const bCe=/^[a-z][a-z0-9_-]*$/;function jM(e){return bCe.test(String(e??"").trim().toLowerCase())}function Nl(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return jM(t)?t.toLowerCase():"";let n=1;for(;n]/.test(o)?"":jM(s)?s:""}function kf(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const i of e){const s=Nl(i);!s||t.has(s)||(t.add(s),n.push(s))}return n}function ACe(...e){const t=new Set,n=[];for(const i of e)for(const s of kf(i))t.has(s)||(t.add(s),n.push(s));return n}function CCe(e){const t=kf(e);return{key:t.join(","),tags:t}}function _R(e){return Nl(e)}function wCe(e,t){const n=String(e??""),i=Nl(t);if(!i)return!1;const s=oa(i),o=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return o?o[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function MR(e,t){const n=Nl(t);return!!n&&!M0.has(n)&&!wCe(e,n)}function xCe(e,t){const n=String(e??""),i=Nl(t);if(!i)return n;const s=oa(i),o=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(o,"").replace(r,"")}const IR=Sc,SCe=M0,ER=new Set(kR);ER.delete("details");const _Ce=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,MCe=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,w8=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,ICe=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Z2(e){return(e.match(w8)?.[1]??"").toLowerCase()}function cA(e){return/^\s*<\s*\//.test(e)}function dA(e,t){return IR.has(t)||/\/\s*>\s*$/.test(e)}function ECe(e,t){let n=0;for(let i=0;i0&&n--;continue}dA(s,o)||n++}}return n}function HM(e,t,n=0){const i=new RegExp(String.raw`<\s*(\/?)\s*${oa(t)}(?=[\s>/])[^>]*>`,"gi");i.lastIndex=Math.max(0,n);let s=0,o;for(;(o=i.exec(e))!==null;){const r=o[0]??"",l=!!o[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:o.index,end:o.index+r.length};s--;continue}a||s++}return null}function LCe(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${oa(t)}(?=[\s>/])[^>]*>`,"gi");let i=0,s;for(;(s=n.exec(e))!==null;){const o=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(o);if(r){i>0&&i--;continue}l||i++}return i}function G2(e){const t=e;return String(t.raw??t.content??t.markup??"")}function NCe(e){const t=e;return t.meta||(t.meta={}),t.meta}function $k(e,t,n){const i=NCe(e);i.markstreamCustomHtmlRaw=t,i.markstreamCustomHtmlInner=n}function FCe(e,t){if(!t.size)return;const n=Array.from(t,h=>new RegExp(String.raw`<\s*${oa(h)}(?=[\s>/])`,"i")),i=[];let s=!1;const o=h=>h?n.some(g=>g.test(h)):!1,r=h=>{if(!(!h||!i.length))for(const g of i)g.raw+=h,g.inner+=h},l=()=>{!i.length||!s||(r(` +`),s=!1)},a=h=>{r(h)},u=h=>{for(let m=0;m{const g=i[i.length-1]?.tag;if(!g)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${oa(g)}\s*>`,"i");return h.match(m)?.[0]??null},d=h=>!!c(h),f=(h,g,m)=>{const y=m??(h.type==="html_inline"?Z2(g):"");if(!(y&&t.has(y))){r(g);return}const b=cA(g),A=!b&&dA(g,y);if(b){if(!i.length||i[i.length-1].tag!==y){r(g);return}u(g);return}if(r(g),A){$k(h,g,"");return}i.push({tag:y,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(),!i.length&&!o(g)){s=!1;continue}let m=0,y=!0;for(const b of h.children){const A=G2(b),w=b.type==="html_inline"?Z2(A):"",k=w&&t.has(w);let x=A;if(y&&g&&A&&(i.length||k)){const _=g.indexOf(A,m);if(_!==-1)a(g.slice(m,_)),x=g.slice(_,_+A.length),m=_+A.length;else{if(i.length&&!k)continue;y=!1}}f(b,x,w)}y&&g&&m0;continue}if(i.length&&typeof h.content=="string"){const g=G2(h),m=h.type==="html_block"?c(g):null;if(m){u(`${s?` +`:""}${m}`),s=i.length>0;continue}if(!h.content)continue;l(),r(h.content),s=!0}}for(const h of i)$k(h.token,h.raw,h.inner)}function DCe(e){return/^\s*<\s*[!?]/.test(e)}function BCe(e){const t=new Set(SCe);if(e&&Array.isArray(e))for(const n of e){const i=String(n??"").trim();if(!i)continue;const s=i.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function WM(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function $Ce(e,t){let n=null;for(const o of e.matchAll(_Ce)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();WM(l,t)&&_s(e.slice(r))===-1&&(!n||r")&&(!n||o")&&(!n||o{const h=f,g=new Set(n),m=Array.isArray(h.env?.__markstreamCustomHtmlTags)?h.env.__markstreamCustomHtmlTags:[];for(const w of m){const k=Nl(String(w??""));k&&g.add(k)}const y=BCe(Array.from(g)),b=new Set(OCe);for(const w of g)b.add(w);return{autoCloseInlineTagSet:b,commonHtmlTags:y,customTagSet:g,shouldMergeHtmlBlockTag:w=>g.has(w)||!y.has(w)||ER.has(w)}},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??"")},o=(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 y={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return h==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},y,{type:"paragraph_close",tag:"p",nesting:-1}]:h==="text"?[{type:"text",content:m,raw:m}]:[y]},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}=i(f);for(const y of h){const b=y;if(b.type!=="inline"||!Array.isArray(b.children))continue;const A=String(b.content??""),w=b.children.length?b.children:A.includes("<")?[{type:"text",content:A,raw:A}]:null;if(w)try{const k=RCe(w,g);if(b.children=k.children,k.pendingBuffer){const x=A.lastIndexOf(k.pendingBuffer);if(x!==-1){const _=A.slice(0,x);b.content=_,typeof b.raw=="string"&&(b.raw=_)}}}catch(k){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",k)}}FCe(h,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const h=f.tokens??[],{autoCloseInlineTagSet:g,customTagSet:m,shouldMergeHtmlBlockTag:y}=i(f),b=[];for(let A=0;A0){const[x,_]=b[b.length-1];if(A!==_){if(w.type==="paragraph_open"||w.type==="paragraph_close"){h.splice(A,1),A--;continue}const S=String(w.content??w.raw??"");if(S){const M=h[_],I=`${String(M.content||"")} +${S}`,L=_s(I),N=L===-1?null:HM(I,x,L+1);if(N){const T=I.slice(0,N.end),D=I.slice(N.end);M.content=T,M.loading=!1,h.splice(A,1),b.pop();const P=d(M,D)?[]:u(D,c(h,A,"paragraph"));P.length&&h.splice(A,0,...P),A--;continue}M.content=I,M.loading!==!1&&(M.loading=!0)}h.splice(A,1),A--;continue}}const k=s(w);if(k){if(DCe(k))continue;const x=(k.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),_=/^\s*<\s*\//.test(k);if(!x||!y(x))continue;if(o(w,k),!_)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(k)&&LCe(k,x)>0&&b.push([x,A]);else if(b.length>0&&x&&b[b.length-1][0]===x){const[,S]=b[b.length-1],M=h[S];M.content=`${String(M.content||"")} +${k}`,M.loading=!1,b.pop(),h.splice(A,1),A--}continue}else if(b.length>0){if(w.type==="paragraph_open"||w.type==="paragraph_close"){h.splice(A,1),A--;continue}const x=w.content||"",_=new RegExp(`<\\s*\\/\\s*${b[b.length-1][0]}\\s*>`,"i").test(x);if(x){const[,S]=b[b.length-1],M=h[S];M.content=`${M.content||""} +${x}`,M.loading!==!1&&(M.loading=!_)}_&&b.pop(),h.splice(A,1),A--}else continue}if(m.size>0){const A=new Map,w=new Map,k=S=>{let M=A.get(S);return M||(M=new RegExp(`<\\s*${S}\\b`,"i"),A.set(S,M)),M},x=S=>{let M=w.get(S);return M||(M=new RegExp(`<\\s*\\/\\s*${S}\\s*>`,"i"),w.set(S,M)),M},_=[];for(let S=0;S0){const N=_[_.length-1],T=h[N.index],D=M.type==="html_block"?x(N.tag).exec(I):null;if(D){const R=D.index+D[0].length,q=I.slice(0,R),j=I.slice(R);T.content=`${String(T.content??"")} +${q}`,Array.isArray(T.children)&&T.children.push({type:"html_inline",content:``,raw:``}),_.pop();const H=d(T,j)?[]:u(j,c(h,S,"paragraph"));H.length?h.splice(S,1,...H):(h.splice(S,1),S--);continue}if(M.type!=="inline")continue;const P=Array.isArray(M.children)?M.children:[],O=ECe(P,N.tag);if(O!==-1){const R=P.slice(0,O+1),q=P.slice(O+1),j=R.map(H=>String(H?.content??H?.raw??"")).join("");if(T.content=`${String(T.content??"")} +${j}`,Array.isArray(T.children)&&T.children.push(...R),q.length){const H=q.map(z=>String(z.content??z.raw??"")).join("");if(H.trim()){const z=H.replace(/^\s+/,"");if(d(T,H))h.splice(S,1),S--;else if(z.startsWith("<"))h.splice(S,1,{type:"html_block",content:z});else{const W=u(H,c(h,S,"paragraph"));h.splice(S,1,...W)}}else h.splice(S,1),S--}else h.splice(S,1),S--;_.pop();continue}T.content=`${String(T.content??"")} +${I}`,Array.isArray(T.children)&&T.children.push(...P),h.splice(S,1),S--;continue}if(M.type!=="inline")continue;const L=Array.isArray(M.children)?M.children:[];for(const N of m)if((L.length?TCe(L,N):k(N).test(I)&&!x(N).test(I)?1:0)>0){_.push({tag:N,index:S});break}}}{let A=0;for(let w=0;w0?A--:(h.splice(w,1),w--))}}for(let A=0;A/]+)/)?.[1]??"").toLowerCase();if(M.startsWith("!")||M.startsWith("?")){w.loading=!1;continue}if(m.has(M)){const O=String(w.content??""),R=_s(O),q=R===-1?null:HM(O,M,R+1);w.loading=q?!1:w.loading!==void 0?w.loading:!0;const j=q?.start??-1,H=q?q.end-q.start:0;if(j!==-1){const z=O.slice(0,j+H);let W="";R!==-1&&R]+)))?/g;let L;for(;(L=I.exec(w.content||""))!==null;)L[1],L[2]||L[3]||L[4];const N=String(w.content??""),T=new RegExp(`<\\/\\s*${M}\\s*>`,"i").exec(N),D=T?T.index:-1,P=T?T[0].length:0;if(D!==-1){const O=N.slice(0,D+P),R=(N.slice(D+P)||"").replace(/^\s+/,"");w.children=[{type:"html_block",content:O,tag:M,loading:!1}],w.content=O,w.raw=O,R&&h.splice(A+1,0,R.startsWith("<")?{type:"html_block",content:R}:{type:"text",content:R,raw:R})}else w.children=[{type:"html_block",content:w.content,tag:M,loading:!0}];continue}if(!w||w.type!=="inline")continue;if(w.children.length===2&&w.children[0].type==="html_inline"){const M=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),I=w.children[1],L=String(I?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(I?.type==="html_inline"&&L===M)continue;g.has(M)?(w.children[0].loading=!0,w.children[0].tag=M,w.children.push({type:"html_inline",tag:M,loading:!0,content:``})):w.children=[{type:"html_block",loading:!0,tag:M,content:String(w.children[0]?.content??"")+String(w.children[1]?.content??"")}];continue}else if(w.children.length===3&&w.children[0].type==="html_inline"&&w.children[2].type==="html_inline"){const M=(w.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(g.has(M))continue;w.children=[{type:"html_block",loading:!1,tag:M,content:w.children.map(I=>I.content).join("")}];continue}if(!w.content?.startsWith("<")||w.children?.length!==1)continue;const k=String(w.content),x=w,_=x.children[0];if(_?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(k)&&(x.children.length=0);continue}const S=String(_.content??k).match(ICe)?.[1]?.toLowerCase()??"";if(S){if(/\/\s*>\s*$/.test(k)||IR.has(S)){x.children=[{type:"html_inline",content:k}];continue}x.children.length=0}}})}function jCe(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 HCe(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const i=n.tokens??[];for(let s=0;sa.trim().length>0);if(l.length===1&&!jCe(l[0]??"")){const a=l[0]??"",u=o.level??0;i.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 TR=/\.([a-z0-9]{1,15})$/i,WCe=/[_()[\]{}<>]/u,qCe=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,UCe=/[?#@]/u,KCe=/[\\/]/u,VCe=/^[\p{L}\p{N}./\\-]+$/u,ZCe=/^[A-Za-z0-9-]{1,63}$/u,GCe=/^xn--[a-z0-9-]{2,59}$/i,QCe=/^(?:[A-Z]{1,6}|\d{1,8})$/u,YCe=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,JCe=/文件名\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,XCe=/文件名\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,ewe=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,twe=2e3,nwe=512,iwe={},swe=new Set(["ai","md","py","rs","sh","zip"]),LR=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),owe=new Set([...LR,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),rwe=new Set(["com","dev","io","page","site"]),lwe=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),awe=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"]),Ld=new Map;function qM(e,t){if(!e||e.length>nwe)return t;for(Ld.set(e,t);Ld.size>twe;){const n=Ld.keys().next().value;if(!n)break;Ld.delete(n)}return t}function I0(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function zk(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return I0(n)?n:void 0}function UM(e,t){if(!I0(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 KM(e){const t=ug(e);return I0(t)?t:void 0}function uwe(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function VM(e,t){if(!I0(t))return;const n=String(e??"").trim().split(/\s+/u).map(uwe).filter(Boolean);if(n.length===0)return;const i={};return t?.filename&&n.every(s=>Q2(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(i.filename=!0),t?.explicitFilename&&i.filename&&(i.explicitFilename=!0),t?.marketTicker&&n.every(s=>Q2(s,{marketTicker:!0}))&&(i.marketTicker=!0),I0(i)?i:void 0}function qc(e,t=!1){let n;return{options(i){return t||i==null?UM(e,n):UM(e,zk(KM(i),VM(i,n)))},remember(i){const s=KM(i);n=t?zk(n,s):zk(s,VM(i,n))},reset(){n=void 0}}}function ZM(e){return ZCe.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function cwe(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return ZM(n)||GCe.test(n)?t.every(ZM):!1}function NR(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function dwe(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function fwe(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function FR(e,t,n){const i=dwe(t);return NR(e)&&fwe(i)&&String(n??"").toLowerCase().includes(i.toLowerCase())}function hwe(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 ug(e){const t=String(e??""),n=Ld.get(t);return n?(Ld.delete(t),Ld.set(t,n),n):hwe(t)?qM(t,{explicitFilename:JCe.test(t),filename:XCe.test(t),marketTicker:ewe.test(t)}):qM(t,iwe)}function pwe(e){return cwe(e.split(/[\\/]/)[0]??"")}function gwe(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function mwe(e){if(WCe.test(e)||!VCe.test(e))return!0;if(KCe.test(e))return!pwe(e);const t=e.replace(TR,"");return NR(t)?!0:t.split(".").filter(Boolean).some(gwe)}function vwe(e,t,n){if(!(n?owe:LR).has(t))return!1;const i=e.slice(0,-(t.length+1));return i===""?e.startsWith("."):(n?YCe:QCe).test(i)}function Q2(e,t={}){if(!e||qCe.test(e)||UCe.test(e))return!1;const n=e.match(TR);if(!n)return!1;const i=String(n[1]??"").toLowerCase();return vwe(e,i,t.marketTicker===!0)?!0:awe.has(i)?!swe.has(i)||t.filename?!0:mwe(e):!!(t.explicitFilename&&rwe.has(i)||t.filename&&lwe.has(i))}const DR=new WeakMap,BR=new WeakSet;function x8(e,t){return DR.set(e,t),e}function ywe(e){return DR.get(e)}function kwe(e){BR.add(e)}function bwe(e){return e===void 0||BR.has(e)}const GM=["!"];function QM(e){return e==="linkify"||e==="autolink"?e:"recovery"}function _r(e){return{type:"text",content:e,raw:e}}function hd(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 pd(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 Ru(e,t,n,i="recovery"){let s="";if(t.includes('"')){const o=t.split('"');t=o[0].trim(),s=o[1].trim()}return x8({type:"link",loading:n,href:t,title:s,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`},i)}function Awe(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(_r(t))}}function YM(e,t){let n=-1;for(const i of t){const s=e.indexOf(i);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function wwe(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(i=>i?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function JM(e,t,n){let i="";for(let s=t+1;s{const n=t.tokens??[];for(let i=0;ir.type==="code_inline"),i=new Map;let s=0;for(let r=0;r0&&u?XM(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 o=ug(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=XM(u);g!==-1&&(d===-1||g=m.content.length){h-=m.content.length;continue}if(h<0)break;const y=m.content[h],b=m.content.slice(0,h);let A=m.content.slice(h);for(let x=g+1;x0&&(e.splice(g+1,w),a=g+1);let k=c;if(y==="!"&&f!==-1)k=c.slice(0,f);else if(A){const x=encodeURI(A);if(x&&c.endsWith(x))k=c.slice(0,c.length-x.length);else{const _=y?encodeURI(y):"",S=_?c.indexOf(_):-1;S!==-1&&(k=c.slice(0,S))}}k!==c&&wwe(l,k),A&&e.splice(a+1,0,_r(A));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(Ru(u,c,f,"linkify"));const h=e[r+3].content?.replace(/^\)\**/,"");h&&a.push(_r(h)),e.splice(r-4,8,...a)}else a.push(x8({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`},"linkify")),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(b=>b[0]==="href")?.[1]||"",d=u.find(b=>b[0]==="title")?.[1]||"";let f=3,h=2;const g=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(g){h+=1;const b=g[1].length;hd(m,b)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let b=r+1;by[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(Ru(d,f,g)),pd(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=[];hd(d,2),d.push(Ru(u,c,!1)),pd(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 i=0;i{const n=t.tokens??[];for(let i=0;i=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y{const n=t;try{const i=Rwe(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(i)&&(n.tokens=i)}catch(i){console.error("[applyFixTableTokens] failed to fix table tokens",i)}})}function eI(){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 tI(){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 nI(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 $R(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(i=>i.trim().length>0)?n:null}function Rk(e){return $R(e)!==null}function zR(e){return/^:?-+:?$/.test(e.trim())}function Fwe(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(zR)}function Dwe(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Bwe(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(zR)&&Dwe(n)}function $we(e){return e==="|"||e==="|:"}function zwe(e){const t=$R(e);return t!==null&&t.every(n=>!n.includes(":"))}function Rwe(e,t=!1,n=""){const i=[...e];if(e.length<3)return i;const s=e.length-2,o=e[s];if(o.type==="inline"){const r=String(o.content??""),l=r.split(` +`)[0]??"",[a="",u="",...c]=r.split(` +`),d=!t&&!r.includes(` +`)&&/\r?\n$/.test(n)&&Rk(r);if(!t&&(r.includes(` +`)&&c.length===0&&Rk(a)&&Bwe(u)||d)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>nI(g)),h=[...eI(),...f,...tI()];i.splice(s-1,3,...h)}else if(r.includes(` +`)&&c.length===0&&Rk(a)&&Fwe(u)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>nI(g)),h=[...eI(),...f,...tI()];i.splice(s-1,3,...h)}else r.includes(` +`)&&c.length===0&&zwe(a)&&$we(u)&&(o.content=r.slice(0,-2),o.children.splice(2,1))}return i}function Owe(e,t,n,i){const s=e.length;if(n==="$$"&&i==="$$"){let u=t;for(;u=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const o=n[n.length-1],r=i;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===o?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var Pwe=Owe;const jwe=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],Y2=jwe.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),Hwe=/\\[a-z]+/i,RR="(?:\\\\|\\u0008)",Wwe=new RegExp(String.raw`${RR}(?:${Y2})\s*\{[^}]+\}`,"i"),qwe=new RegExp(String.raw`(?:${RR})?(?:${Y2})\s*\{`,"i"),Uwe=/\\(?:text|frac|left|right|times)/,Kwe=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,Vwe=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,Zwe=/[A-Z]+\s*\([^)]+\)/i,Gwe=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,Qwe=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,Ywe=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,Jwe={"\b":"\\b","\v":"\\v","\f":"\\f"};function Xwe(e){let t="";for(const n of e)t+=Jwe[n]??n;return t}function nc(e){if(!e)return!1;const t=Xwe(e),n=t.trim();if(Ywe.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const i=Hwe.test(t),s=Wwe.test(t),o=qwe.test(t),r=Uwe.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=Kwe.test(t)&&!Vwe.test(t),u=Zwe.test(t),c=Gwe.test(n),d=Qwe.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),h=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return i||s||o||r||l||a||u||c||d||f||h}const OR="__markstreamMathPluginApplied",S8=80,PR=2e4,iI=PR+4096;function fA(e){return!!e[OR]}function exe(e){e[OR]=!0}const jR=["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"],txe=["cdot","mathbf{","partial","mu_{"],HR=jR.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),WR="[ \r\b\f\v]",nxe=new RegExp(`([^\\\\])(${txe.map(e=>e).join("|")})+`,"g"),ixe=/span\{([^}]+)\}/,sxe=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,oxe=/(^|[^\\])\\\r?\n/g,rxe=/(^|[^\\])\\$/g,lxe=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,axe=new RegExp(`(${WR})|(${HR})\\b`,"g"),sI=new Map,oI=new Map;function uxe(e){if(!e)return axe;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),i=sI.get(n);if(i)return i;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,o=new RegExp(`(${WR})|(${s})\\b`,"g");return sI.set(n,o),o}function cxe(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const i=e?"__default__":n.join(""),s=oI.get(i);if(s)return s;const o=e?[Y2,HR].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),Y2].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${o})\\s*\\{`,"g");return oI.set(i,r),r}const rI={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function lI(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function dxe(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&lxe.test(n))return t;const i=n?t.slice(n.length):t;return`${n}${"\\!".repeat(i.length)}`})}function aI(e){const t=/(^|[^\\])(__|\*\*)/g;let n,i=null;for(;(n=t.exec(e))!==null;)i={marker:n[2],index:n.index+(n[1]?.length??0)};return i}function Ou(e,t){const n=t?.commands??jR,i=t?.escapeExclamation??!0,s=t?.commands==null,o=uxe(s?void 0:n);let r=e.replace(o,(u,c,d,f,h)=>{if(c!==void 0&&rI[c]!==void 0)return`\\${rI[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});i&&(r=dxe(r));let l=r;const a=cxe(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(ixe,"span\\{$1\\}").replace(sxe,"\\operatorname{span}\\{$1\\}"),l=l.replace(oxe,`$1\\\\ +`),l=l.replace(rxe,"$1\\\\"),l=l.replace(nxe,"$1\\$2"),l}function uI(e){const t=e.trim();return!(!nc(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 qR(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[o]==="\\"&&o+10;){if(e[l]==="\\"&&l+1=0&&e[n]==="\\";)i++,n--;return i%2===1}function _8(e,t){let n=t;for(;n0&&e[i-1]==="$"||i+1=l)break;const u=J2(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}cg(e,a)||o++,r=a+Math.max(1,t.length)}return o}function hA(e,t,n){const i=T0(String(e??""));if(!i.endsWith(t))return-1;const s=i.length-t.length;if(s<=0||!T0(i.slice(0,s)).trim()||cg(i,s))return-1;const o=qR(i);if(J2(o,s))return-1;const r=cI(i,t,0,s,o);if(t==="$$"){if(r%2===1)return-1}else if(r>cI(i,n,0,s,o))return-1;return s}function E0(e){return e===" "||e===" "}function T0(e){let t=e.length;for(;t>0&&E0(e[t-1]);)t--;return e.slice(0,t)}function dI(e){let t=0;for(let n=0;n=48&&t<=57}function hxe(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let i=0;i=3}function pxe(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let i=0;for(;t[n]==="-";)i++,n++;return i<3?!1:(t[n]===":"&&n++,n===t.length)}function gxe(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(pxe)}function mxe(e){let t=0;if(!fI(e[t]))return!1;for(;fI(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:E0(e[t+1])}function UR(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&&E0(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&E0(t[1])||mxe(t)||hxe(t)||gxe(t))}function hI(e,t){return e?t?`${e} +${t}`:e:t}function M8(e){const t=String(e??"").trim();return t?nc(t):!1}function pI(e){let t=0;for(let n=0;nS8){h=!0;break}const m=s[g],y=nh(m,c);if(y!==-1){const b=hI(f,m.slice(0,y));if(!M8(b)){h=!0;break}const A=m.slice(y+c.length),w=A.trim()?`suffix:${pI(A)}`:"nosuffix";return["closed",u,i+l,d,i+g,y,pI(b),w].join(":")}if(UR(m)){h=!0;break}if(f=hI(f,m),f.length>PR){h=!0;break}}if(!h&&M8(f))return["pending",u,i+l,d].join(":")}}return null}function Pk(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function yxe(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const i=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(i)?!1:i===""||/^[)\s,.!?;:]/.test(i)}function jk(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function kxe(e,t){exe(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)},i=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(A,w)=>{let k=w;for(;k=3&&(!k||/\s/.test(k))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,A),a.pos=A,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],h=String(a.pending??""),g=Math.max(0,a.pos-h.length);let m=g,y=g;const b=g;for(const[A,w]of f){const k=a.src,x=qR(k),_=fxe(k,c);let S=!1;A==="$$"&&m!==b&&(m=b);let M=-1,I=-1,L=0;const N=T=>{if((T==="undefined"||T==null)&&(T=""),T==="\\"){a.pos=a.pos+T.length,m=a.pos;return}if(T==="\\)"||T==="\\("){const O=a.push("text_special","",0);O.content=T==="\\)"?")":"(",O.markup=T,a.pos=a.pos+T.length,m=a.pos;return}if(!T)return;if(A==="$$"&&T.includes("$")){let O=0;for(;O0&&T[R-1]==="$"||R+10){const q=T.slice(0,D),j=a.push("text","",0);j.content=q,a.pos=a.pos+q.length,m=a.pos}const O=T.slice(D).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(O){const[,q,j]=O,H=j.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),z=H?H[1]:j,W=H&&H[2]?H[2]:null,X=a.push("image","img",0);X.attrs=[["src",z],["alt",q]],W&&X.attrs.push(["title",W]),X.content=q,X.children=[{type:"text",content:q,tag:""}],a.pos=a.pos+O[0].length,m=a.pos;const U=T.slice(D+O[0].length);U&&N(U);return}const R=a.push("text","",0);R.content=T,a.pos=a.pos+T.length,m=a.pos;return}const P=a.push("text","",0);P.content=T,a.pos=a.pos+T.length,m=a.pos};for(;!(m>=k.length);){const T=k.indexOf(A,m);if(T===-1)break;if(cg(k,T)){m=T+Math.max(1,A.length);continue}const D=J2(x,T);if(D){m=D[1];continue}const P=J2(_,T);if(P){m=P[1];continue}if(T===M&&m===I){if(L++,L>2){m=T+Math.max(1,A.length);continue}}else L=0,M=T,I=m;if(A==="("&&T>0){let U=T-1;for(;U>=0&&k[U]===" ";)U--;if(U>=0&&k[U]==="]"){m=T+A.length;continue}}if(A==="$"&&T>0&&k[T-1]==="$"){m=T+1;continue}if(A==="$"&&T=k.length);){const D=_8(k,T);if(D===-1)break;if(D+10&&k[D-1]==="$"){T=D+1;continue}const P=Ok(k,D+1);if(P===-1)break;const O=k.slice(D+1,P),R=O.includes("`"),q=!O||!O.trim(),j=k[P+1],H=Pk(O,j),z=jk(O);if(!R&&!q&&!H&&!z){const W=k.slice(m,D);W&&N(W);const X=a.push("math_inline","math",0);X.content=Ou(O,t),X.markup="$",X.raw=`$${O}$`,X.loading=!1,m=P+1,T=P+1}else N("$"),T=D+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(),y=!1,b="",A="",w=!1,k="",x=!1;for(const[W,X]of h)if(m.startsWith(W))if(W.includes("[")){const U=W==="\\["?m.slice(W.length):"";if(W==="\\["&&nh(U,X)===-1&&!/^\s*!\[/.test(U)&&!U.includes("`")&&nc(U)){y=!0,b=W,A=X;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1=0?"\\]":A,L=M>=0?M:nh(m,A,S);if(!w&&L>b.length){const W=m.slice(_+b.length,L),X=c.push("math_block","math",0);X.content=Ou(W),X.markup=b==="$$"?"$$":b==="["?"[]":"\\[\\]",X.map=[l,l+1],X.raw=`${b}${W}${I}`,X.block=!0,X.loading=!1,c.line=l+1;const U=m.slice(L+I.length);return U.trim()&&n(c,U,l),!0}let N=l,T="",D=!1,P="",O=l;const R=w?m:m===b?"":m.slice(b.length),q=!f&&b==="\\["?"]":"",j=nh(R,A);if(j!==-1){const W=j;T=R.slice(0,W),P=R.slice(W+A.length),O=w?l+1:l,D=!0,N=O}else for(R&&!w&&(T=R),N=l+1;N{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",i),e.block.ruler.before("lheading","explicit_math_block",o,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function bxe(e){const t=e.renderer.rules.image||function(n,i,s,o,r){const l=n,a=r;return a.renderToken?a.renderToken(l,i,s):""};e.renderer.rules.image=(n,i,s,o,r)=>{const l=n;return l[i].attrSet?.("loading","lazy"),t(l,i,s,o,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,i)=>{const s=n[i],o=String(s.info??"").trim();return`
      ${e.utils.escapeHtml(String(s.content??""))}
      `})}const Axe=/^\s]/i,Cxe=/^<\/a\s*>/i;function wxe(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.test(String(e.content??""));let i=0;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==o.level&&n[s]?.type!=="link_open";)s--;continue}if(o?.type==="html_inline"){const r=String(o.content??"");Axe.test(r)&&i>0&&i--,Cxe.test(r)&&i++}if(!(i>0)&&o?.type==="text"&&t.test(String(o.content??"")))return!0}return!1}function xxe(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(i=>i.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",i=>{if(!i.md?.options?.linkify)return;const s=Array.isArray(i.tokens)?i.tokens:[],o=i.md.linkify;if(!o)return;const r=s.filter(l=>wxe(l,o));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(i)),i,{tokens:r}))})}function Sxe(e){const t=e.inline.ruler,n=t.getNamedRules?.(),i=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof i!="function"||typeof s!="function")return;const o=e.validateLink,r=e;r.__markstreamOriginalValidateLink=o,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===o?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return i(...l);const c=a.validateLink;a.validateLink=u;try{return i(...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=o;try{return s(...l)}finally{a.validateLink=u}})}function _xe(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},i=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),o=new X7e({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:i,...n}});if(!s){const r=l=>!qd(l,{tagName:"a",attrName:"href"});kwe(r),o.set({validateLink:r})}return Sxe(o),xxe(o),(e.enableMath??!0)&&kxe(o,{...e.mathOptions??{}}),(e.enableContainers??!0)&&kCe(o),e.enableFixIndentedCodeBlock!==!1&&HCe(o),xwe(o),Iwe(o),_we(o),Nwe(o),bxe(o),PCe(o,{customHtmlTags:e.customHtmlTags}),o}function Ud(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=>Ud(n))),t}function Mxe(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function Ixe(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,i=n===""||n==="true";return{type:"checkbox_input",checked:i,raw:i?"[x]":"[ ]"}}function Exe(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function zm(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;on.startsWith(t)||t.startsWith(n)):!1}function gI(e,t,n,i){n.length>0&&e.push(...n),i.length>0&&t.push(...i),n.length=0,i.length=0}function mI(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function Fxe(e,t){const n=[],i=[],s=[],o=[],r=e.split(Lxe),l=/\r?\n$/.test(e),a=r.some(h=>h.startsWith("diff ")||h.startsWith("--- ")||h.startsWith("+++ ")||h.startsWith("@@ ")),u=h=>{const g=h;if(!ZR.some(m=>g.startsWith(m)))if(g.startsWith("-")){const m=g.slice(1);s.push(mI(m,a))}else if(g.startsWith("+")){const m=g.slice(1);o.push(mI(m,a))}else{gI(n,i,s,o);const m=a&&g.startsWith(" ")?g.slice(1):g;n.push(m),i.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let h=0;h0||o.length>0)&&gI(n,i,s,o);const d=n.join(` +`),f=i.join(` +`);return{original:t&&l&&d?`${d} +`:d,updated:t&&l&&f?`${f} +`:f}}function pA(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},i=typeof n.closed=="boolean"?n.closed:void 0,s=i===!0||i!==!1&&t,o=String(e.info??""),r=o.startsWith("diff"),l=r?(()=>{const u=o,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():o;let a=String(e.content??"");if(!s&&e.markup){const u=e.markup[0],c=e.markup.length,d=Txe(u,c);d.test(a)&&(a=a.replace(d,""))}if(r){const{original:u,updated:c}=Fxe(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t}}function Dxe(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function Bxe(){return{type:"hardbreak",raw:`\\ +`}}function $xe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o\s*$/.test(t)||Sc.has(e)}function zxe(e){if(!e||e.length===0)return vI();const t=Wk.get(e);if(t)return t;const n=e.map(Nl).filter(Boolean);if(!n.length){const s=vI();return Wk.set(e,s),s}const i={customTagSet:new Set(n),allowedTagSet:x9({customHtmlTags:e})};return Wk.set(e,i),i}function JR(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function Rxe(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,i=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof i=="string"?{raw:n,inner:i}:null}function X2(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function Oxe(e,t,n){const i=e.slice();return X2(i,"href")||i.push(["href",t]),n!=null&&!X2(i,"title")&&i.push(["title",n]),i}function I8(e){return e.map(JR).join("")}function wv(e){const t=[],n=i=>{const s=String(i??"");if(!s)return;const o=t[t.length-1];if(o?.type==="text"){o.content=`${o.content}${s}`,o.raw=`${o.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const i of e)if(i){if(i.type==="reference"||i.type==="footnote_reference"){n(String(i.raw??""));continue}if("children"in i&&Array.isArray(i.children)){t.push({...i,children:wv(i.children)});continue}t.push(i)}return t}function Pxe(e,t,n){let i=0;for(let s=t;s`;m.toLowerCase().includes(x.toLowerCase())||(m+=x),b=!0,y=!0}const A=[],w=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let k;for(;(k=w.exec(l))!==null;){const x=k[1],_=k[2]||k[3]||k[4]||"";A.push([x,_])}if(u?.has(a)){const x=Rxe(e);return[{type:a,tag:a,attrs:A,content:x?x.inner:h.innerTokens.length?I8(h.innerTokens):"",children:h.innerTokens.length?i(h.innerTokens,s,o,r):[],raw:x?.raw??m,loading:e.loading||y,autoClosed:b},h.nextIndex]}return[{type:"html_inline",tag:a,attrs:A,content:m,children:g,raw:m,loading:y,autoClosed:b},h.nextIndex]}function XR(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=>XR(t)).join(""):String(e.content??"")}function Hxe(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>XR(t)).join("")}function yI(e,t=!1){let n=e.attrs??[],i=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,i=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),o=n.find(d=>d[0]==="alt")?.[1],r=Hxe(i??e);let l="";r?l=r:o!=null&&String(o).length>0?l=String(o):i?.content!=null&&String(i.content).length>0?l=String(i.content):Array.isArray(i?.children)&&i.children[0]?.content?l=String(i.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 Wxe(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function qxe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function Kxe(e,t,n){const i=e.slice();return ey(i,"href")||i.push(["href",t]),n!=null&&!ey(i,"title")&&i.push(["title",n]),i}function Rm(e,t,n){const i=e[t],s=Uxe(i.attrs),o=String(ey(s,"href")??""),r=ey(s,"title"),l=r==null?null:String(r),a=Kxe(s,o,l);let u=t+1;const c=[];let d=!0;for(;uy.type==="strong_open")){const y=String(h.content??""),b=String(h.raw??y),A=Ud(h);A.content=y.slice(0,-2),A.raw=b.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=A}const g=ps(f,void 0,void 0,n),m=g.map(y=>{const b=y;return"content"in y?String(b.content??""):String(b.raw??"")}).join("");return{node:{type:"link",href:o,title:l,text:m,children:g,raw:`[${m}](${o}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u0?i:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:o0?i:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:o?@[\\\]^_`{|}~]/,oSe=/\p{P}/u,rSe=/^[\x22\x27《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,lSe=/^[\x22\x27》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,aSe=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,uSe=/:\/\//,E8=1,eO=2,cSe=4,dSe=8,tO=16,Ku=32,xv=64,gp=128,nO=256,fSe=512,mp=1024,hSe=1982;function Om(e){let t=0;for(let n=0;n=t){n++,i++;continue}n++,i++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function _c(e){return!!e&&iSe.test(e)}function Mc(e){return!!e&&(sSe.test(e)||oSe.test(e))}function sO(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&rSe.test(e)}function oO(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&lSe.test(e)}function gSe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!i||_c(i)?!1:!(Mc(i)&&!sO(i,n)&&n&&!_c(n)&&!Mc(n))}function mSe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!n||_c(n)?!1:!(Mc(n)&&!oO(n,i)&&i&&!_c(i)&&!Mc(i))}function vSe(e,t,n=0){let i=n,s=!1;for(;i0?e[t-1]:void 0,i=e[t+2];return!i||_c(i)?!1:!(Mc(i)&&!sO(i,n)&&n&&!_c(n)&&!Mc(n))}function kSe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!n||_c(n)?!1:!(Mc(n)&&!oO(n,i)&&i&&!_c(i)&&!Mc(i))}function bSe(e,t=0){let n=t,i=!1;for(;n=0&&e[o]==="\\";o--)s++;return s%2===1}const xSe=/[\p{L}\p{N}]/u,SSe=/^[\p{L}\p{N}]+$/u;function T8(e){return e?xSe.test(e):!1}function rO(e){return e?SSe.test(e):!1}function Rp(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&i.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return i;n=i+s.len}return-1}function ESe(e){return e?aSe.test(e)||uSe.test(e):!1}function TSe(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function ps(e,t,n,i){if(!e||e.length===0)return[];const s=i?.__linkifyDemotionContext,o=ug(t),r={filename:s?.filename||o.filename,explicitFilename:s?.explicitFilename||o.explicitFilename,marketTicker:s?.marketTicker||o.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(i={...i,__linkifyDemotionContext:r});const l=i,a=[];let u=null,c=0;const d=i?.requireClosingStrong,f=e;function h(){return e===f&&(e=e.slice()),e}function g(){u=null}function m(J,ve){const G=e.length===1?t:String(ve.content??""),ue=[],Ae=_Se(J);if(Ae!==-1){x(J.slice(0,Ae),J.slice(0,Ae));const re=J.slice(Ae);return re&&(N({type:"text",content:re,raw:re}),c--),c++,!0}if(Xxe.test(J)){const re=J.indexOf("~~");re!==-1&&ue.push({type:"strikethrough",index:re})}if(eSe.test(J)){const re=J.indexOf("**");re!==-1&&ue.push({type:"strong",index:re})}if(/[^*]*\*[^*]+/.test(J)){const re=G?iO(G,0):J.indexOf("*");if(G&&re===-1)return!1;re!==-1&&ue.push({type:"emphasis",index:re})}ue.sort((re,Q)=>re.index!==Q.index?re.index-Q.index:re.type===Q.type?0:re.type==="strong"?-1:Q.type==="strong"?1:0);const ae=ue[0];if(!ae)return!1;if(ae.type==="strikethrough"){const re=ae.index,Q=re>-1?J.slice(0,re):"";if(Q&&x(Q,Q),re===-1)return c++,!0;const oe=J.indexOf("~~",re+2),ge=oe===-1?J.slice(re+2):J.slice(re+2,oe),be=oe===-1?"":J.slice(oe+2),{node:Le}=bI([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:ge,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,i);return g(),k(Le),be&&(N({type:"text",content:be,raw:be}),c--),c++,!0}if(ae.type==="strong"){const re=ae.index,Q=re>-1?J.slice(0,re):"";if(Q&&x(Q,Q),re===-1)return c++,!0;if(t&&re===0){let we=!1,xe=0;for(;xe=2)return x(J,J),c++,!0}}if(t&&(J.match(/\*/g)||[]).length>pSe(t))return x(J.slice(Q.length),J.slice(Q.length)),c++,!0;const oe=Rp(J,re);if(oe.len>=3){const we=ISe(J,re+oe.len);if(we!==-1){const xe=J.slice(re+oe.len,we);if(MSe(xe)){const{node:ze}=P1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:xe,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,i);g(),k(ze);const st=J.slice(we+3);return st&&(N({type:"text",content:st,raw:st}),c--),c++,!0}}}if(!ySe(J,re)){const we=J.slice(re,re+oe.len);x(we,we);const xe=J.slice(re+oe.len);return xe&&(N({type:"text",content:xe,raw:xe}),c--),c++,!0}const ge=bSe(J,re+2);let be="",Le="";if(ge.index!==-1){be=J.slice(re+2,ge.index),Le=J.slice(ge.index+2);const we=ge.index,xe=Rp(J,we);if(oe.intraword&&xe.intraword&&!rO(be)||!be&&oe.len>=4&&oe.intraword)return x(J.slice(Q.length),J.slice(Q.length)),c++,!0}else{if(d||ge.sawInvalidClose||oe.intraword)return x(J.slice(Q.length),J.slice(Q.length)),c++,!0;be=J.slice(re+2),Le=""}if(!be&&/^\*+$/.test(Le))return x(J,J),c++,!0;const{node:Oe}=P1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:be,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,i);return g(),k(Oe),Le&&(N({type:"text",content:Le,raw:Le}),c--),c++,!0}if(ae.type==="emphasis"){let re=ae.index;re===-1&&(re=0);const Q=J.slice(0,re);if(Q&&x(Q,Q),!gSe(J,re)){x(J[re],J[re]);const we=J.slice(re+1);return we&&(N({type:"text",content:we,raw:we}),c--),c++,!0}const oe=Rp(J,re),ge=vSe(G,J,re+1),be=ge.index,Le=e[c+1];if(i?.final&&Le?.type==="em_open"&&be!==-1&&J.slice(re+1,be).trim()!==J.slice(re+1,be)||be===-1&&(ge.sawInvalidClose||i?.final||oe.intraword||!T8(J[re+1])))return x(J.slice(re),J.slice(re)),c++,!0;const{node:Oe}=zm([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:be>-1?J.slice(re+1,be):J.slice(re+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,i);if(g(),k(Oe),be!==-1&&be{for(let Oe=0;Oe=0&&Le[xe]==="\\";xe--)we++;if(we%2===0)return Oe}return-1})(J);if(ue===-1)return!1;let Ae=1;for(let Le=ue+1;Leae?.type==="math_inline")||!tSe.test(J))return null;const G=ve.parseInline(J,{__markstreamFinal:!!i?.final});if(!Array.isArray(G)||G.length===0)return null;const ue=(G.find(ae=>ae?.type==="inline")?.children??[]).filter(ae=>!(ae?.type==="text"&&String(ae.content??"")===""));if(!ue.length||!ue.some(ae=>ae?.type!=="text")||ue.length===1&&ue[0]?.type==="text"&&String(ue[0].content??"")===J)return null;const Ae=ps(ue,J,n,i);return Ae.length?Ae:null}function A(J){g(),a.push(J)}function w(J){g();const ve=Ud(J);a.push(ve)}function k(J){A(J)}function x(J,ve){u?(u.content+=J,u.raw+=ve??J):(u={type:"text",content:String(J??""),raw:String(ve??J??"")},a.push(u))}function _(J,ve){if(!J)return;const G=ps([{...ve,type:"text",content:J,raw:J}],J,n,i);if(G.length===1&&G[0]?.type==="text"){const ue=G[0];x(String(ue.content??""),String(ue.raw??ue.content??""));return}for(const ue of G)k(ue)}function S(J,ve){return String(J.markup??"").startsWith(ve)}function M(J){if(!u||J.loading!==!0||J.markup!=="\\(\\)")return;const ve=e[c-1];!ve||ve.type!=="text"||!S(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(J){return J.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 L(J,ve,G=Om(J)){let ue=J;const Ae=String(ve.content??"");return(G&E8)!==0&&ue.endsWith("\\")&&!S(ve,"\\\\")&&!Ae.endsWith("\\\\")&&(ue=ue.slice(0,-1)),(G&mp)!==0&&ue.endsWith("(")&&!S(ve,"\\(")&&!Ae.endsWith("\\(")&&(ue=ue.slice(0,-1)),(G&eO)!==0&&/\*+$/.test(ue)&&!S(ve,"\\*")&&!Ae.endsWith("\\*")&&(ue=ue.replace(/\*+$/,"")),ue}for(;c=0;we--){const xe=a[we];if(xe.type!=="text")break;oe=we,ge=String(xe.content??"")+ge}oeoe==="href")?.[1],Q=String(re??"");if(t&&Q){const oe=t.indexOf("](");if(oe!==-1){const ge=t.indexOf(")",oe+2);ge===-1?G.loading=!0:G.loading&&t.slice(oe+2,ge).includes(Q)&&(G.loading=!1)}}/^file:\/\/\/[a-z]:\//i.test(G.href)&&z(G,ve-1)||q(G)||A(G)}function O(J){if(J.markup!=="linkify")return!1;const{node:ve,nextIndex:G}=Rm(e,c,i);return H(ve,G)?(c=G,!0):!1}function R(J){g(),k(Vxe(J)),c++}function q(J){if(J.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 ue=J,Ae=String(ue.href??""),ae=String(ue.text??""),re=String(G[2]??""),Q=Ae.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!Ae||!(ae===Ae||ae===Q||ESe(ae)))return!1;const oe=String(G[1]??"");return oe?(ve.content=oe,ve.raw=oe):a.pop(),A({...J,text:re,children:[{type:"text",content:re,raw:re}],raw:`[${re}](${Ae}${ue.title?` "${ue.title}"`:""})`}),!0}function j(J){if(J.type!=="link")return!1;const ve=J,G=String(ve.href??"");return G?H({href:G,title:ve.title==null||ve.title===""?null:String(ve.title),loading:!!ve.loading},c+1):!1}function H(J,ve){const G=a[a.length-1];if(G?.type!=="image"||G.src||!G.loading||!String(G.raw??"").endsWith("]("))return!1;const ue=e[ve],Ae=String(ue?.content??"");if(ue?.type!=="text"||!Ae.startsWith(")"))return!1;a.pop(),u=null;const ae=String(G.alt??"");A({type:"image",src:J.href,alt:ae,title:J.title,raw:`![${ae}](${J.href}${J.title?` "${J.title}"`:""})`,loading:!!J.loading});const re=Ae.slice(1),Q=Ud(ue);return Q.content=re,Q.raw=re,h()[ve]=Q,!0}function z(J,ve=c-1){if(J.type!=="link")return!1;const G=a[a.length-1],ue=e[ve];if(!G||G.type!=="text"||ue?.type!=="text")return!1;const Ae=String(G.content??""),ae=String(ue.content??"");if(!Ae.endsWith("!")||!ae.endsWith("!")||S(ue,"\\!"))return!1;const re=Ae.slice(0,-1);re?(G.content=re,G.raw=re,u=G):(a.pop(),u=null);const Q=J,oe=String(Q.text??Q.children?.map(Le=>String(Le?.content??Le?.raw??"")).join("")??""),ge=String(Q.href??""),be=Q.title==null||Q.title===""?null:String(Q.title);return A({type:"image",src:ge,alt:oe,title:be,raw:`![${oe}](${ge}${be?` "${be}"`:""})`,loading:!!Q.loading}),!0}function W(J,ve="",G=null){const ue=String(J.alt??J.raw??"");return{type:"link",href:ve,title:G,text:ue,children:[J],raw:`[${ue}](${ve}${G?` "${G}"`:""})`,loading:!0}}function X(J){const ve=J.startsWith("![")?J:`![${J}`,G=ve.slice(2),ue=G.indexOf("](");return{type:"image",src:"",alt:ue===-1?G.replace(/\]$/,""):G.slice(0,ue),title:null,raw:ve,loading:!0}}function U(J){const ve=J.indexOf("[![");if(ve===-1||typeof t=="string"&&e.length===1&&wSe(t,ve,"["))return!1;const G=J.slice(0,ve);return G&&x(G,G),A(W(X(J.slice(ve+1)))),c++,!0}function ne(J){if(i?.final)return!1;const ve=e[c-1];if(ve?.type!=="text"||!String(ve.content??"").endsWith("[")||S(ve,"\\["))return!1;const G=a[a.length-1];if(G?.type==="text"&&G.content.endsWith("[")){const ue=G.content.slice(0,-1);ue?(G.content=ue,G.raw=ue,u=G):(a.pop(),u=null)}return A(W(yI(J))),c++,!0}function le(J){if(J.type!=="link")return!1;const ve=J,G=String(ve.raw??""),ue=String(ve.text??"");if(!G.startsWith("[![")&&!ue.startsWith("!["))return!1;const Ae=ve.title==null||ve.title===""?null:String(ve.title);return A(W({type:"image",src:String(ve.href??""),alt:ue.replace(/^!\[/,"").replace(/\]$/,""),title:Ae,raw:G.startsWith("[![")?G.slice(1):G,loading:!0})),!0}function Z(J){if(!J.startsWith("]("))return!1;const ve=e[c-2];if(ve?.type==="text"&&String(ve.content??"").endsWith("[")&&S(ve,"\\["))return!1;const G=a[a.length-1];if(G?.type!=="image"&&G?.type!=="link")return!1;const ue=G,Ae=G?.type==="link"&&Array.isArray(ue.children)&&ue.children.length===1&&ue.children[0]?.type==="image"?a.pop():null,ae=Ae?Ae.children[0]:a.pop();if(!ae||ae.type!=="image")return!1;const re=e[c+1];let Q=String(Ae?.href??""),oe=Ae?.title==null?null:String(Ae.title),ge=!0;if(re?.type==="link_open"){const{node:Le,nextIndex:Oe}=Rm(e,c+1,i);Q=Le.href,oe=Le.title,ge=!0,c=Oe}else{if(Q=J.slice(2),Q.includes('"')){const Le=Q.split('"');Q=String(Le[0]??"").trim(),oe=Le[1]==null?null:String(Le[1]).trim()}c++}const be=W(ae,Q,oe);return be.loading=ge,A(be),!0}function se(){const J=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&J?.type==="text"&&String(J.content??"").endsWith("[")&&S(J,"\\[")}function ie(J,ve){const G=J.indexOf("[");if(G===-1)return!1;let ue=J.slice(0,G);const Ae=J.indexOf("](",G);if(Ae!==-1){const ae=e[c+2];let re=J.slice(G+1,Ae);if(re.includes("[")){const we=re.indexOf("[");ue+=J.slice(0,G+we+1);const xe=G+we+1;re=J.slice(xe+1,Ae)}const Q=e[c+1];if(J.endsWith("](")&&Q?.type==="link_open"&&ae){const we=e[c+4];let xe=4,ze=!0;if(we?.type==="text"){const dt=String(we.content??"");if(dt.startsWith(")")){ze=!1;const wt=dt.slice(1);if(wt){const Nt=Ud(we);Nt.content=wt,Nt.raw=wt,h()[c+4]=Nt}else xe++}else dt==="."&&xe++}_(ue,ve);const st=String(ae.content??"");return i?.validateLink&&!i.validateLink(st)?x(re,re):A({type:"link",href:st,title:null,text:re,children:[{type:"text",content:re,raw:re}],loading:ze}),c+=xe,!0}const oe=J.indexOf(")",Ae),ge=oe!==-1?J.slice(Ae+2,oe):"",be=oe===-1;let Le=ue.match(/\*+$/);if(Le&&(ue=ue.replace(/\*+$/,"")),_(ue,ve),Le||(Le=re.match(/^\*+/)),!d&&Le){const we=Le[0].length;re=re.replace(/^\*+/,"").replace(/\*+$/,"");const xe=[];if(we===1?xe.push({type:"em_open",tag:"em",nesting:1}):we===2?xe.push({type:"strong_open",tag:"strong",nesting:1}):we===3&&(xe.push({type:"strong_open",tag:"strong",nesting:1}),xe.push({type:"em_open",tag:"em",nesting:1})),xe.push({type:"link",href:ge,title:null,text:re,children:[{type:"text",content:re,raw:re}],loading:be}),we===1){xe.push({type:"em_close",tag:"em",nesting:-1});const{node:ze}=zm(xe,0,i);k(ze)}else if(we===2){xe.push({type:"strong_close",tag:"strong",nesting:-1});const{node:ze}=P1(xe,0,void 0,i);k(ze)}else if(we===3){xe.push({type:"em_close",tag:"em",nesting:-1}),xe.push({type:"strong_close",tag:"strong",nesting:-1});const{node:ze}=P1(xe,0,void 0,i);k(ze)}else{const{node:ze}=zm(xe,0,i);k(ze)}}else i?.validateLink&&!i.validateLink(ge)?x(re,re):A({type:"link",href:ge,title:null,text:re,children:[{type:"text",content:re,raw:re}],loading:be});const Oe=oe!==-1?J.slice(oe+1):"";return Oe&&(N({type:"text",content:Oe,raw:Oe}),c--),c++,!0}return!1}function he(J){const ve=J.indexOf("![");if(ve===-1)return!1;const G=J.slice(0,ve);return G&&!u?u={type:"text",content:G,raw:G}:G&&u&&(u.content+=G),u&&(a.push(u),u=null),A(X(J.slice(ve))),c++,!0}function Ee(J){if(!(J?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ve=J.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 A({type:"checkbox_input",checked:G,raw:G?"[x]":"[ ]"}),c++,!0}return!1}return a}function mA(e,t,n){const i=n?.__sourceLineMapper;if(!i)return{startLine:e,endLine:t};const s=i(e),o=t>e?i(t-1).endLine:i(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,o)}}function AI(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let i=0;for(let s=0;si&&e[s-1]!==` +`&&r++,{startLine:o,endLine:r}}function L0(e,t,n,i){const s=LSe(e,t,n);return mA(s.startLine,s.endLine,i)}function NSe(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const i=Number(n[0]),s=Number(n[1]);return!Number.isFinite(i)||!Number.isFinite(s)?null:mA(i,s,t)}function ti(e,t,n){if(!n?.includeSourceMap)return e;const i=NSe(t,n);if(!i)return e;if(e.sourceMap=i,e.type==="code_block"){const s=e;s.startLine=i.startLine,s.endLine=i.endLine}return e}function FSe(e,t,n,i){if(!i?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const o=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(o)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=mA(o,Math.max(r,l),i)),e}function DSe(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??""),r=o.replace(/[ \t\r\n]+$/g,"");if(r===o)break;if(r){s.content=r;break}i.pop();continue}break}}function BSe(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 i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(o)){i.pop();continue}const r=o.replace(/[ \t\r\n\d.)]+$/g,"");r!==o&&(r?s.content=r:i.pop())}break}}function $Se(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function l1(e,t,n){const i=e[t],s=[],o=qc(n,!0);let r=t+1;for(;rd.raw).join("")};n?.includeSourceMap&&ti(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:i.type==="ordered_list_open",start:(()=>{if(i.attrs&&i.attrs.length){const a=i.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&&ti(l,i,n),[l,r+1]}function zSe(e,t,n,i){const s=String(n[1]??"note"),o=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=qc(i,!0);let a=t+1;for(;au.raw).join(` +`)} +:::`},a+1]}const RSe=new Set(["warning","info","note","tip","danger","caution"]);function OSe(e){let t=0;for(;t=0;m--){const y=f[m];if(y.type==="text"&&/:+/.test(y.content)){h=m;break}}const g={type:"paragraph",children:ps((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&&ti(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]=l1(e,u,a.options());n?.includeSourceMap&&ti(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=a1(e,u,a.options());n?.includeSourceMap&&ti(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=A9(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:o,children:l,raw:`:::${s} ${o} +${l.map(d=>d.raw).join(` +`)} +:::`},u+1]}const jSe=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function HSe(e,t,n){const i=e[t];if(i.type!=="container_open")return null;const s=jSe.exec(String(i.info??""));return s?zSe(e,t,s,n):null}const vA={parseContainer:(e,t,n)=>PSe(e,t,n),matchAdmonition:HSe};function a1(e,t,n){const i=[],s=qc(n,!0);let o=t+1;for(;ol.raw).join(` +`)};return n?.includeSourceMap&&ti(r,e[t],n),[r,o+1]}function WSe(e){if(e.info?.startsWith("diff"))return pA(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let i=t;n?.[1]&&(i=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:i,raw:i,loading:!s}}function qSe(e,t,n){const i=[];let s=t+1,o=[],r=[];const l=qc(n,!0);for(;su.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a0&&(i.push({type:"definition_item",term:o,definition:r,raw:`${o.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` +`)}`}),o=[]),s=a+1}else s++;return[{type:"definition_list",items:i,raw:i.map(a=>a.raw).join(` +`)},s+1]}function USe(e,t,n){const i=e[t].meta??{},s=String(i?.label??"0"),o=[],r=qc(n,!0);let l=t+1;for(;la.raw).join(` +`)}`},l+1]}function KSe(e,t,n){const i=e[t],s=i.attrs,o=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(i.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...o?{attrs:o}:{},children:ps(a.children||[],u,void 0,n),raw:u}}function VSe(e,t,n){const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${i}(?=\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 lO(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!y.includes(">");else if(u)u=!y.includes("?>");else if(y.startsWith("");else if(y.startsWith("");else if(y.startsWith("");else{const b=s(y);if(b)if(b.closing){for(let A=r.length-1;A>=0;A--)if(r[A]===b.tag){r.length=A;break}}else b.selfClosing||o(b.after,b.tag)||r.push(b.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function N_e(e,t,n){if(!n?.length)return!1;const i=new Set(kf(n));if(!i.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===":"},o=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const y=c.indexOf(">",d);if(y===-1)return null;let b=y-1;for(;b>=0&&o(c[b]);)b--;return{closing:f,tag:g,selfClosing:!f&&c[b]==="/",after:c.slice(y+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=u1(h);if(g){const m=r(h.slice(g.index));if(m)if(m.closing){for(let y=a.length-1;y>=0;y--)if(a[y]===m.tag){a.length=y;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 F_e(e,t){const n=u_e.exec(e);if(!n)return null;const i=n[1]??"",s=n.index+i.length,o=e.indexOf(` +`,s),r=e.slice(s,o===-1?e.length:o);return!u1(r.endsWith("\r")?r.slice(0,-1):r)||vO(e,s)||L_e(e,s)||N_e(e,s,t)?null:`${e.slice(0,n.index)}${i}`}function xA(e,t,n){let i=t;for(;ii&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,o+=2;continue}o++;continue}if(t.inDollarMath){if(e.startsWith("$$",o)&&!xa(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,o+=2;continue}o++;continue}if(e[o]==="`"&&!xa(e,l)){const a=xA(e,o,"`"),u=yO(e,o+a,a);if(u===-1)break;o=u+a;continue}if(e.startsWith("\\[",o)&&!xa(e,l)){t.inMath=!0,t.mathOpenOffset=n+o,o+=2;continue}if(e.startsWith("$$",o)&&!xa(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+o,o+=2;continue}o++}return r}function D_e(e,t){if(!fA(t))return e;const n=t,i=_I.get(n),s=i?.source===e?i.state:i&&e.startsWith(i.source)?kO(i.state,e.slice(i.source.length),i.source.length-i.state.lineBuffer.length).state:w9(e).state;_I.set(n,{source:e,state:s});const{context:o}=s,r=o.inMath?o.mathOpenOffset:o.inDollarMath?o.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 nc(l)&&!c?e:e.slice(0,r)}function B_e(e,t,n,i,s){const o=bA(e),r=AA(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&CA(e)==null&&Gk(t),t.inFence&&t.fenceInList&&e.trim()&&o.column=t.fenceLen&&/^\s*$/.test(l.rest)&&Gk(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&&o.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return TI(e,t,n,i,s)}else return TI(e,t,n,i,s);return!1}function w9(e,t=__e(),n=null,i=!1,s=0){const o=Pp(t);let r=Pp(t),l="",a=!1,u=0;for(;uu&&e[c-1]==="\r"?c-1:d?c:e.length,h=e.slice(u,f);B_e(h,o,s+u,n,i)&&(a=!0),d?(r=Pp(o),l=""):l=h,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:o,lineBuffer:l}}}function kO(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:Pp(e.committedContext),context:Pp(e.context),lineBuffer:e.lineBuffer+t}}:w9(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function $_e(e,t){if(!fA(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const i=e,s=C9.get(i);if(s?.source===t)return;const o=s?t.startsWith(s.source):!1,r=o&&s?t.slice(s.source.length):"",l=o&&s?kO(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):w9(t),a=l.state,u=o&&s?l.closedOpenMath:!1;if(s&&o&&s.key===null&&s.pendingCandidate===!1&&!u&&!T_e(s.source,r)&&!I_e(t)){s.source=t,s.explicitBracketMath=a;return}const c=vxe(t);(s&&(s&&!o||s.key!==c||u)||!s&&c)&&n.reset(),M_e(e,t,c,a)}function z_e(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function bO(e,t){const n=e?.map,i=t?.map;return n===i?!0:!Array.isArray(n)||!Array.isArray(i)?!1:n.length===i.length&&n.every((s,o)=>s===i[o])}function R_e(e,t){const n=e?.attrs,i=t?.attrs;if(n===i)return!0;if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length)return!1;for(let s=0;s":""}function DI(e){return{type:"paragraph",children:e,raw:e.map(H_e).join("")}}function BI(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function $I(e,t){if(e.type!=="paragraph")return null;const n=e.children,i=Array.isArray(n)?n:[];if(i.length===0)return null;const s=A_e(t);if(!s?.size)return null;let o=-1;for(let c=0;ch?.type==="hardbreak")){o=c;break}}if(o===-1)return null;const r=i.slice(0,o),l=i[o];if(!l)return null;const a=[];r.length&&a.push(DI(r)),a.push(l);const u=i.slice(o+1);return u.length&&a.push(DI(u)),a}function W_e(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),i=/<\/html>\s*$/i.test(t);return!n||!i?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function jp(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function q_e(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*${oa(t)}\s*>\s*$`,"i").test(n)}const Yk=new Set(["iframe","script","style","textarea","title"]);function dg(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:w===-1?e.length:w+3,selfClosing:!1,tag:""}}const h=_s(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 y=m.slice(1).trimStart();const b=y.startsWith("/");b&&(y=y.slice(1).trimStart());const A=y.match(/^([A-Z][\w:-]*)/i);return A?.[1]?{closing:b,end:g,selfClosing:/\/\s*>$/.test(m),tag:A[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},o=(f,h)=>{const g=new RegExp(String.raw`<\s*\/\s*${oa(f)}(?=\s|>)`,"gi");g.lastIndex=h;const m=g.exec(e);if(!m||m.index==null)return null;const y=s(m.index);return y?{start:m.index,end:y.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(Yk.has(i)){const f=o(i,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 zI(e){return e.replace(/\r\n/g,` +`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function V_e(e,t,n){return n?e.includes(n,t)?!0:zI(e.slice(Math.max(0,t))).includes(zI(n)):!1}function Z_e(e,t){let n=Math.max(0,t);for(;n)`,"gi");let i=-1,s;for(;(s=n.exec(e))!==null;)i=s.index;return i}function CO(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Q_e=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),Y_e=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function J_e(e){return/\n\s*\n/.test(e)||Y_e.test(e)}function X_e(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(i=>Q_e.has(String(i?.type??"").toLowerCase()))||t.some(i=>{if(i?.type!=="html_block")return!1;const s=i;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!J_e(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function eMe(e){const t=[];let n=0;for(;n=e.length)break;const i=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!i?.[1])return null;const s=dg(e,i[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function tMe(e,t,n,i){const s=n.customHtmlTags?.join("\0")??"",o=t,r=SI.get(o),l=r&&r.final===i&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:Fh(u,t,n));return SI.set(o,{blocks:e,children:a,customHtmlTags:s,final:i,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function nMe(e,t,n,i){return e.map(s=>{if(s?.type!=="html_block")return s;const o=s,r=String(o.tag??"").toLowerCase();if(!r||r==="details"||AR.has(r)||Array.isArray(o.children))return s;const l=String(s.raw??o.content??"");if(!l)return s;const a=_s(l);if(a===-1)return s;const u=dg(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=CO(n,i),g=d?null:eMe(f),m=g?tMe(g,t,h,i):Fh(f,t,h);return X_e(f,m)?{...s,children:m}:s})}function iMe(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function Fh(e,t,n){return e.trim()?xO(e,t,{...n,__disableStreamParse:!0,__disableStructuredReuse:!0}):[]}function sMe(e,t,n){const i=Fh(e,t,n),s=i[0];return i.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:i}function oMe(e,t,n){const i=lO({content:e}),s=_s(e),o=AO(e,"summary");if(s!==-1&&o!==-1&&o>=s+1){const r=sMe(e.slice(s+1,o),t,n);r.length>0&&(i.children=r)}return i.raw=e,i}function rMe(e,t,n){const i=_s(e);if(i===-1)return[];const s=e.slice(i+1);if(!s.trim())return[];const o=dg(s,"summary",0);if(!o)return Fh(s,t,n);const r=s.slice(0,o.start),l=s.slice(o.end);return[...Fh(r,t,n),oMe(o.raw,t,n),...Fh(l,t,n)]}function wO(e,t,n,i,s,o=0){const r=[];let l=o;for(let a=0;a{const z=AO(f,"details");return z!==-1?f.slice(0,z):f})():f,[w]=wO(b?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,i,s,h+f.length),k=rMe(A,n,CO(i,s)),x=m===-1?"":String(e[m].raw??jp(e[m])??""),_=b||m!==-1&&y?.closed===!0,S=x.replace(/[\t\r\n ]+$/,""),M=_?(()=>{const z=(y?.raw??"").lastIndexOf(S);return z===-1?t.length:h+z})():t.length,I=_s(f),L=b&&I!==-1?h+I+1:h+f.length,N=t.slice(L,M===-1?t.length:M),T=n.parse(N,{__markstreamFinal:s}),D=n.renderer.render(T,n.options,{__markstreamFinal:s}),P=M+S.length,O=_?Math.max(M+x.length,Z_e(t,P)):t.length,R=_?t.slice(M,O):x,q=_?t.slice(h,O):t.slice(h),j=b&&I!==-1?f.slice(0,I+1):f,H={...u,tag:"details",attrs:b9(f.slice(0,I+1)),raw:q,content:`${j}${D}${R}`,children:[...k,...w],loading:!s&&!_};if(i.includeSourceMap&&(H.sourceMap=L0(t,h,_?O:t.length,i)),r.push(H),l=_?O:t.length,m===-1&&!b)break;m!==-1&&(a=m)}return[r,l]}function lMe(e,t,n,i){if(!n)return e;const s=e.slice();let o=0;for(let r=0;r=d.start&&I.end<=d.end){s.splice(_,1);continue}break}x=M+S.length,s.splice(_,1)}}return s}function aMe(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 y=m.charCodeAt(0);return y>=65&&y<=90||y>=97&&y<=122},c=m=>{const y=m.charCodeAt(0);return y>=48&&y<=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"||y==='"'||y==="'"||y==="`")break;a++}if(a>=l.length)return!0}}}return!0},i=(l,a)=>vO(l,a),s=String(e??""),o=s.lastIndexOf("<");if(o===-1||i(s,o))return s;if(o>0){const l=s[o-1],a=l===" "||l===" "||l===` +`||l==="\r",u=s[o-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(o);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` +`||r[1]==="\r")||!n(r)?s:s.slice(0,o)}function OI(e,t){if(e===t)return;const n=e.split(/\r?\n/),i=t.split(/\r?\n/),s=[];let o=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 i=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===":"},o=g=>{if(!g)return!1;if(g[0]===" ")return!0;let m=0;for(let y=0;y=4)return!0;continue}if(b===" ")return!0;break}return!1},r=g=>{let m=!1,y=!1;for(let b=0;b")return b}return-1},l=g=>{let m=0;for(;m{if(o(g))return-1;const y=g.replace(/^[ \t]+/,"");if(!y||y.startsWith(">")||y.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(y))return-1;let b=!1,A=0;for(;A=x.length){b=!0,A++;continue}const S=x[_];if(S==="!"||S==="?"){b=!0,A+=k+1;continue}if(S==="/"){b=!0,A+=k+1;continue}const M=_;for(;_"&&L!=="/"){b=!0,A++;continue}const N=new RegExp(String.raw`<\s*\/\s*${I}\s*>`,"i"),T=/\/\s*>$/.test(x),D=N.test(g.slice(A+k+1)),P=N.test(e.slice(m+A+k+1)),O=/[\r\n]/.test(e.slice(m+A+k+1));if(b&&n.has(I)&&!T&&!D&&(P||O))return A;b=!0,A+=k+1}return-1};let u=!1,c="",d=0,f="",h=0;for(;hh&&e[g-1]==="\r",b=m?y?g-1:g:e.length,A=e.slice(h,b),w=m?y?`\r +`:` +`:"",k=l(A);let x=A;if(!u&&!k){const _=a(A,h);if(_!==-1){const S=w||` +`;x=`${A.slice(0,_).replace(/[ \t]+$/,"")}${S}${S}${A.slice(_).replace(/^[ \t]+/,"")}`}}f+=x,f+=w,k&&(u?k.markerChar===c&&k.markerLen>=d&&/^\s*$/.test(k.rest)&&(u=!1,c="",d=0):(u=!0,c=k.markerChar,d=k.markerLen)),h=m?g+1:e.length}return f}function cMe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const i=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==="-"},o=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 y=m+1;for(;y=d.length||d[y]!=="/"){m=d.indexOf("<",m+1);continue}for(y++;yd.length){m=d.indexOf("<",m+1);continue}let b=!0;for(let w=0;w="A"&&k<="Z"?String.fromCharCode(k.charCodeAt(0)+32):k)!==g[w]){b=!1;break}}if(!b){m=d.indexOf("<",m+1);continue}let A=y+g.length;if(A")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 dMe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const i=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,y=e.slice(d,m),b=h?g?`\r +`:` +`:"",A=s(y),w=A?.prefix??"",k=A?.content??y,x=o(k);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 _=k;if(!l&&_.includes("{if(N.replace(/^[\t ]+/,"").startsWith("|"))return M;const T=N.slice(0,L).replace(/^[\t ]+/,"");if(T.length>0){const D=I.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",P=T.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!D||!P||D!==P)return M}return`${I} + +`});if(w){const S=w+_.split(` +`).join(` +${w}`);c+=S}else c+=_;c+=b,d=h?f+1:e.length}return c}function fMe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(T=>String(T??"").toLowerCase()));if(!n.size)return e;const i=T=>T===" "||T===" ",s=T=>{if(!T)return!1;if(T[0]===" ")return!0;let D=0;for(let P=0;P=4)return!0;continue}if(O===" ")return!0;break}return!1},o=T=>{const D=T.charCodeAt(0);return D>=65&&D<=90||D>=97&&D<=122||D>=48&&D<=57||T==="_"||T==="-"||T===":"},r=T=>{let D=0;for(;D{let D=0,P=!1,O=0;for(;D=T.length||T[D]!==">")break;for(P=!0,D++;Dr(T).startsWith("<"),u=T=>{for(let D=0;D{if(s(T))return"";const D=r(T);if(!D.startsWith("<"))return"";let P=1;for(;P=D.length||D[P]==="/"||D[P]==="!"||D[P]==="?")return"";const O=P;for(;P"&&q!=="/"?"":R},d=T=>{if(s(T))return null;const D=r(T);if(!D.startsWith("<"))return null;let P=1;for(;P=D.length)return null;const O=D[P]==="/";if(O)for(P++;P"&&H!=="/")return null;if(O)return{type:"close",name:j};if(/\/\s*>\s*$/.test(D))return{type:"open",name:j,complete:!0};const z=D.indexOf(">",P);if(z!==-1){const W=D.slice(z+1);if(new RegExp(`<\\s*\\/\\s*${j}\\s*>`,"i").test(W))return{type:"open",name:j,complete:!0}}return{type:"open",name:j,complete:!1}},f=T=>{if(s(T))return null;const D=r(T).replace(/[ \t]+$/,"");if(!D.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(D))return null;const P=D.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(P?.[1])return P[1].toLowerCase();const O=D.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!O?.[1]||!O[2])return null;const R=O[1].toLowerCase();return R===O[2].toLowerCase()?R:null};let h=!1,g="",m=0;const y=T=>{let D=0;for(;Dy(T),A=T=>{const D=r(T);return D?s(T)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(D):!1},w=(T,D,P)=>{let O=T,R=0;for(;OO&&e[q-1]==="\r",z=j?H?q-1:q:e.length,W=e.slice(O,z),X=l(W),U=X?.key??"";if(R>0&&D&&U!==D)break;const ne=X?.content??W,le=d(ne);if(le?.name===P){if(le.type==="open")le.complete||R++;else if(R>0&&(R--,R===0))return!1}else if(R>0&&(u(ne)||A(ne)))return!0;if(j)O=q+1;else break}return!1};let k="",x=0,_=!0,S=!1,M=!1,I=` +`;const L=[];let N="";for(;xx&&e[T-1]==="\r",O=D?P?T-1:T:e.length,R=e.slice(x,O),q=D?P?`\r +`:` +`:"",j=l(R),H=j?.key??"",z=j?.content??R,W=b(z);W&&(h?W.markerChar===g&&W.markerLen>=m&&/^\s*$/.test(W.rest)&&(h=!1,g="",m=0):(h=!0,g=W.markerChar,m=W.markerLen));const X=L.length>0;if(!h&&!X){const ne=c(z),le=!!ne&&!_&&S&&M&&w(x,H,ne);ne&&!_&&(!S||le)&&(H&&N&&H===N?k+=`${H}${I}`:H||(k+=I))}if(k+=R,k+=q,q&&(I=q),!h){const ne=d(z);if(ne){if(ne.type==="open")ne.complete||L.push(ne.name);else for(let le=L.length-1;le>=0;le--)if(L[le]===ne.name){L.length=le;break}}}const U=u(z);_=U,S=!U&&a(z),M=!U&&!!f(z),N=H,x=D?T+1:e.length}return k}function hMe(e){let t=!1,n="",i=0,s=!1,o=!1,r=!1,l=0;const a=(c,d)=>{const f=wA(c);if(f){t?f.markerChar===n&&f.markerLen>=i&&/^\s*$/.test(f.rest)&&(t=!1,n="",i=0):(t=!0,n=f.markerChar,i=f.markerLen);return}if(t)return;let h=0;for(;h{for(;l=c?c:d,h=f>l&&e[f-1]==="\r"?f-1:f;if(a(e.slice(l,h)),d===-1||d>=c){l=c;break}r=!1,l=d+1}},inMath:()=>s||o||r}}function Jk(e,t,n,i){let s=e.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2");const o=hMe(s);if(s=s.replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,(r,l,a,u)=>{o.scanTo(u+1);const c=o.inMath();return o.scanTo(u+r.length),c?`${l}\\n${a}`:r}),t||(s.endsWith("- *")&&(s=s.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*-\s*$/,r=>r.startsWith(` +`)?` +`:""):/(?:^|\n)\s*--\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*--\s*$/,r=>r.startsWith(` +`)?` +`:""):/(?:^|\n)\s*>\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*>\s*$/,r=>r.startsWith(` +`)?` +`:""):/\n\s*[*+]\s*$/.test(s)?s=s.replace(/\n\s*[*+]\s*$/,` +`):/(?:^|\n)\s*\d+\s*$/.test(s)?/^\d+$/.test(s.trim())||(s=s.replace(/(?:^|\n)\s*\d+\s*$/,r=>r.startsWith(` +`)?` +`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(s)?s=s.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(r,l,a)=>`${l}${a.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*\d+[.)]\s*$/,r=>r.startsWith(` +`)?` +`:""):/\n[[(]\n*$/.test(s)&&(s=s.replace(/(\n\[|\n\()+\n*$/g,` +`)),s=F_e(s,i.customHtmlTags)??s),i.customHtmlTags?.length&&s.includes("<")){const r=kf(i.customHtmlTags);if(r.length&&(s=uMe(s,r),s=cMe(s,r),s=fMe(s,r),s=dMe(s,r),s.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");s=s.replace(a,"$1$2$2")}}return t||(s=aMe(s)),s}function pMe(e,t,n,i){const s=e,o=`${n?"final":"stream"}:${(i.customHtmlTags??[]).join(",")}`,r=N8.get(s);let l;if(!n&&!i.customHtmlTags?.length&&r&&r.mode===o&&t.length>=r.source.length&&t.startsWith(r.source)){const a=Math.max(0,r.source.length-c_e-d_e),u=Jk(t.slice(a),n,e,i),c=r.source.length-a;l=u.length>=c&&u.slice(0,c)===r.safeMarkdown.slice(-c)?r.safeMarkdown.slice(0,r.safeMarkdown.length-c)+u:Jk(t,n,e,i)}else l=Jk(t,n,e,i);return n||(l=D_e(l,e)),N8.set(s,{source:t,safeMarkdown:l,mode:o}),l}function xO(e,t,n={}){const i=dO(n),s=i?ql():0,o=!!n.final,r=(e??"").toString();x_e(t,n)&&(t.stream.reset(),S_e(t),N8.delete(t));const l=pMe(t,r,o,n);i&&fc(i,"safeMarkdownMs",ql()-s);const a=W_e(l);if(a){if(n.includeSourceMap){const x={...n,__sourceLineMapper:OI(r,l)};a[0].sourceMap=L0(l,0,l.length,x)}const w=n.preTransformTokens,k=n.postTransformTokens;if(kA(t,n)||typeof w=="function"||typeof k=="function"){const x=FI(t,l,{__markstreamFinal:o},n),_=typeof w=="function"&&w(x)||x;typeof k=="function"&&k(_)}return MI(a,n,i,s)}const u=i?ql():0,c=FI(t,l,{__markstreamFinal:o},n);if(i&&fc(i,"tokenizeMs",ql()-u),!c||!Array.isArray(c))return MI([],n,i,s);const d=n.preTransformTokens,f=n.postTransformTokens;let h=c;d&&typeof d=="function"&&(h=d(h)||h);const g=t,m=typeof g.validateLink=="function"&&g.__markstreamOriginalValidateLink&&g.validateLink!==g.__markstreamOriginalValidateLink?g.validateLink:void 0,y=n.validateLink??m??g.options?.validateLink??(typeof g.validateLink=="function"?g.validateLink:void 0),b={...n,validateLink:y,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?OI(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let A=b_e(t,l,h,b,i);if(f&&typeof f=="function"){const w=f(h);if(Array.isArray(w)){const k=w[0],x=k?.type;k&&typeof x=="string"?A=ih(w,{...b,__customHtmlBlockCursor:0},i):A=w}}if(iMe(A)){const w=i?ql():0;A=lMe(A,o,l,b),A=wO(A,l,t,b,o)[0],A=nMe(A,t,b,o),i&&fc(i,"htmlBlockPassesMs",ql()-w)}if(o){const w=new WeakSet,k=x=>{if(!x||typeof x!="object"||w.has(x))return;if(w.add(x),Array.isArray(x)){for(const S of x)k(S);return}const _=x;_.type==="html_block"&&_.loading===!0&&(_.loading=!1);for(const S of Object.values(_))k(S)};k(A)}return A=hO(A,n),n.debug&&console.log("Parsed Markdown Tree Structure:",A),fO(A,i,s)}function PI(e,t){if(!e||!Array.isArray(e))return[];const n=[],i=qc(t),s=t?.__linkifyDemotionSeed;if(Array.isArray(s)&&s.length)for(const l of s)i.remember(String(l??""));const o=t?.includeSourceMap===!0;let r=0;for(;rd.type==="html_block")){if(o)for(const d of c)ti(d,a,t);for(const d of c)va(d,a,t);n.push(...c)}else{const d={type:"paragraph",raw:u,children:c};o&&ti(d,a,t);const f=$I(d,t);if(f){o&&BI(f,d);for(const h of f)va(h,a,t);n.push(...f)}else va(d,a,t),n.push(d)}i.remember(u)}r+=1;break;default:r+=1;break}}return n}const gMe=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g,Hp=/\d/u,mMe=/[,.!?;:,。;、!?:]/u,vMe=/\d\p{Script=Han}{1,3}$/u;function yMe(e){return e.pos>0&&e.pos+1{const u=l,c=u.posMax,d=u.pos;if(u.src.charCodeAt(d)!==r||a||o.refuseDigitRange&&yMe(u))return!1;u.pos=d+1;let f=!1;for(;u.pos]|$)/i,CMe=new Set([...ag,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),wMe=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 jI(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function xMe(e){return typeof e=="string"?e:e==null?"":String(e)}function SO(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function ic(e){return xMe(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function _O(e){return ic(e).replace(/`/g,"`")}function S9(e){return String(e??"").trim().toLowerCase()}function SA(e,t="safe"){const n=S9(e);return n?t==="escape"?!0:t==="trusted"?ag.has(n):!wMe.has(n):!1}function MO(e,t="safe"){const n=S9(e);return n?t==="escape"?!0:t==="trusted"?ag.has(n):CMe.has(n):!1}function HI(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,i])=>i===""?` ${n}`:` ${n}="${_O(i)}"`).join("")}function IO(e){const t=e.startsWith("/"),n=t?e.slice(1):e,i=n.match(AMe);return i?{attrsStr:t?"":n.slice(i[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:i[1]}:null}function SMe(e,t){const n=e.split(",").map(i=>i.trim()).filter(Boolean);return n.length===0?!1:n.some(i=>{const s=i.split(/\s+/,1)[0]??"";return!s||qd(s,{tagName:t,attrName:"srcset"})})}function EO(e,t,n,i){return lCe.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?SMe(t,i):!!(aCe.has(e)&&t&&qd(t,{tagName:i,attrName:e}))}function Md(e,t){const n=t.toLowerCase();return Object.keys(e).find(i=>i.toLowerCase()===n)}function TO(e,t,n,i=!1){if(t!=="safe"||S9(n)!=="a")return e;const s=Md(e,"href");if(i&&(!s||!e[s])){const a=Md(e,"target"),u=Md(e,"rel");return a&&delete e[a],u&&delete e[u],e}const o=Md(e,"target");if((o?String(e[o]).trim():"").toLowerCase()!=="_blank")return e;const r=Md(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 WI(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!SO(r)||EO(l,o,t,n)||(i[r]=o)}return TO(i,t,n,!!Md(e,"href"))}function LO(e,t){const n=e.toLowerCase();return bR.has(n)?!1:jI(t,n)||jI(t,e)}function _A(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!SO(r)||EO(l,o,t,n)||(i[r]=o)}return TO(i,t,n,!!Md(e,"href"))}function Wp(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,i]of e)n&&(t[String(n)]=i==null?"":String(i));return t}function Sv(e,t="safe",n){const i=_A(Wp(e),t,n),s=Object.entries(i).map(([o,r])=>[o,r]);return s.length>0?s:void 0}function _Me(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 i=Number(e);if(e!==""&&!Number.isNaN(i))return i}return e}function MMe(e){const t={};for(const[n,i]of Object.entries(e))t[n]=_Me(i,n);return t}function Xk(e){return e.trim().length>0}function NO(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const i=e.indexOf("<",n);if(i===-1){if(nn){const r=e.slice(n,i);Xk(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",i+1)){const r=e.indexOf("]]>",i);if(r!==-1){t.push({type:"text",content:e.slice(i,r+3)}),n=r+3;continue}break}if(e.startsWith("!",i+1)){const r=e.indexOf(">",i);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=IO(e.slice(i+1,s));if(!o){const r=e.slice(i,s+1);Xk(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(o.isClosing)t.push({type:"tag_close",tagName:o.tagName});else{const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||Sc.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r})}n=s+1}return t}function IMe(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const i=e.indexOf("<",n);if(i===-1){nn&&t.push({type:"text",content:e.slice(n,i)}),e.startsWith("![CDATA[",i+1)){const l=e.indexOf("]]>",i);if(l!==-1){t.push({type:"text",content:e.slice(i,l+3)}),n=l+3;continue}break}if(e.startsWith("!",i+1)){const l=e.indexOf(">",i);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=IO(e.slice(i+1,s));if(!o){t.push({type:"text",content:e.slice(i,s+1)}),n=s+1;continue}if(o.isClosing){t.push({type:"tag_close",tagName:o.tagName}),n=s+1;continue}const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||Sc.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r}),n=s+1}return t}function EMe(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${ic(t)}>`;const n=Object.entries(e.attrs??{}).map(([i,s])=>s===""?` ${ic(i)}`:` ${ic(i)}="${_O(s)}"`).join("");return e.type==="self_closing"?`<${ic(t)}${n} />`:`<${ic(t)}${n}>`}function TMe(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of NO(e))if((n.type==="tag_open"||n.type==="self_closing")&&LO(n.tagName??"",t))return!0;return!1}function Dh(e,t="safe"){if(!e)return"";if(t==="escape")return ic(e);const n=IMe(e),i=[],s=[],o=[];for(const r of n){if(r.type==="text"){o.length===0&&s.push(ic(r.content??""));continue}const l=S9(r.tagName);if(!l)continue;if(MO(l,t)){r.type==="tag_open"?o.push(l):r.type==="tag_close"&&o[o.length-1]===l&&o.pop();continue}if(o.length>0)continue;if(t==="safe"&&SA(l,t)){s.push(EMe(r));continue}if(r.type==="self_closing"){s.push(`<${l}${HI(WI(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${HI(WI(r.attrs??{},t,l))}>`),Sc.has(l)||i.push(l);continue}const a=i.lastIndexOf(l);if(a===-1)continue;for(;i.length>a+1;){const c=i.pop();c&&s.push(``)}const u=i.pop();u&&s.push(``)}for(;i.length>0;){const r=i.pop();r&&s.push(``)}return s.join("")}const LMe=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],qI="http://www.w3.org/2000/svg",NMe=new Set(["script","style","iframe","object","embed","link","meta"]),FMe=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"]),DMe=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),BMe=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),$Me=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function zMe(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function RMe(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function OMe(e){const t=e.nodeName.toLowerCase();return t==="use"?zMe(e):t==="image"?RMe(e):t==="text"||t==="tspan"?!!e.textContent?.trim():$Me.has(t)}function PMe(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 jMe(e,t,n){const i=e.toLowerCase(),s=t.toLowerCase(),o=String(n??"").trim();return o?(i==="use"||i==="marker"||i==="clippath"||i==="mask")&&(s==="href"||s==="xlink:href")?o.startsWith("#")?o:"":i==="a"&&(s==="href"||s==="xlink:href")?qd(o,{tagName:"a",attrName:"href"})?"":o:i==="image"&&(s==="href"||s==="xlink:href"||s==="src")?qd(o,{tagName:"img",attrName:"src"})?"":o:s==="href"||s==="xlink:href"?o.startsWith("#")?o:"":qd(o,{tagName:i,attrName:s})?"":o:""}function HMe(e,t){let n=t+4;for(;n{const i=n.trim();if(/^[0-9a-f]+$/i.test(i)){const s=Number.parseInt(i,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function DO(e){const t=FO(e),n=t.toLowerCase();let i=0;for(;in.test(t))||DO(t)}function WMe(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 jm(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function BO(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,i=n.tagName.toLowerCase();if(!NMe.has(i)){if(i==="br"){t.push(` +`);return}for(const s of Array.from(n.childNodes))BO(s,t)}}function qMe(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];BO(t,n);const i=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!i.length){t.remove();continue}const s=jm(t.getAttribute("width")),o=jm(t.getAttribute("height")),r=jm(t.getAttribute("x")),l=jm(t.getAttribute("y")),a=e.ownerDocument.createElementNS(qI,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+o/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")),i.length===1)a.textContent=i[0];else{const c=-.6*(i.length-1);for(const[d,f]of i.entries()){const h=e.ownerDocument.createElementNS(qI,"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 UMe(e){qMe(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const i=n.tagName.toLowerCase();if(!FMe.has(i)){n.remove();continue}if(i==="style"&&UI(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const o of s){const r=o.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(o.name);continue}if(r==="style"&&o.value&&UI(o.value)){n.removeAttribute(o.name);continue}if(r==="srcdoc"){n.removeAttribute(o.name);continue}if(DMe.has(r)&&o.value){const l=jMe(i,r,o.value);if(!l){n.removeAttribute(o.name);continue}l!==o.value&&n.setAttribute(o.name,l);continue}if(BMe.has(r)&&o.value&&DO(o.value)){n.removeAttribute(o.name);continue}if(o.value){const l=PMe(o.value);l!==o.value&&n.setAttribute(o.name,l)}}WMe(n)}}function Rut(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 UMe(n),KMe(n)?null:n}catch{return null}}function KMe(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const o=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(o)||!Number.isFinite(r)||o<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let i=!1;for(const s of n){OMe(s)&&(i=!0);for(const o of Array.from(s.attributes))if(/\bNaN\b/i.test(o.value)||o.name==="style"&&/max-width:\s*0(?:px)?/i.test(o.value))return!0}return!i}const Hm=[];function e3(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function VMe(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function ZMe(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function KI(e=`editor-${Date.now()}`,t={}){const n=_xe(t),i=n;i.__markstreamRegisteredPluginCount=Hm.length,i.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||Hm.length);const s={"common.copy":"Copy"};let o;if(typeof t.i18n=="function")o=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;o=g=>h[g]??s[g]??g}else o=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const g=h;if(Array.isArray(g)){const[m,...y]=g;typeof m=="function"&&n.use(m,...y)}else typeof g=="function"&&n.use(g)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(g){console.error("[getMarkdown] apply function threw an error",g)}if(Hm.length)for(const h of Hm)if(Array.isArray(h)){const[g,...m]=h;typeof g=="function"&&n.use(g,...m)}else typeof h=="function"&&n.use(h);n.use(bMe),n.use(K8e),n.use(W8e);const r=o5e,l=r.default??r;n.use(l),n.use(H8e),n.use(j8e),n.core.ruler.after("block","mark_fence_closed",h=>{const g=h,m=g.src,y=!!g.env?.__markstreamFinal,b=m.split(/\r?\n/);for(const A of g.tokens){if(A.type!=="fence"||!A.map||!A.markup)continue;const w=A.map[0],k=A.map[1],x=A.markup,_=x[0],S=x.length,M=b[Math.max(0,k-1)]??"";let I=0;for(;Iw+1&&L>=S&&N===M.length,D=A;D.meta=D.meta??{},D.meta.unclosed=!T,D.meta.closed=!!T}}),n.renderer.rules.fence=(h,g)=>{const m=h[g],y=String(m.info??"").trim(),b=String(m.content??""),A=btoa(unescape(encodeURIComponent(b))),w=VMe(y),k=e3(w),x=ZMe(`editor-${e}-${g}-${w}`),_=e3(o("common.copy"));return`
      +
      + ${e3(w.toUpperCase())} + +
      +
      +
      `};const a=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,c=h=>{if(!h.startsWith("["))return!1;const g=u.exec(h);if(!g)return h!=="["&&!/^\[\d+$/.test(h);const m=String(g[1]??"");return h.slice(g[0].length).startsWith("(")?!1:!/^\d+$/.test(m)},d=(h,g)=>{const m=h;if(m.src[m.pos]!=="[")return!1;const y=a.exec(m.src.slice(m.pos));if(!y)return!1;const b=m.src.slice(Math.max(0,m.pos-120),m.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(b))return!1;const A=m.src.slice(m.pos+y[0].length);if(A.startsWith("](")||A.startsWith("(")||c(A))return!1;if(!g){const w=y[1],k=m.push("reference","span",0);k.content=w,k.markup=y[0],k.raw=y[0]}return m.pos+=y[0].length,!0};n.inline.ruler.before("escape","reference",d),n.renderer.rules.reference=(h,g)=>{const y=String(h[g].content??"");return`${y}`};const f=n.use.bind(n);return n.use=((...h)=>(i.__markstreamHasCustomParserExtensions=!0,f(...h))),n}function GMe({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 $O({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:i,streamRenderVersionChanged:s=!1}){const o=`${n.settledContent}${n.streamedDelta}`;return i?n.streamedDelta&&o===e?s?{settledContent:o,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:GMe({nextContent:e,previousContent:t??o,typewriterEnabled:i}):{settledContent:e,streamedDelta:"",appended:!1}}const QMe={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 YMe(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function zO(e){const t=YMe(e);return QMe[t]??t}function JMe(e){if(!Array.isArray(e))return;const t=e.filter(i=>typeof i=="string").map(i=>zO(i)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function XMe(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const i of e){if(typeof i!="string")continue;const s=i.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function eIe(e){return XMe(e)?.join("\0")??""}function tIe(e,t){return`${eIe(e)}\0\0${JMe(t)?.join("\0")??""}`}function Uf(e,t,n=1){const i=Number(e);return Number.isFinite(i)?Math.max(n,i):t}function VI(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var nIe=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=ZI();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=ZI();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,y=rIe(g/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(y-this.currentCps)*.2,this.charBudget+=this.currentCps*(h/1e3),this.charBudget<1){this.ensureLoop();return}const b=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),A=oIe(this.source.slice(this.visible.length),b,this.segmenter);A.text&&(this.visible+=A.text,this.charBudget=Math.max(0,this.charBudget-A.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:i=1e3,targetLatencyMs:s=900,catchUpLatencyMs:o=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=Uf(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Uf(i,1e3,1)),this.normalizedTargetLatencyMs=Uf(s,900,1),this.normalizedCatchUpLatencyMs=Uf(o,350,1),this.normalizedCatchUpThreshold=VI(r,600),this.normalizedStartDelayMs=VI(a,80),this.maxCommitFps=Math.trunc(Uf(l,30,1)),this.maxCharsPerCommit=Math.trunc(Uf(u,80,1)),this.flushOnFinish=c,this.segmenter=sIe(),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 iIe(e={},t){const n=new nIe(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 sIe(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function oIe(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const o=Array.from(e).slice(0,t);return{text:o.join(""),graphemeCount:o.length}}let i="",s=0;for(const o of n.segment(e)){if(s>=t)break;i+=o.segment,s++}return{text:i,graphemeCount:s}}function ZI(){return typeof performance<"u"?performance.now():Date.now()}function rIe(e,t,n){return Math.min(n,Math.max(t,e))}var lIe=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const D8=Symbol.for("markstream-vue:node-lifecycle");function Out(){}const MA=new Map;let RO="material";const hh=new Map,GI=new Map;let B8=null;function aIe(e){MA.set(e.id,e)}function uIe(e){const t=MA.get(RO);if(!t)return;const n=t.core[e];if(n)return n;const i=hh.get(t.id);if(i){const s=i[e];if(s)return s}t.loadExtended&&!hh.has(t.id)&&dIe(t)}function cIe(){var e,t;return(t=(e=MA.get(RO))==null?void 0:e.fallback)!=null?t:""}function dIe(e){return lIe(this,null,function*(){var t,n,i;if(hh.has(e.id))return(t=hh.get(e.id))!=null?t:null;let s=GI.get(e.id);return s||(s=((i=(n=e.loadExtended)==null?void 0:n.call(e))!=null?i:Promise.resolve(null)).then(o=>(hh.set(e.id,o),B8?.(),o)).catch(()=>(hh.set(e.id,null),null)),GI.set(e.id,s)),s})}const QI='',YI='',fIe={id:"material",core:{"":YI,plain:'',text:YI,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:QI,csharp:QI,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Ss(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},hIe=ra(0);B8=()=>{hIe.value++},aIe(fIe);const pIe={"":"",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 _9(e){var t;const n=(function(i){if(!i)return"";const s=i.trim();if(!s)return"";const[o]=s.split(/\s+/),[r]=o.split(":");return r.toLowerCase()})(e);return(t=pIe[n])!=null?t:n}function Put(e){const t=_9(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 jut(e){return uIe(_9(e))||cIe()}const JI={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 M9=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});let cr=null,Nd=!1,Fd=null,I9=EA;function fg(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function IA(){try{const e=globalThis;return fg(e?.katex)}catch{return null}}function EA(){return M9(null,null,function*(){const e=IA();if(e)return e;const t=yield Ss(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Ss(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return fg(t)})}function OO(e){const t=Promise.resolve(e).then(n=>{var i;return Fd===t&&n?(cr=(i=fg(n))!=null?i:n,cr):null}).catch(()=>null).finally(()=>{Fd===t&&(Fd=null)});return Fd=t,Nd=!0,t}function gIe(e){I9=e,cr=null,Nd=!1,Fd=null}function mIe(e){gIe(EA)}function PO(){return typeof I9=="function"}function Hut(){var e;const t=I9;if(!t||t===EA)return null;if(cr)return cr;const n=IA();if(n)return cr=n,cr;if(Nd)return null;try{const i=t();return i?typeof i?.then=="function"?(OO(i),null):(cr=(e=fg(i))!=null?e:i,cr):null}catch{return null}}function jO(){return M9(this,null,function*(){var e;const t=IA();if(t)return cr=t,cr;if(cr)return cr;if(Fd)return Fd;if(Nd)return null;const n=I9;if(!n)return Nd=!0,null;try{const i=n();if(typeof i?.then=="function")return OO(i);if(i)return cr=(e=fg(i))!=null?e:i,Nd=!0,cr}catch{}return Nd=!0,null})}function HO(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let rc=null,Qu=null;const Lo=new Map,uu=new Map;let N0=5;const Kd=new Set;function qp(){if(Lo.size{const{id:n,html:i,error:s}=t.data,o=Lo.get(n);if(o)if(Lo.delete(n),clearTimeout(o.timeoutId),o.cleanup(),qp(),s)o.aborted||o.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(uu.set(a,i),uu.size>200){const u=uu.keys().next().value;uu.delete(u)}}o.aborted||o.resolve(i)}},rc.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,i]of Lo.entries())clearTimeout(i.timeoutId),i.cleanup(),i.aborted||i.reject(new Error(`Worker error: ${t.message}`));Lo.clear(),WO()}}function yIe(){var e;for(const t of Lo.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Lo.clear(),WO(),rc&&((e=rc.terminate)==null||e.call(rc)),rc=null,Qu=null}function kIe(e,t=!0,n=2e3,i){return M9(this,null,function*(){performance.now();const s=HO(e);if(!PO()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Qu)return Promise.reject(Qu);const o=`${t?"d":"i"}:${s}`,r=uu.get(o);if(r)return qp(),Promise.resolve(r);const l=rc||(Qu=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Qu.name="WorkerInitError",Qu.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(Qu);if(Lo.size>=N0){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Lo.size,a.max=N0,Promise.reject(a)}return new Promise((a,u)=>{if(i?.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=Lo.get(c);if(!m)return;Lo.delete(c),m.cleanup();const y=new Error("Worker render timed out");y.name="WorkerTimeout",y.code="WORKER_TIMEOUT",m.aborted||m.reject(y),qp()},n);d=()=>{const m=Lo.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const y=new Error("Aborted");y.name="AbortError",u(y)},i&&i.addEventListener("abort",d,{once:!0});const h=a,g=u;Lo.set(c,{resolve:m=>{h(m)},reject:m=>{g(m)},timeoutId:f,aborted:!1,cleanup:()=>{i&&d&&i.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const y=Lo.get(c);Lo.delete(c),clearTimeout(f),y?.cleanup(),y?.reject(m),qp()}})})}function Wut(e,t=!0,n){const i=`${t?"d":"i"}:${HO(e)}`;if(uu.set(i,n),uu.size>200){const s=uu.keys().next().value;uu.delete(s)}}const bIe="WORKER_BUSY";function AIe(e=2e3,t){return Lo.size{let s,o=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Kd.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{o||(o=!0,a(),n())},Kd.add(l),s=globalThis.setTimeout(()=>{if(o)return;o=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",i(u)},e),queueMicrotask(()=>qp()),t&&(r=()=>{if(o)return;o=!0,a();const u=new Error("Aborted");u.name="AbortError",i(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const j1={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function qut(e){return M9(this,arguments,function*(t,n=!0,i={}){var s,o,r,l;if(!PO()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=i.timeout)!=null?s:j1.timeout,u=(o=i.waitTimeout)!=null?o:j1.waitTimeout,c=(r=i.backoffMs)!=null?r:j1.backoffMs,d=(l=i.maxRetries)!=null?l:j1.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):j1.maxRetries,h=i.signal;let g=0;for(;;){if(h?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield kIe(t,n,a,h)}catch(m){if(m?.code!==bIe||g>=f)throw m;if(g++,yield AIe(u,h).catch(()=>{}),h?.aborted){const y=new Error("Aborted");throw y.name="AbortError",y}c>0&&(yield new Promise(y=>globalThis.setTimeout(y,c*g)))}}})}function ph(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function CIe(e){var t;for(const n of e.split(/\r?\n/)){const i=n.trim();if(!i||i.startsWith("%%"))continue;const s=i.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function ty(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),i=CIe(e);return i==="gantt"?220+28*n:i==="sequencediagram"?180+26*n:i==="classdiagram"||i==="statediagram"||i==="erdiagram"?180+24*n:i==="flowchart"||i==="graph"?170+28*n:200+22*n}function ny(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 qO(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function iy(e,t=360,n=500){return qO(e,t,n)}function sy(e,t=360,n=500){return qO(e,t,n)}var wIe=Object.defineProperty,xIe=Object.defineProperties,SIe=Object.getOwnPropertyDescriptors,XI=Object.getOwnPropertySymbols,_Ie=Object.prototype.hasOwnProperty,MIe=Object.prototype.propertyIsEnumerable,eE=(e,t,n)=>t in e?wIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,UO=(e,t)=>{for(var n in t||(t={}))_Ie.call(t,n)&&eE(e,n,t[n]);if(XI)for(var n of XI(t))MIe.call(t,n)&&eE(e,n,t[n]);return e},tE=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const oy=()=>Ss(()=>import("./mermaid.core-DcHEQi2N.js").then(e=>e.bp),__vite__mapDeps([4,5]));let Ja=null,gh=oy,yp=null,$8=!1,z8=!1,kp=0;function IIe(e){gh=e,kp++,Ja=null,yp=null,$8=!1,z8=!1}function EIe(e){IIe(oy)}function nE(){return typeof gh=="function"}function iE(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=UO({},t),i={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:o=>typeof t.initialize=="function"?t.initialize(o):s.initialize?s.initialize(o):void 0},xIe(n,SIe(i))}var n,i;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function sE(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const i=UO({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,i):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(i):void 0}}catch{}}function Uut(){return tE(this,null,function*(){if(Ja)return Ja;const e=(function(){try{const i=globalThis;return iE(i?.mermaid)}catch{return null}})();if(e)return Ja=e,sE(Ja),Ja;const t=gh,n=kp;return t?t===oy&&$8?null:yp||(yp=tE(null,null,function*(){let i;try{i=yield t()}catch(s){if(t===oy)return n===kp&&t===gh&&($8=!0,(function(o){z8||(z8=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',o))})(s)),null;throw s}finally{n===kp&&t===gh&&(yp=null)}return n!==kp||t!==gh?null:i?(Ja=iE(i),sE(Ja),Ja):null}),yp):null})}let Lr=null,Yu=null;const Ul=new Map,Ad=new Map;function _v(e){for(const t of Ul.values())t.reject(e);Ul.clear(),Ad.clear()}let oE=5,rE=!1;const TIe="WORKER_BUSY",lE="MERMAID_DISABLED";function LIe(e){if(Lr&&Lr!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",_v(n)}Lr=e,Yu=null;const t=e;Lr.onmessage=n=>{if(Lr!==t)return;const{id:i,ok:s,result:o,error:r}=n.data,l=Ul.get(i);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(o))},Lr.onerror=n=>{var i,s;if(Lr===t)if(Ul.size!==0){try{rE?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}_v(new Error(`Worker error: ${n.message}`))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Lr.onmessageerror=n=>{var i,s;if(Lr===t)if(Ul.size!==0){try{rE?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}_v(new Error("Worker messageerror"))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function NIe(){var e;if(Lr)try{_v(new Error("Worker cleared")),(e=Lr.terminate)==null||e.call(Lr)}catch{}Lr=null,Yu=null}function KO(e,t,n,i){if(!nE()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=lE,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let o=Ad.get(s);return o||(o=(function(r,l,a=1400){if(!nE()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=lE,Promise.reject(c)}if(Yu)return Promise.reject(Yu);const u=Lr||(Yu=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Yu.name="WorkerInitError",Yu.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(Yu);if(Ul.size>=oE){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=TIe,c.inFlight=Ul.size,c.max=oE,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),Ul.delete(f))},y={resolve:b=>{m(),c(b)},reject:b=>{m(),d(b)}};Ul.set(f,y);try{u.postMessage({id:f,action:r,payload:l})}catch(b){return Ul.delete(f),void d(b)}h=globalThis.setTimeout(()=>{const b=new Error("Worker call timed out");b.name="WorkerTimeout",b.code="WORKER_TIMEOUT";const A=Ul.get(f);A&&A.reject(b)},a)})})(e,t,n),Ad.set(s,o),o.then(()=>{Ad.get(s)===o&&Ad.delete(s)},()=>{Ad.get(s)===o&&Ad.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)})})})(o,i)}function Kut(e,t,n=1400,i){return KO("canParse",{code:e,theme:t},n,i)}function Vut(e,t,n=1400,i){return KO("findPrefix",{code:e,theme:t},n,i)}var FIe=Object.defineProperty,DIe=Object.defineProperties,BIe=Object.getOwnPropertyDescriptors,aE=Object.getOwnPropertySymbols,$Ie=Object.prototype.hasOwnProperty,zIe=Object.prototype.propertyIsEnumerable,uE=(e,t,n)=>t in e?FIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,It=(e,t)=>{for(var n in t||(t={}))$Ie.call(t,n)&&uE(e,n,t[n]);if(aE)for(var n of aE(t))zIe.call(t,n)&&uE(e,n,t[n]);return e},bn=(e,t)=>DIe(e,BIe(t)),qi=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const RIe="__global__",t3="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",R8=(()=>{const e=globalThis;if(e[t3])return e[t3];const t={scopedCustomComponents:{},revision:ra(0)};return e[t3]=t,t})(),cE=R8.revision,OIe=Symbol("markstreamCustomComponents"),PIe=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 hg(e){return PIe.has(String(e).trim().toLowerCase())}function jIe(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function n3(e={}){const t={};for(const[n,i]of Object.entries(e))if(i!=null){t[n]=i;for(const s of new Set([Nl(n),Nl(jIe(n))]))!s||hg(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=i)}return t}function Gs(e){const t=un(OIe,null);return F(()=>{var n;return cE.value,(function(i,s={}){return cE.value,It(It(It({},n3(R8.scopedCustomComponents[RIe]||{})),n3(s)),n3((function(o){return o&&R8.scopedCustomComponents[o]||{}})(i)))})(e?.(),(n=t?.value)!=null?n:{})})}const HIe=["aria-label"],WIe={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"},qIe={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"},vi=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},il=vi(Xe({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(v(),E("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(v(),E("svg",qIe,[...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)])])):(v(),E("svg",WIe,[...n[0]||(n[0]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,HIe))}),[["__scopeId","data-v-be21ab83"]]);il.install=e=>{e.component(il.__name,il)};const UIe={class:"emoji-node"},$r=vi(Xe({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(v(),E("span",UIe,B(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);$r.install=e=>{e.component($r.__name,$r)};const KIe=["id"],VIe=["title"],sl=vi(Xe({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const i=document.querySelector(t);i?i.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(i,s)=>(v(),E("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[C("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+B(e.node.id)+"]",9,VIe)],8,KIe))}}),[["__scopeId","data-v-c1463a29"]]);sl.install=e=>{e.component(sl.__name,sl)};const VO=(()=>{try{return!1}catch{}return!1})();function i3(e){VO&&console.warn(e)}function dE(e,t="safe",n){return _A(e,t,n)}function ZO(e){return MMe(e)}function s3(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function TA(e,t="safe"){const n=String(e.tag||e.type||"").trim(),i=Sv((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),s3(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),s3(r.value)]):Object.entries(s).map(([r,l])=>[r,s3(l)]):null,t,n);var s;if(!i)return;const o=ZO(Wp(i));return Object.keys(o).length>0?o:void 0}function fE(e,t,n=!1){const i=Object.entries(t??{}),s=i.length>0?i.map(([o,r])=>r===""?` ${o}`:` ${o}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function H1(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function o3(e,t,n,i,s,o,r=!1){const l=(function(d,f){return LO(d,f)})(e,i);if(ag.has(e.toLowerCase())||!l&&MO(e,o))return null;if(!l&&SA(e,o))return r?[fE(e,t,!0)]:[fE(e,t),...n,``];const a=_A(t,o,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=i[e]||i[e.toLowerCase()],f=ZO(a);return gn(d,bn(It({},f),{key:c}),n.length>0?n:void 0)}return gn(e,bn(It({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function GO(e,t){return TMe(e,t)}function ry(e,t,n="safe"){if(!e)return[];try{return(function(o,r,l="safe"){let a=0;const u=[],c=[];for(const d of o)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=o3(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);H1(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=o3(g.tagName,g.attrs||{},g.children,r,g.autoKey,l);u.length>0?H1(u[u.length-1].children,m):H1(c,m),g.tagName.toLowerCase()!==f&&u.length>h&&i3(`Auto-closing unclosed tag: <${g.tagName}>`)}else i3(`Ignoring closing tag with no matching opening tag: `)}for(;u.length>0;){const d=u.pop(),f=o3(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?H1(u[u.length-1].children,f):H1(c,f),i3(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(NO(e),t,n)}catch(s){return i=s,VO&&console.error("Failed to parse HTML to VNodes:",i),null}var i}const ZIe=["innerHTML"],ol=vi(Xe({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=un("markstreamHtmlPolicy",void 0),i=F(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=Gs(()=>t.customId),o=Xe({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=F(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(i.value==="escape")return{mode:"html",content:Dh(l,i.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=ry(l,s.value,i.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!GO(l,s.value))return{mode:"html",content:Dh(l,i.value)};const a=ry(l,s.value,i.value);return a===null?{mode:"html",content:Dh(l,i.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(v(),E("span",{key:0,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[K(p(o),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(v(),E("span",{key:1,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},B(r.value.content),3)):(v(),E("span",{key:2,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,ZIe))}}),[["__scopeId","data-v-d17f12b0"]]);ol.install=e=>{e.component(ol.__name,ol)};const GIe={class:"inline-code"},QIe={key:0},Jo=vi(Xe({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=e1(),i=un("markstreamFade",void 0),s=un("markstreamTextStreamState",void 0),o=un("markstreamStreamVersion",void 0),r=F(()=>{const A=n.fade;return A===""||A===!0||A==="true"||A!==!1&&A!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=F(()=>{var A;return String((A=t.node.code)!=null?A:"")}),u=F(()=>!l.value),c=F(()=>{var A;const w=(A=n["index-key"])!=null?A:n.indexKey;return w==null||w===""?"":String(w)}),d=V(t.node.code),f=V(""),h=V(0);let g;function m(){g?.(),g=void 0}function y(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ue([()=>t.node.code,c,l],([A])=>{const w=String(A??""),k=c.value,x=$O({nextContent:w,persistedContent:k?s?.get(k):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||!o)return;const _=o.value;g=Ue(()=>o.value,S=>{S!==_&&y()},{flush:"sync"})})()):f.value||m(),k&&s?.set(k,w)},{immediate:!0}),Tc(m);const b=F(()=>h.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(A,w)=>(v(),E("code",GIe,[u.value?(v(),E(Te,{key:0},[$e(B(a.value),1)],64)):(v(),E(Te,{key:1},[d.value?(v(),E("span",QIe,B(d.value),1)):te("",!0),f.value?(v(),E("span",{key:1,class:De(["inline-code-stream-delta",[b.value]]),onAnimationend:y},B(f.value),35)):te("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);Jo.install=e=>{e.component(Jo.__name,Jo)};const O8=V(!1),hE=V(""),pE=V("top"),Up=V(null),Kp=V(null),P8=V(null),j8=V(null),gE=V(null);let Mv=null,Iv=null,H8=0;function QO(){Mv&&(clearTimeout(Mv),Mv=null),Iv&&(clearTimeout(Iv),Iv=null)}let Wm=!1,qm=null,mE=!1;function YIe(e,t,n="top",i=!1,s,o){if(!e)return;const r=++H8;QO();const l=()=>qi(null,null,function*(){var a,u;if(yield(function(){return qi(this,null,function*(){if(!Wm&&!mE&&typeof document<"u"){qm!=null||(qm=qi(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([Ss(()=>import("./vue.runtime.esm-bundler-DqZvItqP.js"),[]),Ss(()=>import("./Tooltip-LZbLRS_l.js"),[])]),h=document.createElement("div");h.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(h),c({setup:()=>()=>{var g;return d(f,{visible:O8.value,"anchor-el":Up.value,content:hE.value,placement:pE.value,id:Kp.value,originX:P8.value,originY:j8.value,isDark:(g=gE.value)!=null?g:void 0})}}).mount(h),Wm=!0}));try{yield qm}catch(c){Wm=!1,qm=null,mE=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),Wm&&r===H8){Kp.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Up.value=e,hE.value=t,pE.value=n,P8.value=(a=s?.x)!=null?a:null,j8.value=(u=s?.y)!=null?u:null,gE.value=typeof o=="boolean"?o:null,O8.value=!0;try{e.setAttribute("aria-describedby",Kp.value)}catch{}}});i?l():Mv=setTimeout(l,80)}function JIe(e=!1){H8+=1,QO();const t=()=>{if(Up.value&&Kp.value)try{Up.value.removeAttribute("aria-describedby")}catch{}O8.value=!1,Up.value=null,Kp.value=null,P8.value=null,j8.value=null};e?t():Iv=setTimeout(t,120)}const XIe={"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..."},eEe=Symbol("markstreamI18nFallback");function YO(e,t){var n;return(n=t?.[e])!=null?n:XIe[e]}const W8=(e,t)=>{var n;return(n=YO(e,t))!=null?n:(function(i){return(i.split(".").pop()||i).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function vE(e,t){return{t(n){const i=YO(n,t);if(e.te&&i!=null&&!e.te(n))return W8(n,t);const s=e.t(n);return s===n&&i!=null?W8(n,t):s}}}function tEe(){const e=(function(){var n,i,s;try{const o=Zs(),r=eEe,l=o?.provides,a=(n=o?.appContext)==null?void 0:n.provides;return(s=(i=l?.[r])!=null?i:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,i;try{const s=Zs(),o=s?.proxy,r=o?.$t;if(typeof r=="function"){const u=o?.$te;return{t:r.bind(o),te:typeof u=="function"?u.bind(o):void 0}}const l=(i=(n=s?.appContext)==null?void 0:n.config)==null?void 0:i.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 vE(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const i=n();if(i&&typeof i.t=="function")return vE({t:i.t.bind(i),te:typeof i.te=="function"?i.te.bind(i):void 0},e)}catch{}}catch{}return{t:n=>W8(n,e)}}const JO=Symbol("ViewportPriority"),XO=Symbol("ViewportPriorityOptions"),eP=Symbol("OffscreenHeavyNodeDeferral"),nEe=F(()=>!1),lf="400px";function LA(){return un(XO,void 0)}function NA(){return un(eP,nEe)}function iEe(e,t){var n,i;const s=typeof window<"u"&&typeof document<"u",o=typeof t=="boolean"?V(t):t,r=s?(n=window.requestIdleCallback)!=null?n:S=>window.setTimeout(()=>S({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(i=window.cancelIdleCallback)!=null?i:S=>window.clearTimeout(S):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let h=null,g=null;function m(S){if(!S)return"viewport";let M=a.get(S);return M||(M=u++,a.set(S,M)),String(M)}function y(){if(h!=null){try{l?.(h)}catch{}h=null}}function b(S){if(S){const M=c.get(S);if(M&&!M.targets.size){try{M.io.disconnect()}catch{}c.delete(S)}}d.size||f.size||y()}function A(S){const M=d.get(S);if(!M)return;const I=c.get(M.bucketKey);if(!M.visible.value){M.visible.value=!0;try{M.resolve()}catch{}}try{I?.io.unobserve(S)}catch{}I?.targets.delete(S),d.delete(S),f.delete(S),b(M.bucketKey)}function w(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&h==null&&f.size&&(h=r(()=>{h=null;const S=f.values().next().value;S&&(f.delete(S),A(S),f.size&&w())},{timeout:1200}))}function k(S,M){if(!s||typeof IntersectionObserver>"u")return null;const I=(function(O,R){var q,j,H;return{root:(q=e?.(O??null))!=null?q:null,rootMargin:(j=R?.rootMargin)!=null?j:lf,threshold:(H=R?.threshold)!=null?H:0}})(S,M),L=[m((N=I).root),N.rootMargin,N.threshold].join("\0");var N;const T=c.get(L);if(T)return{key:L,bucket:T};let D;try{D=new IntersectionObserver(O=>{for(const R of O)(R.isIntersecting||R.intersectionRatio>0)&&A(R.target)},{root:I.root,rootMargin:I.rootMargin,threshold:I.threshold})}catch{return null}const P={io:D,targets:new Map};return c.set(L,P),{key:L,bucket:P}}function x(){if(s&&o.value)for(const[S,M]of Array.from(d.entries())){const I=k(S,M.opts);if(!I){A(S);continue}if(I.key===M.bucketKey)continue;const L=M.bucketKey,N=c.get(L);try{N?.io.unobserve(S)}catch{}N?.targets.delete(S),M.bucketKey=I.key,I.bucket.targets.set(S,M),I.bucket.io.observe(S),b(L)}}Ue(o,S=>{if(!S){for(const M of Array.from(d.keys()))A(M);y()}},{flush:"sync"});const _=(S,M)=>{const I=V(!1);let L,N=!1;const T=new Promise(R=>{L=()=>{N||(N=!0,R())}}),D=()=>{const R=d.get(S);if(!R)return f.delete(S),void b();const q=c.get(R.bucketKey);try{q?.io.unobserve(S)}catch{}q?.targets.delete(S),d.delete(S),f.delete(S),b(R.bucketKey)};if(!s||!o.value)return I.value=!0,L(),{isVisible:I,whenVisible:T,destroy:D};const P=k(S,M);if(!P)return I.value=!0,L(),{isVisible:I,whenVisible:T,destroy:D};const O={resolve:L,visible:I,bucketKey:P.key,opts:M};return d.set(S,O),P.bucket.targets.set(S,O),P.bucket.io.observe(S),s&&g==null&&(g=window.requestAnimationFrame(()=>{g=null,x()})),M?.allowIdle!==!1&&(f.add(S),w()),{isVisible:I,whenVisible:T,destroy:D}};return _.refresh=x,Gn(JO,_),_}function FA(){var e,t;const n=un(JO,void 0);if(n)return n;const i=new WeakMap,s=new Map,o=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=i.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{}i.delete(h),m?.targets.delete(h),o.delete(h),c(g.bucketKey),o.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&o.size&&(r=l(()=>{r=null;const h=o.values().next().value;h&&(o.delete(h),d(h),o.size&&f())},{timeout:1200}))};return(h,g)=>{const m=V(!1);let y,b=!1;const A=new Promise(x=>{y=()=>{b||(b=!0,x())}}),w=()=>{const x=i.get(h);if(!x)return o.delete(h),void(o.size||u());const _=s.get(x.bucketKey);try{_?.io.unobserve(h)}catch{}i.delete(h),_?.targets.delete(h),o.delete(h),c(x.bucketKey),o.size||u()},k=(x=>{var _,S;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const M=(D=>{var P,O;return[(P=D?.rootMargin)!=null?P:lf,(O=D?.threshold)!=null?O:0].join("\0")})(x),I=s.get(M);if(I)return{key:M,bucket:I};const L=(_=x?.rootMargin)!=null?_:lf;let N;try{N=new IntersectionObserver(D=>{for(const P of D)(P.isIntersecting||P.intersectionRatio>0)&&d(P.target)},{root:null,rootMargin:L,threshold:(S=x?.threshold)!=null?S:0})}catch{return null}const T={io:N,targets:new Set};return s.set(M,T),{key:M,bucket:T}})(g);return k?(i.set(h,{resolve:y,visible:m,bucketKey:k.key}),k.bucket.targets.add(h),k.bucket.io.observe(h),g?.allowIdle!==!1&&(o.add(h),f()),{isVisible:m,whenVisible:A,destroy:w}):(m.value=!0,y(),{isVisible:m,whenVisible:A,destroy:w})}}function sEe(e,t){var n,i;const s=(i=(n=e.indexKey)!=null?n:t["index-key"])!=null?i:t.indexKey;return s==null||s===""?"":String(s)}const oEe=["data-markstream-viewport-pending"],rEe=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],lEe={key:1,class:"image-placeholder"},aEe={key:1,class:"image-node__raw-text"},uEe={key:2,class:"image-shimmer-overlay"},cEe={key:1,class:"image-node__raw-text"},dEe={key:3,class:"image-error"},hc=vi(Xe({__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,i,s;const o=e,r=t,l=V(!1),a=V(!1),u=V(""),c=V("primary"),d=V(null),f=e1(),h=un(D8,null),g=FA(),m=LA(),y=NA(),b=F(()=>PM(o.node.src)),A=F(()=>PM(o.fallbackSrc)),w=(s=(i=(n=Zs())==null?void 0:n.vnode.el)==null?void 0:i.querySelector)==null?void 0:s.call(i,"img"),k=typeof window<"u"&&w?.getAttribute("src")===(b.value||A.value),x=V(typeof window>"u"||k||!y.value),_=ra(null);let S="",M=null;const I=F(()=>u.value),L=F(()=>!o.lazy),N=F(()=>typeof window<"u"&&y.value&&!k),T=F(()=>!N.value||x.value),D=F(()=>T.value?I.value:""),P=F(()=>{var ie,he;return(he=(ie=m?.value.heavyBlockMargin)!=null?ie:m?.value.rootMargin)!=null?he:lf}),O=F(()=>!o.node.loading&&c.value!=="failed"&&u.value.length>0),R=F(()=>c.value==="failed"),q=F(()=>(!L.value||N.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),j=F(()=>sEe(o,f));function H(ie=j.value){ie&&d.value&&h?.reportHeight(ie,d.value.offsetHeight)}function z(ie=j.value){ie&&bt(()=>{H(ie)})}function W(){M&&(clearTimeout(M),M=null)}function X(){const ie=j.value;ie&&S!==ie&&(S&&h?.markSettled(S),W(),S=ie,h?.markPending(ie),typeof window<"u"&&(M=window.setTimeout(()=>{S===ie&&(z(ie),U())},8e3)))}function U(){return qi(this,null,function*(){const ie=S;ie&&(W(),S="",yield bt(),H(ie),h?.markSettled(ie))})}function ne(){if(c.value==="primary"&&A.value&&A.value!==u.value)return c.value="fallback",u.value=A.value,l.value=!1,a.value=!1,void z();c.value="failed",a.value=!0,r("error",u.value),z()}function le(){l.value=!0,a.value=!1,r("load",I.value),z()}function Z(ie){ie.preventDefault(),l.value&&!a.value&&r("click",[ie,I.value])}const{t:se}=tEe();return Ue([b,A,()=>o.node.loading],()=>(l.value=!1,a.value=!1,o.node.loading||b.value?(u.value=b.value,void(c.value="primary")):A.value?(u.value=A.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ue([d,N],([ie,he],Ee,J)=>{var ve;if((ve=_.value)==null||ve.destroy(),_.value=null,!he||x.value)return void(x.value=!0);if(!ie)return void(x.value=!1);let G=!0;const ue=g(ie,{rootMargin:P.value,allowIdle:!1});_.value=ue,x.value=ue.isVisible.value,ue.whenVisible.then(()=>{G&&_.value===ue&&(x.value=!0)}),J(()=>{G=!1,ue.destroy(),_.value===ue&&(_.value=null)})},{immediate:!0}),Ue([O,l,a,I,()=>o.lazy,T],([ie,he,Ee,J,ve,G])=>ie&&J&&!Ee&&G?he?(U(),void z()):ve?(X(),void z()):void(he||Ee||X()):(U(),void z()),{flush:"post",immediate:!0}),On(()=>{var ie;(ie=_.value)==null||ie.destroy(),_.value=null,(function(){const he=S;he&&(W(),S="",h?.markSettled(he))})()}),(ie,he)=>{var Ee,J,ve,G,ue;return v(),E("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":N.value&&!x.value?"true":void 0},[O.value?(v(),E("img",{key:0,src:D.value||void 0,alt:String((J=(Ee=o.node.alt)!=null?Ee:o.node.title)!=null?J:""),title:String((G=(ve=o.node.title)!=null?ve:o.node.alt)!=null?G:""),class:De(["image-node__img",{"is-loading":!L.value&&!l.value,"is-loaded":L.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:o.lazy?"lazy":void 0,fetchpriority:L.value?"high":void 0,decoding:L.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(ue=o.node.alt)!=null?ue:p(se)("image.preview"),onError:ne,onLoad:le,onClick:Z},null,42,rEe)):te("",!0),e.node.loading&&!a.value?(v(),E("span",lEe,[o.usePlaceholder?Bn(ie.$slots,"placeholder",{key:0,node:o.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[he[0]||(he[0]=C("span",{class:"image-shimmer"},null,-1))],!0):(v(),E("span",aEe,B(e.node.raw),1))])):te("",!0),q.value&&!e.node.loading?(v(),E("span",uEe,[o.usePlaceholder?Bn(ie.$slots,"placeholder",{key:0,node:o.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[he[1]||(he[1]=C("span",{class:"image-shimmer"},null,-1))],!0):(v(),E("span",cEe,B(e.node.raw),1))])):te("",!0),R.value?(v(),E("span",dEe,[Bn(ie.$slots,"error",{node:o.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.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,B(p(se)("image.loadError")),1)],!0)])):te("",!0)],8,oEe)}}}),[["__scopeId","data-v-046e82ac"]]);hc.install=e=>{e.component(hc.__name,hc)};const fEe={key:2},Pa=Xe({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=Gs(()=>t.customId),i=un("markstreamHtmlPolicy",void 0),s=un("markstreamNestedRendererProps",void 0),o=F(()=>{var g;return(g=i?.value)!=null?g:"safe"}),r=F(()=>{var g,m;const y=(g=s?.value)!=null?g:{};return bn(It({},y),{customId:(m=t.customId)!=null?m:y.customId,htmlPolicy:o.value})}),l=Gl({loader:()=>Promise.resolve().then(()=>qA),suspensible:!1}),a=F(()=>t.components[String(t.node.type)]),u=F(()=>!!(a.value&&n.value[t.node.type]&&!hg(String(t.node.type)))),c=F(()=>u.value?TA(t.node,o.value):void 0),d=F(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=F(()=>{var g;return String((g=t.node.content)!=null?g:"")}),h=F(()=>{var g,m;return String((m=(g=t.node.content)!=null?g:t.node.raw)!=null?m:"")});return(g,m)=>a.value&&u.value?(v(),de(Ls(a.value),Kn({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:fe(()=>[d.value?(v(),de(p(l),Kn({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?(v(),de(p(l),Kn({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?(v(),de(Ls(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(v(),E("span",fEe,B(h.value),1)):te("",!0)}}),yE=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function hEe(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return bn(It(It({},yE),n),{enabled:(t=n.enabled)==null||t})}return It({},yE)}function DA(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,i=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=i}function tP(e){var t,n;const i=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(i.length<3)return"";const s=i[0];if(s!=="`"&&s!=="~"||i[1]!==s||i[2]!==s)return"";let o=3;for(;i[o]===s;)o+=1;return i.slice(o).trim()}function kE(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function pEe(e){var t;return e.diff===!0||kE(e.language)||kE(tP(String((t=e.raw)!=null?t:"")))}function gEe(e,t,n){const i=(function(s){const o=tP(s);if(!o)return"";const r=o.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:i||t,caption:i?n?`Diff / ${t}`:t:""}}const mEe=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],vEe={key:0,translate:"no",class:"markstream-pre__diff-code"},yEe={class:"markstream-pre__diff-pane-content"},kEe={class:"markstream-pre__diff-number","aria-hidden":"true"},bEe={class:"markstream-pre__diff-content"},AEe={class:"markstream-pre__diff-content-inner"},CEe={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},wEe=["textContent"],xEe=["textContent"],Nr=Xe({__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(Z,se){const ie=String(Z??"");return se?ie:ie.replace(/\r\n$|\n$|\r$/,"")}const i=F(()=>{var Z,se,ie;const he=String((se=(Z=t.node)==null?void 0:Z.language)!=null?se:"");return String((ie=String(he).split(/\s+/g)[0])!=null?ie:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=F(()=>`language-${i.value}`),o=F(()=>{var Z;return t.loading===!0||((Z=t.node)==null?void 0:Z.loading)===!0}),r=F(()=>{var Z;return n((Z=t.node)==null?void 0:Z.code,o.value)});let l="",a=1;const u=F(()=>(function(Z){let se=0,ie=1;Z.startsWith(l)&&(se=l.length,ie=a,se>0&&Z[se-1]==="\r"&&Z[se]===` +`&&se++);for(let he=se;her.value.split(/\r\n|\n|\r/));let d=0,f="";const h=F(()=>{const Z=u.value;Z{var Z;return t.showLineNumbers===!0&&((Z=t.node)==null?void 0:Z.diff)===!0}),m=F(()=>g.value&&t.diffInline===!0),y=F(()=>{const Z=Number(t.reservedHeightPx);if(!Number.isFinite(Z)||Z<=0)return;const se=`${Math.ceil(Z)}px`;return o.value?{maxHeight:se,overflow:"auto"}:{height:se,minHeight:se,maxHeight:se,overflow:"auto"}}),b=["diff ","index ","--- ","+++ ","@@ "];function A(Z){return String(Z??"").trim().length===0}function w(Z,se="context",ie={}){const he=A(Z);return{code:Z,kind:he&&se!=="hunk"&&se!=="spacer"&&!ie.preserveBlankKind?"context":se,empty:he}}function k(Z){const se=n(Z,o.value);return se?se.split(/\r\n|\n|\r/):[]}function x(Z,se){return!A(Z[se])||seb.some(ie=>se.startsWith(ie)))}function I(Z,se){return se||!Z.startsWith(" ")||Z.startsWith(" ")?Z:` ${Z}`}function L(Z,se){const ie=Z.length,he=se.length,Ee=[];let J=0;for(;J=J&&ue>=J&&Z[G]===se[ue];)ve.unshift({originalIndex:G,modifiedIndex:ue}),G--,ue--;const Ae=G-J+1,ae=ue-J+1;if(Ae<=0||ae<=0||o.value||(Ae+1)*(ae+1)>15e5)return Ee.concat(ve);const re=ae+1,Q=new Uint32Array((Ae+1)*(ae+1));for(let Le=Ae-1;Le>=0;Le--)for(let Oe=ae-1;Oe>=0;Oe--){const we=Le*re+Oe;if(Z[J+Le]===se[J+Oe])Q[we]=Q[(Le+1)*re+Oe+1]+1;else{const xe=Q[(Le+1)*re+Oe],ze=Q[Le*re+Oe+1];Q[we]=xe>=ze?xe:ze}}const oe=[];let ge=0,be=0;for(;ge=Q[ge*re+be+1]?ge++:be++;return Ee.concat(oe,ve)}function N(Z){var se;const ie=(function(){var ue,Ae;const ae=t.diffHideUnchangedRegions;if(ae==null||ae===!1)return null;const re=ae===!0?{}:ae;return re.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((ue=re.contextLineCount)!=null?ue:2)),minimumLineCount:Math.max(1,Math.floor((Ae=re.minimumLineCount)!=null?Ae:4))}})();if(!ie||Z.length<1||Z.length>2||Z.length===2&&Z[0].lines.length!==Z[1].lines.length)return Z;const he=Z[0].lines,Ee=(se=Z[1])==null?void 0:se.lines,J=ue=>he[ue].kind==="context"&&(Ee===void 0||Ee[ue].kind==="context"&&he[ue].code===Ee[ue].code),ve=[];let G=0;for(;G=ie.minimumLineCount){const ae=ue+(ue===0?0:ie.contextLineCount),re=Ae-(Ae===he.length?0:ie.contextLineCount);re-ae>=ie.minimumLineCount&&ve.push({start:ae,end:re})}G===ue&&G++}return ve.length?Z.map((ue,Ae)=>{const ae=[];let re=0;for(const Q of ve)ae.push(...ue.lines.slice(re,Q.start)),ae.push({code:Ae===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${ue.key}-collapsed-${Q.start}-${Q.end}`,number:""}),re=Q.end;return ae.push(...ue.lines.slice(re)),bn(It({},ue),{lines:ae})}):Z}const T=F(()=>{var Z,se,ie,he;if(!g.value)return[];const Ee=(function(Ae){const ae=Ae.some(Q=>_(Q)),re=Ae.some(Q=>S(Q));return ae&&re||(function(){var Q,oe,ge,be;if(i.value==="diff")return!0;const Le=(be=(ge=String((oe=(Q=t.node)==null?void 0:Q.raw)!=null?oe:"").split(/\r?\n/,1)[0])==null?void 0:ge.trim())!=null?be:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(Le)})()&&(ae||re)})(c.value),J=(function(){var Ae,ae;return((Ae=t.node)==null?void 0:Ae.originalCode)!=null||((ae=t.node)==null?void 0:ae.updatedCode)!=null})();if(m.value){const Ae=J?(function(ae,re){const Q=k(ae),oe=k(re),ge=L(Q,oe);if(ge.length>0){const ze=[];let st=0,dt=0;for(const wt of ge){for(;st=Le&&we>=Le&&Q[Oe]===oe[we];)xe.unshift(bn(It({},w(oe[we])),{key:`inline-suffix-${we}`,number:we+1})),Oe--,we--;for(let ze=Le;ze<=Oe;ze++)be.push(bn(It({},w(Q[ze],"removed",{preserveBlankKind:x(Q,ze)})),{key:`inline-removed-source-${ze}`,number:ze+1}));for(let ze=Le;ze<=we;ze++)be.push(bn(It({},w(oe[ze],"added",{preserveBlankKind:x(oe,ze)})),{key:`inline-added-source-${ze}`,number:ze+1}));return be.concat(xe)})((Z=t.node)==null?void 0:Z.originalCode,(se=t.node)==null?void 0:se.updatedCode):(function(ae){const re=[];let Q=1,oe=1;const ge=M(ae);for(const[be,Le]of ae.entries())if(Le.startsWith("@@")){const Oe=Le.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);Oe&&(Q=Number(Oe[1]),oe=Number(Oe[2])),re.push(bn(It({},w(Le,"hunk")),{key:`inline-hunk-${be}`,number:""}))}else if(_(Le))re.push(bn(It({},w(I(Le.slice(1),ge),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${be}`,number:Q++}));else if(S(Le))re.push(bn(It({},w(I(Le.slice(1),ge),"added",{preserveBlankKind:!0})),{key:`inline-added-${be}`,number:oe++}));else{const Oe=ge&&Le.startsWith(" ")?Le.slice(1):Le;re.push(bn(It({},w(Oe)),{key:`inline-context-${be}`,number:oe})),Q++,oe++}return re})(c.value);return N([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Ae}])}if(!Ee&&J)return(function(Ae,ae){const re=k(Ae),Q=k(ae),oe=L(re,Q),ge=[],be=[];let Le=0,Oe=0,we=0;const xe=(ze,st)=>{const dt=Math.max(ze-Le,st-Oe);for(let wt=0;wtbn(It({},Ae),{key:`original-${ae}`,number:ae+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:G.map((Ae,ae)=>bn(It({},Ae),{key:`modified-${ae}`,number:ae+1}))}])}),D=F(()=>{var Z,se;if(t.showLineNumbers!==!0)return;let ie=g.value?1:u.value;if(g.value){ie=Math.max(ie,k((Z=t.node)==null?void 0:Z.originalCode).length,k((se=t.node)==null?void 0:se.updatedCode).length);for(const Ee of T.value)for(const J of Ee.lines)typeof J.number=="number"&&(ie=Math.max(ie,J.number))}const he=`${Math.max(2,String(ie).length)}ch`;return{"--markstream-pre-line-number-width":he,"--markstream-pre-diff-line-number-width":he,"--markstream-code-padding-left":"calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch))"}}),P=F(()=>T.value.some(Z=>Z.lines.some(se=>se.kind==="collapsed"))),O=F(()=>{const Z=i.value;return Z?`Code block: ${Z}`:"Code block"}),R=V(null),q=V([]);let j=null,H=!1,z=null;function W(Z){const se=Number.parseFloat(String(Z??""));return Number.isFinite(se)&&se>0?se:0}function X(Z,se){var ie;if(!Z)return se;if(Z.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const he=Z.querySelector(".markstream-pre__diff-content"),Ee=he?.getBoundingClientRect(),J=(ie=Ee?.height)!=null?ie:0;return Math.max(se,Math.ceil(J))}function U(){H||typeof window>"u"||(j!=null&&window.cancelAnimationFrame(j),j=window.requestAnimationFrame(()=>{j=null,H||(function(){var Z,se;j=null;const ie=R.value;if(!ie||!g.value||m.value||!ie.classList.contains("is-wrap"))return void(q.value.length&&(q.value=[]));const he=(function(ae){const re=window.getComputedStyle(ae),Q=W(re.getPropertyValue("--markstream-pre-diff-line-height"));if(Q>0)return Q;const oe=W(re.lineHeight);return oe>0?oe:18})(ie),Ee=Array.from(ie.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),J=Array.from(ie.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),ve=Math.max(Ee.length,J.length),G=[];for(let ae=0;ae{const Q=Ae[re];return Q&&Math.abs(ae.rowHeight-Q.rowHeight)<=.5&&Math.abs(ae.originalHeight-Q.originalHeight)<=.5&&Math.abs(ae.modifiedHeight-Q.modifiedHeight)<=.5})||(q.value=G)})()}))}function ne(Z){z?.disconnect(),z=null,Z&&g.value&&!m.value&&typeof ResizeObserver<"u"&&(z=new ResizeObserver(()=>{U()}),z.observe(Z))}function le(Z,se){const ie=q.value[Z];if(!ie)return;const he=se==="original"?ie.originalHeight:ie.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(ie.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(he)}px`}}return Ue(R,Z=>{ne(Z),bt(()=>U())},{flush:"post"}),Ue([g,m,T],()=>{ne(R.value),bt(()=>U())},{flush:"post",immediate:!0}),On(()=>{H=!0,j!=null&&(window.cancelAnimationFrame(j),j=null),z?.disconnect(),z=null}),(Z,se)=>(v(),E("pre",{ref_key:"preRef",ref:R,style:Vt([y.value,D.value]),class:De([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":g.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":P.value}]),"aria-busy":o.value,"aria-label":O.value,"data-language":i.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[g.value?(v(),E("code",vEe,[(v(!0),E(Te,null,gt(T.value,ie=>(v(),E("span",{key:ie.key,class:De(["markstream-pre__diff-pane",ie.className])},[C("span",yEe,[(v(!0),E(Te,null,gt(ie.lines,(he,Ee)=>(v(),E("span",{key:he.key,class:De(["markstream-pre__diff-line",[`markstream-pre__diff-line--${he.kind}`,{"markstream-pre__diff-line--empty":he.empty}]]),style:Vt(le(Ee,ie.key))},[se[0]||(se[0]=C("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),C("span",kEe,B(he.number),1),C("span",bEe,[C("span",AEe,B(he.code),1)])],6))),128))])],2))),128))])):(v(),E(Te,{key:1},[t.showLineNumbers?(v(),E("span",CEe,[C("span",{class:"markstream-pre__line-numbers-text",textContent:B(h.value)},null,8,wEe)])):te("",!0),C("code",{translate:"no",class:"markstream-pre__code",textContent:B(r.value)},null,8,xEe)],64))],14,mEe))}});Nr.install=e=>{e.component(Nr.__name,Nr)};const Ms=vi(Xe({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=e1(),i=un("markstreamFade",void 0),s=un("markstreamTextStreamState",void 0),o=un("markstreamStreamVersion",void 0),r=F(()=>{const x=n.fade;return x===""||x===!0||x==="true"||x!==!1&&x!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=F(()=>{var x;const _=(x=n["index-key"])!=null?x:n.indexKey;return _==null||_===""?"":String(_)}),u=V(t.node.content),c=V(""),d=V(0),f=V(t.node.content);let h;const g=V(null),m=V(null);let y="",b=null;function A(){h?.(),h=void 0}function w(){A(),c.value&&(u.value=u.value+c.value,c.value="")}Ue([u,g,m],function(){var x,_;const S=g.value;if(!S)return;const M=String((x=u.value)!=null?x:""),I=m.value;return b||(b=S.firstChild,y=(_=b?.data)!=null?_:""),M.startsWith(y)?!b&&M?(S.textContent=M,b=S.firstChild,void(y=M)):void(M.length>y.length&&I&&(I.appendChild(document.createTextNode(M.slice(y.length))),y=M)):(S.textContent=M,b=S.firstChild,I&&(I.textContent=""),void(y=M))},{immediate:!0}),Ue([()=>t.node.content,a,l],([x])=>{const _=String(x??""),S=a.value,M=$O({nextContent:_,persistedContent:S?s?.get(S):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=M.settledContent,c.value=M.streamedDelta,M.appended?(d.value+=1,(function(){if(!c.value||h||!o)return;const I=o.value;h=Ue(()=>o.value,L=>{L!==I&&w()},{flush:"sync"})})()):c.value||A(),S&&s?.set(S,_)},{immediate:!0}),Tc(A);const k=F(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(x,_)=>(v(),E("span",{class:De([[e.node.center?"text-node-center":""],"text-node"])},[$n(C("span",{ref_key:"settledTextEl",ref:g},B(f.value),513),[[os,u.value!==""]]),$n(C("span",{ref_key:"settledAppendsEl",ref:m},null,512),[[os,u.value!==""]]),c.value?(v(),E("span",{key:0,class:De(["text-node-stream-delta",[k.value]]),onAnimationend:w},B(c.value),35)):te("",!0)],2))}}),[["__scopeId","data-v-fd79037c"]]);function bp(e,t,n){return Xe({name:e,inheritAttrs:!1,setup(i,{attrs:s,slots:o}){var r,l;const a=FA(),u=LA(),c=NA(),d=typeof window<"u"&&((l=(r=Zs())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=V(typeof window>"u"||d||!c.value),h=ra(null);let g=null;function m(y){const b=y&&"$el"in y?y.$el:y;h.value=b instanceof HTMLElement?b:null}return typeof window<"u"&&Ue([h,c],([y,b],A,w)=>{if(g?.destroy(),g=null,!b||f.value)return void(f.value=!0);if(!y)return;let k=!0;const x=a(y,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});g=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{k&&g===x&&(f.value=!0)}),w(()=>{k=!1,x.destroy(),g===x&&(g=null)})},{immediate:!0}),On(()=>{g?.destroy(),g=null}),()=>gn(f.value?t:n,bn(It({},s),{ref:m}),o)}})}Ms.install=e=>{e.component(Ms.__name,Ms)};const ly=Xe({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 i,s,o,r,l,a,u;const c=_9(String((s=(i=n.node)==null?void 0:i.language)!=null?s:"")),d=JI[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):JI[""]),f=pEe(n.node),h=gEe(String((r=(o=n.node)==null?void 0:o.raw)!=null?r:""),d,f),g=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:DA(g??{},typeof window>"u"?0:window.innerWidth)),y=g?.diffAppearance,b=y==="dark"||y!=="light"&&n.isDark===!0,A=typeof g?.fontSize=="number"&&Number.isFinite(g.fontSize)&&g.fontSize>0?g.fontSize:12,w=typeof g?.lineHeight=="number"&&Number.isFinite(g.lineHeight)&&g.lineHeight>0?g.lineHeight:A===12?18:Math.max(12,Math.round(1.5*A)),k=typeof g?.tabSize=="number"&&Number.isFinite(g.tabSize)&&g.tabSize>0?g.tabSize:4,x=f?0:8,_=typeof((a=g?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(g.padding.top)&&g.padding.top>=0?g.padding.top:x,S=typeof((u=g?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(g.padding.bottom)&&g.padding.bottom>=0?g.padding.bottom:x,M=typeof g?.fontFamily=="string"?g.fontFamily.trim():"",I=It(It({fontSize:`${A}px`,lineHeight:`${w}px`,tabSize:k,paddingTop:`${_}px`,paddingBottom:`${S}px`,"--markstream-pre-line-number-top":`${_}px`},f?{"--markstream-pre-diff-line-height":`${w}px`}:{}),M?{"--markstream-code-font-family":M}:{}),L=()=>gn("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"},[gn("svg",{class:"action-icon",width:"14",height:"14"})]),N=n.isShowPreview!==!1&&(c==="html"||c==="svg"),T=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||N&&n.showPreviewButton!==!1,D=O=>{if(O!=null)return typeof O=="number"?`${O}px`:String(O)},P=It(It(It({"--markstream-code-layout-character-width":"1ch"},D(n.minWidth)?{minWidth:D(n.minWidth)}:{}),D(n.maxWidth)?{maxWidth:D(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--markstream-code-fallback-bg, var(--code-bg, #fff))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return gn("div",bn(It({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":b,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[P,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:gn("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)]"},[gn("div",{class:"code-header-main",style:{minWidth:0,flex:"1 1 auto",display:"flex",alignItems:"center",gap:"var(--ms-gap-header-main, 0.625rem)",overflow:"hidden"}},[gn("span",{class:"icon-slot h-4 w-4 flex-shrink-0","aria-hidden":"true",style:{display:"inline-flex",width:"1rem",height:"1rem",flex:"0 0 auto"}}),gn("div",{class:"code-header-copy",style:{minWidth:0,display:"grid",gap:"2px"}},[gn("div",{class:"code-header-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--ms-text-label, 0.75rem)",fontWeight:"500",color:"var(--code-action-fg)"}},h.title),h.caption?gn("div",{class:"code-header-caption",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.75rem",color:"var(--code-line-number)"}},h.caption):null])]),gn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?gn("div",{class:"code-diff-stats","aria-hidden":"true"},[gn("span",{class:"code-diff-stat removed"},"-0"),gn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:L(),n.showCollapseButton===!1?null:L(),T?gn("div",{class:"relative"},[L()]):null])]),gn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[gn(Nr,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?hEe(g?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:I,"data-markstream-code-loading":"1"})]),gn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[gn("div",{class:"loading-skeleton"},[gn("div",{class:"skeleton-line"}),gn("div",{class:"skeleton-line"}),gn("div",{class:"skeleton-line short"})])]),gn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),r3=bp("ViewportDeferredCodeBlockNode",Gl({loader:()=>qi(null,null,function*(){try{return(yield Ss(()=>import("./CodeBlockNode-h5qcRgnj.js"),__vite__mapDeps([6,7]))).default}catch(e){return console.warn('[markstream-vue] Failed to load the enhanced CodeBlockNode chunk; falling back to preformatted code rendering. Enhanced code blocks require the optional "stream-diffs" peer (or "stream-monaco" as a fallback).',e),Nr}}),loadingComponent:ly,delay:0,suspensible:!1}),ly),ua=Gl(()=>qi(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,i,s,o;return gn(Ms,bn(It({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield jO(),(yield Ss(()=>import("./index7-DODWAZ6M.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,i,s,o;return gn(Ms,bn(It({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))}})),nP=Gl(()=>qi(null,null,function*(){try{return yield jO(),(yield Ss(()=>import("./index6-CiRvdpAR.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,i,s;return gn(Ms,bn(It({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(i=e.node.content)!=null?i:""}$$`}}))}})),hr=vi(Xe({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(v(),E("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]=i=>t.$emit("click",i,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=i=>t.$emit("mouseEnter",i,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=i=>t.$emit("mouseLeave",i,e.node.id,e.messageId,e.threadId))},B(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);hr.install=e=>{e.component(hr.__name,hr)};const SEe={class:"superscript-node"},zr=vi(Xe({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Gs(()=>t.customId),i=F(()=>It({text:Ms,inline_code:Jo,link:mr,html_inline:ol,strong:pr,emphasis:vr,footnote_reference:sl,strikethrough:gr,highlight:rl,insert:Or,subscript:Rr,emoji:$r,math_inline:ua,reference:hr},n.value));return(s,o)=>(v(),E("sup",SEe,[(v(!0),E(Te,null,gt(e.node.children,(r,l)=>(v(),de(p(Pa),{key:`${e.indexKey||"superscript"}-${l}`,components:i.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"]]);zr.install=e=>{e.component(zr.__name,zr)};const _Ee={class:"subscript-node"},Rr=vi(Xe({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Gs(()=>t.customId),i=F(()=>It({text:Ms,inline_code:Jo,link:mr,html_inline:ol,strong:pr,emphasis:vr,footnote_reference:sl,strikethrough:gr,highlight:rl,insert:Or,superscript:zr,emoji:$r,math_inline:ua,reference:hr},n.value));return(s,o)=>(v(),E("sub",_Ee,[(v(!0),E(Te,null,gt(e.node.children,(r,l)=>(v(),de(p(Pa),{key:`${e.indexKey||"subscript"}-${l}`,components:i.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"]]);Rr.install=e=>{e.component(Rr.__name,Rr)};const MEe={class:"strong-node"},pr=vi(Xe({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Gs(()=>t.customId),i=F(()=>It({text:Ms,inline_code:Jo,link:mr,html_inline:ol,emphasis:vr,strikethrough:gr,highlight:rl,insert:Or,subscript:Rr,superscript:zr,emoji:$r,footnote_reference:sl,math_inline:ua,reference:hr},n.value));return(s,o)=>(v(),E("strong",MEe,[(v(!0),E(Te,null,gt(e.node.children,(r,l)=>(v(),de(p(Pa),{key:`${e.indexKey||"strong"}-${l}`,components:i.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"]]);pr.install=e=>{e.component(pr.__name,pr)};const IEe={class:"strikethrough-node"},gr=vi(Xe({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Gs(()=>t.customId),i=F(()=>It({text:Ms,inline_code:Jo,link:mr,html_inline:ol,strong:pr,emphasis:vr,highlight:rl,insert:Or,subscript:Rr,superscript:zr,emoji:$r,footnote_reference:sl,math_inline:ua,reference:hr},n.value));return(s,o)=>(v(),E("del",IEe,[(v(!0),E(Te,null,gt(e.node.children,(r,l)=>(v(),de(p(Pa),{key:`${e.indexKey||"strikethrough"}-${l}`,components:i.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"]]);gr.install=e=>{e.component(gr.__name,gr)};const EEe=["href","title","aria-label","aria-hidden","target","rel"],TEe=["aria-hidden"],LEe={class:"link-text-wrapper relative inline-flex"},NEe={class:"leading-[normal] link-text"},mr=vi(Xe({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=un("markstreamShowTooltips",void 0),i=F(()=>{const b=n?.value;return typeof b=="boolean"?b:t.showTooltip}),s=F(()=>{var b,A,w,k,x;const _=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",S=(b=t.animationOpacity)!=null?b:.35,M=Math.max(.12,Math.min(.5*S,S)),I={"--underline-height":`${(A=t.underlineHeight)!=null?A:2}px`,"--underline-bottom":_,"--underline-opacity":String(S),"--underline-rest-opacity":String(M),"--underline-duration":`${(w=t.animationDuration)!=null?w:1.6}s`,"--underline-timing":(k=t.animationTiming)!=null?k:"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}),o=Gs(()=>t.customId),r=F(()=>It({text:Ms,strong:pr,strikethrough:gr,emphasis:vr,image:hc,html_inline:ol,inline_code:Jo},o.value)),l=e1(),a=F(()=>{var b,A;const w=(b=t.node)==null?void 0:b.attrs;if(!w||typeof w!="object")return{};const k={};if(Array.isArray(w))for(const x of w)Array.isArray(x)&&x[0]&&(k[String(x[0])]=String((A=x[1])!=null?A:""));else for(const[x,_]of Object.entries(w))x&&_!=null&&_!==!1&&(k[x]=_===!0?"":String(_));return dE(k,"safe","a")}),u=F(()=>It(It({},l),a.value)),c=F(()=>{var b,A;return dE({href:String((A=(b=t.node)==null?void 0:b.href)!=null?A:"")},"safe","a").href}),d=F(()=>{if(!c.value)return;const b=u.value.target;return(typeof b=="string"?b.trim():String(b??"").trim())||(gCe(c.value)?"_blank":void 0)}),f=F(()=>{var b;return String((b=d.value)!=null?b:"").trim().toLowerCase()==="_blank"}),h=F(()=>{if(!c.value)return;const b=u.value.rel,A=new Set((typeof b=="string"?b:String(b??"")).split(/\s+/).filter(Boolean)),w=new Set(Array.from(A).filter(k=>k.toLowerCase()!=="opener"));return f.value&&(w.add("noopener"),w.add("noreferrer")),w.size>0?Array.from(w).join(" "):void 0}),g=F(()=>{const b=It({},u.value);return delete b.title,delete b.href,delete b.target,delete b.rel,b});function m(){i.value&&JIe()}const y=F(()=>{var b,A;const w=(b=t.node)==null?void 0:b.title;return typeof w=="string"&&w.trim().length>0?w:String((A=c.value)!=null?A:"")});return(b,A)=>{var w,k;return e.node.loading?(v(),E("span",Kn({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",LEe,[C("span",NEe,[K(p(Ms),{class:"leading-[normal] link-text",node:{type:"text",content:String((w=e.node.text)!=null?w:""),raw:String((k=e.node.text)!=null?k:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),A[1]||(A[1]=C("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,TEe)):(v(),E("a",Kn({key:0,class:"link-node",href:c.value,title:i.value?"":y.value,"aria-label":`Link: ${y.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:h.value},g.value,{style:s.value,onMouseenter:A[0]||(A[0]=x=>(function(_){var S,M,I,L;if(!i.value)return;const N=_,T=N?.clientX!=null&&N?.clientY!=null?{x:N.clientX,y:N.clientY}:void 0,D=((S=t.node)==null?void 0:S.title)||((M=c.value)!=null&&M.includes("xn--")&&((L=(I=t.node)==null?void 0:I.text)!=null&&L.includes("://"))?t.node.text:c.value)||"";YIe(_.currentTarget,D,"top",!1,T)})(x)),onMouseleave:m}),[(v(!0),E(Te,null,gt(e.node.children,(x,_)=>(v(),de(p(Pa),{key:`${e.indexKey||"emphasis"}-${_}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${_}`},null,8,["components","node","custom-id","index-key"]))),128))],16,EEe))}}}),[["__scopeId","data-v-367e6ca4"]]);mr.install=e=>{e.component(mr.__name,mr)};const FEe={class:"insert-node"},Or=vi(Xe({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Gs(()=>t.customId),i=F(()=>It({text:Ms,inline_code:Jo,link:mr,html_inline:ol,strong:pr,emphasis:vr,strikethrough:gr,highlight:rl,subscript:Rr,superscript:zr,emoji:$r,footnote_reference:sl,math_inline:ua,reference:hr},n.value));return(s,o)=>(v(),E("ins",FEe,[(v(!0),E(Te,null,gt(e.node.children,(r,l)=>(v(),de(p(Pa),{key:`${e.indexKey||"insert"}-${l}`,components:i.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"]]);Or.install=e=>{e.component(Or.__name,Or)};const DEe={class:"highlight-node"},rl=vi(Xe({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Gs(()=>t.customId),i=F(()=>It({text:Ms,inline_code:Jo,link:mr,html_inline:ol,strong:pr,emphasis:vr,strikethrough:gr,insert:Or,subscript:Rr,superscript:zr,emoji:$r,footnote_reference:sl,math_inline:ua,reference:hr},n.value));return(s,o)=>(v(),E("mark",DEe,[(v(!0),E(Te,null,gt(e.node.children,(r,l)=>(v(),de(p(Pa),{key:`${e.indexKey||"highlight"}-${l}`,components:i.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"]]);rl.install=e=>{e.component(rl.__name,rl)};const BEe={class:"emphasis-node"},vr=vi(Xe({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Gs(()=>t.customId),i=F(()=>It({text:Ms,inline_code:Jo,link:mr,html_inline:ol,strong:pr,strikethrough:gr,highlight:rl,insert:Or,subscript:Rr,superscript:zr,emoji:$r,footnote_reference:sl,math_inline:ua,reference:hr},n.value));return(s,o)=>(v(),E("em",BEe,[(v(!0),E(Te,null,gt(e.node.children,(r,l)=>(v(),de(p(Pa),{key:`${e.indexKey||"emphasis"}-${l}`,components:i.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"]]);vr.install=e=>{e.component(vr.__name,vr)};const $Ee={class:"hard-break"},pc=vi(Xe({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(v(),E("br",$Ee))}),[["__scopeId","data-v-50c58f70"]]);pc.install=e=>{e.component(pc.__name,pc)};const F0=Xe({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=Mt({checkbox:il,checkbox_input:il,emoji:$r,emphasis:vr,hardbreak:pc,highlight:rl,inline_code:Jo,insert:Or,link:mr,reference:hr,strikethrough:gr,strong:pr,subscript:Rr,superscript:zr,text:Ms}),i=Gs(()=>t.customId),s=F(()=>{const o=i.value;return Object.keys(o).length>0?It(It({},n),o):n});return(o,r)=>(v(!0),E(Te,null,gt(e.nodes,(l,a)=>(v(),de(p(Pa),{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 q8(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(q8)}function ay(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(q8))return e;if(!t||e.length!==1)return null;const i=e[0];if(i?.type!=="paragraph"||!Array.isArray(i.children))return null;const s=i.children;return(n||s.length>0)&&s.every(q8)?s:null}function af(e){var t,n;if(!e?.length)return null;let i="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;i+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return i}const zEe=["cite"],REe={key:0,dir:"auto",class:"paragraph-node"},OEe=["custom-id"],Ev=vi(Xe({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=Gs(()=>t.customId),i=F(()=>!!n.value.paragraph),s=F(()=>!!n.value.text),o=F(()=>ay(t.node.children,!i.value)),r=F(()=>t.fade!==!1||s.value?null:af(o.value));return Gn("markstreamShowTooltips",F(()=>t.showTooltips)),Gn("markstreamFade",F(()=>t.fade)),(l,a)=>(v(),E("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[o.value?(v(),E("p",REe,[r.value!==null?(v(),E("span",{key:0,class:"text-node","custom-id":t.customId},B(r.value),9,OEe)):(v(),de(p(F0),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(v(),de(p(Pr),{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,zEe))}}),[["__scopeId","data-v-abfecebc"]]);Ev.install=e=>{e.component(Ev.__name,Ev)};const PEe={class:"definition-list"},jEe={class:"definition-term"},HEe={class:"definition-desc"},Tv=vi(Xe({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(v(),E("dl",PEe,[(v(!0),E(Te,null,gt(t.node.items,(s,o)=>(v(),E(Te,{key:o},[C("dt",jEe,[K(p(Pr),{"index-key":`definition-term-${t.indexKey}-${o}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),C("dd",HEe,[K(p(Pr),{"index-key":`definition-desc-${t.indexKey}-${o}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[1]||(i[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);Tv.install=e=>{e.component(Tv.__name,Tv)};const WEe=["href","title"],Vp=vi(Xe({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(i){var s;if(i.preventDefault(),typeof document>"u")return;const o=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(i,s)=>(v(),E("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,WEe))}}),[["__scopeId","data-v-e1eb37b6"]]);Vp.install=e=>{e.component(Vp.__name,Vp)};const qEe=["id"],UEe={class:"flex-1"},Lv=Xe({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(v(),E("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[C("div",UEe,[K(p(Pr),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,qEe))}});Lv.install=e=>{e.component(Lv.__name,Lv)};const KEe=["custom-id"],U8=vi(Xe({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Gs(()=>t.customId),i=un("markstreamFade",void 0),s=F(()=>i?.value!==!1||n.value.text?null:af(t.node.children)),o=F(()=>It({text:Ms,inline_code:Jo,link:mr,image:hc,strong:pr,emphasis:vr,strikethrough:gr,highlight:rl,insert:Or,subscript:Rr,superscript:zr,emoji:$r,checkbox:il,checkbox_input:il,footnote_reference:sl,hardbreak:pc,math_inline:ua,reference:hr},n.value));return(r,l)=>(v(),de(Ls(`h${e.node.level}`),Kn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:fe(()=>[s.value!==null?(v(),E("span",{key:0,class:"text-node","custom-id":t.customId},B(s.value),9,KEe)):(v(!0),E(Te,{key:1},gt(e.node.children,(a,u)=>(v(),de(p(Pa),{key:u,components:o.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"]]),E9=U8;E9.install=e=>{e.component(U8.__name,U8)};const VEe={key:0,dir:"auto",class:"paragraph-node"},ZEe=["custom-id"],GEe={dir:"auto",class:"paragraph-node"},QEe=["custom-id"],Bh=vi(Xe({__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=F(()=>{var h;return(h=t.node)!=null?h:t.item}),i=Gs(()=>t.customId),s=F(()=>!!i.value.paragraph),o=F(()=>!!i.value.text),r=F(()=>{var h;return ay((h=n.value)==null?void 0:h.children,!s.value)}),l=F(()=>{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 y=g.slice(1);if(!y.every(A=>A?.type==="list"))return null;const b=ay([m]);return b?{paragraphChildren:b,nestedLists:y}:null});function a(){return t.fade===!1&&!o.value}const u=F(()=>a()?af(r.value):null),c=F(()=>{var h;return a()?af((h=l.value)==null?void 0:h.paragraphChildren):null}),d=Object.freeze({}),f=F(()=>{const{value:h}=t;return typeof h=="number"&&Number.isFinite(h)?{value:h}:d});return Gn("markstreamShowTooltips",F(()=>t.showTooltips)),Gn("markstreamFade",F(()=>t.fade)),(h,g)=>{var m,y;return v(),E("li",Kn({class:"list-item",dir:"auto"},f.value),[r.value?(v(),E("p",VEe,[u.value!==null?(v(),E("span",{key:0,class:"text-node","custom-id":t.customId},B(u.value),9,ZEe)):(v(),de(p(F0),{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?(v(),E(Te,{key:1},[C("p",GEe,[c.value!==null?(v(),E("span",{key:0,class:"text-node","custom-id":t.customId},B(c.value),9,QEe)):(v(),de(p(F0),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(v(!0),E(Te,null,gt(l.value.nestedLists,(b,A)=>(v(),de(p(Pr),{key:A,nodes:[b],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${A}`,"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]=w=>h.$emit("copy",w))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(v(),de(p(Pr),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(y=(m=n.value)==null?void 0:m.children)!=null?y:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:g[1]||(g[1]=b=>h.$emit("copy",b))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);Bh.install=e=>{e.component(Bh.__name,Bh)};const $h=vi(Xe({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=Gs(()=>e.customId),n=F(()=>t.value.list_item||Bh);return(i,s)=>(v(),de(Ls(e.node.ordered?"ol":"ul"),{class:De(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:fe(()=>[(v(!0),E(Te,null,gt(e.node.items,(o,r)=>{var l;return v(),de(Ls(n.value),Kn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:o,"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=>i.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);$h.install=e=>{e.component($h.__name,$h)};const YEe={key:2,class:"html-block-node__raw"},JEe=["innerHTML"],XEe={key:1,class:"html-block-node__placeholder"},Zp=vi(Xe({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=un("markstreamHtmlPolicy",void 0),i=un("markstreamNestedRendererProps",void 0),s=F(()=>{var T,D;return(D=(T=t.htmlPolicy)!=null?T:n?.value)!=null?D:"safe"}),o=F(()=>{var T,D;const P=(T=i?.value)!=null?T:{};return bn(It({},P),{customId:(D=t.customId)!=null?D:P.customId,htmlPolicy:s.value})}),r=Gl({loader:()=>Promise.resolve().then(()=>qA),suspensible:!1}),l=F(()=>{const T=Sv(t.node.attrs,s.value);if(!T)return;const D=Wp(T);return Object.keys(D).length>0?D:void 0}),a=F(()=>{const T=String(t.node.tag||"").trim(),D=Sv(t.node.attrs,s.value,T);if(!D)return;const P=Wp(D);return Object.keys(P).length>0?P:void 0}),u=Gs(()=>t.customId),c=Xe({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=V(null),f=V(typeof window>"u"),h=V(t.node.content),g=F(()=>Array.isArray(t.node.children)?t.node.children:[]),m=F(()=>String(t.node.tag||"div")),y=F(()=>{var T;if(m.value.trim().toLowerCase()!=="details"||(T=t.node.attrs)!=null&&T.some(([P])=>String(P).toLowerCase()==="open"))return null;const D=g.value[0];return D?.type==="html_block"&&String(D.tag||"").toLowerCase()==="summary"?D:null}),b=F(()=>{var T;return af((T=y.value)==null?void 0:T.children)}),A=F(()=>{const T=y.value;if(!T)return;const D=Sv(T.attrs,s.value,"summary");if(!D)return;const P=Wp(D);return Object.keys(P).length>0?P:void 0}),w=F(()=>b.value==null?g.value:g.value.slice(1)),k=F(()=>{const T=m.value.trim().toLowerCase();return AR.has(T)||SA(T,s.value)}),x=F(()=>g.value.length>0&&!!t.node.tag&&!k.value),_=F(()=>{var T,D,P;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(T=h.value)!=null?T:""};const O=(D=h.value)!=null?D:t.node.content;if(!O)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:Dh(O,s.value)};if(t.node.loading){const q=ry(O,u.value,s.value);return q===null?{mode:"text",content:(P=t.node.raw)!=null?P:O}:{mode:"dynamic",nodes:q}}if(!GO(O,u.value))return{mode:"html",content:Dh(O,s.value)};const R=ry(O,u.value,s.value);return R===null?{mode:"html",content:Dh(O,s.value)}:{mode:"dynamic",nodes:R}}),S=FA(),M=LA(),I=NA(),L=ra(null),N=!!t.node.loading;return typeof window<"u"?(Ue([()=>d.value,()=>M?.value.heavyBlockMargin,()=>M?.value.rootMargin],([T],D,P)=>{var O,R,q,j;if((R=(O=L.value)==null?void 0:O.destroy)==null||R.call(O),L.value=null,!N)return f.value=!0,void(h.value=t.node.content);if(!T)return void(f.value=!1);let H=!0;const z=(j=(q=M?.value.heavyBlockMargin)!=null?q:M?.value.rootMargin)!=null?j:lf,W=S(T,{rootMargin:z,allowIdle:!I.value});L.value=W,f.value=f.value||W.isVisible.value,W.whenVisible.then(()=>{H&&L.value===W&&(f.value=!0)}),P(()=>{H=!1,W.destroy(),L.value===W&&(L.value=null)})},{immediate:!0}),Ue(()=>t.node.content,T=>{N&&!f.value||(h.value=T)})):f.value=!0,On(()=>{var T,D;(D=(T=L.value)==null?void 0:T.destroy)==null||D.call(T),L.value=null}),(T,D)=>(v(),de(Ls(x.value?m.value:"div"),Kn({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:fe(()=>[f.value?(v(),E(Te,{key:0},[_.value.mode==="structured"?(v(),E(Te,{key:0},[b.value!==null?(v(),E(Te,{key:0},[C("summary",AW(jN(A.value)),B(b.value),17),w.value.length?(v(),de(p(r),Kn({key:0},o.value,{nodes:w.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):te("",!0)],64)):(v(),de(p(r),Kn({key:1},o.value,{nodes:g.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):_.value.mode==="dynamic"?(v(),de(p(c),{key:1,nodes:_.value.nodes},null,8,["nodes"])):_.value.mode==="text"?(v(),E("pre",YEe,B(_.value.content),1)):(v(),E("div",Kn({key:3},l.value,{innerHTML:_.value.content}),null,16,JEe))],64)):(v(),E("div",XEe,[Bn(T.$slots,"placeholder",{node:e.node},()=>[D[0]||(D[0]=C("span",{class:"html-block-node__placeholder-bar"},null,-1)),D[1]||(D[1]=C("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),D[2]||(D[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"]]);Zp.install=e=>{e.component(Zp.__name,Zp)};const eTe={dir:"auto",class:"paragraph-node"},tTe=["custom-id"],Vd=vi(Xe({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=Gs(()=>t.customId),i=un("markstreamHtmlPolicy",void 0),s=un("markstreamFade",void 0),o=un("markstreamParseOptions",void 0),r=un("markstreamCustomMarkdownIt",void 0),l=un("markstreamNestedRendererProps",void 0),a=F(()=>{var M;return(M=i?.value)!=null?M:"safe"}),u=F(()=>{var M;return(M=t.parseOptions)!=null?M:o?.value}),c=F(()=>{var M;return(M=t.customMarkdownIt)!=null?M:r?.value}),d=F(()=>{var M,I;return(I=t.customHtmlTags)!=null?I:(M=l?.value)==null?void 0:M.customHtmlTags}),f=F(()=>{var M,I;const L=(M=l?.value)!=null?M:{};return bn(It({},L),{customId:(I=t.customId)!=null?I:L.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),h=Gl({loader:()=>Promise.resolve().then(()=>qA),suspensible:!1});function g(M){var I;return M.type==="text"&&String((I=M.content)!=null?I:"").trim()===""}const m=F(()=>t.node.children.filter(M=>!g(M))),y=F(()=>m.value.length>0&&m.value.every(M=>M.type==="image"||(function(I){var L;const N=(function(T){return T.type==="link"&&Array.isArray(T.children)?T.children.filter(D=>!g(D)):[]})(I);return N.length===1&&((L=N[0])==null?void 0:L.type)==="image"})(M))),b=F(()=>new Set(kf(d.value))),A=F(()=>{if(!y.value||m.value.length<=1)return t.node.children;const M=[];for(let I=0;I0,T=t.node.children.slice(I+1).some(D=>!g(D));N&&T&&M.push(bn(It({},L),{content:" ",raw:" "}))}return M}),w=F(()=>s?.value===!1&&!n.value.text),k=F(()=>w.value?af(A.value):null);function x(M,I){return{node:M,"index-key":`${t.indexKey}-${I}`,"custom-id":t.customId,"custom-html-tags":d.value}}const _=F(()=>It({inline_code:Jo,image:hc,link:mr,hardbreak:pc,emphasis:vr,strong:pr,strikethrough:gr,highlight:rl,insert:Or,subscript:Rr,superscript:zr,html_inline:ol,html_block:Zp,emoji:$r,checkbox:il,math_inline:ua,checkbox_input:il,reference:hr,footnote_anchor:Vp,footnote_reference:sl,text:Ms},n.value)),S=F(()=>A.value.map((M,I)=>{var L;const N=(function(T){var D,P,O,R;if(T.type==="html_block"||T.type==="html_inline"){const q=String((D=T.tag)!=null?D:"").trim().toLowerCase()||_R(T.content);if(q&&!b.value.has(q)&&MR((P=T.content)!=null?P:T.raw,q)){const j=String((R=(O=T.content)!=null?O:T.raw)!=null?R:"");return{child:{type:"text",content:j,raw:j},component:Ms,isCustomComponent:!1}}}return{child:T,component:_.value[T.type],isCustomComponent:!!(n.value[T.type]&&!hg(String(T.type)))}})(M);return bn(It({},N),{index:I,key:`${t.indexKey||"paragraph"}-${I}`,customAttrs:N.isCustomComponent?TA(N.child,a.value):void 0,hasSlotChildren:Array.isArray(N.child.children)&&N.child.children.length>0,slotContent:String((L=N.child.content)!=null?L:""),originalChild:M})}));return(M,I)=>(v(),E("p",eTe,[k.value!==null?(v(),E("span",{key:0,class:"text-node","custom-id":t.customId},B(k.value),9,tTe)):(v(!0),E(Te,{key:1},gt(S.value,L=>{return v(),E(Te,{key:L.key},[y.value&&g(L.originalChild)?(v(),E(Te,{key:0},[$e(B((N=L.originalChild,String((T=N.content)!=null?T:""))),1)],64)):L.isCustomComponent?(v(),de(Ls(L.component),Kn({key:1,ref_for:!0},L.customAttrs,{node:L.child,loading:L.child.loading,"index-key":L.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:fe(()=>[L.hasSlotChildren?(v(),de(p(h),Kn({key:0,ref_for:!0},f.value,{nodes:L.child.children,"index-key":L.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):L.slotContent?(v(),de(p(h),Kn({key:1,ref_for:!0},f.value,{content:L.slotContent,final:!L.child.loading,"index-key":`${L.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"])):(v(),de(Ls(L.component),Kn({key:2,ref_for:!0},x(L.child,L.index)),null,16))],64);var N,T}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Vd.install=e=>{e.component(Vd.__name,Vd)};const nTe={class:"table-node-wrapper"},iTe=["aria-busy"],sTe={key:0},oTe=["custom-id"],rTe=["aria-label","onPointerdown"],lTe=["custom-id"],aTe={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},Gp=vi(Xe({__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=F(()=>{var b;return(b=t.node.loading)!=null&&b}),i=F(()=>{var b;return(b=t.node.rows)!=null?b:[]}),s=V(null),o=V([]);let r=null;const l=F(()=>t.node.header.cells.length),a=F(()=>o.value.some(b=>Number.isFinite(b)&&b>0)),u=F(()=>a.value?o.value.map(b=>b>0?{width:`${b}px`}:void 0):[]);Gn("markstreamShowTooltips",F(()=>t.showTooltips)),Gn("markstreamFade",F(()=>t.fade));const c=Gs(()=>t.customId),d=F(()=>!!c.value.text),f=F(()=>!!c.value.paragraph),h=new WeakMap;function g(b){const A=t.fade===!1&&!d.value,w=!f.value,k=h.get(b);if(k?.children===b.children&&k.textFastPath===A&&k.paragraphFastPath===w)return k.info;const x=ay(b.children,w,!0),_={simpleChildren:x,plainText:x&&A?af(x):null};return h.set(b,{children:b.children,textFastPath:A,paragraphFastPath:w,info:_}),_}function m(b){if(!r)return;b.preventDefault();const A=r.startWidth+r.nextStartWidth,w=Math.min(48,Math.floor(A/2)),k=Math.max(w,Math.min(A-w,Math.round(r.startWidth+b.clientX-r.startX))),x=[...r.widths];x[r.index]=k,x[r.index+1]=A-k,o.value=x}function y(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),r=null)}return Ue(l,()=>{y(),o.value=[]}),On(y),(b,A)=>(v(),E("div",nTe,[C("table",{ref_key:"tableRef",ref:s,class:De(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(v(),E("colgroup",sTe,[(v(!0),E(Te,null,gt(e.node.header.cells,(w,k)=>(v(),E("col",{key:k,style:Vt(u.value[k])},null,4))),128))])):te("",!0),C("thead",null,[C("tr",null,[(v(!0),E(Te,null,gt(e.node.header.cells,(w,k)=>(v(),E("th",{key:k,dir:"auto",class:De([w.align==="right"?"text-right":w.align==="center"?"text-center":"text-left"])},[g(w).plainText!==null?(v(),E("span",{key:0,class:"text-node","custom-id":t.customId},B(g(w).plainText),9,oTe)):g(w).simpleChildren?(v(),de(p(F0),{key:1,nodes:g(w).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${k}`},null,8,["nodes","custom-id","index-key"])):(v(),de(p(Pr),{key:2,nodes:w.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:A[0]||(A[0]=x=>b.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),k(function(_,S){if(S.button!==0)return;const M=(function(){var N;const T=(N=s.value)==null?void 0:N.querySelectorAll("thead th");return Array.from(T??[],D=>Math.round(D.getBoundingClientRect().width))})(),I=M[_],L=M[_+1];I&&L&&(S.preventDefault(),r={index:_,startX:S.clientX,startWidth:I,nextStartWidth:L,widths:M},o.value=M,window.addEventListener("pointermove",m),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y))})(k,x)},null,40,rTe)):te("",!0)],2))),128))])]),C("tbody",null,[(v(!0),E(Te,null,gt(i.value,(w,k)=>(v(),E("tr",{key:k},[(v(!0),E(Te,null,gt(w.cells,(x,_)=>(v(),E("td",{key:_,class:De([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[g(x).plainText!==null?(v(),E("span",{key:0,class:"text-node","custom-id":t.customId},B(g(x).plainText),9,lTe)):g(x).simpleChildren?(v(),de(p(F0),{key:1,nodes:g(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${k}-${_}`},null,8,["nodes","custom-id","index-key"])):(v(),de(p(Pr),{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:A[1]||(A[1]=S=>b.$emit("copy",S))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,iTe),K(hs,{name:"table-node-fade"},{default:fe(()=>[n.value?(v(),E("div",aTe,[Bn(b.$slots,"loading",{isLoading:n.value},()=>[A[2]||(A[2]=C("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),A[3]||(A[3]=C("span",{class:"sr-only"},"Loading",-1))],!0)])):te("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);Gp.install=e=>{e.component(Gp.__name,Gp)};const uTe={class:"hr-node"},Nv=vi({},[["render",function(e,t){return v(),E("hr",uTe)}],["__scopeId","data-v-39b2349c"]]);Nv.install=e=>{e.component(Nv.__name,Nv)};const cTe={class:"unknown-node"},K8=Xe({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(v(),E("div",cTe,B(e.node.raw),1))}),Fv=vi(Xe({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=F(()=>`vmr-container vmr-container-${t.node.name}`),i=Gs(()=>t.customId),s=F(()=>It({text:Ms,paragraph:Vd,heading:E9,inline_code:Jo,link:mr,image:hc,strong:pr,emphasis:vr,strikethrough:gr,insert:Or,subscript:Rr,superscript:zr,checkbox:il,checkbox_input:il,hardbreak:pc,math_inline:ua,reference:hr,list:$h,math_block:nP,table:Gp},i.value));return(o,r)=>(v(),E("div",Kn({class:n.value},e.node.attrs),[(v(!0),E(Te,null,gt(e.node.children,(l,a)=>{return v(),de(Ls((u=l.type,s.value[u]||K8)),{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"]]);Fv.install=e=>{e.component(Fv.__name,Fv)};const dTe=["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"],bE=[[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 fTe(e){if(e<=255)return dTe[e];let t=0,n=bE.length-1;for(;t<=n;){const i=t+n>>1,s=bE[i];if(es[1]))return s[2];t=i+1}}return"L"}const hTe=/[ \t\n\r\f]+/g,pTe=/[\t\n\r\f]| {2,}|^ | $/;let l3=null;const gTe=new RegExp("\\p{Script=Arabic}","u"),Ic=new RegExp("\\p{M}","u"),BA=new RegExp("\\p{Nd}","u");function AE(e){return gTe.test(e)}function CE(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 Ma(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&i<=57343){if(CE(i-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(CE(n))return!0}}return!1}const mTe=new Set([" "," ","⁠","\uFEFF"]),vTe=new Set(["-","‐","–","—"]);function iP(e,t){return!((function(n){const i=Qp(n);return i!==null&&mTe.has(i)})(e)||t&&((function(n){const i=Qp(n);return i!==null&&($A.has(i)||uf.has(i))})(e)||(function(n){const i=Qp(n);return i!==null&&vTe.has(i)})(e)))}const $A=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),T9=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),zA=new Set(["'","’"]),uf=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),yTe=new Set([":",".","،","؛"]),kTe=new Set(["၏"]),bTe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function ATe(e){if(RA(e))return!0;let t=!1;for(const n of e)if(uf.has(n)||cy(n))t=!0;else if(!t||!Ic.test(n))return!1;return t}function CTe(e){for(const t of e)if(!$A.has(t)&&!uf.has(t))return!1;return e.length>0}function wTe(e){if(RA(e))return!0;for(const t of e)if(!(T9.has(t)||zA.has(t)||Ic.test(t)||cy(t)))return!1;return e.length>0}function RA(e){let t=!1;for(const n of e)if(n!=="\\"&&!Ic.test(n)){if(!(T9.has(n)||uf.has(n)||zA.has(n)))return!1;t=!0}return t}function uy(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function Qp(e){if(e.length===0)return null;const t=uy(e,e.length);return e.slice(t)}const xTe=[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 cy(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,i){for(let s=0;s=i[s]&&n<=i[s+1])return!0;return!1})(t,xTe)}function STe(e){const t=(function(n){for(const i of n)if(!Ic.test(i))return i;return null})(e);return t!==null&&BA.test(t)}function _Te(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(Ic.test(i))n--;else{if(!T9.has(i)&&!zA.has(i))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function MTe(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function wE(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function xE(e,t){return e&&t!==null&&yTe.has(t)}function ITe(e){const t=Qp(e);return t!==null&&kTe.has(t)}function ETe(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 V8(e){let t=e.length;for(;t>0;){const n=uy(e,t),i=e.slice(n,t);if(bTe.has(i))return!0;if(!uf.has(i))return!1;t=n}return!1}function TTe(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 LTe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function jl(e){return e.length===1?e[0]:e.join("")}function NTe(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),jl(n)}function FTe(e,t,n,i){if(!LTe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=TTe(c,i),f=d==="text"&&t;o===null||d!==o||f!==a?(o!==null&&s.push({text:jl(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return o!==null&&s.push({text:jl(r),isWordLike:a,kind:o,start:l}),s}function a3(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const DTe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function BTe(e,t){const n=e.texts[t];return!!n.startsWith("www.")||DTe.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!PTe.has(e)&&!OTe.test(e)&&RTe.test(e)}function SE(e){let t=!1;for(const n of e)if(!Ic.test(n)){if(!sP(n))return!1;t=!0}return t}function jTe(e,t,n,i){const s=!t&&SE(e),o=!i&&SE(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=uy(c,d),h=c.slice(f,d);if(!Ic.test(h))return h;d=f}return null})(a);return u!==null&&cy(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=uy(a,u),d=a.slice(c,u);if(!Ic.test(d))return sP(d)||cy(d);u=c}return!1})(e);return!!(s||o||l)&&!Ma(e)&&!Ma(n)&&(t||s||r)&&(i||o)}function _E(e){for(const t of e)if(BA.test(t))return!0;return!1}function Dv(e){if(e.length===0)return!1;for(const t of e)if(!BA.test(t)&&!zTe.has(t))return!1;return!0}function HTe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,h;const g=(l3===null&&(l3=new Intl.Segmenter(void 0,{granularity:"word"})),l3);let m=0;const y=[],b=[],A=[],w=[],k=[],x=[],_=[],S=[],M=[],I=[],L=[],N=[];for(const R of g.segment(a))for(const q of FTe(R.segment,(d=R.isWordLike)!=null&&d,R.index,c)){let j=function(){x[Z]!==null&&(b[Z]=[wE(y,x,_,Z)],x[Z]=null),b[Z].push(q.text),A[Z]=A[Z]||q.isWordLike,S[Z]=S[Z]||W,M[Z]=M[Z]||X,I[Z]=ne,L[Z]=le,N[Z]=xE(M[Z],U)};const H=q.kind==="text",z=MTe(q.text,q.isWordLike,q.kind),W=Ma(q.text),X=AE(q.text),U=Qp(q.text),ne=V8(q.text),le=ITe(q.text),Z=m-1;u.carryCJKAfterClosingQuote&&H&&m>0&&w[Z]==="text"&&W&&S[Z]&&I[Z]||H&&m>0&&w[Z]==="text"&&CTe(q.text)&&S[Z]||H&&m>0&&w[Z]==="text"&&L[Z]?j():H&&m>0&&w[Z]==="text"&&q.isWordLike&&X&&N[Z]?(j(),A[Z]=!0):z!==null&&m>0&&w[Z]==="text"&&x[Z]===z?_[Z]=((f=_[Z])!=null?f:1)+1:H&&!q.isWordLike&&m>0&&w[Z]==="text"&&!S[Z]&&(ATe(q.text)||q.text==="-"&&A[Z])?j():(y[m]=q.text,b[m]=[q.text],A[m]=q.isWordLike,w[m]=q.kind,k[m]=q.start,x[m]=z,_[m]=z===null?0:1,S[m]=W,M[m]=X,I[m]=ne,L[m]=le,N[m]=xE(X,U),m++)}for(let R=0;Rnull);let D=-1;for(let R=m-1;R>=0;R--){const q=y[R];if(q.length!==0){if(w[R]==="text"&&!A[R]&&D>=0&&w[D]==="text"&&(wTe(q)||q==="-"&&STe(y[D]))){const j=(h=T[D])!=null?h:[];j.push(q),T[D]=j,k[D]=k[R],y[R]="";continue}D=R}}for(let R=0;RW+1){q.push(jl(le)),j.push(se),H.push("text"),z.push(R.starts[W]),W=Z;continue}}q.push(X),j.push(ne),H.push(U),z.push(R.starts[W]),W++}return{len:q.length,texts:q,isWordLike:j,kinds:H,starts:z}})((function(R){const q=[],j=[],H=[],z=[];for(let W=0;W1;for(let le=0;le=R.len||a3(R.kinds[U]))continue;const ne=[],le=R.starts[U];let Z=U;for(;Z0&&(q.push(jl(ne)),j.push(!0),H.push("text"),z.push(le),W=Z-1)}return{len:q.length,texts:q,isWordLike:j,kinds:H,starts:z}})((function(R){const q=R.texts.slice(),j=R.isWordLike.slice(),H=R.kinds.slice(),z=R.starts.slice();for(let X=0;X=0&&!iP(u.texts[w-1],c)&&A(w),m<0&&(m=w),y=y||Ma(k))}return A(u.len),{len:d.length,texts:d,isWordLike:f,kinds:h,starts:g}})(o,r,t.breakKeepAllAfterPunctuation):r;return It({normalized:o,chunks:HTe(l,s)},l)}let Kf=null;const ME=new Map;let Vf=null;const qTe=new RegExp("\\p{Emoji_Presentation}","u"),UTe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let u3=null;const IE=new Map;function Z8(){if(Kf!==null)return Kf;if(typeof OffscreenCanvas<"u")return Kf=new OffscreenCanvas(1,1).getContext("2d"),Kf;if(typeof document<"u")return Kf=document.createElement("canvas").getContext("2d"),Kf;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Pu(e,t){let n=t.get(e);return n===void 0&&(n={width:Z8().measureText(e).width,containsCJK:Ma(e)},t.set(e,n)),n}function dy(){if(Vf!==null)return Vf;if(typeof navigator>"u")return Vf={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Vf;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 Vf={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Vf}function oP(){return u3===null&&(u3=new Intl.Segmenter(void 0,{granularity:"grapheme"})),u3}function KTe(e){return qTe.test(e)||e.includes("️")}function gd(e,t,n){return n===0?t.width:t.width-(function(i,s){return s.emojiCount===void 0&&(s.emojiCount=(function(o){let r=0;const l=oP();for(const a of l.segment(o))KTe(a.segment)&&r++;return r})(i)),s.emojiCount})(e,t)*n}function VTe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function EE(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function TE(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function OA(e,t){return t===0?0:e+t}function QTe(e,t,n,i,s){return OA(i,t==="tab"?s+(function(o,r){return o.letterSpacing!==0&&o.spacingGraphemeCounts[r]>0?o.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function LE(e,t,n,i){return OA(i,t==="tab"?0:e.lineEndFitAdvances[n])}function NE(e,t,n,i,s){return OA(i,t==="tab"?s:e.lineEndPaintAdvances[n])}function YTe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function JTe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Um(e,t,n){let i=t;for(;ij){if(ae!==null&&Q>G){Z(ve,Q,oe),ge=Q,re=Um(ae,re,ge+1),Q=-1,oe=0;continue}Z(),ie(ve,ge,be)}else z+=be,X=ve,U=ge+1;else ie(ve,ge,be);const Le=ge+1;ae!==null&&ae[re]===Le&&(Q=Le,oe=z,re++),ge++}W&&X===ve&&U===Ae.length&&(X=ve+1,U=0)}let J=0;for(;J=P.length)));){const ve=P[J],G=EE(O[J]);if(W)if(z+ve>j){if(G){he(J,ve),Z(J+1,0,z-ve),J++;continue}if(ne>=0){if(X>ne||X===ne&&U>0){Z();continue}Z(ne,0,le);continue}if(ve>j&&R[J]!==null){Z(),Ee(J,0),J++;continue}Z()}else he(J,ve),G&&(ne=J+1,le=z-ve),J++;else ve>j&&R[J]!==null?Ee(J,0):se(J,ve),G&&(ne=J+1,le=z-ve),J++}return W&&Z(),H})(n,i);const{widths:s,kinds:o,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=dy(),d=i+c.lineFitEpsilon;let f=0,h=0,g=!1,m=0,y=0,b=-1,A=0,w=null;function k(){b=-1,A=0,w=null}function x(T=m,D=y,P){f++,h=0,g=!1,k()}function _(T,D){g=!0,m=T+1,y=0,h=D}function S(T,D,P){g=!0,m=T,y=D+1,h=P}function M(T,D){g?(h+=D,m=T+1,y=0):_(T,D)}function I(T,D,P,O,R,q){if(!D)return;const j=LE(n,T,P,R);NE(n,T,P,R,O),b=P+1,A=h-q+j,w=T}function L(T,D){var P;const O=r[T],R=(P=l[T])!=null?P:null;let q=R===null?-1:Um(R,0,D+1),j=-1,H=D;for(;Hd){if(R!==null&&j>D){x(T,j),H=j,q=Um(R,q,H+1),j=-1;continue}x(),S(T,H,z)}else h=U,m=T,y=H+1}else S(T,H,z);const W=H+1;R!==null&&R[q]===W&&(j=W,q++),H++}g&&m===T&&y===O.length&&(m=T+1,y=0)}function N(T){f++,k()}for(let T=0;T=D.endSegmentIndex)));){const O=o[P],R=EE(O),q=GTe(n,g,P),j=O==="tab"?ZTe(h+q,n.tabStopAdvance):s[P],H=q+j,z=QTe(n,O,P,q,j);if(O!=="soft-hyphen")if(g){if(h+z>d){const W=h+LE(n,O,P,q);if(NE(n,O,P,q,j),w==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&A<=d){x(b,0);continue}if(R&&W<=d){M(P,H),x(P+1,0),P++;continue}if(b>=0&&A<=d){if(m>b||m===b&&y>0){x();continue}const X=b;x(X,0),P=X;continue}if(z>d&&r[P]!==null){x(),L(P,0),P++;continue}x();continue}M(P,H),I(O,R,P,j,q,H),P++}else z>d&&r[P]!==null?L(P,0):_(P,j),I(O,R,P,j,q,H),P++;else g&&(m=P+1,y=0,b=P+1,A=h+a,w=O),P++}g&&(D.consumedEndSegmentIndex,x(D.consumedEndSegmentIndex,0))}return f})(e,t)}let c3=null;function PA(){return c3===null&&(c3=new Intl.Segmenter(void 0,{granularity:"grapheme"})),c3}function eLe(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,h){i=[d],s=f,o=h,r=V8(d),l=T9.has(d)}function c(d,f){i.push(d),o=o||f;const h=V8(d);r=d.length===1&&uf.has(d)&&r||h,l=!1}for(const d of PA().segment(e)){const f=d.segment,h=Ma(f);i.length!==0?l||$A.has(f)||uf.has(f)||t.carryCJKAfterClosingQuote&&h&&r?c(f,h):o||h?(a(),u(f,d.index,h)):c(f,h):u(f,d.index,h)}return a(),n}function tLe(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(l){if(!(s<0)){if(o)s+1===l?i.push(t[s]):(function(a,u){const c=t[a].start,d=u=0&&!iP(t[l-1].text,n)&&r(l),s<0&&(s=l),o=o||Ma(a.text)}return r(t.length),i}function FE(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=PA();for(const s of i.segment(e))n++;return n}function nLe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function iLe(e,t,n,i,s){const o=dy(),{cache:r,emojiCorrection:l}=(function(N,T){Z8().font=N;const D=(function(R){let q=ME.get(R);return q||(q=new Map,ME.set(R,q)),q})(N),P=(function(R){const q=R.match(/(\d+(?:\.\d+)?)\s*px/);return q?parseFloat(q[1]):16})(N),O=T?(function(R,q){let j=IE.get(R);if(j!==void 0)return j;const H=Z8();H.font=R;const z=H.measureText("😀").width;if(j=0,z>q+.5&&typeof document<"u"&&document.body!==null){const W=document.createElement("span");W.style.font=R,W.style.display="inline-block",W.style.visibility="hidden",W.style.position="absolute",W.textContent="😀",document.body.appendChild(W);const X=W.getBoundingClientRect().width;document.body.removeChild(W),z-X>.5&&(j=z-X)}return IE.set(R,j),j})(N,P):0;return{cache:D,fontSize:P,emojiCorrection:O}})(t,(a=e.normalized,UTe.test(a)));var a;const u=gd("-",Pu("-",r),l)+(s===0?0:2*s),c=8*gd(" ",Pu(" ",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 y=e.chunks.length<=1&&!d;const b=null,A=[],w=[],k=[],x=null,_=Array.from({length:e.len});function S(N,T,D,P,O,R,q,j,H){O!=="text"&&O!=="space"&&O!=="zero-width-break"&&(y=!1),f.push(T),h.push(D),g.push(P),m.push(O),A.push(q),w.push(j),d&&k.push(H)}function M(N,T,D,P,O){const R=Pu(N,r),q=d?FE(N,T):0,j=(function(X,U,ne){return U>1?X+(U-1)*ne:X})(gd(N,R,l),q,s),H=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:j,z=H===0?0:H+(q>0?s:0),W=T==="space"||T==="zero-width-break"?0:j;if(O&&P&&N.length>1){let X="sum-graphemes";s!==0?X="segment-prefixes":Dv(N)?X="pair-context":o.preferPrefixWidthsForBreakableRuns&&(X="segment-prefixes");const U=(function(le,Z,se,ie,he){if(Z.breakableFitAdvances!==void 0&&Z.breakableFitMode===he)return Z.breakableFitAdvances;Z.breakableFitMode=he;const Ee=oP(),J=[];for(const Ae of Ee.segment(le))J.push(Ae.segment);if(J.length<=1)return Z.breakableFitAdvances=null,Z.breakableFitAdvances;if(he==="sum-graphemes"){const Ae=[];for(const ae of J){const re=Pu(ae,se);Ae.push(gd(ae,re,ie))}return Z.breakableFitAdvances=Ae,Z.breakableFitAdvances}if(he==="pair-context"||J.length>96){const Ae=[];let ae=null,re=0;for(const Q of J){const oe=gd(Q,Pu(Q,se),ie);if(ae===null)Ae.push(oe);else{const ge=ae+Q,be=Pu(ge,se);Ae.push(gd(ge,be,ie)-re)}ae=Q,re=oe}return Z.breakableFitAdvances=Ae,Z.breakableFitAdvances}const ve=[];let G="",ue=0;for(const Ae of J){G+=Ae;const ae=gd(G,Pu(G,se),ie);ve.push(ae-ue),ue=ae}return Z.breakableFitAdvances=ve,Z.breakableFitAdvances})(N,R,r,l,X),ne=U===null||i==="keep-all"?null:(function(le){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(le))return null;const Z=[];let se=0;for(const ie of PA().segment(le))se++,nLe(ie.segment)&&Z.push(se);return Z.length===0?null:Z})(N);return void S(N,j,z,W,T,D,U,ne,q)}S(N,j,z,W,T,D,null,null,q)}for(let N=0;N=55296&&le<=56319&&ne+1=56320&&he<=57343&&(Z=he-56320+(le-55296<<10)+65536,se=2)}const ie=fTe(Z);ie!=="R"&&ie!=="AL"&&ie!=="AN"||(j=!0);for(let he=0;he=0&&q[le]==="ET";le--)q[le]="EN";for(le=ne+1;le0?q[ne-1]:X)!=="L"?"R":"L";if(Z===((le{const e=globalThis;if(e[d3])return e[d3];const t={configs:{},controllers:{},revision:ra(0),preparedCache:new Map,blockEstimateCache:new Map};return e[d3]=t,t})();let W1=null;const f3=to.revision;function DE(e){var t;return e&&(t=to.configs[e])!=null?t:null}function BE(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function oLe(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function h3(e){var t,n,i;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const o of e){if(!oLe(o))return null;o.type==="text"?s+=String((t=o.content)!=null?t:""):o.type==="emoji"?s+=String((i=(n=o.name)!=null?n:o.raw)!=null?i:""):o.type==="hardbreak"&&(s+=` +`)}return s.length>0?s:null}function p3(e,t,n){var i,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var o;if(W1!=null)return W1;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return W1=!!((o=r.getContext)!=null&&o.call(r,"2d")),W1}catch{return W1=!1,!1}})())return null;try{const o=Math.round(100*t)/100,r=[(i=n.whiteSpace)!=null?i:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,o,e].join("\0"),l=to.blockEstimateCache.get(r);if(l)return to.blockEstimateCache.delete(r),to.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 y=`${m}\0${g}\0${h}`,b=to.preparedCache.get(y);if(b)return to.preparedCache.delete(y),to.preparedCache.set(y,b),b.prepared;const A=(function(w,k,x){return(function(_,S,M,I){var L,N;const T=(L=I?.wordBreak)!=null?L:"normal",D=(N=I?.letterSpacing)!=null?N:0;return iLe(WTe(_,dy(),I?.whiteSpace,T),S,!1,T,D)})(w,k,0,x)})(h,g,{whiteSpace:m});for(to.preparedCache.set(y,{prepared:A});to.preparedCache.size>240;){const w=to.preparedCache.keys().next().value;if(!w)break;to.preparedCache.delete(w)}return A})(e,n.font,a),c=(function(h,g,m){const y=XTe(h,g);return{lineCount:y,height:y*m}})(u,Math.max(24,o-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(to.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});to.blockEstimateCache.size>4e3;){const h=to.blockEstimateCache.keys().next().value;if(!h)break;to.blockEstimateCache.delete(h)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function rP(e,t,n){var i,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const o=h3(e.children);return o&&n.paragraph?p3(o,t,n.paragraph):null}if(e.type==="heading"){const o=Number(e.level||0),r=h3(e.children),l=n.headings[o];return r&&l?p3(r,t,l):null}if(e.type==="list_item"){const o=Array.isArray(e.children)?e.children:[];if(o.length!==1||((i=o[0])==null?void 0:i.type)!=="paragraph"||!n.listItem)return null;const r=h3((s=o[0])==null?void 0:s.children);return r?p3(r,t,n.listItem):null}if(e.type==="list"){const o=Array.isArray(e.items)?e.items:[];if(!o.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of o){const a=rP(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 q1(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function md(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function g3(e,t,n=0){return e.diff?DA(t??{},n)?(function(i){const s=md(i.raw);if(s){const o=s.split(/\r?\n/);return i.originalCode!=null||i.updatedCode!=null?Math.max(1,o.filter(r=>!sLe.some(l=>r.startsWith(l))).length):Math.max(1,o.length)}return q1(md(i.originalCode))+q1(md(i.updatedCode))})(e):(function(i){const s=i.originalCode,o=i.updatedCode;if(s!=null||o!=null)return Math.max(q1(md(s)),q1(md(o)));const r=md(i.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):q1(md(e.code,e.loading===!0))}function rLe(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function m3(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const i=window.getComputedStyle(t),s=e.offsetHeight,o=BE(i.lineHeight,1.5*BE(i.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:rLe(i),lineHeight:o,wrapperOverhead:Math.max(0,s-o),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const lLe=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function $E(e,t={}){var n;const i={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return i;const o=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(o))lLe.has(r)||s.has(r)||l.enumerable&&"value"in l&&(i[r]=l.value);return i}function zE(e,t,n,i){var s;const o=(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,o);if(!i.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,o-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const h=i.getNormalizedScrollTop(e,t,!1),g=Math.abs(h-r);gd&&(e.scrollTop=u)}function RE(e,t){let n=0,i=null,s=null;const o=()=>{const r=s;s=null,i=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(i&&(clearTimeout(i),i=null),n=l,s=null,e(...r)):i||(i=setTimeout(o,a))}}function OE(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const lP=Symbol("MarkstreamMathBlockMinHeightCache");function Zut(){return un(lP,null)}const aLe=new Set(["text","inline_code","emoji","footnote_reference"]),uLe=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function U1(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function vd(e,t,n,i=22){const s=String(e??"");if(!s)return n;const o=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/o),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*i+12))}function aP(e){var t;if(!e||typeof e!="object")return!1;const n=e,i=String((t=n.type)!=null?t:"");if(aLe.has(i))return!0;if(!uLe.has(i))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(aP)}function G8(e){var t,n,i,s,o,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((i=(n=u.content)!=null?n:u.raw)!=null?i:"");if(c==="inline_code")return String((r=(o=(s=u.code)!=null?s:u.content)!=null?o: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(G8).filter(Boolean).join(" ");g&&d.push(g)}}return d.join(" ").replace(/\s+/g," ").trim()}function uP(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const i=t[n];return Array.isArray(i)&&i.some(uP)})}function cLe(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),i=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),o=Math.max(1,i,s);return 30+26*Math.max(0,o-1)}function dLe(e,t){var n,i,s,o,r,l,a,u,c,d,f,h,g,m;if(!e||typeof e!="object")return 32;const y=e,b=String((n=y.type)!=null?n:""),A=Number.isFinite(t)&&t>0?t:640;switch(b){case"heading":return(function(w){var k;const x=Number((k=w.level)!=null?k:w.depth);return x>=4?20:x===3?30:x===2?32:44})(y);case"paragraph":return(function(w,k){const x=String(w??"");if(!x)return 28;const _=Math.max(18,Math.floor(Math.max(320,k)/8)),S=x.split(/\r?\n/).length,M=Math.ceil(x.length/_);return Math.max(1,S,M)<=1?28:vd(x,k,34)})(String((s=(i=y.raw)!=null?i:y.content)!=null?s:""),A);case"list":return(function(w,k){var x;const _=Array.isArray(w.items)?w.items:[];if(!_.length)return 48;const S=Math.max(48,30*_.length+12);let M=12;for(const N of _)M+=cLe(G8(N)||String((x=N.raw)!=null?x:""),k);const I=Math.max(0,M-S);if(_.length>20){const N=Math.round(2.4*_.length);return Math.round(S+Math.max(N,Math.min(I,3*_.length)))}if(I<=0)return S;const L=_.length>8?8*_.length:I;return Math.round(S+Math.min(I,L))})(y,A);case"list_item":return vd(String((r=(o=y.raw)!=null?o:y.content)!=null?r:""),A,34);case"blockquote":return vd(String((a=(l=y.raw)!=null?l:y.content)!=null?a:""),A,56);case"table":return(function(w,k){const x=[...w.header?[w.header]:[],...Array.isArray(w.rows)?w.rows:[]];if(!x.length){const _=Array.isArray(w.children)?w.children.length:3;return Math.max(120,38*_+48)}return Math.max(120,Math.round(4+x.reduce((_,S)=>_+(function(M,I){const L=Math.max(1,M.length),N=Math.max(80,(I-32)/L),T=Math.max(10,Math.floor(N/8)),D=Math.max(1,...M.map(P=>{var O;const R=G8(P)||String((O=P?.raw)!=null?O:"");return Math.ceil(R.length/T)||1}));return 54+34*Math.max(0,D-1)+(L<=3&&M.some(uP)?14:0)})((function(M){var I;return Array.isArray(M?.cells)&&(I=M.cells)!=null?I:[]})(S),k),0)))})(y,A);case"code_block":{const w=String((u=y.language)!=null?u:"").trim().toLowerCase(),k=String((d=(c=y.code)!=null?c:y.raw)!=null?d:"");return w==="mermaid"?iy(ty(k)):w==="infographic"?sy(ny(k)):vd(k,A,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(w,k){var x,_,S;const M=w.match(/^\s*]*)>/i);return M&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=M[1])!=null?x:"")?vd(((S=(_=w.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:_[1])==null?void 0:S.replace(/<[^>]*>/g,"").trim())||"Details",k,28,28):vd(w,k,96)})(String((h=(f=y.raw)!=null?f:y.content)!=null?h:""),A);case"thematic_break":return 24;default:return vd(String((m=(g=y.raw)!=null?g:y.content)!=null?m:""),A,40)}}function PE(e,t,n){return Math.min(Math.max(e,t),n)}const fLe=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],hLe=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","safeMarkdownMs","tokenizeMs","htmlBlockPassesMs","parseMarkdownToStructureTotalMs"],pLe=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),cP=["raw","content","code","originalCode","updatedCode"],jE=new WeakMap,HE=new WeakMap;let gLe=1;function Pl(){return typeof performance<"u"?performance.now():Date.now()}function WE(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Jr(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=jE.get(t);return n||(n=gLe++,jE.set(t,n)),String(n)}function qE(e,t,n,i={}){var s,o;const r=i.includeFinal!==!1,l={md:Jr(t),customMarkdownIt:Jr(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(o=e.streamParse)!=null?o:"auto",validateLink:Jr(e.validateLink),preTransformTokens:Jr(e.preTransformTokens),postTransformTokens:Jr(e.postTransformTokens),postTransformNodes:Jr(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function UE(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 KE(e){const t=dP(e);return t.length>=2&&t.every(n=>{const i=n.trim();return i.length>=1&&i.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function dP(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function fP(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function jA(e){const t=String(e??"");return`${t.length}:${fP(t)}`}function Q8(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?jA(r):`${r.length}:${fP(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Jr(e)}`;if(typeof e!="object")return typeof e;const i=e,s=t.get(i);if(s)return`cycle:${s}`;if(n>=6)return`object:${Jr(i)}`;const o=Jr(i);if(t.set(i,o),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>Q8(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}:${Q8(r[u],t,n+1)}`).join(";")}`}return typeof e}function fy(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function hP(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(i=>fy(i)?Ec(i,t,n+1):hP(i,t,n+1)).join(",")}`:fy(e)?Ec(e,t,n):Q8(e,t,n)}function mLe(e,t,n){return Object.keys(e).sort().filter(i=>i!=="children"&&!cP.includes(i)).map(i=>{const s=e[i];return typeof s=="string"?`${i}=s:${jA(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${i}=${String(s)}`:typeof s=="function"?`${i}=fn:${Jr(s)}`:pLe.has(i)&&(Array.isArray(s)||typeof s=="object")?`${i}=${hP(s,t,n+1)}`:s&&typeof s=="object"?`${i}=object:${Jr(s)}`:""}).filter(Boolean).join(";")}function vLe(e){return cP.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${jA(n)}`:""}).filter(Boolean).join(";")}function Ec(e,t=new WeakMap,n=0){const i=HE.get(e);if(i)return i;const s=e,o=t.get(s);if(o)return`node-cycle:${o}`;if(n>=6)return`node:${e.type}:${Jr(s)}`;const r=Jr(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=>Ec(g,u,c+1)).join("|"):"";return[a.type,vLe(d),mLe(d,u,c),f.length,h].join(":")})(e,t,n);return HE.set(s,l),l}function pP(e,t){return Ec(e)===Ec(t)}function HA(e,t,n){const i=Pl(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Pl()-i,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function VE(e,t,n){return HA(t,n,()=>Ec(e))}function gP(e,t,n){return VE(e,n,"stabilizeSignatureMs")===VE(t,n,"stabilizeSignatureMs")}function Km(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function ZE(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function GE(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function yLe(e,t){return e.length===t.length&&e===t}function WA(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const i=e,s=t,o=Object.keys(i).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(o.length!==r.length)return!1;for(let c=0;c{i=WA(e,t)}),i??gP(e,t,n)}function ALe(e,t){const n={};for(const i of fLe){const s=e[i],o=t?.[i];typeof s=="number"&&(n[i]=s-(typeof o=="number"?o:0))}return n}function CLe(e,t){var n;const i=KI(t.instanceMsgId),s=new Map,o=(n=t.smoothStreamingEnabled)!=null?n:F(()=>!1),r=V(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let P="",O=0,R=!1,q=!1,j=!1,H=!1;function z(){P="",O=0,R=!1,q=!1,j=!1,H=!1}function W(X){let U=!1;for(let ne=0;ne{if(!X||!U.startsWith(X)||U.length<=X.length)return z(),[!0,0];let ne=0;P!==X&&(z(),W(X),ne=X.length);const le=U.slice(X.length),Z=W(le);return P=U,[Z,ne+le.length]}})();let h,g=0,m=0,y=Pl(),b=-1,A=0;function w(P){b=Number.isInteger(P)?P:0,A+=1}function k(){h&&(clearTimeout(h),h=void 0)}function x(){k();const P=t.renderContent.value;r.value!==P&&(r.value=P),y=Pl()}Ue([t.renderContent,t.effectiveFinal,o],([P,O,R])=>{r.value!==P&&(!R||O||(function(q,j){if(!q&&j||j.length<=80||j.length\s*|`{3,}|~{3,})/.test(H))||H.endsWith(` +`)&&!(function(z){const W=UE(z);if(KE(W))return!1;const X=dP(W);return X.length>=2&&X.some(U=>U.trim())})(j))})(r.value,P)?x():(function(){if(m+=1,h)return;const q=Math.max(0,(function(j){const H=j.parseCoalesceMs;return typeof H=="number"&&Number.isFinite(H)&&H>=0?H:80})(e)-(Pl()-y));q<=0?x():h=setTimeout(x,q)})())},{flush:"sync",immediate:!0}),Tc(k);const _=F(()=>{var P,O,R,q;return ACe(e.customHtmlTags,(P=e.parseOptions)==null?void 0:P.customHtmlTags,(q=(R=(O=t.customComponentsMap)==null?void 0:O.value)!=null?R:{},Object.entries(q).map(([j,H])=>{const z=Nl(j);return H==null||!z||hg(z)||bR.has(z)||ag.has(z)?"":z}).filter(Boolean)))}),S=F(()=>{const{key:P,tags:O}=CCe(_.value);if(!P)return i;const R=s.get(P);if(R)return R;const q=KI(t.instanceMsgId,{customHtmlTags:O});return s.set(P,q),q}),M=F(()=>{const P=S.value;if(!e.customMarkdownIt)return P;const O=e.customMarkdownIt(P);return P.__markstreamHasCustomParserExtensions=!0,O.__markstreamHasCustomParserExtensions=!0,O}),I=F(()=>{var P,O;const R=(P=e.parseOptions)!=null?P:{},q=t.effectiveFinal.value,j=_.value,H=q!=null,z=j.length>0;return H||z||R.streamParse==null?It(It(bn(It({},R),{streamParse:(O=R.streamParse)==null||O}),H?{final:q}:{}),z?{customHtmlTags:j}:{}):R}),L=F(()=>{var P;return new Set(((P=I.value.customHtmlTags)!=null?P:[]).map(O=>String(O).trim().toLowerCase()).filter(Boolean))}),N=F(()=>qE(I.value,M.value,e.customMarkdownIt,{includeFinal:!0})),T=F(()=>qE(I.value,M.value,e.customMarkdownIt,{includeFinal:!1}));Ue([N,T],([P,O],[R,q])=>{R&&(P===R&&O===q||(x(),O!==q&&(l=[],c="")))},{flush:"sync"});const D=F(()=>{var P,O,R,q,j,H,z,W,X,U,ne;if((P=e.nodes)!=null&&P.length)return l=[],c="",w(0),Mt(e.nodes.slice());const le=r.value;if(!le)return l=[],c="",w(-1),[];const Z=t.debugPerformanceEnabled.value,se=Z?Pl():0,ie=M.value,he=N.value,Ee=T.value;a&&he!==a&&(function(st){var dt,wt;(wt=(dt=st.stream)==null?void 0:dt.reset)==null||wt.call(dt)})(ie),u&&Ee!==u&&(l=[],c="");const J=Object.keys((R=(O=t.customComponentsMap)==null?void 0:O.value)!=null?R:{}).length>0||typeof I.value.postTransformNodes=="function";J!==d&&(l=[],c="");const ve=!J&&l.length>0&&le.startsWith(c)&&Ee===u,G=Z?WE(ie):null,ue=Z?{}:void 0,Ae=GE(ie),ae=!Ae&&!J,re=It(It(bn(It({},I.value),{__reuseStableTopLevelNodes:ae}),Ae?{__disableStreamParse:!0}:{}),ue?{__timing:ue}:{}),Q=xO(le,ie,re),oe=Z?Pl():0,ge=Z?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let be,Le=Z?Km(Q.length):void 0,Oe=0,we=0,xe=0;if(ve){const st=Z?Pl():0,[dt,wt]=(function(jt){var Yt,ht;const[Qe,nt]=jt.scanGlobalReferenceAppend(jt.previousContent,jt.content),at=jt.parseOptions;return[jt.previousDirtyStartIndex>0&&at.final!==!0&&!jt.customMarkdownIt&&!GE(jt.md)&&!Qe&&typeof at.preTransformTokens!="function"&&typeof at.postTransformTokens!="function"&&typeof at.postTransformNodes!="function"&&((ht=(Yt=at.customHtmlTags)==null?void 0:Yt.length)!=null?ht:0)===0?jt.previousDirtyStartIndex:0,nt]})({content:le,previousContent:c,previousDirtyStartIndex:b,parseOptions:I.value,customMarkdownIt:e.customMarkdownIt,md:ie,scanGlobalReferenceAppend:f});xe=wt;const Nt=dt<=0;if(ge){const jt=(function(Yt,ht,Qe,nt={}){var at;if(!ht.length)return{nodes:Yt,metrics:Km(Yt.length)};const Ht=(at=nt.scanStartIndex)!=null?at:0,An=nt.reuseDirtyTail!==!1,Ot=(function(fn,Ke,it,Ye=0){const ln=Math.min(fn.length,Ke.length);for(let pt=Math.min(ln,Math.max(0,Ye));ptEc(st[Nt]))})(be,ge,we):(function(st,dt=0){for(let wt=Math.max(0,dt);wt((j=G?.total)!=null?j:0);t.logPerf(dt?"parse(stream)":"parse(sync)",It(It(It({rendererId:t.instanceMsgId,ms:Math.round(Pl()-se),nodes:be.length,contentLength:le.length,parseCommitCount:g,parseCoalescedCount:m,nodeReuseMs:ze,referenceDefinitionScanChars:xe,signatureMs:(H=ge?.signatureMs)!=null?H:0,stabilizeSignatureMs:(z=ge?.stabilizeSignatureMs)!=null?z:0,primeSignatureMs:(W=ge?.primeSignatureMs)!=null?W:0,signatureCallCount:(X=ge?.signatureCallCount)!=null?X:0,stabilizeSignatureCallCount:(U=ge?.stabilizeSignatureCallCount)!=null?U:0,primeSignatureCallCount:(ne=ge?.primeSignatureCallCount)!=null?ne:0,stabilizeMs:Oe},Le??{}),ue?Object.fromEntries(hLe.map(wt=>{var Nt;return[wt,(Nt=ue[wt])!=null?Nt:0]})):{}),st?{streamMode:st.lastMode,streamDelta:ALe(st,G),streamStats:st}:{}))}return Mt(be)});return{effectiveCustomHtmlTags:_,effectiveCustomHtmlTagsSet:L,mdBase:S,mdInstance:M,mergedParseOptions:I,getParsedNodesDirtyStartIndex:()=>b,getParsedNodesRevision:()=>A,parsedNodes:D}}function wLe(e){const{isClient:t}=e,n=V(new Set),i=new Map,s=new Map,o=new Map;function r(u){if(!t)return;const c=o.get(u);c!=null&&(window.clearTimeout(c),o.delete(u))}function l(){if(t)for(const u of o.values())window.clearTimeout(u);o.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:i,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:o,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 y=n.value,b=y.has(f);if(h){if(b)return;const w=new Set(y);return w.add(f),void(n.value=w)}if(!b)return;const A=new Set(y);A.delete(f),n.value=A})(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,i.value=c.done},r=s.subscribe(o);o();const l=F(()=>Math.max(0,t.value.length-n.value.length)),a=F(()=>l.value===0),u=F(()=>i.value&&a.value);return W0()&&Tc(()=>{r(),s.destroy()}),{source:t,visible:n,done:i,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 SLe={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},QE=/auto|scroll|overlay/i;function _Le(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return QE.test(t)||QE.test(n)}function MLe(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 ILe={class:"m-0 p-0"},ELe=["data-probe"],TLe=vi(Xe(bn(It({},{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(i){var s,o;return(o=(s=t.headingNodes)==null?void 0:s[i])!=null?o:null}return(i,s)=>(v(),E("div",{class:"height-estimation-probes",style:Vt({width:`${e.width}px`}),"aria-hidden":"true"},[C("div",{ref:o=>e.setParagraphWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[K(p(Vd),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),C("div",{ref:o=>e.setListItemWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[C("ul",ILe,[K(p(Bh),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),C("div",{ref:o=>e.setListWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[K(p($h),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(v(),E(Te,null,gt(6,o=>C("div",{key:`probe-heading-${o}`,ref_for:!0,ref:r=>e.setHeadingWrapper(o,r),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${o}`},[K(p(E9),{node:n(o),"index-key":`probe-heading-${o}`},null,8,["node","index-key"])],10,ELe)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),YE=Xe({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=F(()=>{var n,i;return sy((i=ph(e.estimatedPreviewHeightPx))!=null?i:ny(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return gn("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?gn("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)"}},[gn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[gn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),gn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),gn("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},()=>gn("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,gn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[gn("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:"")),gn("div",{class:"absolute inset-0"},[gn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),JE=Xe({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=F(()=>{var n,i;return iy((i=ph(e.estimatedPreviewHeightPx))!=null?i:ty(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return gn("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?gn("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)"}},[gn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[gn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),gn("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},()=>gn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[gn("span",{class:"action-icon block"})])))]):null,gn("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)"}},[gn("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:"")),gn("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"}})])])}}}),LLe={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 fo(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 NLe=["data-custom-id"],FLe=["data-node-index","data-node-type"],XE="typewriter-simple-cursor-target",mP=vi(Xe(bn(It({},{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 i=e,s=n;function o($){if(!(typeof Event<"u"&&$ instanceof Event))return typeof $=="string"&&s("copy-code",$),void s("copy",$)}const r=Zs(),l=un("markstreamNestedRendererProps",void 0);function a($){const Y=r?.vnode.props;return!!Y&&(Object.prototype.hasOwnProperty.call(Y,$)||Object.prototype.hasOwnProperty.call(Y,String($).replace(/[A-Z]/g,ce=>`-${ce.toLowerCase()}`)))}function u($){var Y,ce;const pe=i[$];return a($)?pe:(ce=(Y=l?.value)==null?void 0:Y[$])!=null?ce:pe}const c=F(()=>{return($=u("mode"))==="chat"||$==="minimal"||$==="docs"?$:"docs";var $}),d=F(()=>OE(u("typewriter"))),f=F(()=>d.value!=="off"),h=F(()=>u("domMode")==="minimal"?"minimal":"full"),g=F(()=>{return($={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":$.codeRenderer==="pre"||$.codeRenderer==="shiki"||$.codeRenderer==="monaco"?$.codeRenderer:$.renderCodeBlocksAsPre===!1||$.mode==="docs"?"monaco":"pre";var $}),m=F(()=>LLe[c.value]),y=F(()=>{var $;return($=u("showTooltips"))!=null?$:m.value.showTooltips}),b=F(()=>{var $;return($=u("fade"))!=null?$:m.value.fade}),A=F(()=>{var $;return($=u("batchRendering"))!=null?$:m.value.batchRendering}),w=F(()=>{var $;return($=u("initialRenderBatchSize"))!=null?$:m.value.initialRenderBatchSize}),k=F(()=>{var $;return($=u("renderBatchSize"))!=null?$:m.value.renderBatchSize}),x=F(()=>{var $;return($=u("renderBatchDelay"))!=null?$:m.value.renderBatchDelay}),_=F(()=>{var $;return($=u("renderBatchBudgetMs"))!=null?$:m.value.renderBatchBudgetMs}),S=F(()=>{var $;return($=u("renderBatchIdleTimeoutMs"))!=null?$:m.value.renderBatchIdleTimeoutMs}),M=F(()=>{var $;return($=u("deferNodesUntilVisible"))!=null?$:m.value.deferNodesUntilVisible}),I=F(()=>{var $;return($=u("maxLiveNodes"))!=null?$:m.value.maxLiveNodes}),L=F(()=>{var $;return($=u("liveNodeBuffer"))!=null?$:m.value.liveNodeBuffer}),N=F(()=>{var $;return($=u("nodeVirtual"))!=null?$:m.value.nodeVirtual}),T={get content(){return i.content},get nodes(){return i.nodes},get final(){return i.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return i.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 y.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return i.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return i.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return b.value},get batchRendering(){return A.value},get initialRenderBatchSize(){return w.value},get renderBatchSize(){return k.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return _.value},get renderBatchIdleTimeoutMs(){return S.value},get deferNodesUntilVisible(){return M.value},get maxLiveNodes(){return I.value},get liveNodeBuffer(){return L.value},get nodeVirtual(){return N.value},get virtualScroll(){return i.virtualScroll},get renderAsFragment(){return i.renderAsFragment}};function D($){s("height-change",$)}function P($){s("virtual-state-change",$)}function O($){s("anchor-change",$)}const R=V(),q=V(null),j=V(null),H=V(null),z=Ns({1:null,2:null,3:null,4:null,5:null,6:null}),W=V(!1),X=new Map,U=V(0),ne=V(0),le=V({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Z($,Y){return typeof $!="string"?Y:$.trim()||Y}function se($){const Y=Number($);return Number.isFinite(Y)&&Y>0?Math.max(1,Math.trunc(Y)):640}const ie=F(()=>{var $;const Y=($=T.viewportPriorityOptions)!=null?$:{},ce=Z(Y.rootMargin,lf);return{rootMargin:ce,heavyBlockMargin:Z(Y.heavyBlockMargin,ce),maxTargets:se(Y.maxTargets)}}),he=F(()=>{var $;return($=ie.value.rootMargin)!=null?$:lf}),Ee=F(()=>{var $;return($=ie.value.maxTargets)!=null?$:640});function J(){var $,Y;if((($=i.virtualScroll)==null?void 0:$.enabled)!==!0)return null;const ce=(Y=i.virtualScroll)==null?void 0:Y.scrollRoot;return ve(typeof ce=="function"?ce():ce)}function ve($){return $?typeof HTMLElement<"u"&&$ instanceof HTMLElement?$:typeof $=="object"&&"value"in $?ve($.value):typeof $=="object"&&"$el"in $?ve($.$el):null:null}Gn(XO,ie);const{isClient:G,renderAsFragment:ue,debugPerformanceEnabled:Ae,resolvedShowTooltips:ae,resolvedHtmlPolicy:re,inheritedSmoothStreaming:Q,ownsTypewriterCursor:oe}=(function($){const Y=typeof window<"u",ce=e1(),pe=un("markstreamHtmlPolicy",void 0),Ce=un("markstreamTypewriterCursor",void 0),Fe=un("markstreamSmoothStreaming",void 0),Pe=F(()=>$.renderAsFragment===!0),Ve=F(()=>!!($.debugPerformance&&Y&&typeof console<"u")),lt=F(()=>{var rt;if(typeof $.showTooltips=="boolean")return $.showTooltips;const He=(rt=ce.showTooltips)!=null?rt:ce["show-tooltips"];return He===""||He===!0||He==="true"||He!==!1&&He!=="false"&&void 0}),Ge=F(()=>{var rt,He;return(He=(rt=$.htmlPolicy)!=null?rt:pe?.value)!=null?He:"safe"}),et=F(()=>Ce?.value!==!0);return{isClient:Y,renderAsFragment:Pe,debugPerformanceEnabled:Ve,resolvedShowTooltips:lt,resolvedHtmlPolicy:Ge,inheritedSmoothStreaming:Fe,inheritedTypewriterCursor:Ce,ownsTypewriterCursor:et}})(T),{resolveViewportRoot:ge,resolveScrollContainer:be,isReverseFlexScrollRoot:Le,getNormalizedScrollTop:Oe,getOffsetTopWithinRoot:we}=(function($,Y){function ce(){var Ve,lt;return(lt=(Ve=Y.scrollRoot)==null?void 0:Ve.call(Y))!=null?lt:null}function pe(Ve){if(typeof window>"u")return null;const lt=ce();if(lt)return lt;const Ge=Ve??$.value;if(!Ge)return null;const et=Ge.ownerDocument||document,rt=et.scrollingElement||et.documentElement;let He=Ge;for(;He&&He!==et.body&&He!==rt;){if(_Le(window.getComputedStyle(He))&&MLe(He))return He;He=He.parentElement}return null}function Ce(Ve){if(!Y.isClient)return!1;try{const lt=window.getComputedStyle(Ve);return!!(lt.display||"").toLowerCase().includes("flex")&&(lt.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Fe(Ve,lt,Ge){var et,rt;if(Ge)return Pe(lt);const He=Ve.scrollTop;if(!Ce(Ve))return He;const tt=He<0?-He:He;return Math.max(0,((et=Ve.scrollHeight)!=null?et:0)-((rt=Ve.clientHeight)!=null?rt:0))-tt}function Pe(Ve){var lt,Ge,et,rt,He;const tt=Number((lt=Ve.scrollingElement)==null?void 0:lt.scrollTop),mt=Number((et=(Ge=Ve.documentElement)==null?void 0:Ge.scrollTop)!=null?et:0),ft=Number((He=(rt=Ve.body)==null?void 0:rt.scrollTop)!=null?He:0);return Math.max(0,Number.isFinite(tt)?tt:0,Number.isFinite(mt)?mt:0,Number.isFinite(ft)?ft:0)}return{resolveViewportRoot:pe,resolveScrollContainer:function(Ve){var lt,Ge,et,rt;const He=ce();if(He)return He;const tt=pe((lt=Ve??$.value)!=null?lt:null);if(tt)return tt;const mt=(rt=(et=Ve?.ownerDocument)!=null?et:(Ge=$.value)==null?void 0:Ge.ownerDocument)!=null?rt:typeof document<"u"?document:null;return mt?.scrollingElement||mt?.documentElement||null},isReverseFlexScrollRoot:Ce,getNormalizedScrollTop:Fe,getOffsetTopWithinRoot:function(Ve,lt){const Ge=lt.ownerDocument||Ve.ownerDocument||document;if((function(tt,mt){return tt===mt.documentElement||tt===mt.body||tt===mt.scrollingElement})(lt,Ge))return Ve.getBoundingClientRect().top+Pe(Ge);const et=lt.getBoundingClientRect(),rt=Ve.getBoundingClientRect(),He=Fe(lt,Ge,!1);return rt.top-et.top+He}}})(R,{isClient:G,scrollRoot:J});Gn("markstreamShowTooltips",ae),Gn("markstreamHtmlPolicy",re),Gn("markstreamTypewriter",f),Gn("markstreamFade",F(()=>T.fade!==!1)),Gn("markstreamTypewriterCursor",F(()=>!0)),Gn("markstreamTextStreamState",X),Gn("markstreamStreamVersion",U),Gn("markstreamParseOptions",F(()=>T.parseOptions)),Gn("markstreamCustomMarkdownIt",F(()=>T.customMarkdownIt));const{smoothStreamingEnabled:xe,renderContent:ze,requestedFinal:st,effectiveFinal:dt}=(function($,Y){const ce=xLe(It(It({},SLe),$.smoothStreamingOptions)),pe=F(()=>{var He,tt,mt;return $.smoothStreaming!==!1&&!((He=$.nodes)!=null&&He.length)&&($.smoothStreaming===!0||!((tt=Y.inheritedSmoothStreaming)!=null&&tt.value))&&($.smoothStreaming===!0||OE($.typewriter)!=="off"||((mt=$.maxLiveNodes)!=null?mt:0)<=0)}),Ce=V(!Y.isClient||$.smoothStreaming===!0);cn(()=>{Ce.value=!0});const Fe=F(()=>Ce.value&&pe.value),Pe=F(()=>{var He;return Fe.value?ce.visible.value:(He=$.content)!=null?He:""}),Ve=F(()=>{var He,tt;const mt=(He=$.parseOptions)!=null?He:{};return(tt=$.final)!=null?tt:mt.final}),lt=F(()=>{const He=Ve.value;return Fe.value&&He!=null?!!He&&ce.caughtUp.value:He});let Ge=0,et=!1;function rt(){Ge=0,et=!1}return Ue([()=>$.content,()=>$.nodes,Fe,Ve],([He,tt,mt,ft])=>{if(tt?.length)return rt(),void ce.reset("");const Ft=He??"";if(!mt)return rt(),ce.reset(Ft),void(ft&&ce.finish({flush:!0}));const xt=ce.source.value;if(Ft){if(Ft!==xt)if(Ft.startsWith(xt)){const Pt=Ft.slice(xt.length),Gt=ce.pendingChars.value;Pt.length<=8?(Ge++,et||Ge>=2&&Gt<=8?(et=!0,ce.reset(Ft)):ce.enqueue(Pt)):(rt(),ce.enqueue(Pt))}else rt(),ce.reset(Ft)}else rt(),ce.reset("");ft&&ce.finish()},{immediate:!0}),{smoothStream:ce,smoothStreamingEligible:pe,smoothStreamingEnabled:Fe,renderContent:Pe,requestedFinal:Ve,effectiveFinal:lt}})(T,{isClient:G,inheritedSmoothStreaming:Q}),wt=st.value===!0;Gn("markstreamSmoothStreaming",xe);const Nt=V(!1),jt=V(!1),Yt=V(!1);let ht="",Qe=!1,nt=null;function at(){G&&nt!=null&&(window.clearTimeout(nt),nt=null)}function Ht(){Nt.value=!1,at()}function An($,Y){if(!Ae.value)return;const ce=(function(){if(!Ae.value)return null;const pe=Ke(Ot),Ce=Ke(wn),Fe=Math.max(fn,Ce);if(pe<=0&&Fe<=0)return null;const Pe={total:pe,maxPerFrame:Fe,byLabel:(Ve=Ot,Object.fromEntries(Array.from(Ve.entries()).sort((lt,Ge)=>Ge[1]-lt[1]||lt[0].localeCompare(Ge[0]))))};var Ve;return Ot.clear(),wn.clear(),fn=0,Pe})();console.info(`[markstream-vue][perf] ${$}`,ce?bn(It({},Y),{layoutReads:ce}):Y)}Ue([()=>T.indexKey,()=>T.customId],()=>{var $,Y;Ht(),jt.value=!1,Yt.value=!(($=i.nodes)!=null&&$.length)&&st.value!==!0&&!!i.content,ht=(Y=ze.value)!=null?Y:"",Qe=ht.length>0},{flush:"sync"}),Ue([()=>i.content,()=>i.nodes,st],([$,Y,ce])=>{!Y?.length&&ce!==!0&&$&&(Yt.value=!0)},{flush:"sync",immediate:!0}),Ue([ze,()=>i.nodes,st],([$,Y,ce])=>{const pe=$??"";return Y?.length||ce===!0?(Ht(),jt.value=!1,ht=pe,void(Qe=!0)):(pe.length>0&&(Yt.value=!0),Qe?(ht&&pe.length>ht.length&&pe.startsWith(ht)?(Nt.value=!0,jt.value=!0,G&&(at(),nt=window.setTimeout(()=>{var Ce;nt=null,dt.value===!0||(Ce=i.nodes)!=null&&Ce.length||(Nf(),Nt.value=!1,qa())},1200))):(pe.length"u")return null;const Fe=window;if(Fe.__markstreamLayoutReadPerformance)return Fe.__markstreamLayoutReadPerformance;const Pe={total:0,maxPerFrame:0,byLabel:{}};return Fe.__markstreamLayoutReadPerformance=Pe,Pe})();Ce&&(Ce.total=Number(Ce.total||0)+1,Ce.byLabel[pe]=Number(Ce.byLabel[pe]||0)+1,Ce.currentFrameTotal=Number(Ce.currentFrameTotal||0)+1,Ce.frameScheduled||(Ce.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Ye(Ce),0):queueMicrotask(()=>Ye(Ce)):window.requestAnimationFrame(()=>Ye(Ce))))})($),Tn||(Tn=!0,G&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(it):typeof queueMicrotask!="function"?setTimeout(it,0):queueMicrotask(it)))}function pt($,Y){return ln($),Y()}const ni=T.customId?`renderer-${T.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Xn=(function($){const Y=new Map;return{scope:$,cache:Y,clear:()=>Y.clear()}})(ni),ko=ni;Gn(lP,Xn);const yi=Gs(()=>T.customId),{effectiveCustomHtmlTagsSet:fl,mergedParseOptions:Ds,parsedNodes:Et,getParsedNodesDirtyStartIndex:zn,getParsedNodesRevision:fi}=CLe(T,{instanceMsgId:ni,renderContent:ze,effectiveFinal:dt,smoothStreamingEnabled:xe,debugPerformanceEnabled:Ae,customComponentsMap:yi,logPerf:An});Ue(Et,()=>{Nt.value||Xn.clear(),U.value+=1},{immediate:!0});const ys=F(()=>({customId:T.customId,customHtmlTags:Ds.value.customHtmlTags,parseOptions:T.parseOptions,customMarkdownIt:T.customMarkdownIt,htmlPolicy:re.value,viewportPriority:T.viewportPriority,viewportPriorityOptions:ie.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:ae.value,themes:T.themes,langs:T.langs,isDark:T.isDark,typewriter:f.value,smoothStreamingOptions:T.smoothStreamingOptions,parseCoalesceMs:T.parseCoalesceMs,fade:T.fade}));Gn("markstreamNestedRendererProps",ys);const Zi=F(()=>Et.value),Di=F(()=>Et.value.length),Ji=V(null),lo=V(null),ki=V(null),Bi=V(null),wi=i.indexKey!=null&&String(i.indexKey).startsWith("list-item-"),Qs=!wi&&T.customId?DE(T.customId):null,er=F(()=>Qs?(f3.value,DE(T.customId)):null),$i=F(()=>{var $;return!!(!ue.value&&T.customId&&!wi&&(($=er.value)!=null&&$.enabled))}),Ri=F(()=>!!(G&&$i.value)),ii=F(()=>{var $;return!!(!ue.value&&(($=i.virtualScroll)!=null&&$.enabled))}),kr=F(()=>ii.value),hi=V(!1);cn(()=>{hi.value=!0});const mn=F(()=>!!(G&&ii.value));Gn("markstreamHostScrollManaged",mn);const Bs=F(()=>!!(hi.value&&mn.value)),Pn=F(()=>Ri.value||mn.value),hn=F(()=>Ri.value||Bs.value),Is=F(()=>{var $;return Pn.value&&(($=er.value)==null?void 0:$.textEstimation)!==!1});function ks(){const $=ne.value||pt("getMeasuredContainerWidth.clientWidth",()=>{var Y;return((Y=R.value)==null?void 0:Y.clientWidth)||0});return Number.isFinite($)&&$>0?$:0}const Vn=F(()=>{const $=ks();return $>0?Math.max(1,Math.round($)):640}),Ys=F(()=>{var $,Y;return!(dt.value!==!0||ii.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||($=i.nodes)!=null&&$.length||Yt.value||!(((Y=T.maxLiveNodes)!=null?Y:0)<=0))}),bo=F(()=>{var $;return Ys.value?50:Math.max(1,($=T.maxLiveNodes)!=null?$:320)}),Xi=F(()=>{var $;return Ys.value?16:Math.max(0,($=T.liveNodeBuffer)!=null?$:60)}),kn=F(()=>{var $;return!ue.value&&T.nodeVirtual!==!1&&!((($=T.maxLiveNodes)!=null?$:0)<=0&&!Ys.value)&&(T.nodeVirtual===!0?Et.value.length>0:Et.value.length>bo.value)}),Oo=F(()=>kn.value||Ri.value||mn.value),bs=F(()=>T.viewportPriority!==!1),hl=F(()=>!!bs.value&&!W.value);var xi;xi=F(()=>bs.value),Gn(eP,xi);const Es=F(()=>{var $;return!(ue.value||T.deferNodesUntilVisible===!1||(($=T.maxLiveNodes)!=null?$:0)<=0||kn.value||Et.value.length>900||T.viewportPriority===!1)}),Oi=iEe($=>{var Y;return ge((Y=$??R.value)!=null?Y:null)},bs),{requestFrame:Gi,cancelFrame:si,hasIdleCallback:tr,isTestEnv:As}=(function($){const Y=$.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,ce=$.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,pe=$.isClient&&typeof window.requestIdleCallback=="function",Ce=(function(){var Fe;if(typeof globalThis>"u"||!("process"in globalThis))return;const Pe=(Fe=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Fe.value;return Pe?.env})();return{requestFrame:Y,cancelFrame:ce,hasIdleCallback:pe,isTestEnv:Ce?.NODE_ENV==="test"}})({isClient:G}),Ts=F(()=>dt.value===!0&&!ii.value),{resolvedBatchSize:Ao,resolvedInitialBatch:br,batchingEnabled:pl,incrementalRenderingActive:Ar,renderedCount:Re,previousRenderContext:We,adaptiveBatchSize:St,previousBatchConfig:At}=(function($,Y){var ce;const pe=F(()=>{var rt;const He=Math.trunc((rt=$.renderBatchSize)!=null?rt:80);return Number.isFinite(He)?Math.max(0,He):0}),Ce=F(()=>{var rt;const He=Math.trunc((rt=$.initialRenderBatchSize)!=null?rt:pe.value);return Number.isFinite(He)?Math.max(0,He):pe.value}),Fe=F(()=>!Y.renderAsFragment.value&&$.batchRendering!==!1&&pe.value>0&&Y.isClient&&!Y.isTestEnv),Pe=V(0),Ve=V({key:$.indexKey,total:0}),lt=V(Math.max(1,pe.value||1)),Ge=F(()=>{var rt,He,tt;return Fe.value&&!((rt=Y.continuousStreaming)!=null&&rt.value)&&!((He=Y.forceFullRenderFinalContent)!=null&&He.value)&&((tt=$.maxLiveNodes)!=null?tt:0)<=0}),et=V({batchSize:pe.value,initial:Ce.value,delay:(ce=$.renderBatchDelay)!=null?ce:16,enabled:Ge.value});return{resolvedBatchSize:pe,resolvedInitialBatch:Ce,batchingEnabled:Fe,incrementalRenderingActive:Ge,renderedCount:Pe,previousRenderContext:Ve,adaptiveBatchSize:lt,previousBatchConfig:et}})(T,{isClient:G,isTestEnv:As,renderAsFragment:ue,forceFullRenderFinalContent:Ts,continuousStreaming:F(()=>jt.value&&dt.value!==!0)}),rn=F(()=>{var $;return!ue.value&&T.batchRendering!==!1&&Ao.value>0&&!As&&(($=T.maxLiveNodes)!=null?$:0)<=0&&!Ts.value}),jn=F(()=>rn.value),Qi=F(()=>Pn.value||jn.value),bi=F(()=>{var $;return Qi.value&&(($=er.value)==null?void 0:$.codeBlockEstimation)!==!1}),Zn=new Map,Ii=new Map,zi=new WeakMap;let es=null;const $s=new WeakMap,ts=new Map,nr=[];let Js=[],ao=[],zs=-1;const Cr=ra(nr),Po=new Set,Bl=V(0);let ot=0;const _e=V(0),je=F(()=>(_e.value,Array.from(Zn.entries()).sort(($,Y)=>$[0]-Y[0]))),Mn=V(null),pn=V(null);let Ei,jo=null,Xs=0,us=null;function oi(){Ei.markFallbackHeightPrefixDirty()}function eo($){return Ei.getFallbackNodeHeight($)}function Ho($,Y){return Ei.estimateHeightRange($,Y)}function Co($){return Ei.estimateIndexForOffset($)}const{activeRestoreAnchor:Wo,getRelativeScrollTopWithinContainer:ee,setRelativeScrollTopWithinContainer:me,resolveAnchorOffset:Ie,clearRestoreReconcile:Be,scheduleRestoreReconcile:Ze,captureRestoreAnchor:Je,restoreAnchor:ut,getAnchorDrift:yt}=(function($){const{isClient:Y,containerRef:ce,parsedNodeCount:pe,requestFrame:Ce,cancelFrame:Fe,resolveScrollContainer:Pe,getNormalizedScrollTop:Ve,getOffsetTopWithinRoot:lt,isReverseFlexScrollRoot:Ge,estimateIndexForOffset:et,estimateHeightRange:rt,getFallbackNodeHeight:He,clamp:tt}=$,mt=V(null);let ft=null,Ft=[];function xt(){const on=Pe(),Ln=ce.value;if(!on||!Ln)return null;const Rn=on.ownerDocument||Ln.ownerDocument||document;if(on===Rn.documentElement||on===Rn.body||on===Rn.scrollingElement){const Si=Ln.getBoundingClientRect();return Math.max(0,-Si.top)}return Math.max(0,Ve(on,Rn,!1)-lt(Ln,on))}function Pt(on){var Ln;const Rn=Pe(),Si=ce.value;if(!Rn||!Si)return;const Mo=Math.max(0,on),co=Rn.ownerDocument||Si.ownerDocument||document,zl=co.defaultView||(typeof window<"u"?window:null);if(Rn===co.documentElement||Rn===co.body||Rn===co.scrollingElement){const ha=Ve(Rn,co,!0)+Si.getBoundingClientRect().top;return void((Ln=zl?.scrollTo)==null||Ln.call(zl,0,Math.max(0,ha+Mo)))}zE(Rn,co,lt(Si,Rn)+Mo,{isReverseFlexScrollRoot:ha=>{var T1;return(T1=Ge?.(ha))!=null&&T1},getNormalizedScrollTop:Ve})}function Gt(on){const Ln=pe.value,Rn=tt(on.nodeIndex,0,Math.max(0,Ln-1));return rt(0,Rn)+Math.max(0,on.offsetWithinNodePx)}function sn(){if(ft!=null&&(Fe?.(ft),ft=null),Y)for(const on of Ft)window.clearTimeout(on);Ft=[]}function en(on){const Ln=Gt(on),Rn=xt();Rn!=null&&Math.abs(Rn-Ln)<=.5||Pt(Ln)}return{activeRestoreAnchor:mt,getRelativeScrollTopWithinContainer:xt,setRelativeScrollTopWithinContainer:Pt,resolveAnchorOffset:Gt,clearRestoreReconcile:sn,applyRestoreAnchor:en,scheduleRestoreReconcile:function(){mt.value&&Y&&ft==null&&(ft=Ce?Ce(()=>{ft=null,mt.value&&en(mt.value)}):null,ft==null&&mt.value&&en(mt.value))},captureRestoreAnchor:function(){const on=xt(),Ln=pe.value;if(on==null||Ln<=0)return null;const Rn=tt(et(on+1),0,Ln-1),Si=rt(0,Rn),Mo=He(Rn);return{nodeIndex:Rn,offsetWithinNodePx:tt(on-Si,0,Math.max(0,Mo-1))}},restoreAnchor:function(on){const Ln=pe.value;if(mt.value={nodeIndex:tt(on.nodeIndex,0,Math.max(0,Ln-1)),offsetWithinNodePx:Math.max(0,on.offsetWithinNodePx)},sn(),en(mt.value),Y)for(const Rn of[0,120,280,480])Ft.push(window.setTimeout(()=>{mt.value&&en(mt.value)},Rn))},getAnchorDrift:function(on){const Ln=xt();return Ln==null?null:Ln-Gt(on)}}})({isClient:G,containerRef:R,parsedNodeCount:Di,requestFrame:Gi,cancelFrame:si,resolveScrollContainer:()=>Mn.value||be(),getNormalizedScrollTop:Oe,getOffsetTopWithinRoot:we,isReverseFlexScrollRoot:Le,estimateIndexForOffset:Co,estimateHeightRange:Ho,getFallbackNodeHeight:eo,clamp:_o}),{nodeHeights:Wt,heightStats:qt,heightTreeSize:vn,heightSumTree:Pi,heightKnownTree:Nn,averageNodeHeight:xn,resetHeightMeasurements:Ne,pruneHeightMeasurements:ct,rebuildHeightTrees:vt,recordNodeHeight:Ut,removeNodeHeights:Ti,exportHeightCache:wo,importHeightCache:wr,fenwickRangeSum:uo}=(function($={}){const Y=Ns({}),ce=Ns({total:0,count:0}),pe=V(0),Ce=V([]),Fe=V([]);function Pe(){for(const He of Object.keys(Y))delete Y[Number(He)];ce.total=0,ce.count=0,pe.value=0,Ce.value=[],Fe.value=[]}function Ve(He,tt,mt){for(let ft=tt+1;ft0;ft-=ft&-ft)mt+=He[ft];return mt}function Ge(He){pe.value=He;const tt=new Array(He+1).fill(0),mt=new Array(He+1).fill(0);for(const[ft,Ft]of Object.entries(Y)){const xt=Number(ft),Pt=Number(Ft);!Number.isFinite(xt)||xt<0||xt>=He||!Number.isFinite(Pt)||Pt<=0||(Ve(tt,xt,Pt),Ve(mt,xt,1))}Ce.value=tt,Fe.value=mt}function et(He){if(!Number.isInteger(He)||He<0)return!1;const tt=Y[He];if(!Number.isFinite(tt)||tt<=0)return!1;if(delete Y[He],ce.total=Math.max(0,ce.total-tt),ce.count=Math.max(0,ce.count-1),pe.value>He){const mt=Ce.value,ft=Fe.value;mt.length&&ft.length&&(Ve(mt,He,-tt),Ve(ft,He,-1))}return!0}const rt=F(()=>ce.count>0?Math.max(12,ce.total/ce.count):32);return{nodeHeights:Y,heightStats:ce,heightTreeSize:pe,heightSumTree:Ce,heightKnownTree:Fe,averageNodeHeight:rt,resetHeightMeasurements:Pe,pruneHeightMeasurements:function(He){if(He<=0)return void Pe();let tt=0,mt=0;for(const[ft,Ft]of Object.entries(Y)){const xt=Number(ft),Pt=Number(Ft);!Number.isFinite(xt)||xt<0||xt>=He||!Number.isFinite(Pt)||Pt<=0?delete Y[xt]:(tt+=Pt,mt++)}ce.total=tt,ce.count=mt},rebuildHeightTrees:Ge,recordNodeHeight:function(He,tt,mt={}){(function(ft,Ft,xt={}){var Pt;if(!Number.isFinite(Ft)||Ft<=0)return!1;const Gt=Y[ft];if(Gt&&(xt.allowShrink===!1&&Ftft){const sn=Ce.value,en=Fe.value;if(sn.length&&en.length)if(Gt){const on=Ft-Gt;on!==0&&Ve(sn,ft,on)}else Ve(sn,ft,Ft),Ve(en,ft,1)}xt.notify!==!1&&((Pt=$.onHeightRecorded)==null||Pt.call($))})(He,tt,bn(It({},mt),{notify:!0}))},removeNodeHeight:function(He,tt={}){var mt;const ft=et(He);return ft&&tt.notify!==!1&&((mt=$.onHeightRecorded)==null||mt.call($)),ft},removeNodeHeights:function(He,tt={}){var mt;let ft=0;for(const Ft of He)et(Number(Ft))&&ft++;return ft>0&&tt.notify!==!1&&((mt=$.onHeightRecorded)==null||mt.call($)),ft},exportHeightCache:function(){return Object.entries(Y).map(([He,tt])=>({index:Number(He),height:Number(tt)})).filter(He=>Number.isFinite(He.index)&&He.index>=0&&Number.isFinite(He.height)&&He.height>0).sort((He,tt)=>He.index-tt.index)},importHeightCache:function(He,tt={}){var mt;if(!Array.isArray(He))return;const ft=pe.value;let Ft=!1;if(tt.mode!=="merge"){const xt=Object.keys(Y);if(xt.length>0){for(const Pt of xt)delete Y[Number(Pt)];Ft=!0}}for(const xt of He){const Pt=Number(xt.index),Gt=Number(xt.height);if(!Number.isInteger(Pt)||Pt<0||ft>0&&Pt>=ft||!Number.isFinite(Gt)||Gt<=0)continue;const sn=Y[Pt];sn&&Math.abs(sn-Gt)<=1||(Y[Pt]=Gt,Ft=!0)}Ft&&((function(){let xt=0,Pt=0;const Gt=pe.value;for(const[sn,en]of Object.entries(Y)){const on=Number(sn),Ln=Number(en);!Number.isFinite(on)||on<0||Gt>0&&on>=Gt||!Number.isFinite(Ln)||Ln<=0?delete Y[on]:(xt+=Ln,Pt++)}ce.total=xt,ce.count=Pt})(),ft>0&&Ge(ft),(mt=$.onHeightRecorded)==null||mt.call($))},fenwickRangeSum:function(He,tt,mt){if(mt<=tt)return 0;const ft=lt(He,mt-1);return tt<=0?ft:ft-lt(He,tt-1)}}})({onHeightRecorded:()=>{oi(),mn.value&&x1(),Wo.value&&Ze(),pn.value&&Ef(),Hi("node-resize")}});function ke($){Number.isInteger($)&&$>=0&&Po.add($)}function Se($){for(const Y of $)ke(Number(Y))}function qe($){ot++;let Y=!0;try{const ce=$();return Y=ce!==!1,ce}finally{ot--,ot===0&&Y&&Bl.value++}}function $t(){Js=[],ao=[],zs=-1,Po.clear(),Cr.value=nr}function Xt(){$t(),qe(()=>Ne()),ts.clear()}function In($){!Number.isInteger($)||$<0||$>=Et.value.length||ts.set($,h1($))}function ri($,Y,ce={}){const pe=Wt[$];ke($),Ut($,Y,ce);const Ce=Wt[$];return Object.is(pe,Ce)?(Po.delete($),!1):(Ce&&Ce>0?In($):pe&&ts.delete($),!0)}function ji($,Y){const ce=pt("getNodeLayoutHeight.slot.offsetHeight",()=>{var pe,Ce;return(Ce=(pe=Zn.get($))==null?void 0:pe.offsetHeight)!=null?Ce:0});return ce>0?ce:pt("getNodeLayoutHeight.content.offsetHeight",()=>Y.offsetHeight)}function xo($,Y={}){Y.mode!=="merge"?$t():Se($.map(ce=>ce.index)),qe(()=>wr($,Y)),f4()}const ir=F(()=>Es.value&&hl.value),wg=F(()=>{var $;return!ue.value&&T.batchRendering!==!1&&Ao.value>0&&(($=T.maxLiveNodes)!=null?$:0)<=0}),bH=F(()=>!ue.value&&wt&&dt.value===!0&&!kn.value&&!ii.value&&!$i.value&&!ir.value&&!wg.value),S7=F(()=>!!Oi&&ir.value),_7=F(()=>kn.value||mn.value),{focusIndex:ja,liveRange:So,updateLiveRange:c1}=(function($,Y){const{parsedNodeCount:ce,virtualizationEnabled:pe,maxLiveNodesResolved:Ce,liveNodeBufferResolved:Fe,clamp:Pe}=Y,Ve=Fe??F(()=>{var et;return Math.max(0,(et=$.liveNodeBuffer)!=null?et:60)}),lt=V(0),Ge=Ns({start:0,end:0});return{liveNodeBufferResolved:Ve,focusIndex:lt,liveRange:Ge,updateLiveRange:function(){const et=ce.value;if(!pe.value||et===0)return Ge.start=0,void(Ge.end=et);const rt=Math.min(Ce.value,et),He=Ve.value,tt=Pe(lt.value-He,0,Math.max(0,et-rt));Ge.start=tt,Ge.end=Math.min(et,tt+rt)}}})(T,{parsedNodeCount:Di,virtualizationEnabled:kn,maxLiveNodesResolved:bo,liveNodeBufferResolved:Xi,clamp:_o}),da=new Map,Gc=new Map,_u=new Map,xg=[],Ha=new Map,Mu=new Set,M7=V(0);let O9=!1;const I7=F(()=>(M7.value,Mu.size)),Vr=new Map,fa=new Map,E7=V(0),P9=F(()=>{E7.value;let $=0;for(const Y of Vr.values())$+=Math.max(0,Y);return $});let Zr=null;const Sg=F(()=>{if(!kn.value)return Et.value.length;const $=Xi.value,Y=Math.max(So.end+$,br.value),ce=Math.min(Et.value.length,Y);return Math.max(Re.value,ce)});function _g(){O9||(O9=!0,queueMicrotask(()=>{O9=!1,M7.value+=1}))}function T7($,Y,ce="node-resize"){if(!G||typeof window>"u")return null;const pe=window.setTimeout(()=>{Mu.delete(pe)&&_g();try{Y()}finally{Hi(ce)}},Math.max(0,$));return Mu.add(pe),_g(),pe}function Mg($){G&&$!=null&&(Mu.delete($)&&_g(),window.clearTimeout($))}function L7(){if(G&&typeof window<"u")for(const $ of Mu)window.clearTimeout($);Mu.size&&(Mu.clear(),_g()),xg.length=0,_u.clear()}function AH($){q.value=$}function CH($){j.value=$}function wH($){H.value=$}const{cancelScheduledFocusSync:j9,scheduleFocusSync:$l}=(function($){const{isClient:Y,containerRef:ce,virtualizationEnabled:pe,requestFrame:Ce,cancelFrame:Fe,syncFocusToScroll:Pe}=$;let Ve=null;function lt(){var et,rt,He;return(He=(rt=(et=ce.value)==null?void 0:et.ownerDocument)==null?void 0:rt.defaultView)!=null?He:typeof window<"u"?window:null}function Ge(){if(!Ve)return;const et=lt();Ve.viaTimeout?et?et.clearTimeout(Ve.id):clearTimeout(Ve.id):Fe?.(Ve.id),Ve=null}return{cancelScheduledFocusSync:Ge,scheduleFocusSync:function(et={}){if(!pe.value)return;if(!Y)return void Pe(!0);if(et.immediate)return Ge(),void Pe(!0);if(Ve)return;const rt=()=>{Ve=null,Pe()};if(Ce)return void(Ve={id:Ce(rt),viaTimeout:!1});const He=lt();Ve={id:He?He.setTimeout(rt,16):setTimeout(rt,16),viaTimeout:!0}}}})({isClient:G,containerRef:R,virtualizationEnabled:kn,requestFrame:Gi,cancelFrame:si,syncFocusToScroll:function($=!1){var Y;if(!kn.value)return;const ce=Mn.value||be();if(!ce)return;const pe=ce.ownerDocument||((Y=R.value)==null?void 0:Y.ownerDocument)||document,Ce=pe?.defaultView||(typeof window<"u"?window:null),Fe=ce===pe?.documentElement||ce===pe?.body,Pe=Et.value.length;if(Pe<=0)return;if(!Fe&&Pe>0&&Le(ce)){const ft=pt("syncFocusToScroll.clientHeight",()=>ce.clientHeight||0),Ft=pt("syncFocusToScroll.scrollTop",()=>ce.scrollTop),xt=Ft<0?-Ft:Ft;return void Tg(_o((Ve=Math.max(0,xt)+.5*Math.max(0,ft),Ei.estimateIndexForOffsetFromEnd(Ve)),0,Math.max(0,Pe-1)),$)}var Ve;const lt=(function(ft,Ft,xt,Pt){const Gt=R.value;if(!Gt)return null;const sn=Pt?0:pt("syncFocusToScroll.model.root.getBoundingClientRect",()=>ft.getBoundingClientRect().top),en=pt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Gt.getBoundingClientRect().top),on=Math.max(0,sn-en),Ln=Pt?pt("syncFocusToScroll.model.viewport.clientHeight",()=>{var Rn,Si,Mo,co;return(co=(Mo=(Si=xt?.innerHeight)!=null?Si:(Rn=Ft.documentElement)==null?void 0:Rn.clientHeight)!=null?Mo:ft.clientHeight)!=null?co:0}):pt("syncFocusToScroll.model.root.clientHeight",()=>ft.clientHeight);return _o(Co(on+.5*Math.max(0,Ln)),0,Math.max(0,Et.value.length-1))})(ce,pe,Ce,Fe);if(lt!=null)return void Tg(lt,$);const Ge=Fe?null:pt("syncFocusToScroll.root.getBoundingClientRect",()=>ce.getBoundingClientRect()),et=Fe?0:Ge.top,rt=Fe?pt("syncFocusToScroll.viewport.clientHeight",()=>{var ft,Ft;return(Ft=(ft=Ce?.innerHeight)!=null?ft:ce.clientHeight)!=null?Ft:0}):Ge.bottom,He=je.value;let tt=null,mt=null;for(const[ft,Ft]of He){if(!Ft)continue;const xt=pt("syncFocusToScroll.slot.getBoundingClientRect",()=>Ft.getBoundingClientRect());xt.bottom<=et||xt.top>=rt||(tt==null&&(tt=ft),mt=ft)}if(tt==null||mt==null){const ft=R.value;if(!ft)return;const Ft=Fe?{top:0}:pt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>ce.getBoundingClientRect()),xt=pt("syncFocusToScroll.fallback.scrollTop",()=>Oe(ce,pe,Fe)),Pt=Fe?(()=>{const sn=pt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>ft.getBoundingClientRect()),en=(Fe?0:Ft.top)-sn.top;return Math.max(0,en)})():(()=>{const sn=we(ft,ce);return Math.max(0,xt-sn)})(),Gt=Fe?pt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var sn,en,on,Ln;return(Ln=(on=(en=Ce?.innerHeight)!=null?en:(sn=pe?.documentElement)==null?void 0:sn.clientHeight)!=null?on:ce.clientHeight)!=null?Ln:0}):pt("syncFocusToScroll.fallback.root.clientHeight",()=>ce.clientHeight);return void Tg(_o(Co(Pt+.5*Math.max(0,Gt)),0,Math.max(0,Et.value.length-1)),!0)}Tg(Math.round((tt+mt)/2),$)}}),{visibleNodeIndices:H9,nodeVisibilityHandles:Cf,nodeVisibilityWatchStops:Ig,nodeVisibilityFallbackTimers:N7,clearVisibilityFallback:Eg,markNodeVisible:Iu,cleanupNodeVisibility:xH,destroyNodeVisibilityState:W9}=wLe({isClient:G,shouldTrackVisibleNodeIndices:()=>ir.value,shouldCleanupNodeVisibility:()=>kn.value,onNodeMarkedVisible:$=>{kn.value?$l():ja.value=_o($,0,Math.max(0,Et.value.length-1))},onNodeVisibilityCleaned:$=>{Zn.delete($)&&rC()}}),{cleanupScrollListener:F7,setupScrollListener:SH}=(function($){const{isClient:Y,virtualizationEnabled:ce,listenerEnabled:pe,scrollRootElement:Ce,resolveScrollContainer:Fe,scheduleFocusSync:Pe,onScroll:Ve}=$;let lt=null,Ge=null;function et(){lt&&(lt(),lt=null),Ge=null,Ce.value=null}function rt(He){const tt=$.getScrollTop?$.getScrollTop(He):He.scrollTop;return Math.max(0,Number.isFinite(tt)?Math.abs(tt):0)}return{cleanupScrollListener:et,setupScrollListener:function(){if(!Y)return;if(!((He=pe?.value)!=null?He:ce.value))return void et();var He;const tt=Fe();if(!tt)return void et();if(Ce.value===tt&<)return;et(),Ge=rt(tt);const mt=()=>{if(Ve?.(),ce.value){const ft=(function(Ft){const xt=rt(Ft),Pt=Ge;Ge=xt;const Gt=Math.max(480,.75*(Ft.clientHeight||0));return Pt==null?xt>Gt?{immediate:!0}:void 0:Math.abs(xt-Pt)>Gt?{immediate:!0}:void 0})(tt);ft?Pe(ft):Pe()}};tt.addEventListener("scroll",mt,{passive:!0}),Ce.value=tt,lt=()=>{tt.removeEventListener("scroll",mt)}}}})({isClient:G,virtualizationEnabled:kn,listenerEnabled:_7,scrollRootElement:Mn,resolveScrollContainer:be,scheduleFocusSync:$l,onScroll:function(){const $=pn.value;if(!$)return;const Y=f1();if(!Y||(function(pe){if(y1()>=Xs)return us=null,!1;const Ce=us;if(Ce==null)return!0;const Fe=Math.abs(pe.scrollTop-Ce)<=2;return Fe||(us=null),Fe})(Y))return;const ce=Z7(Y);ce!=null?(ce<-32||Math.abs(Math.max(0,ce)-Math.max(0,$.distanceFromBottomPx))>32)&&If("restore"):If("restore")},getScrollTop:$=>{var Y;const ce=$.ownerDocument||((Y=R.value)==null?void 0:Y.ownerDocument)||document,pe=$===ce.documentElement||$===ce.body||$===ce.scrollingElement;return pt("scrollListener.getScrollTop",()=>Oe($,ce,pe))}});function Tg($,Y=!1){const ce=_o($,0,Math.max(0,Et.value.length-1));!Y&&Math.abs(ce-ja.value)<=1||(ja.value=ce,c1())}function _o($,Y,ce){return Math.min(Math.max($,Y),ce)}function q9($=Et.value.length){const Y=zn();return!Number.isInteger(Y)||Y<0?$:_o(Y,0,$)}function U9($){return $?.firstElementChild}function D7($,Y){var ce;return $?(ce=$.matches)!=null&&ce.call($,Y)?$:$.querySelector(Y):null}function _H($,Y){$<1||$>6||(z[$]=Y)}function B7(){if(!Pn.value)return void(ne.value=0);const $=pt("updateExperimentContainerWidth.clientWidth",()=>{var Y,ce;return(ce=(Y=R.value)==null?void 0:Y.clientWidth)!=null?ce:0});ne.value=$>0?$:0}let d1=null;function K9(){d1?.disconnect(),d1=null}const $7=bp("ViewportDeferredMarkdownCodeBlockNode",Gl({loader:()=>qi(null,null,function*(){return(yield Ss(()=>import("./index5-D-TNv1go.js"),__vite__mapDeps([8,6,7]))).default}),loadingComponent:ly,delay:0,suspensible:!1}),ly);function z7($){return $===$7}const R7=F(()=>g.value==="pre"?Nr:g.value==="shiki"?$7:r3);function O7(){var $;return(($=T.codeBlockProps)==null?void 0:$.showHeader)!==!1}function P7($,Y,ce){const pe=Wt[Y],Ce=typeof pe=="number"&&pe>0;if(Is.value&&!Ce&&!(function(Fe){return!!yi.value.paragraph&&(Fe.type==="paragraph"||Fe.type==="list_item"||Fe.type==="list")})($)){const Fe=rP($,ce,le.value);if(Fe)return Fe}if(bi.value&&$.type==="code_block"){const Fe=(function(Pe){if(Pe.type!=="code_block")return null;const Ve=yC(Pe,Pg(Pe));return z7(Ve)?"markdown":Ve===Nr?"pre":Ve===R7.value||Ve===r3?"monaco":null})($);if(Fe==="monaco"||Fe==="markdown"||Fe==="pre")return(function(Pe,Ve){var lt,Ge,et;if(!Pe||Pe.type!=="code_block")return null;const rt=Ve.rendererKind,He=rt!=="pre"&&Ve.showHeader!==!1,tt=!!Pe.diff;let mt=0,ft=500;if(rt==="monaco"){const xt=(lt=Ve.monacoOptions)!=null?lt:{},Pt=g3(Pe,xt,Ve.width),Gt=(function(en){const on=typeof en?.fontSize=="number"&&en.fontSize>0?en.fontSize:12;return typeof en?.lineHeight=="number"&&en.lineHeight>0?en.lineHeight:Math.round(1.5*on)})(xt),sn=(function(en,on){var Ln,Rn;const Si=typeof((Ln=en?.padding)==null?void 0:Ln.top)=="number"?en.padding.top:on?0:8,Mo=typeof((Rn=en?.padding)==null?void 0:Rn.bottom)=="number"?en.padding.bottom:on?0:8;return Math.max(0,Si)+Math.max(0,Mo)})(xt,tt);ft=typeof xt.MAX_HEIGHT=="number"&&xt.MAX_HEIGHT>0?xt.MAX_HEIGHT:500,mt=Math.round(Pt*Gt+sn)}else if(rt==="markdown"){const xt=g3(Pe);mt=Math.round(21*xt+32)}else{const xt=g3(Pe);mt=Math.round(28*xt),ft=Number.POSITIVE_INFINITY}const Ft=Math.max(1,Math.min(mt,ft));return It({kind:"code-block",height:Math.round(Ft+(He?40:0)),contentHeight:Ft,rendererKind:rt},tt&&rt==="monaco"?{diffInline:DA((Ge=Ve.monacoOptions)!=null?Ge:{},(et=Ve.width)!=null?et:0)}:{})})($,{rendererKind:Fe,monacoOptions:T.codeBlockMonacoOptions,showHeader:O7(),width:ce})}return null}z3(()=>{if(Bl.value,ot>0)return;const $=Et.value,Y=fi();if(!$.length||!Qi.value)return Js=[],ao=[],zs=-1,Po.clear(),void(Cr.value=nr);const ce=ne.value||pt("estimatedNodeHeights.clientWidth",()=>{var Ge;return((Ge=R.value)==null?void 0:Ge.clientWidth)||0});if(!Number.isFinite(ce)||ce<=0)return Js=[],ao=[],zs=-1,Po.clear(),void(Cr.value=nr);const pe=(function(Ge){return[Math.round(Ge),Is.value,bi.value,le.value,T.codeBlockMonacoOptions,O7(),g.value,yi.value,f3.value]})(ce),Ce=Js.length<=$.length&&(Pe=pe,(Fe=ao).length===Pe.length&&Fe.every((Ge,et)=>Object.is(Ge,Pe[et])));var Fe,Pe;const Ve=Ce&&zs===Y?$.length:Ce?q9($.length):0,lt=Ce?Array.from(Po):[];Js.length=$.length;for(let Ge=Ve;Ge<$.length;Ge++)Js[Ge]=P7($[Ge],Ge,ce);for(const Ge of lt)Ge>=0&&Ge<$.length&&GeCr.value);Ei=(function($){let Y=!0,ce=[0],pe="";function Ce(et){var rt;const He=$.nodeHeights[et];if(Number.isFinite(He)&&He>0)return He;const tt=$.parsedNodes.value[et],mt=tt?.type,ft=!!((rt=$.hasCustomParagraphComponent)!=null&&rt.call($)),Ft=$.estimatedNodeHeights.value[et],xt=Ft?.height;if(!(function(Gt,sn,en){return!!(en&&sn?.kind==="simple-text"&&(Gt==="paragraph"||Gt==="list_item"||Gt==="list"))})(mt,Ft,ft)&&Number.isFinite(xt)&&xt>0)return xt;const Pt=dLe(tt,$.getContainerWidth()||640);return mt==="heading"||mt==="paragraph"&&Pt<=28&&(function(Gt,sn){if(sn)return!1;const en=Gt.children;return!Array.isArray(en)||!en.length||en.every(aP)})(tt,ft)?Pt:Math.max($.averageNodeHeight.value,Pt)}function Fe(){var et;const rt=$.parsedNodes.value.length,He=$.getPrefixCacheKeyParts().join(":");if(!Y&&pe===He)return ce;const tt=new Array(rt+1);tt[0]=0;for(let mt=0;mt=((rt=mt[tt])!=null?rt:0))return tt-1;let ft=0,Ft=tt-1,xt=tt-1;for(;ft<=Ft;){const Pt=ft+Ft>>1;((He=mt[Pt+1])!=null?He:0)>=et?(xt=Pt,Ft=Pt-1):ft=Pt+1}return xt}function Ve(et,rt){var He,tt;if(et>=rt)return 0;if($.heightEstimationActive.value)return(function(Ft,xt){var Pt,Gt;const sn=$.parsedNodes.value.length,en=PE(Math.trunc(Ft),0,sn),on=PE(Math.trunc(xt),en,sn);if(en>=on)return 0;const Ln=Fe();return((Pt=Ln[on])!=null?Pt:0)-((Gt=Ln[en])!=null?Gt:0)})(et,rt);if($.heightTreeSize.value!==$.parsedNodes.value.length){let Ft=0;for(let xt=et;xten<=0?0:$.fenwickRangeSum(ft,0,en)+(en-$.fenwickRangeSum(Ft,0,en))*mt;let Pt=0,Gt=He.length-1,sn=He.length-1;for(;Pt<=Gt;){const en=Pt+Gt>>1;xt(en+1)>=et?(sn=en,Gt=en-1):Pt=en+1}return sn}let tt=et;for(let mt=0;mt0||et++}return et}return{markFallbackHeightPrefixDirty:function(){Y=!0},getFallbackNodeHeight:Ce,estimateHeightRange:Ve,estimateIndexForOffset:lt,estimateIndexForOffsetFromEnd:function(et){var rt,He;const tt=$.parsedNodes.value;if(!tt.length)return 0;if(et<=0)return Math.max(0,tt.length-1);if($.heightEstimationActive.value){const ft=(rt=Fe()[tt.length])!=null?rt:0;return Pe(Math.max(0,ft-et))}if($.heightTreeSize.value===tt.length){const ft=Ve(0,tt.length);return lt(Math.max(0,ft-et))}let mt=et;for(let ft=tt.length-1;ft>=0;ft--){const Ft=(He=$.nodeHeights[ft])!=null?He:$.averageNodeHeight.value;if(mt<=Ft)return ft;mt-=Ft}return 0},getEstimatedNodeHeightCount:Ge,buildVirtualHeightSummary:function(et){var rt;const He=$.parsedNodes.value.length;return{totalNodes:He,measuredCount:$.heightStats.count,estimatedCount:Ge(),averageNodeHeight:$.averageNodeHeight.value,topSpacerHeight:et.topSpacerHeight,bottomSpacerHeight:et.bottomSpacerHeight,estimatedTotalHeight:Ve(0,He),width:(rt=et.width)!=null?rt:$.getContainerWidth()}}}})({parsedNodes:Et,nodeHeights:Wt,heightStats:qt,heightTreeSize:vn,heightSumTree:Pi,heightKnownTree:Nn,averageNodeHeight:xn,heightEstimationActive:Pn,estimatedNodeHeights:wf,getContainerWidth:ks,hasCustomParagraphComponent:()=>!!yi.value.paragraph,getPrefixCacheKeyParts:()=>{var $;const Y=U1(ne.value||pt("getFallbackHeightPrefix.clientWidth",()=>{var pe;return((pe=R.value)==null?void 0:pe.clientWidth)||0})),ce=(($=i.virtualScroll)==null?void 0:$.measurementKey)==null?"":String(i.virtualScroll.measurementKey);return[Et.value.length,qt.count,Math.round(qt.total),Math.round(100*xn.value),ce,Y,Pn.value?1:0,f3.value,U.value,yi.value.paragraph?1:0]},fenwickRangeSum:uo}),Ue(()=>Et.value.length,$=>{var Y;oi(),$<=0?Xt():($ct(Y))),$!==vn.value&&vt($))},{immediate:!0});const MH=F(()=>{if(!kn.value)return Et.value.map((pe,Ce)=>({node:pe,index:Ce}));const $=Et.value.length,Y=_o(So.start,0,$),ce=_o(So.end,Y,$);return Et.value.slice(Y,ce).map((pe,Ce)=>({node:pe,index:Y+Ce}))}),V9=F(()=>kn.value?Ho(0,Math.min(So.start,Et.value.length)):0),Z9=F(()=>{if(!kn.value)return 0;const $=Et.value.length;return Ho(Math.min(So.end,$),$)});function j7(){return Ei.buildVirtualHeightSummary({topSpacerHeight:V9.value,bottomSpacerHeight:Z9.value,width:Qc()})}function IH(){const $=Et.value,Y=j7();return bn(It({},Y),{probe:{paragraphReady:!!le.value.paragraph,listItemReady:!!le.value.listItem,listWrapperOverhead:le.value.listWrapperOverhead,headingReadyLevels:Object.entries(le.value.headings).filter(([,ce])=>!!ce).map(([ce])=>Number(ce))},nodes:$.map((ce,pe)=>{var Ce,Fe,Pe,Ve,lt,Ge,et,rt,He;return{index:pe,type:ce.type,estimateKind:(Fe=(Ce=wf.value[pe])==null?void 0:Ce.kind)!=null?Fe:null,rendererKind:(Ve=(Pe=wf.value[pe])==null?void 0:Pe.rendererKind)!=null?Ve:null,estimatedHeight:(Ge=(lt=wf.value[pe])==null?void 0:lt.height)!=null?Ge:null,estimatedContentHeight:(rt=(et=wf.value[pe])==null?void 0:et.contentHeight)!=null?rt:null,measuredHeight:(He=Wt[pe])!=null?He:null}})})}function G9(){return i.indexKey!=null?String(i.indexKey):ii.value?`virtual-${ns()}`:"markdown-renderer"}function H7($){const Y=String($),ce=`${G9()}-`;if(!Y.startsWith(ce))return null;const pe=Y.slice(ce.length).match(/^(\d+)(?:$|-)/);if(!pe)return null;const Ce=Number(pe[1]);return!Number.isInteger(Ce)||Ce<0||Ce>=Et.value.length?null:Ce}function ns(){var $,Y,ce;const pe=($=i.virtualScroll)==null?void 0:$.sessionKey;return String(pe!=null&&pe!==""?pe:(ce=(Y=i.indexKey)!=null?Y:T.customId)!=null?ce:ni)}function Rs(){var $;const Y=($=i.virtualScroll)==null?void 0:$.threadKey;return Y==null||Y===""?void 0:String(Y)}const EH=F(()=>{var $,Y,ce;return(ce=Rs())!=null?ce:String((Y=($=i.indexKey)!=null?$:T.customId)!=null?Y:ni)});function Q9($){var Y;return($??"")===((Y=Rs())!=null?Y:"")}function Wa(){var $,Y,ce;return Y=($=i.virtualScroll)==null?void 0:$.measurementKey,ce=(function(){const pe=g.value;return(function(Ce){var Fe,Pe;const Ve=Ce.renderer,lt=Ve==="monaco"?Ce.codeBlockMonacoOptions:void 0,Ge=Ce.codeBlockProps,et=Ve==="shiki";return[Ce.isDark?"dark":"light",Ve==="monaco"?"code-rich":Ve==="pre"?"code-pre":"code-shiki",Ce.codeBlockStream===!1?"code-static":"code-stream",fo(Ce.codeBlockMinWidth),fo(Ce.codeBlockMaxWidth),...et?[tIe((Fe=Ge?.themes)!=null?Fe:Ce.themes,(Pe=Ge?.langs)!=null?Pe:Ce.langs)]:[],fo(lt?.fontSize),fo(lt?.lineHeight),fo(lt?.fontFamily),fo(lt?.tabSize),fo(lt?.MAX_HEIGHT),fo(lt?.wordWrap),fo(lt?.wrappingIndent),fo(lt?.padding),fo(Ge?.showHeader),fo(Ge?.showCopyButton),fo(Ge?.showExpandButton),fo(Ge?.showPreviewButton),fo(Ge?.showCollapseButton),fo(Ge?.showFontSizeButtons)].join("\0")})({renderer:pe,isDark:T.isDark,codeBlockStream:T.codeBlockStream,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockMonacoOptions:pe==="monaco"?T.codeBlockMonacoOptions:void 0,codeBlockProps:T.codeBlockProps,themes:pe==="shiki"?T.themes:void 0,langs:pe==="shiki"?T.langs:void 0})})(),[Y==null?"":String(Y),ce].join("\0")}function Qc(){return ks()}const Lg=F(()=>U1(Qc())),Gr=F(()=>[Wa(),Lg.value].join("\0")),TH=F(()=>{var $;return ii.value?["virtual",($=Rs())!=null?$:"",ns(),Gr.value].join("\0"):i.indexKey});function xf(){E7.value+=1}function Y9($){return!(!$||!Number.isInteger($.index)||$.index<0||$.index>=Et.value.length||$.sessionKey!==ns()||$.threadKey!==Rs()||$.layoutEpochKey!==Gr.value)}function W7($){const Y=String($),ce=fa.get(Y);return ce?Y9(ce)?ce.index:null:H7(Y)}function q7($="async-node"){(Vr.size||fa.size)&&(Vr.clear(),fa.clear(),xf(),Hi($))}const Sf=un(D8,null),J9={reportHeight($,Y){if(!mn.value)return;const ce=W7($);if(ce==null)return;const pe=da.get(ce);if(!pe)return;const Ce=Number(Y),Fe=ji(ce,pe);(function(Pe,Ve,lt={}){qe(()=>ri(Pe,Ve,lt))})(ce,Number.isFinite(Ce)&&Ce>0?Math.max(Ce,Fe||0):Fe)},markPending($){if(!mn.value)return;const Y=H7($);Y!=null&&(function(ce,pe){var Ce;const Fe=fa.get(ce);if(Fe&&Y9(Fe))return Vr.set(ce,Math.max(0,(Ce=Vr.get(ce))!=null?Ce:0)+1),xf(),void Hi("async-node");Vr.set(ce,1),fa.set(ce,(function(Pe){return{index:Pe,sessionKey:ns(),threadKey:Rs(),layoutEpochKey:Gr.value}})(pe)),xf(),Hi("async-node")})(String($),Y)},markSettled($){if(!mn.value)return;const Y=String($),ce=W7($);(ce!=null||(function(pe){return Vr.has(String(pe))})(Y))&&(function(pe){var Ce;const Fe=(Ce=Vr.get(pe))!=null?Ce:0;return!(Fe<=0||(Fe<=1?(Vr.delete(pe),fa.delete(pe)):Vr.set(pe,Fe-1),xf(),Fe===1&&Hi("async-node"),0))})(Y)&&ce!=null&&qa()}};function LH(){let $=0;for(const Y of da.values())$+=pt("getVisibleDomHeight.offsetHeight",()=>{var ce;return(ce=Y?.offsetHeight)!=null?ce:0});return Math.ceil(Math.max(0,$))}Gn(D8,{reportHeight($,Y){J9.reportHeight($,Y),Sf?.reportHeight($,Y)},markPending($){J9.markPending($),Sf?.markPending($)},markSettled($){J9.markSettled($),Sf?.markSettled($)}});let X9,e4=null,_f=null;function Ng($){return $!==!1&&$!=null&&$!==""}function U7(){return kn.value?(function(){if(!kn.value)return!0;const $=Et.value.length,Y=_o(So.start,0,$),ce=_o(So.end,Y,$);if(Y>=ce)return!0;for(let pe=Y;pe=Sg.value}function t4(){return dt.value===!0&&!Nt.value&&P9.value===0&&Mu.size===0&&Ha.size===0&&Zr==null&&U7()}function K7(){var $,Y;if((($=i.virtualScroll)==null?void 0:$.settleMode)!=="manual"||e4===ns()&&X9===Rs())return!0;const ce=(Y=i.virtualScroll)==null?void 0:Y.settledToken;return!!Ng(ce)&&_f===S1(ce)}function n4(){return t4()&&K7()}function NH($,Y){return Y.totalNodes<=0?$==="final"?"final":"estimate":Y.measuredCount>=Y.totalNodes?$==="final"?"final":"measured":Y.measuredCount>0||Y.estimatedCount>0?"mixed":"estimate"}function Yc($="manual",Y){const ce=j7(),pe=(function(Ce){return Ce||(dt.value!==!0?Et.value.length>0?"streaming":"estimating":!U7()||Ha.size>0||Zr!=null?"measuring":n4()?"settled":"settling")})(Y);return{sessionKey:ns(),threadKey:Rs(),phase:pe,nodeCount:ce.totalNodes,liveRange:{start:So.start,end:So.end},renderedCount:Re.value,measuredCount:ce.measuredCount,estimatedCount:ce.estimatedCount,averageNodeHeight:ce.averageNodeHeight,topSpacerHeight:ce.topSpacerHeight,bottomSpacerHeight:ce.bottomSpacerHeight,visibleDomHeight:LH(),totalHeight:V7(),width:ce.width,final:dt.value===!0,stable:n4(),confidence:NH(pe,ce),reason:$}}function f1(){const $=Mn.value||be(),Y=R.value;if(!$||!Y)return null;const ce=$.ownerDocument||Y.ownerDocument||document,pe=$===ce.documentElement||$===ce.body||$===ce.scrollingElement,Ce=pt("getScrollBox.scrollTop",()=>Oe($,ce,pe)),Fe=pt("getScrollBox.scrollHeight",()=>{var Ve,lt,Ge,et,rt;return pe?Math.max((lt=(Ve=ce.documentElement)==null?void 0:Ve.scrollHeight)!=null?lt:0,(et=(Ge=ce.body)==null?void 0:Ge.scrollHeight)!=null?et:0,(rt=$.scrollHeight)!=null?rt:0):$.scrollHeight}),Pe=pt("getScrollBox.clientHeight",()=>{var Ve;return pe?((Ve=ce.documentElement)==null?void 0:Ve.clientHeight)||$.clientHeight||0:$.clientHeight});return{root:$,doc:ce,isViewportRoot:pe,scrollTop:Ce,scrollHeight:Fe,clientHeight:Pe}}function V7(){const $=Et.value.length,Y=Math.max(0,Ho(0,$)),ce=pt("getRendererLogicalHeight.offsetHeight",()=>{var Ce,Fe;return(Fe=(Ce=R.value)==null?void 0:Ce.offsetHeight)!=null?Fe:0}),pe=Math.max(0,ce>0?ce:pt("getRendererLogicalHeight.scrollHeight",()=>{var Ce,Fe;return(Fe=(Ce=R.value)==null?void 0:Ce.scrollHeight)!=null?Fe:0}));return $<=0?Math.ceil(ce):kn.value?Y>0?Math.max(1,Math.ceil(Y),(function(){let Ce=V9.value+Z9.value;for(const Fe of Zn.values())Fe&&(Ce+=Math.max(0,pt("getVirtualizedDomLogicalHeight.offsetHeight",()=>Fe.offsetHeight||0)));return Math.ceil(Math.max(0,Ce))})(),(function(Ce,Fe){return Ce<=0||Fe<=0?0:Fe<=Ce+Math.max(512,.05*Ce)?Math.ceil(Fe):0})(Y,pe)):Math.max(1,Math.ceil(pe)):mn.value?Y>0||qt.count>0||Ei.getEstimatedNodeHeightCount()>0?(Ar.value&&Re.value,Math.max(1,Math.ceil(pe),Math.ceil(Y))):Math.ceil(pe):Math.max(1,Math.ceil(pe),Math.ceil(Y))}function Z7($){const Y=R.value;if(!Y)return null;const ce=pt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>Y.getBoundingClientRect());return(function(Ce){return Ce.isViewportRoot?Ce.clientHeight:pt("getViewportBottomInRoot.getBoundingClientRect",()=>Ce.root.getBoundingClientRect().bottom)})($)-ce.bottom}function FH($={}){const Y=$.requireViewport!==!1,ce=(function(Fe=64){const Pe=f1(),Ve=R.value;if(!Pe||!Ve)return!1;const lt=(function(et){if(et.isViewportRoot)return{top:0,bottom:et.clientHeight};const rt=pt("getVirtualViewportRect.getBoundingClientRect",()=>et.root.getBoundingClientRect());return{top:rt.top,bottom:rt.bottom}})(Pe),Ge=pt("isRendererNearVirtualViewport.getBoundingClientRect",()=>Ve.getBoundingClientRect());return Ge.bottom>=lt.top-Fe&&Ge.top<=lt.bottom+Fe})();if(Y&&!ce)return null;const pe=(function(){const Fe=f1(),Pe=R.value;if(!Fe||!Pe||Math.max(0,Fe.scrollHeight-Fe.scrollTop-Fe.clientHeight)>64)return null;const Ve=Z7(Fe);return Ve==null?null:Ve>=-8&&Ve<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,Ve)}:null})();if(pe)return{anchor:pe,captured:!0};const Ce=Je();if(Ce)return{anchor:{type:"node",nodeIndex:Ce.nodeIndex,offsetWithinNodePx:Ce.offsetWithinNodePx},captured:ce};if($.allowFallback===!0){const Fe=(function(){const Pe=Et.value.length;return Pe<=0?null:{type:"node",nodeIndex:_o(ja.value,0,Math.max(0,Pe-1)),offsetWithinNodePx:0}})();return Fe?{anchor:Fe,captured:!1}:null}return null}function i4($){let Y=2166136261;for(let ce=0;ce<$.length;ce++)Y^=$.charCodeAt(ce),Y=Math.imul(Y,16777619);return(Y>>>0).toString(36)}function DH($,Y){let ce=$;for(let pe=0;pe8192?`${pe.slice(0,8192)}...${pe.length}`:pe;return`${pe.length}:${i4(Ce)}`})($)}`;if(typeof $=="function")return"fn";if(typeof $!="object")return typeof $;if(Y.has($))return"cycle";if(ce>=6)return"max-depth";Y.add($);try{if(Array.isArray($)){if($.length<=160){const Ge=[];for(let et=0;et<$.length;et++)Ge.push(Fg($[et],Y,ce+1));return`a:${$.length}:${Ge.join(",")}`}const Fe=[],Pe=[],Ve=Math.max(0,$.length-32);let lt=2166136261;for(let Ge=0;Ge<$.length;Ge++){const et=Fg($[Ge],Y,ce+1);lt=DH(lt,et),Ge<32&&Fe.push(et),Ge>=Ve&&Pe.push(et)}return[`a:${$.length}`,`h=${Fe.join(",")}`,`t=${Pe.join(",")}`,`all=${(lt>>>0).toString(36)}`].join(":")}const pe=$,Ce=Object.keys(pe).filter(Fe=>{const Pe=pe[Fe];return Fe!=="parent"&&Fe!=="el"&&Fe!=="component"&&(Pe==null||typeof Pe=="string"||typeof Pe=="number"||typeof Pe=="boolean"||BH.has(Fe))}).sort();return`o:${Ce.length}:${Ce.map(Fe=>`${Fe}=${Fg(pe[Fe],Y,ce+1)}`).join(";")}`}finally{Y.delete($)}}let s4=-1,o4="",Jc=[2166136261];function h1($){const Y=Et.value[$];return Y?i4(Fg(Y)):""}function $H($,Y){let ce=$;for(let pe=0;pe>>0}function r4(){var $,Y;const ce=U.value;if(s4===ce)return o4;const pe=Et.value.length;let Ce=q9(pe);(s4!==ce-1||Ce>pe||Jc.length>>0).toString(36),s4=ce,o4}function Mf($,Y={}){var ce;const pe=Y.includeHeightCache===!0,Ce=(ce=Y.includeContentHash)!=null?ce:pe,Fe=pe?(function(Ve){const lt=(function(){var ft,Ft;const xt=Number((Ft=(ft=i.virtualScroll)==null?void 0:ft.heightCacheLimit)!=null?Ft:5e3);return!Number.isFinite(xt)||xt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(xt))})();if(!Number.isFinite(lt)||Ve.length<=lt)return Ve;const Ge=new Map,et=ft=>{!ft||Ge.size>=lt||Ge.set(ft.index,ft)},rt=Et.value.length,He=_o(So.start-2*Xi.value,0,rt),tt=_o(So.end+2*Xi.value,He,rt);for(const ft of Ve)ft.index>=He&&ft.index=0&&Ge.sizeft.index-Ft.index).slice(0,lt)})(wo().map(Ve=>{var lt;const Ge=Et.value[Ve.index];return Ge?bn(It({},Ve),{nodeType:String((lt=Ge.type)!=null?lt:""),signature:h1(Ve.index)}):null}).filter(Ve=>!!Ve)):[],Pe=FH({allowFallback:Y.allowAnchorFallback===!0,requireViewport:Y.requireViewport});return Pe||Fe.length||Y.includeEmptyState===!0?bn(It({sessionKey:$.sessionKey,threadKey:$.threadKey},Pe?{anchor:Pe.anchor,anchorCaptured:Pe.captured}:{anchorCaptured:!1}),{metrics:$,width:$.width,contentHash:Ce?r4():void 0,measurementKey:Wa()||void 0,heightCache:Fe.length?Fe:void 0}):null}function l4($){var Y,ce;const pe=f1();if(!pe)return;const Ce=(function(Ve){const lt=R.value;if(!lt)return null;const Ge=we(lt,Ve.root),et=Et.value.length,rt=pt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>lt.offsetHeight||0),He=Math.max(0,rt>0?rt:et>0?pt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>lt.scrollHeight||0):0),tt=V7();return Ge+Math.max(He,tt)})(pe);if(Ce==null)return;const Fe=Math.max(0,$.distanceFromBottomPx),Pe=Math.max(0,Ce-pe.clientHeight-Fe);(function(Ve){Xs=y1()+120,us=Ve})(Pe),pe.isViewportRoot?(ce=(Y=pe.doc.defaultView)==null?void 0:Y.scrollTo)==null||ce.call(Y,0,Pe):zE(pe.root,pe.doc,Pe,{isReverseFlexScrollRoot:Le,getNormalizedScrollTop:Oe})}const a4=[];function G7(){if(G)for(jo!=null&&(si?.(jo),jo=null);a4.length;){const $=a4.pop();$!=null&&window.clearTimeout($)}}function If($){const Y=!!pn.value;pn.value=null,Xs=0,us=null,G7(),Y&&$&&Hi($)}function Ef(){if(!pn.value||!G||jo!=null)return;const $=()=>{jo=null;const Y=pn.value;Y&&l4(Y)};jo=Gi?Gi($):null,jo==null&&$()}function Q7($,Y={}){const ce=Et.value.length;return ce<=0?[]:$.filter(pe=>!(!Number.isInteger(pe.index)||pe.index<0||pe.index>=ce)&&!(!Number.isFinite(pe.height)||pe.height<=0)&&!(Y.requireSignature&&!pe.signature)&&!(Y.requireCompatibilityMetadata&&!pe.nodeType&&!pe.signature)&&(function(Ce){var Fe;const Pe=Et.value[Ce.index];return!(!Pe||Ce.nodeType&&Ce.nodeType!==String((Fe=Pe.type)!=null?Fe:"")||Ce.signature&&Ce.signature!==h1(Ce.index))})(pe))}function Y7($){const Y=U1(Qc()),ce=U1($);return Y!==-1&&ce!==-1&&Y===ce}function u4($){var Y;const ce=Number($?.width);if(Number.isFinite(ce)&&ce>0)return ce;const pe=Number((Y=$?.metrics)==null?void 0:Y.width);return Number.isFinite(pe)&&pe>0?pe:null}function J7($){var Y;return $.sessionKey===ns()&&!!Q9($.threadKey)&&((Y=$.measurementKey)!=null?Y:"")===Wa()&&!!Y7(u4($))&&!!(function(ce){const pe=ce.heightCache;return!!pe?.length&&(X7(ce)?pe.some(Ce=>!!(Ce.nodeType||Ce.signature)):pe.some(Ce=>!!Ce.signature))})($)}function X7($){return!!($.contentHash&&$.contentHash===r4())}function zH($){return!X7($)}let Xc=null,ed=null,Dg=null,p1=null,g1=null;function c4($){var Y;const ce=$.map(Ce=>{var Fe,Pe;return[Ce.index,Math.round(10*Ce.height),(Fe=Ce.nodeType)!=null?Fe:"",(Pe=Ce.signature)!=null?Pe:""].join("")}).join(""),pe=U1(Qc());return[(Y=Rs())!=null?Y:"",ns(),Wa(),Et.value.length,pe,$.length,i4(ce)].join(":")}function eC($=(Y=>(Y=i.virtualScroll)==null?void 0:Y.heightCache)()){if(!mn.value||!$?.length||Et.value.length<=0||!Y7((Y=i.virtualScroll)==null?void 0:Y.heightCacheWidth))return!1;var Y;const ce=Q7($,{requireSignature:!0});if(!ce.length)return!1;const pe=c4(ce);return pe===Xc?(ed="standalone",!0):(xo(ce,{mode:"merge"}),oi(),Xc=pe,ed="standalone",b1(),Hi("restore"),!0)}function d4($,Y={}){var ce,pe,Ce;if(!mn.value||!$||$.sessionKey!==ns()||!Q9($.threadKey)||Et.value.length<=0)return!1;const Fe=!!((ce=$.heightCache)!=null&&ce.length)&&!Bg(),Pe=!$.anchor||$.anchorCaptured===!1&&Y.allowUncapturedAnchor!==!0?null:$.anchor,Ve=Y.restoreAnchor===!0&&!!Pe&&!Bg()&&Number(u4($))>0;let lt=!1;if((pe=$.heightCache)!=null&&pe.length&&J7($)){const et=Q7($.heightCache,{requireCompatibilityMetadata:!$.contentHash,requireSignature:zH($)});et.length&&(xo(et,{mode:"merge"}),oi(),Xc=c4(et),ed="restore",b1(),lt=!0)}if(Fe||Ve)return!1;if(!Y.restoreAnchor||!Pe)return lt&&Hi("restore"),!0;const Ge=(function(et,rt){var He;const tt=et.anchor,mt=tt?tt.type==="bottom"?`bottom:${Math.round(tt.distanceFromBottomPx)}`:`node:${tt.nodeIndex}:${Math.round(tt.offsetWithinNodePx)}`:"none";return[(He=Rs())!=null?He:"",ns(),Wa(),Lg.value,rt,mt].join(":")})($,(Ce=Y.restoreToken)!=null?Ce:"imperative");return Dg===Ge?(lt&&Hi("restore"),!0):(Dg=Ge,(function(et){const rt=()=>{if(et.type==="node")return If(),void ut({nodeIndex:et.nodeIndex,offsetWithinNodePx:et.offsetWithinNodePx});if(Be(),Wo.value=null,pn.value=et,G7(),l4(et),G)for(const He of[0,120,280,480])a4.push(window.setTimeout(()=>{const tt=pn.value;tt&&l4(tt)},He))};(function(He){if(!kn.value)return!1;const tt=Et.value.length;return!(tt<=0||(ja.value=He.type==="node"?_o(He.nodeIndex,0,tt-1):tt-1,c1(),0))})(et)?bt(rt):rt()})(Pe),Hi("restore"),!0)}function Bg(){const $=Qc();return Number.isFinite($)&&$>0}function tC($){var Y;return $.sessionKey===ns()&&!!Q9($.threadKey)&&(Et.value.length<=0||!(!((Y=$.heightCache)!=null&&Y.length)||Bg())||!(!($.anchor&&Number(u4($))>0)||Bg()))}function f4(){ts.clear();for(const $ of Object.keys(Wt)){const Y=Number($);Number.isInteger(Y)&&Y>=0&&Y{let Y=!1,ce=null;const pe=()=>{Y||(Y=!0,ce!=null&&window.clearTimeout(ce),$())};if(Gi)return Gi(pe),void(ce=window.setTimeout(pe,50));ce=window.setTimeout(pe,0)})}function h4($,Y=Rs(),ce=Gr.value){return ns()===$&&Rs()===Y&&Gr.value===ce}function p4(){return qi(this,arguments,function*($={}){var Y,ce,pe,Ce,Fe;const Pe=ns(),Ve=Rs(),lt=Gr.value,Ge=(Y=$.frames)!=null?Y:2,et=(ce=$.timeoutMs)!=null?ce:120,rt=(pe=$.reason)!=null?pe:"manual",He=$.expectedSettledTokenKey,tt=$.flushPendingTimers===!0,mt=Yc(rt),ft=()=>bn(It({},mt),{phase:mt.final?"settling":mt.phase,stable:!1,confidence:mt.confidence==="final"?"mixed":mt.confidence,reason:rt}),Ft=()=>h4(Pe,Ve,lt)&&(He==null||k1()===He);for(let sn=0;snwindow.setTimeout(en,sn))})(et),!Ft()||(tt&&L7(),qa(),m1(),!Ft()))return ft();const xt=t4();xt&&(e4=Pe,X9=Ve,((Ce=i.virtualScroll)==null?void 0:Ce.settleMode)==="manual"&&He!=null&&Ng((Fe=i.virtualScroll)==null?void 0:Fe.settledToken)&&k1()===He&&(_f=S1(i.virtualScroll.settledToken)));const Pt=Ft()&&xt&&K7(),Gt=Yc(rt,Pt?"final":void 0);return k4(Gt,!0),Gt})}let g4="content",td=null,nd=null,m4=0,v1=null,Tf=null,v4=null,y4=null;function y1(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function iC($){var Y,ce;const pe=v1;if(!pe)return!0;const Ce=(ce=(Y=i.virtualScroll)==null?void 0:Y.heightDiffThresholdPx)!=null?ce:1;return Math.abs($.totalHeight-pe.totalHeight)>Ce||$.sessionKey!==pe.sessionKey||$.phase!==pe.phase||$.stable!==pe.stable||$.final!==pe.final||$.threadKey!==pe.threadKey||$.nodeCount!==pe.nodeCount||$.measuredCount!==pe.measuredCount||$.width!==pe.width}function k1($=(Y=>(Y=i.virtualScroll)==null?void 0:Y.settledToken)()){return fo($)}function sC($,Y){var ce,pe;return[$,Y.sessionKey,(ce=Y.threadKey)!=null?ce:"",Wa(),r4(),fo((pe=i.virtualScroll)==null?void 0:pe.settledToken),Math.round(Y.totalHeight),Math.round(Y.width)].join("\0")}function b1(){v4=null,y4=null,Tf=null}function RH($){const Y=$.heightCache;return Y?.length?c4(Y):""}function A1($){var Y,ce,pe;const Ce=$.metrics,Fe=$.anchor?(Pe=$.anchor).type==="bottom"?`bottom:${Math.round(Pe.distanceFromBottomPx)}`:`node:${Pe.nodeIndex}:${Math.round(Pe.offsetWithinNodePx)}`:"none";var Pe;return[$.sessionKey,(Y=$.threadKey)!=null?Y:"",(ce=$.measurementKey)!=null?ce:Wa(),(pe=$.contentHash)!=null?pe:"",RH($),Fe,$.anchorCaptured?1:0,Ce.liveRange.start,Ce.liveRange.end,Ce.renderedCount,Ce.nodeCount,Math.round(Ce.totalHeight),Math.round(Ce.width),Ce.phase,Ce.stable?1:0].join("\0")}function k4($,Y=!1){if(!mn.value||(function(Pe=!1){return!Pe&&ii.value&&!Bs.value})(Y))return;const ce=Y||iC($),pe=(function(Pe,Ve=!1){return Ve||Pe.stable||Pe.phase==="final"?{state:Mf(Pe,{includeHeightCache:!0})}:{state:Mf(Pe)}})($,Y),Ce=pe.state,Fe=!!(Ce&&(ce||(function(Pe,Ve=!1){return!!Ve||A1(Pe)!==Tf})(Ce,Y)));if(ce&&(D($),v1=$,m4=y1()),Ce&&Fe&&(P(Ce),Ce.anchor&&O(Ce.anchor),Tf=A1(Ce)),$.stable){const Pe=sC("settled",$);if(Pe!==v4){v4=Pe;const Ve=Mf($,{includeHeightCache:!0});Ve&&(P(Ve),Tf=A1(Ve)),(function(lt){s("render-settled",lt)})($)}}if($.phase==="final"){const Pe=sC("final",$);if(Pe!==y4){y4=Pe;const Ve=Mf($,{includeHeightCache:!0});Ve&&(P(Ve),Tf=A1(Ve)),(function(lt){s("render-final",lt)})($)}}}function b4(){td!=null&&(si?.(td),td=null),nd!=null&&G&&(window.clearTimeout(nd),nd=null)}function oC(){td=null,nd=null,(function($){if(Ha.size>0||Zr!=null)return!0;switch($){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(g4)&&(qa(),m1()),k4(Yc(g4))}function Hi($){var Y,ce;if(!mn.value||(g4=$,td!=null||nd!=null))return;const pe=Math.max(0,(ce=(Y=i.virtualScroll)==null?void 0:Y.emitIntervalMs)!=null?ce:32),Ce=Math.max(0,pe-(y1()-m4)),Fe=()=>{nd=null,td=Gi?Gi(oC):null,td==null&&oC()};G&&Ce>0?nd=window.setTimeout(Fe,Ce):Fe()}function rC(){_e.value+=1}function $g($){if(Ar.value&&$>=Re.value){const Y=Et.value[$],ce=st.value===!0&&dt.value!==!0&&$>=Et.value.length-2,pe=Y?.type==="code_block"||Y?.type==="image"||Y?.type==="mermaid"||Y?.type==="infographic";if(!ce||pe)return!1}return!ir.value||$=Ee.value&&(W.value||(W.value=!0,W9()),!S7.value||!Oi))return Lf($),void(Y&&Iu($,!0));if(${if(N7.delete(Fe),!ir.value||H9.value.has(Fe))return;const lt=Zn.get(Fe);if(!lt)return;const Ge=be(lt),et=lt.ownerDocument||document,rt=et.defaultView||window,He=!Ge||Ge===et.documentElement||Ge===et.body,tt=!He&&Ge?pt("nodeVisibilityFallback.root.getBoundingClientRect",()=>Ge.getBoundingClientRect()):null,mt=He?0:tt.top,ft=He?pt("nodeVisibilityFallback.clientHeight",()=>{var xt,Pt;return(Pt=(xt=rt.innerHeight)!=null?xt:Ge?.clientHeight)!=null?Pt:0}):tt.bottom,Ft=pt("nodeVisibilityFallback.node.getBoundingClientRect",()=>lt.getBoundingClientRect());Ft.bottom>=mt-500&&Ft.top<=ft+500&&Iu(Fe,!0)},1800+Pe);N7.set(Fe,Ve)})($);let Ce=null;Ce=Ue(()=>pe.isVisible.value,Fe=>{if(Fe){Eg($),Iu($,!0),Ce?.(),Ig.delete($),Cf.get($)===pe&&Cf.delete($);try{pe.destroy()}catch{}}},{immediate:!0}),Ig.set($,Ce),kn.value&&$l()}function A4(){Zr=null,qe(()=>{let $=!1;for(const[Y,ce]of Ha)Ha.delete(Y),da.get(Y)===ce.el&&Gc.get(Y)===ce.version&&($=ri(Y,ce.height,{allowShrink:ce.allowShrink})||$);return $})}function Nf(){Zr!=null&&(si?.(Zr),Zr=null),Ha.clear()}function Rg($,Y){(function(ce,pe,Ce){var Fe;if(!Number.isFinite(Ce)||Ce<=0||da.get(ce)!==pe)return;const Pe=Gc.get(ce);if(Pe==null)return;const Ve=Et.value[ce],lt=Nt.value&&dt.value!==!0&&!((Fe=i.nodes)!=null&&Fe.length)&&ce>=Et.value.length-2,Ge=!(Ve?.loading===!0||lt),et=Ha.get(ce),rt=et?et.allowShrink&&Ge:Ge,He=et&&!rt?Math.max(et.height,Ce):Ce;Ha.set(ce,{height:He,allowShrink:rt,version:Pe,el:pe}),Zr==null&&(Zr=Gi?Gi(A4):null,Zr==null&&A4())})($,Y,ji($,Y))}function qa(){for(const[$,Y]of da)Y&&Rg($,Y)}function lC(){es?.disconnect(),es=null,Ii.clear()}function C4(){for(;xg.length;)Mg(xg.pop())}Ue(Bs,$=>{$&&Hi("content")},{flush:"post"}),t({getVirtualMetrics:Yc,captureVirtualState:function($={}){var Y;return Mf(Yc("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:$.allowFallbackAnchor===!0,requireViewport:$.requireViewport===!0,includeEmptyState:(Y=$.includeEmptyState)==null||Y})},restoreVirtualState:function($,Y={}){const ce=Y.restoreAnchor===!0,pe=Y.restoreToken==null?"imperative":String(Y.restoreToken);p1=$,g1={restoreAnchor:ce,restoreToken:pe,allowUncapturedAnchor:Y.allowUncapturedAnchor===!0},!d4($,{restoreAnchor:ce,restoreToken:pe,allowUncapturedAnchor:Y.allowUncapturedAnchor===!0})&&tC($)||(p1=null,g1=null)},forceMeasure:function($="manual"){return qi(this,null,function*(){yield bt(),yield nC(),qa(),m1(),yield bt();const Y=Yc($);return k4(Y,!0),Y})},settle:p4,scrollToNode:function($,Y="start"){If(),Be();const ce=Et.value.length;if(ce<=0)return;const pe=_o($,0,ce-1),Ce=()=>{var Fe;const Pe=Ie({nodeIndex:pe,offsetWithinNodePx:0}),Ve=eo(pe),lt=f1(),Ge=(Fe=lt?.clientHeight)!=null?Fe:0,et=ee();let rt=Pe;if(Y==="center")rt=Pe-Ge/2+Ve/2;else if(Y==="end")rt=Pe-Ge+Ve;else if(Y==="nearest"&&et!=null){if(Pe>=et&&Pe+Ve<=et+Ge)return;rt=PeOo.value,$=>{if(!$){lC();for(const Y of _u.values())for(const ce of Y)Mg(ce);_u.clear(),Gc.clear(),C4(),Nf()}},{immediate:!0}),Ue(dt,$=>{$&&(function(){if(G&&dt.value&&da.size){C4();for(const Y of[80,240,640]){const ce=T7(Y,()=>{for(const[pe,Ce]of da)Ce&&Rg(pe,Ce)},"final");ce!=null&&xg.push(ce)}}})(),Hi($?"final":"content")});const OH=RE(()=>Hi("content"),16),PH=RE(()=>Hi("batch"),16);Ue([()=>Et.value.length,()=>Re.value],()=>{pn.value&&Ef(),OH()},{flush:"post",immediate:!0}),Ue([()=>So.start,()=>So.end],()=>{PH()},{flush:"post"});const{cleanupBatchScheduler:jH}=(function($){const{props:Y,isClient:ce,isTestEnv:pe,parsedNodesIdentity:Ce,parsedNodeCount:Fe,desiredRenderedCount:Pe,datasetKey:Ve,batchingEnabled:lt,incrementalRenderingActive:Ge,resolvedBatchSize:et,resolvedInitialBatch:rt,renderedCount:He,adaptiveBatchSize:tt,previousRenderContext:mt,previousBatchConfig:ft,requestFrame:Ft,cancelFrame:xt,hasIdleCallback:Pt,cleanupNodeVisibility:Gt,onDatasetKeyChanged:sn,onDatasetChanged:en}=$;let on=null,Ln="raf",Rn=null,Si=0,Mo=!1,co=!1;const zl=new Set,ha=new Set;function T1(){if(ce){on!=null&&(Ln==="raf"&&xt?xt(on):Ln==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(on):Ln==="timeout"&&window.clearTimeout(on),on=null),Si+=1;for(const qo of zl)xt&&xt(qo);for(const qo of ha)window.clearTimeout(qo);zl.clear(),ha.clear(),Rn=null,Mo=!1,co=!1}}function Vg(){return typeof performance<"u"?performance.now():Date.now()}function SC(qo){(function(Ua){var Tu;if(!Ge.value)return;const Ka=Math.max(2,(Tu=Y.renderBatchBudgetMs)!=null?Tu:6),Va=Math.max(1,et.value||1),Rl=Math.max(1,Math.floor(Va/4));Ua>1.5*Ka?tt.value=Math.max(Rl,Math.floor(.8*tt.value)):Ua<.6*Ka&&tt.value=Ka)return;const Va=Math.max(1,qo),Rl=()=>{const Bf=Vg();on=null;const L1=Rn??Va;Rn=null;const $f=Vg();He.value=Math.min(Ka,He.value+L1),Gt(He.value),(function(E4,Zg){if(!ce)return void SC(Zg);Mo=!0;const EC=++Si;bt().then(()=>{var TC;if(EC!==Si)return;const aW=Vg(),uW=Math.max(Zg,aW-E4),LC=()=>{EC===Si&&SC(uW)};if(Ft){let sd=null,zf=null,FC=!1;const DC=()=>{FC||(FC=!0,sd!==null&&(zl.delete(sd),sd=null),zf!==null&&(ha.delete(zf),window.clearTimeout(zf),zf=null),LC())};return sd=Ft(()=>{DC()}),zl.add(sd),zf=window.setTimeout(()=>{sd!==null&&xt&&xt(sd),DC()},Math.max(32,(TC=Y.renderBatchIdleTimeoutMs)!=null?TC:120)),void ha.add(zf)}const NC=window.setTimeout(()=>{ha.delete(NC),LC()},0);ha.add(NC)})})(Bf,Vg()-$f)};if(!ce||Sr.immediate)return void Rl();const Lu=Math.max(0,(Ua=Y.renderBatchDelay)!=null?Ua:16);if(Rn=Rn!=null?Math.max(Rn,Va):Va,on==null){if(!pe&&Pt&&window.requestIdleCallback){const Bf=Math.max(0,(Tu=Y.renderBatchIdleTimeoutMs)!=null?Tu:120);return Ln="idle",void(on=window.requestIdleCallback(()=>Rl(),{timeout:Bf}))}if(Ft&&!pe)return Ln="raf",void(on=Ft(()=>{Lu===0?Rl():(Ln="timeout",on=window.setTimeout(()=>Rl(),Lu))}));Ln="timeout",on=window.setTimeout(()=>Rl(),Lu)}}function MC(qo,Sr={}){Mo?co=!0:qo==null?IC():_C(qo,Sr)}function IC(){Ge.value&&_C(lt.value?Math.max(1,Math.round(tt.value)):Math.max(1,et.value))}return Ue([Ce,Fe,Ve,Ge,et,rt,()=>Y.renderBatchDelay],()=>{var qo;const Sr=Fe.value,Ua=mt.value,Tu=Ve.value,Ka=!Object.is(Tu,Ua.key),Va=Sr!==Ua.total,Rl=Ka||Va;mt.value={key:Tu,total:Sr};const Lu=ft.value,Bf=(qo=Y.renderBatchDelay)!=null?qo:16,L1=Lu.batchSize!==et.value||Lu.initial!==rt.value||Lu.delay!==Bf||Lu.enabled!==Ge.value;ft.value={batchSize:et.value,initial:rt.value,delay:Bf,enabled:Ge.value},Ka&&sn(Sr),(Rl||L1||!Ge.value)&&T1(),(Rl||L1)&&(tt.value=Math.max(1,et.value||1)),Rl&&en();const $f=Pe.value;if(!Sr)return He.value=0,void Gt(0);if(!Ge.value)return He.value=$f,void Gt(He.value);const E4=Ka||Ua.total===0;He.value=E4||L1?Math.min($f,rt.value):Math.min(He.value,$f);const Zg=Math.max(1,rt.value||et.value||Sr);He.value<$f?MC(Zg,{immediate:!ce}):Gt(He.value)},{immediate:!0}),Ue(Pe,(qo,Sr)=>{Ge.value&&(typeof Sr=="number"&&qo<=Sr||qo>He.value&&MC())}),{cleanupBatchScheduler:T1}})({props:T,isClient:G,isTestEnv:As,parsedNodesIdentity:Zi,parsedNodeCount:Di,desiredRenderedCount:Sg,datasetKey:TH,batchingEnabled:pl,incrementalRenderingActive:Ar,resolvedBatchSize:Ao,resolvedInitialBatch:br,renderedCount:Re,adaptiveBatchSize:St,previousRenderContext:We,previousBatchConfig:At,requestFrame:Gi,cancelFrame:si,hasIdleCallback:tr,cleanupNodeVisibility:xH,onDatasetKeyChanged:$=>{Nf(),Xt(),oi(),b1(),$>0&&vt($)},onDatasetChanged:()=>{kn.value&&$l({immediate:!0})}});Ue([_7,kn,()=>R.value,()=>J()],([$,Y])=>{if(!$)return F7(),void j9();SH(),Y?$l({immediate:!0}):j9()},{flush:"post",immediate:!0}),Ue([()=>Et.value.length,()=>kn.value],$=>qi(null,[$],function*([Y,ce]){ce&&Y&&G&&(yield bt(),$l({immediate:!0}))}),{flush:"post"}),Ue(Pn,$=>{$&&(function(){var Y;if(Ji.value&&lo.value&&ki.value&&((Y=Bi.value)!=null&&Y[1]))return;const ce=Mt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),pe=Mt({type:"list_item",children:[ce],raw:"- Probe paragraph text"}),Ce=Mt({type:"list",ordered:!1,items:[pe],raw:"- Probe paragraph text"});Ji.value=ce,lo.value=pe,ki.value=Ce;const Fe={1:null,2:null,3:null,4:null,5:null,6:null};for(let Pe=1;Pe<=6;Pe++)Fe[Pe]=Mt({type:"heading",level:Pe,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(Pe)} Probe heading`});Bi.value=Fe})()},{immediate:!0}),Ue([()=>R.value,Pn],()=>{if(!Pn.value)return K9(),void(ne.value=0);B7(),K9(),Pn.value&&R.value&&typeof ResizeObserver<"u"&&(d1=new ResizeObserver(()=>{B7(),Wo.value&&Ze(),pn.value&&Ef(),Hi("resize")}),d1.observe(R.value))},{immediate:!0}),Ue([Pn,Vn,Gr],()=>qi(null,null,function*(){if(!Pn.value)return le.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void oi();yield bt(),(function(){if(!Pn.value||typeof window>"u")return le.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void oi();const $={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},Y=D7(U9(q.value),".paragraph-node");$.paragraph=m3(q.value,Y,"pre-wrap");const ce=U9(j.value),pe=ce?.querySelector(".paragraph-node");$.listItem=m3(j.value,pe,"pre-wrap");const Ce=pt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var Pe,Ve;return(Ve=(Pe=H.value)==null?void 0:Pe.offsetHeight)!=null?Ve:0}),Fe=pt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var Pe,Ve;return(Ve=(Pe=j.value)==null?void 0:Pe.offsetHeight)!=null?Ve:0});$.listWrapperOverhead=Math.max(0,Ce-Fe);for(let Pe=1;Pe<=6;Pe++){const Ve=D7(U9(z[Pe]),`h${Pe}`);$.headings[Pe]=m3(z[Pe],Ve,"pre-wrap")}le.value=$,oi()})()}),{flush:"post",immediate:!0}),Ue(()=>Et.value.length,()=>{kn.value&&$l({immediate:!0})}),Ue([Pn,ne],()=>{oi(),kn.value&&$l({immediate:!0}),Wo.value&&Ze(),pn.value&&Ef(),Hi("resize")},{immediate:!1}),Ue(()=>ir.value,$=>{if($)for(const[Y,ce]of Zn)zg(Y,ce);else if(W9(),kn.value)$l({immediate:!0});else for(const[Y,ce]of Zn)ce&&Iu(Y,!0)},{immediate:!1}),Ue([he,Ee,()=>J()],()=>{var $;($=Oi.refresh)==null||$.call(Oi);for(const[Y,ce]of Zn)zg(Y,ce)},{immediate:!1}),Ue([()=>T.viewportPriority,()=>Et.value.length,Ee],([$,Y,ce])=>{if($!==!1){if(W.value&&(Y<=200||Y<=ce)){W.value=!1;for(const[pe,Ce]of Zn)zg(pe,Ce)}}else W.value=!1}),Ue(()=>Re.value,()=>{kn.value&&$l({immediate:!0})}),Ue([ja,bo,Xi,()=>Et.value.length,kn],()=>{c1()},{immediate:!0});let C1=null,w1=!1,Ff=null;function x1(){C1=null,e4=null,X9=void 0,_f=null,b1()}function w4(){Nf(),Xt(),oi(),ts.clear();const $=Et.value.length;$>0&&vt($),f4()}function x4(){b4(),L7(),v1=null,Xc=null,ed=null,Dg=null,p1=null,g1=null,w1=!1,x1(),q7("restore"),Be(),If()}function S1($){var Y;return[(Y=Rs())!=null?Y:"",ns(),Wa(),Lg.value,k1($),Et.value.length,Math.round(Ho(0,Et.value.length)),Math.round(Qc()),qt.count,Math.round(qt.total)].join(":")}function aC(){return qi(this,null,function*(){var $,Y,ce,pe;const Ce=($=i.virtualScroll)==null?void 0:$.settledToken,Fe=k1(Ce),Pe=ns(),Ve=Rs(),lt=Gr.value;if(mn.value&&((Y=i.virtualScroll)==null?void 0:Y.settleMode)==="manual"&&Ng(Ce))if(t4()){if(S1(Ce)!==_f&&!w1){w1=!0;try{const Ge=yield p4({reason:"manual",expectedSettledTokenKey:Fe}),et=k1()===Fe;h4(Pe,Ve,lt)&&Ge.sessionKey===Pe&&Ge.threadKey===Ve&&et&&Ge.stable&&Ge.phase==="final"&&(_f=S1((ce=i.virtualScroll)==null?void 0:ce.settledToken))}finally{w1=!1,yield bt();const Ge=(pe=i.virtualScroll)==null?void 0:pe.settledToken,et=Ng(Ge)?S1(Ge):"";h4(Pe,Ve,lt)&&et&&_f!==et&&aC()}}}else Hi("manual")})}Ue(mn,($,Y)=>{if($!==Y){if(!$)return x4(),void b4();x4(),w4(),Ff=Gr.value,Hi("content")}},{flush:"post"}),Ue([mn,Gr],([$,Y])=>{$?Ff!=null?Ff!==Y&&(Ff=Y,(function(ce="resize"){Nf(),Xt(),oi(),ts.clear();const pe=Et.value.length;pe>0&&vt(pe),f4(),Xc=null,ed=null,Dg=null,v1=null,w1=!1,x1(),eC(),bt(()=>{qa(),Wo.value&&Ze(),pn.value&&Ef(),Hi(ce)})})("resize")):Ff=Y:Ff=null},{flush:"post",immediate:!0}),Ue([mn,()=>ns(),()=>Rs()],([$])=>{$&&(x4(),w4(),q7("content"),Hi("content"))}),Ue([mn,()=>ns(),()=>Rs(),Gr,()=>Et.value.length],([$])=>{$&&(function(Y="async-node"){let ce=!1;for(const[pe,Ce]of Array.from(fa.entries()))Y9(Ce)||(fa.delete(pe),Vr.delete(pe),ce=!0);ce&&(xf(),Hi(Y))})("async-node")},{flush:"post"}),Ue([mn,()=>{var $;return($=i.virtualScroll)==null?void 0:$.sessionKey},()=>{var $;return($=i.virtualScroll)==null?void 0:$.measurementKey},()=>i.indexKey,()=>U.value],([$])=>{$&&(b1(),(function(Y="content"){if(!mn.value)return;const ce=[],pe=Et.value.length,Ce=q9(pe);for(const Fe of Array.from(ts.keys())){if(Fe>=pe){ce.push(Fe);continue}if(Fe=pe&&ts.delete(Fe);ce.length&&((function(Fe,Pe={}){const Ve=Array.from(Fe,Number);Se(Ve);let lt=0;if(qe(()=>(lt=Ti(Ve,Pe),lt>0)),lt>0)(function(Ge){for(const et of Ge)ts.delete(et)})(Ve);else for(const Ge of Ve)Po.delete(Ge)})(ce,{notify:!1}),oi(),x1(),Wo.value&&Ze(),pn.value&&Ef(),Hi(Y))})("content"))},{flush:"post",immediate:!0}),Ue([mn,()=>Et.value.length,()=>ns(),()=>Rs()],([$,Y,ce,pe],[Ce,Fe,Pe,Ve])=>{$&&Ce&&ce===Pe&&pe===Ve&&Y!==Fe&&x1()},{flush:"post"}),Ue([mn,()=>{var $;return($=i.virtualScroll)==null?void 0:$.heightCache},()=>{var $;return($=i.virtualScroll)==null?void 0:$.heightCacheWidth},()=>{var $;return($=i.virtualScroll)==null?void 0:$.restoreState},()=>{var $;return($=i.virtualScroll)==null?void 0:$.measurementKey},()=>Et.value.length,()=>ns(),ne],()=>{eC()},{flush:"post",immediate:!0}),Ue([mn,()=>{var $;return($=i.virtualScroll)==null?void 0:$.restoreState},()=>{var $;return($=i.virtualScroll)==null?void 0:$.restoreAnchor},()=>{var $;return($=i.virtualScroll)==null?void 0:$.measurementKey},()=>Et.value.length,()=>ns(),ne],$=>qi(null,[$],function*([Y,ce]){if(!Y||!ce)return;yield bt();const pe=(function(){var Ce;const Fe=(Ce=i.virtualScroll)==null?void 0:Ce.restoreAnchor;return Fe==null||Fe===!1?null:Fe===!0?"true":String(Fe)})();d4(ce,{restoreAnchor:pe!=null,restoreToken:pe??void 0})}),{flush:"post",immediate:!0}),Ue([mn,ne,()=>{var $;return($=i.virtualScroll)==null?void 0:$.restoreState},()=>{var $;return($=i.virtualScroll)==null?void 0:$.measurementKey}],([$])=>{var Y;if(!$)return;const ce=(Y=i.virtualScroll)==null?void 0:Y.restoreState;ce&&Xc&&ed==="restore"&&(J7(ce)||(w4(),Xc=null,ed=null,Hi("resize")))},{flush:"post"}),Ue([mn,()=>Et.value.length,()=>ns(),ne],$=>qi(null,[$],function*([Y]){var ce;const pe=p1,Ce=g1;Y&&pe&&(yield bt(),!d4(pe,{restoreAnchor:Ce?.restoreAnchor===!0,restoreToken:(ce=Ce?.restoreToken)!=null?ce:"imperative",allowUncapturedAnchor:Ce?.allowUncapturedAnchor===!0})&&tC(pe)||(p1=null,g1=null))}),{flush:"post",immediate:!0}),Ue([mn,dt,()=>{var $;return($=i.virtualScroll)==null?void 0:$.settleMode},()=>ns(),()=>Rs(),Gr,P9,I7,()=>Re.value,Sg,()=>qt.count,()=>qt.total],([$,Y,ce])=>{if(!$||Y!==!0||ce==="manual"||!n4())return;const pe=(function(){var Ce;const Fe=Et.value.length;return[(Ce=Rs())!=null?Ce:"",ns(),Wa(),Lg.value,Fe,Math.round(Ho(0,Fe)),Math.round(Qc()),qt.count,Math.round(qt.total)].join(":")})();C1!==pe&&(C1=pe,p4({reason:"final"}).then(Ce=>{Ce.stable||C1!==pe||(C1=null)}))},{flush:"post",immediate:!0}),Ue([mn,dt,()=>{var $;return($=i.virtualScroll)==null?void 0:$.settleMode},()=>{var $;return($=i.virtualScroll)==null?void 0:$.settledToken},()=>ns(),()=>Rs(),Gr,P9,I7,()=>Re.value,Sg,()=>Et.value.length,()=>qt.count,()=>qt.total],()=>{aC()},{flush:"post",immediate:!0}),Ue([()=>Et.value.length,kn,bo,Xi,()=>So.start,()=>So.end],([$,Y,ce,pe,Ce,Fe])=>{Ae.value&&An("virtualization",{nodes:$,virtualization:Y,maxLiveNodes:ce,buffer:pe,focusIndex:ja.value,scroll:Y?(()=>{const Pe=Mn.value||be();return Pe?{reverse:Le(Pe),scrollTop:Math.round(Pe.scrollTop),scrollTopAbs:Math.round(Math.abs(Pe.scrollTop)),scrollHeight:Math.round(Pe.scrollHeight),clientHeight:Math.round(Pe.clientHeight)}:null})():null,liveRange:{start:Ce,end:Fe},rendered:Re.value})}),Ue([()=>T.customId],([$],Y,ce)=>{if(!$||wi)return;const pe=(function(Ce,Fe){return Ce?(to.controllers[Ce]=Fe,()=>{to.controllers[Ce]===Fe&&delete to.controllers[Ce]}):()=>{}})($,{captureRestoreAnchor:Je,restoreAnchor:ut,getAnchorDrift:yt,getReport:IH});ce(()=>{pe()})},{immediate:!0}),On(()=>{(function(){if(mn.value)try{qa(),m1();const $=Yc("manual");iC($)&&(D($),v1=$,m4=y1());const Y=Mf($,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});Y&&(P(Y),Y.anchor&&O(Y.anchor),Tf=A1(Y))}catch{}})(),jH(),W9(),at(),lC();for(const $ of _u.values())for(const Y of $)Mg(Y);_u.clear(),Gc.clear(),ts.clear(),C4(),Nf(),K9(),Be(),If(),b4(),F7(),j9()});const HH=bp("ViewportDeferredMermaidBlockNode",Gl({loader:()=>qi(null,null,function*(){try{return(yield Ss(()=>import("./index11-C2Lo5_rs.js"),__vite__mapDeps([9,7]))).default}catch($){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".',$),Nr}}),loadingComponent:JE,delay:0}),JE),WH=bp("ViewportDeferredInfographicBlockNode",Gl({loader:()=>qi(null,null,function*(){try{return(yield Ss(()=>import("./index10-BCKOfVKM.js"),[])).default}catch($){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.',$),Nr}}),loadingComponent:YE,delay:0}),YE),qH=bp("ViewportDeferredD2BlockNode",Gl(()=>qi(null,null,function*(){try{return(yield Ss(()=>import("./index8-DIDKiC87.js"),[])).default}catch($){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".',$),Nr}})),Nr),uC={text:Ms,paragraph:Vd,heading:E9,code_block:r3,list:$h,list_item:Bh,blockquote:Ev,table:Gp,definition_list:Tv,footnote:Lv,footnote_reference:sl,footnote_anchor:Vp,admonition:Bv,vmr_container:Fv,hardbreak:pc,link:mr,image:hc,thematic_break:Nv,math_inline:ua,math_block:nP,strong:pr,emphasis:vr,strikethrough:gr,highlight:rl,insert:Or,subscript:Rr,superscript:zr,emoji:$r,checkbox:il,checkbox_input:il,inline_code:Jo,html_inline:ol,reference:hr,html_block:Zp},UH=F(()=>G9()),cC=F(()=>$E(T.codeBlockProps)),KH=F(()=>$E(T.codeBlockProps,{omit:["langs"]})),dC=F(()=>It(It({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 ae.value=="boolean"?{showTooltips:ae.value}:{}),KH.value)),fC=F(()=>It(bn(It({},dC.value),{langs:T.langs}),cC.value));function hC($){return typeof $=="boolean"?$:void 0}const VH=F(()=>{const $=T.codeBlockProps||{},Y={},ce=hC($.showLineNumbers);ce!==void 0&&(Y.showLineNumbers=ce);const pe=hC($.diffInline);pe!==void 0&&(Y.diffInline=pe);const Ce=(function(Fe){const Pe=Number(Fe);return Number.isFinite(Pe)&&Pe>0?Pe:void 0})($.reservedHeightPx);return Ce!==void 0&&(Y.reservedHeightPx=Ce),Y}),ZH=F(()=>It(It({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,themes:T.themes,langs:T.langs,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof ae.value=="boolean"?{showTooltips:ae.value}:{}),cC.value)),GH=F(()=>It({},T.mermaidProps||{})),pC=F(()=>It({},T.d2Props||{})),QH=F(()=>It({},T.infographicProps||{})),_1=F(()=>({typewriter:f.value,fade:T.fade,customHtmlTags:Ds.value.customHtmlTags})),YH=F(()=>It(It({},_1.value),typeof ae.value=="boolean"?{showTooltip:ae.value}:{})),JH=F(()=>It(It({},_1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{})),XH=F(()=>It(It({},_1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{})),eW=F(()=>It(It({},_1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{}));function tW($){return Array.isArray($.children)&&$.children.length>0}const Og=F(()=>MH.value.map($=>{var Y,ce,pe,Ce,Fe,Pe,Ve,lt;let Ge=(function(xt){var Pt,Gt,sn,en,on,Ln,Rn;if(xt.type!=="code_block")return xt;const Si=xt,Mo=[String((Pt=Si.language)!=null?Pt:""),String((Gt=Si.loading)!=null?Gt:""),String((sn=Si.diff)!=null?sn:""),String((en=Si.code)!=null?en:""),String((on=Si.originalCode)!=null?on:""),String((Ln=Si.updatedCode)!=null?Ln:""),String((Rn=Si.raw)!=null?Rn:"")].join("\0"),co=$s.get(Si);if(co&&co.signature===Mo)return co.node;const zl=It({},Si);return $s.set(Si,{signature:Mo,node:zl}),zl})($.node);const et=Pg(Ge);let rt=yC(Ge,et);if((Ge.type==="html_block"||Ge.type==="html_inline")&&rt===uC[Ge.type]){const xt=Ge,Pt=String((Y=xt.tag)!=null?Y:"").trim().toLowerCase()||_R(xt.content);if(Pt){const Gt=yi.value[Pt];if(fl.value.has(Pt)&&Gt)rt=Gt,Ge=bn(It({},xt),{type:Pt,tag:Pt,content:xCe(xt.content,Pt)});else if(MR((ce=xt.content)!=null?ce:xt.raw,Pt)){const sn=String((Ce=(pe=xt.content)!=null?pe:xt.raw)!=null?Ce:"");Ge.type==="html_inline"?(rt=Ms,Ge={type:"text",content:sn,raw:sn}):(rt=Vd,Ge={type:"paragraph",children:[{type:"text",content:sn,raw:sn}],raw:sn})}}}const He=Ge.type==="code_block"&&g.value==="pre"&&rt===Nr&&!S4(yi.value,et);let tt=It({},(function(xt,Pt,Gt){const sn=Pt??Pg(xt);if(xt.type==="code_block"){const en=sn?S4(yi.value,sn):void 0;if(Gt&&g.value==="pre"&&!en&&Gt===Nr)return VH.value;if(Gt&&sn&&Gt===en)return sn==="mermaid"?mC(xt):sn==="infographic"?vC(xt):sn==="d2"||sn==="d2lang"?pC.value:fC.value;if(Gt&&Gt===yi.value.code_block)return fC.value;if(z7(Gt))return ZH.value}return sn==="mermaid"?mC(xt):sn==="infographic"?vC(xt):sn==="d2"||sn==="d2lang"?pC.value:xt.type==="link"?YH.value:xt.type==="list"?JH.value:xt.type==="blockquote"?XH.value:xt.type==="table"?eW.value:xt.type==="code_block"?dC.value:_1.value})(Ge,et,rt));const mt=Pn.value?wf.value[$.index]:null;Ge.type==="code_block"&&mt?.kind==="code-block"&&(tt=bn(It({},tt),He?{reservedHeightPx:(Fe=mt.height)!=null?Fe:mt.contentHeight}:{estimatedHeightPx:mt.height,estimatedContentHeightPx:mt.contentHeight,estimatedDiffInline:mt.diffInline})),He||Ge.type!=="code_block"||et!=="mermaid"||ph(tt.estimatedPreviewHeightPx)!=null||(tt=bn(It({},tt),{estimatedPreviewHeightPx:iy(ty(String((Pe=Ge.code)!=null?Pe:"")))})),He||Ge.type!=="code_block"||et!=="infographic"||ph(tt.estimatedPreviewHeightPx)!=null||(tt=bn(It({},tt),{estimatedPreviewHeightPx:sy(ny(String((Ve=Ge.code)!=null?Ve:"")))})),Ge.type==="math_block"&&(tt=bn(It({},tt),{cacheScope:ko}));const ft=(function(xt,Pt){const Gt=String(xt.type);return!hg(Gt)&&yi.value[Gt]===Pt})(Ge,rt),Ft=ft?TA(Ge,re.value):void 0;return bn(It({},$),{node:Ge,component:rt,bindings:tt,customBindings:It(It({},Ft??{}),tt),rendersCustomNode:ft,hasSlotChildren:tW(Ge),slotContent:String((lt=Ge.content)!=null?lt:""),isCodeBlock:Ge.type==="code_block",indexKey:`${UH.value}-${$.index}`,vnodeKey:`${EH.value}\0${$.index}\0${Ge.type}`})}));function Pg($){var Y;return $?.type==="code_block"?String((Y=$.language)!=null?Y:"").trim().toLowerCase():""}function S4($,Y){const ce=Y.trim().toLowerCase();if(ce)for(const pe of[ce,_9(ce),zO(ce)]){const Ce=pe&&$[pe];if(Ce)return Ce}}function gC($,Y,ce,pe){var Ce,Fe;const Pe=It({},$.value);return ph(Pe.estimatedPreviewHeightPx)==null&&(Pe.estimatedPreviewHeightPx=pe(ce(String((Ce=Y?.code)!=null?Ce:"")),void 0,Pe.maxHeight==="none"?null:(Fe=ph(Pe.maxHeight))!=null?Fe:void 0)),Pe}function mC($){return gC(GH,$,ty,iy)}function vC($){return gC(QH,$,ny,sy)}function yC($,Y){if(!$)return K8;const ce=yi.value,pe=ce[String($.type)];if($.type==="code_block"){const Ce=Y??Pg($),Fe=Ce?S4(ce,Ce):void 0;return Fe||(g.value==="pre"?ce.code_block||Nr:Ce==="mermaid"?ce.mermaid||HH:Ce==="infographic"?ce.infographic||WH:Ce==="d2"||Ce==="d2lang"?ce.d2||qH:pe||ce.code_block||R7.value)}return pe||uC[String($.type)]||K8}function _4($){s("click",$)}function nW($){var Y;(Y=$.target)!=null&&Y.closest("[data-node-index]")&&s("mouseover",$)}function iW($){var Y;(Y=$.target)!=null&&Y.closest("[data-node-index]")&&s("mouseout",$)}function kC($){s("mouseover",$)}function bC($){s("mouseout",$)}const id=V(null),xr=V(!1),M1=V(null),sW=F(()=>!(T.domMode!=="minimal"||ue.value||T.fade!==!1||f.value||xr.value||rn.value||kn.value||kr.value||$i.value||Es.value||Object.keys(yi.value).length!==0));let I1,Df=null,M4=0,jg=0,Hg=0;const AC=["code_block","admonition","table","math_block","html_block","image","thematic_break"],oW=new Set(AC),CC=[".typewriter-cursor",".height-estimation-probes",...AC.map($=>`[data-node-type="${$}"]`),"script","style"].join(",");function wC($){if(!$||typeof $!="object")return!1;const Y=$.type;return typeof Y=="string"&&oW.has(Y)}function Wg($){var Y,ce;if(!$||typeof $!="object")return 0;const pe=$,Ce=(ce=(Y=pe.raw)!=null?Y:pe.content)!=null?ce:pe.code;if(typeof Ce=="string")return Ce.length;const Fe=pe.children;if(Array.isArray(Fe))return Fe.reduce((Ve,lt)=>Ve+Wg(lt),0);const Pe=pe.items;return Array.isArray(Pe)?Pe.reduce((Ve,lt)=>Ve+Wg(lt),0):0}function qg(){I1&&(clearTimeout(I1),I1=void 0)}function I4(){M4+=1,Df!=null&&(si?.(Df),Df=null)}function E1(){I4(),Eu(),id.value&&(id.value.style.visibility="hidden")}function rW($){var Y;if($.nodeType!==Node.TEXT_NODE||!((Y=$.textContent)!=null?Y:"").trim())return!1;const ce=$.parentElement;return!!ce&&!ce.closest(CC)}function lW($){let Y=$.lastChild;for(;Y;){if(rW(Y))return Y;if(Y.nodeType===Node.ELEMENT_NODE){const ce=Y;if(!ce.matches(CC)&&ce.lastChild){Y=ce.lastChild;continue}}for(;Y&&Y!==$&&!Y.previousSibling;)Y=Y.parentNode;if(!Y||Y===$)break;Y=Y.previousSibling}return null}function xC(){const $=Og.value;for(let Y=$.length-1;Y>=0;Y--){const ce=$[Y];if(!ce||wC(ce.node)||!$g(ce.index))continue;const pe=Zn.get(ce.index);if(!pe)continue;const Ce=lW(pe);if(Ce)return Ce}return null}function Eu(){M1.value&&(M1.value.classList.remove(XE),M1.value=null)}function Ug(){if(d.value!=="simple"||!G||!xr.value||!R.value)return void Eu();const $=xC(),Y=$?(function(ce){var pe;const Ce=(pe=ce.parentElement)==null?void 0:pe.closest(".text-node");return Ce instanceof HTMLElement?Ce:ce.parentElement})($):null;Y!==M1.value&&(Eu(),Y&&(Y.classList.add(XE),M1.value=Y))}function Kg(){if(d.value!=="precise"||!G||!xr.value||Df!=null)return;const $=M4,Y=()=>{Df=null,$===M4&&(function(){var ce,pe;if(d.value!=="precise"||!(G&&xr.value&&R.value&&id.value))return;const Ce=R.value,Fe=id.value;Fe.style.visibility="hidden";const Pe=xC();if(!Pe)return;let Ve=0,lt=0,Ge=20,et=!1;if(Pe?.textContent){const rt=Pe.textContent.length,He=document.createRange();He.setStart(Pe,Math.max(0,rt-1)),He.setEnd(Pe,rt);const tt=typeof He.getClientRects=="function"?He.getClientRects():void 0,mt=(pe=tt?.[tt.length-1])!=null?pe:(ce=Pe.parentElement)==null?void 0:ce.getBoundingClientRect();if(mt){const ft=pt("typewriterCursor.root.getBoundingClientRect",()=>Ce.getBoundingClientRect());Ve=mt.right-ft.left+Ce.scrollLeft,lt=mt.top-ft.top+Ce.scrollTop,Ge=mt.height||Ge,et=!0}He.detach()}et&&(Fe.style.transform=`translate(${Math.max(0,Ve)}px, ${Math.max(0,lt)}px)`,Fe.style.height=`${Ge}px`,Fe.style.visibility="visible")})()};Gi?Df=Gi(Y):Y()}return Ue([ze,()=>i.content,()=>i.nodes,()=>T.typewriter,dt],()=>qi(null,null,function*(){var $,Y;if(!G||ue.value||!oe.value)return;if(dt.value)return xr.value=!1,qg(),void E1();if(($=i.nodes)!=null&&$.length)return xr.value=!1,qg(),E1(),jg=((Y=i.content)!=null?Y:"").length,void(Hg=ze.value.length);const ce=(function(){var Ve,lt;return(Ve=i.nodes)!=null&&Ve.length?i.nodes.reduce((Ge,et)=>Ge+Wg(et),0):((lt=i.content)!=null?lt:"").length})(),pe=(function(){var Ve;return(Ve=i.nodes)!=null&&Ve.length?i.nodes.reduce((lt,Ge)=>lt+Wg(Ge),0):ze.value.length})(),Ce=!wC(Et.value[Et.value.length-1]),Fe=ce>jg,Pe=pe>Hg;if(!f.value||!Ce||!Fe&&!Pe)return f.value&&Ce||(xr.value=!1,E1()),jg=ce,void(Hg=pe);jg=ce,Hg=pe,xr.value=!0,d.value==="precise"&&id.value&&(id.value.style.visibility="hidden"),qg(),yield bt(),d.value==="simple"?Ug():(Eu(),Kg()),I1=setTimeout(()=>{I1=void 0,xr.value=!1},3e3)}),{flush:"post",immediate:!0}),Ue(xr,$=>qi(null,null,function*(){$?(yield bt(),d.value!=="simple"?(Eu(),d.value==="precise"&&Kg()):Ug()):E1()}),{flush:"post"}),Ue(d,()=>qi(null,null,function*(){if(G&&!ue.value&&oe.value&&xr.value){if(yield bt(),d.value==="simple")return I4(),void Ug();Eu(),d.value!=="precise"?E1():Kg()}}),{flush:"post"}),Ue([()=>Re.value,()=>So.start,()=>So.end],()=>qi(null,null,function*(){G&&!ue.value&&oe.value&&xr.value&&(yield bt(),d.value!=="simple"?(Eu(),d.value==="precise"&&Kg()):Ug())}),{flush:"post"}),On(()=>{qg(),I4(),Eu(),Xn.clear()}),($,Y)=>{const ce=Oq("NodeRenderer",!0);return p(ue)?(v(!0),E(Te,{key:0},gt(Og.value,pe=>(v(),E(Te,{key:pe.vnodeKey},[pe.rendersCustomNode?(v(),de(Ls(pe.component),Kn({key:0,ref_for:!0},pe.customBindings,{node:pe.node,loading:pe.node.loading,"index-key":pe.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onClick:_4,onMouseover:kC,onMouseout:bC,onCopy:Y[0]||(Y[0]=Ce=>o(Ce)),onHandleArtifactClick:Y[1]||(Y[1]=Ce=>s("handleArtifactClick",Ce))}),{default:fe(()=>[pe.hasSlotChildren?(v(),de(ce,Kn({key:0,ref_for:!0},ys.value,{nodes:pe.node.children,"index-key":pe.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):pe.slotContent?(v(),de(ce,Kn({key:1,ref_for:!0},ys.value,{content:pe.slotContent,final:!pe.node.loading,"index-key":`${pe.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"])):(v(),de(Ls(pe.component),Kn({key:1,node:pe.node,loading:pe.node.loading,"index-key":pe.indexKey},{ref_for:!0},pe.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onClick:_4,onMouseover:kC,onMouseout:bC,onCopy:Y[2]||(Y[2]=Ce=>o(Ce)),onHandleArtifactClick:Y[3]||(Y[3]=Ce=>s("handleArtifactClick",Ce))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(v(),E("div",{key:1,ref_key:"containerRef",ref:R,class:De(["markstream-vue markdown-renderer",[{dark:T.isDark},{virtualized:kn.value},{"virtual-scroll-coordinated":Bs.value},{"stable-layout":bH.value},{"typewriter-simple-cursor":xr.value&&d.value==="simple"}]]),"data-custom-id":T.customId,onClick:_4,onMouseover:nW,onMouseout:iW},[hn.value||kn.value?(v(),E(Te,{key:0},[hn.value?(v(),de(TLe,{key:0,width:Vn.value,"flow-root":kn.value||Bs.value,"paragraph-node":Ji.value,"list-item-node":lo.value,"list-node":ki.value,"heading-nodes":Bi.value,"set-paragraph-wrapper":AH,"set-list-item-wrapper":CH,"set-list-wrapper":wH,"set-heading-wrapper":_H},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):te("",!0),kn.value?(v(),E("div",{key:1,class:"node-spacer",style:Vt({height:`${V9.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],64)):te("",!0),sW.value?(v(!0),E(Te,{key:1},gt(Og.value,pe=>(v(),E(Te,{key:pe.vnodeKey},[$g(pe.index)?(v(),de(Ls(pe.component),Kn({key:0,node:pe.node,loading:pe.node.loading,"index-key":pe.indexKey},{ref_for:!0},pe.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onMouseover:Y[4]||(Y[4]=Ce=>s("mouseover",Ce)),onMouseout:Y[5]||(Y[5]=Ce=>s("mouseout",Ce)),onCopy:Y[6]||(Y[6]=Ce=>o(Ce)),onHandleArtifactClick:Y[7]||(Y[7]=Ce=>s("handleArtifactClick",Ce))}),null,16,["node","loading","index-key","custom-id","is-dark"])):te("",!0)],64))),128)):(v(!0),E(Te,{key:2},gt(Og.value,pe=>(v(),E("div",{key:pe.vnodeKey,ref_for:!0,ref:Ce=>zg(pe.index,Ce),class:"node-slot","data-node-index":pe.index,"data-node-type":pe.node.type},[$g(pe.index)?(v(),E("div",{key:0,ref_for:!0,ref:Ce=>(function(Fe,Pe){var Ve;Pe||(function(rt){const He=`${G9()}-${rt}`;let tt=!1;for(const mt of Array.from(Vr.keys())){const ft=fa.get(mt);(ft?.index===rt||mt===He||mt.startsWith(`${He}-`))&&(Vr.delete(mt),fa.delete(mt),tt=!0)}tt&&(xf(),Hi("async-node"))})(Fe),Ha.delete(Fe),(function(rt){var He;const tt=((He=Gc.get(rt))!=null?He:0)+1;Gc.set(rt,tt)})(Fe);const lt=_u.get(Fe);if(lt){for(const rt of lt)Mg(rt);_u.delete(Fe)}if((function(rt){const He=Ii.get(rt);He&&(es?.unobserve(He),zi.delete(He),Ii.delete(rt))})(Fe),!Pe||!Oo.value)return da.delete(Fe),void Gc.delete(Fe);da.set(Fe,Pe);const Ge=()=>{Rg(Fe,Pe)};queueMicrotask(Ge);const et=(es||typeof ResizeObserver>"u"||(es=new ResizeObserver(rt=>{if(rt.length)for(const He of rt){const tt=zi.get(He.target),mt=Ii.get(tt??-1);tt!=null&&mt&&Rg(tt,mt)}else qa()})),es);if(et&&(Ii.set(Fe,Pe),zi.set(Pe,Fe),et.observe(Pe)),typeof window<"u"){const rt=((Ve=Et.value[Fe])==null?void 0:Ve.type)==="code_block"?[16,80,240,800]:dt.value?[80]:[];if(rt.length){const He=rt.map(tt=>T7(tt,Ge,"node-resize")).filter(tt=>tt!=null);He.length&&_u.set(Fe,He)}}})(pe.index,Ce),class:"node-content"},[pe.isCodeBlock?pe.rendersCustomNode?(v(),de(Ls(pe.component),Kn({key:1,ref_for:!0},pe.customBindings,{node:pe.node,loading:pe.node.loading,"index-key":pe.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:Y[12]||(Y[12]=Ce=>o(Ce)),onHandleArtifactClick:Y[13]||(Y[13]=Ce=>s("handleArtifactClick",Ce))}),{default:fe(()=>[pe.hasSlotChildren?(v(),de(ce,Kn({key:0,ref_for:!0},ys.value,{nodes:pe.node.children,"index-key":pe.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):pe.slotContent?(v(),de(ce,Kn({key:1,ref_for:!0},ys.value,{content:pe.slotContent,final:!pe.node.loading,"index-key":`${pe.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"])):(v(),de(Ls(pe.component),Kn({key:2,node:pe.node,loading:pe.node.loading,"index-key":pe.indexKey},{ref_for:!0},pe.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:Y[14]||(Y[14]=Ce=>o(Ce)),onHandleArtifactClick:Y[15]||(Y[15]=Ce=>s("handleArtifactClick",Ce))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(v(),de(hs,{key:0,name:"fade",css:T.fade!==!1,appear:T.fade!==!1},{default:fe(()=>[pe.rendersCustomNode?(v(),de(Ls(pe.component),Kn({key:0,ref_for:!0},pe.customBindings,{node:pe.node,loading:pe.node.loading,"index-key":pe.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:Y[8]||(Y[8]=Ce=>o(Ce)),onHandleArtifactClick:Y[9]||(Y[9]=Ce=>s("handleArtifactClick",Ce))}),{default:fe(()=>[pe.hasSlotChildren?(v(),de(ce,Kn({key:0,ref_for:!0},ys.value,{nodes:pe.node.children,"index-key":pe.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):pe.slotContent?(v(),de(ce,Kn({key:1,ref_for:!0},ys.value,{content:pe.slotContent,final:!pe.node.loading,"index-key":`${pe.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"])):(v(),de(Ls(pe.component),Kn({key:1,node:pe.node,loading:pe.node.loading,"index-key":pe.indexKey},{ref_for:!0},pe.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:Y[10]||(Y[10]=Ce=>o(Ce)),onHandleArtifactClick:Y[11]||(Y[11]=Ce=>s("handleArtifactClick",Ce))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(v(),E("div",{key:1,class:"node-placeholder",style:Vt({height:`${eo(pe.index)}px`})},null,4))],8,FLe))),128)),xr.value&&d.value==="precise"?(v(),E("span",{key:3,ref_key:"typewriterCursorRef",ref:id,class:"typewriter-cursor","aria-hidden":"true"},null,512)):te("",!0),kn.value?(v(),E("div",{key:4,class:"node-spacer",style:Vt({height:`${Z9.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],42,NLe))}}})),[["__scopeId","data-v-a9489508"]]),Pr=mP;Pr.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Pr.__name,Pr.name].filter(n=>!!n));for(const n of t)e.component(n,mP)};const qA=Object.freeze(Object.defineProperty({__proto__:null,default:Pr},Symbol.toStringTag,{value:"Module"})),DLe={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"},BLe={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"},$Le={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"},zLe={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"},RLe={class:"admonition-title"},OLe=["aria-expanded","aria-controls"],PLe=["id"],Bv=vi(Xe({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const i=e,s=t,o=F(()=>{if(i.node.title&&i.node.title.trim().length)return i.node.title;const u=i.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=V(!!i.node.collapsible&&!((n=i.node.open)==null||n));function l(){i.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(v(),E("div",{class:De(["admonition",[`admonition-${i.node.kind}`]])},[C("div",{id:a,class:"admonition-legend"},[i.node.kind==="note"||i.node.kind==="info"?(v(),E("svg",DLe,[...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)])])):i.node.kind==="tip"?(v(),E("svg",BLe,[...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)])])):i.node.kind==="warning"||i.node.kind==="caution"?(v(),E("svg",$Le,[...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)])])):i.node.kind==="danger"||i.node.kind==="error"?(v(),E("svg",zLe,[...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",RLe,B(o.value),1),i.node.collapsible?(v(),E("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(v(),E("svg",{style:Vt({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,OLe)):te("",!0)]),$n(C("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[K(p(Pr),{"index-key":`admonition-${e.indexKey}`,nodes:i.node.children,"custom-id":i.customId,typewriter:i.typewriter,fade:i.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,PLe),[[os,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);Bv.install=e=>{e.component(Bv.__name,Bv)};const Y8=()=>Ss(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let Vm=null,Zm=Y8,Gm=null,eT=!1,tT=!1;function Gut(){return qi(this,null,function*(){if(Vm)return Vm;const e=Zm;return e?e===Y8&&eT?null:Gm||(Gm=qi(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===Y8)return e===Zm&&(eT=!0,(function(i){tT||(tT=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',i))})(n)),null;throw n}finally{e===Zm&&(Gm=null)}return e!==Zm?null:t?(Vm=(function(n){var i;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=(i=n.default)!=null?i:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),Vm):null}),Gm):null})}let Qm=null,vP=null,Ym=null;function Qut(){return typeof vP=="function"}function Yut(){return qi(this,null,function*(){if(Qm)return Qm;const e=vP;return e?Ym||(Ym=qi(null,null,function*(){const t=yield e(),n=(function(i){var s,o,r;if(!i)return null;const l=(s=i.default)!=null?s:i,a=typeof l=="function"&&typeof((o=l.prototype)==null?void 0:o.render)=="function"?l:(r=i.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(Qm=n,Qm):null}).finally(()=>{Ym=null}),Ym):null})}const Jut=Symbol("markstreamLanguageIconResolver"),nT=document.createElement("i");function jLe(e){const t="&"+e+";";nT.innerHTML=t;const n=nT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function za(e,t,n,i){const s=e.length;let o=0,r;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)r=Array.from(i),r.unshift(t,n),e.splice(...r);else for(n&&e.splice(t,n);o0?(za(e,e.length,0,t),e):t}const iT={}.hasOwnProperty;function HLe(e){const t={};let n=-1;for(;++n-1&&e.test(String.fromCharCode(n))}}function Ui(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(a){return gi(a)?(e.enter(n),l(a)):t(a)}function l(a){return gi(a)&&o++r))return;const S=t.events.length;let M=S,I,L;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(I){L=t.events[M][1].end;break}I=!0}for(b(i),_=S;_w;){const x=n[k];t.containerState=x[1],x[0].exit.call(t,e)}n.length=w}function A(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function eNe(e,t,n){return Ui(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function oT(e){if(e===null||jr(e)||GLe(e))return 1;if(ZLe(e))return 2}function KA(e,t,n){const i=[];let s=-1;for(;++s1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[i][1].end},f={...e[n][1].start};rT(d,-a),rT(f,a),r={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:a>1?"strong":"emphasis",start:{...r.start},end:{...l.end}},e[i][1].end={...r.start},e[n][1].start={...l.end},u=[],e[i][1].end.offset-e[i][1].start.offset&&(u=Sl(u,[["enter",e[i][1],t],["exit",e[i][1],t]])),u=Sl(u,[["enter",s,t],["enter",r,t],["exit",r,t],["enter",o,t]]),u=Sl(u,KA(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),u=Sl(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Sl(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,za(e,i-1,n-i+3,u),n=i+u.length-c-2;break}}for(n=-1;++n0&&gi(_)?Ui(e,A,"linePrefix",o+1)(_):A(_)}function A(_){return _===null||En(_)?e.check(lT,m,k)(_):(e.enter("codeFlowValue"),w(_))}function w(_){return _===null||En(_)?(e.exit("codeFlowValue"),A(_)):(e.consume(_),w)}function k(_){return e.exit("codeFenced"),t(_)}function x(_,S,M){let I=0;return L;function L(O){return _.enter("lineEnding"),_.consume(O),_.exit("lineEnding"),N}function N(O){return _.enter("codeFencedFence"),gi(O)?Ui(_,T,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):T(O)}function T(O){return O===l?(_.enter("codeFencedFenceSequence"),D(O)):M(O)}function D(O){return O===l?(I++,_.consume(O),D):I>=r?(_.exit("codeFencedFenceSequence"),gi(O)?Ui(_,P,"whitespace")(O):P(O)):M(O)}function P(O){return O===null||En(O)?(_.exit("codeFencedFence"),S(O)):M(O)}}}function fNe(e,t,n){const i=this;return s;function s(r){return r===null?n(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),o)}function o(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}const v3={name:"codeIndented",tokenize:pNe},hNe={partial:!0,tokenize:gNe};function pNe(e,t,n){const i=this;return s;function s(u){return e.enter("codeIndented"),Ui(e,o,"linePrefix",5)(u)}function o(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?r(u):n(u)}function r(u){return u===null?a(u):En(u)?e.attempt(hNe,r,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||En(u)?(e.exit("codeFlowValue"),r(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function gNe(e,t,n){const i=this;return s;function s(r){return i.parser.lazy[i.now().line]?n(r):En(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),s):Ui(e,o,"linePrefix",5)(r)}function o(r){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(r):En(r)?s(r):n(r)}}const mNe={name:"codeText",previous:yNe,resolve:vNe,tokenize:kNe};function vNe(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&K1(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),K1(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),K1(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}function CP(e,t,n,i,s,o,r,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(b){return b===60?(e.enter(i),e.enter(s),e.enter(o),e.consume(b),e.exit(o),f):b===null||b===32||b===41||J8(b)?n(b):(e.enter(i),e.enter(r),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(b))}function f(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(s),e.exit(i),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(e.exit("chunkString"),e.exit(l),f(b)):b===null||b===60||En(b)?n(b):(e.consume(b),b===92?g:h)}function g(b){return b===60||b===62||b===92?(e.consume(b),h):h(b)}function m(b){return!c&&(b===null||b===41||jr(b))?(e.exit("chunkString"),e.exit(l),e.exit(r),e.exit(i),t(b)):c999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in r.parser.constructs?n(h):h===93?(e.exit(o),e.enter(s),e.consume(h),e.exit(s),e.exit(i),t):En(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||En(h)||l++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!gi(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function xP(e,t,n,i,s,o){let r;return l;function l(f){return f===34||f===39||f===40?(e.enter(i),e.enter(s),e.consume(f),e.exit(s),r=f===40?41:f,a):n(f)}function a(f){return f===r?(e.enter(s),e.consume(f),e.exit(s),e.exit(i),t):(e.enter(o),u(f))}function u(f){return f===r?(e.exit(o),a(r)):f===null?n(f):En(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ui(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===r||f===null||En(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===r||f===92?(e.consume(f),c):c(f)}}function Yp(e,t){let n;return i;function i(s){return En(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):gi(s)?Ui(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const MNe={name:"definition",tokenize:ENe},INe={partial:!0,tokenize:TNe};function ENe(e,t,n){const i=this;let s;return o;function o(h){return e.enter("definition"),r(h)}function r(h){return wP.call(i,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return s=UA(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return jr(h)?Yp(e,u)(h):u(h)}function u(h){return CP(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(INe,d,d)(h)}function d(h){return gi(h)?Ui(e,f,"whitespace")(h):f(h)}function f(h){return h===null||En(h)?(e.exit("definition"),i.parser.defined.push(s),t(h)):n(h)}}function TNe(e,t,n){return i;function i(l){return jr(l)?Yp(e,s)(l):n(l)}function s(l){return xP(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return gi(l)?Ui(e,r,"whitespace")(l):r(l)}function r(l){return l===null||En(l)?t(l):n(l)}}const LNe={name:"hardBreakEscape",tokenize:NNe};function NNe(e,t,n){return i;function i(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return En(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const FNe={name:"headingAtx",resolve:DNe,tokenize:BNe};function DNe(e,t){let n=e.length-2,i=3,s,o;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},o={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},za(e,i,n-i+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function BNe(e,t,n){let i=0;return s;function s(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),r(c)}function r(c){return c===35&&i++<6?(e.consume(c),r):c===null||jr(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||En(c)?(e.exit("atxHeading"),t(c)):gi(c)?Ui(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||jr(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const $Ne=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],uT=["pre","script","style","textarea"],zNe={concrete:!0,name:"htmlFlow",resolveTo:PNe,tokenize:jNe},RNe={partial:!0,tokenize:WNe},ONe={partial:!0,tokenize:HNe};function PNe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function jNe(e,t,n){const i=this;let s,o,r,l,a;return u;function u(U){return c(U)}function c(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),d}function d(U){return U===33?(e.consume(U),f):U===47?(e.consume(U),o=!0,m):U===63?(e.consume(U),s=3,i.interrupt?t:z):Sa(U)?(e.consume(U),r=String.fromCharCode(U),y):n(U)}function f(U){return U===45?(e.consume(U),s=2,h):U===91?(e.consume(U),s=5,l=0,g):Sa(U)?(e.consume(U),s=4,i.interrupt?t:z):n(U)}function h(U){return U===45?(e.consume(U),i.interrupt?t:z):n(U)}function g(U){const ne="CDATA[";return U===ne.charCodeAt(l++)?(e.consume(U),l===ne.length?i.interrupt?t:T:g):n(U)}function m(U){return Sa(U)?(e.consume(U),r=String.fromCharCode(U),y):n(U)}function y(U){if(U===null||U===47||U===62||jr(U)){const ne=U===47,le=r.toLowerCase();return!ne&&!o&&uT.includes(le)?(s=1,i.interrupt?t(U):T(U)):$Ne.includes(r.toLowerCase())?(s=6,ne?(e.consume(U),b):i.interrupt?t(U):T(U)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(U):o?A(U):w(U))}return U===45||Jl(U)?(e.consume(U),r+=String.fromCharCode(U),y):n(U)}function b(U){return U===62?(e.consume(U),i.interrupt?t:T):n(U)}function A(U){return gi(U)?(e.consume(U),A):L(U)}function w(U){return U===47?(e.consume(U),L):U===58||U===95||Sa(U)?(e.consume(U),k):gi(U)?(e.consume(U),w):L(U)}function k(U){return U===45||U===46||U===58||U===95||Jl(U)?(e.consume(U),k):x(U)}function x(U){return U===61?(e.consume(U),_):gi(U)?(e.consume(U),x):w(U)}function _(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),a=U,S):gi(U)?(e.consume(U),_):M(U)}function S(U){return U===a?(e.consume(U),a=null,I):U===null||En(U)?n(U):(e.consume(U),S)}function M(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||jr(U)?x(U):(e.consume(U),M)}function I(U){return U===47||U===62||gi(U)?w(U):n(U)}function L(U){return U===62?(e.consume(U),N):n(U)}function N(U){return U===null||En(U)?T(U):gi(U)?(e.consume(U),N):n(U)}function T(U){return U===45&&s===2?(e.consume(U),R):U===60&&s===1?(e.consume(U),q):U===62&&s===4?(e.consume(U),W):U===63&&s===3?(e.consume(U),z):U===93&&s===5?(e.consume(U),H):En(U)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(RNe,X,D)(U)):U===null||En(U)?(e.exit("htmlFlowData"),D(U)):(e.consume(U),T)}function D(U){return e.check(ONe,P,X)(U)}function P(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),O}function O(U){return U===null||En(U)?D(U):(e.enter("htmlFlowData"),T(U))}function R(U){return U===45?(e.consume(U),z):T(U)}function q(U){return U===47?(e.consume(U),r="",j):T(U)}function j(U){if(U===62){const ne=r.toLowerCase();return uT.includes(ne)?(e.consume(U),W):T(U)}return Sa(U)&&r.length<8?(e.consume(U),r+=String.fromCharCode(U),j):T(U)}function H(U){return U===93?(e.consume(U),z):T(U)}function z(U){return U===62?(e.consume(U),W):U===45&&s===2?(e.consume(U),z):T(U)}function W(U){return U===null||En(U)?(e.exit("htmlFlowData"),X(U)):(e.consume(U),W)}function X(U){return e.exit("htmlFlow"),t(U)}}function HNe(e,t,n){const i=this;return s;function s(r){return En(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),o):n(r)}function o(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}function WNe(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(L9,t,n)}}const qNe={name:"htmlText",tokenize:UNe};function UNe(e,t,n){const i=this;let s,o,r;return l;function l(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),a}function a(z){return z===33?(e.consume(z),u):z===47?(e.consume(z),x):z===63?(e.consume(z),w):Sa(z)?(e.consume(z),M):n(z)}function u(z){return z===45?(e.consume(z),c):z===91?(e.consume(z),o=0,g):Sa(z)?(e.consume(z),A):n(z)}function c(z){return z===45?(e.consume(z),h):n(z)}function d(z){return z===null?n(z):z===45?(e.consume(z),f):En(z)?(r=d,q(z)):(e.consume(z),d)}function f(z){return z===45?(e.consume(z),h):d(z)}function h(z){return z===62?R(z):z===45?f(z):d(z)}function g(z){const W="CDATA[";return z===W.charCodeAt(o++)?(e.consume(z),o===W.length?m:g):n(z)}function m(z){return z===null?n(z):z===93?(e.consume(z),y):En(z)?(r=m,q(z)):(e.consume(z),m)}function y(z){return z===93?(e.consume(z),b):m(z)}function b(z){return z===62?R(z):z===93?(e.consume(z),b):m(z)}function A(z){return z===null||z===62?R(z):En(z)?(r=A,q(z)):(e.consume(z),A)}function w(z){return z===null?n(z):z===63?(e.consume(z),k):En(z)?(r=w,q(z)):(e.consume(z),w)}function k(z){return z===62?R(z):w(z)}function x(z){return Sa(z)?(e.consume(z),_):n(z)}function _(z){return z===45||Jl(z)?(e.consume(z),_):S(z)}function S(z){return En(z)?(r=S,q(z)):gi(z)?(e.consume(z),S):R(z)}function M(z){return z===45||Jl(z)?(e.consume(z),M):z===47||z===62||jr(z)?I(z):n(z)}function I(z){return z===47?(e.consume(z),R):z===58||z===95||Sa(z)?(e.consume(z),L):En(z)?(r=I,q(z)):gi(z)?(e.consume(z),I):R(z)}function L(z){return z===45||z===46||z===58||z===95||Jl(z)?(e.consume(z),L):N(z)}function N(z){return z===61?(e.consume(z),T):En(z)?(r=N,q(z)):gi(z)?(e.consume(z),N):I(z)}function T(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),s=z,D):En(z)?(r=T,q(z)):gi(z)?(e.consume(z),T):(e.consume(z),P)}function D(z){return z===s?(e.consume(z),s=void 0,O):z===null?n(z):En(z)?(r=D,q(z)):(e.consume(z),D)}function P(z){return z===null||z===34||z===39||z===60||z===61||z===96?n(z):z===47||z===62||jr(z)?I(z):(e.consume(z),P)}function O(z){return z===47||z===62||jr(z)?I(z):n(z)}function R(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),t):n(z)}function q(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),j}function j(z){return gi(z)?Ui(e,H,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):H(z)}function H(z){return e.enter("htmlTextData"),r(z)}}const VA={name:"labelEnd",resolveAll:GNe,resolveTo:QNe,tokenize:YNe},KNe={tokenize:JNe},VNe={tokenize:XNe},ZNe={tokenize:eFe};function GNe(e){let t=-1;const n=[];for(;++t=3&&(u===null||En(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===s?(e.consume(u),i++,a):(e.exit("thematicBreakSequence"),gi(u)?Ui(e,l,"whitespace")(u):l(u))}}const Mr={continuation:{tokenize:cFe},exit:fFe,name:"list",tokenize:uFe},lFe={partial:!0,tokenize:hFe},aFe={partial:!0,tokenize:dFe};function uFe(e,t,n){const i=this,s=i.events[i.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,r=0;return l;function l(h){const g=i.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!i.containerState.marker||h===i.containerState.marker:X8(h)){if(i.containerState.type||(i.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check($v,n,u)(h):u(h);if(!i.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return X8(h)&&++r<10?(e.consume(h),a):(!i.interrupt||r<2)&&(i.containerState.marker?h===i.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||h,e.check(L9,i.interrupt?n:c,e.attempt(lFe,f,d))}function c(h){return i.containerState.initialBlankLine=!0,o++,f(h)}function d(h){return gi(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function cFe(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(L9,s,o);function s(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ui(e,t,"listItemIndent",i.containerState.size+1)(l)}function o(l){return i.containerState.furtherBlankLines||!gi(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(aFe,t,r)(l))}function r(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ui(e,e.attempt(Mr,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function dFe(e,t,n){const i=this;return Ui(e,s,"listItemIndent",i.containerState.size+1);function s(o){const r=i.events[i.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(o):n(o)}}function fFe(e){e.exit(this.containerState.type)}function hFe(e,t,n){const i=this;return Ui(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const r=i.events[i.events.length-1];return!gi(o)&&r&&r[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const cT={name:"setextUnderline",resolveTo:pFe,tokenize:gFe};function pFe(e,t){let n=e.length,i,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const r={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",r,t]),e.splice(o+1,0,["exit",e[i][1],t]),e[i][1].end={...e[o][1].end}):e[i][1]=r,e.push(["exit",r,t]),e}function gFe(e,t,n){const i=this;let s;return o;function o(u){let c=i.events.length,d;for(;c--;)if(i.events[c][1].type!=="lineEnding"&&i.events[c][1].type!=="linePrefix"&&i.events[c][1].type!=="content"){d=i.events[c][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),s=u,r(u)):n(u)}function r(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===s?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),gi(u)?Ui(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||En(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const mFe={tokenize:vFe};function vFe(e){const t=this,n=e.attempt(L9,i,e.attempt(this.parser.constructs.flowInitial,s,Ui(e,e.attempt(this.parser.constructs.flow,s,e.attempt(CNe,s)),"linePrefix")));return n;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const yFe={resolveAll:_P()},kFe=SP("string"),bFe=SP("text");function SP(e){return{resolveAll:_P(e==="text"?AFe:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],o=n.attempt(s,r,l);return r;function r(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=s[c];let f=-1;if(d)for(;++f-1){const l=r[0];typeof l=="string"?r[0]=l.slice(i):r.shift()}o>0&&r.push(e[s].slice(0,o))}return r}function DFe(e,t){let n=-1;const i=[];let s;for(;++n>1}};Io.from=function(e){if(e instanceof Io)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Io(t)};function MP(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let s=e.child(i),o=t.child(i);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){let r=s.text,l=o.text,a=0;for(;r[a]==l[a];a++)n++;return a&&a0&&f>0&&u[d-1]==c[f-1];)d--,f--,n--,i--;return d&&f&&d=56320&&e<57344}function TP(e){return e>=55296&&e<56320}class Fn{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;it&&i(a,s+l,o||null,r)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),i,s+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,s){let o="",r=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&i&&(r?r=!1:o+=i),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(s[s.length-1]=n.withText(n.text+i.text),o=1);ot)for(let o=0,r=0;rt&&((rn)&&(l.isText?l=l.cut(Math.max(0,t-r),Math.min(l.text.length,n-r)):l=l.cut(Math.max(0,t-r-1),Math.min(l.content.size,n-r-1))),i.push(l),s+=l.nodeSize),r=a}return new Fn(i,s)}cutByIndex(t,n){return t==n?Fn.empty:t==0&&n==this.content.length?this:new Fn(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return s[t]=n,new Fn(s,o)}addToStart(t){return new Fn([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Fn(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t?Jm(n+1,o):Jm(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Fn.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return Fn.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Fn.empty;let n,i=0;for(let s=0;sthis.type.rank&&(n||(n=t.slice(0,s)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;ni.type.rank-s.type.rank),n}}Ki.none=[];class D0 extends Error{}class qn{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=NP(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new qn(i,this.openStart,this.openEnd)}removeBetween(t,n){return new qn(LP(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return qn.empty;let i=n.openStart||0,s=n.openEnd||0;if(typeof i!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new qn(Fn.fromJSON(t,n.content),i,s)}static maxOpen(t,n=!0){let i=0,s=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new qn(t,i,s)}}qn.empty=new qn(Fn.empty,0,0);function LP(e,t,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i),{index:r,offset:l}=e.findIndex(n);if(s==t||o.isText){if(l!=n&&!e.child(r).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(LP(o.content,t-s-1,n-s-1)))}function NP(e,t,n,i,s,o){let{index:r,offset:l}=e.findIndex(t),a=e.maybeChild(r);if(l==t||a.isText)return o&&i<=0&&s<=0&&!o.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=NP(a.content,t-l-1,n,r==0?i-1:0,r==e.childCount-1?s-1:0,a);return u&&e.replaceChild(r,a.copy(u))}function RFe(e,t,n){if(n.openStart>e.depth)throw new D0("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new D0("Inconsistent open depths");return FP(e,t,n,0)}function FP(e,t,n,i){let s=e.index(i),o=e.node(i);if(s==t.index(i)&&i=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Jp(e,t,n,i){let s=(t||e).node(n),o=0,r=t?t.index(n):s.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Zd(e.nodeAfter,i),o++));for(let l=o;ls&&t5(e,t,s+1),r=i.depth>s&&t5(n,i,s+1),l=[];return Jp(null,e,s,l),o&&r&&t.index(s)==n.index(s)?(DP(o,r),Zd(Gd(o,BP(e,t,n,i,s+1)),l)):(o&&Zd(Gd(o,py(e,t,s+1)),l),Jp(t,n,s,l),r&&Zd(Gd(r,py(n,i,s+1)),l)),Jp(i,null,s,l),new Fn(l)}function py(e,t,n){let i=[];if(Jp(null,e,n,i),e.depth>n){let s=t5(e,t,n+1);Zd(Gd(s,py(e,t,n+1)),i)}return Jp(t,null,n,i),new Fn(i)}function OFe(e,t){let n=t.depth-e.openStart,s=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)s=t.node(o).copy(Fn.from(s));return{start:s.resolveNoCache(e.openStart+n),end:s.resolveNoCache(s.content.size-e.openEnd-n)}}class B0{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],s=t.child(n);return i?t.child(n).cut(i):s}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new HFe(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],s=0,o=n;for(let r=t;;){let{index:l,offset:a}=r.content.findIndex(o),u=o-a;if(i.push(r,l,s+a),!u||(r=r.child(l),r.isText))break;o=u-1,s+=a+1}return new B0(n,i,o)}static resolveCached(t,n){let i=fT.get(t);if(i)for(let o=0;ot&&this.nodesBetween(t,n,o=>(i.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),$P(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=Fn.empty,s=0,o=i.childCount){let r=this.contentMatchAt(t).matchFragment(i,s,o),l=r&&r.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=s;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let s=Fn.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};zh.prototype.text=void 0;class gy extends zh{constructor(t,n,i,s){if(super(t,n,null,s),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):$P(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new gy(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new gy(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function $P(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class cf{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new qFe(t,n);if(i.next==null)return cf.empty;let s=zP(i);i.next&&i.err("Unexpected trailing text");let o=YFe(QFe(s));return JFe(o,i),o}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let s=0;s{let o=s+(i.validEnd?"*":" ")+" ";for(let r=0;r"+t.indexOf(i.next[r].next);return o}).join(` +`)}}cf.empty=new cf(!0);class qFe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function zP(e){let t=[];do t.push(UFe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function UFe(e){let t=[];do t.push(KFe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function KFe(e){let t=GFe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=VFe(e,t);else break;return t}function hT(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function VFe(e,t){let n=hT(e),i=n;return e.eat(",")&&(e.next!="}"?i=hT(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function ZFe(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let s=[];for(let o in n){let r=n[o];r.isInGroup(t)&&s.push(r)}return s.length==0&&e.err("No node type or group '"+t+"' found"),s}function GFe(e){if(e.eat("(")){let t=zP(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=ZFe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function QFe(e){let t=[[]];return s(o(e,0),n()),t;function n(){return t.push([])-1}function i(r,l,a){let u={term:a,to:l};return t[r].push(u),u}function s(r,l){r.forEach(a=>a.to=l)}function o(r,l){if(r.type=="choice")return r.exprs.reduce((a,u)=>a.concat(o(u,l)),[]);if(r.type=="seq")for(let a=0;;a++){let u=o(r.exprs[a],l);if(a==r.exprs.length-1)return u;s(u,l=n())}else if(r.type=="star"){let a=n();return i(l,a),s(o(r.expr,a),a),[i(a)]}else if(r.type=="plus"){let a=n();return s(o(r.expr,l),a),s(o(r.expr,a),a),[i(a)]}else{if(r.type=="opt")return[i(l)].concat(o(r.expr,l));if(r.type=="range"){let a=l;for(let u=0;u{e[r].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||s.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new cf(i.indexOf(e.length-1)>-1);for(let r=0;r-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:PP(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new zh(this,this.computeAttrs(t),Fn.from(n),Ki.setFrom(i))}createChecked(t=null,n,i){return n=Fn.from(n),this.checkContent(n),new zh(this,this.computeAttrs(t),n,Ki.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=Fn.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(Fn.empty,!0);return o?new zh(this,t,n.append(o),Ki.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;ni[o]=new WP(o,n,r));let s=n.spec.topNode||"doc";if(!i[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function XFe(e,t,n){let i=n.split("|");return s=>{let o=s===null?"null":typeof s;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${o}`)}}class eDe{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?XFe(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class ZA{constructor(t,n,i,s){this.name=t,this.rank=n,this.schema=i,this.spec=s,this.attrs=HP(t,s.attrs),this.excluded=null;let o=OP(this.attrs);this.instance=o?new Ki(this,o):null}create(t=null){return!t&&this.instance?this.instance:new Ki(this,PP(this.attrs,t))}static compile(t,n){let i=Object.create(null),s=0;return t.forEach((o,r)=>i[o]=new ZA(o,s++,n,r)),i}removeFromSet(t){for(var n=0;n-1}}class tDe{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in t)n[s]=t[s];n.nodes=Io.from(t.nodes),n.marks=Io.from(t.marks||{}),this.nodes=gT.compile(this.spec.nodes,this),this.marks=ZA.compile(this.spec.marks,this);let i=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],r=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=i[r]||(i[r]=cf.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?mT(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:mT(this,r.split(" "))}this.nodeFromJSON=s=>zh.fromJSON(this,s),this.markFromJSON=s=>Ki.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,s){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof gT){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,s)}text(t,n){let i=this.nodes.text;return new gy(i,i.defaultAttrs,t,Ki.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function mT(e,t){let n=[];for(let i=0;i-1)&&n.push(r=a)}if(!r)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}function nDe(e){return e.tag!=null}function iDe(e){return e.style!=null}let sDe=class i5{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(s=>{if(nDe(s))this.tags.push(s);else if(iDe(s)){let o=/[^=]*/.exec(s.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let o=t.nodes[s.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let i=new yT(this,n,!1);return i.addAll(t,Ki.none,n.from,n.to),i.finish()}parseSlice(t,n={}){let i=new yT(this,n,!0);return i.addAll(t,Ki.none,n.from,n.to),qn.maxOpen(i.finish())}matchTag(t,n,i){for(let s=i?this.tags.indexOf(i)+1:0;st.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(r.getAttrs){let a=r.getAttrs(n);if(a===!1)continue;r.attrs=a||void 0}return r}}}static schemaRules(t){let n=[];function i(s){let o=s.priority==null?50:s.priority,r=0;for(;r{i(r=kT(r)),r.mark||r.ignore||r.clearMark||(r.mark=s)})}for(let s in t.nodes){let o=t.nodes[s].spec.parseDOM;o&&o.forEach(r=>{i(r=kT(r)),r.node||r.ignore||r.mark||(r.node=s)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new i5(t,i5.schemaRules(t)))}};const qP={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},oDe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},UP={ol:!0,ul:!0},$0=1,s5=2,Xp=4;function vT(e,t,n){return t!=null?(t?$0:0)|(t==="full"?s5:0):e&&e.whitespace=="pre"?$0|s5:n&~Xp}class Xm{constructor(t,n,i,s,o,r){this.type=t,this.attrs=n,this.marks=i,this.solid=s,this.options=r,this.content=[],this.activeMarks=Ki.none,this.match=o||(r&Xp?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Fn.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,s;return(s=i.findWrapping(t.type))?(this.match=i,s):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&$0)){let i=this.content[this.content.length-1],s;if(i&&i.isText&&(s=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-s[0].length))}}let n=Fn.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Fn.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!qP.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class yT{constructor(t,n,i){this.parser=t,this.options=n,this.isOpen=i,this.open=0,this.localPreserveWS=!1;let s=n.topNode,o,r=vT(null,n.preserveWhitespace,0)|(i?Xp:0);s?o=new Xm(s.type,s.attrs,Ki.none,!0,n.topMatch||s.type.contentMatch,r):i?o=new Xm(null,null,Ki.none,!0,null,r):o=new Xm(t.schema.topNodeType,null,Ki.none,!0,null,r),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let i=t.nodeValue,s=this.top,o=s.options&s5?"full":this.localPreserveWS||(s.options&$0)>0,{schema:r}=this.parser;if(o==="full"||s.inlineContext(t)||/[^ \t\r\n\u000c]/.test(i)){if(o)if(o==="full")i=i.replace(/\r\n?/g,` +`);else if(r.linebreakReplacement&&/[\r\n]/.test(i)&&this.top.findWrapping(r.linebreakReplacement.create())){let l=i.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,i,s){let o,r;if(n.node)if(r=this.parser.schema.nodes[n.node],r.isLeaf)this.insertNode(r.create(n.attrs),i,t.nodeName=="BR")||this.leafFallback(t,i);else{let a=this.enter(r,n.attrs||null,i,n.preserveWhitespace);a&&(o=!0,i=a)}else{let a=this.parser.schema.marks[n.mark];i=i.concat(a.create(n.attrs))}let l=this.top;if(r&&r.isLeaf)this.findInside(t);else if(s)this.addElement(t,i,s);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,i,!1));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,i),this.findAround(t,a,!1)}o&&this.sync(l)&&this.open--}addAll(t,n,i,s){let o=i||0;for(let r=i?t.childNodes[i]:t.firstChild,l=s==null?null:t.childNodes[s];r!=l;r=r.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(r,n);this.findAtPoint(t,o)}findPlace(t,n,i){let s,o;for(let r=this.open,l=0;r>=0;r--){let a=this.nodes[r],u=a.findWrapping(t);if(u&&(!s||s.length>u.length+l)&&(s=u,o=a,!u.length))break;if(a.solid){if(i)break;l+=2}}if(!s)return null;this.sync(o);for(let r=0;r(r.type?r.type.allowsMarkType(u.type):bT(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new Xm(t,n,a,s,null,l)),this.open++,i}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=$0)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let s=i.length-1;s>=0;s--)t+=i[s].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let i=0;i-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),i=this.options.context,s=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(s?0:1),r=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=o;a--)if(r(l-1,a))return!0;return!1}else{let c=a>0||a==0&&s?this.nodes[a].type:i&&a>=o?i.node(a-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return r(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function rDe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let i=t.nodeType==1?t.nodeName.toLowerCase():null;i&&UP.hasOwnProperty(i)&&n?(n.appendChild(t),t=n):i=="li"?n=t:i&&(n=null)}}function lDe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function kT(e){let t={};for(let n in e)t[n]=e[n];return t}function bT(e,t){let n=t.schema.nodes;for(let i in n){let s=n[i];if(!s.allowsMarkType(e))continue;let o=[],r=l=>{o.push(l);for(let a=0;a{if(o.length||r.marks.length){let l=0,a=0;for(;l=0;s--){let o=this.serializeMark(t.marks[s],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,n,i={}){let s=this.marks[t.type.name];return s&&zv(ev(i),s(t,n),null,t.attrs)}static renderSpec(t,n,i=null,s){return typeof n=="string"?{dom:t.createTextNode(n)}:zv(t,n,i,s)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new N9(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=AT(t.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(t){return AT(t.marks)}}function AT(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function ev(e){return e.document||window.document}const CT=new WeakMap;function aDe(e){let t=CT.get(e);return t===void 0&&CT.set(e,t=uDe(e)),t}function uDe(e){let t=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")t||(t=[]),t.push(i);else for(let s=0;s-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let r=s.indexOf(" ");r>0&&(n=s.slice(0,r),s=s.slice(r+1));let l,a=n?e.createElementNS(n,s):e.createElement(s),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(e.createTextNode(f));else{let{dom:h,contentDOM:g}=zv(e,f,n,i);if(a.appendChild(h),g){if(l)throw new RangeError("Multiple content holes");l=g}}}return{dom:a,contentDOM:l}}const KP=65535,VP=Math.pow(2,16);function cDe(e,t){return e+t*VP}function wT(e){return e&KP}function dDe(e){return(e-(e&KP))/VP}const ZP=1,GP=2,Rv=4,QP=8;class xT{constructor(t,n,i){this.pos=t,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&QP)>0}get deletedBefore(){return(this.delInfo&(ZP|Rv))>0}get deletedAfter(){return(this.delInfo&(GP|Rv))>0}get deletedAcross(){return(this.delInfo&Rv)>0}}class Xr{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Xr.empty)return Xr.empty}recover(t){let n=0,i=wT(t);if(!this.inverted)for(let s=0;st)break;let u=this.ranges[l+o],c=this.ranges[l+r],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,h=a+s+(f<0?0:c);if(i)return h;let g=t==(n<0?a:d)?null:cDe(l/3,t-a),m=t==a?GP:t==d?ZP:Rv;return(n<0?t!=a:t!=d)&&(m|=QP),new xT(h,m,g)}s+=c-u}return i?t+s:new xT(t+s,0,null)}touches(t,n){let i=0,s=wT(n),o=this.inverted?2:1,r=this.inverted?1:2;for(let l=0;lt)break;let u=this.ranges[l+o],c=a+u;if(t<=c&&l==s*3)return!0;i+=this.ranges[l+r]-u}return!1}forEach(t){let n=this.inverted?2:1,i=this.inverted?1:2;for(let s=0,o=0;s!r.isAtom||!l.type.allowsMarkType(this.mark.type)?r:r.mark(this.mark.addToSet(r.marks)),s),n.openStart,n.openEnd);return Us.fromReplace(t,this.from,this.to,o)}invert(){return new Bd(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Dd(n.pos,i.pos,this.mark)}merge(t){return t instanceof Dd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Dd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Dd(n.from,n.to,t.markFromJSON(n.mark))}}Xo.jsonID("addMark",Dd);class Bd extends Xo{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=new qn(GA(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),t),n.openStart,n.openEnd);return Us.fromReplace(t,this.from,this.to,i)}invert(){return new Dd(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Bd(n.pos,i.pos,this.mark)}merge(t){return t instanceof Bd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Bd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Bd(n.from,n.to,t.markFromJSON(n.mark))}}Xo.jsonID("removeMark",Bd);class $d extends Xo{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Us.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Us.fromReplace(t,this.pos,this.pos+1,new qn(Fn.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let s=0;si.pos?null:new Rh(n.pos,i.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Rh(n.from,n.to,n.gapFrom,n.gapTo,qn.fromJSON(t,n.slice),n.insert,!!n.structure)}}Xo.jsonID("replaceAround",Rh);function o5(e,t,n){let i=e.resolve(t),s=n-t,o=i.depth;for(;s>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,s--;if(s>0){let r=i.node(o).maybeChild(i.indexAfter(o));for(;s>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,s--}}return!1}function fDe(e,t,n){let i=e.resolve(t);if(!n.content.size)return t;let s=n.content;for(let o=0;o=0;r--){let l=r==i.depth?0:i.pos<=(i.start(r+1)+i.end(r+1))/2?-1:1,a=i.index(r)+(l>0?1:0),u=i.node(r),c=!1;if(o==1)c=u.canReplace(a,a,s);else{let d=u.contentMatchAt(a).findWrapping(s.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?i.pos:l<0?i.before(r+1):i.after(r+1)}return null}class e0 extends Xo{constructor(t,n,i){super(),this.pos=t,this.attr=n,this.value=i}apply(t){let n=t.nodeAt(this.pos);if(!n)return Us.fail("No node at attribute step's position");let i=Object.create(null);for(let o in n.attrs)i[o]=n.attrs[o];i[this.attr]=this.value;let s=n.type.create(i,null,n.marks);return Us.fromReplace(t,this.pos,this.pos+1,new qn(Fn.from(s),0,n.isLeaf?0:1))}getMap(){return Xr.empty}invert(t){return new e0(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e0(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e0(n.pos,n.attr,n.value)}}Xo.jsonID("attr",e0);class my extends Xo{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let s in t.attrs)n[s]=t.attrs[s];n[this.attr]=this.value;let i=t.type.create(n,t.content,t.marks);return Us.ok(i)}getMap(){return Xr.empty}invert(t){return new my(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new my(n.attr,n.value)}}Xo.jsonID("docAttr",my);let R0=class extends Error{};R0=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};R0.prototype=Object.create(Error.prototype);R0.prototype.constructor=R0;R0.prototype.name="TransformError";const A3=Object.create(null);class ws{constructor(t,n,i){this.$anchor=t,this.$head=n,this.ranges=i||[new hDe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;o--){let r=n<0?sh(t.node(0),t.node(o),t.before(o+1),t.index(o),n,i):sh(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,i);if(r)return r}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Na(t.node(0))}static atStart(t){return sh(t,t,0,0,1)||new Na(t)}static atEnd(t){return sh(t,t,t.content.size,t.childCount,-1)||new Na(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=A3[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in A3)throw new RangeError("Duplicate use of selection JSON ID "+t);return A3[t]=n,n.prototype.jsonID=t,n}getBookmark(){return rs.between(this.$anchor,this.$head).getBookmark()}}ws.prototype.visible=!0;class hDe{constructor(t,n){this.$from=t,this.$to=n}}let ST=!1;function _T(e){!ST&&!e.parent.inlineContent&&(ST=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class rs extends ws{constructor(t,n=t){_T(t),_T(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let i=t.resolve(n.map(this.head));if(!i.parent.inlineContent)return ws.near(i);let s=t.resolve(n.map(this.anchor));return new rs(s.parent.inlineContent?s:i,i)}replace(t,n=qn.empty){if(super.replace(t,n),n==qn.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof rs&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new F9(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new rs(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){let s=t.resolve(n);return new this(s,i==n?s:t.resolve(i))}static between(t,n,i){let s=t.pos-n.pos;if((!i||s)&&(i=s>=0?1:-1),!n.parent.inlineContent){let o=ws.findFrom(n,i,!0)||ws.findFrom(n,-i,!0);if(o)n=o.$head;else return ws.near(n,i)}return t.parent.inlineContent||(s==0?t=n:(t=(ws.findFrom(t,-i,!0)||ws.findFrom(t,i,!0)).$anchor,t.pos0?0:1);s>0?r=0;r+=s){let l=t.child(r);if(l.isAtom){if(!o&&di.isSelectable(l))return di.create(e,n-(s<0?l.nodeSize:0))}else{let a=sh(e,l,n+s,s<0?l.childCount:0,s,o);if(a)return a}n+=l.nodeSize*s}return null}function MT(e,t,n){let i=e.steps.length-1;if(i{r==null&&(r=c)}),e.setSelection(ws.near(e.doc.resolve(r),n))}function IT(e,t){return!t||!e?e:e.bind(t)}class tv{constructor(t,n,i){this.name=t,this.init=IT(n.init,i),this.apply=IT(n.apply,i)}}new tv("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new tv("selection",{init(e,t){return e.selection||ws.atStart(t.doc)},apply(e){return e.selection}}),new tv("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,i){return i.selection.$cursor?e.storedMarks:null}}),new tv("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}});function YP(e,t,n){for(let i in e){let s=e[i];s instanceof Function?s=s.bind(t):i=="handleDOMEvents"&&(s=YP(s,t,{})),n[i]=s}return n}class gDe{constructor(t){this.spec=t,this.props={},t.props&&YP(t.props,this,this.props),this.key=t.key?t.key.key:mDe("plugin")}getState(t){return t[this.key]}}const C3=Object.create(null);function mDe(e){return e in C3?e+"$"+ ++C3[e]:(C3[e]=0,e+"$")}const vy="kimi-code://skill/";function JP(e){return e?e.startsWith(vy)&&e.length>vy.length?"skill":e.startsWith("#")||e.startsWith("?")||e.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(e)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test(e)?null:e.endsWith("/")||e.endsWith("\\")||/%5c$/i.test(e)?"folder":"file":null}function Ap(e){const t=e.search(/[#?]/);return t>0?e.slice(0,t):e}function XP(e){let t="";for(const n of e)n.codePointAt(0)>127||/[A-Za-z0-9\-._~]/.test(n)?t+=n:t+=`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`;return t}function vDe(e){const t=e.split("/").map(XP).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function yDe(e){return e.replace(/%/g,"%25").replace(/&/g,"%26").replace(//g,"%3E").replace(/([\\[\]])/g,"\\$1").replace(/\n/g,"%0A").replace(/\r/g,"%0D")}function kDe(e){return e.replace(/\\([\\[\]])/g,"$1").replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function bDe(e){return e.replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function ADe(e,t){const n=t?e.replace(/\\([\\<>])/g,"$1"):e.replace(/\\([\\()])/g,"$1");try{return decodeURIComponent(n)}catch{return n}}function ej(e){const t=e.slice(vy.length);try{return decodeURIComponent(t)}catch{return t}}function YA(e){const t=yDe(e.name);if(e.kind==="skill")return`[${t}](${vy}${XP(e.name)})`;const n=e.kind==="folder"&&!e.path.endsWith("/")&&!e.path.endsWith("\\")?`${e.path}/`:e.path;return`[${t}](${vDe(n)})`}const CDe=new tDe({nodes:{doc:{content:"block+"},paragraph:{group:"block",content:"inline*",toDOM:()=>["p",0],parseDOM:[{tag:"p"}]},text:{group:"inline"},mention:{group:"inline",inline:!0,atom:!0,selectable:!0,attrs:{kind:{},name:{},path:{default:""}},leafText:e=>YA(e.attrs),toDOM:e=>{const t=e.attrs;return["span",{class:`mention-pill mention-${t.kind}`,"data-mention-path":t.path},t.name]}}}}),wDe={extensions:[{disable:{null:["attention","autolink","blockQuote","characterReference","codeFenced","codeIndented","codeText","definition","hardBreakEscape","headingAtx","htmlFlow","htmlText","list","setextUnderline","thematicBreak"]}}]};function JA(e){if(e.includes(` +`)){const a=[];let u=0;for(const c of e.split(` +`)){for(const d of JA(c))a.push({...d,start:d.start+u,end:d.end+u});u+=c.length+1}return a}const t=$Fe(BFe(wDe).document().write(zFe()(e,void 0,!0))),n=[];let i=null,s=!1,o=!1,r=null,l=0;for(const[a,u]of t){if(u.type==="image"){l+=a==="enter"?1:-1;continue}if(l>0)continue;if(a==="enter"){u.type==="label"?i={start:u.start.offset,end:u.end.offset}:u.type==="resource"&&i!==null&&u.start.offset===i.end?(s=!0,o=!1,r=null):u.type==="resourceTitle"&&s?o=!0:u.type==="resourceDestination"&&s&&(r={start:u.start.offset,end:u.end.offset});continue}if(u.type!=="resource"||!s||i===null)continue;s=!1;const{start:c,end:d}=i;i=null;const f=u.end.offset;if(o||e[c]!=="["||r===null)continue;const h=e.slice(c+1,d-1);let g=e.slice(r.start,r.end),m=!1;if(g.startsWith("<")&&(m=!0,g=g.slice(1,-1)),!h||!g)continue;const y=JP(g);if(y!==null)if(y==="skill")n.push({start:c,end:f,attrs:{kind:y,name:ej(g),path:""},rawDest:g});else{const b=ADe(g,m);n.push({start:c,end:f,attrs:{kind:y,name:kDe(h),path:b},rawDest:g})}}return n}function xDe(e){const t=JA(e);if(t.length===0)return[{type:"text",value:e}];const n=[];let i=0;for(const s of t)s.start>i&&n.push({type:"text",value:e.slice(i,s.start)}),n.push({type:"mention",attrs:s.attrs,rawDest:s.rawDest}),i=s.end;return in.attrs.kind==="skill");return t.length===1&&t[0].attrs.name===e.name}function XA(e,t){if(tj(e))return t.revivePill?e.args??"":null;if(e.name.includes(" "))return null;const n=e.args??"";return`/skill:${e.name}${n.length>0?` ${n}`:""}`}function nj(e,t){return XA(e,t)!==null}const bf=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},ij=function(e,t,n,i){return n&&(ET(e,t,n,i,-1)||ET(e,t,n,i,1))},SDe=/^(img|br|input|textarea|hr)$/i;function ET(e,t,n,i,s){for(var o;;){if(e==n&&t==i)return!0;if(t==(s<0?0:yy(e))){let r=e.parentNode;if(!r||r.nodeType!=1||e7(e)||SDe.test(e.nodeName)||e.contentEditable=="false")return!1;t=bf(e)+(s<0?0:1),e=r}else if(e.nodeType==1){let r=e.childNodes[t+(s<0?-1:0)];if(r.nodeType==1&&r.contentEditable=="false")if(!((o=r.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)t+=s;else return!1;else e=r,t=s<0?yy(e):0}else return!1}}function yy(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function _De(e,t,n){for(let i=t==0,s=t==yy(e);i||s;){if(e==n)return!0;let o=bf(e);if(e=e.parentNode,!e)return!1;i=i&&o==0,s=s&&o==yy(e)}}function e7(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const sj=function(e){return e.focusNode&&ij(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function oj(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const Ra=typeof navigator<"u"?navigator:null,TT=typeof document<"u"?document:null,Kc=Ra&&Ra.userAgent||"",r5=/Edge\/(\d+)/.exec(Kc),rj=/MSIE \d/.exec(Kc),l5=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Kc),pg=!!(rj||l5||r5),lj=rj?document.documentMode:l5?+l5[1]:r5?+r5[1]:0,D9=!pg&&/gecko\/(\d+)/i.test(Kc);D9&&+(/Firefox\/(\d+)/.exec(Kc)||[0,0])[1];const a5=!pg&&/Chrome\/(\d+)/.exec(Kc),Vc=!!a5,aj=a5?+a5[1]:0,Af=!pg&&!!Ra&&/Apple Computer/.test(Ra.vendor),t7=Af&&(/Mobile\/\w+/.test(Kc)||!!Ra&&Ra.maxTouchPoints>2),Cl=t7||(Ra?/Mac/.test(Ra.platform):!1),uj=Ra?/Win/.test(Ra.platform):!1,gg=/Android \d/.test(Kc),n7=!!TT&&"webkitFontSmoothing"in TT.documentElement.style,MDe=n7?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function IDe(e,t=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let s=e.docView.nearestDesc(n.focusNode),o=s&&s.size==0,r=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let l=i.resolve(r),a,u;if(sj(n)){for(a=r;s&&!s.node;)s=s.parent;let d=s.node;if(s&&d.isAtom&&di.isSelectable(d)&&s.parent&&!(d.isInline&&_De(n.focusNode,n.focusOffset,s.dom))){let f=s.posBefore;u=new di(r==f?l:i.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=r,f=r;for(let h=0;h{(n.anchorNode!=i||n.anchorOffset!=s)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!cj(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function TDe(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?t.collapse(n.parentNode,bf(n)+1):t.collapse(n,0),!i&&!e.state.selection.visible&&pg&&lj<=11&&(n.disabled=!0,n.disabled=!1)}function LDe(e,t){if(t instanceof di){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(DT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else DT(e)}function DT(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function dj(e,t,n,i){return e.someProp("createSelectionBetween",s=>s(e,t,n))||rs.between(t,n,i)}function NDe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function u5(e,t){let{$anchor:n,$head:i}=e.selection,s=t>0?n.max(i):n.min(i),o=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return o&&ws.findFrom(o,t)}function Ju(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function BT(e,t,n){let i=e.state.selection;if(i instanceof rs)if(n.indexOf("s")>-1){let{$head:s}=i,o=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let r=e.state.doc.resolve(s.pos+o.nodeSize*(t<0?-1:1));return Ju(e,new rs(i.$anchor,r))}else if(i.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let s=u5(e.state,t);return s&&s instanceof di?Ju(e,s):!1}else if(!(Cl&&n.indexOf("m")>-1)){let s=i.$head,o=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter,r;if(!o||o.isText)return!1;let l=t<0?s.pos-o.nodeSize:s.pos;return o.isAtom||(r=e.docView.descAt(l))&&!r.contentDOM?di.isSelectable(o)?Ju(e,new di(t<0?e.state.doc.resolve(s.pos-o.nodeSize):s)):n7?Ju(e,new rs(e.state.doc.resolve(t<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof di&&i.node.isInline)return Ju(e,new rs(t>0?i.$to:i.$from));{let s=u5(e.state,t);return s?Ju(e,s):!1}}}function ky(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function t0(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Zf(e,t){return t<0?FDe(e):DDe(e)}function FDe(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let s,o,r=!1;for(D9&&n.nodeType==1&&i0){if(n.nodeType!=1)break;{let l=n.childNodes[i-1];if(t0(l,-1))s=n,o=--i;else if(l.nodeType==3)n=l,i=n.nodeValue.length;else break}}else{if(fj(n))break;{let l=n.previousSibling;for(;l&&t0(l,-1);)s=n.parentNode,o=bf(l),l=l.previousSibling;if(l)n=l,i=ky(n);else{if(n=n.parentNode,n==e.dom)break;i=0}}}r?c5(e,n,i):s&&c5(e,s,o)}function DDe(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let s=ky(n),o,r;for(;;)if(i{e.state==s&&i7(e)},50)}function $T(e,t){let n=e.state.doc.resolve(t);if(!(Vc||uj)&&n.parent.inlineContent){let s=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),r=(o.top+o.bottom)/2;if(r>s.top&&r1)return o.lefts.top&&r1)return o.left>s.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function zT(e,t,n){let i=e.state.selection;if(i instanceof rs&&!i.empty||n.indexOf("s")>-1||Cl&&n.indexOf("m")>-1)return!1;let{$from:s,$to:o}=i;if(!s.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let r=u5(e.state,t);if(r&&r instanceof di)return Ju(e,r)}if(!s.parent.inlineContent){let r=t<0?s:o,l=i instanceof Na?ws.near(r,t):ws.findFrom(r,t);return l?Ju(e,l):!1}return!1}function RT(e,t){if(!(e.state.selection instanceof rs))return!0;let{$head:n,$anchor:i,empty:s}=e.state.selection;if(!n.sameParent(i))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function OT(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function zDe(e){if(!Af||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let i=t.firstChild;OT(e,i,"true"),setTimeout(()=>OT(e,i,"false"),20)}return!1}function RDe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function ODe(e,t){let n=t.keyCode,i=RDe(t);if(n==8||Cl&&n==72&&i=="c")return RT(e,-1)||Zf(e,-1);if(n==46&&!t.shiftKey||Cl&&n==68&&i=="c")return RT(e,1)||Zf(e,1);if(n==13||n==27)return!0;if(n==37||Cl&&n==66&&i=="c"){let s=n==37?$T(e,e.state.selection.from)=="ltr"?-1:1:-1;return BT(e,s,i)||Zf(e,s)}else if(n==39||Cl&&n==70&&i=="c"){let s=n==39?$T(e,e.state.selection.from)=="ltr"?1:-1:1;return BT(e,s,i)||Zf(e,s)}else{if(n==38||Cl&&n==80&&i=="c")return zT(e,-1,i)||Zf(e,-1);if(n==40||Cl&&n==78&&i=="c")return zDe(e)||zT(e,1,i)||Zf(e,1);if(i==(Cl?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function hj(e,t){e.someProp("transformCopied",h=>{t=h(t,e)});let n=[],{content:i,openStart:s,openEnd:o}=t;for(;s>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){s--,o--;let h=i.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),i=h.content}let r=e.someProp("clipboardSerializer")||N9.fromSchema(e.state.schema),l=kj(),a=l.createElement("div");a.appendChild(r.serializeFragment(i,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=yj[u.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let g=l.createElement(c[h]);for(;a.firstChild;)g.appendChild(a.firstChild);a.appendChild(g),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${s} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,` + +`);return{dom:a,text:f,slice:t}}function pj(e,t,n,i,s){let o=s.parent.type.spec.code,r,l;if(!n&&!t)return null;let a=!!t&&(i||o||!n);if(a){if(e.someProp("transformPastedText",f=>{t=f(t,o||i,e)}),o)return l=new qn(Fn.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0),e.someProp("transformPasted",f=>{l=f(l,e,!0)}),l;let d=e.someProp("clipboardTextParser",f=>f(t,s,i,e));if(d)l=d;else{let f=s.marks(),{schema:h}=e.state,g=N9.fromSchema(h);r=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=r.appendChild(document.createElement("p"));m&&y.appendChild(g.serializeNode(h.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),r=WDe(n),n7&&qDe(r);let u=r&&r.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=r.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;r=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||sDe.fromSchema(e.state.schema)).parseSlice(r,{preserveWhitespace:!!(a||c),context:s,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!PDe.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=UDe(PT(l,+c[1],+c[2]),c[4]);else if(l=qn.maxOpen(jDe(l.content,s),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d{l=d(l,e,a)}),l}const PDe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function jDe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let s=t.node(n).contentMatchAt(t.index(n)),o,r=[];if(e.forEach(l=>{if(!r)return;let a=s.findWrapping(l.type),u;if(!a)return r=null;if(u=r.length&&o.length&&mj(a,o,l,r[r.length-1],0))r[r.length-1]=u;else{r.length&&(r[r.length-1]=vj(r[r.length-1],o.length));let c=gj(l,a);r.push(c),s=s.matchType(c.type),o=a}}),r)return Fn.from(r)}return e}function gj(e,t,n=0){for(let i=t.length-1;i>=n;i--)e=t[i].create(null,Fn.from(e));return e}function mj(e,t,n,i,s){if(s1&&(o=0),s=n&&(l=t<0?r.contentMatchAt(0).fillBefore(l,o<=s).append(l):l.append(r.contentMatchAt(r.childCount).fillBefore(Fn.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,r.copy(l))}function PT(e,t,n){return tn})),x3.createHTML(e)):e}function WDe(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=kj(),i=n.body,s=/<([a-z][^>\s]+)/i.exec(e),o;if((o=s&&yj[s[1].toLowerCase()])&&(e=o.map(r=>"<"+r+">").join("")+e+o.map(r=>"").reverse().join("")),i.innerHTML=HDe(e),o)for(let r=0;r=0;l-=2){let a=n.nodes[i[l]];if(!a||a.hasRequiredAttrs())break;s=Fn.from(a.create(i[l+1],s)),o++,r++}return new qn(s,o,r)}const ca={},cl={};function cu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}cl.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!wj(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(gg&&Vc&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),t7&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();e.input.lastIOSEnter=i,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==i&&(e.someProp("handleKeyDown",s=>s(e,oj(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",i=>i(e,n))||ODe(e,n)?n.preventDefault():cu(e,"key")};cl.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};cl.keypress=(e,t)=>{let n=t;if(wj(e)||!n.charCode||n.ctrlKey&&!n.altKey||Cl&&n.metaKey)return;if(e.someProp("handleKeyPress",s=>s(e,n))){n.preventDefault();return}let i=e.state.selection;if(!(i instanceof rs)||!i.$from.sameParent(i.$to)){let s=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!e.someProp("handleTextInput",r=>r(e,i.$from.pos,i.$to.pos,s,o))&&e.dispatch(o()),n.preventDefault()}};function mg(e){return{left:e.clientX,top:e.clientY}}function KDe(e,t){let n=t.x-e.clientX,i=t.y-e.clientY;return n*n+i*i<100}function s7(e,t,n,i,s){if(i==-1)return!1;let o=e.state.doc.resolve(i);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,l=>r>o.depth?l(e,n,o.nodeAfter,o.before(r),s,!0):l(e,n,o.node(r),o.before(r),s,!1)))return!0;return!1}function vg(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let i=e.state.tr.setSelection(t);i.setMeta("pointer",!0),e.dispatch(i)}function VDe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return i&&i.isAtom&&di.isSelectable(i)?(vg(e,new di(n)),!0):!1}function ZDe(e,t){if(t==-1)return!1;let n=e.state.selection,i,s;n instanceof di&&(i=n.node);let o=e.state.doc.resolve(t);for(let r=o.depth+1;r>0;r--){let l=r>o.depth?o.nodeAfter:o.node(r);if(di.isSelectable(l)){i&&n.$from.depth>0&&r>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?s=o.before(n.$from.depth):s=o.before(r);break}}return s!=null?(vg(e,di.create(e.state.doc,s)),!0):!1}function GDe(e,t,n,i,s){return s7(e,"handleClickOn",t,n,i)||e.someProp("handleClick",o=>o(e,t,i))||(s?ZDe(e,n):VDe(e,n))}function QDe(e,t,n,i){return s7(e,"handleDoubleClickOn",t,n,i)||e.someProp("handleDoubleClick",s=>s(e,t,i))}function YDe(e,t,n,i){return s7(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",s=>s(e,t,i))||JDe(e,n,i)}function JDe(e,t,n){if(n.button!=0)return!1;let i=bj(e,t,!0),s=e.state.doc;return i?(vg(e,i),i instanceof rs&&s.eq(e.state.doc)&&(e.input.mouseDown=new eBe(e,i)),!0):!1}function bj(e,t,n){let i=e.state.doc;if(t==-1)return i.inlineContent?rs.create(i,0,i.content.size):null;let s=i.resolve(t);for(let o=s.depth+1;o>0;o--){let r=o>s.depth?s.nodeAfter:s.node(o),l=s.before(o);if(r.inlineContent)return rs.create(i,l+1,l+1+r.content.size);if(n&&di.isSelectable(r))return di.create(i,l)}return null}function o7(e){return by(e)}const Aj=Cl?"metaKey":"ctrlKey";ca.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let i=o7(e),s=Date.now(),o="singleClick";s-e.input.lastClick.time<500&&KDe(n,e.input.lastClick)&&!n[Aj]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:o,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let r=e.posAtCoords(mg(n));r&&(o=="singleClick"?e.input.mouseDown=new XDe(e,r,n,!!i):(o=="doubleClick"?QDe:YDe)(e,r.pos,r.inside,n)?n.preventDefault():cu(e,"pointer"))};class Cj{constructor(t){this.view=t,this.mightDrag=null,t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(t){this.done()}move(t){t.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class XDe extends Cj{constructor(t,n,i,s){super(t),this.pos=n,this.event=i,this.flushed=s,this.delayedSelectionSync=!1,this.startDoc=t.state.doc,this.selectNode=!!i[Aj],this.allowDefault=i.shiftKey;let o,r;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),r=n.inside;else{let c=t.state.doc.resolve(n.pos);o=c.parent,r=c.depth?c.before():0}const l=s?null:i.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=t.state;i.button==0&&(o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof di&&u.from<=r&&u.to>r)&&(this.mightDrag={node:o,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&D9&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),cu(t,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||i7(this.view)})}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(mg(t))),this.updateAllowDefault(t),this.allowDefault||!n?cu(this.view,"pointer"):GDe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Af&&this.mightDrag&&!this.mightDrag.node.isAtom||Vc&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(vg(this.view,ws.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):cu(this.view,"pointer")}move(t){this.updateAllowDefault(t),cu(this.view,"pointer"),super.move(t)}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}class eBe extends Cj{constructor(t,n){super(t),this.startSelection=n,this.startDoc=t.state.doc}move(t){if(t.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}t.preventDefault(),cu(this.view,"pointer");let n=this.view.posAtCoords(mg(t)),i=n&&bj(this.view,n.inside,!1);if(!i)return;let{doc:s}=this.view.state,o=this.startSelection,[r,l]=i.from{e.input.lastTouch=Date.now(),o7(e),cu(e,"pointer")};ca.touchmove=e=>{e.input.lastTouch=Date.now(),cu(e,"pointer")};ca.contextmenu=e=>o7(e);function wj(e,t){return e.composing?!0:Af&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const tBe=gg?5e3:-1;cl.compositionstart=cl.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof rs&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)||Vc&&uj&&nBe(e)))e.markCursor=e.state.storedMarks||n.marks(),by(e,!0),e.markCursor=null;else if(by(e,!t.selection.empty),D9&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=e.domSelectionRange();for(let s=i.focusNode,o=i.focusOffset;s&&s.nodeType==1&&o!=0;){let r=o<0?s.lastChild:s.childNodes[o-1];if(!r)break;if(r.nodeType==3){let l=e.domSelection();l&&l.collapse(r,r.nodeValue.length);break}else s=r,o=-1}}e.input.composing=!0}xj(e,tBe)};function nBe(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let i=t.childNodes[n];return i.nodeType==1&&i.contentEditable=="false"}cl.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,xj(e,20))};function xj(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>by(e),t))}function iBe(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function by(e,t=!1){if(!(gg&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),iBe(e),t||e.docView&&e.docView.dirty){let n=IDe(e),i=e.state.selection;return n&&!n.eq(i)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!i.$from.node(i.$from.sharedDepth(i.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function sBe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),s=document.createRange();s.selectNodeContents(t),e.dom.blur(),i.removeAllRanges(),i.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const O0=pg&&lj<15||t7&&MDe<604;ca.copy=cl.cut=(e,t)=>{let n=t,i=e.state.selection,s=n.type=="cut";if(i.empty)return;let o=O0?null:n.clipboardData,r=i.content(),{dom:l,text:a}=hj(e,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",a)):sBe(e,l),s&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function oBe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function rBe(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,i=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let s=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),i.parentNode&&i.parentNode.removeChild(i),n?f5(e,i.value,null,s,t):f5(e,i.textContent,i.innerHTML,s,t)},50)}function f5(e,t,n,i,s){let o=pj(e,t,n,i,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,s,o||qn.empty)))return!0;if(!o)return!1;let r=oBe(o),l=r?e.state.tr.replaceSelectionWith(r,i):e.state.tr.replaceSelection(o);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Sj(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}cl.paste=(e,t)=>{let n=t;if(e.composing&&!gg)return;let i=O0?null:n.clipboardData,s=e.input.shiftKey&&e.input.lastKeyCode!=45;i&&f5(e,Sj(i),i.getData("text/html"),s,n)?n.preventDefault():rBe(e,n)};class lBe{constructor(t,n,i){this.slice=t,this.move=n,this.node=i}}const aBe=Cl?"altKey":"ctrlKey";function _j(e,t){let n;return e.someProp("dragCopies",i=>{n=n||i(t)}),n!=null?!n:!t[aBe]}ca.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let s=e.state.selection,o=s.empty?null:e.posAtCoords(mg(n)),r;if(!(o&&o.pos>=s.from&&o.pos<=(s instanceof di?s.to-1:s.to))){if(i&&i.mightDrag)r=di.create(e.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(r=di.create(e.state.doc,d.posBefore))}}let l=(r||e.state.selection).content(),{dom:a,text:u,slice:c}=hj(e,l);(!n.dataTransfer.files.length||!Vc||aj>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(O0?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",O0||n.dataTransfer.setData("text/plain",u),e.dragging=new lBe(c,_j(e,n),r)};ca.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};cl.dragover=cl.dragenter=(e,t)=>t.preventDefault();cl.drop=(e,t)=>{try{uBe(e,t,e.dragging)}finally{e.dragging=null}};function uBe(e,t,n){if(!t.dataTransfer)return;let i=e.posAtCoords(mg(t));if(!i)return;let s=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",h=>{o=h(o,e,!1)}):o=pj(e,Sj(t.dataTransfer),O0?null:t.dataTransfer.getData("text/html"),!1,s);let r=!!(n&&_j(e,t));if(e.someProp("handleDrop",h=>h(e,t,o||qn.empty,r))){t.preventDefault();return}if(!o)return;t.preventDefault();let l=o?fDe(e.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let a=e.state.tr;if(r){let{node:h}=n;h?h.replace(a):a.deleteSelection()}let u=a.mapping.map(l),c=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,o.content.firstChild):a.replaceRange(u,u,o),a.doc.eq(d))return;let f=a.doc.resolve(u);if(c&&di.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))a.setSelection(new di(f));else{let h=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((g,m,y,b)=>h=b),a.setSelection(dj(e,f,a.doc.resolve(h)))}e.focus(),e.dispatch(a.setMeta("uiEvent","drop"))}ca.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&i7(e)},20))};ca.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};ca.beforeinput=(e,t)=>{if(gg&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:i}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=i||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,oj(8,"Backspace")))))return;let{$cursor:s}=e.state.selection;s&&s.pos>0&&e.dispatch(e.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let e in cl)ca[e]=cl[e];function P0(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Ay{constructor(t,n){this.toDOM=t,this.spec=n||Qd,this.side=this.spec.side||0}map(t,n,i,s){let{pos:o,deleted:r}=t.mapResult(n.from+s,this.side<0?-1:1);return r?null:new Ia(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof Ay&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&P0(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class gc{constructor(t,n){this.attrs=t,this.spec=n||Qd}map(t,n,i,s){let o=t.map(n.from+s,this.spec.inclusiveStart?-1:1)-i,r=t.map(n.to+s,this.spec.inclusiveEnd?1:-1)-i;return o>=r?null:new Ia(o,r,this)}valid(t,n){return n.from=t&&(!o||o(l.spec))&&i.push(l.copy(l.from+s,l.to+s))}for(let r=0;rt){let l=this.children[r]+1;this.children[r+2].findInner(t-l,n-l,i,s+l,o)}}map(t,n,i){return this==lr||t.maps.length==0?this:this.mapInner(t,n,0,0,i||Qd)}mapInner(t,n,i,s,o){let r;for(let l=0;l{let u=a+i,c;if(c=Ij(n,l,u)){for(s||(s=this.children.slice());ol&&d.to=t){this.children[l]==t&&(i=this.children[l+2]);break}let o=t+1,r=o+n.content.size;for(let l=0;lo&&a.type instanceof gc){let u=Math.max(o,a.from)-o,c=Math.min(r,a.to)-o;us.map(t,n,Qd));return Id.from(i)}forChild(t,n){if(n.isLeaf)return mo.empty;let i=[];for(let s=0;sn instanceof mo)?t:t.reduce((n,i)=>n.concat(i instanceof mo?i:i.members),[]))}}forEachSet(t){for(let n=0;n{let y=m-g-(h-f);for(let b=0;bA+c-d)continue;let w=l[b]+c-d;h>=w?l[b+1]=f<=w?-2:-1:f>=c&&y&&(l[b]+=y,l[b+1]+=y)}d+=y}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=i.content.size){a=!0;continue}let f=n.map(e[u+1]+o,-1),h=f-s,{index:g,offset:m}=i.content.findIndex(d),y=i.maybeChild(g);if(y&&m==d&&m+y.nodeSize==h){let b=l[u+2].mapInner(n,y,c+1,e[u]+o+1,r);b!=lr?(l[u]=d,l[u+1]=h,l[u+2]=b):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=dBe(l,e,t,n,s,o,r),c=Cy(u,i,0,r);t=c.local;for(let d=0;dn&&r.to{let u=Ij(e,l,a+n);if(u){o=!0;let c=Cy(u,l,n+a+1,i);c!=lr&&s.push(a,a+l.nodeSize,c)}});let r=Mj(o?Ej(e):e,-n).sort(Yd);for(let l=0;l0;)t++;e.splice(t,0,n)}const fBe={sm:14,md:16,lg:20},hBe={file:f8,folder:nz,skill:sz,copy:tz,check:ez,"external-link":iz};function Zh(e,t="md"){const n=fBe[t];return hBe[e].replace(/]*>/,i=>i.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^
      ([\s\S]*?)<\/summary>/,Roe=/([\s\S]*?)<\/resume_hint>/,V4=/]*)>|<\/subagent>/g,Ooe="",Vx=/(completed|failed|aborted):\s*(\d+)/g,Zx=/([a-z_]+)="([^"]*)"/g;function Poe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function joe(e){const t={};Zx.lastIndex=0;let n;for(;(n=Zx.exec(e))!==null;)t[n[1]]=Poe(n[2]);return t}function Hoe(e){const t={completed:0,failed:0,aborted:0};Vx.lastIndex=0;let n;for(;(n=Vx.exec(e))!==null;){const i=n[1];t[i]=Number(n[2])}return t}function Woe(e,t){const n=joe(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function qoe(e){const t=[],n=[];V4.lastIndex=0;let i;for(;(i=V4.exec(e))!==null;)if(i[0]===Ooe){if(n.length===0)continue;const s=n.pop();s&&n.length===0&&t.push(Woe(s.attrs,e.slice(s.bodyStart,i.index)))}else n.length===0?n.push({attrs:i[1]??"",bodyStart:V4.lastIndex}):n.push(null);return t}function Uoe(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` -`):e;if(!t.includes(""))return null;const n=zoe.exec(t)?.[1]?.trim()??"",{completed:i,failed:s,aborted:o}=Hoe(n),r=Roe.exec(t)?.[1]?.trim(),l=qoe(t),a=i+s+o;return{summary:n,completed:i,failed:s,aborted:o,total:a>0?a:l.length,subagents:l,resumeHint:r}}function Koe(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t<0?"":t===0?e[0]:e.slice(0,t)}const Voe=/^[A-Za-z]:[\\/]/;function Gx(e){return Voe.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function Wy(e,t){if(!t)return null;const n=c=>c.replace(/\\/g,"/"),i=n(e);let s=n(t);s.length>1&&(s=s.replace(/\/+$/,""));const o=Gx(s)||Gx(i),r=o?s.toLowerCase():s,l=o?i.toLowerCase():i,a=r.endsWith("/")?r:`${r}/`;if(l!==r&&!l.startsWith(a))return null;const u=l===r?"":i.slice(a.length);return u.split("/").includes("..")?null:u||null}const ev="application/x-kimi-session-row";function Zoe(e,t){return e.includes(t)?e:[...e,t]}function Goe(e,t){return e.includes(t)?e.filter(n=>n!==t):e}function Qoe(e,t){const n=new Set(t),i=new Map,s=[];for(const r of e)n.has(r.id)?i.set(r.id,r):s.push(r);const o=[];for(const r of t){const l=i.get(r);l!==void 0&&o.push(l)}return{pinned:o,unpinned:s}}function Yoe(e,t,n){return e.find(i=>i.window?.duration===t&&i.window?.unit===n)}const Joe=30;function Xoe(e){return e!==void 0&&e0?(l.push(t("settings.planUsage.durationDay",{n:s})),l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):o>0?(l.push(t("settings.planUsage.durationHour",{n:o})),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:i})),t("settings.planUsage.resetsIn",{duration:l.join(" ")})}function mb(e,t){if(t<=0)return"ok";const n=e/t;return n>=.85?"danger":n>=.5?"warn":"ok"}function Qm(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}function ere(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 tre=["kimi","openai","openai_responses","anthropic","google-genai","vertexai"];function om(){return{model:"",maxContextSize:"",displayName:"",capabilities:["tool_use","thinking"],supportEfforts:[],adaptiveThinking:!0}}function vb(e,t){const n=[];for(const i of Object.values(t??{})){if(i===null||typeof i!="object")continue;const s=i;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(o=>typeof o=="string"):[],supportEfforts:Array.isArray(s.supportEfforts)?s.supportEfforts.filter(o=>typeof o=="string"):[],...typeof s.adaptiveThinking=="boolean"?{adaptiveThinking:s.adaptiveThinking}:{}})}return n}const UD=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function nre(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!UD.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 i of e.models){if(i.model.trim()==="")return"modelRequired";const s=i.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function KD(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 ire(e){const t=e.apiKey.trim(),n=e.baseUrl.trim();return{id:e.id.trim(),type:e.type,models:KD(e.models),...t===""?{}:{apiKey:t},...n===""?{}:{baseUrl:n}}}function sre(e,t,n){const i=KD(e.models),s=e.id.trim(),o=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:i,...o===""&&n?.includeBlankApiKey!==!0?{}:{apiKey:o},...r===""?{}:{baseUrl:r},...a!==""&&i.some(u=>u.model===a)?{defaultModel:a}:{}}}function VD(e){return e.id==="managed:kimi-code"&&e.type==="kimi"}const ore=/^(\d+)\t(.*)$/;function rre(e){const t=e.at(-1)===""?e.slice(0,-1):e;if(t.length===0)return null;const n=[],i=[];for(const s of t){const o=ore.exec(s);if(!o)return null;i.push(Number(o[1])),n.push(o[2]??"")}return{contents:n,lineNumbers:i}}function Qx(e,t){let n="",i=t;const s=/^((?:\\\\|\/\/)[^\\/]+[\\/][^\\/]+)/.exec(t),o=/^([a-zA-Z]:)[\\/]?/.exec(t);s?(n=s[1],i=t.slice(s[1].length)):t.startsWith("/")?(n="/",i=t.slice(1)):o&&(n=o[1],i=t.slice(o[0].length));const r=n!=="",l=i.split(/[\\/]+/).filter(Boolean);for(const u of e.split("/"))u===""||u==="."||(u===".."?l.length>0&&l[l.length-1]!==".."?l.pop():r||l.push(".."):l.push(u));const a=l.join("/");return n==="/"?`/${a}`:n!==""?a?`${n}/${a}`:`${n}/`:a}function ZD(e,t){for(const n of e.stateMachineNames){const i=(e.stateMachineInputs(n)??[]).find(s=>s.name===t);if(i!==void 0)return i}return null}function lre(e,t){const n=ZD(e,t);return n!==null&&typeof n.fire=="function"?(n.fire(),!0):!1}function Yx(e,t,n){const i=ZD(e,t);return i!==null&&typeof i.value==typeof n?(i.value=n,!0):!1}const Z4={isPageHidden:()=>typeof document<"u"&&document.hidden,onVisibilityChange:e=>typeof document>"u"?()=>{}:(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),observeIntersection:(e,t)=>{if(typeof IntersectionObserver!="function")return()=>{};const n=new IntersectionObserver(i=>{const s=i[0];s!==void 0&&t(s.isIntersecting)});return n.observe(e),()=>n.disconnect()}};function GD(e,t,n={}){const i=n.isPageHidden??Z4.isPageHidden,s=n.onVisibilityChange??Z4.onVisibilityChange,o=n.observeIntersection??Z4.observeIntersection;let r=!i(),l=!0,a=!1;function u(){const f=!r||!l;f!==a&&(a=f,a?e.pause():e.play())}const c=s(()=>{r=!i(),u()}),d=o(t,f=>{l=f,u()});return u(),()=>{c(),d()}}const are={"&":"&","<":"<",">":">",'"':""","'":"'"};function Jx(e){return e.replace(/[&<>"']/g,t=>are[t]??t)}function ure(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cre(e,t,n=40){const i=e.replace(/\s+/g," ").trim();if(i.length===0)return"";const s=t.trim();if(s.length===0)return Xx(i,n*2);const o=i.toLowerCase().indexOf(s.toLowerCase());if(o<0)return Xx(i,n*2);const r=Math.max(0,o-n),l=Math.min(i.length,o+s.length+n),a=r>0,u=l`${o}`)}const bo="kimi-web.server-credential",dre="token",fre=10080*60*1e3;let fa;const yb=new Set;function hre(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(dre);if(!n)return;const i=new URL(window.location.href);return i.hash="",window.history.replaceState(window.history.state,"",`${i.pathname}${i.search}`),n}function kb(e){return{version:1,credential:e,expiresAt:Date.now()+fre}}function pre(e){return JSON.stringify(e)}function o6(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 bb(e){globalThis.localStorage?.setItem(bo,pre(e))}function gre(){try{const e=globalThis.localStorage?.getItem(bo);if(e){const n=o6(e);if(n===void 0){const i=kb(e);let s=!1;try{bb(i),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(bo)===e&&globalThis.localStorage?.removeItem(bo),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(bo)}catch{}return s?i:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(bo),globalThis.localStorage?.getItem(bo)===e&&globalThis.localStorage?.removeItem(bo);return}const t=globalThis.sessionStorage?.getItem(bo);if(t){const n=kb(t);let i=!1;try{bb(n),i=!0}catch{}try{globalThis.sessionStorage?.removeItem(bo),i=!0}catch{}return i?n:void 0}return}catch{return}}function mre(){const e=hre();return e?(QD(e),!0):(fa=gre(),fa!==void 0)}function vre(){if(fa!==void 0){if(fa.expiresAt<=Date.now()){yre(fa);return}return fa.credential}}function yre(e){fa=void 0;try{globalThis.sessionStorage?.removeItem(bo);const t=globalThis.localStorage?.getItem(bo),n=t==null?void 0:o6(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(bo)}catch{}}function QD(e){const t=kb(e);fa=t;try{bb(t)}catch{}try{globalThis.sessionStorage?.removeItem(bo)}catch{}}function kre(){const e=fa;fa=void 0;try{const t=globalThis.localStorage?.getItem(bo),i=(t==null?void 0:o6(t))?.credential??t;e!==void 0&&i===e.credential&&globalThis.localStorage?.removeItem(bo),globalThis.sessionStorage?.removeItem(bo)}catch{}}function bre(e){return yb.add(e),()=>{yb.delete(e)}}function Are(){kre();for(const e of yb)try{e()}catch{}}function qy(e){return e.approvalCount>0?"awaiting-approval":e.questionCount>0?"awaiting-question":e.pendingInteraction==="approval"?"awaiting-approval":e.pendingInteraction==="question"?"awaiting-question":e.busy?"running":e.lastTurnReason==="failed"?"aborted":e.unread?"unread":"idle"}function eS(e){let t=null;for(const n of e){const i=qy(n);if(i==="awaiting-approval")return"approval";i==="awaiting-question"?t="question":i==="aborted"?t!=="question"&&(t="aborted"):i==="unread"&&t===null&&(t="unread")}return t}let tS;function Cre(e){if(typeof Intl.Segmenter=="function")return tS??=new Intl.Segmenter("und",{granularity:"grapheme"}),tS.segment(e)}const wre=/\p{Emoji_Presentation}/u,xre=/\p{Regional_Indicator}/u,Sre=/\p{Extended_Pictographic}/u,_re="️";function Ire(e){return wre.test(e)||xre.test(e)?!0:Sre.test(e)&&e.includes(_re)}function YD(e){const t=Cre(e)?.[Symbol.iterator]().next().value;if(t===void 0||!Ire(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 Mre(e,t){const{rest:n}=YD(e),i=t?.trim()??"";return i?n?`${i} ${n}`:i:n}function JD(e,t){const n=e.findIndex(o=>o.id===t.id);if(n!==-1&&e[n].updatedAt===t.updatedAt)return e.map(o=>o.id===t.id?t:o);const i=e.filter(o=>o.id!==t.id),s=i.findIndex(o=>o.updatedAt0?i:void 0}catch{return}}function Ere(e){return e===void 0||e.length===0?"/":`${Ab}${encodeURIComponent(e)}`}function e$(){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 Tre(e,t=e$()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyA"||e.key.toLowerCase()==="a")&&!e.defaultPrevented}function Lre(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement&&(e.isContentEditable||e.closest("input, textarea")!==null)}function Nre(e,t){return typeof Element>"u"||!(e instanceof Element)?null:e.closest(t)}function sS(e){e.ownerDocument.getSelection()?.selectAllChildren(e)}function Fre(e,t=e$()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyK"||e.key.toLowerCase()==="k")&&!e.defaultPrevented}function xc(e){return Array.isArray?Array.isArray(e):n$(e)==="[object Array]"}function Dre(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Cb(e){return e==null?"":Dre(e)}function Ho(e){return typeof e=="string"}function Ym(e){return typeof e=="number"}function $re(e){return e===!0||e===!1||Bre(e)&&n$(e)=="[object Boolean]"}function t$(e){return typeof e=="object"}function Bre(e){return t$(e)&&e!==null}function Rr(e){return e!=null}function rm(e){return!e.trim().length}function n$(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zre="Incorrect 'index' type",wb="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Rre=e=>`Invalid value for key ${e}`,Ore=e=>`Pattern length exceeds max of ${e}.`,Pre=e=>`Missing ${e} property in key`,jre=e=>`Property 'weight' in key '${e}' must be a positive integer`,Hre="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",oS=Object.prototype.hasOwnProperty;var Wre=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const i=i$(n);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function i$(e){let t=null,n=null,i=null,s=1,o=null;if(Ho(e)||xc(e))i=e,t=rS(e),n=Jm(e);else{if(!oS.call(e,"name"))throw new Error(Pre("name"));const r=e.name;if(i=r,oS.call(e,"weight")&&e.weight!==void 0&&(s=e.weight,s<=0))throw new Error(jre(Jm(r)));t=rS(r),n=Jm(r),o=e.getFn??null}return{path:t,id:n,weight:s,src:i,getFn:o}}function rS(e){return xc(e)?e:e.split(".")}function Jm(e){return xc(e)?e.join("."):e}function qre(e,t){const n=[];let i=!1;const s=(o,r,l,a)=>{if(Rr(o))if(!r[l])n.push(a!==void 0?{v:o,i:a}:o);else{const u=o[r[l]];if(!Rr(u))return;if(l===r.length-1&&(Ho(u)||Ym(u)||$re(u)||typeof u=="bigint"))n.push(a!==void 0?{v:Cb(u),i:a}:Cb(u));else if(xc(u)){i=!0;for(let c=0,d=u.length;ce.score===t.score?e.idx=9&&e<=13||e===32||e===160}function Qre(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){let o=0,r=!1;for(let a=0;a{this._keysMap[t.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(Ho(this.docs[0]))for(let n=0;ne&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const i of e)Number.isInteger(i)&&i>=0&&t.add(i);if(t.size===0)return;this.records=this.records.filter(i=>!t.has(i.i));const n=Array.from(t).sort((i,s)=>i-s);for(const i of this.records){let s=0,o=n.length;for(;s>>1;n[r]t),records:this.records}}};function s$(e,t,{getFn:n=_n.getFn,fieldNormWeight:i=_n.fieldNormWeight}={}){const s=new r6({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(i$)),s.setSources(t),s.create(),s}function Yre(e,{getFn:t=_n.getFn,fieldNormWeight:n=_n.fieldNormWeight}={}){const{keys:i,records:s}=e,o=new r6({getFn:t,fieldNormWeight:n});return o.setKeys(i),o.setIndexRecords(s),o}function Jre(e=[],t=_n.minMatchCharLength){const n=[];let i=-1,s=-1,o=0;for(let r=e.length;o=t&&n.push([i,s]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}function Xre(e,t,n,{location:i=_n.location,distance:s=_n.distance,threshold:o=_n.threshold,findAllMatches:r=_n.findAllMatches,minMatchCharLength:l=_n.minMatchCharLength,includeMatches:a=_n.includeMatches,ignoreLocation:u=_n.ignoreLocation}={}){if(t.length>32)throw new Error(Ore(32));const c=t.length,d=e.length,f=Math.max(0,Math.min(i,d));let h=o,g=f;const m=(M,$)=>{const D=M/c;if(u)return D;const T=Math.abs(f-$);return s?D+T/s:T?1:D},y=l>1||a,A=y?Array(d):[];let b;for(;(b=e.indexOf(t,g))>-1;){const M=m(0,b);if(h=Math.min(M,h),g=b+c,y){let $=0;for(;$=T;P-=1){const R=P-1,q=n[e[R]];if(O[P]=(O[P+1]<<1|1)&q,M&&(O[P]|=(C[P+1]|C[P])<<1|1|C[P+1]),O[P]&_&&(v=m(M,R),v<=h)){if(h=v,g=R,x=M,g<=f)break;T=Math.max(1,2*f-g)}}if(m(M+1,f)>h)break;C=O}if(y&&g>=0){const M=Math.min(d-1,g+c-1+x);for(let $=g;$<=M;$+=1)n[e[$]]&&(A[$]=1)}const I={isMatch:g>=0,score:Math.max(.001,v)};if(y){const M=Jre(A,l);M.length?a&&(I.indices=M):I.isMatch=!1}return I}function ele(e){const t={};for(let n=0,i=e.length;nn[0]-i[0]||n[1]-i[1]);const t=[e[0]];for(let n=1,i=e.length;ne.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(tle,t=>o$[t]):e=>e;var a6=class{constructor(e,{location:t=_n.location,threshold:n=_n.threshold,distance:i=_n.distance,includeMatches:s=_n.includeMatches,findAllMatches:o=_n.findAllMatches,minMatchCharLength:r=_n.minMatchCharLength,isCaseSensitive:l=_n.isCaseSensitive,ignoreDiacritics:a=_n.ignoreDiacritics,ignoreLocation:u=_n.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:i,includeMatches:s,findAllMatches:o,minMatchCharLength:r,isCaseSensitive:l,ignoreDiacritics:a,ignoreLocation:u},e=l?e:e.toLowerCase(),e=a?s0(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const c=(f,h)=>{this.chunks.push({pattern:f,alphabet:ele(f),startIndex:h})},d=this.pattern.length;if(d>32){let f=0;const h=d%32,g=d-h;for(;f{const{isMatch:A,score:b,indices:C}=Xre(e,g,m,{location:s+y,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});A&&(f=!0),d+=b,A&&C&&c.push(...C)});const h={isMatch:f,score:f?d/this.chunks.length:1};return f&&i&&(h.indices=l6(c)),h}};const nle=new Set(["fuzzy","include"]);function ile(e){return e.startsWith("inverse")}const xb=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n=0,i;const s=[],o=e.length;for(;(i=t.indexOf(e,n))>-1;)n=i+o,s.push([i,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=t.indexOf(e)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new a6(e,{location:t.location??_n.location,threshold:t.threshold??_n.threshold,distance:t.distance??_n.distance,includeMatches:t.includeMatches??_n.includeMatches,findAllMatches:t.findAllMatches??_n.findAllMatches,minMatchCharLength:t.minMatchCharLength??_n.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??_n.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??_n.ignoreDiacritics,ignoreLocation:t.ignoreLocation??_n.ignoreLocation});return{type:"fuzzy",search(i){return n.searchIn(i)}}}}],lS=xb.length,sle="\0",ole="|";function rle(e){const t=[],n=e.length;let i=0;for(;i=n)break;let s=i;for(;s=n||e[o]===" "){s++;break}if(e[o]==="$"&&(o+1>=n||e[o+1]===" ")){s+=2;break}}s++}t.push(e.substring(i,s)),i=s}else{for(;s{const i=rle(n.replace(/\u0000/g,"|").trim()).filter(o=>o&&!!o.trim()),s=[];for(let o=0,r=i.length;o!!(e[nv.AND]||e[nv.OR]),ule=e=>!!e[_b.PATH],cle=e=>!xc(e)&&t$(e)&&!Ib(e),uS=e=>({[nv.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function r$(e,t,{auto:n=!0}={}){const i=s=>{if(Ho(s)){const a={keyId:null,pattern:s};return n&&(a.searcher=tv(s,t)),a}const o=Object.keys(s),r=ule(s);if(!r&&o.length>1&&!Ib(s))return i(uS(s));if(cle(s)){const a=r?s[_b.PATH]:o[0],u=r?s[_b.PATTERN]:s[a];if(!Ho(u))throw new Error(Rre(a));const c={keyId:Jm(a),pattern:u};return n&&(c.searcher=tv(u,t)),c}const l={children:[],operator:o[0]};return o.forEach(a=>{const u=s[a];xc(u)&&u.forEach(c=>{l.children.push(i(c))})}),l};return Ib(e)||(e=uS(e)),i(e)}function Mb(e,{ignoreFieldNorm:t=_n.ignoreFieldNorm}){let n=1;return e.forEach(({key:i,norm:s,score:o})=>{const r=i?i.weight:null;n*=Math.pow(o===0&&r?Number.EPSILON:o,(r||1)*(t?1:s))}),n}function dle(e,{ignoreFieldNorm:t=_n.ignoreFieldNorm}){e.forEach(n=>{n.score=Mb(n.matches,{ignoreFieldNorm:t})})}var fle=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const i=t[e];t[e]=t[n],t[n]=i,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let i=e;do{e=i;const s=2*e+1,o=2*e+2;if(s0&&(i=s),o0&&(i=o),i!==e){const r=t[e];t[e]=t[i],t[i]=r}}while(i!==e)}};function hle(e){const t=[];return e.matches.forEach(n=>{if(!Rr(n.indices)||!n.indices.length)return;const i={indices:n.indices,value:n.value};n.key&&(i.key=n.key.id),n.idx>-1&&(i.refIndex=n.idx),t.push(i)}),t}function ple(e,t,{includeMatches:n=_n.includeMatches,includeScore:i=_n.includeScore}={}){return e.map(s=>{const{idx:o}=s,r={item:t[o],refIndex:o};return n&&(r.matches=hle(s)),i&&(r.score=s.score),r})}const gle=/[\p{L}\p{M}\p{N}_]+/gu,cS=new WeakSet;function mle(e){cS.has(e)||(cS.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function vle(e){if(typeof e=="function"){let t=!1;return n=>{const i=e(n);if(!t&&(t=!0,!Array.isArray(i)||i.some(s=>typeof s!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(i)?"array containing non-strings":typeof i}.`);return i}}return e instanceof RegExp?(e.global||mle(e),t=>t.match(e)||[]):t=>t.match(gle)||[]}function Eb({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const i=vle(n);return{tokenize(s){return e||(s=s.toLowerCase()),t&&(s=s0(s)),i(s)}}}var yle=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Eb({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:i,fieldCount:s}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const o of n){this.termSearchers.push(new a6(o,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=i.get(o)||0,l=Math.log(1+(s-r+.5)/(r+.5));this.idfWeights.push(l)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,i=0,s=0,o=0;const r=this.combineAll&&!this.useMask?new Set:null;for(let u=0;u0?1-n/i:0,a={isMatch:!0,score:Math.max(.001,l)};return this.options.includeMatches&&t.length&&(a.indices=l6(t)),this.combineAll&&(this.useMask?a.matchedMask=o:a.matchedTerms=r,a.termCount=this.numTerms),a}};function G4(e,t,n,i){const s=i.tokenize(t);if(!s.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const o=new Set(s);let r=e.docTermFieldHits.get(n);r||(r=new Map,e.docTermFieldHits.set(n,r));for(const l of o)r.set(l,(r.get(l)||0)+1),e.df.set(l,(e.df.get(l)||0)+1)}function l$(e,t,n,i){const{i:s,v:o,$:r}=t;if(o!==void 0){G4(e,o,s,i);return}if(r)for(let l=0;ll-a);for(const l of n)Ale(e,l);const i=l=>{let a=0,u=n.length;for(;a>>1;n[c]s?i(l):l,a);e.docFieldCount=o;const r=new Map;for(const[l,a]of e.docTermFieldHits)r.set(l>s?i(l):l,a);e.docTermFieldHits=r}var Sc=class{constructor(e,t,n){this.options={..._n,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Wre(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=tv(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof r6))throw new Error(zre);if(this._myIndex=t||s$(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=Eb({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=kle(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(e){if(!Rr(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const n=Eb({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});ble(this._invertedIndex,t,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let i=0,s=this._docs.length;i!i.has(o)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(wb);this._invertedIndex&&dS(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:i,includeScore:s,shouldSort:o,sortFn:r,ignoreFieldNorm:l}=this.options;if(Ho(e)&&!e.trim()){let f=this._docs.map((h,g)=>({item:h,refIndex:g}));return Ym(n)&&n>-1&&(f=f.slice(0,n)),f}const a=o&&Ym(n)&&n>0&&Ho(e),u=r,c=(f,h)=>u(f,h)||f.idx-h.idx;let d;if(a){const f=new fle(n,c);Ho(this._docs[0])?this._searchStringList(e,{heap:f,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:f,ignoreFieldNorm:l}),d=f.extractSorted()}else d=Ho(e)?Ho(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),dle(d,{ignoreFieldNorm:l}),o&&d.sort(Ho(e)?c:u),Ym(n)&&n>-1&&(d=d.slice(0,n));return ple(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=t?null:[];return o.forEach(({v:l,i:a,n:u})=>{if(!Rr(l))return;const c=i.searchIn(l);if(c.isMatch){const d={score:c.score,value:l,norm:u,indices:c.indices};s&&(d.matchedMask=c.matchedMask,d.matchedTerms=c.matchedTerms,d.termCount=c.termCount);const f=[d];if(!s||this._coversAllTokens(f)){const h={item:l,idx:a,matches:f};t?(h.score=Mb(h.matches,{ignoreFieldNorm:n}),t.insert(h)):r.push(h)}}}),r}_searchLogical(e){const t=r$(e,this.options),n=this._normalizedKeys(),i=(l,a,u)=>{if(!("children"in l)){const{keyId:h,searcher:g}=l;let m;return h===null?(m=[],n.forEach((y,A)=>{m.push(...this._findMatches({key:y,value:a[A],searcher:g}))})):m=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(a,h),searcher:g}),m&&m.length?[{idx:u,item:a,matches:m}]:[]}const{children:c,operator:d}=l,f=[];for(let h=0,g=c.length;h{if(Rr(l)){const u=i(t,l,a);u.length&&(o.has(a)||(o.set(a,{idx:a,item:l,matches:[]}),r.push(o.get(a))),u.forEach(({matches:c})=>{o.get(a).matches.push(...c)}))}}),r}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=this._normalizedKeys(),l=t?null:[];return o.forEach(({$:a,i:u})=>{if(!Rr(a))return;const c=[];let d=!1,f=!1;if(r.forEach((h,g)=>{const m=this._findMatches({key:h,value:a[g],searcher:i});m.length?(c.push(...m),m[0].hasInverse&&(f=!0)):d=!0}),!(f&&d)&&c.length&&(!s||this._coversAllTokens(c))){const h={idx:u,item:a,matches:c};t?(h.score=Mb(h.matches,{ignoreFieldNorm:n}),t.insert(h)):l.push(h)}}),l}_findMatches({key:e,value:t,searcher:n}){if(!Rr(t))return[];const i=[];if(xc(t))t.forEach(({v:s,i:o,n:r})=>{if(!Rr(s))return;const l=n.searchIn(s);if(l.isMatch){const a={score:l.score,key:e,value:s,idx:o,norm:r,indices:l.indices,hasInverse:l.hasInverse};l.termCount!==void 0&&(a.matchedMask=l.matchedMask,a.matchedTerms=l.matchedTerms,a.termCount=l.termCount),i.push(a)}});else{const{v:s,n:o}=t,r=n.searchIn(s);if(r.isMatch){const l={score:r.score,key:e,value:s,norm:o,indices:r.indices,hasInverse:r.hasInverse};r.termCount!==void 0&&(l.matchedMask=r.matchedMask,l.matchedTerms=r.matchedTerms,l.termCount=r.termCount),i.push(l)}}return i}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let i=0;for(let s=0;su6(t))};var Cle=Sc;const wle=/^[\uD800-\uDBFF]$/,xle=/^[\uDC00-\uDFFF]$/,Sle=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var fS;(function(e){e[e.Unknown=1e-13]="Unknown",e[e.Rule=1e-12]="Rule",e[e.DICT=2e-8]="DICT",e[e.Surname=1]="Surname",e[e.Custom=1]="Custom"})(fS||(fS={}));const Yr={Normal:1,Surname:10,Custom:100};function Nl(e){var t;return e.length-(((t=e.match(Sle))===null||t===void 0?void 0:t.length)||0)}function Tb(e){const t=[];let n=0;for(;n1)return this.StringDICT.get(t);{const n=t.charCodeAt(0);return this.NumberDICT[n]}}set(t,n){if(t.length>1)this.StringDICT.set(t,n);else{const i=t.charCodeAt(0);this.NumberDICT[i]=n}}clear(){this.NumberDICT=[],this.StringDICT.clear()}}const _le=["zh","ch","sh","z","c","s","b","p","m","f","d","t","n","l","g","k","h","j","q","x","r","y","w",""],Ile=["j","q","x"],Mle=["uān","uán","uǎn","uàn","uan","uē","ué","uě","uè","ue","ūn","ún","ǔn","ùn","un","ū","ú","ǔ","ù","u"],Ele={uān:"üān",uán:"üán",uǎn:"üǎn",uàn:"üàn",uan:"üan",uē:"üē",ué:"üé",uě:"üě",uè:"üè",ue:"üe",ūn:"ǖn",ún:"ǘn",ǔn:"ǚn",ùn:"ǜn",un:"ün",ū:"ǖ",ú:"ǘ",ǔ:"ǚ",ù:"ǜ",u:"ü"},Tle=["ia","ian","iang","iao","ie","iu","iong","ua","uai","uan","uang","ue","ui","uo","üan","üe","van","ve"],hS={一:"yì",二:"èr",三:"sān",四:"sì",五:"wǔ",六:"liù",七:"qī",八:"bā",九:"jiǔ",十:"shí",百:"bǎi",千:"qiān",万:"wàn",亿:"yì",单:"dān",两:"liǎng",双:"shuāng",多:"duō",几:"jǐ",十一:"shí yī",零一:"líng yī",第一:"dì yī",一十:"yī shí",一十一:"yī shí yī"},pS={重:"chóng",行:"háng",斗:"dǒu",更:"gēng"};function Lle(){const e={零一:"líng yī","〇一":"líng yī",十一:"shí yī",一十:"yī shí",第一:"dì yī",一十一:"yī shí yī"};for(let t in hS)for(let n in pS){const i=`${t}${n}`,s=`${hS[t]} ${pS[n]}`;e[i]=s}return e}const gS=Lle(),Nle=Object.keys(gS).map(e=>({zh:e,pinyin:gS[e],probability:1e-12,length:Nl(e),priority:Yr.Normal,dict:Symbol("rule")})),u$={不:{bú:[4]},一:{yí:[4],yì:[1,2,3]}},Fle={不:["的","而","之","后","也","还","地"],一:["的","而","之","后","也","还","是"]},Dle=Object.keys(u$),Lb={南宫:"nán gōng",第五:"dì wǔ",万俟:"mò qí",司马:"sī mǎ",上官:"shàng guān",欧阳:"ōu yáng",夏侯:"xià hóu",诸葛:"zhū gě",闻人:"wén rén",东方:"dōng fāng",赫连:"hè lián",皇甫:"huáng fǔ",尉迟:"yù chí",公羊:"gōng yáng",澹台:"tán tái",公冶:"gōng yě",宗政:"zōng zhèng",濮阳:"pú yáng",淳于:"chún yú",太叔:"tài shū",申屠:"shēn tú",公孙:"gōng sūn",仲孙:"zhòng sūn",轩辕:"xuān yuán",令狐:"líng hú",钟离:"zhōng lí",宇文:"yǔ wén",长孙:"zhǎng sūn",慕容:"mù róng",鲜于:"xiān yú",闾丘:"lǘ qiū",司徒:"sī tú",司空:"sī kōng",亓官:"qí guān",司寇:"sī kòu",仉督:"zhǎng dū",子车:"zǐ jū",颛孙:"zhuān sūn",端木:"duān mù",巫马:"wū mǎ",公西:"gōng xī",漆雕:"qī diāo",乐正:"yuè zhèng",壤驷:"rǎng sì",公良:"gōng liáng",拓跋:"tuò bá",夹谷:"jiá gǔ",宰父:"zǎi fǔ",榖梁:"gǔ liáng",段干:"duàn gān",百里:"bǎi lǐ",东郭:"dōng guō",南门:"nán mén",呼延:"hū yán",羊舌:"yáng shé",梁丘:"liáng qiū",左丘:"zuǒ qiū",东门:"dōng mén",西门:"xī mén",句龙:"gōu lóng",毌丘:"guàn qiū",赵:"zhào",钱:"qián",孙:"sūn",李:"lǐ",周:"zhōu",吴:"wú",郑:"zhèng",王:"wáng",冯:"féng",陈:"chén",褚:"chǔ",卫:"wèi",蒋:"jiǎng",沈:"shěn",韩:"hán",杨:"yáng",朱:"zhū",秦:"qín",尤:"yóu",许:"xǔ",何:"hé",吕:"lǚ",施:"shī",张:"zhāng",孔:"kǒng",曹:"cáo",严:"yán",华:"huà",金:"jīn",魏:"wèi",陶:"táo",姜:"jiāng",戚:"qī",谢:"xiè",邹:"zōu",喻:"yù",柏:"bǎi",水:"shuǐ",窦:"dòu",章:"zhāng",云:"yún",苏:"sū",潘:"pān",葛:"gě",奚:"xī",范:"fàn",彭:"péng",郎:"láng",鲁:"lǔ",韦:"wéi",昌:"chāng",马:"mǎ",苗:"miáo",凤:"fèng",花:"huā",方:"fāng",俞:"yú",任:"rén",袁:"yuán",柳:"liǔ",酆:"fēng",鲍:"bào",史:"shǐ",唐:"táng",费:"fèi",廉:"lián",岑:"cén",薛:"xuē",雷:"léi",贺:"hè",倪:"ní",汤:"tāng",滕:"téng",殷:"yīn",罗:"luó",毕:"bì",郝:"hǎo",邬:"wū",安:"ān",常:"cháng",乐:"yuè",于:"yú",时:"shí",傅:"fù",皮:"pí",卞:"biàn",齐:"qí",康:"kāng",伍:"wǔ",余:"yú",元:"yuán",卜:"bǔ",顾:"gù",孟:"mèng",平:"píng",黄:"huáng",和:"hé",穆:"mù",萧:"xiāo",尹:"yǐn",姚:"yáo",邵:"shào",湛:"zhàn",汪:"wāng",祁:"qí",毛:"máo",禹:"yǔ",狄:"dí",米:"mǐ",贝:"bèi",明:"míng",臧:"zāng",计:"jì",伏:"fú",成:"chéng",戴:"dài",谈:"tán",宋:"sòng",茅:"máo",庞:"páng",熊:"xióng",纪:"jǐ",舒:"shū",屈:"qū",项:"xiàng",祝:"zhù",董:"dǒng",梁:"liáng",杜:"dù",阮:"ruǎn",蓝:"lán",闵:"mǐn",席:"xí",季:"jì",麻:"má",强:"qiáng",贾:"jiǎ",路:"lù",娄:"lóu",危:"wēi",江:"jiāng",童:"tóng",颜:"yán",郭:"guō",梅:"méi",盛:"shèng",林:"lín",刁:"diāo",钟:"zhōng",徐:"xú",邱:"qiū",骆:"luò",高:"gāo",夏:"xià",蔡:"cài",田:"tián",樊:"fán",胡:"hú",凌:"líng",霍:"huò",虞:"yú",万:"wàn",支:"zhī",柯:"kē",昝:"zǎn",管:"guǎn",卢:"lú",莫:"mò",经:"jīng",房:"fáng",裘:"qiú",缪:"miào",干:"gān",解:"xiè",应:"yīng",宗:"zōng",丁:"dīng",宣:"xuān",贲:"bēn",邓:"dèng",郁:"yù",单:"shàn",杭:"háng",洪:"hóng",包:"bāo",诸:"zhū",左:"zuǒ",石:"shí",崔:"cuī",吉:"jí",钮:"niǔ",龚:"gōng",程:"chéng",嵇:"jī",邢:"xíng",滑:"huá",裴:"péi",陆:"lù",荣:"róng",翁:"wēng",荀:"xún",羊:"yáng",於:"yū",惠:"huì",甄:"zhēn",曲:"qū",家:"jiā",封:"fēng",芮:"ruì",羿:"yì",储:"chǔ",靳:"jìn",汲:"jí",邴:"bǐng",糜:"mí",松:"sōng",井:"jǐng",段:"duàn",富:"fù",巫:"wū",乌:"wū",焦:"jiāo",巴:"bā",弓:"gōng",牧:"mù",隗:"wěi",山:"shān",谷:"gǔ",车:"chē",侯:"hóu",宓:"mì",蓬:"péng",全:"quán",郗:"xī",班:"bān",仰:"yǎng",秋:"qiū",仲:"zhòng",伊:"yī",宫:"gōng",宁:"nìng",仇:"qiú",栾:"luán",暴:"bào",甘:"gān",钭:"tǒu",厉:"lì",戎:"róng",祖:"zǔ",武:"wǔ",符:"fú",刘:"liú",景:"jǐng",詹:"zhān",束:"shù",龙:"lóng",叶:"yè",幸:"xìng",司:"sī",韶:"sháo",郜:"gào",黎:"lí",蓟:"jì",薄:"bó",印:"yìn",宿:"sù",白:"bái",怀:"huái",蒲:"pú",邰:"tái",从:"cóng",鄂:"è",索:"suǒ",咸:"xián",籍:"jí",赖:"lài",卓:"zhuó",蔺:"lìn",屠:"tú",蒙:"méng",池:"chí",乔:"qiáo",阴:"yīn",鬱:"yù",胥:"xū",能:"nài",苍:"cāng",双:"shuāng",闻:"wén",莘:"shēn",党:"dǎng",翟:"zhái",谭:"tán",贡:"gòng",劳:"láo",逄:"páng",姬:"jī",申:"shēn",扶:"fú",堵:"dǔ",冉:"rǎn",宰:"zǎi",郦:"lì",雍:"yōng",郤:"xì",璩:"qú",桑:"sāng",桂:"guì",濮:"pú",牛:"niú",寿:"shòu",通:"tōng",边:"biān",扈:"hù",燕:"yān",冀:"jì",郏:"jiá",浦:"pǔ",尚:"shàng",农:"nóng",温:"wēn",别:"bié",庄:"zhuāng",晏:"yàn",柴:"chái",瞿:"qú",阎:"yán",充:"chōng",慕:"mù",连:"lián",茹:"rú",习:"xí",宦:"huàn",艾:"ài",鱼:"yú",容:"róng",向:"xiàng",古:"gǔ",易:"yì",慎:"shèn",戈:"gē",廖:"liào",庾:"yǔ",终:"zhōng",暨:"jì",居:"jū",衡:"héng",步:"bù",都:"dū",耿:"gěng",满:"mǎn",弘:"hóng",匡:"kuāng",国:"guó",文:"wén",寇:"kòu",广:"guǎng",禄:"lù",阙:"quē",东:"dōng",欧:"ōu",殳:"shū",沃:"wò",利:"lì",蔚:"wèi",越:"yuè",夔:"kuí",隆:"lóng",师:"shī",巩:"gǒng",厍:"shè",聂:"niè",晁:"cháo",勾:"gōu",敖:"áo",融:"róng",冷:"lěng",訾:"zī",辛:"xīn",阚:"kàn",那:"nā",简:"jiǎn",饶:"ráo",空:"kōng",曾:"zēng",母:"mǔ",沙:"shā",乜:"niè",养:"yǎng",鞠:"jū",须:"xū",丰:"fēng",巢:"cháo",关:"guān",蒯:"kuǎi",相:"xiàng",查:"zhā",后:"hòu",荆:"jīng",红:"hóng",游:"yóu",竺:"zhú",权:"quán",逯:"lù",盖:"gě",益:"yì",桓:"huán",公:"gōng",牟:"móu",哈:"hǎ",言:"yán",福:"fú",肖:"xiāo",区:"ōu",覃:"qín",朴:"piáo",繁:"pó",员:"yùn",句:"gōu",要:"yāo",过:"guō",钻:"zuān",谌:"chén",折:"shé",召:"shào",郄:"qiè",撒:"sǎ",甯:"nìng",六:"lù",啜:"chuài",行:"xíng"},$le=Object.keys(Lb).map(e=>({zh:e,pinyin:Lb[e],probability:1+Nl(e),length:Nl(e),priority:Yr.Surname,dict:Symbol("surname")})),mS={"bǎng páng pāng":["膀"],líng:["〇","伶","凌","刢","囹","坽","夌","姈","婈","孁","岺","彾","掕","昤","朎","柃","棂","櫺","欞","泠","淩","澪","灵","燯","爧","狑","玲","琌","瓴","皊","砱","祾","秢","竛","笭","紷","綾","绫","羐","羚","翎","聆","舲","苓","菱","蓤","蔆","蕶","蛉","衑","裬","詅","跉","軨","輘","酃","醽","鈴","錂","铃","閝","陵","零","霊","霗","霛","霝","靈","駖","魿","鯪","鲮","鴒","鸰","鹷","麢","齡","齢","龄","龗","㥄"],yī:["一","乊","伊","依","医","吚","咿","噫","壱","壹","夁","嫛","嬄","弌","揖","撎","檹","毉","洢","渏","漪","瑿","畩","祎","禕","稦","繄","蛜","衤","譩","辷","郼","醫","銥","铱","鷖","鹥","黟","黳"],"dīng zhēng":["丁"],"kǎo qiǎo yú":["丂"],qī:["七","倛","僛","凄","嘁","墄","娸","悽","慼","慽","戚","捿","柒","桤","桼","棲","榿","欺","沏","淒","漆","紪","緀","萋","褄","諆","迉","郪","鏚","霋","魌","鶈"],shàng:["丄","尙","尚","恦","緔","绱"],xià:["丅","下","乤","圷","夏","夓","懗","梺","疜","睱","罅","鎼","鏬"],hǎn:["丆","喊","浫","罕","豃","㘎"],"wàn mò":["万"],zhàng:["丈","仗","墇","嶂","帐","帳","幛","扙","杖","涱","痮","瘬","瘴","瞕","粀","胀","脹","賬","账","障"],sān:["三","厁","叁","弎","毵","毶","毿","犙","鬖"],"shàng shǎng shang":["上"],"qí jī":["丌","其","奇"],"bù fǒu":["不"],"yǔ yù yú":["与"],miǎn:["丏","偭","免","冕","勉","勔","喕","娩","愐","汅","沔","湎","睌","緬","缅","腼","葂","靦","鮸","𩾃"],gài:["丐","乢","匃","匄","戤","概","槩","槪","溉","漑","瓂","葢","鈣","钙","𬮿"],chǒu:["丑","丒","侴","吜","杽","瞅","矁","醜","魗"],zhuān:["专","叀","嫥","専","專","瑼","甎","砖","磗","磚","蟤","諯","鄟","顓","颛","鱄","䏝"],"qiě jū":["且"],pī:["丕","伓","伾","噼","坯","岯","憵","批","披","炋","狉","狓","砒","磇","礔","礕","秛","秠","耚","豾","邳","鈚","鉟","銔","錃","錍","霹","駓","髬","魾","𬳵"],shì:["世","丗","亊","事","仕","侍","冟","势","勢","卋","呩","嗜","噬","士","奭","嬕","室","市","式","弑","弒","恀","恃","戺","拭","揓","是","昰","枾","柿","栻","澨","烒","煶","眂","眎","眡","睗","示","礻","筮","簭","舐","舓","襫","視","视","觢","試","誓","諡","謚","试","谥","貰","贳","軾","轼","逝","遾","釈","释","釋","鈰","鉃","鉽","铈","飾","餙","餝","饰","鰘","䏡","𬤊"],qiū:["丘","丠","坵","媝","恘","恷","楸","秋","秌","穐","篍","緧","萩","蘒","蚯","蝵","蟗","蠤","趥","邱","鞦","鞧","鰌","鰍","鳅","鶖","鹙","龝"],bǐng:["丙","屛","怲","抦","昞","昺","柄","棅","炳","禀","秉","稟","苪","蛃","邴","鈵","陃","鞆","餅","餠","饼"],yè:["业","亱","僷","墷","夜","嶪","嶫","抴","捙","擛","擪","擫","晔","曄","曅","曗","曳","曵","枼","枽","業","洂","液","澲","烨","燁","爗","璍","皣","瞱","瞸","礏","腋","葉","謁","谒","邺","鄴","鍱","鐷","靥","靨","頁","页","餣","饁","馌","驜","鵺","鸈"],cóng:["丛","从","叢","婃","孮","従","徔","徖","悰","樷","欉","淙","灇","爜","琮","藂","誴","賨","賩","錝"],dōng:["东","倲","冬","咚","埬","岽","崬","徚","昸","東","氡","氭","涷","笗","苳","菄","蝀","鮗","鯟","鶇","鶫","鸫","鼕","𬟽"],sī:["丝","俬","凘","厮","司","咝","嘶","噝","媤","廝","恖","撕","斯","楒","泀","澌","燍","禗","禠","私","糹","絲","緦","纟","缌","罳","蕬","虒","蛳","蜤","螄","蟖","蟴","鉰","銯","鍶","鐁","锶","颸","飔","騦","鷥","鸶","鼶","㟃"],chéng:["丞","呈","城","埕","堘","塍","塖","宬","峸","惩","懲","成","承","挰","掁","揨","枨","棖","橙","檙","洆","溗","澂","珵","珹","畻","程","窚","筬","絾","脭","荿","誠","诚","郕","酲","鋮","铖","騬","鯎"],diū:["丟","丢","銩","铥"],liǎng:["両","两","兩","唡","啢","掚","緉","脼","蜽","裲","魉","魎","𬜯"],yǒu:["丣","卣","友","梄","湵","牖","禉","羑","聈","苃","莠","蜏","酉","銪","铕","黝"],yán:["严","厳","啱","喦","嚴","塩","壛","壧","妍","姸","娫","娮","岩","嵒","嵓","巌","巖","巗","延","揅","昖","楌","檐","櫩","欕","沿","炎","炏","狿","琂","盐","碞","筵","簷","莚","蔅","虤","蜒","言","訁","訮","詽","讠","郔","閆","閻","闫","阎","顏","顔","颜","鹽","麣","𫄧"],bìng:["並","併","倂","傡","垪","摒","栤","病","窉","竝","誁","靐","鮩"],"sàng sāng":["丧"],gǔn:["丨","惃","滚","滾","磙","緄","绲","蓘","蔉","衮","袞","輥","辊","鮌","鯀","鲧"],jiū:["丩","勼","啾","揪","揫","朻","究","糾","纠","萛","赳","阄","鬏","鬮","鳩","鸠"],"gè gě":["个","個","各"],yā:["丫","圧","孲","庘","押","枒","桠","椏","錏","鐚","鴉","鴨","鵶","鸦","鸭"],pán:["丬","媻","幋","槃","洀","瀊","爿","盘","盤","磐","縏","蒰","蟠","蹒","蹣","鎜","鞶"],"zhōng zhòng":["中"],jǐ:["丮","妀","己","戟","挤","掎","撠","擠","橶","泲","犱","脊","虮","蟣","魢","鱾","麂"],jiè:["丯","介","借","唶","堺","屆","届","岕","庎","徣","戒","楐","犗","玠","琾","界","畍","疥","砎","蚧","蛶","衸","褯","誡","诫","鎅","骱","魪"],fēng:["丰","仹","偑","僼","凨","凬","凮","妦","寷","封","峯","峰","崶","枫","楓","檒","沣","沨","渢","灃","烽","犎","猦","琒","疯","瘋","盽","砜","碸","篈","蘴","蜂","蠭","豐","鄷","酆","鋒","鎽","鏠","锋","霻","靊","飌","麷"],"guàn kuàng":["丱"],chuàn:["串","汌","玔","賗","釧","钏"],chǎn:["丳","产","冁","剷","囅","嵼","旵","浐","滻","灛","產","産","簅","蒇","蕆","諂","譂","讇","谄","鏟","铲","閳","闡","阐","骣","𬊤"],lín:["临","冧","壣","崊","嶙","斴","晽","暽","林","潾","瀶","燐","琳","璘","瞵","碄","磷","粦","粼","繗","翷","臨","轔","辚","遴","邻","鄰","鏻","阾","隣","霖","驎","鱗","鳞","麐","麟","𬴊","𬭸"],zhuó:["丵","劅","卓","啄","圴","妰","娺","撯","擆","擢","斫","斮","斱","斲","斵","晫","椓","浊","浞","濁","灼","烵","琸","硺","禚","窡","籗","籱","罬","茁","蠗","蠿","諁","諑","謶","诼","酌","鐲","镯","鵫","鷟","䓬","𬸦"],zhǔ:["丶","主","劯","嘱","囑","宔","帾","拄","渚","濐","煑","煮","燝","瞩","矚","罜","詝","陼","鸀","麈","𬣞"],bā:["丷","仈","八","叭","哵","夿","岜","巴","捌","朳","玐","疤","笆","粑","羓","芭","蚆","豝","釟"],wán:["丸","刓","完","岏","抏","捖","汍","烷","玩","琓","笂","紈","纨","翫","芄","貦","頑","顽"],dān:["丹","勯","匰","単","妉","媅","殚","殫","甔","眈","砃","箪","簞","耼","耽","聃","聸","褝","襌","躭","郸","鄲","酖","頕"],"wèi wéi":["为"],"jǐng dǎn":["丼"],"lì lí":["丽"],jǔ:["举","弆","挙","擧","椇","榉","榘","櫸","欅","矩","筥","聥","舉","莒","蒟","襷","踽","齟","龃"],piě:["丿","苤","鐅","𬭯"],fú:["乀","伏","俘","凫","刜","匐","咈","哹","垘","孚","岪","巿","帗","幅","幞","弗","彿","怫","扶","柫","栿","桴","氟","泭","浮","涪","澓","炥","玸","甶","畉","癁","祓","福","稪","符","箙","紱","紼","絥","綍","绂","绋","罘","罦","翇","艀","芙","芣","苻","茀","茯","菔","葍","虙","蚨","蜉","蝠","袚","袱","襆","襥","諨","豧","踾","輻","辐","郛","鉘","鉜","韍","韨","颫","髴","鮄","鮲","鳧","鳬","鴔","鵩","黻"],"yí jí":["乁"],yì:["乂","义","亄","亦","亿","伇","伿","佾","俋","億","兿","刈","劓","劮","勚","勩","匇","呓","呭","呹","唈","囈","圛","坄","垼","埸","奕","嫕","嬑","寱","屹","峄","嶧","帟","帠","幆","廙","异","弈","弋","役","忆","怈","怿","悒","意","憶","懌","懿","抑","挹","敡","易","晹","曀","曎","杙","枍","棭","榏","槸","檍","歝","殔","殪","殹","毅","浂","浥","浳","湙","溢","潩","澺","瀷","炈","焲","熠","熤","熼","燚","燡","燱","獈","玴","異","疫","痬","瘗","瘞","瘱","癔","益","瞖","穓","竩","篒","縊","繶","繹","绎","缢","義","羿","翊","翌","翳","翼","耴","肄","肊","膉","臆","艗","艺","芅","苅","萟","蓺","薏","藙","藝","蘙","虉","蜴","螠","衪","袣","裔","裛","褹","襼","訲","訳","詍","詣","誼","譯","議","讛","议","译","诣","谊","豙","豛","豷","貖","贀","跇","轶","逸","邑","鄓","醷","釴","鈠","鎰","鐿","镒","镱","阣","隿","霬","饐","駅","驛","驿","骮","鮨","鶂","鶃","鶍","鷁","鷊","鷧","鷾","鸃","鹝","鹢","黓","齸","𬬩","㑊","𫄷","𬟁"],nǎi:["乃","倷","奶","嬭","廼","氖","疓","艿","迺","釢"],wǔ:["乄","五","仵","伍","侮","倵","儛","午","啎","妩","娬","嫵","庑","廡","忤","怃","憮","摀","武","潕","熓","牾","玝","珷","瑦","甒","碔","舞","躌","迕","逜","陚","鵡","鹉","𣲘"],jiǔ:["久","乆","九","乣","奺","杦","汣","灸","玖","紤","舏","酒","镹","韭","韮"],"tuō zhé":["乇","杔","馲"],"me mó ma yāo":["么"],zhī:["之","倁","卮","巵","搘","支","栀","梔","椥","榰","汁","泜","疷","祗","祬","秓","稙","綕","肢","胑","胝","脂","芝","蘵","蜘","衼","隻","鳷","鴲","鼅","𦭜"],"wū wù":["乌"],zhà:["乍","咤","宱","搾","榨","溠","痄","蚱","詐","诈","醡","霅","䃎"],hū:["乎","乯","匢","匫","呼","唿","嘑","垀","寣","幠","忽","惚","昒","歑","泘","淴","滹","烀","苸","虍","虖","謼","軤","轷","雐"],fá:["乏","伐","傠","坺","垡","墢","姂","栰","浌","瞂","笩","筏","罚","罰","罸","藅","閥","阀"],"lè yuè yào lào":["乐","樂"],yín:["乑","吟","噖","嚚","圁","垠","夤","婬","寅","峾","崟","崯","檭","殥","泿","淫","滛","烎","犾","狺","璌","硍","碒","荶","蔩","訔","訚","訡","誾","鄞","鈝","銀","银","霪","鷣","齦"],pīng:["乒","俜","娉","涄","甹","砯","聠","艵","頩"],pāng:["乓","滂","胮","膖","雱","霶"],qiáo:["乔","侨","僑","嫶","憔","桥","槗","樵","橋","櫵","犞","瞧","硚","礄","荍","荞","蕎","藮","譙","趫","鐈","鞒","鞽","顦"],hǔ:["乕","琥","萀","虎","虝","錿","鯱"],guāi:["乖"],"chéng shèng":["乗","乘","娍"],yǐ:["乙","乛","以","倚","偯","嬟","崺","已","庡","扆","攺","敼","旑","旖","檥","矣","礒","笖","舣","艤","苡","苢","蚁","螘","蟻","裿","踦","輢","轙","逘","酏","釔","鈘","鉯","钇","顗","鳦","齮","𫖮","𬺈"],"háo yǐ":["乚"],"niè miē":["乜"],qǐ:["乞","企","启","唘","啓","啔","啟","婍","屺","杞","棨","玘","盀","綺","绮","芑","諬","起","邔","闙"],yě:["也","冶","嘢","埜","壄","漜","野"],xí:["习","喺","媳","嶍","席","椺","檄","漝","習","蓆","袭","襲","覡","觋","謵","趘","郋","鎴","隰","霫","飁","騱","騽","驨","鰼","鳛","𠅤","𫘬"],xiāng:["乡","厢","廂","忀","楿","欀","湘","瓖","稥","箱","緗","缃","膷","芗","萫","葙","薌","襄","郷","鄉","鄊","鄕","鑲","镶","香","驤","骧","鱜","麘","𬙋"],shū:["书","倏","倐","儵","叔","姝","尗","抒","掓","摅","攄","書","枢","梳","樞","殊","殳","毹","毺","淑","瀭","焂","疎","疏","紓","綀","纾","舒","菽","蔬","踈","軗","輸","输","鄃","陎","鮛","鵨"],dǒu:["乧","抖","枓","蚪","鈄","阧","陡"],shǐ:["乨","使","兘","史","始","宩","屎","榁","矢","笶","豕","鉂","駛","驶"],jī:["乩","僟","击","刉","刏","剞","叽","唧","喞","嗘","嘰","圾","基","墼","姬","屐","嵆","嵇","撃","擊","朞","机","枅","樭","機","毄","激","犄","玑","璣","畸","畿","癪","矶","磯","积","積","笄","筓","箕","簊","緁","羁","羇","羈","耭","肌","芨","虀","覉","覊","譏","譤","讥","賫","賷","赍","跻","踑","躋","躸","銈","錤","鐖","鑇","鑙","隮","雞","鞿","韲","飢","饑","饥","魕","鳮","鶏","鶺","鷄","鸄","鸡","齎","齏","齑","𬯀","𫓯","𫓹","𫌀"],náng:["乪","嚢","欜","蠰","饢"],jiā:["乫","佳","傢","加","嘉","抸","枷","梜","毠","泇","浃","浹","犌","猳","珈","痂","笳","糘","耞","腵","葭","袈","豭","貑","跏","迦","鉫","鎵","镓","鴐","麚","𬂩"],jù:["乬","倨","倶","具","剧","劇","勮","埧","埾","壉","姖","屦","屨","岠","巨","巪","怇","惧","愳","懅","懼","拒","拠","昛","歫","洰","澽","炬","烥","犋","秬","窭","窶","簴","粔","耟","聚","虡","蚷","詎","讵","豦","距","踞","躆","遽","邭","醵","鉅","鐻","钜","颶","飓","駏","鮔"],shí:["乭","十","埘","塒","姼","实","実","寔","實","峕","嵵","时","旹","時","榯","湜","溡","炻","祏","竍","蚀","蝕","辻","遈","鉐","飠","饣","鮖","鰣","鲥","鼫","鼭"],mǎo:["乮","冇","卯","峁","戼","昴","泖","笷","蓩","鉚","铆"],mǎi:["买","嘪","荬","蕒","買","鷶"],luàn:["乱","亂","釠"],rǔ:["乳","擩","汝","肗","辱","鄏"],xué:["乴","学","學","峃","嶨","斈","泶","澩","燢","穴","茓","袕","踅","鷽","鸴"],yǎn:["䶮","乵","俨","偃","儼","兖","兗","厣","厴","噞","孍","嵃","巘","巚","弇","愝","戭","扊","抁","掩","揜","曮","椼","檿","沇","渷","演","琰","甗","眼","罨","萒","蝘","衍","褗","躽","遃","郾","隒","顩","魇","魘","鰋","鶠","黡","黤","黬","黭","黶","鼴","鼹","齴","龑","𬸘","𬙂","𪩘"],fǔ:["乶","俌","俛","俯","府","弣","抚","拊","撫","斧","椨","滏","焤","甫","盙","簠","腐","腑","蜅","輔","辅","郙","釜","釡","阝","頫","鬴","黼","㕮","𫖯"],shā:["乷","唦","杀","桬","殺","毮","猀","痧","砂","硰","紗","繺","纱","蔱","裟","鎩","铩","閷","髿","魦","鯊","鯋","鲨"],nǎ:["乸","雫"],qián:["乹","亁","仱","偂","前","墘","媊","岒","拑","掮","榩","橬","歬","潛","潜","濳","灊","箝","葥","虔","軡","鈐","鉗","銭","錢","鎆","钤","钱","钳","靬","騚","騝","鰬","黔","黚"],suǒ:["乺","唢","嗩","所","暛","溑","溹","琐","琑","瑣","索","褨","鎖","鎻","鏁","锁"],yú:["乻","于","亐","伃","余","堣","堬","妤","娛","娯","娱","嬩","崳","嵎","嵛","愚","扵","揄","旟","楡","楰","榆","欤","歈","歟","歶","渔","渝","湡","漁","澞","牏","狳","玗","玙","瑜","璵","盂","睮","窬","竽","籅","羭","腴","臾","舁","舆","艅","茰","萮","萸","蕍","蘛","虞","虶","蝓","螸","衧","褕","覦","觎","諛","謣","谀","踰","輿","轝","逾","邘","酑","鍝","隅","雓","雩","餘","馀","騟","骬","髃","魚","魣","鮽","鯲","鰅","鱼","鷠","鸆","齵"],zhù:["乼","伫","佇","住","坾","墸","壴","嵀","拀","杼","柱","樦","殶","注","炷","疰","眝","祝","祩","竚","筯","箸","篫","簗","紵","紸","纻","羜","翥","苎","莇","蛀","註","貯","贮","跓","軴","鉒","鋳","鑄","铸","馵","駐","驻"],zhě:["乽","者","褶","襵","赭","踷","鍺","锗"],"qián gān":["乾"],"zhì luàn":["乿"],guī:["亀","圭","妫","媯","嫢","嬀","帰","归","摫","椝","槻","槼","櫷","歸","珪","瑰","璝","瓌","皈","瞡","硅","茥","蘬","規","规","邽","郌","閨","闺","騩","鬶","鬹"],"lǐn lìn":["亃"],jué:["亅","决","刔","劂","匷","厥","噊","孒","孓","崛","崫","嶥","彏","憠","憰","戄","抉","挗","掘","攫","桷","橛","橜","欮","氒","決","灍","焳","熦","爑","爴","爵","獗","玃","玦","玨","珏","瑴","瘚","矍","矡","砄","絕","絶","绝","臄","芵","蕝","蕨","虳","蟨","蟩","觖","觮","觼","訣","譎","诀","谲","貜","赽","趉","蹷","躩","鈌","鐍","鐝","钁","镢","鴂","鴃","鷢","𫘝","㵐","𫔎"],"le liǎo":["了"],"gè mā":["亇"],"yǔ yú":["予","懙"],zhēng:["争","佂","凧","姃","媜","峥","崝","崢","征","徰","炡","烝","爭","狰","猙","癥","眐","睁","睜","筝","箏","篜","聇","脀","蒸","踭","鉦","錚","鏳","鬇"],èr:["二","刵","咡","弍","弐","樲","誀","貮","貳","贰","髶"],chù:["亍","傗","儊","怵","憷","搐","斶","歜","珿","琡","矗","竌","絀","绌","臅","触","觸","豖","鄐","閦","黜"],kuī:["亏","刲","岿","巋","盔","窥","窺","聧","虧","闚","顝"],yún:["云","伝","勻","匀","囩","妘","愪","抣","昀","橒","沄","涢","溳","澐","熉","畇","秐","筼","篔","紜","縜","纭","耘","芸","蒷","蕓","郧","鄖","鋆","雲"],hù:["互","冱","嗀","嚛","婟","嫭","嫮","岵","帍","弖","怙","戶","户","戸","戽","扈","护","昈","槴","沍","沪","滬","熩","瓠","祜","笏","簄","粐","綔","蔰","護","豰","鄠","鍙","頀","鱯","鳠","鳸","鸌","鹱"],qí:["亓","剘","埼","岐","岓","崎","嵜","愭","掑","斉","斊","旂","旗","棊","棋","檱","櫀","歧","淇","濝","猉","玂","琦","琪","璂","畦","疧","碁","碕","祁","祈","祺","禥","竒","簯","簱","籏","粸","綥","綦","肵","脐","臍","艩","芪","萁","萕","蕲","藄","蘄","蚑","蚚","蛴","蜝","蜞","螧","蠐","褀","軝","鄿","釮","錡","锜","陭","頎","颀","騎","騏","騹","骐","骑","鬐","鬿","鯕","鰭","鲯","鳍","鵸","鶀","麒","麡","𨙸","𬨂","䓫"],jǐng:["井","儆","刭","剄","坓","宑","幜","憬","暻","殌","汫","汬","澋","璄","璟","璥","穽","肼","蟼","警","阱","頚","頸"],sì:["亖","佀","価","儩","兕","嗣","四","姒","娰","孠","寺","巳","柶","榹","汜","泗","泤","洍","洠","涘","瀃","牭","祀","禩","竢","笥","耜","肂","肆","蕼","覗","貄","釲","鈶","鈻","飤","飼","饲","駟","騃","驷"],suì:["亗","嬘","岁","嵗","旞","檖","歲","歳","澻","煫","燧","璲","砕","碎","祟","禭","穂","穗","穟","繀","繐","繸","襚","誶","譢","谇","賥","邃","鐆","鐩","隧","韢","𫟦","𬭼"],gèn:["亘","亙","揯","搄","茛"],yà:["亚","亜","俹","冴","劜","圔","圠","埡","娅","婭","揠","氩","氬","犽","砑","稏","聐","襾","覀","訝","讶","迓","齾"],"xiē suò":["些"],"qí zhāi":["亝","齊"],"yā yà":["亞","压","垭","壓","铔"],"jí qì":["亟","焏"],tóu:["亠","投","頭","骰"],"wáng wú":["亡"],"kàng háng gāng":["亢"],dà:["亣","眔"],jiāo:["交","僬","娇","嬌","峧","嶕","嶣","憍","椒","浇","澆","焦","礁","穚","簥","胶","膠","膲","茭","茮","蕉","虠","蛟","蟭","跤","轇","郊","鐎","驕","骄","鮫","鲛","鵁","鷦","鷮","鹪","䴔"],hài:["亥","嗐","害","氦","餀","饚","駭","駴","骇"],"hēng pēng":["亨"],mǔ:["亩","姆","峔","拇","母","牡","牳","畂","畆","畒","畝","畞","畮","砪","胟","踇","鉧","𬭁","𧿹"],ye:["亪"],xiǎng:["享","亯","响","想","晑","蚃","蠁","響","飨","餉","饗","饷","鮝","鯗","鱶","鲞"],jīng:["京","亰","兢","坕","坙","婛","惊","旌","旍","晶","橸","泾","涇","猄","睛","秔","稉","粳","精","経","經","綡","聙","腈","茎","荆","荊","菁","葏","驚","鯨","鲸","鶁","鶄","麖","麠","鼱","䴖"],tíng:["亭","停","婷","嵉","庭","廷","楟","榳","筳","聤","莛","葶","蜓","蝏","諪","邒","霆","鼮","䗴"],liàng:["亮","喨","悢","晾","湸","諒","谅","輌","輛","辆","鍄"],"qīn qìng":["亲","親"],bó:["亳","仢","侼","僰","博","帛","愽","懪","挬","搏","欂","浡","淿","渤","煿","牔","狛","瓝","礴","秡","箔","簙","糪","胉","脖","膊","舶","艊","萡","葧","袯","襏","襮","謈","踣","郣","鈸","鉑","鋍","鎛","鑮","钹","铂","镈","餺","馎","馛","馞","駁","駮","驳","髆","鵓","鹁"],yòu:["亴","佑","佦","侑","又","右","哊","唀","囿","姷","宥","峟","幼","狖","祐","蚴","誘","诱","貁","迶","酭","釉","鼬"],xiè:["亵","伳","偞","偰","僁","卨","卸","噧","塮","夑","媟","屑","屧","廨","徢","懈","暬","械","榍","榭","泻","洩","渫","澥","瀉","瀣","灺","炧","炨","燮","爕","獬","祄","禼","糏","紲","絏","絬","繲","纈","绁","缷","薢","薤","蟹","蠏","褉","褻","謝","谢","躞","邂","靾","韰","齂","齘","齛","齥","𬹼","𤫉"],"dǎn dàn":["亶","馾"],lián:["亷","劆","匲","匳","嗹","噒","奁","奩","嫾","帘","廉","怜","憐","涟","漣","濂","濓","瀮","熑","燫","簾","籢","籨","縺","翴","联","聨","聫","聮","聯","臁","莲","蓮","薕","螊","蠊","裢","褳","覝","謰","蹥","连","連","鎌","鐮","镰","鬑","鰱","鲢"],duǒ:["亸","哚","嚲","埵","崜","朵","朶","綞","缍","趓","躱","躲","軃"],"wěi mén":["亹","斖"],rén:["人","亻","仁","壬","忈","忎","朲","秂","芢","魜","鵀"],jí:["亼","亽","伋","佶","偮","卙","即","卽","及","叝","吉","堲","塉","姞","嫉","岌","嵴","嶯","彶","忣","急","愱","戢","揤","极","棘","楫","極","槉","檝","殛","汲","湒","潗","疾","瘠","皍","笈","箿","籍","級","级","膌","艥","蒺","蕀","蕺","蝍","螏","襋","觙","谻","踖","蹐","躤","輯","轚","辑","郆","銡","鍓","鏶","集","雧","霵","鹡","㴔"],wáng:["亾","仼","兦","莣","蚟"],"shén shí":["什"],lè:["仂","叻","忇","氻","泐","玏","砳","簕","艻","阞","韷","餎","鰳","鱳","鳓"],dīng:["仃","叮","帄","玎","疔","盯","耵","虰","靪"],zè:["仄","崱","庂","捑","昃","昗","汄"],"jǐn jìn":["仅","僅","嫤"],"pú pū":["仆"],"chóu qiú":["仇"],zhǎng:["仉","幥","掌","礃"],jīn:["今","堻","巾","惍","斤","津","珒","琻","璡","砛","筋","荕","衿","襟","觔","金","釒","釿","钅","鹶","黅","𬬱"],bīng:["仌","仒","兵","冫","冰","掤","氷","鋲"],réng:["仍","礽","芿","辸","陾"],fó:["仏","坲","梻"],"jīn sǎn":["仐"],lún:["仑","伦","侖","倫","囵","圇","婨","崘","崙","棆","沦","淪","磮","腀","菕","蜦","踚","輪","轮","錀","陯","鯩","𬬭"],cāng:["仓","仺","倉","凔","嵢","沧","滄","濸","獊","舱","艙","苍","蒼","螥","鸧"],"zǎi zǐ zī":["仔"],tā:["他","塌","它","榙","溻","牠","祂","褟","趿","遢","闧"],fù:["付","偩","傅","冨","副","咐","坿","复","妇","婦","媍","嬔","富","復","椱","祔","禣","竎","緮","縛","缚","腹","萯","蕧","蚹","蛗","蝜","蝮","袝","複","覄","覆","訃","詂","讣","負","賦","賻","负","赋","赙","赴","輹","鍑","鍢","阜","附","馥","駙","驸","鮒","鰒","鲋","鳆","㳇"],xiān:["仙","仚","佡","僊","僲","先","嘕","奾","屳","廯","忺","憸","掀","暹","杴","氙","珗","祆","秈","籼","繊","纎","纖","苮","褼","襳","跹","蹮","躚","酰","鍁","锨","韯","韱","馦","鱻","鶱","𬸣"],"tuō chà duó":["仛"],hóng:["仜","吰","垬","妅","娂","宏","宖","弘","彋","汯","泓","洪","浤","渱","潂","玒","玜","竑","竤","篊","粠","紘","紭","綋","纮","翃","翝","耾","苰","荭","葒","葓","谹","谼","鈜","鉷","鋐","閎","闳","霐","霟","鞃","魟","鴻","鸿","黉","黌","𫟹","𬭎"],tóng:["仝","佟","哃","峂","峝","庝","彤","晍","曈","桐","氃","浵","潼","犝","獞","眮","瞳","砼","秱","童","粡","膧","茼","蚒","詷","赨","酮","鉖","鉵","銅","铜","餇","鮦","鲖","𫍣","𦒍"],rèn:["仞","仭","刃","刄","妊","姙","屻","岃","扨","牣","祍","紉","紝","絍","纫","纴","肕","腍","衽","袵","訒","認","认","讱","軔","轫","鈓","靭","靱","韌","韧","飪","餁","饪"],qiān:["仟","佥","僉","千","圲","奷","孯","岍","悭","愆","慳","扦","拪","搴","撁","攐","攑","攓","杄","櫏","汘","汧","牵","牽","竏","签","簽","籖","籤","粁","芊","茾","蚈","褰","諐","謙","谦","谸","迁","遷","釺","鈆","鉛","鏲","钎","阡","韆","顅","騫","骞","鬜","鬝","鵮","鹐"],"gǎn hàn":["仠"],"yì gē":["仡"],dài:["代","侢","叇","垈","埭","岱","帒","带","帯","帶","廗","怠","戴","曃","柋","殆","瀻","玳","瑇","甙","簤","紿","緿","绐","艜","蝳","袋","襶","貣","贷","蹛","軑","軚","軩","轪","迨","霴","靆","鴏","黛","黱"],"lìng líng lǐng":["令"],chào:["仦","耖","觘"],"cháng zhǎng":["仧","兏","長","长"],sā:["仨"],cháng:["仩","偿","償","嘗","嚐","嫦","尝","常","徜","瑺","瓺","甞","肠","腸","膓","苌","萇","镸","鱨","鲿"],yí:["仪","侇","儀","冝","匜","咦","圯","夷","姨","宐","宜","宧","寲","峓","嶬","嶷","巸","彛","彜","彝","彞","怡","恞","扅","暆","栘","椬","椸","沂","洟","熪","瓵","痍","移","簃","籎","羠","胰","萓","蛦","螔","觺","謻","貽","贻","跠","迻","遺","鏔","頉","頤","頥","顊","颐","饴","鮧","鴺"],mù:["仫","凩","募","墓","幕","幙","慔","慕","暮","暯","木","楘","毣","沐","炑","牧","狇","目","睦","穆","艒","苜","莯","蚞","鉬","钼","雮","霂"],"men mén":["们"],fǎn:["仮","反","橎","返"],"chào miǎo":["仯"],"yǎng áng":["仰"],zhòng:["仲","众","堹","妕","媑","狆","眾","祌","筗","茽","蚛","衆","衶","諥"],"pǐ pí":["仳"],wò:["仴","偓","卧","媉","幄","握","楃","沃","渥","濣","瓁","瞃","硪","肟","腛","臥","齷","龌"],jiàn:["件","俴","健","僭","剑","剣","剱","劍","劎","劒","劔","墹","寋","建","徤","擶","旔","楗","毽","洊","涧","澗","牮","珔","瞷","磵","礀","箭","糋","繝","腱","臶","舰","艦","荐","薦","覸","諓","諫","譛","谏","賎","賤","贱","趝","践","踐","踺","轞","鉴","鍳","鍵","鐱","鑑","鑒","鑬","鑳","键","間","餞","饯","𬣡"],"jià jiè jie":["价"],"yǎo fó":["仸"],"rèn rén":["任"],"fèn bīn":["份"],dī:["仾","低","啲","埞","堤","岻","彽","樀","滴","磾","秪","羝","袛","趆","隄","鞮","䃅"],fǎng:["仿","倣","旊","昉","昘","瓬","眆","紡","纺","舫","訪","访","髣","鶭"],zhōng:["伀","刣","妐","幒","彸","忠","柊","汷","泈","炂","盅","籦","終","终","舯","蔠","蜙","螤","螽","衳","衷","蹱","鈡","鍾","鐘","钟","锺","鴤","鼨"],pèi:["伂","佩","姵","帔","斾","旆","沛","浿","珮","蓜","轡","辔","配","霈","馷"],diào:["伄","吊","弔","掉","瘹","盄","窎","窵","竨","訋","釣","鈟","銱","鋽","鑃","钓","铞","雿","魡"],dùn:["伅","潡","炖","燉","盾","砘","碷","踲","逇","遁","遯","鈍","钝"],wěn:["伆","刎","吻","呅","抆","桽","稳","穏","穩","紊","肳","脗"],xǐn:["伈"],kàng:["伉","匟","囥","抗","炕","鈧","钪"],ài:["伌","僾","塧","壒","嫒","嬡","愛","懓","暧","曖","爱","瑷","璦","皧","瞹","砹","硋","碍","礙","薆","譺","賹","鑀","隘","靉","餲","馤","鱫","鴱"],"jì qí":["伎","薺"],"xiū xǔ":["休"],"jìn yín":["伒"],dǎn:["伔","刐","撢","玬","瓭","紞","胆","膽","衴","賧","赕","黕","𬘘"],fū:["伕","呋","娐","孵","尃","怤","懯","敷","旉","玞","砆","稃","筟","糐","綒","肤","膚","荂","荴","衭","趺","跗","邞","鄜","酜","鈇","麩","麬","麱","麸","𫓧"],tǎng:["伖","傥","儻","埫","戃","曭","爣","矘","躺","鎲","钂","镋"],yōu:["优","優","呦","嚘","峳","幽","忧","悠","憂","攸","櫌","滺","瀀","纋","羪","耰","逌","鄾","麀"],huǒ:["伙","夥","火","煷","邩","鈥","钬"],"huì kuài":["会","會","浍","璯"],yǔ:["伛","俁","俣","偊","傴","匬","噳","圄","圉","宇","寙","屿","嶼","庾","挧","敔","斞","楀","瑀","瘐","祤","禹","穥","窳","羽","與","萭","貐","鄅","頨","麌","齬","龉","㺄"],cuì:["伜","啛","忰","悴","毳","淬","焠","疩","瘁","竁","粋","粹","紣","綷","翆","翠","脃","脆","脺","膬","膵","臎","萃","襊","顇"],sǎn:["伞","傘","糤","繖","饊","馓"],wěi:["伟","伪","偉","偽","僞","儰","娓","寪","屗","崣","嶉","徫","愇","捤","暐","梶","洧","浘","渨","炜","煒","猥","玮","瑋","痿","緯","纬","腲","艉","芛","苇","荱","萎","葦","蒍","蔿","蜼","諉","诿","踓","鍡","韑","韙","韡","韪","頠","颹","骩","骪","骫","鮪","鲔","𫇭","𬀩","𬱟"],"chuán zhuàn":["传","傳"],"chē jū":["伡","俥","车"],"jū chē":["車"],yá:["伢","厑","厓","堐","岈","崕","崖","涯","漄","牙","玡","琊","睚","笌","芽","蚜","衙","齖"],qiàn:["伣","俔","倩","儙","刋","壍","嬱","悓","棈","椠","槧","欠","歉","皘","篏","篟","縴","芡","蒨","蔳","輤","𬘬"],shāng:["伤","傷","商","墒","慯","殇","殤","滳","漡","熵","蔏","螪","觞","觴","謪","鬺"],chāng:["伥","倀","娼","昌","椙","淐","猖","琩","菖","裮","錩","锠","閶","阊","鯧","鲳","鼚"],"chen cāng":["伧"],xùn:["伨","侚","卂","噀","巺","巽","徇","愻","殉","殾","汛","潠","狥","蕈","訊","訓","訙","训","讯","迅","迿","逊","遜","鑂","顨","馴","驯"],xìn:["伩","囟","孞","脪","舋","衅","訫","釁","阠","顖"],chǐ:["伬","侈","卶","叺","呎","垑","恥","歯","耻","肔","胣","蚇","裭","褫","豉","鉹","齒","齿"],"xián xuán":["伭"],"nú nǔ":["伮"],"bó bǎi":["伯"],"gū gù":["估"],nǐ:["伱","你","儞","孴","拟","擬","旎","晲","狔","苨","薿","隬"],"nì ní":["伲"],bàn:["伴","办","半","姅","怑","扮","瓣","秚","絆","绊","辦","鉡","靽"],xù:["伵","侐","勖","勗","卹","叙","垿","壻","婿","序","恤","敍","敘","旭","昫","朂","槒","欰","殈","汿","沀","洫","溆","漵","潊","烅","烼","煦","獝","珬","盢","瞁","稸","絮","続","緒","緖","續","绪","续","聓","聟","蓄","藚","訹","賉","酗","頊","鱮","㳚"],zhòu:["伷","僽","冑","呪","咒","咮","宙","昼","晝","甃","皱","皺","籀","籒","籕","粙","紂","縐","纣","绉","胄","荮","葤","詋","酎","駎","驟","骤","㤘","㑇"],shēn:["伸","侁","兟","呻","堔","妽","娠","屾","峷","扟","敒","曑","柛","氠","深","燊","珅","甡","甧","申","眒","砷","穼","籶","籸","糂","紳","绅","罙","罧","葠","蓡","蔘","薓","裑","訷","詵","诜","身","駪","鯓","鯵","鰺","鲹","鵢","𬳽"],qū:["伹","佉","匤","呿","坥","屈","岖","岴","嶇","憈","抾","敺","浀","煀","祛","筁","粬","胠","蛆","蛐","袪","覻","詘","诎","趍","躯","軀","阹","駆","駈","驅","驱","髷","魼","鰸","鱋","鶌","麯","麴","麹","黢","㭕","𪨰","䓛"],"sì cì":["伺"],bēng:["伻","嘣","奟","崩","嵭","閍"],"sì shì":["似"],"jiā qié gā":["伽"],"yǐ chì":["佁"],"diàn tián":["佃","钿"],"hān gàn":["佄"],mài:["佅","劢","勱","卖","唛","売","脈","衇","賣","迈","邁","霡","霢","麥","麦","鿏"],dàn:["但","僤","啖","啗","啿","噉","嚪","帎","憺","旦","柦","氮","沊","泹","淡","狚","疍","癚","禫","窞","腅","萏","蓞","蛋","蜑","觛","訑","誕","诞","贉","霮","餤","饏","駳","髧","鴠","𫢸"],bù:["佈","勏","吥","咘","埗","埠","布","廍","怖","悑","步","歨","歩","瓿","篰","荹","蔀","踄","部","郶","鈈","钚","餢"],bǐ:["佊","俾","匕","夶","妣","彼","朼","柀","比","毞","沘","疕","秕","笔","筆","粃","聛","舭","貏","鄙"],"zhāo shào":["佋"],cǐ:["佌","此","泚","皉","𫚖"],wèi:["位","卫","味","喂","墛","媦","慰","懀","未","渭","煟","熭","犚","猬","畏","緭","罻","胃","苿","菋","藯","蘶","蝟","螱","衛","衞","褽","謂","讆","讏","谓","躗","躛","軎","轊","鏏","霨","餧","餵","饖","魏","鮇","鳚"],zuǒ:["佐","左","繓"],yǎng:["佒","傟","养","坱","岟","慃","懩","攁","氧","氱","炴","痒","癢","礢","紻","蝆","軮","養","駚"],"tǐ tī":["体","體"],zhàn:["佔","偡","嶘","战","戦","戰","栈","桟","棧","湛","站","綻","绽","菚","蘸","虥","虦","譧","轏","驏"],"hé hē hè":["何"],bì:["佖","咇","哔","嗶","坒","堛","壁","奰","妼","婢","嬖","币","幣","幤","庇","庳","廦","弊","弻","弼","彃","必","怭","愊","愎","敝","斃","梐","毕","毖","毙","湢","滗","滭","潷","煏","熚","狴","獘","獙","珌","璧","畀","畢","疪","痹","痺","皕","睤","碧","筚","箅","箆","篦","篳","粊","綼","縪","繴","罼","腷","苾","荜","萆","萞","蓖","蓽","蔽","薜","蜌","袐","襅","襞","襣","觱","詖","诐","貱","贔","赑","跸","蹕","躃","躄","避","邲","鄨","鄪","鉍","鏎","鐴","铋","閇","閉","閟","闭","陛","韠","飶","饆","馝","駜","驆","髀","魓","鮅","鷝","鷩","鼊"],tuó:["佗","坨","堶","岮","槖","橐","沱","砣","砤","碢","紽","詑","跎","酡","阤","陀","陁","駝","駞","騨","驒","驝","驼","鮀","鴕","鸵","鼉","鼍","鼧","𬶍"],shé:["佘","舌","虵","蛥"],"yì dié":["佚","昳","泆","軼"],"fó fú bì bó":["佛"],"zuò zuō":["作"],gōu:["佝","沟","溝","痀","篝","簼","緱","缑","袧","褠","鈎","鉤","钩","鞲","韝"],nìng:["佞","侫","倿","寕","泞","澝","濘"],qú:["佢","劬","戵","斪","欋","欔","氍","淭","灈","爠","璖","璩","癯","磲","籧","絇","胊","臞","菃","葋","蕖","蘧","蟝","蠷","蠼","衐","衢","躣","軥","鑺","鴝","鸜","鸲","鼩"],"yōng yòng":["佣"],wǎ:["佤","咓","砙","邷"],kǎ:["佧","垰","胩","裃","鉲"],bāo:["佨","勹","包","孢","煲","笣","胞","苞","蕔","裦","褒","襃","闁","齙","龅"],"huái huí":["佪"],"gé hè":["佫"],lǎo:["佬","咾","恅","栳","狫","珯","硓","老","耂","荖","蛯","轑","銠","铑","鮱"],xiáng:["佭","庠","栙","祥","絴","翔","詳","跭"],gé:["佮","匌","呄","嗝","塥","愅","挌","搿","槅","櫊","滆","膈","臵","茖","觡","諽","輵","轕","閣","阁","隔","鞷","韐","韚","騔","骼","鮯"],yáng:["佯","劷","垟","崸","徉","扬","揚","敭","旸","昜","暘","杨","楊","洋","炀","珜","疡","瘍","眻","蛘","諹","輰","鍚","钖","阦","阳","陽","霷","颺","飏","鰑","鴹","鸉"],bǎi:["佰","捭","摆","擺","栢","百","竡","粨","襬"],fǎ:["佱","峜","法","灋","砝","鍅"],mǐng:["佲","凕","姳","慏","酩"],"èr nài":["佴"],hěn:["佷","很","狠","詪","𬣳"],huó:["佸","活"],guǐ:["佹","匦","匭","厬","垝","姽","宄","庋","庪","恑","晷","湀","癸","祪","簋","蛫","蟡","觤","詭","诡","軌","轨","陒","鬼"],quán:["佺","全","啳","埢","姾","峑","巏","拳","搼","权","楾","権","權","泉","洤","湶","牷","犈","瑔","痊","硂","筌","縓","荃","葲","蜷","蠸","觠","詮","诠","跧","踡","輇","辁","醛","銓","铨","闎","顴","颧","駩","騡","鬈","鰁","鳈","齤"],tiāo:["佻","庣","旫","祧","聎"],jiǎo:["佼","儌","孂","挢","搅","撟","撹","攪","敫","敽","敿","晈","暞","曒","灚","燞","狡","璬","皎","皦","絞","纐","绞","腳","臫","蟜","譑","賋","踋","鉸","铰","餃","饺","鱎","龣"],cì:["佽","刾","庛","朿","栨","次","絘","茦","莿","蛓","螆","賜","赐"],xíng:["侀","刑","哘","型","娙","形","洐","硎","蛵","邢","郉","鈃","鉶","銒","钘","铏","陉","陘","餳","𫰛"],tuō:["侂","咃","咜","圫","托","拕","拖","汑","脫","脱","莌","袥","託","讬","飥","饦","魠","鮵"],kǎn:["侃","偘","冚","坎","惂","砍","莰","輡","轗","顑"],zhí:["侄","値","值","埴","執","姪","嬂","戠","执","摭","植","樴","淔","漐","直","禃","絷","縶","聀","职","職","膱","蟙","跖","踯","蹠","躑","軄","釞","馽"],gāi:["侅","垓","姟","峐","晐","畡","祴","荄","該","该","豥","賅","賌","赅","陔"],lái:["來","俫","倈","崃","崍","庲","来","梾","棶","涞","淶","猍","琜","筙","箂","莱","萊","逨","郲","錸","铼","騋","鯠","鶆","麳"],kuǎ:["侉","咵","垮","銙"],gōng:["侊","公","功","匑","匔","塨","宫","宮","工","幊","弓","恭","攻","杛","碽","糼","糿","肱","觥","觵","躬","躳","髸","龔","龚","䢼"],lì:["例","俐","俪","傈","儮","儷","凓","利","力","励","勵","历","厉","厤","厯","厲","叓","吏","呖","唎","唳","嚦","囇","坜","塛","壢","娳","婯","屴","岦","悧","悷","慄","戾","搮","暦","曆","曞","朸","枥","栃","栗","栛","檪","櫔","櫪","欐","歴","歷","沥","沴","涖","溧","濿","瀝","爏","犡","猁","珕","瑮","瓅","瓑","瓥","疬","痢","癧","盭","睙","砅","砺","砾","磿","礪","礫","礰","禲","秝","立","笠","篥","粒","粝","糲","脷","苈","茘","荔","莅","莉","蒚","蒞","藶","蚸","蛎","蛠","蜧","蝷","蠇","蠣","詈","讈","赲","轢","轣","轹","酈","鉝","隶","隷","雳","靂","靋","鬁","鳨","鴗","鷅","麜","𫵷","𬍛"],yīn:["侌","凐","喑","噾","囙","因","垔","堙","姻","婣","愔","慇","栶","氤","洇","溵","濦","瘖","禋","秵","筃","絪","緸","茵","蒑","蔭","裀","諲","銦","铟","闉","阥","阴","陰","陻","隂","霒","霠","鞇","音","韾","駰","骃","齗","𬘡","𬤇","𬮱"],mǐ:["侎","孊","弭","敉","洣","渳","灖","米","粎","羋","脒","芈","葞","蔝","銤"],zhū:["侏","株","槠","橥","櫧","櫫","洙","潴","瀦","猪","珠","硃","秼","絑","茱","蕏","蛛","蝫","蠩","袾","誅","諸","诛","诸","豬","跦","邾","銖","铢","駯","鮢","鯺","鴸","鼄"],ān:["侒","偣","媕","安","峖","庵","桉","氨","盦","盫","腤","菴","萻","葊","蓭","誝","諳","谙","鞌","鞍","韽","馣","鮟","鵪","鶕","鹌","𩽾"],lù:["侓","僇","勎","勠","圥","坴","塶","娽","峍","廘","彔","录","戮","摝","椂","樚","淕","淥","渌","漉","潞","琭","璐","甪","盝","睩","硉","祿","禄","稑","穋","箓","簏","簬","簵","簶","籙","粶","蔍","蕗","虂","螰","賂","赂","趢","路","踛","蹗","輅","轆","辂","辘","逯","醁","錄","録","錴","鏴","陸","騄","騼","鯥","鴼","鵦","鵱","鷺","鹭","鹿","麓","𫘧"],móu:["侔","劺","恈","眸","蛑","謀","谋","踎","鍪","鴾","麰"],ér:["侕","儿","児","兒","峏","栭","洏","粫","而","胹","荋","袻","輀","轜","陑","隭","髵","鮞","鲕","鴯","鸸"],"dòng tǒng tóng":["侗"],chà:["侘","奼","姹","岔","汊","詫","诧"],chì:["侙","傺","勅","勑","叱","啻","彳","恜","慗","憏","懘","抶","敕","斥","杘","湁","灻","炽","烾","熾","痓","痸","瘛","翄","翅","翤","翨","腟","赤","趩","遫","鉓","雴","飭","饬","鶒","鷘"],"gòng gōng":["供","共"],zhōu:["侜","周","喌","州","徟","洲","淍","炿","烐","珘","矪","舟","謅","譸","诌","賙","赒","輈","輖","辀","週","郮","銂","霌","駲","騆","鵃","鸼"],rú:["侞","儒","嚅","如","嬬","孺","帤","曘","桇","渪","濡","筎","茹","蕠","薷","蝡","蠕","袽","襦","邚","醹","銣","铷","顬","颥","鱬","鴑","鴽"],"jiàn cún":["侟"],xiá:["侠","俠","匣","峡","峽","敮","暇","柙","炠","烚","狎","狭","狹","珨","瑕","硖","硤","碬","祫","筪","縖","翈","舝","舺","蕸","赮","轄","辖","遐","鍜","鎋","陜","陿","霞","騢","魻","鶷","黠"],lǚ:["侣","侶","儢","吕","呂","屡","屢","履","挔","捛","旅","梠","焒","祣","稆","穭","絽","縷","缕","膂","膐","褛","褸","郘","鋁","铝"],ta:["侤"],"jiǎo yáo":["侥","僥","徺"],zhēn:["侦","偵","寊","帧","帪","幀","搸","斟","桢","楨","榛","樼","殝","浈","湞","潧","澵","獉","珍","珎","瑧","甄","眞","真","砧","碪","祯","禎","禛","箴","胗","臻","葴","蒖","蓁","薽","貞","贞","轃","遉","酙","針","鉁","錱","鍼","针","鱵"],"cè zè zhāi":["侧","側"],kuài:["侩","儈","凷","哙","噲","圦","块","塊","巜","廥","快","旝","欳","狯","獪","筷","糩","脍","膾","郐","鄶","鱠","鲙"],chái:["侪","儕","喍","柴","犲","祡","豺"],nóng:["侬","儂","农","哝","噥","檂","欁","浓","濃","燶","禯","秾","穠","脓","膿","蕽","襛","譨","農","辳","醲","鬞","𬪩"],jǐn:["侭","儘","卺","厪","巹","槿","漌","瑾","紧","緊","菫","蓳","謹","谨","錦","锦","饉","馑"],"hóu hòu":["侯","矦"],jiǒng:["侰","僒","冏","囧","泂","澃","炯","烱","煚","煛","熲","燛","窘","綗","褧","迥","逈","顈","颎","䌹"],"chěng tǐng":["侱"],"zhèn zhēn":["侲","揕"],zuò:["侳","做","唑","坐","岝","岞","座","祚","糳","胙","葃","葄","蓙","袏","阼"],qīn:["侵","兓","媇","嵚","嶔","欽","衾","誛","钦","顉","駸","骎","鮼"],jú:["侷","啹","婅","局","巈","椈","橘","泦","淗","湨","焗","犑","狊","粷","菊","蘜","趜","跼","蹫","輂","郹","閰","駶","驧","鵙","鵴","鶪","鼰","鼳","䴗"],"shù dōu":["侸"],tǐng:["侹","圢","娗","挺","涏","烶","珽","脡","艇","誔","頲","颋"],shèn:["侺","愼","慎","昚","涁","渗","滲","瘆","瘮","眘","祳","肾","胂","脤","腎","蜃","蜄","鋠"],"tuì tuó":["侻"],nán:["侽","喃","娚","抩","暔","枏","柟","楠","男","畘","莮","萳","遖"],xiāo:["侾","哓","嘵","嚻","囂","婋","宯","宵","庨","彇","揱","枭","枵","梟","櫹","歊","毊","消","潇","瀟","灱","灲","烋","焇","猇","獢","痚","痟","硝","硣","窙","箫","簘","簫","綃","绡","翛","膮","萧","蕭","虈","虓","蟂","蟏","蟰","蠨","踃","逍","銷","销","霄","颵","驍","骁","髇","髐","魈","鴞","鴵","鷍","鸮"],"biàn pián":["便","緶","缏"],tuǐ:["俀","腿","蹆","骽"],xì:["係","匸","卌","呬","墍","屃","屓","屭","忥","怬","恄","椞","潝","潟","澙","熂","犔","磶","禊","細","綌","縘","细","绤","舃","舄","蕮","虩","衋","覤","赩","趇","郤","釳","阋","隙","隟","霼","餼","饩","鬩","黖"],cù:["促","媨","憱","猝","瘄","瘯","簇","縬","脨","蔟","誎","趗","踧","踿","蹙","蹴","蹵","醋","顣","鼀"],é:["俄","囮","娥","峉","峨","峩","涐","珴","皒","睋","磀","莪","訛","誐","譌","讹","迗","鈋","鋨","锇","頟","額","额","魤","鵝","鵞","鹅"],qiú:["俅","叴","唒","囚","崷","巯","巰","扏","梂","殏","毬","求","汓","泅","浗","湭","煪","犰","玌","球","璆","皳","盚","紌","絿","肍","芁","莍","虬","虯","蛷","裘","觓","觩","訄","訅","賕","赇","逎","逑","遒","酋","釚","釻","銶","頄","鮂","鯄","鰽","鼽","𨱇"],xú:["俆","徐","禑"],"guàng kuāng":["俇"],kù:["俈","喾","嚳","库","庫","廤","瘔","絝","绔","袴","裤","褲","酷"],wù:["俉","务","務","勿","卼","坞","塢","奦","婺","寤","屼","岉","嵨","忢","悞","悟","悮","戊","扤","晤","杌","溩","焐","熃","物","痦","矹","窹","粅","蘁","誤","误","鋈","阢","隖","雾","霚","霧","靰","騖","骛","鶩","鹜","鼿","齀"],jùn:["俊","儁","呁","埈","寯","峻","懏","捃","攟","晙","棞","燇","珺","畯","竣","箟","蜠","賐","郡","陖","餕","馂","駿","骏","鵔","鵕","鵘","䐃"],liáng:["俍","墚","梁","椋","樑","粮","粱","糧","良","輬","辌","𫟅"],zǔ:["俎","唨","爼","祖","組","组","詛","诅","鎺","阻","靻"],"qiào xiào":["俏"],yǒng:["俑","勇","勈","咏","埇","塎","嵱","彮","怺","恿","悀","惥","愑","愹","慂","柡","栐","永","泳","湧","甬","蛹","詠","踊","踴","鯒","鲬"],hùn:["俒","倱","圂","尡","慁","掍","溷","焝","睴","觨","諢","诨"],jìng:["俓","傹","境","妌","婙","婧","弪","弳","径","徑","敬","曔","桱","梷","浄","瀞","獍","痉","痙","竞","竟","竫","競","竸","胫","脛","莖","誩","踁","迳","逕","鏡","镜","靖","静","靜","鵛"],sàn:["俕","閐"],pěi:["俖"],sú:["俗"],xī:["俙","僖","兮","凞","卥","厀","吸","唏","唽","嘻","噏","嚱","夕","奚","嬆","嬉","屖","嵠","巇","希","徆","徯","息","悉","悕","惁","惜","昔","晞","晰","晳","曦","析","桸","榽","樨","橀","欷","氥","汐","浠","淅","渓","溪","烯","焁","焈","焟","熄","熈","熙","熹","熺","熻","燨","爔","牺","犀","犠","犧","琋","瘜","皙","睎","瞦","矽","硒","磎","礂","稀","穸","窸","粞","糦","緆","繥","羲","翕","翖","肸","肹","膝","舾","莃","菥","蒠","蜥","螅","蟋","蠵","西","觹","觽","觿","譆","谿","豀","豨","豯","貕","赥","邜","鄎","酅","醯","釸","錫","鏭","鐊","鑴","锡","隵","餏","饎","饻","鯑","鵗","鸂","鼷"],lǐ:["俚","娌","峢","峲","李","欚","浬","澧","理","礼","禮","粴","裏","裡","豊","逦","邐","醴","鋰","锂","鯉","鱧","鱱","鲤","鳢"],bǎo:["保","堢","媬","宝","寚","寳","寶","珤","緥","葆","藵","褓","賲","靌","飹","飽","饱","駂","鳵","鴇","鸨"],"yú shù yù":["俞"],"sì qí":["俟"],"xìn shēn":["信"],xiū:["俢","修","咻","庥","樇","烌","羞","脙","脩","臹","貅","銝","鎀","飍","饈","馐","髤","髹","鮴","鱃","鵂","鸺","䗛"],dì:["俤","偙","僀","埊","墑","墬","娣","帝","怟","旳","梊","焍","玓","甋","眱","睇","碲","祶","禘","第","締","缔","腣","菂","蒂","蔕","蝃","蝭","螮","諦","谛","踶","递","逓","遞","遰","鉪","𤧛","䗖"],chóu:["俦","儔","嬦","惆","愁","懤","栦","燽","畴","疇","皗","稠","筹","籌","絒","綢","绸","菗","詶","讎","讐","踌","躊","酧","酬","醻","雔","雠","雦"],zhì:["俧","偫","儨","制","劕","垁","娡","寘","帙","帜","幟","庢","庤","廌","彘","徏","徝","志","忮","懥","懫","挃","挚","掷","摯","擲","旘","晊","智","栉","桎","梽","櫍","櫛","治","洷","滍","滞","滯","潌","瀄","炙","熫","狾","猘","璏","瓆","痔","痣","礩","祑","秩","秷","稚","稺","穉","窒","紩","緻","置","翐","膣","至","致","芖","蛭","袟","袠","製","覟","觗","觯","觶","誌","豑","豒","貭","質","贄","质","贽","跱","踬","躓","輊","轾","郅","銍","鋕","鑕","铚","锧","陟","隲","雉","駤","騭","騺","驇","骘","鯯","鴙","鷙","鸷","𬃊"],"liǎ liǎng":["俩"],jiǎn:["俭","倹","儉","减","剪","堿","弿","彅","戩","戬","拣","挸","捡","揀","撿","枧","柬","梘","检","検","檢","減","湕","瀽","瑐","睑","瞼","硷","碱","礆","笕","筧","简","簡","絸","繭","翦","茧","藆","蠒","裥","襇","襉","襺","詃","謇","謭","譾","谫","趼","蹇","鐗","鬋","鰎","鹸","鹻","鹼"],huò:["俰","咟","嚯","嚿","奯","彠","惑","或","擭","旤","曤","檴","沎","湱","瀖","獲","癨","眓","矐","祸","禍","穫","窢","耯","臛","艧","获","蒦","藿","蠖","謋","貨","货","鍃","鑊","镬","雘","霍","靃","韄","㸌"],"jù jū":["俱","据","鋸","锯"],xiào:["俲","傚","効","咲","哮","啸","嘋","嘨","嘯","孝","效","斅","斆","歗","涍","熽","笑","詨","誟"],pái:["俳","徘","牌","犤","猅","簰","簲","輫"],biào:["俵","鰾","鳔"],"chù tì":["俶"],fèi:["俷","剕","厞","吠","屝","废","廃","廢","昲","曊","櫠","沸","濷","狒","癈","肺","萉","費","费","鐨","镄","陫","靅","鼣"],fèng:["俸","凤","奉","湗","焨","煈","賵","赗","鳯","鳳","鴌"],ǎn:["俺","唵","埯","揞","罯","銨","铵"],bèi:["俻","倍","偝","偹","備","僃","备","悖","惫","愂","憊","昁","梖","焙","牬","犕","狈","狽","珼","琲","碚","禙","糒","苝","蓓","蛽","褙","貝","贝","軰","輩","辈","邶","郥","鄁","鋇","鐾","钡","鞁","鞴","𬇙"],yù:["俼","儥","喅","喩","喻","域","堉","妪","嫗","寓","峪","嶎","庽","彧","御","愈","慾","戫","昱","棛","棜","棫","櫲","欎","欝","欲","毓","浴","淯","滪","潏","澦","灪","焴","煜","燏","燠","爩","狱","獄","玉","琙","瘉","癒","砡","硢","硲","礇","礖","礜","禦","秗","稢","稶","篽","籞","籲","粖","緎","罭","聿","肀","艈","芋","芌","茟","蒮","蓣","蓹","蕷","蘌","蜟","蜮","袬","裕","誉","諭","譽","谕","豫","軉","輍","逳","遇","遹","郁","醧","鈺","鋊","錥","鐭","钰","閾","阈","雤","霱","預","预","飫","饇","饫","馭","驈","驭","鬰","鬱","鬻","魊","鱊","鳿","鴥","鴧","鴪","鵒","鷸","鸒","鹆","鹬"],xīn:["俽","噺","妡","嬜","廞","心","忄","忻","惞","新","昕","杺","欣","歆","炘","盺","薪","訢","辛","邤","鈊","鋅","鑫","锌","馨","馫","䜣","𫷷"],"hǔ chí":["俿"],jiù:["倃","僦","匓","匛","匶","厩","咎","就","廄","廏","廐","慦","捄","救","旧","柩","柾","桕","欍","殧","疚","臼","舅","舊","鯦","鷲","鹫","麔","齨","㠇"],yáo:["倄","傜","嗂","垚","堯","姚","媱","尧","尭","峣","嶢","嶤","徭","揺","搖","摇","摿","暚","榣","烑","爻","猺","珧","瑤","瑶","磘","窑","窯","窰","肴","蘨","謠","謡","谣","軺","轺","遙","遥","邎","顤","颻","飖","餆","餚","鰩","鱙","鳐"],"cuì zú":["倅"],"liǎng liǎ":["倆"],wǎn:["倇","唍","婉","惋","挽","晚","晥","晩","晼","梚","椀","琬","畹","皖","盌","碗","綩","綰","绾","脘","萖","踠","輓","鋔"],zǒng:["倊","偬","傯","嵸","总","惣","捴","搃","摠","燪","総","緫","縂","總","蓗"],guān:["倌","关","官","棺","瘝","癏","窤","蒄","関","闗","關","鰥","鱞","鳏"],tiǎn:["倎","唺","忝","悿","晪","殄","淟","睓","腆","舔","覥","觍","賟","錪","餂"],mén:["們","扪","捫","璊","菛","虋","鍆","钔","門","閅","门","𫞩"],"dǎo dào":["倒"],"tán tàn":["倓","埮"],"juè jué":["倔"],chuí:["倕","垂","埀","捶","搥","桘","棰","槌","箠","腄","菙","錘","鎚","锤","陲","顀"],xìng:["倖","姓","婞","嬹","幸","性","悻","杏","涬","緈","臖","荇","莕","葕"],péng:["倗","傰","塜","塳","弸","憉","捀","朋","棚","椖","樥","硼","稝","竼","篷","纄","膨","芃","蓬","蘕","蟚","蟛","袶","輣","錋","鑝","韸","韼","騯","髼","鬅","鬔","鵬","鹏"],"tǎng cháng":["倘"],hòu:["候","厚","后","垕","堠","後","洉","茩","豞","逅","郈","鮜","鱟","鲎","鲘"],tì:["倜","剃","嚏","嚔","屉","屜","悌","悐","惕","惖","戻","掦","替","朑","歒","殢","涕","瓋","笹","籊","薙","褅","逖","逷","髰","鬀","鬄"],gàn:["倝","凎","幹","榦","檊","淦","灨","盰","紺","绀","詌","贑","赣","骭","㽏"],"liàng jìng":["倞","靓"],suī:["倠","哸","夊","滖","濉","眭","睢","芕","荽","荾","虽","雖","鞖"],"chàng chāng":["倡"],jié:["倢","偼","傑","刦","刧","刼","劫","劼","卩","卪","婕","媫","孑","岊","崨","嵥","嶻","巀","幯","截","捷","掶","擮","昅","杢","杰","桀","桝","楬","楶","榤","洁","滐","潔","狤","睫","礍","竭","節","羯","莭","蓵","蛣","蜐","蠘","蠞","蠽","衱","袺","訐","詰","誱","讦","踕","迼","鉣","鍻","镼","頡","鮚","鲒","㛃"],"kǒng kōng":["倥"],juàn:["倦","劵","奆","慻","桊","淃","狷","獧","眷","睊","睠","絭","絹","绢","罥","羂","腃","蔨","鄄","餋"],zōng:["倧","堫","宗","嵏","嵕","惾","朡","棕","椶","熧","猣","磫","緃","翪","腙","葼","蝬","豵","踨","踪","蹤","鍐","鑁","騌","騣","骔","鬃","鬉","鬷","鯮","鯼"],ní:["倪","坭","埿","尼","屔","怩","淣","猊","籾","聣","蚭","蜺","觬","貎","跜","輗","郳","鈮","铌","霓","馜","鯢","鲵","麑","齯","𫐐","𫠜"],zhuō:["倬","拙","捉","桌","梲","棁","棳","槕","涿","窧","鐯","䦃"],"wō wēi":["倭"],luǒ:["倮","剆","曪","瘰","癳","臝","蓏","蠃","裸","躶"],sōng:["倯","凇","娀","崧","嵩","庺","憽","松","枀","枩","柗","梥","檧","淞","濍","硹","菘","鬆"],lèng:["倰","堎","愣","睖","踜"],zì:["倳","剚","字","恣","渍","漬","牸","眥","眦","胔","胾","自","茡","荢"],bèn:["倴","坌","捹","撪","渀","笨","逩"],cǎi:["倸","啋","婇","彩","採","棌","毝","睬","綵","跴","踩"],zhài:["债","債","寨","瘵","砦"],yē:["倻","吔","噎","擨","暍","椰","歋","潱","蠮"],shà:["倽","唼","喢","歃","箑","翜","翣","萐","閯","霎"],qīng:["倾","傾","卿","圊","寈","氢","氫","淸","清","蜻","軽","輕","轻","郬","錆","鑋","靑","青","鯖"],yīng:["偀","嘤","噟","嚶","婴","媖","嫈","嬰","孆","孾","愥","撄","攖","朠","桜","樱","櫻","渶","煐","珱","瑛","璎","瓔","甇","甖","碤","礯","緓","纓","绬","缨","罂","罃","罌","膺","英","莺","蘡","蝧","蠳","褮","譻","賏","軈","鑍","锳","霙","韺","鴬","鶑","鶧","鶯","鷪","鷹","鸎","鸚","鹦","鹰","䓨"],"chēng chèn":["偁","爯"],ruǎn:["偄","朊","瑌","瓀","碝","礝","腝","軟","輭","软","阮"],"zhòng tóng":["偅"],chǔn:["偆","惷","睶","萶","蠢","賰"],"jiǎ jià":["假"],"jì jié":["偈"],"bǐng bìng":["偋"],ruò:["偌","叒","嵶","弱","楉","焫","爇","箬","篛","蒻","鄀","鰙","鰯","鶸"],tí:["偍","厗","啼","嗁","崹","漽","瑅","睼","禵","稊","緹","缇","罤","蕛","褆","謕","趧","蹄","蹏","醍","鍗","題","题","騠","鮷","鯷","鳀","鵜","鷤","鹈","𫘨"],wēi:["偎","危","喴","威","媙","嶶","巍","微","愄","揋","揻","椳","楲","溦","烓","煨","燰","癓","縅","葨","葳","薇","蜲","蝛","覣","詴","逶","隇","隈","霺","鰃","鰄","鳂"],piān:["偏","囨","媥","楄","犏","篇","翩","鍂"],yàn:["偐","厌","厭","唁","喭","嚈","嚥","堰","妟","姲","嬊","嬿","宴","彥","彦","敥","晏","暥","曕","曣","滟","灎","灔","灧","灩","焔","焰","焱","熖","燄","牪","猒","砚","硯","艳","艶","艷","覎","觃","觾","諺","讌","讞","谚","谳","豓","豔","贋","贗","赝","軅","酀","酽","醼","釅","雁","餍","饜","騐","験","騴","驗","驠","验","鬳","鳫","鴈","鴳","鷃","鷰","齞"],"tǎng dàng":["偒"],è:["偔","匎","卾","厄","呝","咢","噩","垩","堊","堮","岋","崿","廅","悪","愕","戹","扼","搤","搹","擜","櫮","歞","歺","湂","琧","砈","砐","硆","腭","苊","萼","蕚","蚅","蝁","覨","諤","讍","谔","豟","軛","軶","轭","遌","遏","遻","鄂","鈪","鍔","鑩","锷","阨","阸","頞","顎","颚","餓","餩","饿","鰐","鰪","鱷","鳄","鶚","鹗","齃","齶","𫫇","𥔲"],xié:["偕","勰","协","協","嗋","垥","奊","恊","愶","拹","携","撷","擕","擷","攜","斜","旪","熁","燲","綊","緳","縀","缬","翓","胁","脅","脇","脋","膎","蝢","衺","襭","諧","讗","谐","鞋","鞵","龤","㙦"],chě:["偖","扯","撦"],shěng:["偗","渻","眚"],chā:["偛","嗏","扠","挿","插","揷","疀","臿","艖","銟","鍤","锸","餷"],huáng:["偟","凰","喤","堭","墴","媓","崲","徨","惶","楻","湟","煌","獚","瑝","璜","癀","皇","磺","穔","篁","簧","艎","葟","蝗","蟥","諻","趪","遑","鍠","鐄","锽","隍","韹","餭","騜","鰉","鱑","鳇","鷬","黃","黄","𨱑"],yǎo:["偠","咬","婹","宎","岆","杳","柼","榚","溔","狕","窅","窈","舀","苭","闄","騕","鷕","齩"],"chǒu qiào":["偢"],yóu:["偤","尤","庮","怣","沋","油","浟","游","犹","猶","猷","由","疣","秞","肬","莜","莸","蕕","蚰","蝣","訧","輏","輶","逰","遊","邮","郵","鈾","铀","駀","魷","鮋","鱿","鲉","𬨎"],xū:["偦","墟","媭","嬃","楈","欨","歔","燸","疞","盱","綇","縃","繻","胥","蕦","虗","虚","虛","蝑","裇","訏","許","諝","譃","谞","鑐","需","須","须","顼","驉","鬚","魆","魖","𬣙","𦈡"],zhā:["偧","哳","抯","挓","揸","摣","樝","渣","皶","觰","譇","齄","齇"],cī:["偨","疵","蠀","趀","骴","髊","齹"],bī:["偪","屄","楅","毴","豍","逼","鰏","鲾","鵖"],xún:["偱","噚","寻","尋","峋","巡","廵","循","恂","揗","攳","旬","杊","栒","桪","樳","洵","浔","潯","燅","燖","珣","璕","畃","紃","荀","蟳","詢","询","鄩","鱏","鱘","鲟","𬘓","𬩽","𬍤","𬊈"],"cāi sī":["偲"],duān:["偳","媏","端","褍","鍴"],ǒu:["偶","吘","嘔","耦","腢","蕅","藕","𬉼","𠙶"],tōu:["偷","偸","鍮"],"zán zá zǎ":["偺"],"lǚ lóu":["偻","僂"],fèn:["偾","僨","奋","奮","弅","忿","愤","憤","瀵","瞓","秎","粪","糞","膹","鱝","鲼"],"kuǐ guī":["傀"],sǒu:["傁","叜","叟","嗾","櫢","瞍","薮","藪"],"zhì sī tí":["傂"],sù:["傃","僳","嗉","塐","塑","夙","嫊","愫","憟","榡","樎","樕","殐","泝","涑","溯","溸","潚","潥","玊","珟","璛","簌","粛","粟","素","縤","肃","肅","膆","蔌","藗","觫","訴","謖","诉","谡","趚","蹜","速","遡","遬","鋉","餗","驌","骕","鱐","鷫","鹔","𫗧"],xiā:["傄","煆","瞎","虲","谺","颬","鰕"],"yuàn yuán":["傆","媛"],rǒng:["傇","冗","宂","氄","軵"],nù:["傉","怒"],yùn:["傊","孕","恽","惲","愠","慍","枟","腪","蕴","薀","藴","蘊","褞","貟","运","運","郓","鄆","酝","醖","醞","韗","韞","韵","韻","餫"],"gòu jiǎng":["傋"],mà:["傌","嘜","榪","睰","祃","禡","罵","閁","駡","骂","鬕"],bàng:["傍","塝","棒","玤","稖","艕","蒡","蜯","謗","谤","鎊","镑"],diān:["傎","厧","嵮","巅","巓","巔","掂","攧","敁","槇","滇","癫","癲","蹎","顚","顛","颠","齻"],táng:["傏","唐","啺","坣","堂","塘","搪","棠","榶","溏","漟","煻","瑭","磄","禟","篖","糃","糖","糛","膅","膛","蓎","螗","螳","赯","踼","鄌","醣","鎕","隚","餹","饄","鶶","䣘"],hào:["傐","哠","恏","昊","昦","晧","暠","暤","暭","曍","浩","淏","澔","灏","灝","皓","皜","皞","皡","皥","耗","聕","薃","號","鄗","顥","颢","鰝"],"xī xì":["傒"],shān:["傓","删","刪","剼","圸","山","挻","搧","柵","檆","潸","澘","煽","狦","珊","笘","縿","羴","羶","脠","舢","芟","衫","跚","軕","邖","閊","鯅"],"qiàn jiān":["傔"],"què jué":["傕","埆"],"cāng chen":["傖"],róng:["傛","媶","嫆","嬫","容","峵","嵘","嶸","戎","搈","曧","栄","榕","榮","榵","毧","溶","瀜","烿","熔","狨","瑢","穁","絨","绒","羢","肜","茙","茸","荣","蓉","蝾","融","螎","蠑","褣","鎔","镕","駥"],"tà tàn":["傝"],suō:["傞","唆","嗍","嗦","娑","摍","桫","梭","睃","簑","簔","羧","莏","蓑","趖","鮻"],dǎi:["傣","歹"],zài:["傤","儎","再","在","扗","洅","載","酨"],gǔ:["傦","古","啒","尳","愲","榖","榾","汩","淈","濲","瀔","牯","皷","皼","盬","瞽","穀","罟","羖","股","脵","臌","薣","蛊","蠱","詁","诂","轂","逧","鈷","钴","餶","馉","鼓","鼔","𦙶"],bīn:["傧","宾","彬","斌","椕","滨","濒","濱","濵","瀕","繽","缤","虨","豩","豳","賓","賔","邠","鑌","镔","霦","顮"],chǔ:["储","儲","杵","椘","楚","楮","檚","濋","璴","础","礎","禇","處","齭","齼","𬺓"],nuó:["傩","儺","挪","梛","橠"],"cān càn":["傪"],lěi:["傫","儡","厽","垒","塁","壘","壨","櫐","灅","癗","矋","磊","礨","耒","蕌","蕾","藟","蘽","蠝","誄","讄","诔","鑸","鸓"],cuī:["催","凗","墔","崔","嵟","慛","摧","榱","獕","磪","鏙"],yōng:["傭","嗈","墉","壅","嫞","庸","廱","慵","拥","擁","滽","灉","牅","痈","癕","癰","臃","邕","郺","鄘","鏞","镛","雍","雝","饔","鱅","鳙","鷛"],"zāo cáo":["傮"],sǒng:["傱","嵷","怂","悚","愯","慫","竦","耸","聳","駷","㧐"],ào:["傲","坳","垇","墺","奡","嫯","岙","岰","嶴","懊","擙","澳","鏊","驁","骜"],"qī còu":["傶"],chuǎng:["傸","磢","闖","闯"],shǎ:["傻","儍"],hàn:["傼","垾","悍","憾","扞","捍","撖","撼","旱","晘","暵","汉","涆","漢","瀚","焊","猂","皔","睅","翰","莟","菡","蛿","蜭","螒","譀","輚","釬","銲","鋎","雗","頷","顄","颔","駻","鶾"],zhāng:["傽","嫜","张","張","彰","慞","暲","樟","漳","獐","璋","章","粻","蔁","蟑","遧","鄣","鏱","餦","騿","鱆","麞"],"yān yàn":["傿","墕","嬮"],"piào biāo":["僄","骠"],liàn:["僆","堜","媡","恋","戀","楝","殓","殮","湅","潋","澰","瀲","炼","煉","瑓","練","纞","练","萰","錬","鍊","鏈","链","鰊","𬶠"],màn:["㵘","僈","墁","幔","慢","曼","漫","澷","熳","獌","縵","缦","蔄","蘰","鄤","鏝","镘","𬜬"],"tàn tǎn":["僋"],yíng:["僌","営","塋","嬴","攍","楹","櫿","溁","溋","滢","潆","濙","濚","濴","瀅","瀛","瀠","瀯","灐","灜","熒","營","瑩","盁","盈","禜","籝","籯","縈","茔","荧","莹","萤","营","萦","萾","蓥","藀","蛍","蝇","蝿","螢","蠅","謍","贏","赢","迎","鎣"],dòng:["働","冻","凍","动","動","姛","戙","挏","栋","棟","湩","硐","胨","胴","腖","迵","霘","駧"],zhuàn:["僎","啭","囀","堟","撰","灷","瑑","篆","腞","蒃","襈","譔","饌","馔"],xiàng:["像","勨","向","嚮","姠","嶑","曏","橡","珦","缿","蟓","衖","襐","象","鐌","項","项","鱌"],shàn:["僐","善","墠","墡","嬗","擅","敾","椫","樿","歚","汕","灗","疝","磰","繕","缮","膳","蟮","蟺","訕","謆","譱","讪","贍","赡","赸","鄯","鐥","饍","騸","骟","鱓","鱔","鳝","𫮃"],"tuí tuǐ":["僓"],zǔn:["僔","噂","撙","譐"],pú:["僕","匍","圤","墣","濮","獛","璞","瞨","穙","莆","菐","菩","葡","蒱","蒲","贌","酺","鏷","镤"],láo:["僗","劳","労","勞","哰","崂","嶗","憥","朥","浶","牢","痨","癆","窂","簩","醪","鐒","铹","顟","髝","𫭼"],chǎng:["僘","厰","廠","敞","昶","氅","鋹","𬬮"],guāng:["僙","光","咣","垙","姯","洸","灮","炗","炚","炛","烡","珖","胱","茪","輄","銧","黆","𨐈"],liáo:["僚","嘹","嫽","寥","寮","尞","屪","嵺","嶚","嶛","廫","憀","敹","暸","橑","獠","璙","疗","療","竂","簝","繚","缭","聊","膋","膫","藔","蟟","豂","賿","蹘","辽","遼","飉","髎","鷯","鹩"],dèng:["僜","凳","墱","嶝","櫈","瞪","磴","覴","邓","鄧","隥"],"chán zhàn zhuàn":["僝"],bō:["僠","嶓","拨","撥","播","波","溊","玻","癶","盋","砵","碆","礡","缽","菠","袰","蹳","鉢","钵","餑","饽","驋","鱍","𬭛"],huì:["僡","匯","卉","喙","嘒","嚖","圚","嬒","寭","屶","屷","彗","彙","彚","徻","恚","恵","惠","慧","憓","懳","晦","暳","槥","橞","檅","櫘","汇","泋","滙","潓","烩","燴","獩","璤","瞺","硊","秽","穢","篲","絵","繪","绘","翙","翽","荟","蔧","蕙","薈","薉","蟪","詯","誨","諱","譓","譿","讳","诲","賄","贿","鐬","闠","阓","靧","頮","顪","颒","餯","𬤝","𬭬"],chuǎn:["僢","喘","舛","荈","踳"],"tiě jiàn":["僣"],sēng:["僧","鬙"],xiàn:["僩","僴","哯","垷","塪","姭","娊","宪","岘","峴","憲","撊","晛","橌","橺","涀","瀗","献","獻","现","現","県","睍","粯","糮","絤","綫","線","线","缐","羡","羨","腺","臔","臽","苋","莧","誢","豏","鋧","錎","限","陥","陷","霰","餡","馅","麲","鼸","𬀪","𪾢"],"yù jú":["僪"],"è wū":["僫"],"tóng zhuàng":["僮"],lǐn:["僯","凛","凜","廩","廪","懍","懔","撛","檁","檩","澟","癛","癝"],gù:["僱","凅","固","堌","崓","崮","故","梏","棝","牿","痼","祻","錮","锢","雇","顧","顾","鯝","鲴"],jiāng:["僵","壃","姜","橿","殭","江","畕","疅","礓","繮","缰","翞","茳","葁","薑","螀","螿","豇","韁","鱂","鳉"],mǐn:["僶","冺","刡","勄","悯","惽","愍","慜","憫","抿","敃","敏","敯","泯","潣","皿","笢","笽","簢","蠠","閔","閩","闵","闽","鰵","鳘","黽"],jìn:["僸","凚","噤","嚍","墐","壗","妗","嬧","搢","晉","晋","枃","殣","浕","浸","溍","濅","濜","烬","煡","燼","琎","瑨","璶","盡","祲","縉","缙","荩","藎","覲","觐","賮","贐","赆","近","进","進","靳","齽"],"jià jie":["價"],qiào:["僺","峭","帩","撬","殻","窍","竅","誚","诮","躈","陗","鞩","韒","髚"],pì:["僻","媲","嫓","屁","澼","甓","疈","譬","闢","鷿","鸊","䴙"],sài:["僿","簺","賽","赛"],"chán tǎn shàn":["儃"],"dāng dàng":["儅","当","闣"],xuān:["儇","喧","塇","媗","宣","愃","愋","揎","昍","暄","煊","煖","瑄","睻","矎","禤","箮","翧","翾","萱","萲","蓒","蕿","藼","蘐","蝖","蠉","諠","諼","譞","谖","軒","轩","鍹","駽","鰚","𫓶","𫍽"],"dān dàn":["儋","擔","瘅"],càn:["儏","澯","灿","燦","璨","粲","薒","謲"],"bīn bìn":["儐"],"án àn":["儑"],tái:["儓","坮","嬯","抬","擡","檯","炱","炲","籉","臺","薹","跆","邰","颱","鮐","鲐"],lán:["儖","兰","囒","婪","岚","嵐","幱","拦","攔","斓","斕","栏","欄","欗","澜","瀾","灆","灡","燣","燷","璼","篮","籃","籣","繿","葻","蓝","藍","蘫","蘭","褴","襕","襤","襴","襽","譋","讕","谰","躝","鑭","镧","闌","阑","韊","𬒗"],"nǐ yì ài yí":["儗"],méng:["儚","幪","曚","朦","橗","檬","氋","溕","濛","甍","甿","盟","礞","艨","莔","萌","蕄","虻","蝱","鄳","鄸","霿","靀","顭","饛","鯍","鸏","鹲","𫑡","㠓"],níng:["儜","凝","咛","嚀","嬣","柠","橣","檸","狞","獰","聍","聹","薴","鑏","鬡","鸋"],qióng:["儝","卭","宆","惸","憌","桏","橩","焪","焭","煢","熍","琼","瓊","睘","穷","穹","窮","竆","笻","筇","舼","茕","藑","藭","蛩","蛬","赹","跫","邛","銎","䓖"],liè:["儠","冽","列","劣","劽","埒","埓","姴","峛","巤","挒","捩","栵","洌","浖","烈","烮","煭","犣","猎","猟","獵","聗","脟","茢","蛚","趔","躐","迾","颲","鬛","鬣","鮤","鱲","鴷","䴕","𫚭"],kuǎng:["儣","夼","懭"],bào:["儤","勽","報","忁","报","抱","曓","爆","犦","菢","虣","蚫","豹","鉋","鑤","铇","骲","髱","鮑","鲍"],biāo:["儦","墂","幖","彪","标","標","滮","瀌","熛","爂","猋","瘭","磦","膘","臕","謤","贆","鏢","鑣","镖","镳","颮","颷","飆","飇","飈","飊","飑","飙","飚","驫","骉","髟"],zǎn:["儧","儹","噆","攅","昝","趱","趲"],háo:["儫","嗥","嘷","噑","嚎","壕","椃","毜","毫","濠","獆","獔","竓","籇","蚝","蠔","譹","豪"],qìng:["儬","凊","庆","慶","櫦","濪","碃","磬","罄","靘"],chèn:["儭","嚫","榇","櫬","疢","衬","襯","讖","谶","趁","趂","齓","齔","龀"],téng:["儯","幐","滕","漛","疼","籐","籘","縢","腾","藤","虅","螣","誊","謄","邆","駦","騰","驣","鰧","䲢"],"lǒng lóng lòng":["儱"],"chán chàn":["儳"],"ráng xiāng":["儴","勷"],"huì xié":["儶"],luó:["儸","攞","椤","欏","猡","玀","箩","籮","罗","羅","脶","腡","萝","蘿","螺","覼","逻","邏","鏍","鑼","锣","镙","饠","騾","驘","骡","鸁"],léi:["儽","嫘","檑","欙","瓃","畾","縲","纍","纝","缧","罍","羸","蔂","蘲","虆","轠","鐳","鑘","镭","雷","靁","鱩","鼺"],"nàng nāng":["儾"],"wù wū":["兀"],yǔn:["允","喗","夽","抎","殒","殞","狁","磒","荺","賱","鈗","阭","陨","隕","霣","馻","齫","齳"],zān:["兂","橵","簪","簮","糌","鐕","鐟","鵤"],yuán:["元","円","原","厡","厵","园","圆","圎","園","圓","垣","塬","媴","嫄","援","榞","榬","橼","櫞","沅","湲","源","溒","爰","猨","猿","笎","緣","縁","缘","羱","茒","薗","蝝","蝯","螈","袁","褤","謜","轅","辕","邍","邧","酛","鈨","鎱","騵","魭","鶢","鶰","黿","鼋","𫘪"],xiōng:["兄","兇","凶","匂","匈","哅","忷","恟","汹","洶","胷","胸","芎","訩","詾","讻"],chōng:["充","嘃","忡","憃","憧","摏","沖","浺","珫","罿","翀","舂","艟","茺","衝","蹖","㳘"],zhào:["兆","垗","旐","曌","枛","櫂","照","燳","狣","瞾","笊","罀","罩","羄","肁","肇","肈","詔","诏","赵","趙","鮡","𬶐"],"duì ruì yuè":["兊","兌","兑"],kè:["克","刻","勀","勊","堁","娔","客","恪","愙","氪","溘","碦","緙","缂","艐","衉","課","课","錁","锞","騍","骒"],tù:["兎","兔","堍","迌","鵵"],dǎng:["党","攩","欓","譡","讜","谠","黨","𣗋"],dōu:["兜","兠","唗","橷","篼","蔸"],huǎng:["兤","奛","幌","怳","恍","晄","炾","熀","縨","詤","謊","谎"],rù:["入","嗕","媷","扖","杁","洳","溽","縟","缛","蓐","褥","鳰"],nèi:["內","氝","氞","錗"],"yú shù":["兪"],"liù lù":["六"],han:["兯","爳"],tiān:["兲","天","婖","添","酟","靔","靝","黇"],"xīng xìng":["兴"],diǎn:["典","嚸","奌","婰","敟","椣","点","碘","蒧","蕇","踮","點"],"zī cí":["兹"],jiān:["兼","冿","囏","坚","堅","奸","姦","姧","尖","幵","惤","戋","戔","搛","椾","樫","櫼","歼","殱","殲","湔","瀐","瀸","煎","熞","熸","牋","瑊","睷","礛","礷","笺","箋","緘","縑","缄","缣","肩","艰","艱","菅","菺","葌","蒹","蔪","蕑","蕳","虃","譼","豜","鑯","雃","鞯","韀","韉","餰","馢","鰔","鰜","鰹","鲣","鳒","鵑","鵳","鶼","鹣","麉"],shòu:["兽","受","售","壽","夀","寿","授","狩","獣","獸","痩","瘦","綬","绶","膄"],jì:["兾","冀","剂","剤","劑","勣","坖","垍","塈","妓","季","寂","寄","廭","彑","徛","忌","悸","惎","懻","技","旡","既","旣","暨","暩","曁","梞","檕","檵","洎","漃","漈","瀱","痵","癠","禝","稩","稷","穄","穊","穧","紀","継","績","繋","繼","继","绩","罽","臮","芰","茍","茤","葪","蓟","蔇","薊","蘎","蘮","蘻","裚","襀","覬","觊","計","記","誋","计","记","跡","跽","蹟","迹","际","際","霁","霽","驥","骥","髻","鬾","魝","魥","鯚","鯽","鰶","鰿","鱀","鱭","鲚","鲫","鵋","鷑","齌","𪟝","𬶨","𬶭"],jiōng:["冂","冋","坰","埛","扃","蘏","蘔","駉","駫","𬳶"],mào:["冃","冐","媢","帽","愗","懋","暓","柕","楙","毷","瑁","皃","眊","瞀","耄","茂","萺","蝐","袤","覒","貌","貿","贸","鄚","鄮"],rǎn:["冄","冉","姌","媣","染","珃","苒","蒅","䎃"],"nèi nà":["内"],gāng:["冈","冮","刚","剛","堈","堽","岡","掆","摃","棡","牨","犅","疘","綱","纲","缸","罁","罡","肛","釭","鎠","㭎"],cè:["冊","册","厕","厠","夨","廁","恻","惻","憡","敇","测","測","笧","策","筞","筴","箣","荝","萗","萴","蓛"],guǎ:["冎","剐","剮","叧","寡"],"mào mò":["冒"],gòu:["冓","啂","坸","垢","够","夠","媾","彀","搆","撀","构","構","煹","覯","觏","訽","詬","诟","購","购","遘","雊"],xǔ:["冔","喣","暊","栩","珝","盨","糈","詡","諿","诩","鄦","醑"],mì:["冖","冪","嘧","塓","宻","密","峚","幂","幎","幦","怽","榓","樒","櫁","汨","淧","滵","漞","濗","熐","羃","蔤","蜜","覓","覔","覛","觅","謐","谧","鼏"],"yóu yín":["冘"],xiě:["写","冩","藛"],jūn:["军","君","均","桾","汮","皲","皸","皹","碅","莙","蚐","袀","覠","軍","鈞","銁","銞","鍕","钧","頵","鮶","鲪","麏"],mí:["冞","擟","瀰","爢","猕","獼","祢","禰","縻","蒾","藌","蘪","蘼","袮","詸","謎","迷","醚","醾","醿","釄","镾","鸍","麊","麋","麛"],"guān guàn":["冠","覌","観","觀","观"],měng:["冡","勐","懵","掹","猛","獴","艋","蜢","蠓","錳","锰","鯭","鼆"],zhǒng:["冢","塚","尰","歱","煄","瘇","肿","腫","踵"],zuì:["冣","嶵","晬","最","栬","槜","檇","檌","祽","絊","罪","蕞","辠","酔","酻","醉","錊"],yuān:["冤","剈","囦","嬽","寃","棩","淵","渁","渆","渊","渕","灁","眢","肙","葾","蒬","蜎","蜵","駌","鳶","鴛","鵷","鸢","鸳","鹓","鼘","鼝"],míng:["冥","名","明","暝","朙","榠","洺","溟","猽","眀","眳","瞑","茗","螟","覭","詺","鄍","銘","铭","鳴","鸣"],kòu:["冦","叩","宼","寇","扣","敂","滱","窛","筘","簆","蔲","蔻","釦","鷇"],tài:["冭","太","夳","忲","态","態","汰","汱","泰","溙","肽","舦","酞","鈦","钛"],"féng píng":["冯","馮"],"chōng chòng":["冲"],kuàng:["况","圹","壙","岲","懬","旷","昿","曠","框","況","爌","眖","眶","矿","砿","礦","穬","絋","絖","纊","纩","貺","贶","軦","邝","鄺","鉱","鋛","鑛","黋"],lěng:["冷"],pàn:["冸","判","叛","沜","泮","溿","炍","牉","畔","盼","聁","袢","襻","詊","鋬","鑻","頖","鵥"],fā:["冹","彂","沷","発","發"],xiǎn:["冼","尟","尠","崄","嶮","幰","攇","显","櫶","毨","灦","烍","燹","狝","猃","獫","獮","玁","禒","筅","箲","藓","蘚","蚬","蜆","譣","赻","跣","鍌","险","険","險","韅","顕","顯","㬎"],qià:["冾","圶","帢","恰","殎","洽","硈","胢","髂"],"jìng chēng":["净","凈","淨"],sōu:["凁","嗖","廀","廋","捜","搜","摉","溲","獀","艘","蒐","螋","鄋","醙","鎪","锼","颼","飕","餿","馊","騪"],měi:["凂","媄","媺","嬍","嵄","挴","毎","每","浼","渼","燘","美","躾","鎂","镁","黣"],tú:["凃","図","图","圖","圗","塗","屠","峹","嵞","庩","廜","徒","悇","揬","涂","瘏","筡","腯","荼","蒤","跿","途","酴","鈯","鍎","馟","駼","鵌","鶟","鷋","鷵","𬳿"],zhǔn:["准","凖","埻","準","𬘯"],"liáng liàng":["凉","涼","量"],diāo:["凋","刁","刟","叼","奝","弴","彫","汈","琱","碉","簓","虭","蛁","貂","錭","雕","鮉","鯛","鲷","鵰","鼦"],còu:["凑","湊","腠","輳","辏"],ái:["凒","啀","嘊","捱","溰","癌","皑","皚"],duó:["凙","剫","夺","奪","痥","踱","鈬","鐸","铎"],dú:["凟","匵","嬻","椟","櫝","殰","涜","牍","牘","犊","犢","独","獨","瓄","皾","裻","読","讀","讟","豄","贕","錖","鑟","韇","韣","韥","騳","髑","黩","黷"],"jǐ jī":["几"],fán:["凡","凢","凣","匥","墦","杋","柉","棥","樊","瀿","烦","煩","燔","璠","矾","礬","笲","籵","緐","羳","舤","舧","薠","蘩","蠜","襎","蹯","釩","鐇","鐢","钒","鷭","𫔍","𬸪"],jū:["凥","匊","娵","婮","居","崌","抅","挶","掬","梮","椐","檋","毩","毱","泃","涺","狙","琚","疽","砠","罝","腒","艍","蜛","裾","諊","跔","踘","躹","陱","雎","鞠","鞫","駒","驹","鮈","鴡","鶋","𬶋"],"chù chǔ":["処","处"],zhǐ:["凪","劧","咫","址","坧","帋","恉","扺","指","旨","枳","止","汦","沚","洔","淽","疻","砋","祉","秖","紙","纸","芷","藢","衹","襧","訨","趾","軹","轵","酯","阯","黹"],píng:["凭","凴","呯","坪","塀","岼","帡","帲","幈","平","慿","憑","枰","洴","焩","玶","瓶","甁","竮","箳","簈","缾","荓","萍","蓱","蚲","蛢","評","评","軿","輧","郱","鮃","鲆"],kǎi:["凯","凱","剀","剴","垲","塏","恺","愷","慨","暟","蒈","輆","鍇","鎧","铠","锴","闓","闿","颽"],gān:["凲","坩","尲","尴","尶","尷","柑","泔","漧","玕","甘","疳","矸","竿","筸","粓","肝","苷","迀","酐","魐"],"kǎn qiǎn":["凵"],tū:["凸","堗","嶀","捸","涋","湥","痜","禿","秃","突","葖","鋵","鵚","鼵","㻬"],"āo wā":["凹"],chū:["出","初","岀","摴","榋","樗","貙","齣","䢺","䝙"],dàng:["凼","圵","垱","壋","档","檔","氹","璗","瓽","盪","瞊","砀","碭","礑","簜","荡","菪","蕩","蘯","趤","逿","雼","𬍡"],hán:["函","凾","含","圅","娢","寒","崡","晗","梒","浛","涵","澏","焓","琀","甝","筨","蜬","邗","邯","鋡","韓","韩"],záo:["凿","鑿"],dāo:["刀","刂","忉","氘","舠","螩","釖","魛","鱽"],chuāng:["刅","摐","牎","牕","疮","瘡","窓","窗","窻"],"fēn fèn":["分"],"qiè qiē":["切"],kān:["刊","勘","堪","戡","栞","龕","龛"],cǔn:["刌","忖"],chú:["刍","厨","幮","廚","橱","櫉","櫥","滁","犓","篨","耡","芻","蒢","蒭","蜍","蟵","豠","趎","蹰","躇","躕","鉏","鋤","锄","除","雏","雛","鶵"],"huà huá":["划"],lí:["刕","剓","剺","劙","厘","喱","嚟","囄","嫠","孷","廲","悡","梨","梸","棃","漓","灕","犁","犂","狸","琍","璃","瓈","盠","睝","离","穲","竰","筣","篱","籬","糎","縭","缡","罹","艃","荲","菞","蓠","蔾","藜","蘺","蜊","蟍","蟸","蠫","褵","謧","貍","醨","鋫","錅","鏫","鑗","離","驪","骊","鯏","鯬","鱺","鲡","鵹","鸝","鹂","黎","黧","㰀"],yuè:["刖","嬳","岄","岳","嶽","恱","悅","悦","戉","抈","捳","月","樾","瀹","爚","玥","礿","禴","篗","籆","籥","籰","粤","粵","蘥","蚎","蚏","説","越","跀","跃","躍","軏","鈅","鉞","鑰","钺","閱","閲","阅","鸑","鸙","黦","龠","𫐄","𬸚"],liú:["刘","劉","嚠","媹","嵧","旈","旒","榴","橊","流","浏","瀏","琉","瑠","瑬","璢","畄","留","畱","疁","瘤","癅","硫","蒥","蓅","蟉","裗","鎏","鏐","鐂","镠","飀","飅","飗","駠","駵","騮","驑","骝","鰡","鶹","鹠","麍"],zé:["则","則","啧","嘖","嫧","帻","幘","択","樍","歵","沢","泎","溭","皟","瞔","矠","礋","箦","簀","舴","蔶","蠌","襗","謮","賾","赜","迮","鸅","齚","齰"],"chuàng chuāng":["创","創"],qù:["刞","厺","去","閴","闃","阒","麮","鼁"],"bié biè":["別","别"],"páo bào":["刨"],"chǎn chàn":["刬","剗","幝"],guā:["刮","劀","桰","歄","煱","瓜","胍","踻","颪","颳","騧","鴰","鸹"],gēng:["刯","庚","椩","浭","焿","畊","絚","羮","羹","耕","菮","賡","赓","鶊","鹒"],dào:["到","噵","悼","椡","檤","燾","瓙","盗","盜","稲","稻","纛","翿","艔","菿","衜","衟","軇","道"],chuàng:["刱","剏","剙","怆","愴"],kū:["刳","哭","圐","堀","枯","桍","矻","窟","跍","郀","骷","鮬"],duò:["刴","剁","墯","尮","惰","憜","挅","桗","舵","跥","跺","陊","陏","飿","饳","鵽"],"shuā shuà":["刷"],"quàn xuàn":["券"],"chà shā":["刹","剎"],"cì cī":["刺"],guì:["刽","刿","劊","劌","撌","攰","昋","桂","椢","槶","樻","櫃","猤","禬","筀","蓕","襘","貴","贵","跪","鐀","鑎","鞼","鱖","鱥"],lóu:["剅","娄","婁","廔","楼","樓","溇","漊","熡","耧","耬","艛","蒌","蔞","蝼","螻","謱","軁","遱","鞻","髅","髏","𪣻"],cuò:["剉","剒","厝","夎","挫","措","棤","莝","莡","蓌","逪","銼","錯","锉","错"],"xiāo xuē":["削"],"kēi kè":["剋","尅"],"là lá":["剌"],tī:["剔","梯","踢","銻","锑","鷈","鷉","䏲","䴘"],pōu:["剖"],wān:["剜","塆","壪","帵","弯","彎","湾","潫","灣","睕","蜿","豌"],"bāo bō":["剝","剥"],duō:["剟","咄","哆","嚉","多","夛","掇","毲","畓","裰","㙍"],qíng:["剠","勍","夝","情","擎","晴","暒","棾","樈","檠","氰","甠","硘","葝","黥"],"yǎn shàn":["剡"],"dū zhuó":["剢"],yān:["剦","嫣","崦","嶖","恹","懕","懨","樮","淊","淹","漹","烟","焉","焑","煙","珚","篶","胭","臙","菸","鄢","醃","閹","阉","黫"],huō:["剨","劐","吙","攉","秴","耠","锪","騞","𬴃"],shèng:["剩","剰","勝","圣","墭","嵊","晠","榺","橳","琞","聖","蕂","貹","賸"],"duān zhì":["剬"],wū:["剭","呜","嗚","圬","屋","巫","弙","杇","歍","汙","汚","污","洿","烏","窏","箼","螐","誈","誣","诬","邬","鄔","鎢","钨","鰞","鴮"],gē:["割","哥","圪","彁","戈","戓","戨","歌","滒","犵","肐","袼","謌","鎶","鴚","鴿","鸽"],"dá zhá":["剳"],chuán:["剶","暷","椽","篅","舡","舩","船","輲","遄"],"tuán zhuān":["剸","漙","篿"],"lù jiū":["剹"],pēng:["剻","匉","嘭","怦","恲","抨","梈","烹","砰","軯","駍"],piāo:["剽","勡","慓","旚","犥","翲","螵","飃","飄","飘","魒"],kōu:["剾","彄","抠","摳","眍","瞘","芤","𫸩"],"jiǎo chāo":["剿","劋","勦","摷"],qiāo:["劁","勪","墝","幧","敲","橇","毃","燆","硗","磽","繑","趬","跷","踍","蹺","蹻","郻","鄡","鄥","鍫","鍬","鐰","锹","頝"],"huá huà":["劃"],"zhā zhá":["劄"],"pī pǐ":["劈","悂"],tāng:["劏","嘡","羰","薚","蝪","蹚","鞺","鼞"],chán:["劖","嚵","壥","婵","嬋","巉","廛","棎","毚","湹","潹","潺","澶","瀍","瀺","煘","獑","磛","緾","纏","纒","缠","艬","蝉","蟐","蟬","蟾","誗","讒","谗","躔","鄽","酁","鋋","鑱","镵","饞","馋"],zuān:["劗","躜","躦","鉆","鑚"],mó:["劘","嫫","嬤","嬷","尛","摹","擵","橅","糢","膜","藦","蘑","謨","謩","谟","饃","饝","馍","髍","魔","魹"],zhú:["劚","斸","曯","欘","灟","炢","烛","燭","爥","瘃","竹","笁","笜","舳","茿","蓫","蠋","蠾","躅","逐","逫","钃","鱁"],quàn:["劝","勧","勸","牶","韏"],"jìn jìng":["劤","劲","勁"],kēng:["劥","坑","牼","硁","硜","誙","銵","鍞","鏗","铿","阬"],"xié liè":["劦"],"zhù chú":["助"],nǔ:["努","弩","砮","胬"],shào:["劭","卲","哨","潲","紹","綤","绍","袑","邵"],miǎo:["劰","杪","淼","渺","眇","秒","篎","緲","缈","藐","邈"],kǒu:["劶","口"],wā:["劸","娲","媧","屲","挖","攨","洼","溛","漥","瓾","畖","穵","窊","窪","蛙","韈","鼃"],kuāng:["劻","匡","匩","哐","恇","洭","筐","筺","誆","诓","軭","邼"],hé:["劾","咊","啝","姀","峆","敆","曷","柇","楁","毼","河","涸","渮","澕","熆","皬","盇","盉","盍","盒","禾","篕","籺","粭","翮","菏","萂","覈","訸","詥","郃","釛","鉌","鑉","閡","闔","阂","阖","鞨","頜","餄","饸","魺","鹖","麧","齕","龁","龢","𬌗"],gào:["勂","吿","告","峼","祮","祰","禞","筶","誥","诰","郜","鋯","锆"],"bó bèi":["勃"],láng:["勆","嫏","廊","斏","桹","榔","樃","欴","狼","琅","瑯","硠","稂","艆","蓈","蜋","螂","躴","郒","郞","鋃","鎯","锒"],xūn:["勋","勛","勲","勳","嚑","坃","埙","塤","壎","壦","曛","燻","獯","矄","纁","臐","薫","薰","蘍","醺","𫄸"],"juàn juān":["勌","瓹"],"lè lēi":["勒"],kài:["勓","炌","烗","鎎"],"wěng yǎng":["勜"],qín:["勤","嗪","噙","嶜","庈","懃","懄","捦","擒","斳","檎","澿","珡","琴","琹","瘽","禽","秦","耹","芩","芹","菦","螓","蠄","鈙","鈫","雂","靲","鳹","鵭"],jiàng:["勥","匞","匠","嵹","弜","弶","摾","櫤","洚","滰","犟","糡","糨","絳","绛","謽","酱","醤","醬"],fān:["勫","嬏","帆","幡","忛","憣","旙","旛","繙","翻","藩","轓","颿","飜","鱕"],juān:["勬","姢","娟","捐","涓","蠲","裐","鎸","鐫","镌","鹃"],"tóng dòng":["勭","烔","燑","狪"],lǜ:["勴","垏","嵂","律","慮","氯","滤","濾","爈","箻","綠","繂","膟","葎","虑","鑢"],chè:["勶","坼","彻","徹","掣","撤","澈","烢","爡","瞮","硩","聅","迠","頙","㬚"],sháo:["勺","玿","韶"],"gōu gòu":["勾"],cōng:["匆","囪","囱","忩","怱","悤","暰","樬","漗","瑽","璁","瞛","篵","繱","聡","聦","聪","聰","苁","茐","葱","蓯","蔥","蟌","鍯","鏓","鏦","騘","驄","骢"],"táo yáo":["匋","陶"],páo:["匏","咆","垉","庖","爮","狍","袍","褜","軳","鞄","麅"],dá:["匒","妲","怛","炟","燵","畣","笪","羍","荙","薘","蟽","詚","达","迏","迖","迚","逹","達","鐽","靼","鞑","韃","龖","龘","𫟼"],"huà huā":["化"],"běi bèi":["北"],nǎo:["匘","垴","堖","嫐","恼","悩","惱","瑙","碯","脑","脳","腦"],"chí shi":["匙"],fāng:["匚","堏","方","淓","牥","芳","邡","鈁","錺","钫","鴋"],zā:["匝","咂","帀","沞","臜","臢","迊","鉔","魳"],qiè:["匧","厒","妾","怯","悏","惬","愜","挈","穕","窃","竊","笡","箧","篋","籡","踥","鍥","锲","鯜"],"zāng cáng":["匨"],fěi:["匪","奜","悱","棐","榧","篚","翡","蕜","誹","诽"],"kuì guì":["匮","匱"],suǎn:["匴"],pǐ:["匹","噽","嚭","圮","庀","痞","癖","脴","苉","銢","鴄"],"qū ōu":["区","區"],"kē qià":["匼"],"yǎn yàn":["匽","棪"],biǎn:["匾","惼","揙","碥","稨","窆","藊","褊","貶","贬","鴘"],nì:["匿","堄","嫟","嬺","惄","愵","昵","暱","氼","眤","睨","縌","胒","腻","膩","逆","𨺙"],niàn:["卄","唸","埝","廿","念","惗","艌"],sà:["卅","櫒","脎","萨","蕯","薩","鈒","隡","颯","飒","馺"],zú:["卆","哫","崪","族","箤","足","踤","镞"],shēng:["升","呏","声","斘","昇","曻","枡","殅","泩","湦","焺","牲","珄","生","甥","竔","笙","聲","鉎","鍟","阩","陞","陹","鵿","鼪"],wàn:["卍","卐","忨","杤","瞣","脕","腕","萬","蟃","贎","輐","錽","𬇕"],"huá huà huā":["华","華"],bēi:["卑","悲","揹","杯","桮","盃","碑","藣","鵯","鹎"],"zú cù":["卒"],"dān shàn chán":["单","單"],"nán nā":["南"],"shuài lǜ":["卛"],"bǔ bo pú":["卜"],"kuàng guàn":["卝"],biàn:["卞","变","変","峅","弁","徧","忭","抃","昪","汳","汴","玣","艑","苄","覍","諚","變","辡","辧","辨","辩","辫","辮","辯","遍","釆","𨚕"],bǔ:["卟","哺","捕","补","補","鸔","𬷕"],"zhàn zhān":["占","覱"],"kǎ qiǎ":["卡"],lú:["卢","嚧","垆","壚","庐","廬","曥","枦","栌","櫨","泸","瀘","炉","爐","獹","玈","瓐","盧","矑","籚","纑","罏","胪","臚","舮","舻","艫","芦","蘆","蠦","轤","轳","鈩","鑪","顱","颅","馿","髗","魲","鱸","鲈","鸕","鸬","黸","𬬻"],lǔ:["卤","塷","掳","擄","樐","橹","櫓","氌","滷","澛","瀂","硵","磠","穞","艣","艪","蓾","虏","虜","鏀","鐪","鑥","镥","魯","鲁","鹵"],guà:["卦","啩","挂","掛","罣","褂","詿","诖"],"áng yǎng":["卬"],yìn:["印","垽","堷","廕","慭","憖","憗","懚","洕","湚","猌","癊","胤","茚","酳","鮣","䲟"],què:["却","卻","塙","崅","悫","愨","慤","搉","榷","燩","琷","皵","确","確","礭","闋","阕","鵲","鹊","𬒈"],luǎn:["卵"],"juàn juǎn":["卷","巻"],"chǎng ān hàn":["厂"],"wěi yán":["厃"],tīng:["厅","厛","听","庁","廰","廳","汀","烃","烴","綎","耓","聴","聼","聽","鞓","𬘩"],"zhé zhái":["厇"],"hàn àn":["厈","屽"],yǎ:["厊","唖","庌","痖","瘂","蕥"],shè:["厍","厙","弽","慑","慴","懾","摂","欇","涉","涻","渉","滠","灄","社","舎","蔎","蠂","設","设","赦","騇","麝"],dǐ:["厎","呧","坘","弤","抵","拞","掋","牴","砥","菧","觝","詆","诋","軧","邸","阺","骶","鯳"],"zhǎ zhǎi":["厏"],páng:["厐","嫎","庞","徬","舽","螃","逄","鰟","鳑","龎","龐"],"zhì shī":["厔"],máng:["厖","吂","哤","娏","忙","恾","杗","杧","汒","浝","牻","痝","盲","硭","笀","芒","茫","蘉","邙","釯","鋩","铓","駹"],zuī:["厜","樶","纗","蟕"],"shà xià":["厦","廈"],áo:["厫","嗷","嗸","廒","敖","滶","獒","獓","璈","翱","翶","翺","聱","蔜","螯","謷","謸","遨","鏖","隞","鰲","鳌","鷔","鼇"],"lán qiān":["厱"],"sī mǒu":["厶"],"gōng hóng":["厷"],"lín miǎo":["厸"],"qiú róu":["厹"],dū:["厾","嘟","督","醏"],"xiàn xuán":["县","縣"],"cān shēn cēn sān":["参","參","叄","叅"],"ài yǐ":["叆"],"chā chà chǎ chá":["叉"],shuāng:["双","孀","孇","欆","礵","艭","雙","霜","騻","驦","骦","鷞","鸘","鹴"],shōu:["収","收"],guái:["叏"],bá:["叐","妭","抜","拔","炦","癹","胈","茇","菝","詙","跋","軷","魃","鼥"],"fā fà":["发"],"zhuó yǐ lì jué":["叕"],qǔ:["取","娶","竬","蝺","詓","齲","龋"],"jiǎ xiá":["叚","徦"],"wèi yù":["叞","尉","蔚"],dié:["叠","垤","堞","峌","幉","恎","惵","戜","曡","殜","氎","牃","牒","瓞","畳","疂","疉","疊","碟","絰","绖","耊","耋","胅","艓","苵","蜨","蝶","褋","詄","諜","谍","跮","蹀","迭","镻","鰈","鲽","鴩","𫶇"],ruì:["叡","枘","汭","瑞","睿","芮","蚋","蜹","銳","鋭","锐"],"jù gōu":["句"],lìng:["另","呤","炩","蘦"],"dāo dáo tāo":["叨"],"zhī zhǐ":["只"],jiào:["叫","呌","嘂","嘦","噍","嬓","斍","斠","滘","漖","獥","珓","皭","窖","藠","訆","譥","趭","較","轎","轿","较","酵","醮","釂"],"zhào shào":["召"],"kě kè":["可"],"tái tāi":["台","苔"],pǒ:["叵","尀","笸","箥","鉕","钷","駊"],"yè xié":["叶"],"hào háo":["号"],tàn:["叹","嘆","探","歎","湠","炭","碳","舕"],"hōng hóng":["叿"],miē:["吀","咩","哶","孭"],"xū yū yù":["吁"],chī:["吃","哧","喫","嗤","噄","妛","媸","彨","彲","摛","攡","殦","瓻","痴","癡","眵","瞝","笞","粚","胵","蚩","螭","訵","魑","鴟","鵄","鸱","黐","齝","𫄨"],"xuān sòng":["吅"],yāo:["吆","喓","夭","妖","幺","楆","殀","祅","腰","葽","訞","邀","鴁","鴢","㙘"],zǐ:["吇","姉","姊","子","杍","梓","榟","橴","滓","矷","秭","笫","籽","紫","耔","虸","訿","釨"],"hé gě":["合","鲄"],"cùn dòu":["吋"],"tóng tòng":["同"],"tǔ tù":["吐","唋"],"zhà zhā":["吒","奓"],"xià hè":["吓"],"ā yā":["吖"],"ma má mǎ":["吗"],lìn:["吝","恡","悋","橉","焛","甐","膦","蔺","藺","賃","赁","蹸","躏","躙","躪","轥","閵"],tūn:["吞","暾","朜","焞"],"bǐ pǐ":["吡"],qìn:["吢","吣","唚","抋","揿","搇","撳","沁","瀙","菣","藽"],"jiè gè":["吤"],"fǒu pǐ":["否"],"ba bā":["吧"],dūn:["吨","噸","墩","墪","惇","撉","撴","犜","獤","礅","蜳","蹾","驐"],fēn:["吩","帉","昐","朆","梤","棻","氛","竕","紛","纷","翂","芬","衯","訜","躮","酚","鈖","雰","餴","饙","馚"],"é huā":["吪"],"kēng háng":["吭","妔"],shǔn:["吮"],"zhī zī":["吱"],"yǐn shěn":["吲"],wú:["吳","吴","呉","墲","峿","梧","橆","毋","洖","浯","無","珸","璑","祦","芜","茣","莁","蕪","蜈","蟱","譕","郚","鋙","铻","鯃","鵐","鷡","鹀","鼯"],"chǎo chāo":["吵"],"nà nè":["吶"],"xuè chuò jué":["吷"],chuī:["吹","炊","龡"],"dōu rú":["吺"],hǒu:["吼","犼"],"hōng hǒu ōu":["吽"],"wú yù":["吾"],"ya yā":["呀"],"è e":["呃"],dāi:["呆","懛","獃"],"mèn qǐ":["呇"],hōng:["呍","嚝","揈","灴","烘","焢","硡","薨","訇","谾","軣","輷","轟","轰","鍧"],nà:["呐","捺","笝","納","纳","肭","蒳","衲","豽","貀","軜","郍","鈉","钠","靹","魶"],"tūn tiān":["呑"],"fǔ ḿ":["呒","嘸"],"dāi tǎi":["呔"],"ǒu ōu òu":["呕"],"bài bei":["呗"],"yuán yún yùn":["员","員"],guō:["呙","啯","嘓","埚","堝","墎","崞","彉","彍","懖","猓","瘑","聒","蝈","蟈","郭","鈛","鍋","锅"],"huá qì":["呚"],"qiàng qiāng":["呛","跄"],shī:["呞","失","尸","屍","师","師","施","浉","湤","湿","溮","溼","濕","狮","獅","瑡","絁","葹","蒒","蓍","虱","蝨","褷","襹","詩","诗","邿","釃","鉇","鍦","鯴","鰤","鲺","鳲","鳾","鶳","鸤","䴓","𫚕"],juǎn:["呟","埍","臇","菤","錈","锩"],pěn:["呠","翸"],"wěn mǐn":["呡"],"ne ní":["呢"],"ḿ m̀ móu":["呣"],rán:["呥","嘫","然","燃","繎","肰","蚦","蚺","衻","袇","袡","髥","髯"],"tiè chè":["呫"],"qì zhī":["呮"],"zǐ cī":["呰"],"guā gū guǎ":["呱"],"cī zī":["呲"],"hǒu xǔ gòu":["呴"],"hē ā á ǎ à a":["呵"],náo:["呶","夒","峱","嶩","巎","挠","撓","猱","硇","蛲","蟯","詉","譊","鐃","铙"],"xiā gā":["呷"],pēi:["呸","怌","肧","胚","衃","醅"],"háo xiāo":["呺"],mìng:["命","掵"],"dá dàn":["呾"],"zuǐ jǔ":["咀"],"xián gān":["咁"],pǒu:["咅","哣","犃"],"yǎng yāng":["咉"],"zǎ zé zhā":["咋"],"hé hè huó huò hú":["和"],hāi:["咍"],dā:["咑","哒","噠","墶","搭","撘","耷","褡","鎝","𨱏"],"kǎ kā":["咔"],gū:["咕","唂","唃","姑","嫴","孤","巬","巭","柧","橭","沽","泒","稒","笟","箍","箛","篐","罛","苽","菇","菰","蓇","觚","軱","軲","轱","辜","酤","鈲","鮕","鴣","鸪"],"kā gā":["咖"],zuo:["咗"],lóng:["咙","嚨","嶐","巃","巄","昽","曨","朧","栊","槞","櫳","湰","滝","漋","爖","珑","瓏","癃","眬","矓","砻","礱","礲","窿","竜","聋","聾","胧","茏","蘢","蠪","蠬","襱","豅","鏧","鑨","霳","靇","驡","鸗","龍","龒","龙"],"xiàn xián":["咞"],qì:["咠","唭","噐","器","夡","弃","憇","憩","暣","棄","欫","气","気","氣","汔","汽","泣","湆","湇","炁","甈","盵","矵","碛","碶","磜","磧","罊","芞","葺","藒","蟿","訖","讫","迄","鐑"],"xì dié":["咥"],"liē liě lié lie":["咧"],zī:["咨","嗞","姕","姿","孜","孳","孶","崰","嵫","栥","椔","淄","湽","滋","澬","玆","禌","秶","粢","紎","緇","緕","纃","缁","茊","茲","葘","諮","谘","貲","資","赀","资","赼","趑","趦","輜","輺","辎","鄑","鈭","錙","鍿","鎡","锱","镃","頾","頿","髭","鯔","鰦","鲻","鶅","鼒","齍","齜","龇"],mī:["咪"],"jī xī qià":["咭"],"gē luò kǎ lo":["咯"],"shù xún":["咰"],"zán zá zǎ zan":["咱"],"hāi ké":["咳"],huī:["咴","噅","噕","婎","媈","幑","徽","恢","拻","挥","揮","晖","暉","楎","洃","瀈","灰","灳","烣","睳","禈","翚","翬","蘳","袆","褘","詼","诙","豗","輝","辉","鰴","麾","㧑"],"huài shì":["咶"],táo:["咷","啕","桃","檮","洮","淘","祹","綯","绹","萄","蜪","裪","迯","逃","醄","鋾","鞀","鞉","饀","駣","騊","鼗","𫘦"],xián:["咸","啣","娴","娹","婱","嫌","嫺","嫻","弦","挦","撏","涎","湺","澖","甉","痫","癇","癎","絃","胘","舷","藖","蚿","蛝","衔","衘","誸","諴","賢","贒","贤","輱","醎","銜","鑦","閑","闲","鷳","鷴","鷼","鹇","鹹","麙","𫍯"],"è àn":["咹"],"xuān xuǎn":["咺","烜"],"wāi hé wǒ guǎ guō":["咼"],"yàn yè yān":["咽"],āi:["哀","哎","埃","溾","銰","鎄","锿"],pǐn:["品","榀"],shěn:["哂","婶","嬸","审","宷","審","弞","曋","渖","瀋","瞫","矤","矧","覾","訠","諗","讅","谂","谉","邥","頣","魫"],"hǒng hōng hòng":["哄"],"wā wa":["哇"],"hā hǎ hà":["哈"],zāi:["哉","栽","渽","溨","災","灾","烖","睵","賳"],"dì diè":["哋"],pài:["哌","沠","派","渒","湃","蒎","鎃"],"gén hěn":["哏"],"yǎ yā":["哑","雅"],"yuě huì":["哕","噦"],nián:["哖","年","秊","秥","鮎","鯰","鲇","鲶","鵇","黏"],"huá huā":["哗","嘩"],"jì jiē zhāi":["哜","嚌"],mōu:["哞"],"yō yo":["哟","喲"],lòng:["哢","梇","贚"],"ò ó é":["哦"],"lī lǐ li":["哩"],"nǎ na nǎi né něi":["哪"],hè:["哬","垎","壑","寉","惒","焃","煂","燺","爀","癋","碋","翯","褐","謞","賀","贺","赫","靍","靎","靏","鶴","鸖","鹤"],"bō pò bā":["哱"],zhé:["哲","啠","喆","嚞","埑","悊","摺","晢","晣","歽","矺","砓","磔","籷","粍","虴","蛰","蟄","袩","詟","謫","謺","讁","讋","谪","輒","輙","轍","辄","辙","鮿"],"liàng láng":["哴"],"liè lǜ":["哷"],hān:["哻","憨","蚶","谽","酣","頇","顸","馠","魽","鼾"],"hēng hng":["哼"],gěng:["哽","埂","峺","挭","梗","綆","绠","耿","莄","郠","骾","鯁","鲠","𬒔"],"chuò yuè":["哾"],"gě jiā":["哿"],"bei bài":["唄"],"hán hàn":["唅"],chún:["唇","浱","湻","滣","漘","犉","純","纯","脣","莼","蒓","蓴","醇","醕","錞","陙","鯙","鶉","鹑","𬭚"],"ài āi":["唉"],"jiá qiǎn":["唊"],"yán dàn xián":["唌"],chē:["唓","砗","硨","莗","蛼"],"wú ńg ń":["唔"],zào:["唕","唣","噪","慥","梍","灶","煰","燥","皁","皂","竃","竈","簉","艁","譟","趮","躁","造","𥖨"],dí:["唙","啇","嘀","嚁","嫡","廸","敌","敵","梑","涤","滌","狄","笛","籴","糴","苖","荻","蔋","蔐","藡","覿","觌","豴","迪","靮","頔","馰","髢","鸐","𬱖"],"gòng hǒng gǒng":["唝","嗊"],dóu:["唞"],"lào láo":["唠","嘮","憦"],huàn:["唤","喚","奂","奐","宦","嵈","幻","患","愌","换","換","擐","攌","梙","槵","浣","涣","渙","漶","澣","烉","焕","煥","瑍","痪","瘓","睆","肒","藧","豢","轘","逭","鯇","鯶","鰀","鲩"],léng:["唥","塄","楞","碐","薐"],"wō wěi":["唩"],fěng:["唪","覂","諷","讽"],"yín jìn":["唫"],"hǔ xià":["唬"],wéi:["唯","围","圍","壝","峗","峞","嵬","帏","帷","幃","惟","桅","沩","洈","涠","湋","溈","潍","潙","潿","濰","犩","矀","維","维","蓶","覹","违","違","鄬","醀","鍏","闈","闱","韋","韦","鮠","𣲗","𬶏"],shuā:["唰"],chàng:["唱","怅","悵","暢","焻","畅","畼","誯","韔","鬯"],"ér wā":["唲"],qiàng:["唴","炝","熗","羻"],yō:["唷"],yū:["唹","淤","瘀","盓","箊","紆","纡","込","迂","迃","陓"],lài:["唻","濑","瀨","瀬","癞","癩","睐","睞","籁","籟","藾","賚","賴","赉","赖","頼","顂","鵣"],tuò:["唾","嶞","柝","毤","毻","箨","籜","萚","蘀","跅"],"zhōu zhāo tiào":["啁"],kěn:["啃","垦","墾","恳","懇","肎","肯","肻","豤","錹"],"zhuó zhào":["啅","濯"],"hēng hèng":["啈","悙"],"lín lán":["啉"],"a ā á ǎ à":["啊"],qiāng:["啌","嗴","嶈","戕","摤","斨","枪","槍","溬","牄","猐","獇","羌","羗","腔","蜣","謒","鏘","锖","锵"],"tūn zhūn xiāng duǐ":["啍"],wèn:["問","妏","揾","搵","璺","问","顐"],"cuì qi":["啐"],"dié shà jié tì":["啑"],"yuē wā":["啘"],"zǐ cǐ":["啙"],"bǐ tú":["啚"],"chuò chuài":["啜"],"yǎ yā è":["啞"],fēi:["啡","婓","婔","扉","暃","渄","猆","緋","绯","裶","霏","非","靟","飛","飝","飞","餥","馡","騑","騛","鯡","鲱","𬴂"],pí:["啤","壀","枇","毗","毘","焷","琵","疲","皮","篺","罴","羆","脾","腗","膍","蚍","蚽","蜱","螷","蠯","豼","貔","郫","鈹","阰","陴","隦","魮","鮍","鲏","鵧","鼙"],shá:["啥"],"lā la":["啦"],"yīng qíng":["啨"],pā:["啪","妑","舥","葩","趴"],"zhě shì":["啫"],sè:["啬","嗇","懎","擌","栜","歮","涩","渋","澀","澁","濇","濏","瀒","瑟","璱","瘷","穑","穡","穯","繬","譅","轖","銫","鏼","铯","飋"],niè:["啮","嗫","噛","嚙","囁","囓","圼","孼","孽","嵲","嶭","巕","帇","敜","枿","槷","櫱","涅","湼","痆","篞","籋","糱","糵","聂","聶","臬","臲","蘖","蠥","讘","踂","踗","踙","蹑","躡","錜","鎳","鑈","鑷","钀","镊","镍","闑","陧","隉","顳","颞","齧","𫔶"],"luō luó luo":["啰","囉"],"tān chǎn tuō":["啴"],bo:["啵","蔔"],dìng:["啶","定","椗","矴","碇","碠","磸","聢","腚","萣","蝊","訂","订","錠","锭","顁","飣","饤"],lāng:["啷"],"án ān":["啽"],kā:["喀","擖"],"yóng yú":["喁"],"lā lá lǎ":["喇"],jiē:["喈","喼","嗟","堦","媘","接","掲","擑","湝","煯","疖","痎","癤","皆","秸","稭","脻","蝔","街","謯","阶","階","鞂","鶛"],hóu:["喉","帿","猴","瘊","睺","篌","糇","翭","葔","鄇","鍭","餱","骺","鯸","𬭤"],"dié zhá":["喋"],wāi:["喎","歪","竵"],"nuò rě":["喏"],"xù huò guó":["喐"],zán:["喒"],"wō ō":["喔"],hú:["喖","嘝","囫","壶","壷","壺","媩","弧","搰","斛","楜","槲","湖","瀫","焀","煳","狐","猢","瑚","瓳","箶","絗","縠","胡","葫","蔛","蝴","螜","衚","觳","醐","鍸","頶","餬","鬍","魱","鰗","鵠","鶘","鶦","鹕"],"huàn yuán xuǎn hé":["喛"],xǐ:["喜","囍","壐","屣","徙","憙","枲","橲","歖","漇","玺","璽","矖","禧","縰","葈","葸","蓰","蟢","謑","蹝","躧","鈢","鉨","鉩","鱚","𬭳","𬶮"],"hē hè yè":["喝"],kuì:["喟","嘳","媿","嬇","愦","愧","憒","篑","簣","籄","聩","聭","聵","膭","蕢","謉","餽","饋","馈"],"zhǒng chuáng":["喠"],"wéi wèi":["喡","為","爲"],"duó zhà":["喥"],"sāng sàng":["喪"],"qiáo jiāo":["喬"],"pèn bēn":["喯"],"cān sūn qī":["喰"],"zhā chā":["喳"],miāo:["喵"],"pēn pèn":["喷"],kuí:["喹","夔","奎","巙","戣","揆","晆","暌","楏","楑","櫆","犪","睽","葵","藈","蘷","虁","蝰","躨","逵","鄈","鍨","鍷","頯","馗","騤","骙","魁"],"lou lóu":["喽"],"zào qiāo":["喿"],"hè xiāo xiào hù":["嗃"],"á shà":["嗄"],xiù:["嗅","岫","峀","溴","珛","琇","璓","秀","綉","繍","繡","绣","螑","袖","褎","褏","銹","鏥","鏽","锈","齅"],"qiāng qiàng":["嗆","戗","戧","蹌","蹡"],"ài yì":["嗌","艾"],"má mǎ ma":["嗎"],"kè kē":["嗑"],"dā tà":["嗒","鎉"],sǎng:["嗓","搡","磉","褬","鎟","顙","颡"],chēn:["嗔","抻","琛","瞋","諃","謓","賝","郴","𬘭"],"wā gǔ":["嗗"],"pǎng bēng":["嗙"],"xián qiǎn qiān":["嗛"],lào:["嗠","嫪","橯","涝","澇","耢","耮","躼","軂","酪"],wēng:["嗡","翁","聬","螉","鎓","鶲","鹟","𬭩"],wà:["嗢","腽","膃","袜","襪","韤"],"hēi hāi":["嗨"],hē:["嗬","欱","蠚","訶","诃"],zi:["嗭"],sǎi:["嗮"],"ǹg ńg ňg":["嗯"],gě:["嗰","舸"],ná:["嗱","拏","拿","鎿","镎"],diǎ:["嗲"],"ài ǎi āi":["嗳"],tōng:["嗵","樋","炵","蓪"],"zuī suī":["嗺"],"zhē zhè zhù zhe":["嗻"],mò:["嗼","圽","塻","墨","妺","嫼","寞","帞","昩","末","枺","歿","殁","沫","漠","爅","獏","瘼","皌","眽","眿","瞐","瞙","砞","礳","秣","絈","纆","耱","茉","莈","蓦","蛨","蟔","貃","貊","貘","銆","鏌","镆","陌","靺","驀","魩","默","黙","𬙊"],sòu:["嗽","瘶"],tǎn:["嗿","坦","忐","憳","憻","暺","毯","璮","菼","袒","襢","醓","鉭","钽"],"jiào dǎo":["嘄"],"kǎi gě":["嘅"],"shān càn":["嘇"],cáo:["嘈","嶆","曹","曺","槽","漕","艚","蓸","螬","褿","鏪","𥕢"],piào:["嘌","徱","蔈","驃"],"lóu lou":["嘍"],gǎ:["尕","玍"],"gǔ jiǎ":["嘏"],"jiāo xiāo":["嘐"],"xū shī":["嘘","噓"],pó:["嘙","嚩","婆","櫇","皤","鄱"],"dē dēi":["嘚"],"ma má":["嘛"],"lē lei":["嘞"],"gā gá gǎ":["嘠"],sāi:["嘥","噻","毢","腮","顋","鰓"],"zuō chuài":["嘬"],"cháo zhāo":["嘲","朝","鼂"],zuǐ:["嘴","噿","嶊","璻"],"qiáo qiào":["嘺","翹","谯"],"chù xù shòu":["嘼"],"tān chǎn":["嘽"],"dàn tán":["嘾","弾","彈","惔","澹"],"hēi mò":["嘿"],ě:["噁","砨","頋","騀","鵈"],"fān bo":["噃"],chuáng:["噇","床","牀"],"cù zā hé":["噈"],"tūn kuò":["噋"],"cēng chēng":["噌"],dēng:["噔","嬁","灯","燈","璒","登","竳","簦","艠","豋"],pū:["噗","扑","撲","攴","攵","潽","炇","陠"],juē:["噘","屩","屫","撧"],lū:["噜","嚕","撸","擼","謢"],zhān:["噡","岾","惉","旃","旜","枬","栴","毡","氈","氊","沾","瞻","薝","蛅","詀","詹","譫","谵","趈","邅","閚","霑","飦","饘","驙","魙","鱣","鸇","鹯","𫗴"],ō:["噢"],"zhòu zhuó":["噣"],"jiào qiào chī":["噭"],yuàn:["噮","妴","怨","愿","掾","瑗","禐","苑","衏","裫","褑","院","願"],"ǎi ài āi":["噯"],"yōng yǒng":["噰","澭"],"jué xué":["噱"],"pēn pèn fèn":["噴"],gá:["噶","尜","釓","錷","钆"],"xīn hěn hèn":["噷"],dāng:["噹","澢","珰","璫","筜","簹","艡","蟷","裆","襠"],làn:["嚂","滥","濫","烂","燗","爁","爛","爤","瓓","糷","钄"],tà:["嚃","嚺","崉","挞","搨","撻","榻","橽","毾","涾","澾","濌","禢","粏","誻","譶","蹋","蹹","躂","躢","遝","錔","闒","闥","闼","阘","鞜","鞳"],"huō huò ǒ":["嚄"],hāo:["嚆","茠","蒿","薅"],"hè xià":["嚇"],"xiù pì":["嚊"],"zhōu chóu":["嚋","盩","诪"],mē:["嚒"],"chā cā":["嚓"],"bó pào bào":["嚗"],"me mèi mò":["嚜"],"xié hái":["嚡"],"áo xiāo":["嚣"],mō:["嚤","摸"],pín:["嚬","娦","嫔","嬪","玭","矉","薲","蠙","貧","贫","顰","颦","𬞟"],mè:["嚰","濹"],"rǎng rāng":["嚷"],lá:["嚹","旯"],"jiáo jué jiào":["嚼"],chuò:["嚽","娖","擉","歠","涰","磭","踀","輟","辍","辵","辶","酫","鑡","餟","齪","龊"],"huān huàn":["嚾"],"zá cà":["囃"],chài:["囆","虿","蠆","袃","訍"],"náng nāng":["囊"],"zá zàn cān":["囋"],sū:["囌","櫯","甦","稣","穌","窣","蘇","蘓","酥","鯂"],zèng:["囎","熷","甑","贈","赠","鋥","锃"],"zá niè yàn":["囐"],nāng:["囔"],"luó luō luo":["囖"],"wéi guó":["囗"],huí:["囘","回","囬","廻","廽","恛","洄","痐","茴","蚘","蛔","蛕","蜖","迴","逥","鮰"],nín:["囜","您","脌"],"jiǎn nān":["囝"],nān:["囡"],tuán:["团","団","團","慱","抟","摶","檲","糰","鏄","鷒","鷻"],"tún dùn":["囤","坉"],guó:["囯","囶","囻","国","圀","國","帼","幗","慖","摑","漍","聝","腘","膕","蔮","虢","馘","𬇹"],kùn:["困","涃","睏"],"wéi tōng":["囲"],qūn:["囷","夋","逡"],rì:["囸","日","衵","鈤","馹","驲"],tāi:["囼","孡","胎"],pǔ:["圃","圑","擈","普","暜","樸","檏","氆","浦","溥","烳","諩","譜","谱","蹼","鐠","镨"],"quān juàn juān":["圈","圏"],"chuí chuán":["圌"],tuǎn:["圕","畽","疃"],lüè:["圙","掠","略","畧","稤","鋝","鋢","锊","䂮"],"huán yuán":["圜"],luán:["圝","圞","奱","娈","孌","孪","孿","峦","巒","挛","攣","曫","栾","欒","滦","灤","癴","癵","羉","脔","臠","虊","銮","鑾","鵉","鸞","鸾"],tǔ:["土","圡","釷","钍"],"xū wéi":["圩"],"dì de":["地","嶳"],"qiān sú":["圱"],zhèn:["圳","塦","挋","振","朕","栚","甽","眹","紖","絼","纼","誫","賑","赈","鋴","鎭","鎮","镇","阵","陣","震","鴆","鸩"],"chǎng cháng":["场","場","塲"],"qí yín":["圻"],jiá:["圿","忦","恝","戞","扴","脥","荚","莢","蛱","蛺","裌","跲","郏","郟","鋏","铗","頬","頰","颊","鴶","鵊"],"zhǐ zhì":["坁"],bǎn:["坂","岅","昄","板","版","瓪","粄","舨","蝂","鈑","钣","阪","魬"],qǐn:["坅","寑","寝","寢","昑","梫","笉","螼","赾","鋟","锓"],"méi fén":["坆"],"rǒng kēng":["坈"],"fāng fáng":["坊"],"fèn bèn":["坋"],tān:["坍","怹","摊","擹","攤","滩","灘","瘫","癱","舑","貪","贪"],"huài pēi pī péi":["坏"],"dì làn":["坔"],tán:["坛","墰","墵","壇","壜","婒","憛","昙","曇","榃","檀","潭","燂","痰","磹","罈","罎","藫","談","譚","譠","谈","谭","貚","郯","醰","錟","顃"],bà:["坝","垻","壩","弝","欛","灞","爸","矲","覇","霸","鮁","鲅"],fén:["坟","墳","妢","岎","幩","枌","棼","汾","焚","燌","燓","羒","羵","蒶","蕡","蚠","蚡","豮","豶","轒","鐼","隫","馩","魵","黂","鼖","鼢","𣸣"],zhuì:["坠","墜","惴","甀","畷","礈","綴","縋","缀","缒","腏","膇","諈","贅","赘","醊","錣","鑆"],pō:["坡","岥","泼","溌","潑","釙","鏺","钋","頗","颇","䥽"],"pǎn bàn":["坢"],kūn:["坤","堃","堒","崐","崑","昆","晜","潉","焜","熴","猑","琨","瑻","菎","蜫","裈","裩","褌","醌","錕","锟","騉","髠","髡","髨","鯤","鲲","鵾","鶤","鹍"],diàn:["坫","垫","墊","壂","奠","婝","店","惦","扂","橂","殿","淀","澱","玷","琔","电","癜","簟","蜔","鈿","電","靛","驔"],"mù mǔ":["坶"],"kē kě":["坷","軻"],xuè:["坹","岤","桖","瀥","狘","瞲","謔","谑","趐"],"dǐ chí":["坻","柢"],lā:["垃","柆","菈","邋"],lǒng:["垄","垅","壟","壠","拢","攏","竉","陇","隴","𬕂"],mín:["垊","姄","岷","崏","捪","旻","旼","民","珉","琘","琝","瑉","痻","盿","砇","緍","緡","缗","罠","苠","鈱","錉","鍲","鴖"],"dòng tóng":["垌","峒","洞"],cí:["垐","嬨","慈","柌","濨","珁","瓷","甆","磁","礠","祠","糍","茨","詞","词","辝","辞","辤","辭","雌","飺","餈","鴜","鶿","鷀","鹚"],duī:["垖","堆","塠","痽","磓","鐓","鐜","鴭"],"duò duǒ":["垛"],"duǒ duò":["垜","挆"],chá:["垞","察","嵖","搽","槎","檫","猹","茬","茶","詧","靫","𥻗"],shǎng:["垧","晌","樉","賞","贘","赏","鋿","鏛","鑜"],shǒu:["垨","守","手","扌","艏","首"],da:["垯","繨","跶"],háng:["垳","斻","杭","筕","絎","绗","航","苀","蚢","裄","貥","迒","頏","颃","魧"],"ān ǎn":["垵"],xīng:["垶","惺","星","曐","煋","猩","瑆","皨","篂","腥","興","觪","觲","謃","騂","骍","鮏","鯹"],"yuàn huán":["垸"],bāng:["垹","帮","幇","幚","幫","捠","梆","浜","邦","邫","鞤","𠳐"],"póu fú":["垺"],cén:["埁","岑","涔"],"běng fēng":["埄"],"dì fáng":["埅"],"xiá jiā":["埉"],"mái mán":["埋"],làng:["埌","崀","浪","蒗","閬","㫰"],"shān yán":["埏"],"qín jīn":["埐"],"pǔ bù":["埔"],huā:["埖","婲","椛","硴","糀","花","蒊","蘤","誮","錵"],"suì sù":["埣"],"pí pì":["埤"],"qīng zhēng":["埥","鲭"],"wǎn wān":["埦"],lǔn:["埨","稐","𫭢"],"zhēng chéng":["埩"],kōng:["埪","崆","箜","躻","錓","鵼"],"cǎi cài":["埰","寀","采"],"chù tòu":["埱"],běng:["埲","琫","菶","鞛"],"kǎn xiàn":["埳"],"yì shì":["埶","醳"],péi:["培","毰","裴","裵","賠","赔","錇","锫","阫","陪"],"sào sǎo":["埽"],"jǐn qīn jìn":["堇"],"péng bèng":["堋"],"qiàn zàn jiàn":["堑"],àn:["堓","屵","岸","按","暗","案","胺","荌","豻","貋","錌","闇","隌","黯"],"duò huī":["堕","墮"],huán:["堚","寏","寰","峘","桓","洹","澴","獂","环","環","糫","繯","缳","羦","荁","萈","萑","豲","鍰","鐶","锾","镮","闤","阛","雈","鬟","鹮","𬘫","𤩽"],"bǎo bǔ pù":["堡"],"máo móu wǔ":["堥"],ruán:["堧","壖","撋"],"ài è yè":["堨"],gèng:["堩","暅"],méi:["堳","塺","媒","嵋","徾","攗","枚","栂","梅","楣","楳","槑","湄","湈","煤","猸","玫","珻","瑂","眉","睂","禖","脄","脢","腜","苺","莓","葿","郿","酶","鎇","镅","霉","鶥","鹛","黴"],dǔ:["堵","琽","睹","笃","篤","覩","賭","赌"],féng:["堸","綘","艂","逢"],hèng:["堼"],chūn:["堾","媋","旾","春","暙","杶","椿","槆","橁","櫄","瑃","箺","萅","蝽","輴","鰆","鶞","䲠"],jiǎng:["塂","奖","奨","奬","桨","槳","獎","耩","膙","蒋","蔣","講","讲","顜"],huāng:["塃","巟","慌","肓","荒","衁"],duàn:["塅","断","斷","椴","段","毈","煅","瑖","碫","簖","籪","緞","缎","腶","葮","躖","鍛","锻"],tǎ:["塔","墖","獭","獺","鮙","鰨","鳎"],wěng:["塕","奣","嵡","攚","暡","瞈","蓊"],"sāi sài sè":["塞"],zàng:["塟","弉","臓","臟","葬","蔵","銺"],tián:["塡","屇","恬","沺","湉","璳","甛","甜","田","畋","畑","碵","磌","胋","闐","阗","鴫","鷆","鷏"],zhèng:["塣","幁","政","証","諍","證","证","诤","郑","鄭","靕","鴊"],"tián zhèn":["填"],wēn:["塭","昷","榲","殟","温","溫","瑥","瘟","蕰","豱","輼","轀","辒","鎾","饂","鰛","鰮","鳁"],liù:["塯","廇","磟","翏","雡","霤","餾","鬸","鷚","鹨"],hǎi:["塰","海","烸","酼","醢"],lǎng:["塱","朖","朗","朤","烺","蓢","㮾"],bèng:["塴","揼","泵","甏","綳","蹦","迸","逬","鏰","镚"],chén:["塵","宸","尘","忱","敐","敶","晨","曟","栕","樄","沉","煁","瘎","臣","茞","莀","莐","蔯","薼","螴","訦","諶","軙","辰","迧","鈂","陈","陳","霃","鷐","麎"],"ōu qiū":["塸"],"qiàn jiàn":["塹"],"zhuān tuán":["塼"],shuǎng:["塽","慡","漺","爽","縔","鏯"],shú:["塾","婌","孰","璹","秫","贖","赎"],lǒu:["塿","嵝","嶁","甊","篓","簍"],chí:["墀","弛","持","池","漦","竾","筂","箎","篪","茌","荎","蚳","謘","貾","赿","踟","迟","迡","遅","遟","遲","鍉","馳","驰"],shù:["墅","庶","庻","怷","恕","戍","束","树","樹","沭","漱","潄","濖","竖","竪","絉","腧","荗","蒁","虪","術","裋","豎","述","鉥","錰","鏣","霔","鶐","𬬸"],"dì zhì":["墆","疐"],kàn:["墈","崁","瞰","矙","磡","衎","鬫"],chěn:["墋","夦","硶","碜","磣","贂","趻","踸","鍖"],"zhǐ zhuó":["墌"],qiǎng:["墏","繈","繦","羥","襁"],zēng:["増","增","憎","璔","矰","磳","罾","譄","鄫","鱛","䎖"],qiáng:["墙","墻","嫱","嬙","樯","檣","漒","牆","艢","蔃","蔷","蘠"],"kuài tuí":["墤"],"tuǎn dǒng":["墥"],"qiáo què":["墧"],"zūn dūn":["墫"],"qiāo áo":["墽"],"yì tú":["墿"],"xué bó jué":["壆"],lǎn:["壈","嬾","孄","孏","懒","懶","揽","擥","攬","榄","欖","浨","漤","灠","纜","缆","罱","覧","覽","览","醂","顲"],huài:["壊","壞","蘾"],rǎng:["壌","壤","攘","爙"],"làn xiàn":["壏"],dǎo:["壔","导","導","岛","島","嶋","嶌","嶹","捣","搗","擣","槝","祷","禂","禱","蹈","陦","隝","隯"],ruǐ:["壡","桵","橤","繠","蕊","蕋","蘂","蘃"],san:["壭"],zhuàng:["壮","壯","壵","撞","焋","状","狀"],"ké qiào":["壳","殼"],kǔn:["壸","壼","悃","捆","梱","硱","祵","稇","稛","綑","裍","閫","閸","阃"],mǎng:["壾","漭","茻","莽","莾","蠎"],cún:["壿","存"],"zhǐ zhōng":["夂"],"gǔ yíng":["夃"],"jiàng xiáng":["夅","降"],"páng féng fēng":["夆"],zhāi:["夈","捚","摘","斋","斎","榸","粂","齋"],"xuàn xiòng":["夐"],wài:["外","顡"],"wǎn yuàn wān yuān":["夗"],"mǎo wǎn":["夘"],mèng:["夢","夣","孟","梦","癦","霥"],"dà dài":["大"],"fū fú":["夫","姇","枎","粰"],guài:["夬","怪","恠"],yāng:["央","姎","抰","殃","泱","秧","胦","鉠","鍈","雵","鴦","鸯"],"hāng bèn":["夯"],gǎo:["夰","搞","杲","槀","槁","檺","稁","稾","稿","縞","缟","菒","藁","藳"],"tāo běn":["夲"],"tóu tou":["头"],"yǎn tāo":["夵"],"kuā kuà":["夸","誇"],"jiá jiā gā xiá":["夹"],huà:["夻","婳","嫿","嬅","崋","摦","杹","枠","桦","槬","樺","澅","画","畫","畵","繣","舙","話","諙","譮","话","黊"],"jiā jiá gā xiá":["夾"],ēn:["奀","恩","蒽"],"dī tì":["奃"],"yǎn yān":["奄","渰"],pào:["奅","疱","皰","砲","礟","礮","靤","麭"],nài:["奈","柰","渿","耐","萘","褦","錼","鼐"],"quān juàn":["奍","弮","棬"],zòu:["奏","揍"],"qì qiè xiè":["契"],kāi:["奒","开","揩","鐦","锎","開"],"bēn bèn":["奔","泍"],tào:["套"],"zàng zhuǎng":["奘"],běn:["奙","本","楍","畚","翉","苯"],"xùn zhuì":["奞"],shē:["奢","檨","猞","畭","畲","賒","賖","赊","輋","𪨶"],"hǎ pò tǎi":["奤"],"ào yù":["奥","奧","澚"],yūn:["奫","氲","氳","蒀","蒕","蝹","贇","赟","𫖳"],"duǒ chě":["奲"],"nǚ rǔ":["女"],nú:["奴","孥","笯","駑","驽"],"dīng dǐng tiǎn":["奵"],"tā jiě":["她"],nuán:["奻"],"hǎo hào":["好"],fàn:["奿","嬎","梵","汎","泛","滼","瀪","犯","畈","盕","笵","範","范","訉","販","贩","軬","輽","飯","飰","饭"],shuò:["妁","搠","朔","槊","烁","爍","矟","蒴","鎙","鑠","铄"],"fēi pèi":["妃"],wàng:["妄","忘","旺","望","朢"],zhuāng:["妆","妝","娤","庄","庒","桩","梉","樁","粧","糚","荘","莊","装","裝"],mā:["妈","媽"],"fū yōu":["妋"],"hài jiè":["妎"],dù:["妒","妬","杜","殬","渡","秺","芏","荰","螙","蠧","蠹","鍍","镀","靯","𬭊"],miào:["妙","庙","庿","廟","玅","竗"],"fǒu pēi pī":["妚"],"yuè jué":["妜"],niū:["妞"],"nà nàn":["妠"],tuǒ:["妥","嫷","庹","椭","楕","橢","鬌","鰖","鵎"],"wàn yuán":["妧"],fáng:["妨","房","肪","防","魴","鲂"],nī:["妮"],zhóu:["妯","碡"],zhāo:["妱","巶","招","昭","釗","鉊","鍣","钊","駋","𬬿"],"nǎi nǐ":["妳"],tǒu:["妵","敨","紏","蘣","黈"],"xián xuán xù":["妶"],"zhí yì":["妷","秇"],ē:["妸","妿","婀","屙"],mèi:["妹","媚","寐","抺","旀","昧","沬","煝","痗","眛","睸","祙","篃","蝞","袂","跊","鬽","魅"],"qī qì":["妻"],"xū xǔ":["姁","稰"],"shān shàn":["姍","姗","苫","釤","钐"],mán:["姏","慲","樠","蛮","蠻","謾","饅","馒","鬗","鬘","鰻","鳗"],jiě:["姐","媎","檞","毑","飷"],"wěi wēi":["委"],pīn:["姘","拼","礗","穦","馪","驞"],"huá huó":["姡"],"jiāo xiáo":["姣"],"gòu dù":["姤"],"lǎo mǔ":["姥"],"nián niàn":["姩"],zhěn:["姫","屒","弫","抮","昣","枕","畛","疹","眕","稹","縝","縥","缜","聄","萙","袗","裖","覙","診","诊","軫","轸","辴","駗","鬒"],héng:["姮","恆","恒","烆","珩","胻","蘅","衡","鑅","鴴","鵆","鸻"],"jūn xún":["姰"],"kuā hù":["姱"],"è yà":["姶"],"xiān shēn":["姺"],wá:["娃"],"ráo rǎo":["娆","嬈"],"shào shāo":["娋"],xiē:["娎","揳","楔","歇","蝎","蠍"],"wǔ méi mǔ":["娒"],"chuò lài":["娕"],niáng:["娘","嬢","孃"],"nà nuó":["娜","𦰡"],"pōu bǐ":["娝"],"něi suī":["娞"],tuì:["娧","煺","蛻","蜕","退","駾"],mǎn:["娨","屘","満","满","滿","螨","蟎","襔","鏋"],"wú wù yú":["娪"],"xī āi":["娭"],"zhuì shuì":["娷"],"dōng dòng":["娻"],"ǎi ái è":["娾"],"ē ě":["娿"],mián:["婂","嬵","宀","杣","棉","檰","櫋","眠","矈","矊","矏","綿","緜","绵","芇","蝒"],"pǒu péi bù":["婄"],biǎo:["婊","脿","表","裱","褾","諘","錶"],"fù fàn":["婏"],wǒ:["婐","婑","我"],"ní nǐ":["婗","棿"],"quán juàn":["婘","惓"],hūn:["婚","昏","昬","棔","涽","睧","睯","碈","荤","葷","蔒","轋","閽","阍"],"qiān jǐn":["婜"],"wān wà":["婠"],"lái lài":["婡","徕","徠"],"zhōu chōu":["婤"],"chuò nào":["婥"],"nüè àn":["婩"],"hùn kūn":["婫"],"dàng yáng":["婸"],nàn:["婻"],"ruò chuò":["婼"],jiǎ:["婽","岬","斚","斝","榎","槚","檟","玾","甲","胛","鉀","钾"],"tōu yú":["婾","媮"],"yù yú":["媀"],"wéi wěi":["媁"],"dì tí":["媂","珶","苐"],róu:["媃","揉","柔","渘","煣","瑈","瓇","禸","粈","糅","脜","腬","葇","蝚","蹂","輮","鍒","鞣","騥","鰇","鶔","𫐓"],"ruǎn nèn":["媆"],miáo:["媌","嫹","描","瞄","苗","鶓","鹋"],"yí pèi":["媐"],"mián miǎn":["媔"],"tí shì":["媞","惿"],"duò tuó":["媠","沲"],ǎo:["媪","媼","艹","芺","袄","襖","镺"],"chú zòu":["媰"],yìng:["媵","映","暎","硬","膡","鱦"],"qín shēn":["嫀"],jià:["嫁","幏","架","榢","稼","駕","驾"],sǎo:["嫂"],"zhēn zhěn":["嫃"],"jiē suǒ":["嫅"],"míng mǐng":["嫇"],niǎo:["嫋","嬝","嬲","茑","蔦","袅","裊","褭","鸟"],tāo:["嫍","幍","弢","慆","掏","搯","槄","涛","滔","濤","瑫","絛","縚","縧","绦","詜","謟","轁","鞱","韜","韬","飸","饕"],biáo:["嫑"],"piáo piāo":["嫖","薸"],xuán:["嫙","悬","懸","暶","檈","漩","玄","璇","璿","痃","蜁","𫠊"],"màn mān":["嫚"],kāng:["嫝","嵻","康","慷","槺","漮","砊","穅","糠","躿","鏮","鱇","𡐓","𩾌"],"hān nǎn":["嫨"],nèn:["嫩","嫰"],zhē:["嫬","遮"],"mā má":["嫲"],piè:["嫳"],zhǎn:["嫸","展","搌","斩","斬","琖","盏","盞","輾","醆","颭","飐"],"xiān yǎn jìn":["嬐"],liǎn:["嬚","敛","斂","琏","璉","羷","脸","臉","蔹","蘝","蘞","裣","襝","鄻"],"qióng huán xuān":["嬛"],dǒng:["嬞","懂","箽","董","蕫","諌"],cān:["嬠","湌","爘","飡","餐","驂","骖"],tiǎo:["嬥","宨","晀","朓","窱","脁"],bí:["嬶","荸","鼻"],liǔ:["嬼","柳","栁","桞","桺","橮","熮","珋","綹","绺","罶","羀","鋶","锍"],"qiān xiān":["孅","欦"],"xié huī":["孈"],"huān quán":["孉"],"lí lì":["孋","麗"],"zhú chuò":["孎"],kǒng:["孔","恐"],"mā zī":["孖"],"sūn xùn":["孙","孫"],"bèi bó":["孛","誖"],"yòu niū":["孧"],zhuǎn:["孨","竱","轉"],hái:["孩","骸"],nāo:["孬"],"chán càn":["孱"],bò:["孹","檗","蘗","譒"],nái:["孻","腉"],"níng nìng":["宁","寍","寗","寜","寧","甯"],zhái:["宅"],"tū jiā":["宊"],sòng:["宋","訟","誦","讼","诵","送","鎹","頌","颂","餸"],ròu:["宍","肉","譳"],zhūn:["宒","窀","衠","諄","谆","迍"],"mì fú":["宓"],"dàng tàn":["宕"],"wǎn yuān":["宛"],chǒng:["宠","寵"],qún:["宭","峮","帬","羣","群","裙","裠"],zǎi:["宰","崽"],"bǎo shí":["宲"],"jiā jia jie":["家"],"huāng huǎng":["宺"],kuān:["宽","寛","寬","臗","鑧","髋","髖"],"sù xiǔ xiù":["宿"],"jié zǎn":["寁"],"bìng bǐng":["寎"],"jìn qǐn":["寖"],"lóu jù":["寠"],"xiě xiè":["寫"],"qīn qìn":["寴"],cùn:["寸","籿"],duì:["对","対","對","怼","憝","懟","濧","瀩","碓","祋","綐","薱","譈","譵","轛","队","陮"],"lüè luó":["寽"],"shè yè yì":["射"],"jiāng jiàng qiāng":["将"],"jiāng jiàng":["將","浆","漿","畺"],zūn:["尊","嶟","樽","罇","遵","鐏","鱒","鳟","鶎","鷷","𨱔"],"shù zhù":["尌","澍"],xiǎo:["小","晓","暁","曉","皛","皢","筱","筿","篠","謏","𫍲"],"jié jí":["尐","诘","鞊"],"shǎo shào":["少"],ěr:["尒","尓","尔","栮","毦","洱","爾","珥","耳","薾","衈","趰","迩","邇","鉺","铒","餌","饵","駬"],"wāng yóu":["尢"],wāng:["尣","尩","尪","尫","汪"],liào:["尥","尦","廖","撂","料","炓","窷","鐐","镣","𪤗"],"méng máng lóng páng":["尨"],gà:["尬","魀"],"kuì kuǐ":["尯"],tuí:["尵","弚","穨","蘈","蹪","隤","頹","頺","頽","颓","魋","𬯎"],yǐn:["尹","嶾","引","朄","檃","檼","櫽","淾","濥","瘾","癮","粌","蘟","蚓","螾","讔","赺","趛","輑","鈏","靷"],"chǐ chě":["尺"],kāo:["尻","髛"],"jìn jǐn":["尽"],"wěi yǐ":["尾"],"niào suī":["尿"],céng:["层","層","嶒","驓"],diǎo:["屌"],"píng bǐng bīng":["屏"],lòu:["屚","漏","瘘","瘺","瘻","鏤","镂","陋"],"shǔ zhǔ":["属","屬"],"xiè tì":["屟"],"chè cǎo":["屮"],"tún zhūn":["屯"],"nì jǐ":["屰"],"hóng lóng":["屸"],"qǐ kǎi":["岂","豈"],áng:["岇","昂","昻"],"gǎng gāng":["岗","崗"],kě:["岢","敤","渇","渴","炣"],gǒu:["岣","狗","玽","笱","耇","耈","耉","苟","豿"],tiáo:["岧","岹","樤","祒","笤","芀","萔","蓚","蓨","蜩","迢","鋚","鎥","鞗","髫","鯈","鰷","鲦","齠","龆"],"qū jū":["岨"],lǐng:["岭","嶺","領","领"],pò:["岶","敀","洦","湐","烞","珀","破","砶","粕","蒪","魄"],"bā kè":["峇"],luò:["峈","摞","洛","洜","犖","珞","笿","纙","荦","詻","雒","駱","骆","鵅"],"fù niè":["峊"],ěn:["峎"],"zhì shì":["峙","崻"],qiǎ:["峠","跒","酠","鞐"],"qiáo jiào":["峤","癄"],"xié yé":["峫"],bū:["峬","庯","晡","誧","逋","鈽","錻","钸","餔","鵏"],chóng:["崇","崈","爞","虫","蝩","蟲","褈","隀"],"zú cuì":["崒","椊"],"líng léng":["崚"],"dòng dōng":["崠"],xiáo:["崤","洨","淆","訤","誵"],"pí bǐ":["崥","芘"],"zhǎn chán":["崭","嶃","嶄"],"wǎi wēi":["崴"],"yáng dàng":["崵"],"shì dié":["崼"],yào:["崾","曜","熎","燿","矅","穾","窔","筄","耀","艞","药","葯","薬","藥","袎","覞","詏","讑","靿","鷂","鹞","鼼"],"kān zhàn":["嵁"],"hán dǎng":["嵅"],"qiàn kàn":["嵌"],"wù máo":["嵍"],"kě jié":["嵑","嶱"],"wēi wěi":["嵔"],kē:["嵙","柯","棵","榼","樖","牁","牱","犐","珂","疴","瞌","磕","礚","科","稞","窠","萪","薖","蚵","蝌","趷","轲","醘","鈳","钶","頦","顆","颗","髁"],"dàng táng":["嵣"],"róng yíng":["嵤","爃"],"ái kǎi":["嵦"],"kāo qiāo":["嵪"],cuó:["嵯","嵳","痤","矬","蒫","蔖","虘","鹺","鹾"],"qiǎn qīn":["嵰"],"dì dié":["嵽"],cēn:["嵾"],dǐng:["嵿","艼","薡","鐤","頂","顶","鼎","鼑"],"áo ào":["嶅"],"pǐ pèi":["嶏"],"jiào qiáo":["嶠","潐"],"jué guì":["嶡","鳜"],"zhān shàn":["嶦","鳣"],"xiè jiè":["嶰"],"guī xī juàn":["嶲"],rū:["嶿"],"lì liè":["巁","棙","爄","綟"],"xī guī juàn":["巂"],"yíng hōng":["巆"],yǐng:["巊","廮","影","摬","梬","潁","瘿","癭","矨","穎","郢","鐛","頴","颍","颕","颖"],chǎo:["巐","炒","煼","眧","麨"],cuán:["巑","櫕","欑"],chuān:["巛","川","氚","瑏","穿"],"jīng xíng":["巠"],cháo:["巢","巣","晁","漅","潮","牊","窲","罺","謿","轈","鄛","鼌"],qiǎo:["巧","愀","髜"],gǒng:["巩","廾","拱","拲","栱","汞","珙","輁","鞏"],"chà chā chāi cī":["差"],"xiàng hàng":["巷"],shuài:["帅","帥","蟀"],pà:["帊","帕","怕","袙"],"tǎng nú":["帑"],"mò wà":["帓"],"tiē tiě tiè":["帖"],zhǒu:["帚","晭","疛","睭","箒","肘","菷","鯞"],"juǎn juàn":["帣"],shuì:["帨","涗","涚","睡","稅","税","裞"],"chóu dào":["帱","幬"],"jiǎn jiān sàn":["帴"],"shà qiè":["帹"],"qí jì":["帺","荠"],"shān qiāo shēn":["幓"],"zhuàng chuáng":["幢"],"chān chàn":["幨"],miè:["幭","懱","搣","滅","灭","烕","礣","篾","蔑","薎","蠛","衊","鑖","鱴","鴓"],"gān gàn":["干"],"bìng bīng":["并","幷"],"jī jǐ":["幾"],"guǎng ān":["广"],guǎng:["広","廣","犷","獷"],me:["庅"],"dùn tún":["庉"],"bài tīng":["庍"],"yìng yīng":["应"],"dǐ de":["底"],"dù duó":["度"],"máng méng páng":["庬"],"bìng píng":["庰"],chěng:["庱","悜","睈","逞","騁","骋"],"jī cuò":["庴"],qǐng:["庼","廎","檾","漀","苘","請","謦","请","頃","顷"],"guī wěi huì":["廆"],"jǐn qín":["廑"],kuò:["廓","扩","拡","擴","濶","筈","萿","葀","蛞","闊","阔","霩","鞟","鞹","韕","頢","鬠"],"qiáng sè":["廧","薔"],"yǐn yìn":["廴","隐","隠","隱","飮","飲","饮"],"pò pǎi":["廹","迫"],"nòng lòng":["弄"],"dì tì tuí":["弟"],"jué zhāng":["弡"],"mí mǐ":["弥","彌","靡"],chāo:["弨","怊","抄","欩","訬","超","鈔","钞"],yi:["弬"],shāo:["弰","旓","烧","焼","燒","筲","艄","萷","蕱","輎","髾","鮹"],"xuān yuān":["弲"],"qiáng qiǎng jiàng":["強","强"],"tán dàn":["弹","醈"],biè:["彆"],"qiáng jiàng qiǎng":["彊"],"jì xuě":["彐"],tuàn:["彖","褖"],yuē:["彟","曰","曱","矱"],"shān xiǎn":["彡"],wén:["彣","文","炆","珳","瘒","繧","聞","芠","蚉","蚊","螡","蟁","閺","閿","闅","闦","闻","阌","雯","馼","駇","魰","鳼","鴍","鼤","𫘜"],"péng bāng":["彭"],"piāo piào":["彯"],"zhuó bó":["彴"],"tuǒ yí":["彵"],"páng fǎng":["彷"],wǎng:["彺","往","徃","惘","枉","棢","網","网","罒","罓","罔","罖","菵","蛧","蝄","誷","輞","辋","魍"],cú:["徂","殂"],"dài dāi":["待"],huái:["徊","怀","懐","懷","槐","淮","耲","蘹","褢","褱","踝"],"wā wàng jiā":["徍"],"chěng zhèng":["徎"],"dé děi de":["得"],"cóng zòng":["從"],"shì tǐ":["徥"],"tí chí":["徲","鶗","鶙"],dé:["徳","德","恴","悳","惪","淂","鍀","锝"],"zhǐ zhēng":["徴","徵"],bié:["徶","癿","莂","蛂","襒","蹩"],"chōng zhǒng":["徸"],"jiǎo jiào":["徼","笅","筊"],"lòng lǒng":["徿"],"qú jù":["忂","渠","瞿","螶"],"dìng tìng":["忊"],gǎi:["忋","改"],rěn:["忍","栠","栣","秹","稔","綛","荏","荵","躵"],chàn:["忏","懴","懺","硟","羼","韂","顫"],tè:["忑","慝","特","蟘","鋱","铽"],"tè tēi tuī":["忒"],"gān hàn":["忓","攼"],"yì qì":["忔"],"tài shì":["忕"],"xī liě":["忚"],"yīng yìng":["応","應","譍"],"mǐn wěn mín":["忞","忟"],"sōng zhōng":["忪"],"yù shū":["忬","悆"],"qí shì":["忯","耆"],"tún zhūn dùn":["忳"],"qián qín":["忴","扲"],hún:["忶","浑","渾","餛","馄","魂","鼲"],niǔ:["忸","扭","炄","狃","紐","纽","莥","鈕","钮","靵"],"kuáng wǎng":["忹"],"kāng hàng":["忼"],"kài xì":["忾","愾"],òu:["怄","慪"],"bǎo bào":["怉"],"mín mén":["怋"],"zuò zhà":["怍"],zěn:["怎"],yàng:["怏","恙","样","様","樣","漾","羕","詇"],"kòu jù":["怐"],"náo niú":["怓"],"zhēng zhèng":["怔","掙","钲","铮"],"tiē zhān":["怗"],"hù gù":["怘"],"cū jù zū":["怚"],"sī sāi":["思"],"yóu chóu":["怞"],"tū dié":["怢"],"yōu yào":["怮"],xuàn:["怰","昡","楦","泫","渲","炫","琄","眩","碹","絢","縼","繏","绚","蔙","衒","袨","贙","鉉","鏇","铉","镟","颴"],"xù xuè":["怴"],"bì pī":["怶"],"xī shù":["怸"],"nèn nín":["恁"],"tiāo yáo":["恌"],"xī qī xù":["恓"],"xiào jiǎo":["恔"],"hū kuā":["恗"],nǜ:["恧","朒","衂","衄"],hèn:["恨"],"dòng tōng":["恫"],"quán zhuān":["恮"],"è wù ě wū":["恶","惡"],tòng:["恸","慟","憅","痛","衕"],"yuān juàn":["悁"],"qiāo qiǎo":["悄"],"jiè kè":["悈"],"hào jiào":["悎"],huǐ:["悔","檓","毀","毁","毇","燬","譭"],"mán mèn":["悗","鞔"],"yī yì":["悘","衣"],quān:["悛","箞","鐉","𨟠"],"kuī lǐ":["悝"],"yì niàn":["悥"],"mèn mēn":["悶"],guàn:["悹","悺","惯","慣","掼","摜","樌","欟","泴","涫","潅","灌","爟","瓘","盥","礶","祼","罆","罐","貫","贯","躀","遦","鏆","鑵","鱹","鸛","鹳"],"kōng kǒng":["悾"],"lǔn lùn":["惀"],guǒ:["惈","果","椁","槨","粿","綶","菓","蜾","裹","褁","輠","餜","馃"],"yuān wǎn":["惌","箢"],"lán lín":["惏"],"yù xù":["惐","淢"],"chuò chuì":["惙"],"hūn mèn":["惛"],"chǎng tǎng":["惝"],"suǒ ruǐ":["惢"],cǎn:["惨","慘","憯","黪","黲","䅟"],cán:["惭","慙","慚","残","殘","蚕","蝅","蠶","蠺"],"dàn dá":["惮","憚"],rě:["惹"],"yú tōu":["愉"],"kài qì":["愒"],"dàng táng shāng yáng":["愓"],"chén xìn dān":["愖"],"kè qià":["愘"],nuò:["愞","懦","懧","掿","搦","榒","稬","穤","糑","糥","糯","諾","诺","蹃","逽","鍩","锘"],gǎn:["感","擀","敢","桿","橄","澉","澸","皯","秆","稈","笴","芉","衦","赶","趕","鱤","鳡"],"còng sōng":["愡"],"sāi sī sǐ":["愢"],"gōng gòng hǒng":["愩","慐"],"shuò sù":["愬","洬"],"yáo yào":["愮"],huàng:["愰","曂","榥","滉","皝","皩","鎤","㿠"],zhěng:["愸","抍","拯","整","晸"],cǎo:["愺","艸","草","騲"],"xì xié":["慀"],"cǎo sāo":["慅"],"xù chù":["慉"],"qiè qiàn":["慊"],"cáo cóng":["慒"],"ào áo":["慠"],"lián liǎn":["慩","梿","槤","櫣"],"jìn qín jǐn":["慬"],"dì chì":["慸"],"zhí zhé":["慹"],"lóu lǚ":["慺","鷜"],còng:["憁","謥"],"zhī zhì":["憄","知","織","织"],chēng:["憆","摚","撐","撑","晿","柽","棦","橕","檉","泟","浾","琤","瞠","碀","緽","罉","蛏","蟶","赪","赬","鏿","鐣","阷","靗","頳","饓"],biē:["憋","虌","鱉","鳖","鼈","龞"],"chéng dèng zhèng":["憕"],"xǐ xī":["憘"],"duì dùn tūn":["憞"],"xiāo jiāo":["憢"],"xián xiàn":["憪"],"liáo liǎo":["憭","燎","爎","爒"],shéng:["憴","縄","繉","繩","绳","譝"],"náo nǎo náng":["憹"],"jǐng jìng":["憼"],"jǐ jiǎo":["憿"],"xuān huān":["懁"],"cǎo sāo sào":["懆"],mèn:["懑","懣","暪","焖","燜"],"mèng méng měng":["懜"],"ài yì nǐ":["懝"],"méng měng":["懞","瞢","矒"],"qí jī jì":["懠"],mǒ:["懡"],"lán xiàn":["懢"],"yōu yǒu":["懮"],"liú liǔ":["懰","藰"],ràng:["懹","譲","讓","让"],huān:["懽","欢","歓","歡","獾","讙","貛","酄","驩","鴅","鵍"],nǎn:["戁","揇","湳","煵","腩","蝻","赧"],"mí mó":["戂"],"gàng zhuàng":["戅","戆"],"zhuàng gàng":["戇"],"xū qu":["戌"],"xì hū":["戏","戯","戲"],"jiá gā":["戛"],zéi:["戝","蠈","賊","贼","鰂","鱡","鲗"],děng:["戥","等"],"hū xì":["戱"],chuō:["戳","踔","逴"],"biǎn piān":["扁"],"shǎng jiōng":["扄"],"shàn shān":["扇"],cái:["才","材","纔","裁","財","财"],"zhā zā zhá":["扎"],"lè lì cái":["扐"],"bā pá":["扒"],"dǎ dá":["打"],rēng:["扔"],"fǎn fú":["払"],"diǎo dí yuē lì":["扚"],"káng gāng":["扛"],"yū wū":["扜"],"yū wū kū":["扝"],"tuō chǐ yǐ":["扡"],"gǔ jié xì gē":["扢"],dèn:["扥","扽"],"sǎo sào":["扫","掃"],rǎo:["扰","擾","隢"],"xī chā qì":["扱"],"bān pān":["扳"],"bā ào":["扷"],"xī zhé":["扸"],"zhì sǔn kǎn":["扻"],zhǎo:["找","沼","瑵"],"kuáng wǎng zài":["抂"],"hú gǔ":["抇","鹄","鹘"],"bǎ bà":["把"],"dǎn shěn":["抌"],"nè nì ruì nà":["抐"],zhuā:["抓","檛","簻","膼","髽"],póu:["抔","裒"],"zhé shé zhē":["折"],"póu pōu fū":["抙","捊"],pāo:["抛","拋","脬","萢"],"ǎo ào niù":["抝"],"lūn lún":["抡","掄"],"qiǎng qiāng chēng":["抢"],"zhǐ zhǎi":["抧"],"bù pū":["抪","柨"],"yǎo tāo":["抭"],"hē hè qiā":["抲"],"nǐ ní":["抳"],"pī pēi":["抷"],"mǒ mò mā":["抹"],chōu:["抽","犨","犫","瘳","篘"],"jiā yá":["拁"],"fú bì":["拂","畐","鶝"],zhǎ:["拃","眨","砟","鮺","鲝"],"dān dàn dǎn":["担"],"chāi cā":["拆"],niān:["拈","蔫"],"lā lá lǎ là":["拉"],"bàn pàn":["拌"],pāi:["拍"],līn:["拎"],guǎi:["拐","枴","柺"],"tuò tà zhí":["拓"],"ào ǎo niù":["拗"],"jū gōu":["拘"],"pīn pàn fān":["拚"],"bài bái":["拜"],bài:["拝","敗","稗","粺","薭","贁","败","韛"],qiá:["拤"],"nǐng níng nìng":["拧"],"zé zhái":["择","擇"],hén:["拫","痕","鞎"],"kuò guā":["括"],"jié jiá":["拮"],nǐn:["拰"],shuān:["拴","栓","閂","闩"],"cún zùn":["拵"],"zā zǎn":["拶","桚"],kǎo:["拷","攷","栲","烤","考"],"yí chǐ hài":["拸"],"cè sè chuò":["拺"],"zhuài zhuāi yè":["拽"],"shí shè":["拾"],bāi:["挀","掰"],"kuò guāng":["挄"],nòng:["挊","挵","齈"],"jiào jiāo":["挍","敎","教"],"kuà kū":["挎"],"ná rú":["挐"],"tiāo tiǎo":["挑"],"dié shè":["挕"],liě:["挘","毟"],"yà yǎ":["挜","掗"],"wō zhuā":["挝"],"xié jiā":["挟","挾"],"dǎng dàng":["挡","擋"],"zhèng zhēng":["挣","正","症"],"āi ái":["挨"],"tuō shuì":["挩","捝"],"tǐ tì":["挮"],"suō shā":["挱"],"sā shā suō":["挲"],"kēng qiān":["挳","摼"],"bàng péng":["挷"],"ruó ruá":["挼"],"jiǎo kù":["捁"],"wǔ wú":["捂"],tǒng:["捅","桶","筒","筩","統","綂","统","㛚"],"huò chì":["捇"],"tú shū chá":["捈"],"lǚ luō":["捋"],"shāo shào":["捎","稍"],niē:["捏","揑"],"shù sǒng sōu":["捒"],"yé yú":["捓"],"jué zhuó":["捔"],"bù pú zhì":["捗"],zùn:["捘","銌"],lāo:["捞","撈","粩"],sǔn:["损","損","榫","笋","筍","箰","鎨","隼"],"wàn wǎn wān yù":["捥"],pěng:["捧","淎","皏"],shě:["捨"],"fǔ fù bǔ":["捬"],dáo:["捯"],"luò luǒ wǒ":["捰"],"juǎn quán":["捲"],"chēn tiǎn":["捵"],"niǎn niē":["捻"],"ruó wěi ré":["捼"],zuó:["捽","昨","秨","稓","筰","莋","鈼"],"wò xiá":["捾"],"qìng qiàn":["掅"],"póu pǒu":["掊"],qiā:["掐","葜"],"pái pǎi":["排"],"qiān wàn":["掔"],"yè yē":["掖"],"niè nǐ yì":["掜"],"huò xù":["掝"],"yàn shàn yǎn":["掞"],"zhěng dìng":["掟"],kòng:["控","鞚"],tuī:["推","蓷","藬"],"zōu zhōu chōu":["掫"],tiàn:["掭","舚"],kèn:["掯","裉","褃"],pá:["掱","杷","潖","爬","琶","筢"],"guó guāi":["掴"],"dǎn shàn":["掸","撣"],"chān xiān càn shǎn":["掺"],sāo:["掻","搔","溞","繅","缫","螦","騒","騷","鰠","鱢","鳋"],pèng:["掽","椪","槰","碰","踫"],"zhēng kēng":["揁"],"jiū yóu":["揂"],"jiān jiǎn":["揃","籛"],"pì chè":["揊"],"sāi zǒng cāi":["揌"],"tí dī dǐ":["提"],"zǒng sōng":["揔"],"huáng yóng":["揘"],"zǎn zuàn":["揝"],"xū jū":["揟"],"ké qiā":["揢"],"chuāi chuǎi chuài tuán zhuī":["揣"],"dì tì":["揥"],"lá là":["揦"],là:["揧","楋","溂","瓎","瘌","翋","臘","蝋","蝲","蠟","辢","辣","鑞","镴","鬎","鯻","𬶟"],"jiē qì":["揭"],"chòng dǒng":["揰"],"dié shé yè":["揲"],"jiàn qián jiǎn":["揵"],yé:["揶","爷","爺","瑘","鋣","鎁","铘"],chān:["搀","摻","攙","裧","襜","覘","觇","辿","鋓"],"gē gé":["搁","擱"],"lǒu lōu":["搂","摟"],"chōu zǒu":["搊"],chuāi:["搋"],sūn:["搎","槂","狲","猻","荪","蓀","蕵","薞","飧","飱"],"róng náng nǎng":["搑"],"péng bàng":["搒"],cuō:["搓","瑳","磋","蹉","遳","醝"],"kē è":["搕"],"nù nuò nòu":["搙"],"lā xié xiàn":["搚"],qiǔ:["搝","糗"],"xiǎn xiān":["搟"],"jié zhé":["搩"],"pán bān pó":["搫"],bān:["搬","攽","斑","斒","班","瘢","癍","肦","螁","螌","褩","辬","頒","颁","𨭉"],"zhì nái":["搱"],"wā wǎ wà":["搲"],huá:["搳","撶","滑","猾","蕐","螖","譁","鏵","铧","驊","骅","鷨"],"qiāng qiǎng chēng":["搶"],"tián shēn":["搷"],"ná nuò":["搻"],èn:["摁"],"shè niè":["摄","攝"],bìn:["摈","擯","殡","殯","膑","臏","髌","髕","髩","鬂","鬓","鬢"],"shā sà shǎi":["摋"],"chǎn sùn":["摌"],"jiū liú liáo jiǎo náo":["摎"],"féng pěng":["摓"],shuāi:["摔"],"dì tú zhí":["摕"],"qì jì chá":["摖"],"sōu sǒng":["摗"],"liǎn liàn":["摙"],"gài xì":["摡"],"hù chū":["摢"],tàng:["摥","烫","燙","鐋"],"nái zhì":["摨"],"mó mā":["摩"],"jiāng qiàng":["摪"],"áo qiáo":["摮"],"niè chè":["摰"],"mán màn":["摱"],"chàn cán":["摲"],"sè mí sù":["摵"],"biāo biào":["摽"],"juē jué":["撅"],piē:["撆","暼","氕","瞥"],"piě piē":["撇"],"zǎn zān zēn qián":["撍"],"sā sǎ":["撒"],hòng:["撔","訌","讧","闀","鬨"],"héng guàng":["撗"],niǎn:["撚","撵","攆","涊","焾","碾","簐","蹍","蹨","躎","輦","辇"],"chéng zhěng":["撜"],"huī wéi":["撝"],cāo:["撡","操","糙"],"xiāo sōu":["撨"],"liáo liāo":["撩"],"cuō zuǒ":["撮"],"wěi tuǒ":["撱"],cuān:["撺","攛","汆","蹿","躥","鑹","镩"],"qiào yāo jī":["撽"],"zhuā wō":["撾"],"lèi léi":["擂"],nǎng:["擃","攮","曩","灢"],"qíng jǐng":["擏"],kuǎi:["擓","蒯","㧟"],"pǐ bò":["擗"],"bò bāi":["擘"],"jù jǐ":["據"],mēng:["擝"],"sǒu sòu":["擞"],xǐng:["擤","箵","醒"],cā:["擦"],"níng nǐng nìng":["擰"],"zhì jié":["擳"],"là liè":["擸","爉"],"sòu sǒu":["擻"],"lì luò yuè":["擽"],"tī zhāi zhì":["擿"],pān:["攀","潘","眅","萠"],lèi:["攂","泪","涙","淚","禷","类","纇","蘱","酹","銇","錑","頛","頪","類","颣"],"cā sǎ":["攃"],"jùn pèi":["攈"],"lì luò":["攊","躒"],"là lài":["攋","櫴"],"lú luó":["攎"],"zǎn cuán":["攒"],"xiān jiān":["攕"],"mí mǐ mó":["攠"],"zǎn cuán zàn zuān":["攢"],zuàn:["攥"],"lì shài":["攦"],"lì luǒ":["攭"],"guǐ guì":["攱"],"jī qī yǐ":["攲"],fàng:["放"],"wù móu":["敄"],"chù shōu":["敊"],"gé guó è":["敋"],"duó duì":["敓","敚"],"duō què":["敠","敪"],"sàn sǎn":["散"],"dūn duì":["敦","镦"],"qī yǐ jī":["敧"],"xiào xué":["敩"],"shù shǔ shuò":["数","數"],"ái zhú":["敱","敳"],"xiòng xuàn":["敻"],"zhuó zhú":["斀"],"yì dù":["斁"],"lí tái":["斄"],"fěi fēi":["斐"],"yǔ zhōng":["斔"],"dòu dǒu":["斗"],"wò guǎn":["斡"],"tǒu tiǎo":["斢"],dòu:["斣","梪","浢","痘","窦","竇","脰","荳","豆","逗","郖","酘","閗","闘","餖","饾","鬥","鬦","鬪","鬬","鬭"],"yín zhì":["斦"],"chǎn jiè":["斺"],"wū yū yú":["於"],"yóu liú":["斿"],"páng bàng":["旁"],"máo mào":["旄"],"pī bì":["旇"],"xuán xuàn":["旋"],"wú mó":["无"],zǎo:["早","枣","栆","棗","澡","璪","薻","藻","蚤"],gā:["旮"],"gàn hàn":["旰"],"tái yīng":["旲"],"xū xù":["旴"],"tūn zhùn":["旽"],"wù wǔ":["旿"],"pò pèi":["昢"],zòng:["昮","猔","疭","瘲","粽","糉","糭","縦"],ǎi:["昹","毐","矮","蔼","藹","譪","躷","霭","靄"],"huàng huǎng":["晃"],xuǎn:["晅","癣","癬","选","選"],"xù kuā":["晇"],hǒng:["晎"],shài:["晒","曬"],"yūn yùn":["晕","煴"],"shèng chéng":["晟","椉","盛"],"jǐng yǐng":["景"],shǎn:["晱","熌","睒","覢","閃","闪","陕","陝"],"qǐ dù":["晵"],"ǎn àn yǎn":["晻"],"wǎng wàng":["暀"],zàn:["暂","暫","瓉","瓒","瓚","禶","襸","讃","讚","賛","贊","赞","蹔","鄼","錾","鏨","饡"],"yùn yūn":["暈"],"mín mǐn":["暋"],"dǔ shǔ":["暏"],shǔ:["暑","曙","潻","癙","糬","署","薥","薯","藷","蜀","蠴","襡","襩","鱪","鱰","黍","鼠","鼡"],"jiǎn lán":["暕"],nuǎn:["暖","煗","餪"],"bào pù":["暴"],"xī xǐ":["暿"],"pù bào":["曝","瀑"],"qū qǔ":["紶"],"qǔ qū":["曲"],"gèng gēng":["更"],"hū hù":["曶","雽"],"zēng céng":["曽","橧"],"céng zēng":["曾","竲"],"cǎn qián jiàn":["朁"],"qiè hé":["朅"],"bì pí":["朇","禆","笓","裨"],"yǒu yòu":["有"],"bān fén":["朌","鳻"],"fú fù":["服","洑"],"fěi kū":["朏","胐"],"qú xù chǔn":["朐"],"juān zuī":["朘"],"huāng máng wáng":["朚"],"qī jī":["期"],"tóng chuáng":["朣","橦"],zhá:["札","牐","箚","蚻","譗","鍘","铡","閘","闸"],"zhú shù shú":["朮"],"shù shú zhú":["术"],"zhū shú":["朱"],"pǔ pò pō piáo":["朴"],"dāo tiáo mù":["朷"],"guǐ qiú":["朹"],xiǔ:["朽","滫","潃","糔"],"chéng chēng":["朾"],zá:["杂","沯","砸","襍","雑","雜","雥","韴"],"yú wū":["杅"],"gān gǎn":["杆"],"chā chà":["杈"],"shān shā":["杉"],cūn:["村","皴","竴","膥","踆","邨"],"rèn ér":["杒","梕"],"sháo biāo":["杓"],"dì duò":["杕","枤"],"gū gài":["杚"],"yí zhì lí duò":["杝"],"gàng gāng":["杠"],"tiáo tiāo":["条","條"],"mà mǎ":["杩"],"sì zhǐ xǐ":["杫"],"yuán wán":["杬","蚖"],"bèi fèi":["杮"],"shū duì":["杸"],"niǔ chǒu":["杻"],"wò yuè":["枂","臒"],máo:["枆","毛","氂","渵","牦","矛","罞","茅","茆","蝥","蟊","軞","酕","鉾","錨","锚","髦","鶜"],"pī mì":["枈"],àng:["枊","盎","醠"],"fāng bìng":["枋"],"hù dǐ":["枑"],xín:["枔","襑","鐔","鬵"],"yāo yǎo":["枖"],"ě è":["枙"],"zhī qí":["枝"],"cōng zōng":["枞","樅"],"xiān zhēn":["枮"],"tái sì":["枱"],"gǒu jǔ gōu":["枸"],"bāo fú":["枹"],"yì xiè":["枻","栧"],"tuó duò":["柁","馱","駄","驮"],"yí duò lí":["柂"],"nǐ chì":["柅"],"pán bàn":["柈","跘"],"yǎng yàng yāng yīng":["柍"],"fù fū fǔ":["柎"],"bǎi bó bò":["柏"],mǒu:["某"],"sháo shào":["柖"],zhè:["柘","樜","浙","淛","蔗","蟅","這","鷓","鹧","䗪"],"yòu yóu":["柚","櫾"],"guì jǔ":["柜"],"zhà zuò":["柞"],"dié zhì":["柣","眰"],"zhā zǔ zū":["柤"],"chá zhā":["查","査"],"āo ào":["柪","軪"],"bā fú pèi bó biē":["柭"],"duò zuó wù":["柮"],"bì bié":["柲"],"zhù chù":["柷"],"bēi pēi":["柸"],"shì fèi":["柹"],"shān zhà shi cè":["栅"],"lì yuè":["栎","櫟"],"qì qiè":["栔","砌"],"qī xī":["栖","蹊"],"guā kuò":["栝"],"bīng bēn":["栟"],"xiào jiào":["校"],"jiàn zùn":["栫","袸"],"yǒu yù":["栯"],"hé hú":["核"],gēn:["根","跟"],"zhī yì":["栺"],"gé gē":["格"],"héng háng":["桁"],"guàng guāng":["桄"],"yí tí":["桋","荑"],sāng:["桑","桒","槡"],"jú jié":["桔"],"yú móu":["桙"],"ráo náo":["桡","橈"],"guì huì":["桧","檜"],"chén zhèn":["桭"],"tīng yíng":["桯"],"bó po":["桲"],"bèn fàn":["桳"],"fēng fèng":["桻","葑"],"sù yìn":["梀"],"tǐng tìng":["梃"],"xuān juān xié":["梋"],"tú chá":["梌"],"āo yòu":["梎"],kuǎn:["梡","欵","款","歀"],"shāo sào":["梢"],"qín chén cén":["梣"],"lí sì qǐ":["梩"],"chān yán":["梴"],"bīn bīng":["梹","槟","檳"],"táo chóu dào":["梼"],"cōng sōng":["棇"],"gùn hùn":["棍"],"dé zhé":["棏"],"pái bèi pèi":["棑"],"bàng pǒu bèi bēi":["棓"],"dì dài tì":["棣"],sēn:["森","椮","槮","襂"],"rěn shěn":["棯"],"léng lēng líng":["棱"],"fú sù":["棴"],"zōu sǒu":["棷"],zōu:["棸","箃","緅","諏","诹","邹","郰","鄒","鄹","陬","騶","驺","鯫","鲰","黀","齱","齺"],"zhào zhuō":["棹"],"chēn shēn":["棽"],"jiē qiè":["椄"],"yǐ yī":["椅"],"chóu zhòu diāo":["椆"],"qiāng kōng":["椌"],"zhuī chuí":["椎"],"bēi pí":["椑"],mēn:["椚"],"quān juàn quán":["椦"],"duǒ chuán":["椯"],"wěi huī":["椲"],"jiǎ jiā":["椵"],"hán jiān":["椷"],"shèn zhēn":["椹"],"yàn yà":["椻"],"zhā chá":["楂"],"guō kuǎ":["楇"],"jí zhì":["楖"],"kǔ hù":["楛"],"yóu yǒu":["楢"],"sǒng cōng":["楤"],"yuán xuàn":["楥"],"yǎng yàng yīng":["楧"],pián:["楩","胼","腁","賆","蹁","駢","騈","骈","骿","㛹"],"dié yè":["楪"],"dùn shǔn":["楯"],"còu zòu":["楱"],"dì dǐ shì":["楴"],"kǎi jiē":["楷"],"róu ròu":["楺"],"lè yuè":["楽"],"wēn yùn":["榅","鞰"],lǘ:["榈","櫚","氀","膢","藘","閭","闾","驢","驴"],shén:["榊","神","鉮","鰰","𬬹"],"bī pi":["榌"],"zhǎn niǎn zhèn":["榐"],"fú fù bó":["榑"],"jiàn jìn":["榗"],"bǎng bàng":["榜"],"shā xiè":["榝","樧"],nòu:["槈","耨","鎒","鐞"],"qiǎn lián xiàn":["槏"],gàng:["槓","焵","焹","筻","鿍"],gāo:["槔","槹","橰","櫜","睾","篙","糕","羔","臯","韟","餻","高","髙","鷎","鷱","鼛"],"diān zhěn zhēn":["槙"],"kǎn jiàn":["槛"],"xí dié":["槢"],"jī guī":["槣"],"róng yōng":["槦"],"tuán shuàn quán":["槫"],"qì sè":["槭"],"cuī zhǐ":["槯"],"yǒu chǎo":["槱"],"màn wàn":["槾"],"lí chī":["樆"],"léi lěi":["樏","櫑","礌"],"cháo jiǎo chāo":["樔"],"chēng táng":["樘"],"jiū liáo":["樛"],"mó mú":["模"],"niǎo mù":["樢"],"héng hèng":["横","橫"],xuě:["樰","膤","艝","轌","雪","鱈","鳕"],"fá fèi":["橃"],rùn:["橍","润","潤","膶","閏","閠","闰"],"zhǎn jiǎn":["橏"],shùn:["橓","瞚","瞬","舜","蕣","順","顺","鬊"],"tuí dūn":["橔"],"táng chēng":["橖"],"sù qiū":["橚"],"tán diàn":["橝"],"fén fèn fèi":["橨"],"rǎn yān":["橪"],"cū chu":["橻"],"shū qiāo":["橾"],"píng bò":["檘"],"zhái shì tú":["檡"],"biǎo biāo":["檦"],"qiān lián":["檶"],"nǐ mí":["檷"],"jiàn kǎn":["檻"],"nòu ruǎn rú":["檽"],"jī jì":["櫅","禨"],"huǎng guǒ gǔ":["櫎"],"lǜ chū":["櫖"],"miè mèi":["櫗"],ōu:["櫙","欧","歐","殴","毆","瓯","甌","膒","藲","謳","讴","鏂","鴎","鷗","鸥"],"zhù zhuó":["櫡"],"jué jì":["櫭"],"huái guī":["櫰"],"chán zhàn":["欃"],"wéi zuì":["欈"],cáng:["欌","鑶"],"yù yì":["欥"],"chù qù xì":["欪"],"kài ài":["欬"],"yì yīn":["欭"],"xì kài":["欯"],"shuò sòu":["欶"],"ǎi ēi éi ěi èi ê̄ ế ê̌ ề":["欸"],"qī yī":["欹"],"chuā xū":["欻"],"chǐ chuài":["欼"],"kǎn qiàn":["欿"],"kǎn kè":["歁"],"chuǎn chuán":["歂"],"yīn yān":["歅"],"jìn qūn":["歏"],pēn:["歕"],"xū chuā":["歘"],"xī shè":["歙"],"liǎn hān":["歛"],"zhì chí":["歭"],"sè shà":["歰"],sǐ:["死"],"wěn mò":["歾"],piǎo:["殍","皫","瞟","醥","顠"],"qíng jìng":["殑"],"fǒu bó":["殕"],"zhí shi":["殖"],"yè yān yàn":["殗"],"hūn mèi":["殙"],chòu:["殠","臰","遚"],"kuì huì":["殨","溃","潰"],cuàn:["殩","熶","爨","窜","竄","篡","簒"],"yīn yān yǐn":["殷"],"qìng kēng shēng":["殸"],"yáo xiáo xiào":["殽"],"gū gǔ":["毂","蛄"],"guàn wān":["毌"],"dú dài":["毒"],"xún xùn":["毥"],mú:["毪","氁"],"dòu nuò":["毭"],"sāi suī":["毸"],lu:["氇"],sào:["氉","瘙","矂","髞"],"shì zhī":["氏"],"dī dǐ":["氐"],"máng méng":["氓"],"yáng rì":["氜"],shuǐ:["水","氵","氺","閖"],"zhěng chéng zhèng":["氶"],tǔn:["氽"],"fán fàn":["氾"],"guǐ jiǔ":["氿"],"bīn pà pā":["汃"],"zhuó què":["汋"],"dà tài":["汏"],pìn:["汖","牝","聘"],"hàn hán":["汗","馯"],tu:["汢"],"tāng shāng":["汤","湯"],"zhī jì":["汥"],"gàn hán cén":["汵"],"wèn mén":["汶"],"fāng pāng":["汸"],"hǔ huǎng":["汻"],"niú yóu":["汼"],hàng:["沆"],"shěn chén":["沈"],"dùn zhuàn":["沌"],"nǜ niǔ":["沑"],"méi mò":["沒","没"],"tà dá":["沓"],"mì wù":["沕"],"hóng pāng":["沗"],"shā shà":["沙"],"zhuǐ zǐ":["沝"],"ōu òu":["沤","漚"],"jǔ jù":["沮"],"tuō duó":["沰"],"mǐ lì":["沵"],"yí chí":["沶"],"xiè yì":["泄"],"bó pō":["泊"],"mì bì":["泌","秘"],"chù shè":["泏"],"yōu yòu āo":["泑"],"pēng píng":["泙","硑"],"pào pāo":["泡"],"ní nì":["泥","秜"],"yuè sà":["泧"],"jué xuè":["泬","疦"],"lóng shuāng":["泷","瀧"],"luò pō":["泺","濼"],"zé shì":["泽","澤"],"sǎ xǐ":["洒"],"sè qì zì":["洓"],"xǐ xiǎn":["洗"],"kǎo kào":["洘"],"àn yàn è":["洝"],"lěi lèi":["洡"],"qiè jié":["洯"],"qiǎn jiān":["浅"],"jì jǐ":["济","済","濟","纪"],"hǔ xǔ":["浒","滸"],"jùn xùn":["浚","濬"],"yǐng chéng yíng":["浧"],"liàn lì":["浰"],"féng hóng":["浲","溄"],"jiǒng jiōng":["浻"],"suī něi":["浽"],"yǒng chōng":["涌"],"tūn yūn":["涒"],"wō guō":["涡","渦"],hēng:["涥","脝"],"zhǎng zhàng":["涨","漲"],"shòu tāo":["涭"],shuàn:["涮","腨"],"kōng náng":["涳"],"wò wǎn yuān":["涴"],"tuō tuò":["涶"],wō:["涹","猧","窝","窩","莴","萵","蜗","蝸","踒"],"qiè jí":["淁"],"guǒ guàn":["淉"],"lín lìn":["淋","獜","疄"],"tǎng chǎng":["淌"],"nào chuò zhuō":["淖"],"péng píng":["淜"],féi:["淝","肥","腓","蜰"],"pì pèi":["淠"],"niǎn shěn":["淰"],"biāo hǔ":["淲"],"chún zhūn":["淳"],"hùn hún":["混"],qiǎn:["淺","繾","缱","肷","膁","蜸","譴","谴","遣","鑓"],"wèn mín":["渂"],"rè ruò luò":["渃"],"dú dòu":["渎","瀆","读"],"jiàn jiān":["渐","溅","漸","濺"],"miǎn shéng":["渑","澠"],"nuǎn nuán":["渜"],"qiú wù":["渞"],"tíng tīng":["渟"],"dì tí dī":["渧"],"gǎng jiǎng":["港"],"hōng qìng":["渹"],tuān:["湍","煓"],"huì mǐn xū":["湏"],"xǔ xù":["湑"],pén:["湓","瓫","盆","葐"],"mǐn hūn":["湣"],"tuàn nuǎn":["湪"],"qiū jiǎo":["湫","湬"],"yān yīn":["湮"],"bàn pán":["湴"],"zhuāng hún":["湷"],"yàn guì":["溎"],"lián liǎn nián xián xiàn":["溓"],"dá tǎ":["溚","鿎"],"liū liù":["溜","澑","蹓"],lùn:["溣"],mǎ:["溤","犸","獁","玛","瑪","码","碼","遤","鎷","馬","马","鰢","鷌"],"zhēn qín":["溱"],"nì niào":["溺"],"chù xù":["滀","畜"],"wěng wēng":["滃"],"hào xuè":["滈"],"qì xì xiē":["滊"],"xíng yíng":["滎"],"zé hào":["滜"],"piāo piào piǎo":["漂"],"cóng sǒng":["漎"],"féng péng":["漨"],"luò tà":["漯"],"pēng bēn":["漰"],"chóng shuāng":["漴"],"huǒ kuò huò":["漷"],"liáo liú":["漻"],"cuǐ cuī":["漼"],"cóng zǒng":["潀"],"cóng zōng":["潈"],"pì piē":["潎"],"dàng xiàng":["潒"],"huáng guāng":["潢"],"liáo lào lǎo":["潦"],"cōng zòng":["潨"],"zhí zhì":["潪"],"tān shàn":["潬"],"tú zhā":["潳"],"sàn sǎ":["潵"],hēi:["潶","黑","黒","𬭶"],"chéng dèng":["澄","瀓"],"cūn cún":["澊"],"péng pēng":["澎"],"hòng gǒng":["澒","銾"],"wàn màn":["澫"],"kuài huì":["澮"],"guō wō":["濄"],"pēn fén":["濆"],"jí shà":["濈"],"huì huò":["濊"],"dǐng tìng":["濎"],"mǐ nǐ":["濔"],"bì pì":["濞"],"cuì zuǐ":["濢"],"hù huò":["濩"],"ǎi kài kè":["濭"],"wěi duì":["濻","瀢"],"zàn cuán":["濽","灒"],"yǎng yàng":["瀁"],"wǎng wāng":["瀇"],"mò miè":["瀎","眜"],suǐ:["瀡","膸","髓"],"huái wāi":["瀤"],"zùn jiàn":["瀳"],"yīng yǐng yìng":["瀴"],"ráng ràng":["瀼"],shuàng:["灀"],"zhuó jiào zé":["灂"],sǎ:["灑","訯","靸"],"luán luàn":["灓"],"dǎng tǎng":["灙"],"xún quán quàn":["灥"],"huǒ biāo":["灬"],"zhà yù":["灹"],"fén bèn":["炃"],"jiǒng guì":["炅"],"pàng fēng":["炐"],quē:["炔","缺","缼","蒛"],biān:["炞","煸","甂","砭","笾","箯","籩","編","编","蝙","邉","邊","鍽","鞭","鯾","鯿","鳊"],"zhāo zhào":["炤"],"zhuō chù":["炪"],"pào páo bāo":["炮"],"páo fǒu":["炰"],"shǎn qián shān":["炶"],"zhà zhá":["炸"],"jiǎo yào":["烄"],quǎn:["烇","犬","犭","畎","綣","绻","虇"],"yàng yáng":["烊"],"lào luò":["烙"],"huí huǐ":["烠"],rè:["热","熱"],"fú páo":["烰"],"xiè chè":["烲","焎"],"yàn shān":["烻"],"hūn xūn":["焄"],kào:["焅","犒","銬","铐","靠","鮳","鯌","鲓","㸆"],"juān yè":["焆"],"jùn qū":["焌"],"tāo dào":["焘"],"chǎo jù":["焣"],"wò ài":["焥"],"zǒng cōng":["焧"],"xī yì":["焬"],"xìn xīn":["焮"],"chāo zhuō":["焯"],"xiǒng yīng":["焸","焽"],kuǐ:["煃","跬","蹞","頍","𫠆"],"huī yùn xūn":["煇"],"jiǎo qiāo":["煍"],"qián shǎn shān":["煔"],"xī yí":["煕"],"shà shā":["煞"],"yè zhá":["煠"],"yáng yàng":["煬"],"ēn yūn":["煾"],"yūn yǔn":["熅"],"hè xiāo":["熇"],xióng:["熊","熋","雄"],"xūn xùn":["熏","爋"],gòng:["熕","貢","贡"],liū:["熘"],"cōng zǒng":["熜"],"lù āo":["熝"],"shú shóu":["熟"],"fēng péng":["熢"],"cuǐ suī":["熣"],tēng:["熥","膯","鼟"],"yùn yù":["熨"],"áo āo":["熬"],"hàn rǎn":["熯"],"ōu ǒu":["熰"],"huáng huǎng":["熿"],"chǎn dǎn chàn":["燀"],"jiāo zhuó qiáo jué":["燋"],"yàn yān":["燕"],"tài liè":["燤"],āo:["爊"],"yàn xún":["爓"],"jué jiào":["爝","覐","覚","覺","觉"],"lǎn làn":["爦"],"zhuǎ zhǎo":["爪"],"zhǎo zhuǎ":["爫"],"fù fǔ":["父"],diē:["爹","褺","跌"],zāng:["牂","羘","臧","賍","賘","贓","贜","赃","髒"],"piàn piān":["片"],"biān miàn":["牑"],bǎng:["牓","綁","绑"],"yǒu yōng":["牗"],"chēng chèng":["牚","竀"],niú:["牛","牜"],"jiū lè":["牞"],"mù móu":["牟"],māng:["牤"],"gē qiú":["牫"],"yòu chōu":["牰"],"tè zhí":["犆"],bēn:["犇","錛","锛"],"jiān qián":["犍","玪"],má:["犘","痲","蔴","蟇","麻"],"máo lí":["犛"],"bá quǎn":["犮"],"zhuó bào":["犳"],"àn hān":["犴"],"kàng gǎng":["犺"],"pèi fèi":["犻"],"fān huān":["犿"],kuáng:["狂","狅","誑","诳","軖","軠","鵟","𫛭"],"yí quán chí":["狋"],"xīng shēng":["狌"],"tuó yí":["狏"],kǔ:["狜","苦"],"huán huān":["狟"],"hé mò":["狢"],"tà shì":["狧"],"máng dòu":["狵"],"xī shǐ":["狶"],suān:["狻","痠","酸"],"bài pí":["猈"],"jiān yàn":["猏","豣"],"yī yǐ":["猗"],"yá wèi":["猚"],cāi:["猜"],"māo máo":["猫","貓"],"chuàn chuān":["猭"],"tuān tuàn":["猯","貒"],"yà jiá qiè":["猰"],"hè xiē gé hài":["猲"],"biān piàn":["猵","獱"],"bó pò":["猼"],"háo gāo":["獋"],"fén fèn":["獖"],"yào xiāo":["獟"],"shuò xī":["獡"],"gé liè xiē":["獦"],"nòu rú":["獳"],"náo nǎo yōu":["獶"],ráng:["獽","瓤","禳","穣","穰","蘘","躟","鬤"],"náo yōu":["獿"],"lǜ shuài":["率"],"wáng wàng":["王"],"yáng chàng":["玚"],"mín wén":["玟"],"bīn fēn":["玢"],"mén yǔn":["玧"],"qiāng cāng":["玱","瑲","篬"],"án gān":["玵"],"xuán xián":["玹"],"cī cǐ":["玼","跐"],"yí tāi":["珆"],"zǔ jù":["珇"],fà:["珐","琺","蕟","髪","髮"],"yín kèn":["珢"],"huī hún":["珲"],"xuán qióng":["琁"],"fú fū":["琈"],"bǐng pín":["琕"],"cuì sè":["琗"],"yù wéi":["琟"],"tiǎn tiàn":["琠"],"zhuó zuó":["琢"],"běng pěi":["琣"],guǎn:["琯","璭","痯","筦","管","舘","輨","錧","館","馆","鳤"],"hún huī":["琿"],"xié jiē":["瑎"],"chàng dàng yáng":["瑒"],"tiàn zhèn":["瑱"],"bīn pián":["瑸","璸"],"tú shū":["瑹"],cuǐ:["璀","皠","趡"],"zǎo suǒ":["璅"],"jué qióng":["璚"],"lú fū":["璷"],"jì zī":["璾"],suí:["瓍","綏","绥","遀","随","隨","髄"],"mí xǐ":["瓕"],"qióng wěi wèi":["瓗"],"huán yè yà":["瓛"],"bó páo":["瓟"],"zhí hú":["瓡"],piáo:["瓢","闝"],"wǎ wà":["瓦"],"xiáng hóng":["瓨"],wèng:["瓮","甕","罋","蕹","齆"],"shèn shén":["甚"],ruí:["甤","緌","蕤"],yòng:["用","砽","苚","蒏","醟","㶲"],shuǎi:["甩"],béng:["甭","甮"],"yóu zhá":["甴"],"diàn tián shèng":["甸"],"tǐng dīng":["町","甼"],"zāi zī":["甾"],"bì qí":["畁"],"dá fú":["畗"],"cè jì":["畟"],"zāi zī tián":["畠"],"zhì chóu shì":["畤"],"fān pān":["畨","番"],"shē yú":["畬"],"dāng dàng dǎng":["當"],"jiāng qiáng":["疆"],"pǐ yǎ shū":["疋"],"jié qiè":["疌"],"yí nǐ":["疑"],nè:["疒","眲","訥","讷"],"gē yì":["疙"],"nüè yào":["疟","瘧"],"lì lài":["疠","癘"],"yǎ xiā":["疨"],xuē:["疶","蒆","薛","辥","辪","靴","鞾"],"dǎn da":["疸"],"fá biǎn":["疺"],"fèi féi":["疿","痱"],"shān diàn":["痁"],"téng chóng":["痋"],"tōng tóng":["痌"],"wěi yòu yù":["痏"],"tān shǐ":["痑"],"pū pù":["痡","鋪"],"bēng péng":["痭"],"má lìn":["痳"],"tiǎn diàn":["痶"],"ān yè è":["痷"],"kē ē":["痾"],"zhì chì":["瘈"],"jiǎ xiá xiā":["瘕"],"lěi huì":["瘣"],"chài cuó":["瘥"],"diān chēn":["瘨"],"da dá":["瘩"],"biě biē":["瘪"],qué:["瘸"],"dàn dān":["癉"],"guì wēi":["癐"],"nòng nóng":["癑"],"biē biě":["癟"],"bō bǒ":["癷"],bái:["白"],"jí bī":["皀"],"de dì dí dī":["的"],"pā bà":["皅"],"gāo háo":["皋"],"gāo yáo":["皐"],"lì luò bō":["皪"],"zhā cǔ":["皻"],"zhāo zhǎn dǎn":["皽"],"jiān jiàn":["监","監","鋻","间","鞬"],"gài gě hé":["盖"],"máng wàng":["盳"],yuǎn:["盶","逺","遠"],"tián xián":["盷"],"xiāng xiàng":["相"],dǔn:["盹","趸","躉"],"xì pǎn":["盻"],"shěng xǐng":["省"],"yún hùn":["眃"],"miǎn miàn":["眄"],"kàn kān":["看"],"yìng yāng yǎng":["眏"],"yǎo āo ǎo":["眑"],"jū xū kōu":["眗"],"yí chì":["眙"],"dié tì":["眣"],"bǐng fǎng":["眪"],"pàng pán":["眫"],"mī mí":["眯","瞇"],"xuàn shùn xún":["眴"],tiào:["眺","粜","糶","覜","趒"],"zhe zhuó zháo zhāo":["着"],"qiáo shào xiāo":["睄"],"cuó zhuài":["睉"],gùn:["睔","謴"],"suì zuì":["睟"],"pì bì":["睥","稫","辟"],"yì zé gāo":["睪"],"xǐng xìng":["睲"],"guì wèi kuì":["瞆"],"kòu jì":["瞉"],"qióng huán":["瞏"],"mán mén":["瞒","瞞"],"diāo dōu":["瞗"],"lou lóu lǘ":["瞜"],"shùn rún":["瞤"],"liào liǎo":["瞭","钌"],"jiàn xián":["瞯"],"wǔ mí":["瞴"],"guì kuì":["瞶"],"nǐng chēng":["矃"],"huò yuè":["矆"],"mēng méng":["矇"],"kuàng guō":["矌"],"guàn quán":["矔"],"mǎn mán":["矕"],"jīn guān qín":["矜"],"jīn qín guān":["矝"],"yù xù jué":["矞"],"jiǎo jiáo":["矫","矯"],duǎn:["短"],"shí dàn":["石"],"gāng qiāng kòng":["矼"],"huā xū":["砉"],"pīn bīn fēn":["砏"],"yán yàn":["研","硏"],"luǒ kē":["砢"],"fú fèi":["砩","笰"],"zhǔ zhù":["砫"],"lá lì lā":["砬"],"kuāng guāng":["硄"],"gè luò":["硌"],"shuò shí":["硕","碩"],"wèi wéi ái":["硙"],"què kè kù":["硞"],"mǎng bàng":["硥"],"luò lòng":["硦"],"yǒng tóng":["硧"],nüè:["硸","虐"],"kēng kěng":["硻"],"yān yǎn":["硽"],"zhuì chuí duǒ":["硾"],"kōng kòng":["硿"],"zòng cóng":["碂"],"jiān zhàn":["碊"],"lù liù":["碌","陆"],"què xī":["碏"],"lún lǔn lùn":["碖"],"náo gāng":["碙"],"jié yà":["碣"],"wèi wěi":["碨"],"tí dī":["碮"],"chá chā":["碴"],"qiāo què":["碻"],"sù xiè":["碿"],"liú liù":["磂","遛","鎦","馏"],"sī tí":["磃"],"bàng páng":["磅"],"huá kě gū":["磆"],"wěi kuǐ":["磈"],"xiá qià yà":["磍"],"lián qiān":["磏"],"wèi ái gài":["磑"],"lá lā":["磖"],"áo qiāo":["磝"],"pēng pèng":["磞","閛"],"yīn yǐn":["磤"],"lěi léi":["磥"],"mó mò":["磨"],"qì zhú":["磩"],"láo luò":["磱"],"pán bō":["磻"],"jí shé":["磼"],"hé qiāo qiào":["礉"],"kè huò":["礊"],"què hú":["礐"],"è qì":["礘"],cǎ:["礤","礸"],"xián xín":["礥"],"léi lěi lèi":["礧"],"yán yǎn":["礹"],"qí zhǐ":["祇","蚔"],"bēng fāng":["祊"],"bì mì":["祕"],suàn:["祘","笇","筭","算","蒜"],"piào piāo":["票"],"jì zhài":["祭"],"shuì lèi":["祱"],"jìn jīn":["禁"],"chán shàn":["禅"],"yáng shāng":["禓"],"zhī zhǐ tí":["禔"],"shàn chán":["禪"],"yú yù ǒu":["禺"],"zǐ zì":["秄"],"chá ná":["秅"],"zhǒng zhòng chóng":["种"],"hào mào":["秏"],"kù kū":["秙"],zū:["租","葅"],chèng:["秤","穪"],"huó kuò":["秮","秳"],"chēng chèn chèng":["称","稱"],"shì zhì":["秲","銴"],"fù pū":["秿"],"xùn zè":["稄"],"tú shǔ":["稌"],"zhùn zhǔn":["稕"],"jī qí":["稘","綨","觭"],"léng líng":["稜"],"zuì zú sū":["稡"],"xì qiè":["稧","郄"],"zhǒng zhòng":["種"],"zōng zǒng":["稯"],"xián jiān liàn":["稴"],"zī jiū":["稵"],"jī qǐ":["稽"],ròng:["穃"],"shān cǎn cēn":["穇"],"mén méi":["穈"],"jǐ jì":["穖"],"xiāo rào":["穘"],"zhuō bó":["穛"],"tóng zhǒng zhòng":["穜"],zuō:["穝"],"biāo pāo":["穮","藨"],"zhuō jué":["穱"],"cuán zàn":["穳"],"kōng kòng kǒng":["空"],"yū yǔ":["穻"],zhǎi:["窄","鉙"],báo:["窇","雹"],"kū zhú":["窋"],"jiào liáo liù":["窌"],"wā guī":["窐"],"tiǎo yáo":["窕"],"xūn yìn":["窨"],"yà yē":["窫"],"tián diān yǎn":["窴"],"chāo kē":["窼"],"kuǎn cuàn":["窽","窾"],"chù qì":["竐"],"qǔ kǒu":["竘"],"jìng zhěn":["竧"],"kǎn kàn":["竷"],"zhú dǔ":["竺"],"lè jīn":["竻"],"zhuì ruì":["笍"],"háng hàng":["笐"],"cén jìn hán":["笒"],"dā xiá nà":["笚"],"zé zuó":["笮"],"lóng lǒng":["笼","篭","籠","躘","龓"],"zhù zhú":["筑","築"],"dá dā":["答","荅"],shāi:["筛","篩","簁","籭"],"yún jūn":["筠"],"láng làng":["筤","郎","阆"],"zhì zhǐ":["筫"],o:["筽"],"póu bù fú pú":["箁"],"pái bēi":["箄"],gè:["箇","虼","鉻","铬"],"tái chí":["箈"],"guǎi dài":["箉"],"zhào dào":["箌"],"jīng qìng":["箐"],"lín lǐn":["箖"],"jùn qūn":["箘"],"shī yí":["箷","釶"],"yuē yào chuò":["箹"],"xiāo shuò qiào":["箾"],"gōng gǎn lǒng":["篢"],"páng péng":["篣"],"zhuó huò":["篧"],"jiǎn jiān":["篯"],"dí zhú":["篴"],"zān cēn cǎn":["篸"],"zhuàn suǎn zuàn":["篹"],"piǎo biāo":["篻"],"guó guì":["簂"],"cè jí":["簎"],"mì miè":["簚"],"shāi sī":["簛"],"sǔn zhuàn":["簨"],"gàn gǎn":["簳"],"bò bǒ":["簸"],"bó bù":["簿"],shi:["籂"],"zhēn jiān":["籈"],"zhuàn zuǎn":["籑"],"fān pān biān":["籓"],"sǒu shǔ":["籔"],zuǎn:["籫","繤","纂","纉","纘","缵"],nǚ:["籹","釹","钕"],"shā chǎo":["粆"],"kāng jīng":["粇"],fěn:["粉","黺"],cū:["粗","觕","麁","麄","麤"],"nián zhān":["粘"],"cè sè":["粣"],"zhōu yù":["粥"],"shēn sǎn":["糁"],"biān biǎn":["糄","萹"],miàn:["糆","面","靣","麪","麫","麵","麺"],"hú hū hù":["糊"],"gǔ gòu":["糓"],"mí méi":["糜"],"sǎn shēn":["糝","糣"],zāo:["糟","蹧","遭","醩"],"mì sī":["糸"],"jiū jiǔ":["糺"],"xì jì":["系","繫"],"zhēng zhěng":["糽"],"chà chǎ":["紁","衩"],"yuē yāo":["約","约"],"hóng gōng":["紅","红"],"hé gē":["紇","纥"],"wén wèn":["紋","纹"],fóu:["紑"],"jì jié jiè":["紒"],"pī pí bǐ":["紕","纰"],"jīn jìn":["紟"],"zhā zā":["紥","紮"],hā:["紦"],"fū fù":["紨"],"chōu chóu":["紬"],"lèi léi lěi":["累"],"bō bì":["紴"],"tiǎn zhěn":["紾"],"jiōng jiǒng":["絅"],"jié jiē":["結","结","节"],"guà kuā":["絓"],"bǎi mò":["絔"],"gēng huán":["絙"],"jié xié":["絜"],"quán shuān":["絟"],"gǎi ǎi":["絠"],"luò lào":["絡","络"],"bīng bēng pēng":["絣"],"gěi jǐ":["給","给"],"tóng tōng dòng":["絧"],"tiào diào dào":["絩"],"lěi lèi léi":["絫"],"gāi hài":["絯"],"chī zhǐ":["絺"],"wèn miǎn mán wàn":["絻"],"huán huàn wàn":["綄"],"qīn xiān":["綅"],"tì tí":["綈"],"yán xiàn":["綖"],"zōng zèng zòng":["綜"],"chēn lín":["綝"],"zhǔn zhùn":["綧"],"qiàn qīng zhēng":["綪"],"qìng qǐ":["綮"],"lún guān":["綸","纶"],"chuò chāo":["綽","绰"],"tián tǎn chān":["緂"],"lǜ lù":["緑","绿"],"ruǎn ruàn":["緛"],"jí qī":["緝"],"zhòng chóng":["緟","重"],"miáo máo":["緢"],"xiè yè":["緤"],huǎn:["緩","缓","㬊"],"gēng gèng":["緪","縆"],"tōu xū shū":["緰"],"zōng zòng":["緵","繌"],"yùn gǔn":["緷"],"guā wō":["緺"],"yùn yūn wēn":["緼","縕"],"bāng bàng":["縍"],"gǔ hú":["縎","鶻"],"cī cuò suǒ":["縒"],"cuī shuāi":["縗"],"róng rǒng ròng":["縙"],"zài zēng":["縡"],cài:["縩","菜","蔡"],"féng fèng":["縫"],"suō sù":["縮","缩"],"yǎn yǐn":["縯","酓"],"zòng zǒng":["縱","纵"],"zhuàn juàn":["縳"],"mò mù":["縸","莫"],"piǎo piāo":["縹","缥"],"fán pó":["繁"],"bēng bèng":["繃"],"móu miù miào liǎo":["繆"],"yáo yóu zhòu":["繇"],"zēng zèng":["繒","缯"],"jú jué":["繘"],"chuō chuò":["繛"],"zūn zǔn":["繜"],rào:["繞","绕","遶"],"chǎn chán":["繟"],"huì huí":["繢","缋","藱"],"qiāo sāo zǎo":["繰"],"jiǎo zhuó":["繳","缴"],"dàn tán chán":["繵"],nǒng:["繷"],"pú fú":["纀"],"yào lì":["纅"],"rǎng xiāng":["纕"],"lí sǎ xǐ lǐ":["纚"],"xiān qiàn":["纤"],"jīng jìng":["经"],"tí tì":["绨"],"bēng běng bèng":["绷"],"zōng zèng":["综"],"jī qī":["缉"],"wēn yùn yūn":["缊"],"fèng féng":["缝"],"shuāi cuī suī":["缞"],"miù móu liáo miào mù":["缪"],"qiāo sāo":["缲"],fǒu:["缶","缹","缻","雬","鴀"],"bà ba pí":["罢","罷"],"guà guǎi":["罫"],"yáng xiáng":["羊","羏"],"měi gāo":["羙"],"yì xī":["羛"],"qiǎng qiān":["羟"],"qiāng kòng":["羫"],"qián xián yán":["羬"],nóu:["羺"],"hóng gòng":["羾"],"pī bì pō":["翍"],"qú yù":["翑"],ké:["翗"],"qiào qiáo":["翘"],"zhái dí":["翟"],"dào zhōu":["翢"],"hóu qú":["翵"],shuǎ:["耍"],"ruǎn nuò":["耎"],"ér nài":["耏"],"zhuān duān":["耑"],"pá bà":["耙"],"chí sì":["耛"],"qù chú":["耝"],"lún lǔn":["耣"],"jí jiè":["耤"],"tāng tǎng":["耥"],pǎng:["耪","覫"],"zhá zé":["耫"],"yē yé":["耶"],"yún yíng":["耺"],"wà tuǐ zhuó":["聉"],"ér nǜ":["聏"],"tiē zhé":["聑"],"dǐ zhì":["聜"],qié:["聺"],"nǐ jiàn":["聻"],"lèi lē":["肋"],cào:["肏","襙","鄵","鼜"],"bó dí":["肑"],"xiào xiāo":["肖"],"dù dǔ":["肚"],chāi:["肞","釵","钗"],"hán qín hàn":["肣"],"pàng pán pàn":["肨","胖"],"zhūn chún":["肫"],āng:["肮","骯"],"yù yō":["育"],"pí bǐ bì":["肶"],"fèi bì":["胇"],"bèi bēi":["背"],"fèi zǐ":["胏"],"píng pēng":["胓","苹"],"fū fú zhǒu":["胕"],"shèng shēng":["胜"],kuà:["胯","跨","骻"],"gǎi hǎi":["胲"],"gē gé gā":["胳"],"néng nài":["能"],"guī kuì":["胿"],"mài mò":["脉"],"zāng zàng":["脏"],"jiǎo jué":["脚","角"],cuǒ:["脞"],"de te":["脦"],"zuī juān":["脧"],něi:["脮","腇","餒","馁","鮾","鯘"],"pú fǔ":["脯"],niào:["脲"],shuí:["脽"],guò:["腂","過","鐹"],"là xī":["腊"],"yān ā":["腌"],"gāo gào":["膏"],"lù biāo":["膔"],chuái:["膗"],"zhuān chuán chún zhuǎn":["膞"],chuài:["膪","踹"],"fán pán":["膰"],"wǔ hū":["膴"],"shān dàn":["膻"],tún:["臀","臋","蛌","豘","豚","軘","霕","飩","饨","魨","鲀","黗"],"bì bei":["臂"],"là gé":["臈"],"sào sāo":["臊"],nào:["臑","閙","闹","鬧"],"ní luán":["臡"],"qiān xián":["臤"],"guàng jiǒng":["臦"],"guǎng jiǒng":["臩"],"chòu xiù":["臭"],"mián biān":["臱"],"dié zhí":["臷"],"zhī jìn":["臸"],"shè shě":["舍"],pù:["舖","舗"],"bān bō pán":["般"],kuā:["舿"],"gèn gěn":["艮"],"sè shǎi":["色"],"fú bó":["艴"],"jiāo qiú":["艽"],"chāi chā":["芆"],"sháo què":["芍"],"hù xià":["芐"],"zì zǐ":["芓"],"huì hū":["芔"],"tún chūn":["芚"],"jiè gài":["芥"],"xù zhù":["芧"],"yuán yán":["芫"],"xīn xìn":["芯"],"lún huā":["芲"],"wù hū":["芴"],"gōu gǒu":["芶"],"mào máo":["芼"],"fèi fú":["芾"],"chán yín":["苂"],qiē:["苆"],"sū sù":["苏"],"tiáo sháo":["苕"],"lì jī":["苙"],"kē hē":["苛"],"jù qǔ":["苣"],"ruò rě":["若"],"zhù níng":["苧"],"pā bó":["苩"],xiú:["苬"],"zhǎ zuó":["苲"],"jū chá":["苴"],nié:["苶"],"shēng ruí":["苼"],"qié jiā":["茄"],"zǐ cí":["茈"],"qiàn xī":["茜"],chǎi:["茝"],"fá pèi":["茷"],ráo:["荛","蕘","襓","饒","饶"],"yíng xíng":["荥"],"qián xún":["荨","蕁"],"yìn yīn":["荫"],"hé hè":["荷"],"shā suō":["莎"],"péng fēng":["莑"],"shēn xīn":["莘"],"wǎn guān guǎn":["莞"],"yóu sù":["莤"],"shāo xiāo":["莦","蛸"],"làng liáng":["莨"],"piǎo fú":["莩"],"wèn wǎn miǎn":["莬"],"shì shí":["莳","蒔"],"tù tú":["莵"],"xiān liǎn":["莶","薟"],"wǎn yù":["菀"],"zōu chù":["菆"],"lù lǜ":["菉"],"jūn jùn":["菌"],"niè rěn":["菍"],"zī zì zāi":["菑"],"tú tù":["菟"],"jiē shà":["菨"],"qiáo zhǎo":["菬"],"tái zhī chí":["菭"],"fēi fěi":["菲","蜚"],"qín qīn jīn":["菳"],"zū jù":["菹","蒩"],"lǐn má":["菻"],"tián tiàn":["菾"],tiē:["萜","貼","贴"],"luò là lào luō":["落"],"zhù zhuó zhe":["著"],"shèn rèn":["葚"],"gě gé":["葛"],"jùn suǒ":["葰"],"kuì kuài":["蒉"],"rú ná":["蒘"],"méng mēng měng":["蒙"],"yuán huán":["蒝"],"xú shú":["蒣"],"xí xì":["蒵"],"mì míng":["蓂"],"sōu sǒu":["蓃"],"gài gě hé hài":["蓋"],"yǎo zhuó":["蓔"],"diào tiáo dí":["蓧"],"xū qiū fū":["蓲"],"zí jú":["蓻"],"liǎo lù":["蓼"],xu:["蓿"],"hàn hǎn":["蔊"],"màn wàn mán":["蔓"],"pó bò":["蔢"],"fān fán bō":["蕃"],"hóng hòng":["蕻"],"yù ào":["薁","隩"],"xí xiào":["薂"],"báo bó bò":["薄"],"cí zī":["薋"],"wàn luàn":["薍"],"kǎo hāo":["薧"],"yuǎn wěi":["薳"],"zhòu chóu":["薵"],"wō mái":["薶"],"xiāo hào":["藃"],"yù xù xū":["藇"],"jiè jí":["藉"],"diào zhuó":["藋"],"cáng zàng":["藏"],lǎ:["藞"],"chú zhū":["藸"],"pín píng":["蘋"],"gān hán":["虷"],"hóng jiàng":["虹"],"huī huǐ":["虺"],"xiā há":["虾"],"mǎ mà mā":["蚂"],"fāng bàng":["蚄"],"bàng bèng":["蚌"],"jué quē":["蚗"],"qín qián":["蚙"],"gōng zhōng":["蚣"],"fǔ fù":["蚥"],"dài dé":["蚮"],"gǒu qú xù":["蚼"],"bǒ pí":["蚾"],"shé yí":["蛇"],tiě:["蛈","鉄","銕","鐡","鐵","铁","驖"],"gé luò":["蛒"],"máng bàng":["蛖"],"yì xǔ":["蛡"],"há gé":["蛤"],"qiè ní":["蛪"],"é yǐ":["蛾"],"zhē zhé":["蜇"],"là zhà":["蜡"],suò:["蜶","逤"],"yóu qiú":["蝤"],"xiā hā":["蝦"],"xī qī":["螇"],"bī pí":["螕"],"nài něng":["螚"],"hé xiá":["螛"],"guì huǐ":["螝"],"mǎ mā mà":["螞"],"shì zhē":["螫"],"zhì dié":["螲"],"jiàn chán":["螹"],"ma má mò":["蟆"],"mǎng měng":["蟒"],"biē bié":["蟞"],"bēn fèi":["蟦"],"láo liáo":["蟧"],"yín xún":["蟫"],"lí lǐ":["蠡"],"xuè xiě":["血"],"xíng háng hàng héng":["行"],"shuāi cuī":["衰"],"tuó tuō":["袉"],"lǐng líng":["袊"],"bào páo pào":["袌"],"jù jiē":["袓"],"hè kè":["袔"],"yí yì":["袘","貤"],"nà jué":["袦"],"bèi pī":["被"],"chǐ nuǒ":["袲"],"chǐ qǐ duǒ nuǒ":["袳"],"jiá qiā jié":["袷"],"bó mò":["袹"],"guī guà":["袿"],"liè liě":["裂"],"chéng chěng":["裎"],"jiē gé":["裓"],"dāo chóu":["裯"],"shang cháng":["裳"],"yuān gǔn":["裷"],"yǎn ān":["裺"],"tì xī":["裼"],"fù fú":["褔"],"chǔ zhǔ":["褚"],"tuì tùn":["褪"],lǎi:["襰"],"yào yāo":["要"],"qín tán":["覃"],"jiàn xiàn":["見","见"],piǎn:["覑","諞","谝","貵","𡎚"],"piē miè":["覕"],"yíng yǐng":["覮"],"qù qū":["覰","覷","觑"],"jiàn biǎn":["覵"],"luó luǎn":["覶"],"zī zuǐ":["觜"],"huà xiè":["觟"],"jiě jiè xiè":["解","觧"],"xué hù":["觷"],"lì lù":["觻"],tǎo:["討","讨"],zhùn:["訰"],"zī zǐ":["訾"],"yí dài":["詒","诒"],xiòng:["詗","诇"],"diào tiǎo":["誂"],"yí chǐ chì":["誃"],"lǎng làng":["誏"],"ēi éi ěi èi xī":["誒","诶"],shuà:["誜"],"yǔ yù":["語","语","雨"],"shuō shuì yuè":["說","说"],"shuí shéi":["誰","谁"],"qū juè":["誳"],"chī lài":["誺"],"nì ná":["誽"],"diào tiáo":["調"],"pǐ bēi":["諀"],"jì jī":["諅"],"zé zuò zhǎ cuò":["諎"],"chù jí":["諔"],"háo xià":["諕"],"lùn lún":["論","论"],"shì dì":["諟"],"huà guā":["諣"],"xǐ shāi āi":["諰"],"nán nàn":["諵","難"],miù:["謬","谬"],zèn:["譖","谮"],"shí zhì":["識","识"],"juàn xuān":["讂"],"yí tuī":["讉"],zhán:["讝"],"xǔ hǔ":["许"],"xiáng yáng":["详"],"tiáo diào zhōu":["调"],"chén shèn":["谌"],"mí mèi":["谜"],"màn mán":["谩"],"gǔ yù":["谷"],"huō huò huá":["豁"],"zhì zhài":["豸"],"huān huán":["貆"],"kěn kūn":["貇"],"mò hé":["貈"],"mò hé háo":["貉"],"jù lóu":["貗"],"zé zhài":["責","责"],"dài tè":["貸"],"bì bēn":["賁"],"jiǎ gǔ jià":["賈"],"xiōng mín":["賯"],càng:["賶"],"zhuàn zuàn":["賺","赚"],"wàn zhuàn":["贃"],"gàn gòng zhuàng":["贛"],"yuán yùn":["贠"],"bēn bì":["贲"],"jiǎ gǔ":["贾"],zǒu:["走","赱","鯐"],"dié tú":["趃"],"jū qiè":["趄"],"qū cù":["趋","趨"],"jí jié":["趌"],"guā huó":["趏"],"què qì jí":["趞"],"tàng tāng":["趟"],"chuō zhuó":["趠"],"qù cù":["趣"],"yuè tì":["趯"],"bō bào":["趵"],"kuà wù":["趶"],"guì jué":["趹"],"fāng fàng páng":["趽"],"páo bà":["跁"],"qí qǐ":["跂"],"jiàn chén":["跈"],"pǎo páo":["跑"],"diǎn diē tiē":["跕"],"jū jù qiè":["跙"],bǒ:["跛"],"luò lì":["跞"],"dài duò duō chí":["跢"],zhuǎi:["跩"],"bèng pián":["跰"],"tiào táo":["跳"],"shū chōu":["跾"],"liàng liáng":["踉"],"tà tā":["踏"],chǎ:["蹅","鑔","镲"],"dí zhí":["蹢"],"dēng dèng":["蹬","鐙","镫"],cèng:["蹭"],"dūn cún":["蹲"],"juě jué":["蹶"],liāo:["蹽"],"xiè sǎ":["躠"],tǐ:["躰","軆","骵"],"yà zhá gá":["轧","軋"],"xìn xiàn":["軐"],"fàn guǐ":["軓"],"zhuàn zhuǎn":["転"],"zhóu zhòu":["軸","轴"],bú:["轐","醭","鳪"],"zhuǎn zhuàn zhuǎi":["转"],"zǎi zài":["载"],"niǎn zhǎn":["辗"],"biān bian":["边"],"dào biān":["辺"],"yǐ yí":["迆","迤","迱"],"guò guo guō":["过"],"wàng kuāng":["迋"],"hái huán":["还"],"zhè zhèi":["这"],"yuǎn yuàn":["远"],"zhì lì":["迣"],"zhù wǎng":["迬"],"zhuī duī":["追"],"shì kuò":["适"],tòu:["透"],"tōng tòng":["通"],guàng:["逛"],"dǎi dài":["逮"],"suì suí":["遂"],"tí dì":["遆"],"yí wèi":["遗"],"shì dí zhé":["適"],cà:["遪"],"huán hái":["還"],"lí chí":["邌"],"kàng háng":["邟"],"nà nèi nā":["那"],"xié yá yé yú xú":["邪"],"gāi hái":["郂"],"huán xún":["郇"],"chī xī":["郗"],hǎo:["郝"],"lì zhí":["郦"],"xiáo ǎo":["郩"],"dōu dū":["都"],liǎo:["曢","鄝","镽"],"zàn cuán cuó":["酂","酇"],"dīng dǐng":["酊"],"cù zuò":["酢"],"fā pō":["酦"],"shāi shī":["酾"],niàng:["酿","醸"],"qiú chōu":["醔"],"pō fā":["醗","醱"],"chǎn chěn":["醦"],"yàn liǎn xiān":["醶"],"niàng niáng":["釀"],"lǐ li":["里"],"lí xǐ xī":["釐"],"liǎo liào":["釕"],"dīng dìng":["釘","钉"],"qiǎo jiǎo":["釥"],"yú huá":["釪"],"huá wū":["釫"],"rì rèn jiàn":["釰","釼"],"dì dài":["釱"],"pī zhāo":["釽"],"yá yé":["釾"],"bǎ pá":["鈀","钯"],"tā tuó":["鉈","铊"],běi:["鉳"],"bǐng píng":["鉼"],"hā kē":["鉿","铪"],chòng:["銃","铳"],"xiǎng jiōng":["銄"],"yù sì":["銉"],"xù huì":["銊"],"rén rěn":["銋"],"shàn shuò":["銏"],"chì lì":["銐"],"xiǎn xǐ":["銑","铣"],"hóu xiàng":["銗"],"diào tiáo yáo":["銚"],"xiān kuò tiǎn guā":["銛","銽","铦"],"zhé niè":["銸"],"zhōng yōng":["銿"],"tōu tù dòu":["鋀"],"méi méng":["鋂"],"wàn jiǎn":["鋄","鎫"],"tǐng dìng":["鋌","铤"],"juān jiān cuān":["鋑"],"sī tuó":["鋖"],"juān xuān juàn":["鋗"],"wú huá wū":["鋘"],"zhuó chuò":["鋜"],"xíng xìng jīng":["鋞"],"jū jú":["鋦","锔"],"zuì niè":["鋷"],"yuān yuǎn wǎn wān":["鋺"],"gāng gàng":["鋼","钢"],zhuī:["錐","锥","騅","骓","鵻"],ā:["錒","锕"],"cuō chā":["鎈"],"suǒ sè":["鎍"],"yáo zú":["鎐"],"yè tà gé":["鎑"],"qiāng chēng":["鎗"],"gé lì":["鎘","镉","鬲"],"bī pī bì":["鎞"],"gǎo hào":["鎬"],"zú chuò":["鏃"],"xiū xiù":["鏅"],"shòu sōu":["鏉"],"dí dī":["鏑","镝"],"qiāo sǎn càn":["鏒"],"lù áo":["鏕"],"tāng táng":["鏜"],"jiàn zàn":["鏩"],"huì suì ruì":["鏸"],"qiǎng qiāng":["鏹","镪"],"sǎn xiàn sà":["鏾"],"jiǎn jiàn":["鐧","锏"],"dāng chēng":["鐺","铛"],"zuān zuàn":["鑽"],"sà xì":["钑"],"yào yuè":["钥"],"tǒu dǒu":["钭"],"zuàn zuān":["钻"],"qiān yán":["铅"],"pí pī":["铍"],"yáo diào tiáo":["铫"],"tāng tàng":["铴"],"pù pū":["铺"],"tán xiān":["锬"],"liù liú":["镏"],"hào gǎo":["镐"],"táng tāng":["镗"],"tán chán xín":["镡"],"huò shǎn":["閄"],"hàn bì":["閈","闬"],"kāng kàng":["閌","闶"],"xián jiàn jiān jiǎn":["閒"],"xiā xiǎ":["閕"],"xiǎ kě":["閜"],"biàn guān":["閞"],"hé gé":["閤","颌"],"hòng xiàng":["閧"],"sē xī":["閪"],"tíng tǐng":["閮"],"è yān":["閼","阏"],"hòng juǎn xiàng":["闂"],"bǎn pàn":["闆"],"dū shé":["闍","阇"],"què quē":["闕"],"tāng táng chāng":["闛"],"kàn hǎn":["闞","阚"],"xì sè tà":["闟"],"mēn mèn":["闷"],"quē què":["阙"],"yán diàn":["阽"],"ā ē":["阿"],"bēi pō pí":["陂"],"yàn yǎn":["隁"],"yú yáo shù":["隃"],"lóng lōng":["隆"],"duì zhuì":["隊"],"suí duò":["隋"],"gāi qí ái":["隑"],"huī duò":["隓","隳"],"wěi kuí":["隗"],"lì dài":["隸"],"zhuī cuī wéi":["隹"],"hè hú":["隺","鶮"],"jùn juàn":["隽","雋"],"nán nàn nuó":["难"],"què qiāo qiǎo":["雀"],"guàn huán":["雚"],"guī xī":["雟"],"sè xí":["雭"],án:["雸"],"wù méng":["雺"],tèng:["霯"],"lù lòu":["露"],mái:["霾"],"jìng liàng":["靚"],"gé jí":["革"],bǎ:["靶"],"yāng yàng":["鞅"],"gé tà sǎ":["鞈"],"biān yìng":["鞕"],"qiào shāo":["鞘"],"juān xuān":["鞙"],"shàng zhǎng":["鞝"],"pí bǐng bì bēi":["鞞"],la:["鞡"],"xiè dié":["鞢"],ēng:["鞥"],"móu mù":["鞪"],"bì bǐng":["鞸"],"mèi wà":["韎"],rǒu:["韖"],"shè xiè":["韘"],"yùn wēn":["韫"],"dùn dú":["頓","顿"],duǐ:["頧"],luō:["頱"],"bīn pín":["頻"],yóng:["顒","颙","鰫"],mān:["顢","颟"],"jǐng gěng":["颈"],"jié xié jiá":["颉"],"kē ké":["颏"],"pín bīn":["频"],"chàn zhàn":["颤"],"fēng fěng":["風","风"],"biāo diū":["颩"],"bá fú":["颰"],"sāo sōu":["颾"],"liù liáo":["飂"],"shí sì yì":["食"],"yǎng juàn":["飬"],"zhù tǒu":["飳"],"yí sì":["飴"],"zuò zé zhā":["飵"],tiè:["飻","餮"],"xiǎng náng":["饟"],"táng xíng":["饧"],"gē le":["饹"],"chā zha":["馇"],"náng nǎng":["馕"],"yūn wò":["馧"],"zhī shì":["馶"],"xìn jìn":["馸"],"kuài jué":["駃"],zǎng:["駔","驵"],"tái dài":["駘"],"xún xuān":["駨"],"liáng láng":["駺"],piàn:["騗","騙","骗","魸"],"dài tái":["骀"],"sāo sǎo":["骚"],"gǔ gū":["骨"],"bèi mó":["骳"],"xiāo qiāo":["骹"],"bǎng pǎng":["髈"],"bó jué":["髉"],"bì pǒ":["髲"],"máo méng":["髳"],"kuò yuè":["髺"],"bā bà":["魞","鲃"],"jì cǐ":["鮆"],"bó bà":["鮊"],"zhǎ zhà":["鮓","鲊"],"chóu dài":["鮘"],"luò gé":["鮥"],"guī xié wā kuí":["鮭"],"xiān xiǎn":["鮮","鲜"],"pū bū":["鯆"],"yì sī":["鯣"],"bà bó":["鲌"],"guī xié":["鲑"],"sāi xǐ":["鳃"],"niǎo diǎo":["鳥"],"diāo zhāo":["鳭"],"gān hàn yàn":["鳱"],"fū guī":["鳺"],"jiān qiān zhān":["鳽"],"hé jiè":["鶡"],"piān biǎn":["鶣"],"chuàn zhì":["鶨"],"cāng qiāng":["鶬"],"sǔn xùn":["鶽"],"biāo páo":["麃"],"zhù cū":["麆"],"jūn qún":["麇","麕"],chi:["麶"],"mó me":["麼"],"mó me ma":["麽"],"mí mǒ":["麿"],"dàn shèn":["黮"],"zhěn yān":["黰"],"dǎn zhǎn":["黵"],"miǎn mǐn měng":["黾"],hōu:["齁"],nàng:["齉"],"qí jì zī zhāi":["齐"],"yín kěn yǎn":["龂"],"yín kěn":["龈"],"gōng wò":["龏"],"guī jūn qiū":["龜","龟"],"kuí wā":["䖯"],lōu:["䁖"],"ōu qū":["𫭟"],"lóu lǘ":["𦝼"],"gǎ gā gá":["嘎"],"wā guà":["坬"],"zhǐ dǐ":["茋"],"gǒng hóng":["硔"],"yáo xiào":["滧"]},lc=new a$;Object.keys(mS).forEach(e=>{const t=mS[e];for(let n of t)lc.set(n,e)});const vS={这个:"zhè ge",成为:"chéng wéi",认为:"rèn wéi",作为:"zuò wéi",部分:"bù fen",要求:"yāo qiú",应该:"yīng gāi",增长:"zēng zhǎng",提供:"tí gōng",觉得:"jué de",任务:"rèn wu",那个:"nà ge",称为:"chēng wéi",为主:"wéi zhǔ",了解:"liǎo jiě",处理:"chǔ lǐ",皇上:"huáng shang",只要:"zhǐ yào",大量:"dà liàng",力量:"lì liàng",几乎:"jī hū",干部:"gàn bù",目的:"mù dì",行为:"xíng wéi",只见:"zhǐ jiàn",认识:"rèn shi",市长:"shì zhǎng",师父:"shī fu",调查:"diào chá",重新:"chóng xīn",分为:"fēn wéi",知识:"zhī shi",导弹:"dǎo dàn",质量:"zhì liàng",行款:"háng kuǎn",行列:"háng liè",行话:"háng huà",行业:"háng yè",隔行:"gé háng",在行:"zài háng",行家:"háng jia",内行:"nèi háng",外行:"wài háng",同行:"tóng háng",本行:"běn háng",行伍:"háng wǔ",洋行:"yáng háng",银行:"yín háng",商行:"shāng háng",支行:"zhī háng",总行:"zǒng háng",行情:"háng qíng",懂行:"dǒng háng",行规:"háng guī",行当:"háng dang",行货:"háng huò",太行:"tài háng",入行:"rù háng",中行:"zhōng háng",农行:"nóng háng",工行:"gōng háng",建行:"jiàn háng",各行:"gè háng",行号:"háng hào",行高:"háng gāo",行首:"háng shǒu",行尾:"háng wěi",行末:"háng mò",行长:"háng zhǎng",行距:"háng jù",换行:"huàn háng",行会:"háng huì",行辈:"háng bèi",行道:"háng dào",道行:"dào heng",参与:"cān yù",充分:"chōng fèn",尽管:"jǐn guǎn",生长:"shēng zhǎng",数量:"shù liàng",应当:"yīng dāng",院长:"yuàn zhǎng",强调:"qiáng diào",只能:"zhǐ néng",音乐:"yīn yuè",以为:"yǐ wéi",处于:"chǔ yú",部长:"bù zhǎng",蒙古:"měng gǔ",只有:"zhǐ yǒu",适当:"shì dàng",只好:"zhǐ hǎo",成长:"chéng zhǎng",高兴:"gāo xìng",不了:"bù liǎo",产量:"chǎn liàng",胖子:"pàng zi",显得:"xiǎn de",只是:"zhǐ shì",似的:"shì de",率领:"shuài lǐng",改为:"gǎi wéi",不禁:"bù jīn",成分:"chéng fèn",答应:"dā ying",少年:"shào nián",兴趣:"xìng qù",太监:"tài jian",休息:"xiū xi",校长:"xiào zhǎng",更新:"gēng xīn",合同:"hé tong",喝道:"hè dào",重庆:"chóng qìng",重建:"chóng jiàn",使得:"shǐ de",审查:"shěn chá",累计:"lěi jì",给予:"jǐ yǔ",极为:"jí wéi",冠军:"guàn jūn",仿佛:"fǎng fú",头发:"tóu fa",投降:"tóu xiáng",家长:"jiā zhǎng",仔细:"zǐ xì",要是:"yào shi",将领:"jiàng lǐng",含量:"hán liàng",更为:"gèng wéi",积累:"jī lěi",地处:"dì chǔ",县长:"xiàn zhǎng",少女:"shào nǚ",路上:"lù shang",只怕:"zhǐ pà",能量:"néng liàng",储量:"chǔ liàng",供应:"gōng yìng",挑战:"tiǎo zhàn",西藏:"xī zàng",记得:"jì de",总量:"zǒng liàng",当真:"dàng zhēn",将士:"jiàng shì",差别:"chā bié",较为:"jiào wéi",长老:"zhǎng lǎo",大夫:"dài fu",差异:"chā yì",懂得:"dǒng de",尽量:"jǐn liàng",模样:"mú yàng",的确:"dí què",为首:"wéi shǒu",便宜:"pián yi",更名:"gēng míng",石头:"shí tou",州长:"zhōu zhǎng",为止:"wéi zhǐ",漂亮:"piào liang",炮弹:"pào dàn",藏族:"zàng zú",角色:"jué sè",当作:"dàng zuò",尽快:"jǐn kuài",人为:"rén wéi",重复:"chóng fù",胡同:"hú tòng",差距:"chā jù",弟兄:"dì xiong",大将:"dà jiàng",睡觉:"shuì jiào",一觉:"yí jiào",团长:"tuán zhǎng",队长:"duì zhǎng",区长:"qū zhǎng",难得:"nán dé",丫头:"yā tou",会长:"huì zhǎng",弟弟:"dì di",王爷:"wáng ye",重量:"zhòng liàng",誉为:"yù wéi",家伙:"jiā huo",华山:"huà shān",椅子:"yǐ zi",流量:"liú liàng",长大:"zhǎng dà",勉强:"miǎn qiǎng",会计:"kuài jì",过分:"guò fèn",济南:"jǐ nán",调动:"diào dòng",燕京:"yān jīng",少将:"shào jiàng",中毒:"zhòng dú",晓得:"xiǎo de",变更:"biàn gēng",打更:"dǎ gēng",认得:"rèn de",苹果:"píng guǒ",念头:"niàn tou",挣扎:"zhēng zhá",三藏:"sān zàng",剥削:"bō xuē",丞相:"chéng xiàng",少量:"shǎo liàng",寻思:"xún si",夺得:"duó dé",干线:"gàn xiàn",呼吁:"hū yù",处罚:"chǔ fá",长官:"zhǎng guān",柏林:"bó lín",亲戚:"qīn qi",身分:"shēn fèn",胳膊:"gē bo",着手:"zhuó shǒu",炸弹:"zhà dàn",咳嗽:"ké sou",叶子:"yè zi",外长:"wài zhǎng",供给:"gōng jǐ",师长:"shī zhǎng",变量:"biàn liàng",应有:"yīng yǒu",下载:"xià zài",乐器:"yuè qì",间接:"jiàn jiē",底下:"dǐ xià",打扮:"dǎ bàn",子弹:"zǐ dàn",弹药:"dàn yào",热量:"rè liàng",削弱:"xuē ruò",骨干:"gǔ gàn",容量:"róng liàng",模糊:"mó hu",转动:"zhuàn dòng",称呼:"chēng hu",科长:"kē zhǎng",处置:"chǔ zhì",着重:"zhuó zhòng",着急:"zháo jí",强迫:"qiǎng pò",庭长:"tíng zhǎng",首相:"shǒu xiàng",喇嘛:"lǎ ma",镇长:"zhèn zhǎng",只管:"zhǐ guǎn",重重:"chóng chóng",免得:"miǎn de",着实:"zhuó shí",度假:"dù jià",真相:"zhēn xiàng",相貌:"xiàng mào",处分:"chǔ fèn",委屈:"wěi qu",为期:"wéi qī",伯伯:"bó bo",伯子:"bǎi zi",圈子:"quān zi",见识:"jiàn shi",笼罩:"lǒng zhào",与会:"yù huì",都督:"dū du",都市:"dū shì",成都:"chéng dū",首都:"shǒu dū",帝都:"dì dū",王都:"wáng dū",东都:"dōng dū",都护:"dū hù",都城:"dū chéng",建都:"jiàn dū",迁都:"qiān dū",故都:"gù dū",定都:"dìng dū",中都:"zhōng dū",六安:"lù ān",宰相:"zǎi xiàng",较量:"jiào liàng",对称:"duì chèn",总长:"zǒng zhǎng",相公:"xiàng gong",空白:"kòng bái",打量:"dǎ liang",水分:"shuǐ fèn",舌头:"shé tou",没收:"mò shōu",行李:"xíng li",判处:"pàn chǔ",散文:"sǎn wén",处境:"chǔ jìng",孙子:"sūn zi",拳头:"quán tou",打发:"dǎ fā",组长:"zǔ zhǎng",骨头:"gǔ tou",宁可:"nìng kě",更换:"gēng huàn",薄弱:"bó ruò",还原:"huán yuán",重修:"chóng xiū",重来:"chóng lái",只顾:"zhǐ gù",爱好:"ài hào",馒头:"mán tou",军长:"jūn zhǎng",首长:"shǒu zhǎng",厂长:"chǎng zhǎng",司长:"sī zhǎng",长子:"zhǎng zǐ",强劲:"qiáng jìng",恰当:"qià dàng",头儿:"tóu er",站长:"zhàn zhǎng",折腾:"zhē teng",相处:"xiāng chǔ",统率:"tǒng shuài",中将:"zhōng jiàng",命中:"mìng zhòng",名将:"míng jiàng",木头:"mù tou",动弹:"dòng tan",地壳:"dì qiào",干活:"gàn huó",少爷:"shào ye",水量:"shuǐ liàng",补给:"bǔ jǐ",尾巴:"wěi ba",来得:"lái de",好奇:"hào qí",钥匙:"yào shi",当做:"dàng zuò",沉着:"chén zhuó",哑巴:"yǎ ba",车子:"chē zi",上将:"shàng jiàng",恶心:"ě xīn",担子:"dàn zi",应届:"yīng jiè",主角:"zhǔ jué",运转:"yùn zhuǎn",兄长:"xiōng zhǎng",格式:"gé shì",正月:"zhēng yuè",营长:"yíng zhǎng",当成:"dàng chéng",女婿:"nǚ xu",咽喉:"yān hóu",重阳:"chóng yáng",化为:"huà wéi",吐蕃:"tǔ bō",钻进:"zuān jìn",乐队:"yuè duì",亮相:"liàng xiàng",被子:"bèi zi",舍得:"shě de",杉木:"shā mù",击中:"jī zhòng",排长:"pái zhǎng",假期:"jià qī",分量:"fèn liàng",数次:"shù cì",提防:"dī fáng",吆喝:"yāo he",查处:"chá chǔ",量子:"liàng zǐ",里头:"lǐ tou",调研:"diào yán",伺候:"cì hou",重申:"chóng shēn",枕头:"zhěn tou",拚命:"pīn mìng",社长:"shè zhǎng",归还:"guī huán",批量:"pī liàng",畜牧:"xù mù",点着:"diǎn zháo",甚为:"shèn wéi",小将:"xiǎo jiàng",着眼:"zhuó yǎn",处死:"chǔ sǐ",厌恶:"yàn wù",鼓乐:"gǔ yuè",树干:"shù gàn",秘鲁:"bì lǔ",大方:"dà fāng",外头:"wài tou",班长:"bān zhǎng",星宿:"xīng xiù",宁愿:"nìng yuàn",钦差:"qīn chāi",为数:"wéi shù",勾当:"gòu dàng",削减:"xuē jiǎn",间谍:"jiàn dié",埋怨:"mán yuàn",结实:"jiē shi",计量:"jì liáng",淹没:"yān mò",村长:"cūn zhǎng",连长:"lián zhǎng",自给:"zì jǐ",武将:"wǔ jiàng",温差:"wēn chā",直奔:"zhí bèn",供求:"gōng qiú",剂量:"jì liàng",道长:"dào zhǎng",泄露:"xiè lòu",王八:"wáng ba",切割:"qiē gē",间隔:"jiàn gé",一晃:"yì huǎng",长假:"cháng jià",令狐:"líng hú",为害:"wéi hài",句子:"jù zi",偿还:"cháng huán",疙瘩:"gē da",燕山:"yān shān",堵塞:"dǔ sè",夺冠:"duó guàn",扎实:"zhā shi",电荷:"diàn hè",看守:"kān shǒu",复辟:"fù bì",郁闷:"yù mèn",尽早:"jǐn zǎo",切断:"qiē duàn",指头:"zhǐ tou",为生:"wéi shēng",畜生:"chù sheng",切除:"qiē chú",着力:"zhuó lì",着想:"zhuó xiǎng",级差:"jí chā",投奔:"tóu bèn",棍子:"gùn zi",含糊:"hán hu",少妇:"shào fù",兴致:"xìng zhì",纳闷:"nà mèn",干流:"gàn liú",卷起:"juǎn qǐ",扇子:"shàn zi",更改:"gēng gǎi",笼络:"lǒng luò",喇叭:"lǎ ba",载荷:"zài hè",妥当:"tuǒ dàng",为难:"wéi nán",着陆:"zhuó lù",燕子:"yàn zi",干吗:"gàn má",白发:"bái fà",总得:"zǒng děi",夹击:"jiā jī",曝光:"bào guāng",曲调:"qǔ diào",相机:"xiàng jī",叫化:"jiào huà",角逐:"jué zhú",啊哟:"ā yō",载重:"zài zhòng",长辈:"zhǎng bèi",出差:"chū chāi",垛口:"duǒ kǒu",撇开:"piē kāi",厅长:"tīng zhǎng",组分:"zǔ fèn",误差:"wù chā",家当:"jiā dàng",传记:"zhuàn jì",个子:"gè zi",铺设:"pū shè",干事:"gàn shì",杆菌:"gǎn jūn",定量:"dìng liàng",运载:"yùn zài",会儿:"huì er",酋长:"qiú zhǎng",重返:"chóng fǎn",差额:"chā é",露面:"lòu miàn",钻研:"zuān yán",大城:"dài chéng",上当:"shàng dàng",销量:"xiāo liàng",作坊:"zuō fang",照相:"zhào xiàng",哎呀:"āi yā",调集:"diào jí",看中:"kàn zhòng",议长:"yì zhǎng",风筝:"fēng zheng",辟邪:"bì xié",空隙:"kòng xì",更迭:"gēng dié",偏差:"piān chā",声调:"shēng diào",适量:"shì liàng",屯子:"tún zi",无量:"wú liàng",空地:"kòng dì",调度:"diào dù",散射:"sǎn shè",创伤:"chuāng shāng",海参:"hǎi shēn",满载:"mǎn zài",重叠:"chóng dié",落差:"luò chā",单调:"dān diào",老将:"lǎo jiàng",人参:"rén shēn",间断:"jiàn duàn",重现:"chóng xiàn",夹杂:"jiā zá",调用:"diào yòng",萝卜:"luó bo",附着:"fù zhuó",应声:"yìng shēng",主将:"zhǔ jiàng",罪过:"zuì guo",咀嚼:"jǔ jué",为政:"wéi zhèng",过量:"guò liàng",乐曲:"yuè qǔ",负荷:"fù hè",枪弹:"qiāng dàn",悄然:"qiǎo rán",处方:"chǔ fāng",悄声:"qiǎo shēng",曲子:"qǔ zi",情调:"qíng diào",挑衅:"tiǎo xìn",代为:"dài wéi",了结:"liǎo jié",打中:"dǎ zhòng",酒吧:"jiǔ bā",懒得:"lǎn de",增量:"zēng liàng",衣着:"yī zhuó",部将:"bù jiàng",要塞:"yào sài",茶几:"chá jī",杠杆:"gàng gǎn",出没:"chū mò",鲜有:"xiǎn yǒu",间隙:"jiàn xì",重担:"zhòng dàn",重演:"chóng yǎn",重试:"chóng shì",应酬:"yìng chou",只当:"zhǐ dāng",毋宁:"wú nìng",包扎:"bāo zā",前头:"qián tou",卷烟:"juǎn yān",非得:"fēi děi",弹道:"dàn dào",杆子:"gān zi",门将:"mén jiàng",后头:"hòu tou",喝彩:"hè cǎi",暖和:"nuǎn huo",累积:"lěi jī",调遣:"diào qiǎn",倔强:"jué jiàng",宝藏:"bǎo zàng",丧事:"sāng shì",约莫:"yuē mo",纤夫:"qiàn fū",更替:"gēng tì",装载:"zhuāng zài",背包:"bēi bāo",帖子:"tiě zi",松散:"sōng sǎn",呼喝:"hū hè",可恶:"kě wù",自转:"zì zhuàn",供电:"gōng diàn",反省:"fǎn xǐng",坦率:"tǎn shuài",苏打:"sū dá",本分:"běn fèn",落得:"luò de",鄙薄:"bǐ bó",相间:"xiāng jiàn",单薄:"dān bó",混蛋:"hún dàn",贞观:"zhēn guān",附和:"fù hè",能耐:"néng nài",吓唬:"xià hu",未了:"wèi liǎo",引着:"yǐn zháo",抽调:"chōu diào",沙子:"shā zi",席卷:"xí juǎn",标的:"biāo dì",别扭:"biè niu",思量:"sī liang",喝采:"hè cǎi",论语:"lún yǔ",盖子:"gài zi",分外:"fèn wài",弄堂:"lòng táng",乐舞:"yuè wǔ",雨量:"yǔ liàng",毛发:"máo fà",差遣:"chāi qiǎn",背负:"bēi fù",转速:"zhuàn sù",声乐:"shēng yuè",夹攻:"jiā gōng",供水:"gōng shuǐ",主干:"zhǔ gàn",惩处:"chéng chǔ",长相:"zhǎng xiàng",公差:"gōng chāi",榴弹:"liú dàn",省得:"shěng de",条子:"tiáo zi",重围:"chóng wéi",阻塞:"zǔ sè",劲风:"jìng fēng",纠葛:"jiū gé",颠簸:"diān bǒ",点中:"diǎn zhòng",重创:"zhòng chuāng",姥姥:"lǎo lao",迷糊:"mí hu",公家:"gōng jia",几率:"jī lǜ",苦闷:"kǔ mèn",度量:"dù liàng",差错:"chā cuò",暑假:"shǔ jià",参差:"cēn cī",搭载:"dā zài",助长:"zhù zhǎng",相称:"xiāng chèn",红晕:"hóng yùn",舍命:"shě mìng",喜好:"xǐ hào",列传:"liè zhuàn",劲敌:"jìng dí",蛤蟆:"há ma",请假:"qǐng jià",钉子:"dīng zi",沉没:"chén mò",高丽:"gāo lí",休假:"xiū jià",无为:"wú wéi",巴结:"bā jie",了得:"liǎo dé",变相:"biàn xiàng",核弹:"hé dàn",亲家:"qìng jia",承载:"chéng zài",喝问:"hè wèn",还击:"huán jī",交还:"jiāo huán",将令:"jiàng lìng",单于:"chán yú",空缺:"kòng quē",绿林:"lù lín",胆量:"dǎn liàng",执着:"zhí zhuó",低调:"dī diào",闭塞:"bì sè",轻薄:"qīng bó",得当:"dé dàng",占卜:"zhān bǔ",扫帚:"sào zhou",龟兹:"qiū cí",年长:"nián zhǎng",外传:"wài zhuàn",头子:"tóu zi",裁缝:"cái feng",礼乐:"lǐ yuè",血泊:"xuè pō",散乱:"sǎn luàn",动量:"dòng liàng",倒腾:"dǎo teng",取舍:"qǔ shě",咱家:"zán jiā",长发:"cháng fà",爪哇:"zhǎo wā",弹壳:"dàn ké",省悟:"xǐng wù",嚷嚷:"rāng rang",连累:"lián lèi",应得:"yīng dé",族长:"zú zhǎng",柜子:"guì zi",擂鼓:"léi gǔ",眩晕:"xuàn yùn",调配:"tiáo pèi",躯干:"qū gàn",差役:"chāi yì",坎坷:"kǎn kě",少儿:"shào ér",乐团:"yuè tuán",养分:"yǎng fèn",退还:"tuì huán",格调:"gé diào",语调:"yǔ diào",音调:"yīn diào",乐府:"yuè fǔ",古朴:"gǔ pǔ",打点:"dǎ diǎn",差使:"chāi shǐ",匀称:"yún chèn",瘦削:"shòu xuē",膏药:"gāo yao",吞没:"tūn mò",调任:"diào rèn",散居:"sǎn jū",上头:"shàng tóu",风靡:"fēng mǐ",放假:"fàng jià",估量:"gū liang",失当:"shī dàng",中弹:"zhòng dàn",妄为:"wàng wéi",长者:"zhǎng zhě",起哄:"qǐ hòng",末了:"mò liǎo",相声:"xiàng sheng",校正:"jiào zhèng",劝降:"quàn xiáng",矢量:"shǐ liàng",沉闷:"chén mèn",给与:"jǐ yǔ",解法:"jiě fǎ",塞外:"sài wài",将校:"jiàng xiào",嗜好:"shì hào",没落:"mò luò",朴刀:"pō dāo",片子:"piān zi",切削:"qiē xiāo",弹丸:"dàn wán",稀薄:"xī bó",亏得:"kuī dé",间歇:"jiàn xiē",翘首:"qiáo shǒu",色调:"sè diào",处决:"chǔ jué",表率:"biǎo shuài",尺子:"chǐ zi",招降:"zhāo xiáng",称职:"chèn zhí",斗篷:"dǒu peng",铺子:"pù zi",底子:"dǐ zi",负载:"fù zài",干警:"gàn jǐng",倒数:"dào shǔ",将官:"jiàng guān",锄头:"chú tou",归降:"guī xiáng",疟疾:"nüè ji",唠叨:"láo dao",限量:"xiàn liàng",屏息:"bǐng xī",重逢:"chóng féng",器乐:"qì yuè",氢弹:"qīng dàn",脖颈:"bó gěng",妃子:"fēi zi",处事:"chǔ shì",参量:"cān liàng",轻率:"qīng shuài",缥缈:"piāo miǎo",中奖:"zhòng jiǎng",才干:"cái gàn",施舍:"shī shě",卷子:"juàn zi",游说:"yóu shuì",巷子:"xiàng zi",膀胱:"páng guāng",切勿:"qiè wù",看管:"kān guǎn",风头:"fēng tou",精干:"jīng gàn",高差:"gāo chā",恐吓:"kǒng hè",扁担:"biǎn dàn",给养:"jǐ yǎng",格子:"gé zi",供需:"gōng xū",反差:"fǎn chā",飞弹:"fēi dàn",微薄:"wēi bó",发型:"fà xíng",即兴:"jí xìng",攒动:"cuán dòng",间或:"jiàn huò",浅薄:"qiǎn bó",乐章:"yuè zhāng",顺差:"shùn chā",调子:"diào zi",相位:"xiàng wèi",转子:"zhuàn zǐ",劲旅:"jìng lǚ",咔嚓:"kā chā",了事:"liǎo shì",转悠:"zhuàn you",当铺:"dàng pù",爪子:"zhuǎ zi",单子:"dān zi",好战:"hào zhàn",燕麦:"yàn mài",只许:"zhǐ xǔ",干练:"gàn liàn",女将:"nǚ jiàng",酒量:"jiǔ liàng",划船:"huá chuán",伎俩:"jì liǎng",挑拨:"tiǎo bō",少校:"shào xiào",着落:"zhuó luò",憎恶:"zēng wù",刻薄:"kè bó",要挟:"yāo xié",用处:"yòng chu",还手:"huán shǒu",模具:"mú jù",执著:"zhí zhuó",喝令:"hè lìng",保长:"bǎo zhǎng",吸着:"xī zhe",症结:"zhēng jié",公转:"gōng zhuàn",校勘:"jiào kān",重提:"chóng tí",扫兴:"sǎo xìng",铺盖:"pū gài",长史:"zhǎng shǐ",差价:"chā jià",压根:"yà gēn",怔住:"zhèng zhù",应允:"yīng yǔn",切入:"qiē rù",战将:"zhàn jiàng",年少:"nián shào",舍身:"shě shēn",执拗:"zhí niù",处世:"chǔ shì",中风:"zhòng fēng",等量:"děng liàng",放量:"fàng liàng",腔调:"qiāng diào",老少:"lǎo shào",没入:"mò rù",瓜葛:"guā gé",将帅:"jiàng shuài",车载:"chē zài",窝囊:"wō nang",长进:"zhǎng jìn",可汗:"kè hán",并州:"bīng zhōu",供销:"gōng xiāo",切片:"qiē piàn",差事:"chāi shì",知会:"zhī hui",鹰爪:"yīng zhǎo",处女:"chǔ nǚ",切磋:"qiē cuō",日头:"rì tou",押解:"yā jiè",滋长:"zī zhǎng",道观:"dào guàn",脚色:"jué sè",当量:"dāng liàng",婆家:"pó jia",缘分:"yuán fèn",空闲:"kòng xián",好色:"hào sè",怒喝:"nù hè",笼统:"lǒng tǒng",边塞:"biān sài",何曾:"hé céng",重合:"chóng hé",零散:"líng sǎn",轰隆:"hōng lōng",化子:"huà zi",内蒙:"nèi měng",数落:"shǔ luò",逆差:"nì chā",牟利:"móu lì",栅栏:"zhà lan",中标:"zhòng biāo",调档:"diào dàng",佝偻:"gōu lóu",场子:"chǎng zi",甲壳:"jiǎ qiào",重温:"chóng wēn",炮制:"páo zhì",返还:"fǎn huán",自传:"zì zhuàn",高调:"gāo diào",殷红:"yān hóng",固着:"gù zhuó",强求:"qiǎng qiú",本相:"běn xiàng",骄横:"jiāo hèng",草率:"cǎo shuài",气闷:"qì mèn",着色:"zhuó sè",宁肯:"nìng kěn",兴头:"xìng tou",拘泥:"jū nì",夹角:"jiā jiǎo",发髻:"fà jì",猛将:"měng jiàng",约摸:"yuē mo",拖累:"tuō lěi",呢绒:"ní róng",钻探:"zuān tàn",夹层:"jiā céng",落魄:"luò pò",巷道:"hàng dào",运量:"yùn liàng",解闷:"jiě mèn",空儿:"kòng er",估摸:"gū mo",好客:"hào kè",钻孔:"zuān kǒng",糊弄:"hù nòng",荥阳:"xíng yáng",烦闷:"fán mèn",仓卒:"cāng cù",分叉:"fēn chà",厂子:"chǎng zi",小调:"xiǎo diào",少阳:"shào yáng",受降:"shòu xiáng",染坊:"rǎn fáng",胳臂:"gē bei",将门:"jiàng mén",模板:"mú bǎn",配给:"pèi jǐ",为伍:"wéi wǔ",跟头:"gēn tou",划算:"huá suàn",累赘:"léi zhui",哄笑:"hōng xiào",晕眩:"yūn xuàn",干掉:"gàn diào",缝制:"féng zhì",难处:"nán chù",着意:"zhuó yì",蛮横:"mán hèng",奇数:"jī shù",短发:"duǎn fà",生还:"shēng huán",还清:"huán qīng",看护:"kān hù",直率:"zhí shuài",奏乐:"zòu yuè",载客:"zài kè",专横:"zhuān hèng",湮没:"yān mò",空格:"kòng gé",铺垫:"pū diàn",良将:"liáng jiàng",哗啦:"huā lā",散漫:"sǎn màn",脱发:"tuō fà",送还:"sòng huán",埋没:"mái mò",累及:"lěi jí",薄雾:"bó wù",调离:"diào lí",舌苔:"shé tāi",机长:"jī zhǎng",栓塞:"shuān sè",配角:"pèi jué",切口:"qiē kǒu",创口:"chuāng kǒu",哈欠:"hā qian",实弹:"shí dàn",铺平:"pū píng",哈达:"hǎ dá",懒散:"lǎn sǎn",实干:"shí gàn",填空:"tián kòng",刁钻:"diāo zuān",乐师:"yuè shī",量变:"liàng biàn",诱降:"yòu xiáng",搪塞:"táng sè",征调:"zhēng diào",夹道:"jiā dào",干咳:"gān ké",止咳:"zhǐ ké",乐工:"yuè gōng",划过:"huá guò",着火:"zháo huǒ",更正:"gēng zhèng",给付:"jǐ fù",空子:"kòng zi",哪吒:"né zhā",正着:"zhèng zháo",刷子:"shuā zi",丧葬:"sāng zàng",夹带:"jiā dài",安分:"ān fèn",中意:"zhòng yì",长孙:"zhǎng sūn",校订:"jiào dìng",卷曲:"juǎn qū",载运:"zài yùn",投弹:"tóu dàn",柞蚕:"zuò cán",份量:"fèn liàng",调换:"diào huàn",了然:"liǎo rán",咧嘴:"liě zuǐ",典当:"diǎn dàng",寒假:"hán jià",长兄:"zhǎng xiōng",给水:"jǐ shuǐ",须发:"xū fà",枝干:"zhī gàn",属相:"shǔ xiàng",哄抢:"hōng qiǎng",刻划:"kè huà",塞子:"sāi zi",单干:"dān gàn",还乡:"huán xiāng",兆头:"zhào tou",寺观:"sì guàn",督率:"dū shuài",啊哈:"ā ha",割舍:"gē shě",抹布:"mā bù",好恶:"hào wù",下处:"xià chǔ",消长:"xiāo zhǎng",离间:"lí jiàn",准头:"zhǔn tou",校对:"jiào duì",什物:"shí wù",番禺:"pān yú",佛爷:"fó ye",吗啡:"mǎ fēi",盐分:"yán fèn",虎将:"hǔ jiàng",薄荷:"bò he",独处:"dú chǔ",空位:"kòng wèi",铺路:"pū lù",乌拉:"wū lā",调回:"diào huí",来头:"lái tou",闲散:"xián sǎn",胶卷:"jiāo juǎn",冒失:"mào shi",干劲:"gàn jìn",弦乐:"xián yuè",相国:"xiàng guó",丹参:"dān shēn",助兴:"zhù xìng",铺开:"pū kāi",次长:"cì zhǎng",发卡:"fà qiǎ",拮据:"jié jū",刹车:"shā chē",生发:"shēng fà",重播:"chóng bō",缝合:"féng hé",音量:"yīn liàng",少尉:"shào wèi",冲压:"chòng yā",苍劲:"cāng jìng",厚薄:"hòu báo",威吓:"wēi hè",外相:"wài xiàng",呼号:"hū háo",着迷:"zháo mí",挑担:"tiāo dàn",纹路:"wén lù",还俗:"huán sú",强横:"qiáng hèng",着数:"zhāo shù",降顺:"xiáng shùn",挑明:"tiǎo míng",眯缝:"mī feng",分内:"fèn nèi",更衣:"gēng yī",软和:"ruǎn huo",尽兴:"jìn xìng",号子:"hào zi",爪牙:"zhǎo yá",败将:"bài jiàng",猜中:"cāi zhòng",结扎:"jié zā",没空:"méi kòng",夹缝:"jiā fèng",拾掇:"shí duo",掺和:"chān huo",簸箕:"bò ji",电量:"diàn liàng",荷载:"hè zǎi",调式:"diào shì",处身:"chǔ shēn",打手:"dǎ shǒu",弹弓:"dàn gōng",横蛮:"hèng mán",能干:"néng gàn",校点:"jiào diǎn",加载:"jiā zài",干校:"gàn xiào",哄传:"hōng chuán",校注:"jiào zhù",淤塞:"yū sè",马扎:"mǎ zhá",月氏:"yuè zhī",高干:"gāo gàn",经传:"jīng zhuàn",曾孙:"zēng sūn",好斗:"hào dòu",关卡:"guān qiǎ",逃奔:"táo bèn",磨蹭:"mó ceng",牟取:"móu qǔ",颤栗:"zhàn lì",蚂蚱:"mà zha",撮合:"cuō he",趔趄:"liè qie",摔打:"shuāi dǎ",台子:"tái zi",分得:"fēn de",粘着:"nián zhuó",采邑:"cài yì",散装:"sǎn zhuāng",婀娜:"ē nuó",兴味:"xìng wèi",行头:"xíng tou",气量:"qì liàng",调运:"diào yùn",处治:"chǔ zhì",乐音:"yuè yīn",充塞:"chōng sè",恫吓:"dòng hè",论调:"lùn diào",相中:"xiāng zhòng",民乐:"mín yuè",炮仗:"pào zhang",丧服:"sāng fú",骁将:"xiāo jiàng",量刑:"liàng xíng",缝补:"féng bǔ",财会:"cái kuài",大干:"dà gàn",历数:"lì shǔ",校场:"jiào chǎng",塞北:"sài běi",识相:"shí xiàng",辱没:"rǔ mò",鲜亮:"xiān liàng",语塞:"yǔ sè",露脸:"lòu liǎn",凉快:"liáng kuai",腰杆:"yāo gǎn",溜达:"liū da",嘎嘎:"gā gā",公干:"gōng gàn",桔梗:"jié gěng",挑逗:"tiǎo dòu",看门:"kān mén",乐歌:"yuè gē",拓片:"tà piàn",挑动:"tiǎo dòng",准将:"zhǔn jiàng",遒劲:"qiú jìng",磨坊:"mò fáng",逶迤:"wēi yí",搅和:"jiǎo huo",摩挲:"mó suō",作弄:"zuò nòng",苗头:"miáo tou",打颤:"dǎ zhàn",大藏:"dà zàng",畜牲:"chù shēng",勾搭:"gōu da",树荫:"shù yīn",树杈:"shù chà",铁杆:"tiě gǎn",将相:"jiàng xiàng",份子:"fèn zi",视差:"shì chā",绿荫:"lǜ yīn",枪杆:"qiāng gǎn",缝纫:"féng rèn",愁闷:"chóu mèn",点将:"diǎn jiàng",华佗:"huà tuó",劲射:"jìng shè",箱笼:"xiāng lǒng",终了:"zhōng liǎo",鬓发:"bìn fà",结巴:"jiē ba",苦干:"kǔ gàn",看家:"kān jiā",正旦:"zhēng dàn",中肯:"zhòng kěn",厦门:"xià mén",东莞:"dōng guǎn",食量:"shí liàng",宫调:"gōng diào",间作:"jiàn zuò",弹片:"dàn piàn",差池:"chā chí",漂白:"piǎo bái",杠子:"gàng zi",调处:"tiáo chǔ",好动:"hào dòng",转炉:"zhuàn lú",屏气:"bǐng qì",夹板:"jiā bǎn",哀乐:"āi yuè",干道:"gàn dào",苦处:"kǔ chù",劈柴:"pǐ chái",长势:"zhǎng shì",天华:"tiān huá",共处:"gòng chǔ",校验:"jiào yàn",出塞:"chū sài",磨盘:"mò pán",萎靡:"wěi mǐ",奔丧:"bēn sāng",唱和:"chàng hè",大调:"dà diào",非分:"fēi fèn",钻营:"zuān yíng",夹子:"jiā zi",超载:"chāo zài",更始:"gēng shǐ",铃铛:"líng dang",披散:"pī sàn",发还:"fā huán",转轮:"zhuàn lún",横财:"hèng cái",泡桐:"pāo tóng",抛撒:"pāo sǎ",天呀:"tiān yā",糊糊:"hū hu",躯壳:"qū qiào",通量:"tōng liàng",奉还:"fèng huán",午觉:"wǔ jiào",闷棍:"mèn gùn",浪头:"làng tou",砚台:"yàn tái",油坊:"yóu fáng",学长:"xué zhǎng",过载:"guò zài",笔调:"bǐ diào",衣被:"yī bèi",畜产:"xù chǎn",调阅:"diào yuè",蛮干:"mán gàn",曾祖:"zēng zǔ",提干:"tí gàn",变调:"biàn diào",覆没:"fù mò",模子:"mú zi",乐律:"yuè lǜ",称心:"chèn xīn",木杆:"mù gān",重印:"chóng yìn",自省:"zì xǐng",提调:"tí diào",看相:"kàn xiàng",芋头:"yù tou",下切:"xià qiē",塞上:"sài shàng",铺张:"pū zhāng",藤蔓:"téng wàn",薄幸:"bó xìng",解数:"xiè shù",褪去:"tuì qù",霰弹:"xiàn dàn",柚木:"yóu mù",痕量:"hén liàng",雅乐:"yǎ yuè",号哭:"háo kū",诈降:"zhà xiáng",猪圈:"zhū juàn",咋舌:"zé shé",铣床:"xǐ chuáng",防弹:"fáng dàn",健将:"jiàn jiàng",丽水:"lí shuǐ",削发:"xuē fà",空当:"kòng dāng",多相:"duō xiàng",鲜见:"xiǎn jiàn",划桨:"huá jiǎng",载波:"zài bō",跳蚤:"tiào zao",俏皮:"qiào pí",吧嗒:"bā dā",结发:"jié fà",了断:"liǎo duàn",同调:"tóng diào",石磨:"shí mò",时差:"shí chā",鼻塞:"bí sè",挑子:"tiāo zi",推磨:"tuī mò",武侯:"wǔ hóu",抹煞:"mǒ shā",调转:"diào zhuǎn",籍没:"jí mò",还债:"huán zhài",调演:"diào yǎn",分划:"fēn huá",奇偶:"jī ǒu",断喝:"duàn hè",闷雷:"mèn léi",狼藉:"láng jí",饭量:"fàn liàng",还礼:"huán lǐ",转调:"zhuǎn diào",星相:"xīng xiàng",手相:"shǒu xiàng",配乐:"pèi yuè",盖头:"gài tou",连杆:"lián gǎn",簿记:"bù jì",刀把:"dāo bà",量词:"liàng cí",名角:"míng jué",步调:"bù diào",校本:"jiào běn",账簿:"zhàng bù",隽永:"juàn yǒng",稍为:"shāo wéi",易传:"yì zhuàn",乐谱:"yuè pǔ",牵累:"qiān lěi",答理:"dā li",喝斥:"hè chì",吟哦:"yín é",干渠:"gàn qú",海量:"hǎi liàng",精当:"jīng dàng",着床:"zhuó chuáng",月相:"yuè xiàng",庶几:"shù jī",宫观:"gōng guàn",论处:"lùn chǔ",征辟:"zhēng bì",厚朴:"hòu pò",介壳:"jiè qiào",吭哧:"kēng chī",咯血:"kǎ xiě",铺陈:"pū chén",重生:"chóng shēng",乐理:"yuè lǐ",哀号:"āi háo",藏历:"zàng lì",刚劲:"gāng jìng",削平:"xuē píng",浓荫:"nóng yīn",城垛:"chéng duǒ",当差:"dāng chāi",正传:"zhèng zhuàn",并处:"bìng chǔ",创面:"chuāng miàn",旦角:"dàn jué",薄礼:"bó lǐ",晃荡:"huàng dang",臊子:"sào zi",家什:"jiā shí",闷头:"mēn tóu",美发:"měi fà",度数:"dù shu",着凉:"zháo liáng",闯将:"chuǎng jiàng",几案:"jī àn",姘头:"pīn tou",差数:"chā shù",散碎:"sǎn suì",壅塞:"yōng sè",寒颤:"hán zhàn",牵强:"qiān qiǎng",无间:"wú jiàn",轮转:"lún zhuàn",号叫:"háo jiào",铺排:"pū pái",降伏:"xiáng fú",轧钢:"zhá gāng",东阿:"dōng ē",病假:"bìng jià",累加:"lěi jiā",梗塞:"gěng sè",弹夹:"dàn jiā",钻心:"zuān xīn",晃眼:"huǎng yǎn",魔爪:"mó zhǎo",标量:"biāo liàng",憋闷:"biē mèn",猜度:"cāi duó",处士:"chǔ shì",官差:"guān chāi",讨还:"tǎo huán",长门:"cháng mén",馏分:"liú fēn",里弄:"lǐ lòng",色相:"sè xiàng",雅兴:"yǎ xìng",角力:"jué lì",弹坑:"dàn kēng",枝杈:"zhī chà",夹具:"jiā jù",处刑:"chǔ xíng",悍将:"hàn jiàng",好学:"hào xué",好好:"hǎo hǎo",银发:"yín fà",扫把:"sào bǎ",法相:"fǎ xiàng",贵干:"guì gàn",供气:"gōng qì",空余:"kòng yú",捆扎:"kǔn zā",瘠薄:"jí bó",浆糊:"jiàng hu",嘎吱:"gā zhī",调令:"diào lìng",法帖:"fǎ tiè",淋病:"lìn bìng",调派:"diào pài",转盘:"zhuàn pán",供稿:"gōng gǎo",差官:"chāi guān",忧闷:"yōu mèn",教长:"jiào zhǎng",重唱:"chóng chàng",酒兴:"jiǔ xìng",乐坛:"yuè tán",花呢:"huā ní",叱喝:"chì hè",膀臂:"bǎng bì",得空:"dé kòng",转圈:"zhuàn quān",横暴:"hèng bào",哄抬:"hōng tái",引吭:"yǐn háng",载货:"zài huò",中计:"zhòng jì",官长:"guān zhǎng",相面:"xiàng miàn",看头:"kàn tou",盼头:"pàn tou",意兴:"yì xìng",军乐:"jūn yuè",累次:"lěi cì",骨嘟:"gǔ dū",燕赵:"yān zhào",报丧:"bào sāng",弥撒:"mí sa",挨斗:"ái dòu",扁舟:"piān zhōu",丑角:"chǒu jué",吊丧:"diào sāng",强将:"qiáng jiàng",重奏:"chóng zòu",发辫:"fà biàn",着魔:"zháo mó",着法:"zhāo fǎ",盛放:"shèng fàng",填塞:"tián sè",凶横:"xiōng hèng",稽首:"qǐ shǒu",碑帖:"bēi tiè",冲量:"chōng liàng",发菜:"fà cài",假发:"jiǎ fà",翻卷:"fān juǎn",小量:"xiǎo liàng",胶着:"jiāo zhuó",里子:"lǐ zi",调调:"diào diao",散兵:"sǎn bīng",高挑:"gāo tiǎo",播撒:"bō sǎ",夹心:"jiā xīn",扇动:"shān dòng",叨扰:"tāo rǎo",霓裳:"ní cháng",捻子:"niǎn zi",弥缝:"mí féng",撒布:"sǎ bù",场院:"cháng yuàn",省亲:"xǐng qīn",提拉:"tí lā",惯量:"guàn liàng",强逼:"qiáng bī",强征:"qiáng zhēng",晕车:"yùn chē",数道:"shù dào",带累:"dài lèi",拓本:"tà běn",嫌恶:"xián wù",宿将:"sù jiàng",龟裂:"jūn liè",缠夹:"chán jiā",发式:"fà shì",隔扇:"gé shàn",天分:"tiān fèn",癖好:"pǐ hào",四通:"sì tōng",白术:"bái zhú",划伤:"huá shāng",角斗:"jué dòu",听差:"tīng chāi",岁差:"suì chā",丧礼:"sāng lǐ",脉脉:"mò mò",削瘦:"xuē shòu",撒播:"sǎ bō",莎草:"suō cǎo",犍为:"qián wéi",调头:"diào tóu",龙卷:"lóng juǎn",外调:"wài diào",字帖:"zì tiè",卷发:"juǎn fà",揣度:"chuǎi duó",洋相:"yáng xiàng",散光:"sǎn guāng",骨碌:"gū lu",薄命:"bó mìng",笼头:"lóng tóu",咽炎:"yān yán",碌碡:"liù zhou",片儿:"piàn er",纤手:"qiàn shǒu",散体:"sǎn tǐ",内省:"nèi xǐng",强留:"qiáng liú",解送:"jiè sòng",反间:"fǎn jiàn",少壮:"shào zhuàng",留空:"liú kōng",告假:"gào jià",咳血:"ké xuè",薄暮:"bó mù",铺轨:"pū guǐ",磨削:"mó xuē",治丧:"zhì sāng",叉子:"chā zi",哄动:"hōng dòng",蛾子:"é zi",出落:"chū luò",股长:"gǔ zhǎng",贵处:"guì chù",还魂:"huán hún",例假:"lì jià",刹住:"shā zhù",身量:"shēn liàng",同好:"tóng hào",模量:"mó liàng",更生:"gēng shēng",服丧:"fú sāng",率直:"shuài zhí",字模:"zì mú",散架:"sǎn jià",答腔:"dā qiāng",交恶:"jiāo wù",薄情:"bó qíng",眼泡:"yǎn pāo",袅娜:"niǎo nuó",草垛:"cǎo duò",冲劲:"chòng jìn",呢喃:"ní nán",切中:"qiè zhòng",挑灯:"tiǎo dēng",还愿:"huán yuàn",激将:"jī jiàng",更鼓:"gēng gǔ",没药:"mò yào",败兴:"bài xìng",切面:"qiē miàn",散户:"sǎn hù",累进:"lěi jìn",背带:"bēi dài",秤杆:"chèng gǎn",碾坊:"niǎn fáng",簿子:"bù zi",扳手:"bān shǒu",铅山:"yán shān",儒将:"rú jiàng",重光:"chóng guāng",剪发:"jiǎn fà",长上:"zhǎng shàng",小传:"xiǎo zhuàn",压轴:"yā zhòu",弱冠:"ruò guàn",花卷:"huā juǎn",横祸:"hèng huò",夹克:"jiā kè",光晕:"guāng yùn",披靡:"pī mǐ",对调:"duì diào",夹持:"jiā chí",空额:"kòng é",平调:"píng diào",铺床:"pū chuáng",丧钟:"sāng zhōng",作乐:"zuò lè",少府:"shào fǔ",数数:"shuò shuò",奔头:"bèn tou",进给:"jìn jǐ",率性:"shuài xìng",乐子:"lè zi",绑扎:"bǎng zā",挑唆:"tiǎo suō",漂洗:"piǎo xǐ",夹墙:"jiā qiáng",咳喘:"ké chuǎn",乜斜:"miē xie",错处:"cuò chù",闷酒:"mèn jiǔ",时调:"shí diào",重孙:"chóng sūn",经幢:"jīng chuáng",圩场:"xū chǎng",调门:"diào mén",花头:"huā tóu",划拉:"huá la",套色:"tào shǎi",粗率:"cū shuài",相率:"xiāng shuài",款识:"kuǎn zhì",吁请:"yù qǐng",荫蔽:"yīn bì",文蛤:"wén gé",嘀嗒:"dī dā",调取:"diào qǔ",交差:"jiāo chāi",落子:"luò zǐ",相册:"xiàng cè",絮叨:"xù dao",落发:"luò fà",异相:"yì xiàng",浸没:"jìn mò",角抵:"jué dǐ",卸载:"xiè zài",春卷:"chūn juǎn",扎挣:"zhá zheng",畜养:"xù yǎng",吡咯:"bǐ luò",垛子:"duò zi",恶少:"è shào",发际:"fà jì",红苕:"hóng sháo",糨糊:"jiàng hu",哭丧:"kū sāng",稍息:"shào xī",晕船:"yùn chuán",校样:"jiào yàng",外差:"wài chā",脚爪:"jiǎo zhǎo",铺展:"pū zhǎn",芫荽:"yán sui",夹紧:"jiā jǐn",尿泡:"suī pào",丧乱:"sāng luàn",凶相:"xiōng xiàng",华发:"huá fà",打场:"dǎ cháng",云量:"yún liàng",正切:"zhèng qiē",划拳:"huá quán",划艇:"huá tǐng",评传:"píng zhuàn",拉纤:"lā qiàn",句读:"jù dòu",散剂:"sǎn jì",骨殖:"gǔ shi",塞音:"sè yīn",铺叙:"pū xù",阏氏:"yān zhī",冷颤:"lěng zhàn",煞住:"shā zhù",少男:"shào nán",管乐:"guǎn yuè",号啕:"háo táo",纳降:"nà xiáng",拥塞:"yōng sè",万乘:"wàn shèng",杆儿:"gǎn ér",葛藤:"gé téng",簿籍:"bù jí",皮夹:"pí jiā",校准:"jiào zhǔn",允当:"yǔn dàng",器量:"qì liàng",选调:"xuǎn diào",扮相:"bàn xiàng",干才:"gàn cái",基干:"jī gàn",割切:"gē qiē",国乐:"guó yuè",卡壳:"qiǎ ké",辟谷:"bì gǔ",磨房:"mò fáng",咿呀:"yī yā",芥末:"jiè mo",薄技:"bó jì",产假:"chǎn jià",诗兴:"shī xìng",重出:"chóng chū",转椅:"zhuàn yǐ",酌量:"zhuó liang",簿册:"bù cè",藏青:"zàng qīng",的士:"dī shì",调人:"diào rén",解元:"jiè yuán",茎干:"jīng gàn",巨量:"jù liàng",榔头:"láng tou",率真:"shuài zhēn",喷香:"pèn xiāng",锁钥:"suǒ yuè",虾蟆:"há má",相图:"xiàng tú",兴会:"xìng huì",灶头:"zào tóu",重婚:"chóng hūn",钻洞:"zuān dòng",忖度:"cǔn duó",党参:"dǎng shēn",调温:"diào wēn",杆塔:"gān tǎ",葛布:"gé bù",拱券:"gǒng xuàn",夹生:"jiā shēng",露馅:"lòu xiàn",恰切:"qià qiè",散见:"sǎn jiàn",哨卡:"shào qiǎ",烫发:"tàng fà",体量:"tǐ liàng",挺括:"tǐng kuò",系带:"jì dài",相士:"xiàng shì",羊圈:"yáng juàn",转矩:"zhuàn jǔ",吧台:"bā tái",苍术:"cāng zhú",菲薄:"fěi bó",蛤蚧:"gé jiè",蛤蜊:"gé lí",瓜蔓:"guā wàn",怪相:"guài xiàng",临帖:"lín tiè",女红:"nǚ gōng",刨床:"bào chuáng",翘楚:"qiáo chǔ",数九:"shǔ jiǔ",谈兴:"tán xìng",雄劲:"xióng jìng",扎染:"zā rǎn",遮荫:"zhē yīn",周正:"zhōu zhèng",赚头:"zhuàn tou",扒手:"pá shǒu",搀和:"chān huo",诚朴:"chéng pǔ",肚量:"dù liàng",干结:"gān jié",工尺:"gōng chě",家累:"jiā lěi",曲水:"qū shuǐ",沙参:"shā shēn",挑花:"tiǎo huā",阿门:"ā mén",背篓:"bēi lǒu",瘪三:"biē sān",裁处:"cái chǔ",创痛:"chuāng tòng",福相:"fú xiàng",更动:"gēng dòng",豪兴:"háo xìng",还阳:"huán yáng",还嘴:"huán zuǐ",借调:"jiè diào",卷云:"juǎn yún",流弹:"liú dàn",想头:"xiǎng tou",削价:"xuē jià",校阅:"jiào yuè",雅量:"yǎ liàng",别传:"bié zhuàn",薄酒:"bó jiǔ",春假:"chūn jià",发妻:"fà qī",哗哗:"huā huā",宽绰:"kuān chuo",了悟:"liǎo wù",切花:"qiē huā",审度:"shěn duó",应许:"yīng xǔ",转台:"zhuàn tái",仔猪:"zǐ zhū",裁量:"cái liáng",藏戏:"zàng xì",乘兴:"chéng xìng",绸缪:"chóu móu",摧折:"cuī zhé",调经:"tiáo jīng",调职:"diào zhí",缝缀:"féng zhuì",骨朵:"gū duǒ",核儿:"hú er",恒量:"héng liàng",还价:"huán jià",浑朴:"hún pǔ",苦差:"kǔ chāi",面糊:"miàn hù",煞车:"shā chē",省视:"xǐng shì",什锦:"shí jǐn",信差:"xìn chāi",余切:"yú qiē",攒眉:"cuán méi",炸糕:"zhá gāo",钻杆:"zuàn gǎn",扒灰:"pá huī",拌和:"bàn huò",长调:"cháng diào",大溜:"dà liù",抖搂:"dǒu lōu",飞转:"fēi zhuàn",干仗:"gàn zhàng",好胜:"hào shèng",画片:"huà piàn",搅混:"jiǎo hún",螺杆:"luó gǎn",木模:"mù mú",怒号:"nù háo",频数:"pín shù",无宁:"wú níng",遗少:"yí shào",邮差:"yóu chāi",占卦:"zhān guà",占星:"zhān xīng",重审:"chóng shěn",自量:"zì liàng",调防:"diào fáng",发廊:"fà láng",反调:"fǎn diào",缝子:"fèng zi",更夫:"gēng fū",骨子:"gǔ zi",光杆:"guāng gǎn",夹棍:"jiā gùn",居丧:"jū sāng",巨贾:"jù gǔ",看押:"kān yā",空转:"kōng zhuàn",量力:"liàng lì",炮烙:"páo luò",赔还:"péi huán",扑扇:"pū shān",散记:"sǎn jì",散件:"sǎn jiàn",删削:"shān xuē",射干:"shè gàn",条几:"tiáo jī",偷空:"tōu kòng",削壁:"xuē bì",校核:"jiào hé",阴干:"yīn gān",择菜:"zhái cài",重九:"chóng jiǔ",主调:"zhǔ diào",自禁:"zì jīn",吧唧:"bā jī",便溺:"biàn niào",词调:"cí diào",叨咕:"dáo gu",落枕:"lào zhěn",铺砌:"pū qì",刷白:"shuà bái",委靡:"wěi mǐ",系泊:"xì bó",相马:"xiàng mǎ",熨帖:"yù tiē",转筋:"zhuàn jīn",棒喝:"bàng hè",傧相:"bīn xiàng",镐头:"gǎo tóu",间苗:"jiàn miáo",乐池:"yuè chí",卖相:"mài xiàng",屏弃:"bǐng qì",铅弹:"qiān dàn",切变:"qiē biàn",请调:"qǐng diào",群氓:"qún méng",散板:"sǎn bǎn",省察:"xǐng chá",事假:"shì jià",纤绳:"qiàn shéng",重影:"chóng yǐng",耕种:"gēng zhòng",种地:"zhòng dì",种菜:"zhòng cài",栽种:"zāi zhòng",接种:"jiē zhòng",垦种:"kěn zhòng",种殖:"zhòng zhí",种瓜:"zhòng guā",种豆:"zhòng dòu",种树:"zhòng shù",睡着:"shuì zháo",笼子:"lóng zi",重启:"chóng qǐ",重整:"chóng zhěng",重弹:"chóng tán",重足:"chóng zú",重山:"chóng shān",重游:"chóng yóu",重峦:"chóng luán",爷爷:"yé ye",奶奶:"nǎi nai",姥爷:"lǎo ye",爸爸:"bà ba",妈妈:"mā ma",婶婶:"shěn shen",舅舅:"jiù jiu",姑姑:"gū gu",叔叔:"shū shu",姨夫:"yí fu",舅母:"jiù mu",姑父:"gū fu",姐夫:"jiě fu",婆婆:"pó po",公公:"gōng gong",舅子:"jiù zi",姐姐:"jiě jie",哥哥:"gē ge",妹妹:"mèi mei",妹夫:"mèi fu",姨子:"yí zi",宝宝:"bǎo bao",娃娃:"wá wa",孩子:"hái zi",日子:"rì zi",样子:"yàng zi",狮子:"shī zi",身子:"shēn zi",架子:"jià zi",嫂子:"sǎo zi",鼻子:"bí zi",亭子:"tíng zi",折子:"zhé zi",面子:"miàn zi",脖子:"bó zi",辈子:"bèi zi",帽子:"mào zi",拍子:"pāi zi",柱子:"zhù zi",辫子:"biàn zi",鸽子:"gē zi",房子:"fáng zi",丸子:"wán zi",摊子:"tān zi",牌子:"pái zi",胡子:"hú zi",鬼子:"guǐ zi",矮子:"ǎi zi",鸭子:"yā zi",小子:"xiǎo zi",影子:"yǐng zi",屋子:"wū zi",对子:"duì zi",点子:"diǎn zi",本子:"běn zi",种子:"zhǒng zi",儿子:"ér zi",兔子:"tù zi",骗子:"piàn zi",院子:"yuàn zi",猴子:"hóu zi",嗓子:"sǎng zi",侄子:"zhí zi",柿子:"shì zi",钳子:"qián zi",虱子:"shī zi",瓶子:"píng zi",豹子:"bào zi",筷子:"kuài zi",篮子:"lán zi",绳子:"shéng zi",嘴巴:"zuǐ ba",耳朵:"ěr duo",茄子:"qié zi",蚌埠:"bèng bù",崆峒:"kōng tóng",琵琶:"pí pa",蘑菇:"mó gu",葫芦:"hú lu",狐狸:"hú li",桔子:"jú zi",盒子:"hé zi",桌子:"zhuō zi",竹子:"zhú zi",师傅:"shī fu",衣服:"yī fu",袜子:"wà zi",杯子:"bēi zi",刺猬:"cì wei",麦子:"mài zi",队伍:"duì wu",知了:"zhī liǎo",鱼儿:"yú er",馄饨:"hún tun",灯笼:"dēng long",庄稼:"zhuāng jia",聪明:"cōng ming",镜子:"jìng zi",银子:"yín zi",盘子:"pán zi",了却:"liǎo què",力气:"lì qi",席子:"xí zi",林子:"lín zi",朝霞:"zhāo xiá",朝夕:"zhāo xī",朝气:"zhāo qì",翅膀:"chì bǎng",省长:"shěng zhǎng",臧否:"zāng pǐ",否泰:"pǐ tài",变得:"biàn de",丈夫:"zhàng fu",豆腐:"dòu fu",笔杆:"bǐ gǎn",枞阳:"zōng yáng",行人:"xíng rén",打着:"dǎ zhe",第一:"dì yī",万一:"wàn yī",之一:"zhī yī",得之:"dé zhī",统一:"tǒng yī",唯一:"wéi yī",专一:"zhuān yī",单一:"dān yī",如一:"rú yī",其一:"qí yī",合一:"hé yī",逐一:"zhú yī",周一:"zhōu yī",初一:"chū yī",研一:"yán yī",归一:"guī yī",假一:"jiǎ yī",闻一:"wén yī",了了:"liǎo liǎo",公了:"gōng liǎo",私了:"sī liǎo",一月:"yī yuè",一号:"yī hào",一级:"yī jí",一等:"yī děng",一哥:"yī gē",月一:"yuè yī",一一:"yī yī",二一:"èr yī",三一:"sān yī",四一:"sì yī",五一:"wǔ yī",六一:"liù yī",七一:"qī yī",八一:"bā yī",九一:"jiǔ yī","一〇":"yī líng",一零:"yī líng",一二:"yī èr",一三:"yī sān",一四:"yī sì",一五:"yī wǔ",一六:"yī liù",一七:"yī qī",一八:"yī bā",一九:"yī jiǔ",一又:"yī yòu",一饼:"yī bǐng",一楼:"yī lóu",为例:"wéi lì",为准:"wéi zhǔn",沧海:"cāng hǎi",难为:"nán wéi",责难:"zé nàn",患难:"huàn nàn",磨难:"mó nàn",大难:"dà nàn",刁难:"diāo nàn",殉难:"xùn nàn",落难:"luò nàn",罹难:"lí nàn",灾难:"zāi nàn",难民:"nàn mín",苦难:"kǔ nàn",危难:"wēi nàn",发难:"fā nàn",逃难:"táo nàn",避难:"bì nàn",遇难:"yù nàn",阻难:"zǔ nàn",厄难:"è nàn",徇难:"xùn nàn",空难:"kōng nàn",喜欢:"xǐ huan",朝朝:"zhāo zhāo",不行:"bù xíng",轧轧:"yà yà",弯曲:"wān qū",扭曲:"niǔ qū",曲直:"qū zhí",委曲:"wěi qū",酒曲:"jiǔ qū",曲径:"qū jìng",曲解:"qū jiě",歪曲:"wāi qū",曲线:"qū xiàn",曲阜:"qū fù",九曲:"jiǔ qū",曲折:"qū zhé",曲肱:"qū gōng",曲意:"qū yì",仡佬:"gē lǎo"},Ble=Object.keys(vS).map(e=>({zh:e,pinyin:vS[e],probability:2e-8,length:2,priority:Yr.Normal,dict:Symbol("dict2")})),yS={为什么:"wèi shén me",实际上:"shí jì shang",检察长:"jiǎn chá zhǎng",干什么:"gàn shén me",这会儿:"zhè huì er",尽可能:"jǐn kě néng",董事长:"dǒng shì zhǎng",了不起:"liǎo bù qǐ",参谋长:"cān móu zhǎng",朝鲜族:"cháo xiǎn zú",海内外:"hǎi nèi wài",禁不住:"jīn bú zhù",柏拉图:"bó lā tú",不在乎:"bú zài hu",洛杉矶:"luò shān jī",有点儿:"yǒu diǎn er",迫击炮:"pǎi jī pào",不得了:"bù dé liǎo",马尾松:"mǎ wěi sōng",运输量:"yùn shū liàng",发脾气:"fā pí qi",士大夫:"shì dà fū",鸭绿江:"yā lù jiāng",压根儿:"yà gēn er",对得起:"duì de qǐ",那会儿:"nà huì er",自个儿:"zì gě er",物理量:"wù lǐ liàng",怎么着:"zěn me zhāo",明晃晃:"míng huǎng huǎng",节假日:"jié jià rì",心里话:"xīn lǐ huà",发行量:"fā xíng liàng",兴冲冲:"xìng chōng chōng",分子量:"fēn zǐ liàng",国子监:"guó zǐ jiàn",老大难:"lǎo dà nán",党内外:"dǎng nèi wài",这么着:"zhè me zhāo",少奶奶:"shào nǎi nai",暗地里:"àn dì lǐ",更年期:"gēng nián qī",工作量:"gōng zuò liàng",背地里:"bèi dì lǐ",山里红:"shān li hóng",好好儿:"hǎo hāo er",交响乐:"jiāo xiǎng yuè",好意思:"hǎo yì si",吐谷浑:"tǔ yù hún",没意思:"méi yì si",理发师:"lǐ fà shī",塔什干:"tǎ shí gān",充其量:"chōng qí liàng",靠得住:"kào de zhù",车行道:"chē xíng dào",人行道:"rén xíng dào",中郎将:"zhōng láng jiàng",照明弹:"zhào míng dàn",烟幕弹:"yān mù dàn",没奈何:"mò nài hé",乱哄哄:"luàn hōng hōng",惠更斯:"huì gēng sī",载重量:"zài zhòng liàng",瞧得起:"qiáo de qǐ",纪传体:"jì zhuàn tǐ",阿房宫:"ē páng gōng",卷心菜:"juǎn xīn cài",戏班子:"xì bān zi",过得去:"guò de qù",花岗石:"huā gāng shí",外甥女:"wài sheng nǚ",团团转:"tuán tuán zhuàn",大堡礁:"dà bǎo jiāo",燃烧弹:"rán shāo dàn",劳什子:"láo shí zi",摇滚乐:"yáo gǔn yuè",夹竹桃:"jiā zhú táo",闹哄哄:"nào hōng hōng",三连冠:"sān lián guàn",重头戏:"zhòng tóu xì",二人转:"èr rén zhuàn",节骨眼:"jiē gǔ yǎn",知识面:"zhī shi miàn",护士长:"hù shi zhǎng",信号弹:"xìn hào dàn",干电池:"gān diàn chí",枪杆子:"qiāng gǎn zi",哭丧棒:"kū sāng bàng",鼻咽癌:"bí yān ái",瓦岗军:"wǎ gāng jūn",买得起:"mǎi de qǐ",癞蛤蟆:"lài há ma",脊梁骨:"jǐ liang gǔ",子母弹:"zǐ mǔ dàn",开小差:"kāi xiǎo chāi",女强人:"nǚ qiáng rén",英雄传:"yīng xióng zhuàn",爵士乐:"jué shì yuè",说笑话:"shuō xiào hua",碰头会:"pèng tóu huì",玻璃钢:"bō li gāng",曳光弹:"yè guāng dàn",少林拳:"shào lín quán",咏叹调:"yǒng tàn diào",少先队:"shào xiān duì",灵长目:"líng zhǎng mù",对着干:"duì zhe gàn",蒙蒙亮:"méng méng liàng",软骨头:"ruǎn gǔ tou",铺盖卷:"pū gài juǎn",和稀泥:"huò xī ní",背黑锅:"bēi hēi guō",红彤彤:"hóng tōng tōng",武侯祠:"wǔ hóu cí",打哆嗦:"dǎ duō suo",户口簿:"hù kǒu bù",马尾藻:"mǎ wěi zǎo",夜猫子:"yè māo zi",打手势:"dǎ shǒu shì",龙王爷:"lóng wáng yé",气头上:"qì tóu shang",糊涂虫:"hú tu chóng",笔杆子:"bǐ gǎn zi",占便宜:"zhàn pián yi",打主意:"dǎ zhǔ yì",多弹头:"duō dàn tóu",露一手:"lòu yì shǒu",堰塞湖:"yàn sè hú",保得住:"bǎo de zhù",趵突泉:"bào tū quán",奥得河:"ào de hé",司务长:"sī wù zhǎng",禁不起:"jīn bù qǐ",什刹海:"shí chà hǎi",莲花落:"lián huā lào",见世面:"jiàn shì miàn",豁出去:"huō chū qù",电位差:"diàn wèi chā",挨个儿:"āi gè er",那阵儿:"nà zhèn er",肺活量:"fèi huó liàng",大师傅:"dà shī fu",掷弹筒:"zhì dàn tǒng",打呼噜:"dǎ hū lu",广渠门:"ān qú mén",未见得:"wèi jiàn dé",大婶儿:"dà shěn er",谈得来:"tán de lái",脚丫子:"jiǎo yā zi",空包弹:"kōng bāo dàn",窝里斗:"wō li dòu",弹着点:"dàn zhuó diǎn",个头儿:"gè tóu er",看得起:"kàn de qǐ",糊涂账:"hú tu zhàng",大猩猩:"dà xīng xing",禁得起:"jīn de qǐ",法相宗:"fǎ xiàng zōng",可怜相:"kě lián xiàng",吃得下:"chī de xià",汉堡包:"hàn bǎo bāo",闹嚷嚷:"nào rāng rāng",数来宝:"shǔ lái bǎo",合得来:"hé de lái",干性油:"gān xìng yóu",闷葫芦:"mèn hú lu",呱呱叫:"guā guā jiào",西洋参:"xī yáng shēn",林荫道:"lín yīn dào",拉家常:"lā jiā cháng",卷铺盖:"juǎn pū gài",过得硬:"guò de yìng",飞将军:"fēi jiāng jūn",挑大梁:"tiǎo dà liáng",哈巴狗:"hǎ ba gǒu",过家家:"guò jiā jiā",催泪弹:"cuī lèi dàn",雨夹雪:"yǔ jiā xuě",敲竹杠:"qiāo zhú gàng",列车长:"liè chē zhǎng",华达呢:"huá dá ní",犯得着:"fàn de zháo",土疙瘩:"tǔ gē da",煞风景:"shā fēng jǐng",轻量级:"qīng liàng jí",羞答答:"xiū dā dā",石子儿:"shí zǐ er",达姆弹:"dá mǔ dàn",科教片:"kē jiào piān",侃大山:"kǎn dà shān",丁点儿:"dīng diǎn er",吃得消:"chī de xiāo",捋虎须:"luō hǔ xū",高丽参:"gāo lí shēn",众生相:"zhòng shēng xiàng",咽峡炎:"yān xiá yán",禁得住:"jīn de zhù",吃得开:"chī de kāi",柞丝绸:"zuò sī chóu",应声虫:"yìng shēng chóng",数得着:"shǔ de zháo",傻劲儿:"shǎ jìn er",铅玻璃:"qiān bō li",可的松:"kě dì sōng",划得来:"huá de lái",晕乎乎:"yūn hū hū",屎壳郎:"shǐ ke làng",尥蹶子:"liào juě zi",藏红花:"zàng hóng huā",闷罐车:"mèn guàn chē",卡脖子:"qiǎ bó zi",红澄澄:"hóng deng deng",赶得及:"gǎn de jí",当间儿:"dāng jiàn er",露马脚:"lòu mǎ jiǎo",鸡内金:"jī nèi jīn",犯得上:"fàn de shàng",钉齿耙:"dīng chǐ bà",饱和点:"bǎo hé diǎn",龙爪槐:"lóng zhǎo huái",喝倒彩:"hè dào cǎi",定冠词:"dìng guàn cí",担担面:"dàn dan miàn",吃得住:"chī de zhù",爪尖儿:"zhuǎ jiān er",支着儿:"zhī zhāo er",折跟头:"zhē gēn tou",阴着儿:"yīn zhāo er",烟卷儿:"yān juǎn er",宣传弹:"xuān chuán dàn",信皮儿:"xìn pí er",弦切角:"xián qiē jiǎo",缩砂密:"sù shā mì",说得来:"shuō de lái",水漂儿:"shuǐ piāo er",耍笔杆:"shuǎ bǐ gǎn",数得上:"shǔ de shàng",数不着:"shǔ bù zháo",数不清:"shǔ bù qīng",什件儿:"shí jiàn er",生死簿:"shēng sǐ bù",扇风机:"shān fēng jī",撒呓挣:"sā yì zheng",日记簿:"rì jì bù",热得快:"rè de kuài",亲家公:"qìng jia gōng",奇函数:"jī hán shù",拍纸簿:"pāi zhǐ bù",努劲儿:"nǔ jìn er",泥娃娃:"ní wá wa",内切圆:"nèi qiē yuán",哪会儿:"nǎ huì er",闷头儿:"mēn tóu er",没谱儿:"méi pǔ er",铆劲儿:"mǎo jìn er",溜肩膀:"liū jiān bǎng",了望台:"liào wàng tái",老来少:"lǎo lái shào",坤角儿:"kūn jué er",考勤簿:"kǎo qín bù",卷笔刀:"juǎn bǐ dāo",进给量:"jìn jǐ liàng",划不来:"huá bù lái",汗褂儿:"hàn guà er",鼓囊囊:"gǔ nāng nāng",够劲儿:"gòu jìn er",公切线:"gōng qiē xiàn",搁得住:"gé de zhù",赶浪头:"gǎn làng tóu",赶得上:"gǎn de shàng",干酵母:"gān jiào mǔ",嘎渣儿:"gā zhā er",嘎嘣脆:"gā bēng cuì",对得住:"duì de zhù",逗闷子:"dòu mèn zi",顶呱呱:"dǐng guā guā",滴溜儿:"dī liù er",大轴子:"dà zhòu zi",打板子:"dǎ bǎn zi",寸劲儿:"cùn jìn er",醋劲儿:"cù jìn er",揣手儿:"chuāi shǒu er",冲劲儿:"chòng jìn er",吃得来:"chī de lái",不更事:"bù gēng shì",奔头儿:"bèn tou er",百夫长:"bǎi fū zhǎng",娃娃亲:"wá wa qīn",死劲儿:"sǐ jìn er",骨朵儿:"gū duǒ er",功劳簿:"gōng láo bù",都江堰:"dū jiāng yàn",一担水:"yí dàn shuǐ",否极泰:"pǐ jí tài",泰来否:"tài lái pǐ",咳特灵:"ké tè líng",开户行:"kāi hù háng",郦食其:"lì yì jī",花事了:"huā shì liǎo",一更更:"yì gēng gēng",一重山:"yì chóng shān",风一更:"fēng yì gēng",雪一更:"xuě yì gēng",归一码:"guī yì mǎ",星期一:"xīng qī yī",礼拜一:"lǐ bài yī",一季度:"yī jì dù",一月一:"yī yuè yī",一字马:"yī zì mǎ",一是一:"yī shì yī",一次方:"yī cì fāng",一阳指:"yī yáng zhǐ",一字决:"yī zì jué",一年级:"yī nián jí",一不做:"yī bú zuò",屈戌儿:"qū qu ér",难为水:"nán wéi shuǐ",难为情:"nán wéi qíng",行一行:"xíng yì háng",别别的:"biè bié de",干哪行:"gàn nǎ háng",干一行:"gàn yì háng",曲别针:"qū bié zhēn"},zle=Object.keys(yS).map(e=>({zh:e,pinyin:yS[e],probability:2e-8,length:3,priority:Yr.Normal,dict:Symbol("dict3")})),kS={成吉思汗:"chéng jí sī hán",四通八达:"sì tōng bā dá",一模一样:"yì mú yí yàng",青藏高原:"qīng zàng gāo yuán",阿弥陀佛:"ē mí tuó fó",解放思想:"jiè fàng sī xiǎng",所作所为:"suǒ zuò suǒ wéi",迷迷糊糊:"mí mí hu hū",荷枪实弹:"hè qiāng shí dàn",兴高采烈:"xìng gāo cǎi liè",无能为力:"wú néng wéi lì",布鲁塞尔:"bù lǔ sài ěr",为所欲为:"wéi suǒ yù wéi",克什米尔:"kè shí mǐ ěr",没完没了:"méi wán méi liǎo",不为人知:"bù wéi rén zhī",结结巴巴:"jiē jiē bā bā",前仆后继:"qián pū hòu jì",铺天盖地:"pū tiān gài dì",直截了当:"zhí jié liǎo dàng",供不应求:"gōng bú yìng qiú",御史大夫:"yù shǐ dà fū",不为瓦全:"bù wéi wǎ quán",不可收拾:"bù kě shōu shi",胡作非为:"hú zuò fēi wéi",分毫不差:"fēn háo bú chà",模模糊糊:"mó mó hu hū",不足为奇:"bù zú wéi qí",悄无声息:"qiǎo wú shēng xī",了如指掌:"liǎo rú zhǐ zhǎng",深恶痛绝:"shēn wù tòng jué",高高兴兴:"gāo gāo xìng xìng",唉声叹气:"āi shēng tàn qì",汉藏语系:"hàn zàng yǔ xì",处心积虑:"chǔ xīn jī lǜ",泣不成声:"qì bù chéng shēng",半夜三更:"bàn yè sān gēng",失魂落魄:"shī hún luò pò",二十八宿:"èr shí bā xiù",转来转去:"zhuàn lái zhuàn qù",数以万计:"shǔ yǐ wàn jì",相依为命:"xiāng yī wéi mìng",恋恋不舍:"liàn liàn bù shě",屈指可数:"qū zhǐ kě shǔ",神出鬼没:"shén chū guǐ mò",结结实实:"jiē jiē shí shí",有的放矢:"yǒu dì fàng shǐ",叽哩咕噜:"jī lǐ gū lū",调兵遣将:"diào bīng qiǎn jiàng",载歌载舞:"zài gē zài wǔ",转危为安:"zhuǎn wēi wéi ān",踏踏实实:"tā tā shi shí",桑给巴尔:"sāng jǐ bā ěr",装模作样:"zhuāng mú zuò yàng",见义勇为:"jiàn yì yǒng wéi",相差无几:"xiāng chā wú jǐ",叹为观止:"tàn wéi guān zhǐ",闷闷不乐:"mèn mèn bú lè",喜怒哀乐:"xǐ nù āi lè",鲜为人知:"xiǎn wéi rén zhī",张牙舞爪:"zhāng yá wǔ zhǎo",为非作歹:"wéi fēi zuò dǎi",含糊其辞:"hán hú qí cí",疲于奔命:"pí yú bēn mìng",勉为其难:"miǎn wéi qí nán",依依不舍:"yī yī bù shě",顶头上司:"dǐng tóu shàng si",不着边际:"bù zhuó biān jì",大模大样:"dà mú dà yàng",寻欢作乐:"xún huān zuò lè",一走了之:"yì zǒu liǎo zhī",字里行间:"zì lǐ háng jiān",含含糊糊:"hán hán hu hū",恰如其分:"qià rú qí fèn",破涕为笑:"pò tì wéi xiào",深更半夜:"shēn gēng bàn yè",千差万别:"qiān chā wàn bié",数不胜数:"shǔ bú shèng shǔ",据为己有:"jù wéi jǐ yǒu",天旋地转:"tiān xuán dì zhuàn",养尊处优:"yǎng zūn chǔ yōu",玻璃纤维:"bō li xiān wéi",吵吵闹闹:"chāo chao nào nào",晕头转向:"yūn tóu zhuàn xiàng",土生土长:"tǔ shēng tǔ zhǎng",宁死不屈:"nìng sǐ bù qū",不省人事:"bù xǐng rén shì",尽力而为:"jìn lì ér wéi",精明强干:"jīng míng qiáng gàn",唠唠叨叨:"láo lao dāo dāo",叽叽喳喳:"jī ji zhā zhā",功不可没:"gōng bù kě mò",锲而不舍:"qiè ér bù shě",排忧解难:"pái yōu jiě nàn",稀里糊涂:"xī li hú tú",各有所长:"gè yǒu suǒ cháng",的的确确:"dí dí què què",哄堂大笑:"hōng táng dà xiào",听而不闻:"tīng ér bù wén",刀耕火种:"dāo gēng huǒ zhòng",内分泌腺:"nèi fèn mì xiàn",化险为夷:"huà xiǎn wéi yí",百发百中:"bǎi fā bǎi zhòng",重见天日:"chóng jiàn tiān rì",反败为胜:"fǎn bài wéi shèng",一了百了:"yì liǎo bǎi liǎo",大大咧咧:"dà da liē liē",心急火燎:"xīn jí huǒ liǎo",粗心大意:"cū xīn dà yi",鸡皮疙瘩:"jī pí gē da",夷为平地:"yí wéi píng dì",日积月累:"rì jī yuè lěi",设身处地:"shè shēn chǔ dì",投其所好:"tóu qí suǒ hào",间不容发:"jiān bù róng fà",人满为患:"rén mǎn wéi huàn",穷追不舍:"qióng zhuī bù shě",为时已晚:"wéi shí yǐ wǎn",如数家珍:"rú shǔ jiā zhēn",心里有数:"xīn lǐ yǒu shù",以牙还牙:"yǐ yá huán yá",神不守舍:"shén bù shǒu shě",孟什维克:"mèng shí wéi kè",各自为战:"gè zì wéi zhàn",怨声载道:"yuàn shēng zài dào",救苦救难:"jiù kǔ jiù nàn",好好先生:"hǎo hǎo xiān sheng",怪模怪样:"guài mú guài yàng",抛头露面:"pāo tóu lù miàn",游手好闲:"yóu shǒu hào xián",无所不为:"wú suǒ bù wéi",调虎离山:"diào hǔ lí shān",步步为营:"bù bù wéi yíng",好大喜功:"hào dà xǐ gōng",众矢之的:"zhòng shǐ zhī dì",长生不死:"cháng shēng bù sǐ",蔚为壮观:"wèi wéi zhuàng guān",不可胜数:"bù kě shèng shǔ",鬼使神差:"guǐ shǐ shén chāi",洁身自好:"jié shēn zì hào",敢作敢为:"gǎn zuò gǎn wéi",茅塞顿开:"máo sè dùn kāi",走马换将:"zǒu mǎ huàn jiàng",为时过早:"wéi shí guò zǎo",为人师表:"wéi rén shī biǎo",阴差阳错:"yīn chā yáng cuò",油腔滑调:"yóu qiāng huá diào",重蹈覆辙:"chóng dǎo fù zhé",骂骂咧咧:"mà ma liē liē",絮絮叨叨:"xù xù dāo dāo",如履薄冰:"rú lǚ bó bīng",损兵折将:"sǔn bīng zhé jiàng",拐弯抹角:"guǎi wān mò jiǎo",像模像样:"xiàng mú xiàng yàng",供过于求:"gōng guò yú qiú",开花结果:"kāi huā jiē guǒ",仔仔细细:"zǐ zǐ xì xì",川藏公路:"chuān zàng gōng lù",河北梆子:"hé běi bāng zi",长年累月:"cháng nián lěi yuè",正儿八经:"zhèng er bā jīng",不识抬举:"bù shí tái ju",重振旗鼓:"chóng zhèn qí gǔ",气息奄奄:"qì xī yān yān",紧追不舍:"jǐn zhuī bù shě",服服帖帖:"fú fu tiē tiē",强词夺理:"qiǎng cí duó lǐ",噼里啪啦:"pī li pā lā",人才济济:"rén cái jǐ jǐ",发人深省:"fā rén shēn xǐng",不足为凭:"bù zú wéi píng",为富不仁:"wéi fù bù rén",连篇累牍:"lián piān lěi dú",呼天抢地:"hū tiān qiāng dì",落落大方:"luò luò dà fāng",自吹自擂:"zì chuī zì léi",乐善好施:"lè shàn hào shī",以攻为守:"yǐ gōng wéi shǒu",磨磨蹭蹭:"mó mó cèng cèng",削铁如泥:"xuē tiě rú ní",助纣为虐:"zhù zhòu wéi nüè",以退为进:"yǐ tuì wéi jìn",嘁嘁喳喳:"qī qī chā chā",枪林弹雨:"qiāng lín dàn yǔ",令人发指:"lìng rén fà zhǐ",转败为胜:"zhuǎn bài wéi shèng",转弯抹角:"zhuǎn wān mò jiǎo",在劫难逃:"zài jié nán táo",正当防卫:"zhèng dàng fáng wèi",不足为怪:"bù zú wéi guài",难兄难弟:"nàn xiōng nàn dì",咿咿呀呀:"yī yī yā yā",弹尽粮绝:"dàn jìn liáng jué",阿谀奉承:"ē yú fèng chéng",稀里哗啦:"xī li huā lā",返老还童:"fǎn lǎo huán tóng",好高骛远:"hào gāo wù yuǎn",鹿死谁手:"lù sǐ shéi shǒu",差强人意:"chā qiáng rén yì",大吹大擂:"dà chuī dà léi",成家立业:"chéng jiā lì yè",自怨自艾:"zì yuàn zì yì",负债累累:"fù zhài lěi lěi",古为今用:"gǔ wéi jīn yòng",入土为安:"rù tǔ wéi ān",下不为例:"xià bù wéi lì",一哄而上:"yì hōng ér shàng",没头苍蝇:"méi tóu cāng ying",天差地远:"tiān chā dì yuǎn",风卷残云:"fēng juǎn cán yún",多灾多难:"duō zāi duō nàn",乳臭未干:"rǔ xiù wèi gān",行家里手:"háng jiā lǐ shǒu",狼狈为奸:"láng bèi wéi jiān",处变不惊:"chǔ biàn bù jīng",一唱一和:"yí chàng yí hè",一念之差:"yí niàn zhī chā",金蝉脱壳:"jīn chán tuō qiào",滴滴答答:"dī dī dā dā",硕果累累:"shuò guǒ léi léi",好整以暇:"hào zhěng yǐ xiá",红得发紫:"hóng de fā zǐ",传为美谈:"chuán wéi měi tán",富商大贾:"fù shāng dà gǔ",四海为家:"sì hǎi wéi jiā",了若指掌:"liǎo ruò zhǐ zhǎng",大有可为:"dà yǒu kě wéi",出头露面:"chū tóu lù miàn",鼓鼓囊囊:"gǔ gu nāng nāng",窗明几净:"chuāng míng jī jìng",泰然处之:"tài rán chǔ zhī",怒发冲冠:"nù fà chōng guān",有机玻璃:"yǒu jī bō li",骨头架子:"gǔ tou jià zi",义薄云天:"yì bó yún tiān",一丁点儿:"yī dīng diǎn er",时来运转:"shí lái yùn zhuǎn",陈词滥调:"chén cí làn diào",化整为零:"huà zhěng wéi líng",火烧火燎:"huǒ shāo huǒ liǎo",干脆利索:"gàn cuì lì suǒ",吊儿郎当:"diào er láng dāng",广种薄收:"guǎng zhòng bó shōu",种瓜得瓜:"zhòng guā dé guā",种豆得豆:"zhòng dòu dé dòu",难舍难分:"nán shě nán fēn",歃血为盟:"shà xuè wéi méng",奋发有为:"fèn fā yǒu wéi",阴错阳差:"yīn cuò yáng chā",东躲西藏:"dōng duǒ xī cáng",烟熏火燎:"yān xūn huǒ liǎo",钻牛角尖:"zuān niú jiǎo jiān",乔装打扮:"qiáo zhuāng dǎ bàn",改弦更张:"gǎi xián gēng zhāng",河南梆子:"hé nán bāng zi",好吃懒做:"hào chī lǎn zuò",何乐不为:"hé lè bù wéi",大出风头:"dà chū fēng tóu",攻城掠地:"gōng chéng lüè dì",漂漂亮亮:"piào piào liang liang",折衷主义:"zhé zhōng zhǔ yì",大马哈鱼:"dà mǎ hǎ yú",绿树成荫:"lǜ shù chéng yīn",率先垂范:"shuài xiān chuí fàn",家长里短:"jiā cháng lǐ duǎn",宽大为怀:"kuān dà wéi huái",左膀右臂:"zuǒ bǎng yòu bì",一笑了之:"yí xiào liǎo zhī",天下为公:"tiān xià wéi gōng",还我河山:"huán wǒ hé shān",何足为奇:"hé zú wéi qí",好自为之:"hǎo zì wéi zhī",风姿绰约:"fēng zī chuò yuē",大雨滂沱:"dà yǔ pāng tuó",传为佳话:"chuán wéi jiā huà",吃里扒外:"chī lǐ pá wài",重操旧业:"chóng cāo jiù yè",小家子气:"xiǎo jiā zi qì",少不更事:"shào bù gēng shì",难分难舍:"nán fēn nán shě",添砖加瓦:"tiān zhuān jiā wǎ",是非分明:"shì fēi fēn míng",舍我其谁:"shě wǒ qí shuí",偏听偏信:"piān tīng piān xìn",量入为出:"liàng rù wéi chū",降龙伏虎:"xiáng lóng fú hǔ",钢化玻璃:"gāng huà bō li",正中下怀:"zhèng zhòng xià huái",以身许国:"yǐ shēn xǔ guó",一语中的:"yì yǔ zhòng dì",丧魂落魄:"sàng hún luò pò",三座大山:"sān zuò dà shān",济济一堂:"jǐ jǐ yì táng",好事之徒:"hào shì zhī tú",干净利索:"gàn jìng lì suǒ",出将入相:"chū jiàng rù xiàng",袅袅娜娜:"niǎo niǎo nuó nuó",狐狸尾巴:"hú li wěi ba",好逸恶劳:"hào yì wù láo",大而无当:"dà ér wú dàng",打马虎眼:"dǎ mǎ hu yǎn",板上钉钉:"bǎn shàng dìng dīng",吆五喝六:"yāo wǔ hè liù",虾兵蟹将:"xiā bīng xiè jiàng",水调歌头:"shuǐ diào gē tóu",数典忘祖:"shǔ diǎn wàng zǔ",人事不省:"rén shì bù xǐng",曲高和寡:"qǔ gāo hè guǎ",屡教不改:"lǚ jiào bù gǎi",互为因果:"hù wéi yīn guǒ",互为表里:"hù wéi biǎo lǐ",厚此薄彼:"hòu cǐ bó bǐ",过关斩将:"guò guān zhǎn jiàng",疙疙瘩瘩:"gē ge dā dā",大腹便便:"dà fù pián pián",走为上策:"zǒu wéi shàng cè",冤家对头:"yuān jia duì tóu",有隙可乘:"yǒu xì kě chèng",一鳞半爪:"yì lín bàn zhǎo",片言只语:"piàn yán zhǐ yǔ",开花结实:"kāi huā jié shí",经年累月:"jīng nián lěi yuè",含糊其词:"hán hú qí cí",寡廉鲜耻:"guǎ lián xiǎn chǐ",成年累月:"chéng nián lěi yuè",不徇私情:"bú xùn sī qíng",不当人子:"bù dāng rén zǐ",膀大腰圆:"bǎng dà yāo yuán",指腹为婚:"zhǐ fù wéi hūn",这么点儿:"zhè me diǎn er",意兴索然:"yì xīng suǒ rán",绣花枕头:"xiù huā zhěn tou",无的放矢:"wú dì fàng shǐ",望闻问切:"wàng wén wèn qiè",舍己为人:"shě jǐ wèi rén",穷年累月:"qióng nián lěi yuè",排难解纷:"pái nàn jiě fēn",处之泰然:"chǔ zhī tài rán",指鹿为马:"zhǐ lù wéi mǎ",危如累卵:"wēi rú lěi luǎn",天兵天将:"tiān bīng tiān jiàng",舍近求远:"shě jìn qiú yuǎn",南腔北调:"nán qiāng běi diào",苦中作乐:"kǔ zhōng zuò lè",厚积薄发:"hòu jī bó fā",臭味相投:"xiù wèi xiāng tóu",长幼有序:"zhǎng yòu yǒu xù",逼良为娼:"bī liáng wéi chāng",悲悲切切:"bēi bēi qiè qiē",败军之将:"bài jūn zhī jiàng",欺行霸市:"qī háng bà shì",削足适履:"xuē zú shì lǚ",先睹为快:"xiān dǔ wéi kuài",啼饥号寒:"tí jī háo hán",疏不间亲:"shū bú jiàn qīn",神差鬼使:"shén chāi guǐ shǐ",敲敲打打:"qiāo qiāo dǎ dǎ",平铺直叙:"píng pū zhí xù",没头没尾:"méi tóu mò wěi",寥寥可数:"liáo liáo kě shǔ",哼哈二将:"hēng hā èr jiàng",鹤发童颜:"hè fà tóng yán",各奔前程:"gè bèn qián chéng",弹无虚发:"dàn wú xū fā",大人先生:"dà rén xiān sheng",与民更始:"yǔ mín gēng shǐ",树碑立传:"shù bēi lì zhuàn",是非得失:"shì fēi dé shī",实逼处此:"shí bī chǔ cǐ",塞翁失马:"sài wēng shī mǎ",日薄西山:"rì bó xī shān",切身体会:"qiè shēn tǐ huì",片言只字:"piàn yán zhǐ zì",跑马卖解:"pǎo mǎ mài xiè",宁折不弯:"nìng zhé bù wān",零零散散:"líng líng sǎn sǎn",量体裁衣:"liàng tǐ cái yī",连中三元:"lián zhòng sān yuán",礼崩乐坏:"lǐ bēng yuè huài",不为已甚:"bù wéi yǐ shèn",转悲为喜:"zhuǎn bēi wéi xǐ",以眼还眼:"yǐ yǎn huán yǎn",蔚为大观:"wèi wéi dà guān",未为不可:"wèi wéi bù kě",童颜鹤发:"tóng yán hè fà",朋比为奸:"péng bǐ wéi jiān",莫此为甚:"mò cǐ wéi shèn",夹枪带棒:"jiā qiāng dài bàng",富商巨贾:"fù shāng jù jiǎ",淡然处之:"dàn rán chǔ zhī",箪食壶浆:"dān shí hú jiāng",创巨痛深:"chuāng jù tòng shēn",草长莺飞:"cǎo zhǎng yīng fēi",坐视不救:"zuò shī bú jiù",以己度人:"yǐ jǐ duó rén",随行就市:"suí háng jiù shì",文以载道:"wén yǐ zài dào",文不对题:"wén bú duì tí",铁板钉钉:"tiě bǎn dìng dīng",身体发肤:"shēn tǐ fà fū",缺吃少穿:"quē chī shǎo chuān",目无尊长:"mù wú zūn zhǎng",吉人天相:"jí rén tiān xiàng",毁家纾难:"huǐ jiā shū nàn",钢筋铁骨:"gāng jīn tiě gǔ",丢卒保车:"diū zú bǎo jū",丢三落四:"diū sān là sì",闭目塞听:"bì mù sè tīng",削尖脑袋:"xuē jiān nǎo dài",为非作恶:"wéi fēi zuò è",人才难得:"rén cái nán dé",情非得已:"qíng fēi dé yǐ",切中要害:"qiè zhòng yào hài",火急火燎:"huǒ jí huǒ liǎo",画地为牢:"huà dì wéi láo",好酒贪杯:"hào jiǔ tān bēi",长歌当哭:"cháng gē dàng kū",载沉载浮:"zài chén zài fú",遇难呈祥:"yù nàn chéng xiáng",榆木疙瘩:"yú mù gē da",以邻为壑:"yǐ lín wéi hè",洋为中用:"yáng wéi zhōng yòng",言为心声:"yán wéi xīn shēng",言必有中:"yán bì yǒu zhòng",图穷匕见:"tú qióng bǐ xiàn",滂沱大雨:"páng tuó dà yǔ",目不暇给:"mù bù xiá jǐ",量才录用:"liàng cái lù yòng",教学相长:"jiào xué xiāng zhǎng",悔不当初:"huǐ bù dāng chū",呼幺喝六:"hū yāo hè liù",不足为训:"bù zú wéi xùn",不拘形迹:"bù jū xíng jī",傍若无人:"páng ruò wú rén",罪责难逃:"zuì zé nán táo",自我吹嘘:"zì wǒ chuī xū",转祸为福:"zhuǎn huò wéi fú",勇冠三军:"yǒng guàn sān jūn",易地而处:"yì dì ér chǔ",卸磨杀驴:"xiè mò shā lǘ",玩儿不转:"wán ér bú zhuàn",天道好还:"tiān dào hǎo huán",身单力薄:"shēn dān lì bó",撒豆成兵:"sǎ dòu chéng bīng",片纸只字:"piàn zhǐ zhī zì",宁缺毋滥:"nìng quē wú làn",没没无闻:"mò mò wú wén",量力而为:"liàng lì ér wéi",历历可数:"lì lì kě shǔ",口碑载道:"kǒu bēi zài dào",君子好逑:"jūn zǐ hǎo qiú",好为人师:"hào wéi rén shī",豪商巨贾:"háo shāng jù jiǎ",各有所好:"gè yǒu suǒ hào",度德量力:"duó dé liàng lì",指天为誓:"zhǐ tiān wéi shì",逸兴遄飞:"yì xìng chuán fēi",心宽体胖:"xīn kuān tǐ pán",为德不卒:"wéi dé bù zú",天下为家:"tiān xià wéi jiā",视为畏途:"shì wéi wèi tú",三灾八难:"sān zāi bā nàn",沐猴而冠:"mù hóu ér guàn",哩哩啦啦:"lī li lā lā",见缝就钻:"jiàn fèng jiù zuān",夹层玻璃:"jiā céng bō li",急公好义:"jí gōng hào yì",积年累月:"jī nián lěi yuè",划地为牢:"huá dì wéi láo",更名改姓:"gēng míng gǎi xìng",奉为圭臬:"fèng wéi guī niè",多难兴邦:"duō nàn xīng bāng",不破不立:"bú pò bú lì",坐地自划:"zuò dì zì huá",坐不重席:"zuò bù chóng xí",坐不窥堂:"zuò bù kuī táng",作嫁衣裳:"zuò jià yī shang",左枝右梧:"zuǒ zhī yòu wú",左宜右有:"zuǒ yí yòu yǒu",钻头觅缝:"zuān tóu mì fèng",钻天打洞:"zuān tiān dǎ dòng",钻皮出羽:"zuān pí chū yǔ",钻火得冰:"zuān huǒ dé bīng",钻洞觅缝:"zuàn dòng mì féng",钻冰求火:"zuān bīng qiú huǒ",子为父隐:"zǐ wéi fù yǐn",擢发难数:"zhuó fà nán shǔ",着人先鞭:"zhuó rén xiān biān",斫雕为朴:"zhuó diāo wéi pǔ",锥处囊中:"zhuī chǔ náng zhōng",椎心饮泣:"chuí xīn yǐn qì",椎心泣血:"chuí xīn qì xuè",椎牛飨士:"chuí niú xiǎng shì",椎牛歃血:"chuí niú shà xuè",椎牛发冢:"chuí niú fà zhǒng",椎埋屠狗:"chuí mái tú gǒu",椎埋狗窃:"chuí mái gǒu qiè",壮发冲冠:"zhuàng fā chōng guàn",庄严宝相:"zhuāng yán bǎo xiàng",转愁为喜:"zhuǎn chóu wéi xǐ",转嗔为喜:"zhuǎn chēn wéi xǐ",拽巷啰街:"zhuài xiàng luó jiē",拽耙扶犁:"zhuāi pá fú lí",拽布拖麻:"zhuài bù tuō má",箸长碗短:"zhù cháng wǎn duǎn",铸剑为犁:"zhù jiàn wéi lí",杼柚其空:"zhù yòu qí kōng",杼柚空虚:"zhù yòu kōng xū",助天为虐:"zhù tiān wéi nüè",属垣有耳:"zhǔ yuán yǒu ěr",属毛离里:"zhǔ máo lí lǐ",属辞比事:"zhǔ cí bǐ shì",逐物不还:"zhú wù bù huán",铢量寸度:"zhū liáng cùn duó",铢两悉称:"zhū liǎng xī chèn",侏儒观戏:"zhū rú guān xì",朱轓皁盖:"zhū fān zào gài",昼度夜思:"zhòu duó yè sī",诪张为幻:"zhōu zhāng wéi huàn",重明继焰:"chóng míng jì yàn",众啄同音:"zhòng zhuó tóng yīn",众毛攒裘:"zhòng máo cuán qiú",众好众恶:"zhòng hào zhòng wù",擿埴索涂:"zhāi zhí suǒ tú",稚齿婑媠:"zhì chǐ wǒ tuó",至当不易:"zhì dàng bú yì",指皂为白:"zhǐ zào wéi bái",指雁为羹:"zhǐ yàn wéi gēng",指树为姓:"zhǐ shù wéi xìng",指山说磨:"zhǐ shān shuō mò",止戈为武:"zhǐ gē wéi wǔ",枝干相持:"zhī gàn xiāng chí",枝大于本:"zh dà yú běn",支吾其词:"zhī wú qí cí",正身率下:"zhèng shēn shuài xià",正冠李下:"zhèng guàn lǐ xià",整冠纳履:"zhěng guān nà lǚ",整躬率物:"zhěng gōng shuài wù",整顿干坤:"zhěng dùn gàn kūn",针头削铁:"zhēn tóu xuē tiě",贞松劲柏:"zhēn sōng jìng bǎi",赭衣塞路:"zhě yī sè lù",折箭为誓:"shé jiàn wéi shì",折而族之:"zhé ér zú zhī",昭德塞违:"zhāo dé sè wéi",章句小儒:"zhāng jù xiǎo rú",湛恩汪濊:"zhàn ēn wāng huì",占风望气:"zhān fēng wàng qì",斩将搴旗:"zhǎn jiàng qiān qí",曾母投杼:"zēng mǔ tóu zhù",曾参杀人:"zēng shēn shā rén",造谣中伤:"zào yáo zhòng shāng",早占勿药:"zǎo zhān wù yào",凿龟数策:"záo guī shǔ cè",攒三聚五:"cuán sān jù wǔ",攒眉蹙额:"cuán mei cù é",攒零合整:"cuán líng hé zhěng",攒锋聚镝:"cuán fēng jù dí",载笑载言:"zài xiào zài yán",载酒问字:"zài jiǔ wèn zì",殒身不恤:"yǔn shēn bú xù",云舒霞卷:"yún shū xiá juǎn",月中折桂:"yuè zhōng shé guì",月落参横:"yuè luò shēn héng",鬻驽窃价:"yù nú qiè jià",鬻鸡为凤:"yù jī wéi fèng",遇难成祥:"yù nàn chéng xiáng",郁郁累累:"yù yù lěi lěi",玉卮无当:"yù zhī wú dàng",语笑喧阗:"yǔ xiào xuān tián",与世沉浮:"yǔ shì chén fú",与时消息:"yǔ shí xiāo xi",逾墙钻隙:"yú qiáng zuān xì",渔夺侵牟:"yú duó qīn móu",杅穿皮蠹:"yú chuān pí dù",余勇可贾:"yú yǒng kě gǔ",予智予雄:"yú zhì yú xióng",予取予求:"yú qǔ yú qiú",于家为国:"yú jiā wéi guó",有借无还:"yǒu jiè wú huán",有加无已:"yǒu jiā wú yǐ",有国难投:"yǒu guó nán tóu",游必有方:"yóu bì yǒu fāng",油干灯尽:"yóu gàn dēng jìn",尤云殢雨:"yóu yún tì yǔ",庸中皦皦:"yōng zhōng jiǎo jiǎo",郢书燕说:"yǐng shū yān shuō",营蝇斐锦:"yíng yíng fēi jǐn",鹰心雁爪:"yīng xīn yàn zhǎo",莺吟燕儛:"yīng yín yàn wǔ",应天顺时:"yīng tiān shùn shí",印累绶若:"yìn léi shòu ruò",隐占身体:"yǐn zhàn shēn tǐ",饮犊上流:"yìn dú shàng liú",引绳切墨:"yǐn shéng qiē mò",龈齿弹舌:"yín chǐ dàn shé",因缘为市:"yīn yuán wéi shì",因树为屋:"yīn shù wéi wū",溢美溢恶:"yì měi yì wù",抑塞磊落:"yì sè lěi luò",倚闾望切:"yǐ lǘ wàng qiē",以意为之:"yǐ yì wéi zhī",以言为讳:"yǐ yán wéi huì",以疏间亲:"yǐ shū jiàn qīn",以水济水:"yǐ shuǐ jǐ shuǐ",以书为御:"yǐ shū wéi yù",以守为攻:"yǐ shǒu wéi gōng",以升量石:"yǐ shēng liáng dàn",以慎为键:"yǐ shèn wéi jiàn",以筌为鱼:"yǐ quán wéi yú",以利累形:"yǐ lì lěi xíng",以毁为罚:"yǐ huǐ wéi fá",以黑为白:"yǐ hēi wéi bái",以规为瑱:"yǐ guī wéi tiàn",以古为鉴:"yǐ gǔ wéi jiàn",以宫笑角:"yǐ gōng xiào jué",以法为教:"yǐ fǎ wéi jiào",以大恶细:"yǐ dà wù xì",遗世忘累:"yí shì wàng lěi",遗寝载怀:"yí qǐn zài huái",移的就箭:"yí dì jiù jiàn",依头缕当:"yī tóu lǚ dàng",衣租食税:"yì zū shí shuì",衣轻乘肥:"yì qīng chéng féi",衣裳之会:"yī shang zhī huì",衣单食薄:"yī dān shí bó",一还一报:"yì huán yí bào",叶公好龙:"yè gōng hào lóng",野调无腔:"yě diào wú qiāng",瑶池女使:"yáo chí nǚ shǐ",幺麽小丑:"yāo mó xiǎo chǒu",养精畜锐:"yǎng jīng xù ruì",卬首信眉:"áng shǒu shēn méi",洋洋纚纚:"yáng yáng sǎ sǎ",羊羔美酒:"yáng gāo měi jiǔ",扬风扢雅:"yáng fēng jié yǎ",燕昭市骏:"yān zhāo shì jùn",燕昭好马:"yān zhāo hǎo mǎ",燕石妄珍:"yān shí wàng zhēn",燕骏千金:"yān jùn qiān jīn",燕金募秀:"yān jīn mù xiù",燕驾越毂:"yān jià yuè gǔ",燕歌赵舞:"yān gē zhào wǔ",燕岱之石:"yān dài zhī shí",燕处危巢:"yàn chǔ wēi cháo",掞藻飞声:"shàn zǎo fēi shēng",偃革为轩:"yǎn gé wéi xuān",妍蚩好恶:"yán chī hǎo è",压良为贱:"yā liáng wéi jiàn",搀行夺市:"chān háng duó shì",泣数行下:"qì shù háng xià",当行出色:"dāng háng chū sè",秀出班行:"xiù chū bān háng",儿女成行:"ér nǚ chéng háng",大行大市:"dà háng dà shì",寻行数墨:"xún háng shǔ mò",埙篪相和:"xūn chí xiāng hè",血债累累:"xuè zhài lěi lěi",炫玉贾石:"xuàn yù gǔ shí",炫石为玉:"xuàn shí wéi yù",悬石程书:"xuán dàn chéng shū",悬狟素飡:"xuán huán sù cān",悬龟系鱼:"xuán guī xì yú",揎拳捋袖:"xuān quán luō xiù",轩鹤冠猴:"xuān hè guàn hóu",畜妻养子:"xù qī yǎng zǐ",羞人答答:"xiū rén dā dā",修鳞养爪:"xiū lín yǎng zhǎo",熊据虎跱:"xióng jù hǔ zhì",兄死弟及:"xiōng sǐ dì jí",腥闻在上:"xīng wén zài shàng",兴文匽武:"xīng wén yǎn wǔ",兴观群怨:"xìng guān qún yuàn",兴高彩烈:"xìng gāo cǎi liè",心手相应:"xīn shǒu xiāng yìng",心口相应:"xīn kǒu xiāng yīng",挟势弄权:"xié shì nòng quán",胁肩累足:"xié jiān lěi zú",校短量长:"jiào duǎn liáng cháng",小眼薄皮:"xiǎo yǎn bó pí",硝云弹雨:"xiāo yún dàn yǔ",鸮鸣鼠暴:"xiāo míng shǔ bào",削株掘根:"xuē zhū jué gēn",削铁无声:"xuē tiě wú shēng",削职为民:"xuē zhí wéi mín",削木为吏:"xuē mù wéi lì",想望风褱:"xiǎng wàng fēng huái",香培玉琢:"xiang pei yu zhuó",相鼠有皮:"xiàng shǔ yǒu pí",相时而动:"xiàng shí ér dòng",相切相磋:"xiāng qiē xiāng cuō",相女配夫:"xiàng nǚ pèi fū",相门有相:"xiàng mén yǒu xiàng",挦章撦句:"xián zhāng chě jù",先我着鞭:"xiān wǒ zhuó biān",习焉不察:"xí yān bù chá",歙漆阿胶:"shè qī ē jiāo",晰毛辨发:"xī máo biàn fà",悉索薄赋:"xī suǒ bó fù",雾鳞云爪:"wù lín yún zhǎo",物稀为贵:"wù xī wéi guì",碔砆混玉:"wǔ fū hùn yù",武断专横:"wǔ duàn zhuān héng",五石六鹢:"wǔ shí liù yì",五色相宣:"wǔ sè xiāng xuān",五侯七贵:"wǔ hóu qī guì",五侯蜡烛:"wǔ hòu là zhú",五羖大夫:"wǔ gǔ dà fū",吾自有处:"wú zì yǒu chǔ",无下箸处:"wú xià zhù chǔ",无伤无臭:"wú shāng wú xiù",无能为役:"wú néng wéi yì",无寇暴死:"wú kòu bào sǐ",无孔不钻:"wú kǒng bú zuàn",无间可乘:"wú jiān kě chéng",无间冬夏:"wú jiān dōng xià",无恶不为:"wú è bù wéi",无动为大:"wú dòng wéi dà",诬良为盗:"wū liáng wéi dào",握拳透爪:"wò quán tòu zhǎo",文武差事:"wén wǔ chāi shì",委委佗佗:"wēi wēi tuó tuó",惟日为岁:"wéi rì wéi suì",帷薄不修:"wéi bó bù xiū",为善最乐:"wéi shàn zuì lè",为山止篑:"wéi shān zhǐ kuì",为仁不富:"wéi rén bú fù",为裘为箕:"wéi qiú wéi jī",为民父母:"wéi mín fù mǔ",为虺弗摧:"wéi huǐ fú cuī",为好成歉:"wéi hǎo chéng qiàn",为鬼为蜮:"wéi guǐ wéi yù",望风响应:"wàng fēng xiǎng yīng",望尘僄声:"wàng chén piào shēng",往渚还汀:"wǎng zhǔ huán tīng",王贡弹冠:"wáng gòng dàn guàn",亡国大夫:"wáng guó dà fū",万贯家私:"wàn guàn jiā sī",晚食当肉:"wǎn shí dàng ròu",晚节不保:"wǎn jié bù bǎo",玩岁愒时:"wán suì kài shí",蛙蟆胜负:"wā má shèng fù",吞言咽理:"tūn yán yàn lǐ",颓垣断堑:"tuí yuán duàn qiàn",推干就湿:"tuī gàn jiù shī",剸繁决剧:"tuán fán jué jù",团头聚面:"tuán tóu jù miàn",兔丝燕麦:"tù sī yàn mài",兔头麞脑:"tù tóu zhāng nǎo",兔葵燕麦:"tù kuí yàn mài",吐哺握发:"tǔ bǔ wò fà",投传而去:"tóu zhuàn ér qù",头没杯案:"tóu mò bēi àn",头昏脑闷:"tóu hūn nǎo mèn",头会箕敛:"tóu kuài jī liǎn",头出头没:"tóu chū tóu mò",痛自创艾:"tòng zì chuāng yì",同恶相助:"tóng wù xiāng zhù",同恶相恤:"tóng wù xiāng xù",痌瘝在抱:"tōng guān zài bào",通文调武:"tōng wén diào wǔ",停留长智:"tíng liú zhǎng zhì",铁树开华:"tiě shù kāi huā",条贯部分:"tiáo guàn bù fēn",挑牙料唇:"tiǎo yá liào chún",挑么挑六:"tiāo yāo tiāo liù",挑唇料嘴:"tiǎo chún liào zuǐ",恬不为意:"tián bù wéi yì",恬不为怪:"tián bù wéi guài",天下为笼:"tiān xià wéi lóng",天台路迷:"tiān tái lù mí",天年不遂:"tiān nián bú suì",探囊胠箧:"tàn náng qū qiè",谭言微中:"tán yán wēi zhòng",谈言微中:"tán yán wēi zhòng",狧穅及米:"shì kāng jí mǐ",随物应机:"suí wù yīng jī",搜岩采干:"sōu yán cǎi gàn",宋斤鲁削:"sòng jīn lǔ xuē",松筠之节:"sōng yún zhī jié",四亭八当:"sì tíng bā dàng",四马攒蹄:"sì mǎ cuán tí",四不拗六:"sì bú niù liù",思所逐之:"sī suǒ zhú zhī",丝恩发怨:"sī ēn fà yuàn",硕望宿德:"shuò wàng xiǔ dé",铄古切今:"shuò gǔ qiē jīn",顺风而呼:"shùn fēng ér hū",顺风吹火:"shùn fēng chuī huǒ",水中著盐:"shuǐ zhōng zhuó yán",双柑斗酒:"shuāng gān dǒu jiǔ",数米而炊:"shǔ mǐ ér chuī",数米量柴:"shǔ mǐ liáng chái",数理逻辑:"shù lǐ luó ji",数黑论黄:"shǔ hēi lùn huáng",数白论黄:"shǔ bái lùn huáng",束缊还妇:"shù yūn huán fù",束蒲为脯:"shù pú wéi pú",束椽为柱:"shù chuán wéi zhù",书缺有间:"shū quē yǒu jiàn",手足重茧:"shǒu zú chóng jiǎn",手足异处:"shǒu zú yì chǔ",手脚干净:"shǒu jiǎo gàn jìng",手不应心:"shǒu bù yīng xīn",螫手解腕:"shì shǒu jiě wàn",释知遗形:"shì zhī yí xíng",适时应务:"shì shí yīng wù",适情率意:"shì qíng shuài yì",适当其冲:"shì dāng qí chōng",视为知己:"shì wéi zhī jǐ",使羊将狼:"shǐ yáng jiàng láng",食为民天:"shí wéi mín tiān",拾掇无遗:"shí duō wú yí",实与有力:"shí yù yǒu lì",石英玻璃:"shí yīng bō li",石室金匮:"shí shì jīn guì",什袭珍藏:"shí xí zhēn cáng",什伍东西:"shí wǔ dōng xī",什围伍攻:"shí wéi wǔ gōng",十魔九难:"shí mó jiǔ nàn",诗书发冢:"shī shū fà zhǒng",虱处裈中:"shī chǔ kūn zhōng",师直为壮:"shī zhí wéi zhuàng",尸居龙见:"shī jū lóng xiàn",圣经贤传:"shèng jīng xián zhuàn",圣君贤相:"shèng jūn xián xiàng",生拖死拽:"shēng tuō sǐ zhuài",审己度人:"shěn jǐ duó rén",神武挂冠:"shén wǔ guà guàn",神龙失埶:"shén lóng shī shì",深文曲折:"shēn wén qǔ shé",深厉浅揭:"shēn lì qiǎn qì",深谷为陵:"shēn gǔ wéi líng",深恶痛疾:"shēn wù tòng jí",深仇宿怨:"shēn chóu xiǔ yuàn",舍己为公:"shě jǐ wèi gōng",舍短取长:"shě duǎn qǔ cháng",舍策追羊:"shě cè zhuī yáng",蛇蝎为心:"shé xiē wéi xīn",少成若性:"shào chéng ruò xìng",上当学乖:"shàng dàng xué guāi",赏不当功:"shǎng bù dāng gōng",善自为谋:"shàn zì wéi móu",善为说辞:"shàn wéi shuō cí",善善恶恶:"shàn shàn wù è",善财难舍:"shàn cái nán shě",苫眼铺眉:"shān yǎn pū méi",讪牙闲嗑:"shàn yá xián kē",山阴乘兴:"shān yīn chéng xīng",山殽野湋:"shān yáo yě wéi",山溜穿石:"shān liù chuān shí",山节藻棁:"shān jié zǎo zhuō",杀鸡为黍:"shā jī wéi shǔ",色厉胆薄:"sè lì dǎn bó",桑荫未移:"sāng yīn wèi yí",桑荫不徙:"sāng yīn bù xǐ",桑土绸缪:"sāng tǔ chóu miù",桑户棬枢:"sāng hù juàn shū",三战三北:"sān zhàn sān běi",三瓦两舍:"sān wǎ liǎng shě",三人为众:"sān rén wèi zhòng",三差两错:"sān chā liǎng cuò",塞井焚舍:"sāi jǐng fén shě",洒心更始:"sǎ xīn gèng shǐ",洒扫应对:"sǎ sǎo yìng duì",软红香土:"ruǎn hóng xiāng tǔ",入吾彀中:"rù wú gòu zhōng",入铁主簿:"rù tiě zhǔ bù",入理切情:"rù lǐ qiē qíng",汝成人耶:"rǔ chéng rén yé",如水投石:"rú shuǐ tóu shí",如切如磋:"rú qiē rú cuō",如登春台:"rú dēng chūn tái",肉薄骨并:"ròu bó gǔ bìng",柔情绰态:"róu qíng chuò tài",戎马劻勷:"róng mǎ kuāng ráng",日中为市:"rì zhōng wéi shì",日月参辰:"rì yuè shēn chén",日省月修:"rì xǐng yuè xiū",日削月割:"rì xuē yuè gē",日省月试:"rì xǐng yuè shì",任达不拘:"rèn dá bù jū",人言藉藉:"rén yán jí jí",人模狗样:"rén mú gǒu yàng",人莫予毒:"rén mò yú dú",热熬翻饼:"rè áo fān bǐng",圈牢养物:"juàn láo yǎng wù",取予有节:"qǔ yǔ yǒu jié",诎要桡腘:"qū yāo ráo guó",穷形尽相:"qióng xíng jìn xiàng",情凄意切:"qíng qī yì qiè",情见势屈:"qíng xiàn shì qū",情见乎辞:"qíng xiàn hū cí",清都绛阙:"qīng dōu jiàng què",倾肠倒肚:"qīng cháng dào dǔ",青紫被体:"qīng zǐ pī tǐ",青林黑塞:"qīng lín hēi sài",螓首蛾眉:"qín shǒu é méi",琴瑟之好:"qín sè zhī hào",且住为佳:"qiě zhù wéi jiā",切树倒根:"qiē shù dǎo gēn",切理餍心:"qiē lǐ yàn xīn",切近的当:"qiē jìn de dāng",翘足引领:"qiáo zú yǐn lǐng",巧发奇中:"qiǎo fā qí zhòng",强嘴拗舌:"jiàng zuǐ niù shé",强直自遂:"qiáng zhí zì suí",强死强活:"qiǎng sǐ qiǎng huó",强食自爱:"qiǎng shí zì ài",强食靡角:"qiǎng shí mí jiǎo",强弓劲弩:"qiáng gōng jìng nǔ",强聒不舍:"qiǎng guō bù shě",强凫变鹤:"qiáng fú biàn hè",强而后可:"qiǎng ér hòu kě",强得易贫:"qiǎng dé yì pín",遣兴陶情:"qiǎn xìng táo qíng",牵羊担酒:"qiān yáng dān jiǔ",千了百当:"qiān liǎo bǎi dàng",泣下如雨:"qì xià rú yǔ",起偃为竖:"qǐ yǎn wéi shù",岂弟君子:"kǎi tì jūn zǐ",綦溪利跂:"qí xī lì qí",棋输先著:"qí shū xiān zhuó",齐王舍牛:"qí wáng shě niú",欺天诳地:"qī tiān kuáng dì",普天率土:"pǔ tiān shuài tǔ",铺胸纳地:"pū xiōng nà dì",铺锦列绣:"pū jǐn liè xiù",破家为国:"pò jiā wèi guó",破觚为圜:"pò gū wéi yuán",萍飘蓬转:"píng piāo péng zhuàn",帡天极地:"píng tiān jí dì",屏声息气:"bǐng shēng xī qì",凭几据杖:"píng jī jù zhàng",贫嘴薄舌:"pín zuǐ bó shé",片语只辞:"piàn yǔ zhī cí",披发文身:"pī fà wén shēn",烹龙炮凤:"pēng lóng páo fèng",炰鳖脍鲤:"fǒu biē kuài lǐ",庞眉皓发:"páng méi hào fà",攀花折柳:"pān huā zhé liǔ",攀蟾折桂:"pān chán shé guì",女大难留:"nǚ dà nán liú",弄玉吹箫:"nòng yù chuī xiāo",弄管调弦:"nòng guǎn tiáo xián",弄粉调朱:"nòng fěn diào zhū",浓抹淡妆:"nóng mò dàn zhuāng",捻土为香:"niǎn tǔ wéi xiāng",年谊世好:"nián yì shì hǎo",年华垂暮:"nián huá chuí mù",儗不于伦:"nǐ bù yú lún",泥而不滓:"ní ér bù zǐ",能者为师:"néng zhě wéi shī",能不称官:"néng bú chèn guān",挠直为曲:"náo zhí wéi qū",难进易退:"nán jìn yì tuì",难得糊涂:"nán dé hú tú",南蛮鴂舌:"nán mán jué shé",南贩北贾:"nán fàn běi gǔ",牧猪奴戏:"mù zhū nú xì",目眢心忳:"mù yuān xīn tún",目挑心招:"mù tiǎo xīn zhāo",目量意营:"mù liàng yì yíng",木头木脑:"mù tóu mù nǎo",木干鸟栖:"mù gàn niǎo qī",侔色揣称:"móu sè chuǎi chèn",莫予毒也:"mò yú dú yě",抹粉施脂:"mò fěn shī zhī",磨砻镌切:"mó lóng juān qiē",磨棱刓角:"mó léng wán jiǎo",摸门不着:"mō mén bù zháo",摸不着边:"mō bù zhuó biān",命中注定:"mìng zhōng zhù dìng",鸣鹤之应:"míng hè zhī yìng",明效大验:"míng xiào dà yàn",名我固当:"míng wǒ gù dāng",邈处欿视:"miǎo chǔ kǎn shì",黾穴鸲巢:"měng xué qú cháo",绵里薄材:"mián lǐ bó cái",靡有孑遗:"mǐ yǒu jié yí",靡衣偷食:"mǐ yī tōu shí",迷恋骸骨:"mí liàn hái gǔ",扪参历井:"mén shēn lì jǐng",门单户薄:"mén dān hù bó",昧旦晨兴:"mèi dàn chén xīng",冒名接脚:"mào míng jiē jiǎo",毛遂堕井:"máo suí duò jǐng",毛发倒竖:"máo fā dǎo shù",卖文为生:"mài wén wéi shēng",卖李钻核:"mài lǐ zuān hé",买椟还珠:"mǎi dú huán zhū",埋三怨四:"mán sān yuàn sì",马入华山:"mǎ rù huá shān",落魄江湖:"luò pò jiāng hú",落落难合:"luò luò nán hé",落草为寇:"luò cǎo wéi kòu",罗织构陷:"luó zhī gòu xiàn",鸾凤和鸣:"luán fèng hè míng",率由旧章:"shuài yóu jiù zhāng",率土同庆:"shuài tǔ tóng qìng",率兽食人:"shuài shòu shí rén",率土归心:"shuài tǔ guī xīn",率马以骥:"shuài mǎ yǐ jì",率尔成章:"shuài ěr chéng zhāng",鲁斤燕削:"lǔ jīn yàn xuē",漏尽更阑:"lòu jìn gēng lán",笼鸟槛猿:"lóng niǎo jiàn yuán",笼鸟池鱼:"lóng niǎo chí yú",龙游曲沼:"lóng yóu qū zhǎo",龙血玄黄:"lóng xuè xuán huáng",龙雕凤咀:"lóng diāo fèng jǔ",六尺之讬:"liù chǐ zhī tuō",令原之戚:"líng yuán zhī qī",令人捧腹:"lìng rén pěng fù",陵劲淬砺:"líng jìng cuì lì",临敌易将:"lín dí yì jiàng",裂裳衣疮:"liè shang yī chuāng",裂冠毁冕:"liè guàn huǐ miǎn",了无惧色:"liǎo wú jù sè",了身达命:"liǎo shēn dá mìng",了然无闻:"liǎo rán wú wén",了不可见:"liǎo bù kě jiàn",了不长进:"liǎo bù zhǎng jìn",燎发摧枯:"liǎo fà cuī kū",审时度势:"shěn shí duó shì",量小力微:"liàng xiǎo lì wēi",相时度力:"xiāng shí duó lì",量枘制凿:"liàng ruì zhì záo",量如江海:"liàng rú jiāng hǎi",量金买赋:"liàng jīn mǎi fù",量己审分:"liàng jǐ shěn fēn",敛骨吹魂:"liǎn gǔ chuī hún",詈夷为跖:"lì yí wéi zhí",利令志惛:"lì lìng zhì hūn",李广不侯:"lǐ guǎng bú hòu",礼为情貌:"lǐ wéi qíng mào",礼让为国:"lǐ ràng wéi guó",犁生骍角:"lí shēng xīng jiǎo",离本徼末:"lí běn jiǎo mò",楞眉横眼:"léng méi hèng yǎn",擂天倒地:"léi tiān dǎo dì",累足成步:"lěi zú chéng bù",累瓦结绳:"lěi wǎ jié shéng",累土至山:"lěi tǔ zhì shān",累土聚沙:"lěi tǔ jù shā",累卵之危:"lěi luǎn zhī wēi",累累如珠:"lěi lěi rú zhū",累块积苏:"lěi kuài jī sū",乐山乐水:"lè shān lè shuǐ",潦原浸天:"lǎo yuán jìn tiān",老师宿儒:"lǎo shī xiǔ rú",牢什古子:"láo shí gǔ zi",琅嬛福地:"láng huán fú dì",揆情度理:"kuí qíng duó lǐ",旷日累时:"kuàng rì lěi shí",匡救弥缝:"kuāng jiù mí fèng",枯树生华:"kū shù shēng huā",口轻舌薄:"kǒu qīng shé bó",口角生风:"kǒu jiǎo shēng fēng",口角春风:"kǒu jiǎo chūn fēng",口角风情:"kǒu jiǎo fēng qíng",口干舌焦:"kǒu gān shé jiāo",口腹之累:"kǒu fù zhī lěi",空腹便便:"kōng fù pián pián",嗑牙料嘴:"kē yá liào zuǐ",刻木为鹄:"kè mù wéi hú",咳珠唾玉:"ké zhū tuò yù",咳唾成珠:"ké tuò chéng zhū",抗颜为师:"kàng yán wéi shī",开华结果:"kāi huā jié guǒ",峻阪盐车:"jùn bǎn yán chē",嚼铁咀金:"jiáo tiě jǔ jīn",嚼墨喷纸:"jué mò pēn zhǐ",倔头强脑:"juè tóu jiàng nǎo",倔头倔脑:"juè tóu juè nǎo",倦鸟知还:"juàn niǎo zhī huán",卷席而葬:"juǎn xí ér zàng",卷甲倍道:"juǎn jiǎ bèi dào",聚米为山:"jù mǐ wéi shān",举手相庆:"jǔ shǒu xiāng qìng",举世混浊:"jǔ shì hún zhuó",鞠为茂草:"jū wéi mào cǎo",拘神遣将:"jū shén qiǎn jiàng",居下讪上:"jū xià shàn shàng",久要不忘:"jiǔ yāo bú wàng",九转功成:"jiǔ zhuǎn gōng chéng",九蒸三熯:"jiǔ zhēng sān hàn",敬业乐群:"jìng yè lè qún",井底虾蟆:"jǐng dǐ xiā má",旌旗卷舒:"jīng qí juǎn shū",荆棘载途:"jīng jí zài tú",禁舍开塞:"jìn shě kāi sāi",祲威盛容:"jìn wēi shèng róng",进退消长:"jìn tuì xiāo cháng",进退应矩:"jìn tuì yīng jǔ",进退触籓:"jìn tuì chù fān",进退跋疐:"jìn tuì bá zhì",尽多尽少:"jǐn duō jǐn shǎo",锦囊还矢:"jǐn náng huán shǐ",矜己自饰:"jīn jǐ zì shì",矜功负气:"jīn gōng fù qì",津关险塞:"jīn guān xiǎn sài",金吾不禁:"jīn wú bú jìn",金翅擘海:"jīn chì bāi hǎi",解衣衣人:"jiě yī yī rén",解人难得:"jiě rén nán dé",解铃系铃:"jiě líng xì líng",解发佯狂:"jiě fà yáng kuáng",诘屈磝碻:"jié qū áo qiāo",教猱升木:"jiāo náo shēng mù",较瘦量肥:"jiào shòu liàng féi",角立杰出:"jiǎo lì jié chū",焦沙烂石:"jiāo shā làn shí",骄儿騃女:"jiāo ér sì nǚ",浇风薄俗:"jiāo fēng bó sú",降妖捉怪:"xiáng yāo zhuō guài",将取固予:"jiāng qǔ gù yǔ",将门有将:"jiàng mén yǒu jiàng",将夺固与:"jiāng duó gù yǔ",槛花笼鹤:"jiàn huā lóng hè",鉴影度形:"jiàn yǐng duó xíng",渐不可长:"jiàn bù kě zhǎng",见素抱朴:"xiàn sù bào pǔ",见弃于人:"jiàn qì yú rén",简丝数米:"jiǎn sī shǔ mǐ",俭不中礼:"jiǎn bú zhòng lǐ",间见层出:"jiàn xiàn céng chū",尖嘴薄舌:"jiān zuǐ bó shé",甲冠天下:"jiǎ guàn tiān xià",葭莩之亲:"jiā fú zhī qīn",家累千金:"jiā lèi qiān jīn",家给人足:"jiā jǐ rén zú",家道从容:"jiā dào cóng róng",夹袋人物:"jiā dài rén wù",霁风朗月:"jì fēng lǎng yuè",寄兴寓情:"jì xìng yù qíng",计深虑远:"jì shēn lǜ yuǎn",计功量罪:"jì gōng liàng zuì",掎裳连襼:"jǐ shang lián yì",虮虱相吊:"jǐ shī xiāng diào",疾不可为:"jí bù kě wéi",极深研几:"jí shēn yán jī",及宾有鱼:"jí bīn yǒu yú",激薄停浇:"jī bó tíng jiāo",积素累旧:"jī sù lěi jiù",积时累日:"jī shí lěi rì",积露为波:"jī lù wéi bō",积德累功:"jī dé lěi gōng",积谗糜骨:"jī chán méi gǔ",击排冒没:"jī pái mào mò",祸为福先:"huò wéi fú xiān",祸福相依:"huò fú xiāng yī",获隽公车:"huò jùn gōng chē",混应滥应:"hùn yīng làn yīng",毁舟为杕:"huǐ zhōu wéi duò",毁钟为铎:"huǐ zhōng wéi duó",毁冠裂裳:"huǐ guān liè cháng",晦盲否塞:"huì máng pǐ sè",回船转舵:"huí chuán zhuàn duò",潢池盗弄:"huáng chí dào nòng",黄冠草履:"huáng guàn cǎo lǚ",黄发儿齿:"huáng fà ér chǐ",黄发垂髫:"huáng fà chuí tiáo",还珠返璧:"huán zhū fǎn bì",还年驻色:"huán nián zhù sè",还年却老:"huán nián què lǎo",坏裳为裤:"huài shang wéi kù",画荻和丸:"huà dí huò wán",化枭为鸠:"huà xiāo wéi jiū",化腐为奇:"huà fǔ wéi qí",化鸱为凤:"huà chī wéi fèng",花不棱登:"huā bu lēng dēng",户限为穿:"hù xiàn wéi chuān",呼卢喝雉:"hū lú hè zhì",呼来喝去:"hū lái hè qù",呼不给吸:"hū bù jǐ xī",厚味腊毒:"hòu wèi xī dú",厚德载物:"hòu dé zài wù",鸿渐于干:"hóng jiàn yú gàn",洪炉燎发:"hóng lú liáo fà",红绳系足:"hóng shéng jì zú",红不棱登:"hóng bu lēng dēng",横抢硬夺:"hèng qiǎng yìng duó",横恩滥赏:"hèng ēn làn shǎng",恨海难填:"hèn hǎi nán tián",鹤发鸡皮:"hè fà jī pí",涸思干虑:"hé sī gān lǜ",河涸海干:"hé hé hǎi gān",和颜说色:"hé yán yuè sè",合从连衡:"hé zòng lián héng",浩浩汤汤:"hào hào shāng shāng",好勇斗狠:"hào yǒng dòu hěn",好问则裕:"hào wèn zé yù",好为事端:"hào wéi shì duān",好问决疑:"hào wèn jué yí",好生之德:"hào shēng zhī dé",好奇尚异:"hǎo qí shàng yì",好恶不同:"hǎo è bù tóng",好丹非素:"hào dān fēi sù",豪干暴取:"háo gàn bào qǔ",毫发不爽:"háo fà bù shuǎng",寒酸落魄:"hán suān luò pò",含英咀华:"hán yīng jǔ huá",含糊不明:"hán hú bù míng",过为已甚:"guò wéi yǐ shèn",桂折兰摧:"guì shé lán cuī",规旋矩折:"guī xuán jǔ shé",广文先生:"guǎng wén xiān sheng",广陵散绝:"guǎng líng sǎn jué",冠山戴粒:"guàn shān dài lì",冠屦倒施:"guàn jù dǎo shī",挂席为门:"guà xí wéi mén",寡见鲜闻:"guǎ jiàn xiǎn wén",瓜葛相连:"guā gé xiāng lián",鼓吻奋爪:"gǔ wěn fèn zhǎo",古调单弹:"gǔ diào dān tán",古调不弹:"gǔ diào bù tán",姑射神人:"gū yè shén rén",苟合取容:"gǒu hé qǔ róng",狗续侯冠:"gǒu xù hòu guàn",钩爪锯牙:"gōu zhǎo jù yá",共枝别干:"gòng zhī bié gàn",共为唇齿:"gòng wéi chún chǐ",拱手而降:"gǒng shǒu ér xiáng",拱肩缩背:"gǒng jiān suō bèi",功薄蝉翼:"gōng bó chán yì",弓调马服:"gōng diào mǎ fú",更姓改物:"gēng xìng gǎi wù",更仆难数:"gēng pú nán shǔ",更令明号:"gēng lìng míng hào",更待干罢:"gèng dài gàn bà",更唱迭和:"gēng chàng dié hé",更长梦短:"gēng cháng mèng duǎn",各色名样:"gè sè míng yàng",格格不纳:"gé gé bú nà",格格不吐:"gé gé bù tǔ",告朔饩羊:"gù shuò xì yáng",膏车秣马:"gào chē mò mǎ",高义薄云:"gāo yì bó yún",岗头泽底:"gāng tóu zé dǐ",敢为敢做:"gǎn wéi gǎn zuò",甘分随时:"gān fèn suí shí",甘处下流:"gān chǔ xià liú",干啼湿哭:"gàn tí shī kū",干名犯义:"gàn míng fàn yì",干将莫邪:"gān jiāng mò yé",干城之将:"gān chéng zhī jiàng",腹载五车:"fù zài wǔ chē",父债子还:"fù zhài zǐ huán",父为子隐:"fù wéi zǐ yǐn",辅世长民:"fǔ shì zhǎng mín",福为祸始:"fú wéi huò shǐ",符号逻辑:"fú hào luó jí",浮收勒折:"fú shōu lè shé",肤受之愬:"fū shòu zhī sù",否终则泰:"pǐ zhōng zé tài",佛头著粪:"fó tóu zhuó fèn",奉为楷模:"fèng wéi kǎi mó",凤靡鸾吪:"fèng mǐ luán é",封豨修蛇:"fēng xī xiū shé",风影敷衍:"fēng yǐng fū yǎn",丰屋蔀家:"fēng wū bù jiā",粪土不如:"fèn tǔ bù rú",分风劈流:"fēn fēng pǐ liú",沸沸汤汤:"fèi fèi shāng shāng",菲食薄衣:"fěi shí bó yī",飞将数奇:"fēi jiàng shù qí",放辟邪侈:"fàng pì xié chǐ",方领圆冠:"fāng lǐng yuán guàn",犯而不校:"fàn ér bú jiào",返本还源:"fǎn běn huán yuán",反劳为逸:"fǎn láo wéi yì",法轮常转:"fǎ lún cháng zhuàn",罚不当罪:"fá bù dāng zuì",发引千钧:"fà yǐn qiān jūn",发奸擿伏:"fā jiān tī fú",发短心长:"fà duǎn xīn cháng",二竖为虐:"èr shù wéi nüè",儿女心肠:"ér nǚ xīn cháng",儿女亲家:"ér nǚ qìng jiā",遏恶扬善:"è wù yáng shàn",饿殍枕藉:"è piǎo zhěn jí",饿殍载道:"è piǎo zài dào",恶醉强酒:"wù zuì qiǎng jiǔ",恶意中伤:"è yì zhòng shāng",恶湿居下:"wù shī jū xià",恶居下流:"wù jū xià liú",恶不去善:"wù bú qù shàn",扼吭夺食:"è háng duó shí",扼襟控咽:"è jīn kòng yān",峨峨汤汤:"é é shāng shāng",屙金溺银:"ē jīn niào yín",朵颐大嚼:"duǒ yí dà jiáo",夺人所好:"duó rén suǒ hào",多言数穷:"duō yán shuò qióng",多文为富:"duō wén wéi fù",多端寡要:"duō duān guǎ yào",多财善贾:"duō cái shàn gǔ",遁世无闷:"dùn shì wú mèn",遁迹黄冠:"dùn jì huáng guàn",堆案盈几:"duī àn yíng jī",断还归宗:"duàn huán guī zōng",短见薄识:"duǎn jiàn bó shí",蠹居棊处:"dù jū qí chǔ",度己以绳:"duó jǐ yǐ shéng",杜默为诗:"dù mò wéi shī",杜鹃啼血:"dù juān tí xuè",笃近举远:"dǔ jìn jǔ yuǎn",独有千秋:"dú yǒu qiān qiū",读书得间:"dú shū dé jiàn",斗转参横:"dǒu zhuǎn shēn héng",兜肚连肠:"dōu dǔ lián cháng",洞见症结:"dòng jiàn zhèng jié",恫疑虚喝:"dòng yí xū hè",动中窾要:"dòng zhōng kuǎn yào",东鸣西应:"dōng míng xī yīng",东鳞西爪:"dōng lín xī zhǎo",东量西折:"dōng liàng xī shé",东家西舍:"dōng jiā xī shè",东扯西拽:"dōng chě xī zhuāi",鼎铛有耳:"dǐng chēng yǒu ěr",鼎铛玉石:"dǐng chēng yù shí",钉头磷磷:"dīng tóu lín lín",跌宕不羁:"diē dàng bù jī",跌弹斑鸠:"diē dàn bān jiū",雕心雁爪:"diāo xīn yàn zhǎo",颠倒衣裳:"diān dǎo yī cháng",德薄能鲜:"dé bó néng xiǎn",得马折足:"dé mǎ shé zú",蹈其覆辙:"dǎo qí fù zhé",捣虚撇抗:"dǎo xū piē kàng",倒载干戈:"dào zài gān gē",倒裳索领:"dào cháng suǒ lǐng",倒果为因:"dào guǒ wéi yīn",叨在知己:"tāo zài zhī jǐ",叨陪末座:"tāo péi mò zuò",党豺为虐:"dǎng chái wéi nüè",当轴处中:"dāng zhóu chǔ zhōng",当着不着:"dāng zhuó bù zhuó",当务始终:"dāng wù shǐ zhōng",淡汝浓抹:"dàn rǔ nóng mǒ",弹丸脱手:"tán wán tuō shǒu",弹铗无鱼:"dàn jiá wú yú",箪食瓢饮:"dān sì piáo yǐn",大璞不完:"dà pú bù wán",大明法度:"dà míng fǎ dù",大车以载:"dà chē yǐ zài",打闷葫芦:"dǎ mèn hú lu",沓来踵至:"tà lái zhǒng zhì",厝火燎原:"cuò huǒ liǎo yuán",撮科打哄:"cuō kē dǎ hòng",寸积铢累:"cùn jī zhū lěi",啛啛喳喳:"cuì cuì chā chā",摧折豪强:"cuī zhé háo qiáng",摧刚为柔:"cuī gāng wéi róu",从俗就简:"cóng sú jiù jiǎn",此发彼应:"cǐ fā bǐ yīng",此唱彼和:"cǐ chàng bǐ hè",慈悲为本:"cí bēi wéi běn",纯属骗局:"chún shǔ piàn jú",春笋怒发:"chūn sǔn nù fā",垂头搨翼:"chuí tóu tà yì",传为笑谈:"chuán wéi xiào tán",传风扇火:"chuán fēng shān huǒ",穿红着绿:"chuān hóng zhuó lǜ",触处机来:"chù chǔ jī lái",处尊居显:"chǔ zūn jū xiǎn",处堂燕雀:"chǔ táng yàn què",处实效功:"chǔ shí xiào gōng",处高临深:"chǔ gāo lín shēn",出入无间:"chū rù wú jiān",出门应辙:"chū mén yīng zhé",出处语默:"chū chǔ yǔ mò",出处殊途:"chū chǔ shū tú",出处进退:"chū chǔ jìn tuì",愁山闷海:"chóu shān mèn hǎi",冲冠眦裂:"chōng guàn zì liè",齿牙为祸:"chǐ yá wéi huò",尺二冤家:"chǐ èr yuān jia",尺短寸长:"chǐ duǎn cùn cháng",尺寸之功:"chǐ cùn zhī gōng",城北徐公:"chéng běi xú gōng",成败兴废:"chéng bài xīng fèi",趁水和泥:"chèn shuǐ huò ní",称雨道晴:"chēng yǔ dào qíng",称体载衣:"chēng tǐ zài yī",称体裁衣:"chèn tǐ cái yī",称家有无:"chèn jiā yǒu wú",称德度功:"chēng dé duó gōng",沉吟章句:"chén yín zhāng jù",沉吟不决:"chén yín bù jué",沉疴宿疾:"chén kē sù jí",扯纤拉烟:"chě qiàn lā yān",扯顺风旗:"chě shùn fēng qí",车载船装:"chē zǎi chuán zhuāng",朝升暮合:"zhāo shēng mù gě",朝攀暮折:"zhāo pān mù shé",超今冠古:"chāo jīn guàn gǔ",倡而不和:"chàng ér bú hè",畅所欲为:"chàng suǒ yù wéi",苌弘碧血:"cháng hóng bì xiě",长幼尊卑:"zhǎng yòu zūn bēi",长绳系日:"cháng shéng jì rì",长年三老:"zhǎng nián sān lǎo",长春不老:"cháng chūn bù lǎo",长傲饰非:"zhǎng ào shì fēi",昌亭旅食:"chāng tíng lǚ shí",禅絮沾泥:"chán xù zhān ní",差三错四:"chā sān cuò sì",层台累榭:"céng tái lěi xiè",层见迭出:"céng xiàn dié chū",藏踪蹑迹:"cáng zōng niè jì",苍蝇见血:"cāng yíng jiàn xiě",餐松啖柏:"cān sōng dàn bó",骖风驷霞:"cān fēng sì xiá",参伍错综:"cēn wǔ cuò zōng",参辰卯酉:"shēn chén mǎo yǒu",材优干济:"cái yōu gān jǐ",材薄质衰:"cái bó zhì shuāi",才大难用:"cái dà nán yòng",才薄智浅:"cái bó zhì qiǎn",不足为意:"bù zú wéi yì",不足为据:"bù zú wéi jù",不足为法:"bù zú wéi fǎ",不足齿数:"bù zú chǐ shǔ",不着疼热:"bù zhuó téng rè",不知薡蕫:"bù zhī dǐng dǒng",不越雷池:"bú yuè léi chí",不相为谋:"bù xiāng wéi móu",不贪为宝:"bù tān wéi bǎo",不了而了:"bù liǎo ér liǎo",不可揆度:"bù kě kuí duó",不遑启处:"bù huáng qǐ chǔ",不当不正:"bù dāng bú zhèng",不差什么:"bú chà shén me",不差累黍:"bù chā lěi shǔ",擘两分星:"bò liǎng fēn xīng",簸土扬沙:"bǒ tǔ yáng shā",薄物细故:"bó wù xì gù",薄寒中人:"bó hán zhòng rén",博文约礼:"bó wén yuē lǐ",播糠眯目:"bō kāng mí mù",剥皮抽筋:"bō pí chōu jīn",剥肤椎髓:"bō fū chuí suǐ",波属云委:"bō zhǔ yún wěi",波骇云属:"bō hài yún zhǔ",兵微将寡:"bīng wēi jiàng guǎ",兵强将勇:"bīng qiáng jiàng yǒng",兵多将广:"bīng duō jiàng guǎng",兵不由将:"bīng bù yóu jiàng",冰解的破:"bīng jiě dì pò",彬彬济济:"bīn bīn jǐ jǐ",摽梅之年:"biào méi zhī nián",表里为奸:"biǎo lǐ wéi jiān",飙发电举:"biāo fā diàn jǔ",变贪厉薄:"biàn tān lì bó",敝盖不弃:"bì gài bú qì",秕言谬说:"bǐ yán miù shuō",比物属事:"bǐ wù zhǔ shì",被山带河:"pī shān dài hé",被甲枕戈:"pī jiǎ zhěn gē",被甲据鞍:"pī jiǎ jù ān",被褐怀玉:"pī hè huái yù",被发缨冠:"pī fà yīng guàn",背曲腰躬:"bèi qǔ yāo gōng",北窗高卧:"běi chuāng gāo wò",北辰星拱:"běi chén xīng gǒng",北鄙之音:"běi bǐ zhī yīn",卑宫菲食:"bēi gōng fěi shí",暴衣露冠:"pù yī lù guàn",暴腮龙门:"pù sāi lóng mén",暴露文学:"bào lù wén xué",暴虎冯河:"bào hǔ píng hé",抱蔓摘瓜:"bào wàn zhāi guā",抱法处势:"bào fǎ chǔ shì",褒贬与夺:"bāo biǎn yǔ duó",帮闲钻懒:"bāng xián zuān lǎn",拜将封侯:"bài jiàng fēng hóu",百兽率舞:"bǎi shòu shuài wǔ",百孔千创:"bǎi kǒng qiān chuāng",白衣卿相:"bái yī qīng xiàng",白首为郎:"bái shǒu wéi láng",白首相知:"bái shǒu xiāng zhī",把玩无厌:"bǎ wán wú yàn",拔锅卷席:"bá guō juǎn xí",拔本塞源:"bá běn sè yuán",傲不可长:"ào bù kě zhǎng",熬更守夜:"áo gēng shǒu yè",安时处顺:"ān shí chǔ shùn",安身为乐:"ān shēn wéi lè",安老怀少:"ān lǎo huái shào",安步当车:"ān bù dàng chē",爱人好士:"ài rén hào shì",矮人观场:"ǎi rén guān chǎng",捱风缉缝:"ái fēng jī fèng",挨山塞海:"āi shān sè hǎi",阿家阿翁:"ā jiā ā wēng",阿党相为:"ē dǎng xiāng wéi",追亡逐北:"zhuī wáng zhú běi",竹篮打水:"zhú lán dá shuǐ",知疼着热:"zhī téng zháo rè",语不惊人:"yǔ bù jīng rén",于今为烈:"yú jīn wéi liè",一日三省:"yí rì sān xǐng",穴居野处:"xué jū yě chǔ",五脊六兽:"wǔ jǐ liù shòu",无声无臭:"wú shēng wú xiù",谓予不信:"wèi yú bú xìn",舍身为国:"shě shēn wéi guó",杀妻求将:"shā qī qiú jiàng",强作解人:"qiǎng zuò jiě rén",气冲斗牛:"qì chōng dǒu niú",临深履薄:"lín shēn lǚ bó",钧天广乐:"jūn tiān guǎng yuè",艰难竭蹶:"jiān nán jié jué",夹七夹八:"jiā qī jiā bā",混混噩噩:"hún hún è è",厚古薄今:"hòu gǔ bó jīn",鬼怕恶人:"guǐ pà è rén",伽马射线:"gā mǎ shè xiàn",佛头着粪:"fó tóu zhuó fèn",奉为至宝:"fèng wéi zhì bǎo",登坛拜将:"dēng tán bài jiàng",晨昏定省:"chén hūn dìng xǐng",察察为明:"chá chá wéi míng",博闻强识:"bó wén qiáng zhì",避难就易:"bì nán jiù yì",了无生机:"liǎo wú shēng jī",有一说一:"yǒu yī shuō yī",独一无二:"dú yī wú èr",说一不二:"shuō yī bù èr",举一反三:"jǔ yī fǎn sān",数一数二:"shǔ yī shǔ èr",杀一儆百:"shā yī jǐng bǎi",丁一卯二:"dīng yī mǎo èr",丁一确二:"dīng yī què èr",不一而止:"bù yī ér zhǐ",无一幸免:"wú yī xìng miǎn",表里不一:"biǎo lǐ bù yī",良莠不一:"liáng yǒu bù yī",心口不一:"xīn kǒu bù yī",言行不一:"yán xíng bù yī",政令不一:"zhèng lìng bù yī",参差不一:"cēn cī bù yī",纷纷不一:"fēn fēn bù yī",毁誉不一:"huǐ yù bù yī",不一而三:"bù yī ér sān",百不一遇:"bǎi bù yī yù",言行抱一:"yán xíng bào yī",瑜百瑕一:"yú bǎi xiá yī",背城借一:"bèi chéng jiè yī",凭城借一:"píng chéng jiè yī",劝百讽一:"quàn bǎi fěng yī",群居和一:"qún jū hé yī",百不获一:"bǎi bù huò yī",百不失一:"bǎi bù shī yī",百无失一:"bǎi wú shī yī",万不失一:"wàn bù shī yī",万无失一:"wàn wú shī yī",合而为一:"hé ér wéi yī",合两为一:"hé liǎng wéi yī",合二为一:"hé èr wéi yī",天下为一:"tiān xià wéi yī",相与为一:"xiāng yǔ wéi yī",较若画一:"jiào ruò huà yī",较如画一:"jiào rú huà yī",斠若画一:"jiào ruò huà yī",言行若一:"yán xíng ruò yī",始终若一:"shǐ zhōng ruò yī",终始若一:"zhōng shǐ ruò yī",惟精惟一:"wéi jīng wéi yī",众多非一:"zhòng duō fēi yī",不能赞一:"bù néng zàn yī",问一答十:"wèn yī dá shí",一不扭众:"yī bù niǔ zhòng",一以贯之:"yī yǐ guàn zhī",一以当百:"yī yǐ dāng bǎi",百不当一:"bǎi bù dāng yī",十不当一:"shí bù dāng yī",以一警百:"yǐ yī jǐng bǎi",以一奉百:"yǐ yī fèng bǎi",以一持万:"yǐ yī chí wàn",以一知万:"yǐ yī zhī wàn",百里挑一:"bǎi lǐ tiāo yī",整齐划一:"zhěng qí huà yī",一来二去:"yī lái èr qù",一路公交:"yī lù gōng jiāo",一路汽车:"yī lù qì chē",一路巴士:"yī lù bā shì",朝朝朝落:"zhāo cháo zhāo luò",曲意逢迎:"qū yì féng yíng",一行不行:"yì háng bù xíng",行行不行:"háng háng bù xíng"},Rle=Object.keys(kS).map(e=>({zh:e,pinyin:kS[e],probability:2e-8,length:4,priority:Yr.Normal,dict:Symbol("dict4")})),bS={巴尔干半岛:"bā ěr gàn bàn dǎo",巴尔喀什湖:"bā ěr kā shí hú",不幸而言中:"bú xìng ér yán zhòng",布尔什维克:"bù ěr shí wéi kè",何乐而不为:"hé lè ér bù wéi",苛政猛于虎:"kē zhèng měng yú hǔ",蒙得维的亚:"méng dé wéi dì yà",民以食为天:"mín yǐ shí wéi tiān",事后诸葛亮:"shì hòu zhū gě liàng",物以稀为贵:"wù yǐ xī wéi guì",先下手为强:"xiān xià shǒu wéi qiáng",行行出状元:"háng háng chū zhuàng yuan",亚得里亚海:"yà dé lǐ yà hǎi",眼不见为净:"yǎn bú jiàn wéi jìng",竹筒倒豆子:"zhú tǒng dào dòu zi"},Ole=Object.keys(bS).map(e=>({zh:e,pinyin:bS[e],probability:2e-8,length:5,priority:Yr.Normal,dict:Symbol("dict5")}));function AS(e,t){return e&&(e.decimalt.probability)?e:t}function CS(e){e.probability<1e-300&&(e.probability*=1e300,e.decimal+=1)}function Ple(e){return e.priority===Yr.Custom?-(e.length*e.length*100):e.priority===Yr.Surname?-(e.length*e.length*10):0}function jle(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{probability:1,decimal:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={probability:s.probability*r.probability,decimal:r.decimal+Ple(s),patterns:r.patterns,concatPattern:s};CS(u),n[a]=AS(n[a],u),s=e[--i]}const l={probability:1e-13*r.probability,decimal:0,patterns:r.patterns};CS(l),n[o]=AS(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function wS(e,t){return e&&e.count<=t.count?e:t}function Hle(e){return e.priority===Yr.Custom?-(e.length*e.length*1e5):e.priority===Yr.Surname?-(e.length*e.length*100):1}function Wle(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{count:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={count:Hle(s)+r.count,patterns:r.patterns,concatPattern:s};n[a]=wS(n[a],u),s=e[--i]}const l={count:1+r.count,patterns:r.patterns};n[o]=wS(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function qle(e,t){return!(t.index+t.length<=e.index||t.priority>e.priority||t.priority===e.priority&&t.length>e.length)}function Ule(e){const t=[];for(let n=e.length-1;n>=0;){const{index:i}=e[n];let s=n-1;for(;s>=0&&qle(e[n],e[s]);)s--;(s<0||e[s].index+e[s].length<=i)&&t.push(e[n]),n=s}return t.reverse()}var xS;(function(e){e[e.ReverseMaxMatch=1]="ReverseMaxMatch",e[e.MaxProbability=2]="MaxProbability",e[e.MinTokenization=3]="MinTokenization"})(xS||(xS={}));class SS{constructor(t,n="",i=""){this.children=new Map,this.fail=null,this.patterns=[],this.parent=t,this.prefix=n,this.key=i}}class Kle{constructor(){this.dictMap=new Map,this.queues=[],this.root=new SS(null)}build(t){this.buildTrie(t),this.buildFailPointer()}buildTrie(t){for(let n of t){const i=Tb(n.zh);let s=this.root;for(let o=0;o{t=t.concat(i)}),this.queues=[];t.length>n;){let i=t[n++],s=i.parent&&i.parent.fail,o=i.key;for(;s&&!s.children.has(o);)s=s.fail;s?i.fail=s.children.get(o):i.fail=this.root}}addPatternToDictMap(t){this.dictMap.has(t.dict)||this.dictMap.set(t.dict,new Set),this.dictMap.get(t.dict).add(t)}addNodeToQueues(t){this.queues[Nl(t.prefix)]||(this.queues[Nl(t.prefix)]=[]),this.queues[Nl(t.prefix)].push(t)}insertPattern(t,n){for(let i=t.length-1;i>=0;i--){const s=t[i];if(n.priority===s.priority&&n.probability>=s.probability)t[i+1]=s;else if(n.priority>s.priority)t[i+1]=s;else{t[i+1]=n;return}}t[0]=n}removeDict(t){this.dictMap.has(t)&&(this.dictMap.get(t).forEach(i=>{i.node.patterns=i.node.patterns.filter(s=>s!==i)}),this.dictMap.delete(t))}match(t,n){let i=this.root,s=[];const o=Tb(t);for(let r=0;rn==="off"?c.priority!==Yr.Surname:n==="head"?c.length-1-r===0:!0);a&&s.push(Object.assign(Object.assign({},a),{index:r-a.length+1}));let u=i.fail;for(;u!==null;){const c=u.patterns.find(d=>n==="off"?d.priority!==Yr.Surname:n==="head"?d.length-1-r===0:!0);c&&s.push(Object.assign(Object.assign({},c),{index:r-c.length+1})),u=u.fail}}}return s}search(t,n,i=2){const s=this.match(t,n);return i===1?Ule(s):i===3?Wle(s,Nl(t)):jle(s,Nl(t))}}const Vle=[...Ole,...Rle,...zle,...Ble,...Nle,...$le],c$=new Kle;c$.build(Vle);const Zle=new a$,Gle=()=>Zle,Qle=[];function Yle(){return Qle}const Z1=e=>{const t=lc.get(e);return t?t.split(" ")[0]:e},Jle=e=>{const t=[],n=Yle();for(let i=0;i{const o=s?Jle(e):e,r=c$.search(o,n,i);let l=0;const a=Tb(e);for(let u=0;ue.replace(/(ā|á|ǎ|à)/g,"a").replace(/(ō|ó|ǒ|ò)/g,"o").replace(/(ē|é|ě|è)/g,"e").replace(/(ī|í|ǐ|ì)/g,"i").replace(/(ū|ú|ǔ|ù)/g,"u").replace(/(ǖ|ǘ|ǚ|ǜ)/g,"ü").replace(/(n̄|ń|ň|ǹ)/g,"n").replace(/(m̄|ḿ|m̌|m̀)/g,"m").replace(/(ê̄|ế|ê̌|ề)/g,"ê"),d$=(e,t="off")=>{const n=Gle();let i=lc.get(e)?lc.get(e).split(" "):[];if(n.get(e))i=n.get(e).split(" ");else if(t!=="off"){const s=Lb[e];s&&(i=[s].concat(i.filter(o=>o!==s)))}return i},eae=(e,t="off")=>{let n=d$(e,t);return n.length>0?n.map(i=>({origin:e,result:i,isZh:!0,originPinyin:i})):[{origin:e,result:e,isZh:!1,originPinyin:e}]},iv=(e,t)=>{const n=e.split(" "),i=[],s=[];for(let o of n)for(let r of _le)if(o.startsWith(r)){let l=o.slice(r.length);Ile.indexOf(r)!==-1&&Mle.indexOf(l)!==-1&&(l=Ele[l]),i.push(r),s.push(l);break}return t==="standard"&&i.forEach((o,r)=>{(o==="y"||o==="w")&&(i[r]="")}),{final:s.join(" "),initial:i.join(" ")}},Xm=e=>{const{final:t}=iv(e);let n="",i="",s="";return Tle.indexOf(Uy(t))!==-1?(n=t[0],i=t[1],s=t.slice(2)):(i=t[0]||"",s=t.slice(1)||""),{head:n,body:i,tail:s}},Ky=e=>{const t=/(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/,n=/(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/,i=/(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/,s=/(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/,o=/(a|o|e|i|u|ü|ê)/,r=/(n|m)$/,l=[];return e.split(" ").forEach(u=>{t.test(u)?l.push("1"):n.test(u)?l.push("2"):i.test(u)?l.push("3"):s.test(u)?l.push("4"):o.test(u)||r.test(u)?l.push("0"):l.push("")}),l.join(" ")},tae=(e,t)=>{const n=Uy(e).split(" "),i=Ky(t).split(" "),s=[];return n.forEach((o,r)=>{s.push(`${o}${i[r]}`)}),s.join(" ")},f$=(e,t)=>{const n=[];return e.split(" ").forEach(s=>{n.push(t?s[0]:s)}),n.join(" ")};function nae(e,t,n){if(Dle.indexOf(e)===-1)return Z1(e);if(t===n&&t&&Z1(t)!==t)return Uy(Z1(e));if(n&&!Fle[e].includes(n)){const i=Z1(n);if(i!==n){const s=Ky(i),o=u$[e];for(let r in o)if(o[r].indexOf(Number(s))!==-1)return r}}}function iae(e,t){if(e==="了"&&(!t||!lc.get(t)))return"liǎo"}function sae(e,t){if(e==="々")return!t||!lc.get(t)?"tóng":lc.get(t).split(" ")[0]}function _S(e,t,n){return sae(e,t)||iae(e,t)||nae(e,t,n)||Z1(e)}const oae=e=>typeof e!="string"?(console.error("The first param of pinyin is error: "+e+' is not assignable to type "string".'),!1):!0;function Q4(e,t){return t instanceof RegExp?t.test(e):!0}const rae=(e,t)=>{let n=t.nonZh;if(n==="removed")return e.filter(i=>i.isZh||!Q4(i.origin,t.nonZhScope));if(n==="consecutive"){for(let i=e.length-2;i>=0;i--){const s=e[i],o=e[i+1];!s.isZh&&!o.isZh&&Q4(s.origin,t.nonZhScope)&&Q4(o.origin,t.nonZhScope)&&(s.origin+=o.origin,s.result+=o.result,o.delete=!0)}return e.filter(i=>!i.delete)}else return e},IS=(e,t)=>Nl(e)===1&&t.multiple?eae(e,t.surname):!1,lae=(e,t)=>{switch(t.pattern){case"pinyin":break;case"num":e.forEach(n=>{n.result=n.isZh?Ky(n.result):""});break;case"initial":e.forEach(n=>{n.result=n.isZh?iv(n.result,t.initialPattern).initial:""});break;case"final":e.forEach(n=>{n.result=n.isZh?iv(n.result,t.initialPattern).final:""});break;case"first":e.forEach(n=>{n.result=f$(n.result,n.isZh)});break;case"finalHead":e.forEach(n=>{n.result=n.isZh?Xm(n.result).head:""});break;case"finalBody":e.forEach(n=>{n.result=n.isZh?Xm(n.result).body:""});break;case"finalTail":e.forEach(n=>{n.result=n.isZh?Xm(n.result).tail:""});break}},aae=(e,t)=>{switch(t.toneType){case"symbol":break;case"none":e.forEach(n=>{n.isZh&&(n.result=Uy(n.result))});break;case"num":{e.forEach(n=>{n.isZh&&(n.result=tae(n.result,n.originPinyin))});break}}},uae=(e,t)=>{t.v&&e.forEach(n=>{n.isZh&&(n.result=n.result.replace(/ü/g,typeof t.v=="string"?t.v:"v"))})},cae=(e,t,n)=>{if(t.multiple&&Nl(n)===1){let i="";e=e.filter(s=>{const o=s.result!==i;return i=s.result,o})}return t.type==="array"?e.map(i=>i.result):t.type==="all"?e.map(i=>{const s=i.isZh?i.result:"",{initial:o,final:r}=iv(s,t.initialPattern),{head:l,body:a,tail:u}=Xm(s);let c=[];return s!==""&&(c=[s].concat(d$(i.origin,t.surname).filter(d=>d!==s))),{origin:i.origin,pinyin:s,initial:o,final:r,first:f$(i.result,i.isZh),finalHead:l,finalBody:a,finalTail:u,num:Number(Ky(i.originPinyin)),isZh:i.isZh,polyphonic:c,inZhRange:!!lc.get(i.origin),result:i.result}}):e.map(i=>i.result).join(t.separator)},dae=(e,t)=>(t===!1&&e.forEach(n=>{n.origin==="一"?n.result=n.originPinyin="yī":n.origin==="不"&&(n.result=n.originPinyin="bù")}),e),fae={pattern:"pinyin",toneType:"symbol",type:"string",multiple:!1,mode:"normal",removeNonZh:!1,nonZh:"spaced",v:!1,separator:" ",toneSandhi:!0,segmentit:2};function sv(e,t){if(t=Object.assign(Object.assign({},fae),t||{}),!oae(e))return e;if(e==="")return t.type==="array"||t.type==="all"?[]:"";t.surname===void 0&&(t.mode==="surname"?t.surname="all":t.surname="off"),t.type==="all"&&(t.pattern="pinyin"),t.pattern==="num"&&(t.toneType="none"),t.removeNonZh&&(t.nonZh="removed");let i=Array(Nl(e)),{list:s}=Xle(e,i,t.surname,t.segmentit,t.traditional);return s=dae(s,t.toneSandhi),s=rae(s,t),IS(e,t)&&(s=IS(e,t)),lae(s,t),aae(s,t),uae(s,t),cae(s,t,e)}var Nb;(function(e){e[e.AllSegment=1]="AllSegment",e[e.AllArray=2]="AllArray",e[e.AllString=3]="AllString",e[e.PinyinSegment=4]="PinyinSegment",e[e.PinyinArray=5]="PinyinArray",e[e.PinyinString=6]="PinyinString",e[e.ZhSegment=7]="ZhSegment",e[e.ZhArray=8]="ZhArray",e[e.ZhString=9]="ZhString"})(Nb||(Nb={}));Nb.AllSegment;const h$=[{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"},{name:"/goal",desc:"commands.goal.desc"},{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 hae(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 ov="skill:";function pae(e){const t=e.startsWith("/")?e.slice(1):e;return t.startsWith(ov)?t.slice(ov.length):t}function p$(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${ov}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...h$,...t]}const MS=new Map;function g$(e){let t=MS.get(e);if(!t){const n=sv(e,{toneType:"none",type:"array"}),i=sv(e,{pattern:"first",toneType:"none",type:"array"});t=gae(e,n,i),MS.set(e,t)}return t}const ES={full:[],first:[],offsets:[],literal:[]};function gae(e,t,n){if(t.length!==n.length)return ES;const i=[],s=[];let o=0;for(let r=0;r0&&e.slice(o,o+l.length).toLowerCase()===l.toLowerCase()?(s.push(!0),o+=l.length):(s.push(!1),o+=Array.from(e.slice(o))[0]?.length??0)}return i.push(o),o!==e.length?ES:{full:t,first:n,offsets:i,literal:s}}function Fb(e,t,n,i){const s=e[t];let o=0,r=-1,l=-1,a=0,u=0;for(let f=0;f=0)return Fb(i,"first",s,s+t.length);const o=i.full.join("").indexOf(t);if(!(o<0))return Fb(i,"full",o,o+t.length)}function bae(e,t,n){const i=e.trim().replace(/^\//,"").toLowerCase();if(i==="")return{};const s=yae(t,i),o=kae(n,i);return{name:s?[s]:void 0,desc:o?[o]:void 0}}const Aae={keys:[{name:"name",weight:3},{name:"desc",weight:1},{name:"pinyinFull",weight:1},{name:"pinyinFirst",weight:1}],includeScore:!0,includeMatches:!0,ignoreLocation:!0,threshold:.4};function Cae(e,t){const n=e.toLowerCase(),i=t.toLowerCase();return n===i?0:n.startsWith(i)?1:2}function LS(e){const t=[...e].sort((i,s)=>i[0]-s[0]),n=[];for(const i of t){const s=n[n.length-1];s&&i[0]<=s[1]?s[1]=Math.max(s[1],i[1]):n.push([...i])}return n}function wae(e,t){const n=[],i=[];for(const s of t??[])for(const[o,r]of s.indices)if(s.key==="name")n.push([o+1,r+2]);else if(s.key==="desc")i.push([o,r+1]);else if(s.key==="pinyinFirst"||s.key==="pinyinFull"){const l=Fb(g$(e.desc),s.key==="pinyinFirst"?"first":"full",o,r+1);l&&i.push(l)}return{name:n.length>0?LS(n):void 0,desc:i.length>0?LS(i):void 0}}function xae(e,t=h$,n=i=>i.desc){const i=e.trim().replace(/^\//,"");if(i==="")return t.map(o=>({item:o,ranges:{}}));const s=t.map((o,r)=>{const l=n(o),a=mae(l);return{index:r,item:o,name:o.name.replace(/^\//,""),desc:l,pinyinFull:a.full,pinyinFirst:a.first}});return new Cle(s,Aae).search(i).map(({item:o,score:r,matches:l})=>({doc:o,score:r??1,rank:Cae(o.name,i),ranges:wae(o,l)})).sort((o,r)=>o.rank!==r.rank?o.rank-r.rank:o.score!==r.score?o.score-r.score:o.doc.index-r.doc.index).map(({doc:o,ranges:r})=>({item:o.item,ranges:r}))}function Sae(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 i=new Set(t.map(r=>r.id)),s=new Set(t.flatMap(r=>r.role==="user"&&r.promptId!==void 0?[r.promptId]:[])),o=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||i.has(r.id)||r.role==="user"&&(r.userMessageId!==void 0&&i.has(r.userMessageId)||r.promptId!==void 0&&s.has(r.promptId)))});return o.length>0?[...o,...t]:t}function _ae(e){const t=new Map,n=new Set;function i(o){const r=t.get(o);if(r!==void 0)return r;const l=(async()=>e(o))().finally(()=>{t.delete(o),n.delete(o)&&i(o)});return t.set(o,l),l}function s(o){if(t.has(o)){n.add(o);return}i(o)}return{run:i,request:s}}const hn={permission:"kimi-web.permission",activeWorkspace:"kimi-active-workspace",planArmed:"kimi-web.plan-armed",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",workspaceSort:"kimi-web.workspace-sort",workspaceRecencyFloor:"kimi-web.workspace-recency-floor",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",planMode:"kimi-web.plan-mode",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 NS(e){return`kimi-web.draft.${e&&e.length>0?e:"__new__"}`}function To(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Js(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function Tr(e){try{globalThis.localStorage.removeItem(e)}catch{}}function tf(e){const t=To(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function _c(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function c6(){const e=To(hn.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[i,s]of Object.entries(t))s===!0&&(n[i]=!0);return n}catch{return{}}}function d6(e){const n={...c6()};for(const[i,s]of Object.entries(e))s?n[i]=!0:delete n[i];Js(hn.unread,JSON.stringify(n))}function Iae(){const e=tf(hn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Y4(e){_c(hn.collapsedWorkspaces,Array.from(e))}function Mae(){return tf(hn.pinnedCollapsed)===!0}function Db(e){_c(hn.pinnedCollapsed,e)}function Eae(){return To(hn.sidebarViewMode)==="flat"?"flat":"grouped"}function Tae(e){Js(hn.sidebarViewMode,e)}function Lae(){const e=tf(hn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function v$(e){_c(hn.workspaceOrder,Array.from(e))}function Nae(){return To(hn.workspaceSort)==="recent"?"recent":"manual"}function Fae(e){Js(hn.workspaceSort,e)}function Dae(){const e=tf(hn.workspaceRecencyFloor);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="number"&&Number.isFinite(i)&&(t[n]=i);return t}function y$(e){_c(hn.workspaceRecencyFloor,e)}function k$(){const e=tf(hn.pinnedSessions);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function J4(e){_c(hn.pinnedSessions,Array.from(e))}function lm(){const e=tf(hn.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="string"&&(t[n]=i);return t}function FS(e){_c(hn.workspaceNameOverrides,e)}function DS(e,t){const n=new Set(e.map(u=>u.id)),i=t.filter(u=>u.kind==="subagent"&&!n.has(u.id));if(i.length===0)return e;const s=new Map(e.map(u=>[u.id,u])),o=new Map(e.filter(u=>u.kind==="subagent"&&u.agentId!==void 0).map(u=>[u.agentId,u])),r=new Set,l=i.map(u=>{const c=(u.backgroundTaskId!==void 0?s.get(u.backgroundTaskId):void 0)??o.get(u.agentId??u.id);if(c===void 0)return u;r.add(c.id);const d=u.status==="running"&&c.status!=="running";return{...u,status:u.status==="running"?c.status:u.status,subagentPhase:d?c.status==="completed"?"completed":"failed":u.subagentPhase,completedAt:c.completedAt??u.completedAt,completedAtEstimated:c.completedAt!==void 0?void 0:u.completedAtEstimated,outputPreview:c.outputPreview??u.outputPreview,outputBytes:c.outputBytes??u.outputBytes,model:u.model??c.model,thinkingEffort:u.thinkingEffort??c.thinkingEffort}});return[...e.filter(u=>!r.has(u.id)),...l]}function $ae(e,t){if(e.length===0)return t;const n=new Map(t.map(r=>[r.id,r])),i=new Set(e.map(r=>r.id)),s=e.map(r=>{const l=n.get(r.id);if(!l)return r;const a=r.completedAt===void 0&&l.completedAt===void 0&&l.status==="running"&&r.status!=="running";return{...r,outputLines:l.outputLines,text:l.text,completedAt:r.completedAt??l.completedAt??(a?new Date().toISOString():void 0),completedAtEstimated:r.completedAt!==void 0?void 0:l.completedAt!==void 0?l.completedAtEstimated:a?!0:void 0,model:r.model??l.model,thinkingEffort:r.thinkingEffort??l.thinkingEffort}}),o=t.filter(r=>!i.has(r.id));return o.length===0?s:[...s,...o]}function Bae(){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 zae(e,t=Bae()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyF"||e.key.toLowerCase()==="f")&&!e.defaultPrevented}const Rae=new Map([["ς","σ"],["ß","ss"],["ſ","s"],["ff","ff"],["fi","fi"],["fl","fl"],["ffi","ffi"],["ffl","ffl"],["ſt","st"],["st","st"],["ʼn","ʼn"],["µ","μ"],["K","k"],["Å","å"],["Ω","ω"]]);function Oae(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function Pae(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 i="";const s=[];let o=!1;for(let r=0;r$S(c.text)),i="\0";let s="";const o=[];for(let c=0;c0&&e[c].gapBefore&&(s+=i),o[c]=s.length,s+=n[c].folded;const r=Wae($S(t).folded);if(r===null)return;const l=new RegExp(r,"g");function a(c){let d=0,f=o.length-1,h=0;for(;d<=f;){const g=d+f>>1;o[g]<=c?(h=g,d=g+1):f=g-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),g=a(f),m=n[h].map[d-o[h]],y=n[g].map[f-o[g]],A={startSeg:h,startOffset:m.start,endSeg:g,endOffset:y.start+y.length};u!==void 0&&u.startSeg===A.startSeg&&u.startOffset===A.startOffset&&u.endSeg===A.endSeg&&u.endOffset===A.endOffset||(u=A,yield A)}}const Hae=/[.*+?^${}()|[\]\\]/g;function Wae(e){const t=[];let n=0;for(;n=Zae)return{ranges:a,truncated:!0};a.push(f)}}return{ranges:a,truncated:!1}}const b$="kimi-transcript-search",$b="kimi-transcript-search-current";function A$(){return globalThis.CSS?.highlights??null}function X4(e,t){const n=A$(),i=globalThis.Highlight;if(!n||!i)return;if(e.length===0){Bb();return}const s=new i;for(const r of e)s.add(r);n.set(b$,s);const o=e[t];if(o!==void 0){const r=new i;r.add(o),n.set($b,r)}else n.delete($b)}function Bb(){const e=A$();e?.delete(b$),e?.delete($b)}const Qae=`https://www.kimi.com/code?from=${Wh?"kimi_code_desktop":"kimi_code_web"}`;function z0(){window.open(Qae,"_blank","noopener")}function Yae(e,t,n){if(e.length===0)return null;const i=new Set(e),s=t.filter(r=>i.has(r)),o=e.filter(r=>!t.includes(r));return o.length===0&&s.length===t.length?null:t.length===0&&n!==void 0?o.toSorted((r,l)=>(n.get(l)??Number.NEGATIVE_INFINITY)-(n.get(r)??Number.NEGATIVE_INFINITY)):[...o,...s]}function Jae(e,t){const n=new Map(t.map((i,s)=>[i,s]));return e.toSorted((i,s)=>(n.get(i.id)??-1)-(n.get(s.id)??-1))}function Xae(e,t,n,i="before"){const s=e.indexOf(t),o=e.indexOf(n);if(s===-1||o===-1||s===o)return e;const r=[...e];r.splice(s,1);const l=s(t.get(i.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function tue(e,t){let n=!1;const i={...e};for(const[s,o]of t)o>(i[s]??Number.NEGATIVE_INFINITY)&&(i[s]=o,n=!0);return{next:i,changed:n}}function nue(e,t){const n=new Map;for(const i of e){if(i.parentSessionId||i.archived)continue;const s=new Date(i.updatedAt).getTime();if(Number.isNaN(s))continue;const o=t(i);s>(n.get(o)??Number.NEGATIVE_INFINITY)&&n.set(o,s)}return n}function iue(e,t){const n=new Map;for(const i of e){const s=t[i.id]??Number.NEGATIVE_INFINITY,o=i.lastOpenedAt?Date.parse(i.lastOpenedAt):Number.NaN,r=Number.isNaN(o)?Number.NEGATIVE_INFINITY:o;n.set(i.id,Math.max(s,r))}return n}function sue(e,t){const n=Object.keys(e);if(!n.some(s=>!t.has(s)))return{next:e,changed:!1};const i={};for(const s of n)t.has(s)&&(i[s]=e[s]);return{next:i,changed:!0}}const oue=5;function rue(e,t,n,i=oue){if(e.length<=i)return e;const s=e.slice(0,i);if(t&&!s.some(o=>o.id===t)){const o=e.find(r=>r.id===t);o&&(s[i-1]=o)}return s}const lue={class:"sd-body"},aue={class:"sd-search"},uue=["aria-label"],cue={key:0,class:"sd-section","aria-hidden":"true"},due={class:"sd-section-count"},fue=["aria-selected","onClick","onMousemove"],hue=["innerHTML"],pue=["innerHTML"],gue=["aria-selected","onClick","onMousemove"],mue={class:"sd-line1"},vue=["innerHTML"],yue={class:"sd-time"},kue={class:"sd-line2"},bue=["innerHTML"],Aue=["innerHTML"],Cue={key:1,class:"sd-empty"},wue={class:"sd-foot","aria-hidden":"true"},xue={class:"sd-hint"},Sue={class:"sd-hint"},_ue={class:"sd-hint"},Iue=200,Mue=3,Eue=Qe({__name:"SearchSessionsDialog",props:{sessions:{},workspaces:{},activeId:{}},emits:["select","selectWorkspace","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!0),r=G(""),l=G(null),a=G(null),u=L(()=>{const _=r.value.trim().toLowerCase(),I=[];if(_.length===0)for(const $ of i.workspaces.slice(0,Mue))I.push({kind:"workspace",key:`ws:${$.id}`,hit:{workspace:$,inName:!1,inPath:!1}});else for(const $ of i.workspaces){const D=$.name.toLowerCase().includes(_),T=$.shortPath.toLowerCase().includes(_);!D&&!T||I.push({kind:"workspace",key:`ws:${$.id}`,hit:{workspace:$,inName:D,inPath:T}})}const M=[];for(const $ of i.sessions){const D=$.title??"",T=$.lastPrompt??"",N=$.workspaceName??"",O=_.length>0&&D.toLowerCase().includes(_),P=_.length>0&&T.toLowerCase().includes(_),R=_.length>0&&N.toLowerCase().includes(_);if(!(_.length>0&&!O&&!P&&!R)&&(M.push({kind:"session",key:`s:${$.id}`,hit:{session:$,inTitle:O,inWorkspace:R,snippetText:T?cre(T,r.value):""}}),M.length>=Iue))break}return I.length>0&&M.length>0&&(I[0].section={label:n("sidebar.workspaces"),count:I.length},M[0].section={label:n("sidebar.sessionsHeader"),count:M.length}),[...I,...M]}),c=G(0);qe(r,()=>{c.value=0});function d(_){const I=u.value.length;return I===0?0:Math.max(0,Math.min(I-1,_))}async function f(){await kt(),a.value?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})}function h(_){c.value=d(c.value+_),f()}function g(_){s("select",_),s("close")}function m(_){s("selectWorkspace",_),s("close")}function y(){r.value="",l.value?.focus()}function A(){const _=u.value[c.value];_&&(_.kind==="workspace"?m(_.hit.workspace.id):g(_.hit.session.id))}function b(){return l.value?.el??null}const{handleCompositionStart:C,handleCompositionEnd:v,isComposingKeyEvent:x}=Xr();function S(_){if(x(_)){_.key==="Escape"&&_.stopPropagation();return}_.key==="ArrowDown"?(_.preventDefault(),h(1)):_.key==="ArrowUp"?(_.preventDefault(),h(-1)):_.key==="Enter"&&(_.preventDefault(),A())}return mn(()=>{l.value?.focus()}),(_,I)=>(k(),de(p(bc),{open:o.value,"onUpdate:open":I[1]||(I[1]=M=>o.value=M),title:p(n)("sidebar.searchPlaceholder"),size:"lg",height:"fixed",padded:!1,"initial-focus":b,onClose:I[2]||(I[2]=M=>s("close"))},{default:he(()=>[w("div",lue,[w("div",aue,[K(p(wo),{ref_key:"inputRef",ref:l,modelValue:r.value,"onUpdate:modelValue":I[0]||(I[0]=M=>r.value=M),placeholder:p(n)("sidebar.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:S,onCompositionstart:p(C),onCompositionend:p(v)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),K(p(kn),{text:p(n)("sidebar.searchClear")},{default:he(()=>[w("button",{type:"button",class:Fe(["search-clear",{"is-on":r.value.length>0}]),tabindex:"-1","aria-label":p(n)("sidebar.searchClear"),onClick:y},[K(p(ve),{name:"close",size:"sm"})],10,uue)]),_:1},8,["text"])]),w("div",{ref_key:"listRef",ref:a,class:"sd-list",role:"listbox"},[u.value.length>0?(k(!0),E(Te,{key:0},ht(u.value,(M,$)=>(k(),E(Te,{key:M.key},[M.section?(k(),E("div",cue,[w("span",null,F(M.section.label),1),w("span",due,F(M.section.count),1)])):te("",!0),M.kind==="workspace"?(k(),E("button",{key:1,class:Fe(["sd-row sd-row-ws",{on:$===c.value}]),role:"option","aria-selected":$===c.value,onClick:D=>m(M.hit.workspace.id),onMousemove:D=>c.value=$},[K(p(ve),{class:"sd-folder",name:"folder-closed",size:"sm"}),w("span",{class:"sd-ws-name",innerHTML:p(S1)(M.hit.workspace.name,M.hit.inName?r.value:"")},null,8,hue),w("span",{class:"sd-ws-path",innerHTML:p(S1)(M.hit.workspace.shortPath,M.hit.inPath?r.value:"")},null,8,pue)],42,fue)):(k(),E("button",{key:2,class:Fe(["sd-row",{on:$===c.value,active:M.hit.session.id===e.activeId}]),role:"option","aria-selected":$===c.value,onClick:D=>g(M.hit.session.id),onMousemove:D=>c.value=$},[w("span",mue,[w("span",{class:"sd-title",innerHTML:p(S1)(M.hit.session.title,M.hit.inTitle?r.value:"")},null,8,vue),w("span",yue,F(M.hit.session.time),1)]),w("span",kue,[w("span",{class:"sd-meta-ws",innerHTML:p(S1)(M.hit.session.workspaceName??M.hit.session.workspaceId??"",M.hit.inWorkspace?r.value:"")},null,8,bue),M.hit.snippetText?(k(),E(Te,{key:0},[I[3]||(I[3]=w("span",{class:"sd-meta-sep","aria-hidden":"true"},"·",-1)),w("span",{class:"sd-meta-snippet",innerHTML:p(S1)(M.hit.snippetText,r.value)},null,8,Aue)],64)):te("",!0)])],42,gue))],64))),128)):(k(),E("div",Cue,[K(p(FG),{title:r.value.trim()?p(n)("sidebar.searchNoResults"):p(n)("sidebar.searchEmpty")},{icon:he(()=>[K(p(ve),{name:"search",size:"lg"})]),_:1},8,["title"])]))],512),w("div",wue,[w("span",xue,[K(p(Ja),{keys:["↑","↓"]}),$e(F(p(n)("sidebar.searchHintSelect")),1)]),I[4]||(I[4]=w("span",{class:"sd-dot"},"·",-1)),w("span",Sue,[K(p(Ja),{keys:["Enter"]}),$e(F(p(n)("sidebar.searchHintOpen")),1)]),I[5]||(I[5]=w("span",{class:"sd-dot"},"·",-1)),w("span",_ue,[K(p(Ja),{keys:["Esc"]}),$e(F(p(n)("sidebar.searchHintClose")),1)])])])]),_:1},8,["open","title"]))}}),Tue=gt(Eue,[["__scopeId","data-v-5bf43f78"]]);function e3(e){return{fileId:e.fileId,kind:e.kind,sessionId:e.kind==="file"?void 0:e.sessionId,name:e.name,mediaType:e.mediaType,size:e.size}}function C$(e,t){const n=t.kind==="file"?void 0:t.sessionId;return{kind:t.kind,url:n?e.getSessionMediaUrl(n,t.fileId):e.getFileUrl(t.fileId),fileId:t.fileId,sessionId:n,name:t.name,mediaType:t.mediaType,size:t.size}}function rv(e){const t=[];for(const n of e??[])n.kind==="video"?t.push({type:"video",source:n.sessionId?{kind:"sessionMedia",fileId:n.fileId}:{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:n.sessionId?{kind:"sessionMedia",fileId:n.fileId}:{kind:"file",fileId:n.fileId}});return t}const Lue=1e3,Nue=4096,zS=32*1024;function Fue(e,t,n){let i=null,s;const o=new Set;async function r(h){try{const m=await n.api.listTasks(h),y=e.tasksBySession[h]??[],A=new Map(y.map(v=>[v.id,v])),b=new Map(y.filter(v=>v.backgroundTaskId!==void 0).map(v=>[v.backgroundTaskId,v])),C=m.map(v=>{const x=A.get(v.id)??b.get(v.id),S=v.completedAt===void 0&&x?.completedAt===void 0&&x?.status==="running"&&v.status!=="running";return{...v,completedAt:v.completedAt??x?.completedAt??(S?new Date().toISOString():void 0),completedAtEstimated:v.completedAt!==void 0?void 0:x?.completedAt!==void 0?x.completedAtEstimated:S?!0:void 0}});e.tasksBySession={...e.tasksBySession,[h]:DS(C,y)},await l(h,m)}catch{}}async function l(h,g){if(e.activeSessionId!==h)return;const m=g??e.tasksBySession[h]??[],y=n.api,A=new Map;if(await Promise.all(m.map(async C=>{if((C.status==="completed"||C.status==="failed"||C.status==="cancelled")&&!o.has(C.id)&&!((C.outputLines?.length??0)>0))try{const x=await y.getTask(h,C.id,{withOutput:!0,outputBytes:zS});x.outputPreview!==void 0&&A.set(C.id,{preview:x.outputPreview,bytes:x.outputBytes}),o.add(C.id)}catch{}})),A.size===0)return;const b=e.tasksBySession[h]??[];e.tasksBySession={...e.tasksBySession,[h]:b.map(C=>{const v=A.get(C.id)??(C.backgroundTaskId!==void 0?A.get(C.backgroundTaskId):void 0);return v?{...C,outputPreview:v.preview,outputBytes:v.bytes}:C})}}async function a(h){if(e.activeSessionId!==h)return;const g=n.api;let m;try{m=await g.listTasks(h)}catch{return}const y=new Map;await Promise.all(m.map(async x=>{const S=x.status==="running",_=x.status==="completed"||x.status==="failed"||x.status==="cancelled";if(!(!S&&!_)&&!(_&&(o.has(x.id)||(x.outputLines?.length??0)>0)))try{const I=await g.getTask(h,x.id,{withOutput:!0,outputBytes:S?Nue:zS});I.outputPreview!==void 0&&y.set(x.id,{preview:I.outputPreview,bytes:I.outputBytes}),_&&o.add(x.id)}catch{}}));const A=e.tasksBySession[h]??[],b=new Map(A.map(x=>[x.id,x])),C=new Map(A.filter(x=>x.backgroundTaskId!==void 0).map(x=>[x.backgroundTaskId,x])),v=m.map(x=>{const S=b.get(x.id)??C.get(x.id),_=y.get(x.id),I=x.completedAt===void 0&&S?.completedAt===void 0&&S?.status==="running"&&x.status!=="running";return{...x,outputLines:S?.outputLines,text:S?.text,completedAt:x.completedAt??S?.completedAt??(I?new Date().toISOString():void 0),completedAtEstimated:x.completedAt!==void 0?void 0:S?.completedAt!==void 0?S.completedAtEstimated:I?!0:void 0,outputPreview:_?.preview??S?.outputPreview,outputBytes:_?.bytes??S?.outputBytes}});e.tasksBySession={...e.tasksBySession,[h]:DS(v,A)}}function u(h){i!==null&&s===h||(c(),s=h,a(h),i=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===h?a(h):c())},Lue))}function c(){i!==null&&(clearInterval(i),i=null),s=void 0,o.clear()}const d=G(0);let f=null;return qe(()=>t.value.some(h=>h.status==="running"),h=>{h&&f===null?f=setInterval(()=>{d.value=(d.value+1)%Number.MAX_SAFE_INTEGER},1e3):!h&&f!==null&&(clearInterval(f),f=null)},{immediate:!0}),qe(()=>{const h=e.activeSessionId;if(!h)return{sid:void 0,hasRunning:!1};const g=e.tasksBySession[h]??[];return{sid:h,hasRunning:g.some(m=>m.status==="running")}},({sid:h,hasRunning:g},m,y)=>{let A;g&&h!==void 0?u(h):h!==void 0?A=setTimeout(()=>{(e.tasksBySession[h]??[]).some(C=>C.status==="running")||c()},1500):c(),y(()=>{A!==void 0&&clearTimeout(A)})},{deep:!0,immediate:!0}),{taskClock:L(()=>d.value),loadTasksForSession:r}}function Due(e,t){const{api:n,pushOperationFailure:i,nextOptimisticMsgId:s,connectEventsIfNeeded:o,getEventConn:r,resolveThinkingForPrompt:l,refreshSessionStatus:a}=t,u=G({}),c=L(()=>{const q=e.activeSessionId;if(!q)return null;const j=u.value[q];return j?{parentId:q,agentId:j.agentId}:null}),d=L(()=>c.value?.parentId??null),f=L(()=>c.value!==null),h=L(()=>{const q=c.value;return q?!!e.sideChatSendingByAgent[q.agentId]:!1}),g=L(()=>{const q=c.value;return q?e.sideChatSendingByAgent[q.agentId]?!0:(e.tasksBySession[q.parentId]??[]).some(j=>j.id===q.agentId&&j.status==="running"):!1}),m=q=>n.getFileUrl(q),y=[],A=_D(),b=L(()=>{const q=c.value;return q?A({messages:e.sideChatMessagesByAgent[q.agentId]??[],approvals:y,getFileUrl:m,sessionActive:g.value}):[]});function C(q,j){e.sideChatMessagesByAgent[q]=j(e.sideChatMessagesByAgent[q]??[])}function v(q,j){C(q,W=>[...W,j])}function x(q,j){C(q,W=>{const z=W.find(H=>H.id===j);return z?.promptId!==void 0||z?.userMessageId!==void 0?W:W.filter(H=>H.id!==j)})}function S(q,j){const W=e.sideChatUserMessageIdsBySession[q]??[];W.includes(j)||(e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[q]:[...W,j]})}function _(q,j,W,z){C(q,H=>{const ee=H.findIndex(Z=>Z.id===j);if(ee===-1)return H;const V=H.findIndex((Z,pe)=>pe!==ee&&Z.role==="user"&&(Z.id===z||Z.userMessageId===z||Z.promptId===W)),ie=H[ee],se=V===-1?ie:H[V];return H.flatMap((Z,pe)=>pe===V?[]:pe!==ee?[Z]:[{...se,id:ie.id,promptId:W,userMessageId:z,metadata:{...se.metadata,...ie.metadata}}])})}function I(q,j){S(j.sessionId,j.userMessageId??j.id),C(q,W=>{const z=W.findIndex(V=>V.role==="user"&&(V.userMessageId===(j.userMessageId??j.id)||V.promptId!==void 0&&V.promptId===j.promptId));if(z===-1)return[...W,j];const H=W[z],ee=[...W];return ee[z]={...j,id:H.id,promptId:j.promptId??H.promptId,userMessageId:j.userMessageId??j.id,metadata:{...j.metadata,...H.metadata}},ee})}function M(q,j,W){W&&C(q,z=>{const H=z.at(-1);if(H?.role==="assistant"){const ee=H.content[0],V=ee?.type==="text"?ee.text:"";return[...z.slice(0,-1),{...H,content:[{type:"text",text:`${V}${W}`}]}]}return[...z,{id:s(),sessionId:j,role:"assistant",content:[{type:"text",text:W}],createdAt:new Date().toISOString()}]})}function $(q,j,W){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[q]:!1},!W)return;const H=(e.sideChatMessagesByAgent[q]??[]).at(-1);(H?.role==="assistant"&&H.content[0]?.type==="text"?H.content[0].text:"").trim().length>0||M(q,j,W)}async function D(q){const j=e.activeSessionId;return j?T(j,q):!1}async function T(q,j){if(!u.value[q]){let W;try{({agentId:W}=await n.startBtw(q))}catch(z){return i("openSideChat",z,{sessionId:q}),!1}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[W]:e.sideChatMessagesByAgent[W]??[]},u.value={...u.value,[q]:{agentId:W}},o(),r()?.markSideChannelAgent(q,W)}return j&&j.trim()?N(q,j.trim()):!0}async function N(q,j){const W=u.value[q],z=j.trim();if(!W||!z)return!1;const H=q,ee=W.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[ee]:!0};const V=s(),ie={id:V,sessionId:H,role:"user",content:[{type:"text",text:z}],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};v(ee,ie);let se,Z=!1;try{const pe=e.sessions.find(X=>X.id===H),re=(pe?.model&&pe.model.length>0?pe.model:e.defaultModel)??void 0,fe=await l(H,re)??e.thinking;se=e.pendingThinkingBySession[H],Z=!0;const Ee=await n.submitPrompt(H,{content:[{type:"text",text:z}],agentId:ee,model:re,thinking:fe,permissionMode:e.permission,planMode:e.planModeBySession[H]??!1,swarmMode:e.swarmModeBySession[H]??!1});return fe!==void 0&&Xa(e,H,se),_(ee,V,Ee.promptId,Ee.userMessageId),S(H,Ee.userMessageId),!0}catch(pe){return Xa(e,H,se)&&a(H),i("sendSideChatPrompt",pe,{sessionId:H}),x(ee,V),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[ee]:!1},!(!Z||pe instanceof Wu)}}function O(){const q=e.activeSessionId;if(!q)return;const{[q]:j,...W}=u.value;u.value=W}async function P(q){const j=c.value;return j?N(j.parentId,q):!1}function R(q){if(!u.value[q])return;const{[q]:j,...W}=u.value;u.value=W}return{sideChatTargetBySession:u,sideChatSessionId:d,sideChatVisible:f,sideChatSending:h,sideChatRunning:g,sideChatTurns:b,appendSideChatAssistantText:M,finishSideChatAgent:$,reconcileSideChatUserMessage:I,openSideChat:D,openSideChatOn:T,closeSideChat:O,sendSideChatPrompt:P,clearSideChatForSession:R}}/*! - * pinia v4.0.3 - * (c) 2026 Eduardo San Martin Morote - * @license MIT - */let w$;const Vy=e=>w$=e,x$=Symbol();function RS(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}function $ue(){const e=r5(!0),t=e.run(()=>G({}));let n=[],i=[];const s=xt({install(o){Vy(s),s._a=o,o.provide(x$,s),o.config.globalProperties.$pinia=s,i.forEach(r=>n.push(r)),i=[]},use(o){return this._a?n.push(o):i.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const zb=()=>{};function OS(e,t,n,i=zb){e.add(t);const s=()=>{e.delete(t)&&i()};return!n&&M0()&&Xd(s),s}function Mf(e,...t){e.forEach(n=>{n(...t)})}const Bue=e=>e(),PS=Symbol(),t3=Symbol();function Rb(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,i)=>e.set(i,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!Object.hasOwn(t,n))continue;const i=t[n],s=e[n];RS(s)&&RS(i)&&Object.hasOwn(e,n)&&!Hi(i)&&!ga(i)?e[n]=Rb(s,i):e[n]=i}return e}const zue=Symbol();function Rue(e){return!e||typeof e!="object"||!Object.hasOwn(e,zue)}const{assign:Tu}=Object;function Oue(e){return!!(Hi(e)&&e.effect)}function Pue(e,t,n,i){const{state:s,actions:o,getters:r}=t,l=n.state.value[e];let a;function u(){l||(n.state.value[e]=s?s():{});const c=uW(n.state.value[e]);return Tu(c,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=xt(L(()=>{Vy(n);const h=n._s.get(e);return r[f].call(h,h)})),d),{}))}return a=S$(e,u,t,n,i,!0),a}function S$(e,t,n={},i,s,o){let r;const l=Tu({actions:{}},n),a={deep:!0};let u,c,d=new Set,f=new Set,h;const g=i.state.value[e];!o&&!g&&(i.state.value[e]={});let m;function y(_){let I;u=c=!1,typeof _=="function"?(_(i.state.value[e]),I={type:"patch function",storeId:e,events:h}):(Rb(i.state.value[e],_),I={type:"patch object",payload:_,storeId:e,events:h});const M=m=Symbol();kt().then(()=>{m===M&&(u=!0)}),c=!0,Mf(d,I,i.state.value[e])}const A=o?function(){const{state:I}=n,M=I?I():{};this.$patch($=>{Tu($,M)})}:zb;function b(){r.stop(),d.clear(),f.clear(),i._s.delete(e)}const C=(_,I="")=>{if(PS in _)return _[t3]=I,_;const M=function(){Vy(i);const $=Array.from(arguments),D=new Set,T=new Set;function N(R){D.add(R)}function O(R){T.add(R)}Mf(f,{args:$,name:M[t3],store:x,after:N,onError:O});let P;try{P=_.apply(this&&this.$id===e?this:x,$)}catch(R){throw Mf(T,R),R}return P instanceof Promise?P.then(R=>(Mf(D,R),R)).catch(R=>(Mf(T,R),Promise.reject(R))):(Mf(D,P),P)};return M[PS]=!0,M[t3]=I,M},v={_p:i,$id:e,$onAction:OS.bind(null,f),$patch:y,$reset:A,$subscribe(_,I={}){if(d.has(_))return zb;const M=OS(d,_,I.detached,()=>$()),$=r.run(()=>qe(()=>i.state.value[e],D=>{(I.flush==="sync"?c:u)&&_({storeId:e,type:"direct",events:h},D)},Tu({},a,I)));return M},$dispose:b},x=Ss(v);i._s.set(e,x);const S=(i._a&&i._a.runWithContext||Bue)(()=>i._e.run(()=>(r=r5()).run(()=>t({action:C}))));for(const _ in S){const I=S[_];Hi(I)&&!Oue(I)||ga(I)?o||(g&&Rue(I)&&(Hi(I)?I.value=g[_]:((I instanceof Set||I instanceof Map)&&I.clear(),Rb(I,g[_]))),i.state.value[e][_]=I):typeof I=="function"&&(S[_]=C(I,_),l.actions[_]=I)}return Tu(x,S),Tu(Vn(x),S),Object.defineProperty(x,"$state",{get:()=>i.state.value[e],set:_=>{y(I=>{Tu(I,_)})}}),i._p.forEach(_=>{const I=r.run(()=>_({store:x,app:i._a,pinia:i,options:l}));Tu(x,I)}),g&&o&&n.hydrate&&n.hydrate(x.$state,g),u=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function R0(e,t,n){let i;const s=typeof t=="function";i=s?n:t;function o(r,l){const a=AW();return r=r||(a?cn(x$,null):null),r&&Vy(r),r=w$,r._s.has(e)||(s?S$(e,t,i,r):Pue(e,i,r)),r._s.get(e)}return o.$id=e,o}const jue={api:()=>{throw new Error("[@moonshot-ai/app-client] client deps not installed — call setKimiClientDeps() at app bootstrap")},t:e=>e},Hl=globalThis.__kimiAppClientDeps??={current:jue};function Hue(e){Hl.current=e}const Wue=new Proxy({},{get(e,t){return Hl.current.api()[t]}});function Pt(){return Wue}function si(e,t){return Hl.current.t(e,t)}function que(e,t){Hl.current.traceClientEvent?.(e,t)}function dl(e,t){Hl.current.traceKeyEvent?.(e,t)}function Uue(){return Hl.current.sessionExportTraceToJsonl?.()??""}function jS(e){Hl.current.onSessionDestroyed?.(e)}function Kue(e,t,n){Hl.current.onWorkspaceDestroyed?.(e,t,n)}function Vue(e){return Hl.current.consumeSessionIntent?.(e)??e}function Zue(e){return Hl.current.onPluginsShelfEvent?(Hl.current.onPluginsShelfEvent(e),!0):!1}const qh=$ue(),_$=hn.starredModels;function Gue(){try{const e=To(_$);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function Que(e){try{Js(_$,JSON.stringify(e))}catch{}}const Yue=R0("kimi.models",()=>{const e=G([]),t=G(Gue()),n=G([]),i=G({}),s=G({}),o=G({}),r=G({}),l=new Set,a=new Set,u=G(null);function c(b){e.value=b}function d(b){n.value=b}function f(b){u.value=b}function h(b,C){i.value={...i.value,[b]:C}}function g(b,C){s.value={...s.value,[b]:C}}function m(b){const C=new Set(t.value);C.has(b)?C.delete(b):C.add(b),t.value=Array.from(C),Que(t.value)}async function y(b){if(l.has(b))return;l.add(b);const C={...o.value};delete C[b],o.value=C;try{const v=await Pt().listSkills(b);h(b,v)}catch{}finally{l.delete(b),o.value={...o.value,[b]:!0}}}async function A(b){if(a.has(b))return;a.add(b);const C={...r.value};delete C[b],r.value=C;try{const v=await Pt().listSkillsForWorkspace(b);g(b,v)}catch{}finally{a.delete(b),r.value={...r.value,[b]:!0}}}return{models:e,starredModelIds:t,providers:n,draftModel:u,skillsBySession:i,skillsByWorkspace:s,skillsFetchedBySession:o,skillsFetchedByWorkspace:r,setModels:c,setProviders:d,setDraftModel:f,setSkillsForSession:h,setSkillsForWorkspace:g,toggleStarModel:m,loadSkillsForSession:y,loadSkillsForWorkspace:A}});function Ob(){return Yue(qh)}const HS=new Error("profile persist failed");function Jue(e,t){const{api:n,pushOperationFailure:i,refreshSessionStatus:s,persistSessionProfile:o,savePlanModeToStorage:r,activity:l,updateSession:a,updateSessionMessages:u,loadConfig:c,checkAuth:d,beginLocalTurn:f,settleLocalTurn:h}=t,g=Ob();function m(se){if(!(se==null||se.length===0))return g.models.find(Z=>Z.id===se)??g.models.find(Z=>Z.model===se)}function y(){const se=e.activeSessionId?e.sessions.find(pe=>pe.id===e.activeSessionId):void 0,Z=se===void 0?g.draftModel??e.defaultModel:se.model||e.defaultModel;return m(Z)?.id??Z??void 0}function A(se){if(se===void 0)return;const Z=m(se);return Z===void 0?void 0:i0(Z)}function b(se,Z){const pe=se==null?void 0:e.thinkingBySession[se];return pe!==void 0&&Loe(Z,pe)?pe:i0(Z)}function C(se,Z){if(Z===void 0)return;const pe=m(Z);return pe===void 0?void 0:b(se,pe)}async function v(se,Z){return se!=null&&e.thinkingBySession[se]===void 0&&await s(se),C(se,Z)}function x(se){e.thinking=se;const Z=e.activeSessionId;return se!==void 0&&Z!==null&&Z!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Z]:se},pb(e,Z)),se}qe([()=>e.activeSessionId,()=>y(),()=>{const se=e.activeSessionId;return se==null?void 0:e.thinkingBySession[se]}],()=>{const se=m(y());se!==void 0&&(e.thinking=b(e.activeSessionId,se))});function S(se){n.setConfig({thinking:Noe(se,m(y())?.supportEfforts)}).catch(Z=>i("setConfig",Z))}async function _(){try{g.setModels(await n.listModels());const se=m(y());se!==void 0&&(e.thinking=b(e.activeSessionId,se))}catch(se){i("loadModels",se)}}async function I(){try{g.setProviders(await n.listProviders())}catch(se){i("loadProviders",se)}}async function M(se){const Z=e.activeSessionId,pe=m(se),re=e.thinking,fe=Z?e.sessions.find(Y=>Y.id===Z)?.model:void 0,Ee=y()!==(pe?.id??se),X=Foe(pe,re,Ee);if(!Z)return g.setDraftModel(se),e.thinking=X,X!==re&&X!==void 0&&S(X),!0;a(Z,Y=>({...Y,model:se}));let we;X!==re&&(e.thinking=X,X!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Z]:X},we=pb(e,Z)));try{await n.updateSession(Z,{model:se,thinking:X!==re?X:void 0})}catch(Y){return a(Z,le=>({...le,model:fe??le.model})),X!==re&&(e.thinking=re,re!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Z]:re}),Xa(e,Z,we)&&s(Z)),i("setModel",Y,{sessionId:Z}),!1}return X!==re&&X!==void 0&&S(X),Xa(e,Z,we),await s(Z),!0}async function $(se,Z,pe,re,fe){const Ee=re??e.activeSessionId;if(!Ee)return!1;const X=l.value==="idle"&&!e.inFlightBySession[Ee],we=`msg_skill_opt_${Date.now().toString(36)}`,Y=X?f(Ee):void 0;let le=!1;if(X){e.inFlightBySession={...e.inFlightBySession,[Ee]:!0};const Ce={id:we,sessionId:Ee,role:"user",content:[{type:"text",text:`/${se}${Z?` ${Z}`:""}`},...rv(pe)],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:se,skillArgs:Z}}};u(Ee,ae=>[...ae,Ce])}try{if(fe?.skipThinkingPersist!==!0){const Ce=e.sessions.find(ne=>ne.id===Ee)?.model,ae=(Ce&&Ce.length>0?Ce:e.defaultModel)??void 0,oe=e.planArmedBySession[Ee]??!1;if(!await o({thinking:await v(Ee,ae)??e.thinking,swarmMode:e.swarmModeBySession?.[Ee]??!1,permissionMode:e.permission,...oe?{planMode:!0}:{}},Ee))throw HS;oe&&(e.planArmedBySession={...e.planArmedBySession,[Ee]:!1},r(),e.planModeBySession={...e.planModeBySession,[Ee]:!0})}return le=!0,await n.activateSkill(Ee,se,Z,rv(pe)),!0}catch(Ce){return X&&(e.inFlightBySession={...e.inFlightBySession,[Ee]:!1},u(Ee,ae=>ae.filter(oe=>oe.id!==we))),Ce!==HS&&i("activateSkill",Ce,{sessionId:Ee}),!(!le||Ce instanceof Wu)}finally{Y!==void 0&&h(Ee,Y)}}async function D(se){return n.getProvider(se)}async function T(se){try{return await n.addProvider(se),await Promise.all([I(),_(),c()]),await d(),null}catch(Z){return Ua("[kimi-code] operation failed: addProvider",Z),Z instanceof Error?Z.message:String(Z)}}async function N(se,Z){try{return await n.updateProvider(se,Z),await Promise.all([I(),_(),c()]),null}catch(pe){return Ua("[kimi-code] operation failed: updateProvider",pe),pe instanceof Error?pe.message:String(pe)}}async function O(se){try{const Z=await n.deleteProvider(se);return await Promise.all([I(),_(),c()]),await d(),Z}catch(Z){return i("deleteProvider",Z),null}}async function P(se){try{const Z=await n.refreshProvider(se);for(const pe of Z.failed)i("refreshProvider",new Error(pe.reason),{message:pe.provider});await Promise.all([I(),_(),c()])}catch(Z){i("refreshProvider",Z)}}async function R(){try{const se=await n.refreshAllProviders();for(const Z of se.failed)i("refreshAllProviders",new Error(Z.reason),{message:Z.provider});await Promise.all([I(),_(),c()])}catch(se){i("refreshAllProviders",se)}}async function q(){try{return{kind:"ok",items:await n.listCatalogProviders()}}catch(se){return se instanceof Wu&&se.code===void 0?{kind:"unsupported"}:(Ua("[kimi-code] operation failed: loadCatalogProviders",se),{kind:"error"})}}async function j(se){try{return await n.importCatalogProvider(se),await Promise.all([I(),_(),c()]),await d(),null}catch(Z){return Ua("[kimi-code] operation failed: importCatalogProvider",Z),Z instanceof Error?Z.message:String(Z)}}async function W(se){try{const Z=await n.importCustomRegistry(se);return await Promise.all([I(),_(),c()]),await d(),Z}catch(Z){return Ua("[kimi-code] operation failed: importCustomRegistry",Z),Z instanceof Error?Z.message:String(Z)}}async function z(){try{return await n.startOAuthLogin()}catch{return null}}async function H(){try{return await n.pollOAuthLogin()}catch(se){return ya("[kimi-code] pollOAuthLogin failed",se),null}}async function ee(){try{await n.cancelOAuthLogin()}catch{}}async function V(){try{return await n.getUsage()}catch(se){return{kind:"error",message:se instanceof Error?se.message:String(se)}}}function ie(se){const Z=x(se);o({thinking:Z}),Z!==void 0&&S(Z)}return{models:L(()=>g.models),starredModelIds:L(()=>g.starredModelIds),providers:L(()=>g.providers),draftModel:L(()=>g.draftModel),skillsBySession:L(()=>g.skillsBySession),skillsByWorkspace:L(()=>g.skillsByWorkspace),skillsFetchedBySession:L(()=>g.skillsFetchedBySession),skillsFetchedByWorkspace:L(()=>g.skillsFetchedByWorkspace),loadSkillsForSession:g.loadSkillsForSession,loadSkillsForWorkspace:g.loadSkillsForWorkspace,loadModels:_,loadProviders:I,setModel:M,thinkingLevelForModelId:A,thinkingLevelForSessionId:C,resolveThinkingForPrompt:v,toggleStarModel:g.toggleStarModel,activateSkill:$,addProvider:T,updateProvider:N,deleteProvider:O,getProvider:D,loadCatalogProviders:q,importCatalogProvider:j,importCustomRegistry:W,refreshProvider:P,refreshAllProviders:R,startOAuthLogin:z,pollOAuthLogin:H,cancelOAuthLogin:ee,getUsage:V,setThinking:ie}}const Fl=G(null),fh=G(!1),Xue=L(()=>Fl.value!==null);function f6(e){const t=Fl.value;!t||fh.value||(Fl.value=null,t.resolve(e))}async function ece(){const e=Fl.value;if(!(!e||fh.value)){if(!e.action){f6(!0);return}fh.value=!0;try{await e.action(),Fl.value===e&&(Fl.value=null),e.resolve(!0)}catch(t){Fl.value===e&&(Fl.value=null),e.reject(t)}finally{fh.value=!1}}}function tce(e){return fh.value?Promise.resolve(!1):(Fl.value&&f6(!1),new Promise((t,n)=>{Fl.value={...e,resolve:t,reject:n}}))}function Ic(){return{current:Fl,busy:fh,isConfirmOpen:Xue,confirm:tce,settle:f6,runAction:ece}}const nce=R0("kimi.approvals",()=>{const e=G({}),t=G({});function n(c){vr(e.value,c)}function i(c){vr(t.value,c)}function s(c,d){e.value[c]=d}function o(c,d){t.value[c]=d}function r(c,d){const f=e.value[c]??[];e.value[c]=f.filter(h=>h.approvalId!==d)}function l(c,d){const f=t.value[c]??[];t.value[c]=f.filter(h=>h.questionId!==d)}function a(c){delete e.value[c]}function u(c){delete t.value[c]}return{approvalsBySession:e,questionsBySession:t,applyApprovalsDiff:n,applyQuestionsDiff:i,setSessionApprovals:s,setSessionQuestions:o,removePendingApproval:r,removePendingQuestion:l,clearSessionApprovals:a,clearSessionQuestions:u}});function xo(){return nce(qh)}const ice=R0("kimi.sessions",()=>{const e=G([]),t=G(void 0),n=G(k$());function i(h){e.value=h}function s(h,g){e.value=e.value.map(m=>m.id===h?g(m):m)}function o(h){e.value=JD(e.value,h)}function r(h){e.value=[...e.value,h]}function l(h){e.value=e.value.filter(g=>g.id!==h)}function a(h){t.value=h}function u(h){const g=Zoe(n.value,h);g!==n.value&&(n.value=g,J4(g))}function c(h){const g=Goe(n.value,h);g!==n.value&&(n.value=g,J4(g))}function d(h){const g=new Set(h),m=n.value.filter(y=>!g.has(y));m.length!==n.value.length&&(n.value=m,J4(m))}function f(h){n.value.includes(h)?c(h):u(h)}return{sessions:e,activeSessionId:t,pinnedSessionIds:n,setSessions:i,updateSession:s,upsertSessionSorted:o,appendSession:r,removeSession:l,setActiveSessionId:a,pinSession:u,unpinSession:c,unpinSessions:d,togglePinSession:f}});function Wo(){return ice(qh)}const sce=40409;function oce(e){return!e||e.state!=="open"&&e.state!=="closed"&&e.state!=="merged"?null:{number:e.number,state:e.state,url:e.url}}function rce(e,t){return e==null||t==null?e==null&&t==null:e.number===t.number&&e.state===t.state&&e.url===t.url}const lce=R0("kimi.files",()=>{const e=G(null),t=G([]),n=G(!1),i=G(null),s=G(!1),o=G({});async function r(d){const f=Wo().activeSessionId;if(!f)return null;try{const g=await Pt().readFile(f,{path:d});return{path:g.path,content:g.content,encoding:g.encoding,mime:g.mime,languageId:g.languageId,isBinary:g.isBinary,size:g.size,lineCount:g.lineCount}}catch(h){if(ya("[kimi-code] readFileContent failed for",d,h),zs(h)&&h.code===sce)throw h;return null}}async function l(d){const f=Wo().activeSessionId;if(f){e.value=d,t.value=[],i.value=null,s.value=!1,n.value=!0;try{const g=await Pt().getFileDiff(f,d);if(e.value!==d||Wo().activeSessionId!==f)return;const m=Dse(g.diff);if(t.value=m,m.length===0){const A=await r(d).catch(()=>null);if(e.value!==d||Wo().activeSessionId!==f)return;s.value=A!==null&&A.size===0;return}n.value=!1;const y=await Cse(m,{truncated:g.truncated,readNewText:async()=>{const A=await r(d).catch(()=>null);return!A||A.isBinary||A.encoding!=="utf-8"?null:A.content}});if(e.value!==d||Wo().activeSessionId!==f)return;i.value=y}catch(h){e.value===d&&(t.value=[]),ya("[loadFileDiff] diff unavailable for",d,h)}finally{e.value===d&&(n.value=!1)}}}function a(){e.value=null,t.value=[],i.value=null,s.value=!1,n.value=!1}async function u(d){try{const h=await Pt().getGitStatus(d);o.value[d]=h;const g=oce(h.pullRequest);Wo().updateSession(d,m=>rce(m.pullRequest,g)?m:{...m,pullRequest:g})}catch{}}function c(d){delete o.value[d]}return{selectedDiffPath:e,fileDiffLines:t,fileDiffLoading:n,fileDiffTexts:i,fileDiffEmptyFile:s,gitStatusBySession:o,readFileContent:r,loadFileDiff:l,clearFileDiff:a,loadGitStatus:u,clearSessionGitStatus:c}});function Ao(){return lce(qh)}const ace=50,e2=5,h6=5,qu=50,uce=40401,cce=40402,dce=40410,WS=40409,fce=40902,hce=2e3,pce=10;function n3(e){return zs(e)&&e.code===fce}const gce=40904;function mce(e){return zs(e)&&e.code===gce}const Jc=Ss({}),am=Ss({}),i3=Ss({}),na=Ss(new Set),Zy=new Map,Wd=new Map,lv=new Map;let vce=0;const ad=new Map,yce=3,kce=3,t2=new Map;function bce(e){const t=t2.get(e);if(!(t!==void 0&&(t.done||t.attempts>=kce))){t2.set(e,{attempts:(t?.attempts??0)+1,done:!1});try{Pt().generateSessionTitle(e,{source:"first_turn"}).then(n=>{n!==null&&t2.set(e,{attempts:0,done:!0})}).catch(()=>{})}catch{}}}let qS=0;function Ace(){return qS+=1,`${Date.now().toString(36)}-${qS}`}function Cce(e){return{generation:Zy.get(e)??0,pending:(Wd.get(e)?.size??0)>0}}function Pb(e){const t=++vce;Zy.set(e,t);const n=Wd.get(e)??new Set;return n.add(t),Wd.set(e,n),t}function jb(e,t){const n=Wd.get(e);if(n===void 0||(n.delete(t),n.size>0))return;Wd.delete(e);const i=lv.get(e);lv.delete(e),i?.()}function wce(e){Zy.delete(e),Wd.delete(e),lv.delete(e),ad.delete(e)}function xce(e,t){return!t.pending&&t.generation===(Zy.get(e)??0)}function Sce(e,t){if((Wd.get(e)?.size??0)===0){t();return}lv.set(e,t)}function _ce(e,t){const{confirm:n}=Ic(),{taskPoller:i,sideChat:s,modelProvider:o,pushOperationFailure:r,notify:l,activity:a,sessionsKnownEmpty:u,setSessions:c,updateSession:d,upsertSessionSorted:f,appendSession:h,forgetSession:g,unpinSessions:m,setActiveSessionId:y,updateSessionMessages:A,nextOptimisticMsgId:b,getEventConn:C,syncSessionFromSnapshot:v,reopenSession:x,hasLoadedMessages:S,refreshSessionStatus:_,refreshSessionGoal:I,refillSessionGoalOnReload:M,refreshSessionPlans:$,settlePlanReviewLocally:D,persistSessionProfile:T,mergedWorkspaces:N,workspacesView:O,status:P,workspaceIdForSession:R,savePermissionToStorage:q,savePlanModeToStorage:j,saveSwarmModeToStorage:W,saveGoalModeToStorage:z,draftModes:H,saveUnread:ee,saveActiveWorkspaceToStorage:V,saveHiddenWorkspacesToStorage:ie,goalErrorMessage:se,initialized:Z,connectIssue:pe}=t;let re=0,fe=!1;function Ee(U,me,ke,ze){A(U,Ye=>{const Ve=Ye.findIndex(Gt=>Gt.id===me);if(Ve===-1)return Ye;const wt=Ye.findIndex((Gt,Cn)=>Cn!==Ve&&Gt.role==="user"&&(Gt.id===ze||Gt.userMessageId===ze||Gt.promptId===ke)),pt=Ye[Ve],Ht=wt===-1?pt:Ye[wt];return Ye.flatMap((Gt,Cn)=>Cn===wt?[]:Cn!==Ve?[Gt]:[{...Ht,id:pt.id,promptId:ke,userMessageId:ze,metadata:{...Ht.metadata,...pt.metadata}}])})}async function X(U){if(e.messagesLoadingMoreBySession[U])return;const me=e.messagesBySession[U];if(!me||me.length===0)return;const ke=me[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[U]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[U]:!1};try{const ze=await Pt().listMessages(U,{beforeId:ke,pageSize:ace}),Ye=[...ze.items].reverse();A(U,Ve=>[...Ye,...Ve]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[U]:ze.hasMore}}catch(ze){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[U]:!0},r("loadOlderMessages",ze,{sessionId:U})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[U]:!1}}}function we(U,me){i.loadTasksForSession(U),Ao().loadGitStatus(U),me?.skipStatus!==!0&&_(U),I(U),$(U),Object.prototype.hasOwnProperty.call(o.skillsBySession.value,U)||o.loadSkillsForSession(U)}let Y=0;async function le(U){try{const me=await Pt().getUserInfo();if(U!==Y||e.managedProviderStatus!=="authenticated")return;e.managedUserInfo=me.kind==="ok"?me.userInfo:null,me.kind==="ok"?e.managedMembership=me.userInfo.userLevel===pce?"free":"member":e.managedMembership=me.status===402?"free":null}catch{if(U!==Y)return;e.managedProviderStatus==="authenticated"&&(e.managedUserInfo=null,e.managedMembership=null)}}async function Ce(){e.managedProviderStatus==="authenticated"&&await le(++Y)}async function ae(){const U=++Y;try{const ke=await Pt().getAuth();return e.authReady=ke.ready,e.defaultModel=ke.defaultModel,e.managedProviderStatus=ke.managedProvider?.status??null,e.managedProviderStatus==="authenticated"?le(U):(e.managedUserInfo=null,e.managedMembership=null),pe.value=null,"proceed"}catch(me){return zs(me)&&(me.code===401||me.code===vF)?(pe.value=null,"server-auth-required"):(pe.value=(me instanceof Error?me.message:String(me)).slice(0,140),"retry")}}async function oe(){let U=!0;for(;;){const me=await ae();if(me!=="retry")return me;U&&(pe.value=null,U=!1),await new Promise(ke=>{setTimeout(ke,hce)})}}async function Q(){try{const U=Pt();e.config=await U.getConfig()}catch{}}async function ne(U){try{const ke=await Pt().setConfig(U);return e.config=ke,e.defaultModel=ke.defaultModel??null,!0}catch(me){return r("setConfig",me),!1}}const ge=100,Ae=720*60*1e3;async function _e(U){const me=Pt(),ke=[];let ze,Ye;for(;U?.shouldContinue?.()!==!1;){let Ve;try{Ve=await me.listSessions({pageSize:ge,beforeId:ze,excludeEmpty:!0})}catch(wt){if(ke.length===0)throw wt;Ye=wt;break}if(ke.push(...Ve.items),!Ve.hasMore||Ve.items.length===0)break;ze=Ve.items[Ve.items.length-1].id}return{sessions:ke,error:Ye}}function Ke(U){const me=new Map(e.sessions.map(ke=>[ke.id,ke]));c(U.map(ke=>{const ze=me.get(ke.id);if(ze===void 0)return ke;const Ye=Z2(ke.usage)&&!Z2(ze.usage),Ve=ke.pullRequest??ze.pullRequest;return!Ye&&Ve===ke.pullRequest?ke:{...ke,usage:Ye?ze.usage:ke.usage,pullRequest:Ve}}))}function xe(U){const me=[...U],ke=new Set(me.map(ze=>ze.id));for(const ze of e.sessions)ke.has(ze.id)||(me.push(ze),ke.add(ze.id));return me.sort((ze,Ye)=>new Date(Ye.updatedAt).getTime()-new Date(ze.updatedAt).getTime()),me}async function Ne(U){const me=Pt(),ke=[],ze=Date.now(),Ye=Gt=>ze-new Date(Gt.updatedAt).getTime();let Ve,wt=!1,pt=!0,Ht;for(;;){let Gt;try{Gt=await me.listSessions({workspaceId:U,pageSize:e2,beforeId:Ve,excludeEmpty:!0})}catch(jt){if(pt)throw jt;Ht=jt,wt=!0;break}if(wt=Gt.hasMore,Gt.items.length===0)break;const Cn=Gt.items[Gt.items.length-1],Qn=Ye(Cn)>=Ae;if(!pt&&Qn){const jt=Gt.items.findIndex(Bn=>Ye(Bn)>=Ae),Rt=jt>=0?jt+1:Gt.items.length;ke.push(...Gt.items.slice(0,Rt)),wt=Gt.hasMore||RtNe(jt.id))),ke=[],ze=new Set,Ye=new Map,Ve=new Set;let wt;for(let jt=0;jtVe.has(jt.id)).map(jt=>jt.root)),Ht=new Set(U.map(jt=>jt.id));for(const jt of e.sessions)!(jt.workspaceId!==void 0&&Ht.has(jt.workspaceId)?Ve.has(jt.workspaceId):pt.has(jt.cwd)||Ve.has(R(jt)))||ze.has(jt.id)||(ke.push(jt),ze.add(jt.id));const Gt={},Cn={},Qn={};for(const{id:jt}of U){const Rt=Ye.get(jt);if(Rt===void 0){const Bn=e.sessionsHasMoreByWorkspace[jt],ei=e.sessionsCursorByWorkspace[jt],ji=e.sessionsInitialCountByWorkspace[jt];Bn!==void 0&&(Gt[jt]=Bn),ei!==void 0&&(Cn[jt]=ei),ji!==void 0&&(Qn[jt]=ji);continue}Gt[jt]=Rt.hasMore,Cn[jt]=Rt.items.length>0?Rt.items[Rt.items.length-1].id:void 0,Qn[jt]=Math.max(Rt.items.length,e2)}return e.sessionsHasMoreByWorkspace=Gt,e.sessionsCursorByWorkspace=Cn,e.sessionsInitialCountByWorkspace=Qn,e.sessionsFullyLoaded=!1,ke.sort((jt,Rt)=>new Date(Rt.updatedAt).getTime()-new Date(jt.updatedAt).getTime()),Ve.size>0&&r("load",wt),ke}async function ut(U){if(!e.sessionsLoadingMoreByWorkspace[U]&&e.sessionsHasMoreByWorkspace[U]!==!1&&e.sessionsCursorByWorkspace[U]!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[U]:!0};try{let me=e.sessionsCursorByWorkspace[U],ke;for(let Ve=0;Ve<3&&me!==void 0&&(ke=await Pt().listSessions({workspaceId:U,pageSize:h6,beforeId:me,excludeEmpty:!0}),e.sessionsCursorByWorkspace[U]!==me);Ve+=1)ke=void 0,me=e.sessionsCursorByWorkspace[U];if(ke===void 0)return;const ze=new Set(e.sessions.map(Ve=>Ve.id)),Ye=ke.items.filter(Ve=>!ze.has(Ve.id));Ye.length>0&&c([...e.sessions,...Ye]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[U]:ke.items.length>0?ke.items[ke.items.length-1].id:me},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[U]:ke.hasMore}}catch(me){r("loadMoreSessions",me)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[U]:!1}}}}function yt(U){return e.sessions.filter(me=>!me.parentSessionId&&R(me)===U)}const Mt=5;function Ze(U,me){const ke=new Set(e.sessions.map(Ve=>Ve.id)),ze=U.items.filter(Ve=>!ke.has(Ve.id)&&(Ve.meta.last_prompt??"").length>0).map(B4);ze.length>0&&c([...e.sessions,...ze]);for(const Ve of U.items)if(ke.has(Ve.id)&&Ve.git!==void 0){const wt=Ve.git.pull_request;d(Ve.id,pt=>pt.pullRequest===wt?pt:{...pt,pullRequest:wt})}if(U.items.length>0){const Ve=Math.min(...U.items.map(wt=>wt.meta.updated_at));e.flatSessionsFrontier=me?.resetFrontier===!0||e.flatSessionsFrontier===null?Ve:Math.min(e.flatSessionsFrontier,Ve)}e.flatSessionsNextPageToken=U.nextPageToken,e.flatSessionsHasMore=U.hasMore;const Ye=new Set(O.value.map(Ve=>Ve.id));return U.items.filter(Ve=>(Ve.meta.last_prompt??"").length>0&&Ye.has(R({workspaceId:Ve.workspace.id,cwd:Ve.workspace.cwd??""}))).length}async function Ge(){const U=await Pt().listSessionsV2({pageSize:qu,include:"git"});Ze(U,{resetFrontier:!0}),e.flatSessionsSeeded=!0}async function lt(){if(!(e.flatSessionsSeeded||e.flatSessionsLoading)){e.flatSessionsLoading=!0;try{await Ge()}catch(U){r("ensureFlatSessions",U)}finally{e.flatSessionsLoading=!1}}}async function tt(){if(!(e.flatSessionsLoading||e.flatSessionsLoadingMore)&&e.flatSessionsHasMore){e.flatSessionsLoadingMore=!0;try{if(!e.flatSessionsSeeded){await Ge();return}if(e.flatSessionsNextPageToken===null)return;for(let U=0;U0)break}}catch(U){r("loadMoreFlatSessions",U)}finally{e.flatSessionsLoadingMore=!1}}}async function It(){const U=await Pt().listSessionsV2({pageSize:qu,include:"git",archived:!0}),me=new Set;e.doneSessions=U.items.filter(ke=>(ke.meta.last_prompt??"").length>0).filter(ke=>me.has(ke.id)?!1:(me.add(ke.id),!0)).map(B4),e.doneSessionsNextPageToken=U.nextPageToken,e.doneSessionsHasMore=U.hasMore}async function Ut(){if(!(e.doneSessionsSeeded||e.doneSessionsLoading)){e.doneSessionsLoading=!0;try{await It(),e.doneSessionsSeeded=!0}catch(U){r("ensureDoneSessions",U)}finally{e.doneSessionsLoading=!1}}}async function fn(){if(!(e.doneSessionsLoading||e.doneSessionsLoadingMore)&&e.doneSessionsHasMore){e.doneSessionsLoadingMore=!0;try{if(!e.doneSessionsSeeded){await It(),e.doneSessionsSeeded=!0;return}let U=3;for(;;){const me=e.doneSessionsNextPageToken;if(me===null)return;let ke;try{ke=await Pt().listSessionsV2({pageSize:qu,pageToken:me,include:"git",archived:!0})}catch(Ve){if(!Bw(Ve))throw Ve;e.doneSessionsNextPageToken=null,await It();return}const ze=new Set(e.doneSessions.map(Ve=>Ve.id)),Ye=ke.items.filter(Ve=>!ze.has(Ve.id)&&(Ve.meta.last_prompt??"").length>0).map(B4);if(Ye.length>0&&(e.doneSessions=[...e.doneSessions,...Ye]),e.doneSessionsNextPageToken=ke.nextPageToken,e.doneSessionsHasMore=ke.hasMore,U-=1,Ye.length>0||!ke.hasMore||U<=0)return}}catch(U){r("loadMoreDoneSessions",U)}finally{e.doneSessionsLoadingMore=!1}}}async function Nn(U,me,ke,ze){if(e.sessionsCursorByWorkspace[U]===me){const Ve=new Date(ke).getTime();let wt;for(const pt of e.sessions){if(R(pt)!==U)continue;const Ht=new Date(pt.updatedAt).getTime();Ht<=Ve||(wt===void 0||Ht0&&yt(U).lengthCn.id)),Gt=pt.items.filter(Cn=>!Ht.has(Cn.id));Gt.length>0&&c([...e.sessions,...Gt].sort((Cn,Qn)=>new Date(Qn.updatedAt).getTime()-new Date(Cn.updatedAt).getTime())),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[U]:pt.items.length>0?pt.items[pt.items.length-1].id:void 0},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[U]:pt.hasMore}}catch(pt){r("loadMoreSessions",pt);break}else await ut(U);if(Ye-=1,yt(U).length===wt&&e.sessionsCursorByWorkspace[U]===Ve)break}}async function Qt(){if(e.sessionsFullyLoaded)return;const U=await _e().catch(ze=>(ya("[kimi-code] loadAllSessions failed; search covers only loaded sessions",ze),null));if(U===null)return;const me=U.error===void 0?U.sessions:xe(U.sessions);if(Ke(me),e.sessionsFullyLoaded=U.error===void 0,U.error!==void 0)return;const ke={};for(const ze of e.workspaces)ke[ze.id]=!1;e.sessionsHasMoreByWorkspace=ke}async function un(){const U=await Pt().getMeta().catch(()=>null);U!==null&&(e.serverVersion=U.serverVersion,e.availableOpenInApps=U.openInApps,e.dangerousBypassAuth=U.dangerousBypassAuth,e.experimentalFlags=U.experimentalFlags,e.backend=U.backend,e.webTitle=U.webTitle)}async function Dn(){const U=Date.now();let me="accepted";dl("app:load:start"),e.loading=!0;const ke=!Z.value;let ze=!0;try{if(ke&&await oe()==="server-auth-required"){ze=!1,me="auth-required";return}const Ye=Pt();await Promise.all([Ye.getHealth().catch(()=>null),un(),o.loadModels()]),ke||await ae(),await Q(),await pn();const Ve=await et(),wt=Ve??e.sessions;if(Ve!==void 0&&Ke(Ve),!ke&&Ve!==void 0&&e.flatSessionsSeeded){e.flatSessionsSeeded=!1,e.flatSessionsNextPageToken=null,e.flatSessionsHasMore=!0,e.flatSessionsFrontier=null;try{await Ge()}catch(Rt){r("ensureFlatSessions",Rt)}}const pt=k$().filter(Rt=>!e.sessions.some(Bn=>Bn.id===Rt));if(pt.length>0){const Rt=await Promise.all(pt.map(ei=>co(ei))),Bn=pt.filter((ei,ji)=>Rt[ji]==="stale");Bn.length>0&&m(Bn)}for(const Rt of e.sessions)(Rt.mainTurnActive??Rt.busy)&&e.goalBySession[Rt.id]===void 0&&M(Rt.id);const Ht=wt[0],Gt=e.activeWorkspaceId;!(Gt!==null&&N.value.some(Rt=>Rt.id===Gt))&&Ht&&bn(R(Ht)),fo();const Qn=typeof window<"u"&&nS(window.location);Qn&&(e.mainView="sessionAdmin");const jt=typeof window<"u"?iS(window.location):void 0;!e.activeSessionId&&jt!==void 0&&(e.sessions.some(Bn=>Bn.id===jt)||await Oi(jt))&&await Pi(jt,{urlMode:"replace",skipTrack:!0}),!e.activeSessionId&&wt.length>0&&await Pi(wt[0].id,{urlMode:Qn?"none":"replace",skipTrack:!0})}catch(Ye){me="failed",r("load",Ye)}finally{e.loading=!1,ze&&(Z.value=!0),dl("app:load:complete",{status:me,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-U})}}async function pn(){try{const U=Pt(),[me,ke]=await Promise.all([U.listWorkspaces().catch(()=>[]),U.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=wn(me),e.fsHome=ke.home||null,e.recentRoots=ke.recentRoots}catch{}}function wn(U){const me=lm();return Object.keys(me).length===0?U:U.map(ke=>{const ze=me[ke.root];return ze!==void 0?{...ke,name:ze}:ke})}function bn(U){e.activeWorkspaceId=U,V(U)}function Xn(U){e.mainView="chat",bn(U);const me=e.sessions.filter(ke=>R(ke)===U);if(me.length>0){const ke=me[0];ke&&ke.id!==e.activeSessionId&&Pi(ke.id,{skipTrack:!0})}else y(void 0),Pn(void 0,"push")}function Ue(U){const me=lm()[U.root],ke=me!==void 0?{...U,name:me}:U,ze=Ml(ke.root);e.hiddenWorkspaceRoots.some(wt=>Ml(wt)===ze)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(wt=>Ml(wt)!==ze),ie(e.hiddenWorkspaceRoots));const Ye=e.workspaces.findIndex(wt=>wt.id===ke.id||wt.root===ke.root);if(Ye===-1){e.workspaces=[ke,...e.workspaces];return}const Ve=[...e.workspaces];Ve[Ye]=ke,e.workspaces=Ve}function st(U){if(U.type==="workspaceCreated"||U.type==="workspaceUpdated"){Ue(U.workspace);return}const me=e.workspaces.find(ze=>ze.id===U.workspaceId)?.root??U.root;if(me&&!e.hiddenWorkspaceRoots.includes(me)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,me],ie(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(ze=>ze.id!==U.workspaceId&&ze.root!==me),e.activeWorkspaceId===U.workspaceId||e.activeWorkspaceId===me){const ze=O.value[0]?.id??null;if(e.activeWorkspaceId=ze,ze)V(ze);else try{Tr(hn.activeWorkspace)}catch{}y(void 0),e.sessionLoading=!1,Ao().clearFileDiff(),Pn(void 0,"replace")}}function ct(){y(void 0),e.mainView="chat",Pn(void 0,"push")}function ot(U,me){me?.entry!==void 0&&(e.draftEntry=me.entry),bn(U),ct(),Ao().clearFileDiff()}async function sn(U){const me=N.value.find(Cn=>Cn.id===U);if(!me)return null;Vue("sidebar");const ke=e.thinking,ze=Pt();let Ye,Ve=me.root;try{const Cn=await ze.addWorkspace({root:me.root});Ye=Cn.id,Ve=Cn.root,Ue(Cn)}catch{}const wt=Ob().draftModel??void 0,pt=await ze.createSession({workspaceId:Ye,cwd:Ve,model:wt});Ob().setDraftModel(null);const Ht=wt!==void 0&&(!pt.model||pt.model.length===0)?{...pt,model:wt}:pt;f(Ht);const Gt=pt.id;return ke!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Gt]:ke},pb(e,Gt)),bn(pt.workspaceId??Ye??U),await Pi(pt.id,{skipTrack:!0,skipStatusRefresh:!0}),H.planMode&&(e.planArmedBySession={...e.planArmedBySession,[Gt]:!0},j()),H.swarmMode&&(e.swarmModeBySession={...e.swarmModeBySession,[Gt]:!0},W()),H.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[Gt]:!0},z()),H.planMode=!1,H.swarmMode=!1,H.goalMode=!1,Gt}async function Nt(U,me,ke){if(na.has(U))return null;na.add(U);let ze=null;try{const Ye=await sn(U);return Ye?(ze=Ye,await es(Ye,me,ke),Ye):null}catch(Ye){return r("startSessionAndSendPrompt",Ye),ze}finally{na.delete(U)}}async function Tn(U,me,ke,ze){if(na.has(U))return{sessionId:null,activated:!1};na.add(U);let Ye=null;try{const Ve=await sn(U);if(!Ve)return{sessionId:null,activated:!1};Ye=Ve;const wt=e.planArmedBySession[Ve]??!1,pt=e.swarmModeBySession[Ve]??!1,Ht=e.sessions.find(Rt=>Rt.id===Ve),Gt=(Ht?.model&&Ht.model.length>0?Ht.model:e.defaultModel)??void 0,Cn=await o.resolveThinkingForPrompt(Ve,Gt)??e.thinking;if(!await T({model:Gt,planMode:wt,swarmMode:pt,permissionMode:e.permission,thinking:Cn},Ve))return{sessionId:Ve,activated:!1};wt&&(e.planArmedBySession={...e.planArmedBySession,[Ve]:!1},j(),e.planModeBySession={...e.planModeBySession,[Ve]:!0});const jt=await o.activateSkill(me,ke,ze,Ve,{skipThinkingPersist:!0});return{sessionId:Ve,activated:jt}}catch(Ve){return r("startSessionAndActivateSkill",Ve),{sessionId:Ye,activated:!1}}finally{na.delete(U)}}async function fs(U,me){if(na.has(U))return null;na.add(U);let ke=null;try{const ze=await sn(U);return ze?(ke=ze,await s.openSideChatOn(ze,me),ze):null}catch(ze){return r("startSessionAndOpenSideChat",ze),ke}finally{na.delete(U)}}async function vi(U){const me=U.trim();if(!me)return!1;const ke=Pt();try{const ze=await ke.addWorkspace({root:me});return Ue(ze),ot(ze.id,{entry:"workspace"}),!0}catch(ze){return ya("[kimi-code] addWorkspaceByPath failed for",me,ze),!1}}async function Dt(U){try{return await Pt().browseFs(U)}catch{return{path:"",parent:null,entries:[]}}}async function Is(){try{return await Pt().getFsHome()}catch{return{home:"",recentRoots:[]}}}function Ei(U,me){if(me!=="none"&&!(typeof window>"u"||!window.history)&&window.location.pathname!==U)try{me==="push"?window.history.pushState(null,"",U):window.history.replaceState(null,"",U)}catch{}}function Pn(U,me){e.mainView==="chat"&&Ei(Ere(U),me)}function bs(){e.mainView!=="sessionAdmin"&&(e.mainView="sessionAdmin",Ei(XD,"push"))}function Lo(U){e.mainView==="sessionAdmin"&&(e.mainView="chat",Pn(e.activeSessionId,U?.urlMode??"push"))}async function Oi(U){try{const me=await Pt().getSession(U);return e.sessions.some(ke=>ke.id===me.id)||h(me),!0}catch{return!1}}async function co(U){try{const me=await Pt().getSession(U);return me.archived?"stale":(e.sessions.some(ke=>ke.id===me.id)||h(me),"ok")}catch(me){return zs(me)&&me.code===uce?"stale":"retry"}}function Wi(){if(nS(window.location)){e.mainView="sessionAdmin";return}e.mainView="chat";const U=iS(window.location);if(U===void 0){y(void 0);return}if(U!==e.activeSessionId){if(e.sessions.some(me=>me.id===U)){Pi(U,{urlMode:"none",skipTrack:!0});return}(async()=>{if(await Oi(U)){await Pi(U,{urlMode:"none",skipTrack:!0});return}const me=e.sessions[0];me?await Pi(me.id,{urlMode:"replace",skipTrack:!0}):(y(void 0),Pn(void 0,"replace"))})()}}let As=!1;function fo(){As||typeof window>"u"||(As=!0,window.addEventListener("popstate",Wi))}async function Pi(U,me){const ke=me?.source??"sidebar";if(!e.sessions.some(wt=>wt.id===U)){const wt=++re;if(!await Oi(U)||wt!==re)return}const ze=S(U),Ye=!ze&&u.has(U);u.delete(U);const Ve=e.activeSessionId!==U;try{(me?.urlMode??"push")==="push"&&(e.mainView="chat"),Pn(U,me?.urlMode??"push"),e.sessionLoading=!ze&&!Ye,y(U),!me?.skipTrack&&Ve&&void 0,e.unreadBySession[U]&&(e.unreadBySession={...e.unreadBySession,[U]:!1},ee({[U]:!1})),Ao().clearFileDiff();const wt=e.sessions.find(pt=>pt.id===U);if(wt){const pt=R(wt);e.activeWorkspaceId!==pt&&bn(pt)}if(ze){if(await x(U)==="not-found")return}else if(await v(U,{skipStatusRefresh:me?.skipStatusRefresh===!0})==="not-found")return;we(U,{skipStatus:me?.skipStatusRefresh===!0})}catch(wt){r("selectSession",wt,{sessionId:U})}finally{e.activeSessionId===U&&(e.sessionLoading=!1)}}async function es(U,me,ke){const ze=Pb(U);e.inFlightBySession={...e.inFlightBySession,[U]:!0};const Ye=b();let Ve=e.pendingThinkingBySession[U];try{const wt=Pt(),pt=[];if(me&&pt.push({type:"text",text:me}),pt.push(...rv(ke)),pt.length===0)return e.inFlightBySession={...e.inFlightBySession,[U]:!1},"rejected";const Ht={id:Ye,sessionId:U,role:"user",content:pt,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};A(U,$o=>[...$o,Ht]);const Gt=e.sessions.find($o=>$o.id===U),Cn=(Gt?.model&&Gt.model.length>0?Gt.model:e.defaultModel)??void 0,Qn=e.planArmedBySession[U]??!1,jt=Qn||(e.planModeBySession[U]??!1),Rt=e.swarmModeBySession[U]??!1,Bn=e.goalModeBySession[U]??!1;Qn&&(e.planArmedBySession={...e.planArmedBySession,[U]:!1},j(),(e.planModeBySession[U]??!1)||(await wt.updateSession(U,{planMode:!0}),e.planModeBySession={...e.planModeBySession,[U]:!0})),Bn&&me&&(await wt.updateSession(U,{goalObjective:me.trim(),planMode:!1}),e.planModeBySession={...e.planModeBySession,[U]:!1});const ei=await o.resolveThinkingForPrompt(U,Cn)??e.thinking;Ve=e.pendingThinkingBySession[U];const ji=await wt.submitPrompt(U,{content:pt,model:Cn,thinking:ei,permissionMode:e.permission,planMode:jt&&!(Bn&&me),swarmMode:Rt});return ei!==void 0&&Xa(e,U,Ve),Bn&&me&&(e.goalModeBySession={...e.goalModeBySession,[U]:!1},z()),e.promptIdBySession={...e.promptIdBySession,[U]:ji.promptId},Ee(U,Ye,ji.promptId,ji.userMessageId),C()?.bindNextPromptId(U,ji.promptId),"ok"}catch(wt){return e.inFlightBySession={...e.inFlightBySession,[U]:!1},A(U,pt=>pt.some(Ht=>Ht.id===Ye)?pt.filter(Ht=>Ht.id!==Ye||Ht.promptId!==void 0||Ht.userMessageId!==void 0):pt),Xa(e,U,Ve)&&_(U),r("sendPrompt",wt,{sessionId:U}),zs(wt)?"rejected":"uncertain"}finally{jb(U,ze)}}async function Ai(U,me){const ke=e.activeSessionId;if(ke){if(a.value!=="idle"||e.inFlightBySession[ke]){Ti(U,me);return}if((e.queuedBySession[ke]?.length??0)>0){Ti(U,me),Yt(ke);return}await es(ke,U,me)}}async function No(U,me){const ke=e.activeSessionId;if(!ke)return;const ze=e.queuedBySession[ke]??[],Ye=[],Ve=[];for(const Rt of ze){const Bn=Rt.text.trim();Bn&&Ye.push(Bn),Rt.attachments?.length&&Ve.push(...Rt.attachments)}const wt=U.trim();if(wt&&Ye.push(wt),me?.length&&Ve.push(...me),Ye.length===0&&Ve.length===0)return;ze.length>0&&(e.queuedBySession={...e.queuedBySession,[ke]:[]});const pt=Ye.join(` - -`),Ht=()=>{if(ze.length===0)return;const Rt=e.queuedBySession[ke]??[];e.queuedBySession={...e.queuedBySession,[ke]:[...ze,...Rt]}};if(a.value==="idle"&&!e.inFlightBySession[ke]){await es(ke,pt,Ve)==="rejected"&&Ht();return}const Gt=[];pt&&Gt.push({type:"text",text:pt}),Gt.push(...rv(Ve));const Cn=b(),Qn={id:Cn,sessionId:ke,role:"user",content:Gt,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};A(ke,Rt=>[...Rt,Qn]);const jt=Pb(ke);try{const Rt=Pt(),Bn=e.sessions.find(De=>De.id===ke),ei=(Bn?.model&&Bn.model.length>0?Bn.model:e.defaultModel)??void 0,ji=await o.resolveThinkingForPrompt(ke,ei)??e.thinking,$o=e.pendingThinkingBySession[ke],Go=await Rt.submitPrompt(ke,{content:Gt,model:ei,thinking:ji,permissionMode:e.permission,planMode:e.planModeBySession[ke]??!1,swarmMode:e.swarmModeBySession[ke]??!1});if(ji!==void 0&&Xa(e,ke,$o),Ee(ke,Cn,Go.promptId,Go.userMessageId),Go.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[ke]:Go.promptId},C()?.bindNextPromptId(ke,Go.promptId);return}try{await Rt.steerPrompts(ke,[Go.promptId])}catch{}}catch(Rt){A(ke,Bn=>Bn.filter(ei=>ei.id!==Cn||ei.promptId!==void 0||ei.userMessageId!==void 0)),zs(Rt)&&Ht(),r("steer",Rt,{sessionId:ke})}finally{jb(ke,jt)}}async function Ci(U,me){try{const ze=await Pt().uploadFile({file:U,name:me});return{fileId:ze.id,name:ze.name,mediaType:ze.mediaType}}catch(ke){return r("uploadImage",ke),null}}function Ti(U,me){const ke=e.activeSessionId;if(!ke)return;const ze=e.queuedBySession[ke]??[],Ye={text:U,attachments:me,id:Ace()};e.queuedBySession={...e.queuedBySession,[ke]:[...ze,Ye]}}function Yt(U){const[me,...ke]=e.queuedBySession[U]??[];me!==void 0&&(e.queuedBySession={...e.queuedBySession,[U]:ke},es(U,me.text,me.attachments).then(ze=>{if(ze==="ok"){ad.delete(U);return}if(ze==="uncertain"){ad.delete(U);return}if(!e.sessions.some(Ht=>Ht.id===U)){ad.delete(U);return}const Ye=me.id??me.text,Ve=ad.get(U),wt=Ve!==void 0&&Ve.key===Ye?Ve.count+1:1;if(wt>=yce){ad.delete(U),(e.queuedBySession[U]?.length??0)>0&&Yt(U);return}ad.set(U,{key:Ye,count:wt});const pt=e.queuedBySession[U]??[];e.queuedBySession={...e.queuedBySession,[U]:[me,...pt]}}))}function vn(U,me){const ke=e.inFlightBySession[U]===!0;if(e.inFlightBySession={...e.inFlightBySession,[U]:!1},e.promptIdBySession[U]!==void 0){const Ye={...e.promptIdBySession};delete Ye[U],e.promptIdBySession=Ye}return(ke||me?.turnWasActive===!0||(e.turnActiveBySession[U]??!1))&&Yt(U),ke}function ts(U,me){me.inFlightTurn!==null&&me.busy||vn(U)}async function fi(){const U=e.activeSessionId;if(!U)return!1;const me=e.sessions.find(pt=>pt.id===U);let ke=e.promptIdBySession[U];if(ke===void 0){const pt=me?.currentPromptId;pt!==void 0&&pt.length>0&&!pt.startsWith("pr_")&&(ke=pt)}const ze=Pt();let Ye=!1;const Ve=()=>{e.inFlightBySession={...e.inFlightBySession,[U]:!1},e.turnActiveBySession={...e.turnActiveBySession,[U]:!1}};if(ke!==void 0)try{if((await ze.abortPrompt(U,ke)).aborted)return!0;Ye=!0;const Ht={...e.promptIdBySession};delete Ht[U],e.promptIdBySession=Ht,Ve()}catch(pt){if(zs(pt)&&pt.code===cce){Ye=!0;const Ht={...e.promptIdBySession};delete Ht[U],e.promptIdBySession=Ht,Ve()}else return r("abortCurrentPrompt",pt,{sessionId:U}),!1}if(Ye||!((e.inFlightBySession[U]??!1)||(e.turnActiveBySession[U]??!1)||(me?.mainTurnActive??!1)))return!1;try{return(await ze.abortSession(U)).aborted===!0}catch(pt){return r("abortCurrentPrompt",pt,{sessionId:U}),!1}}async function Fr(U,me){const ke=e.activeSessionId;if(!ke||am[U])return;am[U]=!0;const ze=e.approvalsBySession[ke]?.find(Ye=>Ye.approvalId===U&&Ye.toolName==="ExitPlanMode")?.toolCallId;try{const Ye=Pt(),Ve={decision:me.decision,scope:me.scope,feedback:me.feedback,selectedLabel:me.selectedLabel};await Ye.respondApproval(ke,U,Ve),xo().removePendingApproval(ke,U),ze!==void 0&&(D(ke,ze,{state:me.decision,selectedOption:me.selectedLabel,feedback:me.feedback}),$(ke,ze))}catch(Ye){n3(Ye)?(xo().removePendingApproval(ke,U),ze!==void 0&&$(ke,ze)):r("respondApproval",Ye,{sessionId:ke})}finally{delete am[U]}}async function Ni(U,me){const ke=e.activeSessionId;if(ke&&!Jc[U]){Jc[U]="answer";try{await Pt().respondQuestion(ke,U,me),xo().removePendingQuestion(ke,U)}catch(ze){n3(ze)?xo().removePendingQuestion(ke,U):r("respondQuestion",ze,{sessionId:ke})}finally{delete Jc[U]}}}async function hi(U){const me=e.activeSessionId;if(me&&!Jc[U]){Jc[U]="dismiss";try{await Pt().dismissQuestion(me,U),xo().removePendingQuestion(me,U)}catch(ke){n3(ke)?xo().removePendingQuestion(me,U):r("dismissQuestion",ke,{sessionId:me})}finally{delete Jc[U]}}}async function ho(U){const me=e.activeSessionId;if(me&&!i3[U]){i3[U]=!0;try{const ke=Pt(),ze=(e.tasksBySession[me]??[]).find(Ve=>Ve.id===U)?.backgroundTaskId;await ke.cancelTask(me,ze??U);const Ye=e.tasksBySession[me]??[];e.tasksBySession={...e.tasksBySession,[me]:Ye.map(Ve=>(ze!==void 0?Ve.backgroundTaskId===ze:Ve.id===U||Ve.backgroundTaskId===U)?{...Ve,status:"cancelled",completedAt:Ve.completedAt??new Date().toISOString(),completedAtEstimated:Ve.completedAt===void 0?!0:Ve.completedAtEstimated}:Ve)}}catch(ke){mce(ke)||r("cancelTask",ke,{sessionId:me})}finally{delete i3[U]}}}function Xs(U){const me=e.activeSessionId;me?(e.planArmedBySession={...e.planArmedBySession,[me]:U},j(),!U&&(e.planModeBySession[me]??!1)&&(e.planModeBySession={...e.planModeBySession,[me]:!1},T({planMode:!1},me))):H.planMode=U}function ns(){const U=e.activeSessionId,me=U?(e.planArmedBySession[U]??!1)||(e.planModeBySession[U]??!1):H.planMode;Xs(!me)}function qi(U){const me=e.activeSessionId;me?(e.swarmModeBySession={...e.swarmModeBySession,[me]:U},W(),T({swarmMode:U})):H.swarmMode=U}async function an(){const U=e.activeSessionId,ke=!(U?e.swarmModeBySession[U]??!1:H.swarmMode);ke&&e.permission==="manual"&&!await n({title:si("workspace.swarmEnableTitle"),message:si("workspace.swarmEnableConfirm"),variant:"primary"})||qi(ke)}function eo(U){const me=e.activeSessionId;me?(e.goalModeBySession={...e.goalModeBySession,[me]:U},z()):H.goalMode=U}function Us(){const U=e.activeSessionId,me=U?e.goalModeBySession[U]??!1:H.goalMode;eo(!me)}async function Fo(U){const me=U.trim();if(!me||e.permission==="manual"&&!await n({title:si("workspace.goalStartTitle"),message:si("workspace.goalStartConfirm",{objective:me}),variant:"primary"}))return null;let ke=e.activeSessionId,ze=null;if(!ke){const Ye=e.activeWorkspaceId,Ve=Ye&&O.value.some(wt=>wt.id===Ye)?Ye:O.value[0]?.id??null;if(!Ve)return null;try{ke=await sn(Ve)??void 0,ze=ke??null}catch(wt){return r("createGoal",wt),null}if(!ke)return null}try{await Pt().updateSession(ke,{goalObjective:me,planMode:!1}),e.planModeBySession={...e.planModeBySession,[ke]:!1}}catch(Ye){return r("createGoal",Ye,{sessionId:ke,message:se(Ye)}),ze}return e.goalModeBySession[ke]&&(e.goalModeBySession={...e.goalModeBySession,[ke]:!1},z()),e.activeSessionId===ke?await Ai(me):await es(ke,me),ze}function Ms(U){const me=e.activeSessionId;me&&Promise.resolve(Pt().updateSession(me,{goalControl:U})).catch(ke=>{r("controlGoal",ke,{sessionId:me,message:se(ke)})})}function Es(U){e.permission=U,q(U),T({permissionMode:U})}function to(U){const me=[...e.warnings];me.splice(U,1),e.warnings=me}async function Li(U,me){try{await Pt().updateSession(U,{title:me}),d(U,ze=>({...ze,title:me})),e.doneSessions.some(ze=>ze.id===U)&&(e.doneSessions=e.doneSessions.map(ze=>ze.id===U?{...ze,title:me}:ze))}catch(ke){r("renameSession",ke,{sessionId:U})}}async function wi(U){const me=await Pt().generateSessionTitle(U,{force:!0,source:"digest"});return me===null?l({severity:"info",title:si("sidebar.genTitleUnavailable")}):e.doneSessions.some(ke=>ke.id===U)&&(e.doneSessions=e.doneSessions.map(ke=>ke.id===U?{...ke,title:me}:ke)),me}async function Vo(U,me){const ke=e.workspaces.find(Ye=>Ye.id===U)?.root,ze=()=>{e.workspaces=e.workspaces.map(Ye=>Ye.id===U?{...Ye,name:me}:Ye)};try{if(await Pt().updateWorkspace(U,{name:me}),ke!==void 0){const Ye=lm();ke in Ye&&(delete Ye[ke],FS(Ye))}ze()}catch(Ye){if(ke!==void 0&&zs(Ye)&&Ye.code===dce){FS({...lm(),[ke]:me}),ze();return}r("renameWorkspace",Ye)}}async function Ts(U){const me=e.workspaces.find(Ve=>Ve.id===U)?.root??N.value.find(Ve=>Ve.id===U)?.root??U,ke=e.activeSessionId?e.sessions.find(Ve=>Ve.id===e.activeSessionId):void 0,ze=e.activeWorkspaceId===U||e.activeWorkspaceId===me,Ye=!!(ke&&(ke.cwd===me||ke.workspaceId===U||R(ke)===U));me&&!e.hiddenWorkspaceRoots.includes(me)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,me],ie(e.hiddenWorkspaceRoots));try{await Pt().deleteWorkspace(U)}catch(Ve){ya("[kimi-code] deleteWorkspace registry cleanup failed for",U,Ve)}if(e.workspaces=e.workspaces.filter(Ve=>Ve.id!==U&&Ve.root!==me),ze||Ye){const Ve=O.value[0]?.id??null;if(e.activeWorkspaceId=Ve,Ve)V(Ve);else try{Tr(hn.activeWorkspace)}catch{}}(ze||Ye)&&(y(void 0),e.sessionLoading=!1,Ao().clearFileDiff(),Pn(void 0,"replace"))}async function po(U,me){const ke=new Set(U);if(me){const Ye=new Date().toISOString(),Ve=e.sessions.filter(wt=>ke.has(wt.id));Ve.length>0&&(e.doneSessions=[...Ve.map(wt=>({...wt,archived:!0,archivedAt:Ye})),...e.doneSessions.filter(wt=>!ke.has(wt.id))]);for(const wt of U){g(wt),t2.delete(wt),s.clearSideChatForSession(wt);const{[wt]:pt,...Ht}=e.sideChatUserMessageIdsBySession;e.sideChatUserMessageIdsBySession=Ht}if(e.activeSessionId!==void 0&&ke.has(e.activeSessionId)){const wt=e.sessions[0];wt?await Pi(wt.id,{urlMode:"replace",skipTrack:!0}):(y(void 0),Pn(void 0,"replace"))}return}const ze=e.doneSessions.filter(Ye=>ke.has(Ye.id));e.doneSessions=e.doneSessions.filter(Ye=>!ke.has(Ye.id));for(const Ye of ze)e.sessions.some(Ve=>Ve.id===Ye.id)||f({...Ye,archived:!1})}async function Ks(U){try{const me=Pt(),ke=e.sessions.find(Ve=>Ve.id===U),ze=ke!==void 0?R(ke):void 0,Ye=ze!==void 0?yt(ze).length:0;await me.archiveSession(U),await po([U],!0),ke!==void 0&&ze!==void 0&&Nn(ze,U,ke.updatedAt,Ye)}catch(me){r("archiveSession",me,{sessionId:U})}}async function Zo(U){if(fe)return!1;const me=U??e.activeSessionId;if(!me){const ze=si("commands.export.noSession");return dl("export:failed",{status:"no-session"}),r("exportSession",new Error(ze),{message:ze}),!1}fe=!0;const ke=Date.now();dl("export:start",{sessionId:me});try{const ze=Uue(),{blob:Ye,fileName:Ve}=await Pt().exportSession(me,ze,{desktop:Wh});if(typeof document>"u")throw new Error("Document is unavailable");const wt=URL.createObjectURL(Ye);let pt;try{pt=document.createElement("a"),pt.href=wt,pt.download=Ve,document.body.append(pt),pt.click()}finally{pt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(wt)}catch{}},0)}return dl("export:accepted",{sessionId:me,status:"accepted",zipBytes:Ye.size,durationMs:Date.now()-ke}),!0}catch(ze){const Ye=typeof ze=="object"&&ze!==null?ze:void 0;return dl("export:failed",{sessionId:me,status:"failed",durationMs:Date.now()-ke,errorName:typeof Ye?.name=="string"?Ye.name:typeof ze,errorCode:typeof Ye?.code=="number"?Ye.code:void 0,requestId:typeof Ye?.requestId=="string"?Ye.requestId:void 0,phase:typeof Ye?.phase=="string"?Ye.phase:void 0,httpStatus:typeof Ye?.status=="number"?Ye.status:void 0}),r("exportSession",ze,{sessionId:me,...zs(ze)&&ze.code===_Q?{message:si("commands.export.tooLarge",{sessionId:me})}:{}}),!1}finally{fe=!1}}async function Be(U){try{const me=await Pt().restoreSession(U);return f(me),await po([U],!1),!0}catch(me){return r("restoreSession",me,{sessionId:U}),!1}}function Pe(U){return Pt().listSessions({archivedOnly:!0,beforeId:U?.beforeId,pageSize:U?.pageSize??50})}async function dt(){try{await Pt().logout(),await ae(),await Dn()}catch(U){r("logout",U)}}function St(U){const me=e.activeSessionId;me&&Pt().compactSession(me,U).catch(ke=>{r("compact",ke,{sessionId:me})})}async function An(U){const me=U??e.activeSessionId;if(me)try{const ke=await Pt().forkSession(me);f(ke),await Pi(ke.id,{skipTrack:!0})}catch(ke){r("fork",ke,{sessionId:me})}}async function pi(U=1){const me=e.activeSessionId;if(!me)return null;const ke=e.messagesBySession[me]??[];let ze=-1;for(let pt=ke.length-1;pt>=0;pt--){const Ht=ke[pt];if(Ht.role==="user"&&!(Ht.metadata?.origin&&Ht.metadata.origin.kind!=="user")){ze=pt;break}}const Ye=ze>=0?ke[ze].content.filter(pt=>pt.type==="text").map(pt=>pt.text).join(` -`):null,Ve=U===1&&ze>=0&&ke.slice(ze+1).every(pt=>pt.role!=="user"),wt=Ve?e.sessions.find(pt=>pt.id===me):void 0;if(Ve&&(e.messagesBySession={...e.messagesBySession,[me]:ke.slice(0,ze)},wt!==void 0)){const pt={...wt};delete pt.lastTurnReason,f(pt)}try{return await Pt().undoSession(me,U),await v(me),{text:Ye}}catch(pt){return Ve&&(e.messagesBySession={...e.messagesBySession,[me]:ke},wt!==void 0&&f(wt),await v(me).catch(()=>{})),r("undo",pt,{sessionId:me}),null}}function hs(U){const me=e.activeSessionId;if(!me)return;const ke=e.queuedBySession[me]??[];if(U<0||U>=ke.length)return;const ze=[...ke];ze.splice(U,1),e.queuedBySession={...e.queuedBySession,[me]:ze}}function is(U,me){const ke=e.activeSessionId;if(!ke)return;const ze=e.queuedBySession[ke]??[];if(U===me||U<0||U>=ze.length||me<0||me>=ze.length)return;const Ye=[...ze],[Ve]=Ye.splice(U,1);Ve!==void 0&&(Ye.splice(me,0,Ve),e.queuedBySession={...e.queuedBySession,[ke]:Ye})}async function Ls(U){const me=e.activeSessionId;if(!me)return[];try{return(await Pt().listDirectory(me,{path:U,includeGitStatus:!0})).items}catch{return[]}}async function Ui(U,me){const ke=e.activeSessionId;if(!ke){let ze=U;if(!dr(U)){const Ye=e.activeWorkspaceId,Ve=Ye&&O.value.some(pt=>pt.id===Ye)?Ye:O.value[0]?.id??null,wt=Ve?N.value.find(pt=>pt.id===Ve)?.root:void 0;if(!wt)return!0;ze=`${wt.replace(/[\\/]+$/,"")}/${U}`}try{return await On(ze),!0}catch(Ye){return!(zs(Ye)&&Ye.code===WS)}}try{if(dr(U))return await On(U),!0;const ze=Pt();return me==="folder"?await ze.listDirectory(ke,{path:U}):await ze.readFile(ke,{path:U,length:1}),!0}catch(ze){return!(zs(ze)&&ze.code===WS)}}async function On(U){return Pt().readHostFileContent(U)}const Cs=10485760;function Do(U){const me=e.activeSessionId;return me?Pt().getFileDownloadUrl(me,U):null}async function ws(U,me){const ke=e.activeSessionId;if(!ke)return!1;try{return await Pt().openFile(ke,{path:U,line:me}),!0}catch(ze){return r("openFile",ze,{sessionId:ke}),!1}}async function tl(U){const me=e.activeSessionId;if(!me)return;const ke=P.value.cwd||".";try{await Pt().openInApp(me,U,ke)}catch(ze){r("openInApp",ze,{sessionId:me})}}async function xi(U){const me=e.activeSessionId;if(!me)return!1;try{return await Pt().revealFile(me,{path:U}),!0}catch(ke){return r("revealFile",ke,{sessionId:me}),!1}}function dr(U){return U.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(U)||U.startsWith("\\\\")}async function rt(U){if(/^(https?:|data:|blob:)/i.test(U))return U;const me=e.activeSessionId;if(!me)return U;let ke=U;if(dr(ke)){const ze=e.sessions.find(Ve=>Ve.id===me)?.cwd,Ye=ze?Wy(ke,ze):null;if(Ye)ke=Ye;else try{const Ve=await On(ke);return!Ve.isBinary||Ve.encoding!=="base64"?U:`data:${Ve.mime};base64,${Ve.content}`}catch{return U}}try{const Ye=await Pt().readFile(me,{path:ke,length:Cs});return!Ye.isBinary||Ye.encoding!=="base64"||Ye.truncated?U:`data:${Ye.mime};base64,${Ye.content}`}catch{return U}}async function Se(U){const me=e.sessions.find(ze=>ze.id===e.activeSessionId),ke=me===void 0?e.activeWorkspaceId:R(me);if(!ke)return[];try{return(await Pt().searchFiles(ke,{query:U,limit:20})).items.map(Ve=>({path:Ve.path,name:Ve.name,kind:Ve.kind}))}catch{return[]}}return{checkAuth:ae,probeManagedMembership:Ce,loadConfig:Q,updateConfig:ne,listAllSessionsGlobal:_e,load:Dn,refreshServerMeta:un,loadWorkspaces:pn,loadMoreSessions:ut,loadAllSessions:Qt,ensureFlatSessions:lt,loadMoreFlatSessions:tt,ensureDoneSessions:Ut,loadMoreDoneSessions:fn,selectWorkspace:bn,openWorkspace:Xn,upsertWorkspacePreserveOrder:Ue,applyWorkspaceEvent:st,clearActiveSession:ct,openWorkspaceDraft:ot,startSessionAndSendPrompt:Nt,startSessionAndActivateSkill:Tn,startSessionAndOpenSideChat:fs,addWorkspaceByPath:vi,browseFs:Dt,getFsHome:Is,writeSessionUrl:Pn,openSessionAdmin:bs,closeSessionAdmin:Lo,fetchSessionIntoList:Oi,onSessionRoutePopState:Wi,bindSessionRoute:fo,selectSession:Pi,submitPromptInternal:es,finishPromptLocal:vn,maybeGenerateSessionTitle:bce,localTurnStartState:Cce,isLocalTurnSnapshotCurrent:xce,afterLocalTurnStartsSettle:Sce,handleSessionSnapshot:ts,sendPrompt:Ai,steerPrompt:No,uploadImage:Ci,enqueue:Ti,unqueue:hs,reorderQueue:is,abortCurrentPrompt:fi,respondApproval:Fr,respondQuestion:Ni,dismissQuestion:hi,pendingQuestionActions:Jc,pendingApprovalActions:am,cancelTask:ho,setPlanMode:Xs,togglePlanMode:ns,setSwarmMode:qi,toggleSwarmMode:an,setGoalMode:eo,toggleGoalMode:Us,createGoal:Fo,controlGoal:Ms,setPermission:Es,dismissWarning:to,renameSession:Li,regenerateSessionTitle:wi,renameWorkspace:Vo,deleteWorkspace:Ts,archiveSession:Ks,applySessionsArchivedLocally:po,exportSession:Zo,restoreSession:Be,loadArchivedSessions:Pe,logout:dt,compact:St,forkSession:An,undo:pi,listDir:Ls,readHostFileContent:On,probeWorkspacePath:Ui,getFileDownloadUrl:Do,openWorkspaceFile:ws,openInApp:tl,revealWorkspaceFile:xi,resolveImageUrl:rt,searchFiles:Se,loadOlderMessages:X,refreshSessionSidecars:we,isStartingFirstPrompt:()=>na.size>0}}const Ice=20,Mce=300,Ece=1e4,US=5e3;function I$(e){const[t,n,i]=e.split("-").map(Number);return new Date(t??0,(n??1)-1,i??1,0,0,0,0).getTime()}function M$(e){const[t,n,i]=e.split("-").map(Number);return new Date(t??0,(n??1)-1,i??1,23,59,59,999).getTime()}function Tce(e,t,n){return{workspaceIds:e.workspaceIds.length>0?[...e.workspaceIds]:void 0,archived:e.status==="all"?"all":e.status==="done",updatedAfter:e.updatedFrom!==""?I$(e.updatedFrom):void 0,updatedBefore:e.updatedTo!==""?M$(e.updatedTo):void 0,sort:"meta.updated_at_desc",page:t,pageSize:n}}function Lce(e){return{workspaceIds:e.workspaceIds.length>0?[...e.workspaceIds]:void 0,archived:e.status==="all"?"all":e.status==="done",updatedAfter:e.updatedFrom!==""?I$(e.updatedFrom):void 0,updatedBefore:e.updatedTo!==""?M$(e.updatedTo):void 0,sort:"meta.updated_at_desc"}}function um(e){return JSON.stringify([[...e.workspaceIds].toSorted(),e.status,e.updatedFrom,e.updatedTo])}function Nce(e){const t=Ss({filters:{workspaceIds:[],status:"all",updatedFrom:"",updatedTo:""},page:1,pageSize:Ice,items:[],total:0,loading:!1,seeded:!1,selectedIds:new Set,selectedArchivedById:new Map,allMatching:!1,materializingAll:!1});let n=0,i=null;async function s(){i!==null&&(clearTimeout(i),i=null);const _=++n;t.loading=!0;try{const I=await Pt().listSessionsV2(Tce(t.filters,t.page,t.pageSize));if(_!==n)return;t.items=I.items,t.total=I.total;for(const $ of I.items)t.selectedArchivedById.has($.id)&&t.selectedArchivedById.set($.id,$.meta.archived);const M=Math.max(1,Math.ceil(I.total/t.pageSize));t.page>M&&(t.page=M,s())}catch(I){if(_!==n)return;e.pushOperationFailure("sessionAdmin",I)}finally{_===n&&(t.loading=!1)}}function o(){i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s()},Mce)}function r(){t.seeded||(t.seeded=!0,s())}async function l(){await s()}function a(_){t.allMatching&&um(_)!==um(t.filters)&&A(),t.filters.workspaceIds=[..._.workspaceIds],t.filters.status=_.status,t.filters.updatedFrom=_.updatedFrom,t.filters.updatedTo=_.updatedTo,t.page=1,t.seeded=!0,s()}function u(_){t.allMatching&&A(),t.filters.workspaceIds=[..._],t.page=1,o()}function c(_){t.allMatching&&A(),t.filters.status=_,t.page=1,o()}function d(_,I){t.allMatching&&A(),t.filters.updatedFrom=_,t.filters.updatedTo=I,t.page=1,o()}function f(_){_!==t.page&&(t.page=_,o())}function h(_){_!==t.pageSize&&(t.pageSize=_,t.page=1,o())}function g(_,I){if(t.selectedIds.has(_)){t.selectedIds.delete(_),t.selectedArchivedById.delete(_),t.selectedIds.size===0&&(t.allMatching=!1);return}t.selectedIds.add(_),t.selectedArchivedById.set(_,I)}function m(_){const I=_.length>0&&_.every(M=>t.selectedIds.has(M.id));for(const M of _)I?(t.selectedIds.delete(M.id),t.selectedArchivedById.delete(M.id)):(t.selectedIds.add(M.id),t.selectedArchivedById.set(M.id,M.archived));t.selectedIds.size===0&&(t.allMatching=!1)}function y(_){t.selectedIds=new Set(_.map(I=>I.id)),t.selectedArchivedById=new Map(_.map(I=>[I.id,I.archived])),t.allMatching=!1}function A(){t.selectedIds=new Set,t.selectedArchivedById=new Map,t.allMatching=!1}async function b(){if(t.allMatching||t.materializingAll)return;t.materializingAll=!0;const _=Lce(t.filters),I=um(t.filters);try{const M=[];let $;for(;;){const D=await Pt().listSessionIdsV2({..._,pageSize:Ece,pageToken:$});if(M.push(...D.items),!D.hasMore||D.nextPageToken===null)break;$=D.nextPageToken}if(um(t.filters)!==I)return;for(const D of M)t.selectedIds.add(D.id),t.selectedArchivedById.set(D.id,D.archived);t.allMatching=!0}catch(M){e.pushOperationFailure("sessionAdmin",M)}finally{t.materializingAll=!1}}function C(_){const I=[];for(const[M,$]of t.selectedArchivedById)$===_&&I.push(M);return I}async function v(_,I,M){const $=[];let D=0,T=0;for(let N=0;N<_.length;N+=US){const O=_.slice(N,N+US);try{const P=await M(O),R=P.results.filter(q=>q.ok).map(q=>q.id);$.push(...R),D+=P.succeeded,T+=P.failed}catch(P){T+=_.length-N,e.pushOperationFailure(I?"archiveSessions":"restoreSessions",P);break}}if($.length>0){await e.applySessionsArchivedLocally($,I);for(const N of $)t.selectedIds.delete(N),t.selectedArchivedById.delete(N);t.selectedIds.size===0&&(t.allMatching=!1),await l()}return{okIds:$,succeeded:D,failed:T}}async function x(_){return v(_,!0,I=>Pt().archiveSessions(I))}async function S(_){return v(_,!1,I=>Pt().restoreSessions(I))}return{state:t,ensureSeeded:r,refresh:l,applyFilters:a,setWorkspaceIds:u,setStatus:c,setTimeRange:d,setPage:f,setPageSize:h,toggleSelection:g,togglePageSelection:m,setSelection:y,clearSelection:A,selectAllMatching:b,selectedIdsByArchived:C,archiveSessions:x,restoreSessions:S}}function Fce(e,t,n){return e==="idle"&&!t&&!n}function p6(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function Dce(e,t){return{title:e("settings.notifyTitle"),body:p6(t,e("settings.notifyFallback"))}}function $ce(e,t,n){return{title:e("settings.notifyQuestionTitle"),body:p6(n,t,e("settings.notifyQuestionFallback"))}}function Bce(e,t,n){return{title:e("settings.notifyApprovalTitle"),body:p6(n,t,e("settings.notifyApprovalFallback"))}}function zce(e){if(e.startsWith("kimi-complete-"))return"turn_complete";if(e.startsWith("kimi-question-"))return"question";if(e.startsWith("kimi-approval-"))return"approval"}function KS(e,t){const n=To(e);return n===null?t:n==="1"}const Rce="/favicon.ico",Oce=R0("kimi.notifications",()=>{const e=G(KS(hn.notifyEnabled,!0)),t=G(KS(hn.notifySound,!0)),n=G(typeof Notification<"u"?Notification.permission:"denied");async function i(c){if(!c){e.value=!1,Js(hn.notifyEnabled,"0");return}if(typeof Notification>"u")return;let d=Notification.permission;if(d==="default")try{d=await Notification.requestPermission()}catch{}n.value=d,d==="granted"&&(e.value=!0,Js(hn.notifyEnabled,"1"))}function s(c){t.value=c,Js(hn.notifySound,c?"1":"0")}function o(c,d,f){if(!e.value||typeof Notification>"u")return;const h=Notification.permission;if(h!=="denied"){if(h==="default"){Notification.requestPermission().then(g=>{n.value=g,g==="granted"&&r(c,d,f)});return}r(c,d,f)}}function r(c,d,f){if(!c.isUserWatching)try{const h=new Notification(d.title,{body:d.body,tag:f,icon:Rce,silent:!t.value}),g=zce(f);g!==void 0&&void 0,h.onclick=()=>{try{window.kimiDesktop?.showWindow?.(),window.focus()}catch{}g!==void 0&&void 0,c.onClick(),h.close()}}catch{}}function l(c,d){o(d,Dce(si,d.sessionTitle),`kimi-complete-${c}-${d.promptId??Date.now()}`)}function a(c){o(c,$ce(si,c.sessionTitle,c.questionPreview),`kimi-question-${c.questionId}`)}function u(c){o(c,Bce(si,c.sessionTitle,c.toolName),`kimi-approval-${c.approvalId}`)}return{notifyEnabled:e,notifySound:t,notifyPermission:n,setNotifyEnabled:i,setNotifySound:s,maybeNotifyCompletion:l,maybeNotifyQuestion:a,maybeNotifyApproval:u}});function Ou(){return Oce(qh)}class Pce{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 hY(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 i of n)this.applyOps(i.ops,i.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 i=this.transcript.apply(t);return n!==void 0&&(this.seq_=n),i.gap!==void 0&&this.onGap?.(),i.accepted.length>0&&this.onChange?.(),i.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 i of n)this.applyOps(i.ops,i.seq);this.onChange?.()}}}applyPage(t,n){this.agents_=t.agents;const i=this.snapshot,s=n?t:{...t,items:jce(t.items,i.items),hasMoreOlder:t.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}}function jce(e,t){const n=new Set,i=[];for(const s of[...e,...t]){const o=s.kind==="turn"?s.turnId:s.kind==="marker"?s.markerId:s.refId;n.has(o)||(n.add(o),i.push(s))}return i}function Hce(e){const t=xL(new Map),n=new Map,i=new Map,s=new Set;let o=null,r=null;function l(){o!==null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(o),o=null),r!==null&&(clearTimeout(r),r=null);for(const C of s)C.version.value+=1;s.clear()}function a(C){s.add(C),!(o!==null||r!==null)&&(typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(l)),r=setTimeout(l,50))}function u(C,v){return`${C}\0${v}`}function c(C,v,x){const S=e.getEventConnection();S!==null&&(S.subscribeTranscript(C,v,x),i.set(C,v))}function d(C,v){const x=u(C,v),S=t.get(x);if(S!==void 0)return S;const _={channel:new Pce({sessionId:C,agentId:v,fetchPage:I=>e.api.getSessionTranscript(C,{...I,agentId:v}),onChange:()=>{a(_)},onGap:()=>{f(_)}}),version:G(0),baselineLoaded:!1,resumePromise:null};return t.set(x,_),_}async function f(C){if(C.resumePromise!==null)return C.resumePromise;const v=h(C).finally(()=>{C.resumePromise===v&&(C.resumePromise=null)});return C.resumePromise=v,v}async function h(C){try{await C.channel.refresh(),C.baselineLoaded=!0,n.get(C.channel.sessionId)===C.channel.agentId&&c(C.channel.sessionId,C.channel.agentId,C.channel.seq)}catch{n.get(C.channel.sessionId)===C.channel.agentId&&c(C.channel.sessionId,C.channel.agentId)}}function g(C,v){e.connectEventsIfNeeded(),n.set(C,v);const x=d(C,v);return x.baselineLoaded?c(C,v,x.channel.seq):f(x),x}function m(C,v){if(n.get(C)!==v)return;n.delete(C);const x=i.get(C);x!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(C,[x]),i.delete(C))}function y(C,v,x,S){if(n.get(C)!==v)return;const _=d(C,v);_.channel.receiveReset(x,S),_.baselineLoaded=!0}function A(C,v,x,S){return n.get(C)!==v?!0:d(C,v).channel.applyOps(x,S)}function b(C){n.delete(C),i.delete(C)&&e.getEventConnection()?.unsubscribeTranscript(C);for(const[v,x]of t)x.channel.sessionId===C&&(t.delete(v),s.delete(x))}return{getEntry:(C,v)=>t.get(u(C,v)),activate:g,deactivate:m,receiveReset:y,applyOps:A,forgetSession:b}}function Wce(e){const t=e.replace(/[/\\]+$/,"");return t===""?e:t.split(/[/\\]/).pop()??t}function qce(e,t){return e!==""?e:t?`${Wce(t)} | Kimi Code`:"Kimi Code"}function Uce(e){return L(()=>qce(Vu(e.webTitle),Vu(e.activeWorkspaceRoot)))}const cm=n6(),E$=hn.permission,T$=hn.activeWorkspace,L$=hn.planArmed,N$=hn.swarmMode,F$=hn.goalMode,VS=40401,av=hn.onboarded;Tr(hn.codeFont);Tr(hn.accent);Tr(hn.theme);Tr(hn.thinking);Tr(hn.notifyOnComplete);Tr(hn.notifyOnQuestion);Tr(hn.notifyOnApproval);Tr(hn.soundOnComplete);function Kce(){try{const e=To(E$);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function Vce(e){try{Js(E$,e)}catch{}}function dm(e){const t=To(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const i={};for(const[s,o]of Object.entries(n))o===!0&&(i[s]=!0);return i}catch{return{}}}function g6(e,t){try{const n={};for(const[i,s]of Object.entries(t))s&&(n[i]=!0);Js(e,JSON.stringify(n))}catch{}}function m6(){g6(L$,Me.planArmedBySession)}function D$(){g6(N$,Me.swarmModeBySession)}function $$(){g6(F$,Me.goalModeBySession)}function Zce(){try{return To(T$)}catch{return null}}const B$=hn.hiddenWorkspaces;function Gce(){try{const e=To(B$);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function Qce(e){try{Js(B$,JSON.stringify(e))}catch{}}function Yce(e){try{Js(T$,e)}catch{}}function Jce(e,t){if(t&&e.startsWith(t)){const i=e.slice(t.length);return i?`~${i}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const Me=Ss({...gie(),get sessions(){return Wo().sessions},set sessions(e){Wo().setSessions(e)},get activeSessionId(){return Wo().activeSessionId},set activeSessionId(e){Wo().setActiveSessionId(e)},get approvalsBySession(){return xo().approvalsBySession},get questionsBySession(){return xo().questionsBySession},get gitStatusBySession(){return Ao().gitStatusBySession},connected:!1,serverVersion:"",webTitle:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlags:{},workspaceName:"kimi-code",connection:"disconnected",permission:Kce(),thinking:void 0,thinkingBySession:{},pendingThinkingBySession:{},planModeBySession:dm(hn.planMode),planArmedBySession:dm(L$),swarmModeBySession:dm(N$),goalModeBySession:dm(F$),loading:!1,sessionLoading:!1,queuedBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:c6(),authReady:!1,defaultModel:null,managedProviderStatus:null,managedUserInfo:null,managedMembership:null,workspaces:[],activeWorkspaceId:Zce(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:Gce(),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,doneSessions:[],doneSessionsNextPageToken:null,doneSessionsHasMore:!0,doneSessionsLoading:!1,doneSessionsLoadingMore:!1,doneSessionsSeeded:!1,draftEntry:"newChat",mainView:"chat"}),eu=Ss({}),v6=Ss({}),gp=new Map,G1=new Map;function Xce(e,t){return`${e}\0${t??"*"}`}function z$(e,t,n){v6[t]=n;const i=eu[e]?.[t];i&&(eu[e]={...eu[e],[t]:{...i,review:n}})}async function o0(e,t){if(t!==void 0){o0(e);return}const n=Xce(e,t),i=(gp.get(n)??0)+1;gp.set(n,i),t!==void 0&&G1.set(e,(G1.get(e)??0)+1);const s=G1.get(e)??0;try{const o=await Pt().getSessionPlans(e,{agentId:"main",toolCallId:t});if(gp.get(n)!==i||t===void 0&&(G1.get(e)??0)!==s||!Me.sessions.some(l=>l.id===e))return;const r=Object.fromEntries(o.map(l=>[l.toolCallId,l]));for(const[l,a]of Object.entries(r)){const u=v6[l];u&&(!a.review||a.review.state==="pending")&&(r[l]={...a,review:u})}eu[e]=t===void 0?r:{...eu[e],...r}}catch(o){ya("[refreshSessionPlans] plan history unavailable for",e,o)}}function ede(e){const t=`${e}\0`;for(const n of gp.keys())n.startsWith(t)&&gp.delete(n);G1.delete(e),delete eu[e]}function tde(e){delete eu[e]}const O0=Ss({planMode:!1,swarmMode:!1,goalMode:!1});function y6(e){Me.sessions=e}function Gy(e,t){Me.sessions=Me.sessions.map(n=>n.id===e?t(n):n)}function nde(e){Me.sessions=JD(Me.sessions,e)}function ide(e){Me.sessions=[...Me.sessions,e]}function sde(e){Me.sessions=Me.sessions.filter(t=>t.id!==e)}function R$(){const e=Me.activeSessionId;e&&Me.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(Me.unreadBySession[e]=!1,d6({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===hn.unread&&(Me.unreadBySession=c6(),R$())});function Hb(){if(Wr===null||!Wr.health().stale)return;dl("ws:stale-reconnect",{sessionId:Me.activeSessionId,status:"stale"}),que("ws: stale socket on focus, reconnecting",{activeSessionId:Me.activeSessionId}),Wr.reconnect();const e=Me.activeSessionId;e&&hv.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(R$(),Hb())});typeof window<"u"&&(window.addEventListener("focus",Hb),window.addEventListener("online",Hb));function k6(e){Me.activeSessionId=e}function ode(e){vr(Me.messagesBySession,e)}function rde(e,t){Me.messagesBySession[e]=t}function O$(e,t){Me.messagesBySession[e]=t(Me.messagesBySession[e]??[])}function lde(e){delete Me.messagesBySession[e]}function P$(e){Wr?.unsubscribe(e),cv.forgetSession(e),qb.delete(e),Lde(e),hh.discard(({meta:t})=>t.sessionId===e),sde(e),lde(e),ede(e),xo().clearSessionApprovals(e),xo().clearSessionQuestions(e),delete Me.tasksBySession[e],delete Me.goalBySession[e],Ao().clearSessionGitStatus(e),delete Me.lastSeqBySession[e],delete Me.compactionBySession[e],delete Me.messagesLoadingMoreBySession[e],delete Me.messagesHasMoreBySession[e],delete Me.messagesLoadMoreErrorBySession[e],delete Wb[e],fv.delete(e),n2.delete(e),Q$.delete(e),wce(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.planArmedBySession[e],delete Me.swarmModeBySession[e],delete Me.goalModeBySession[e],delete Me.thinkingBySession[e],delete Me.pendingThinkingBySession[e],m6(),D$(),$$(),Wo().unpinSession(e)}const j$=G(!1),H$=G(null);async function qd(e){let t;try{t=await Pt().getSessionStatus(e)}catch{return}Gy(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,Tr(hn.planMode),t.thinkingEffort.length>0&&jD(Me,e,t.thinkingEffort)}const uv=new Set;function ade(e){uv.add(e),W$(e).finally(()=>{uv.delete(e)})}async function W$(e){const t=Me.goalVersionBySession[e]??0;let n;try{n=await Pt().getSessionGoal(e)}catch{return}(Me.goalVersionBySession[e]??0)===t&&(n===null||n.status==="complete"?delete Me.goalBySession[e]:Me.goalBySession[e]=n)}function q$(e,t){const n=t??Me.activeSessionId;if(!n)return Promise.resolve(!1);const i=e.thinking!==void 0?Me.pendingThinkingBySession[n]:void 0;return Promise.resolve(Pt().updateSession(n,e)).then(()=>(Xa(Me,n,i),qd(n))).then(()=>!0).catch(s=>(Xa(Me,n,i)&&qd(n),Uh("persistSessionProfile",s,{sessionId:n}),!1))}function U$(e){try{return To(e)??""}catch{return""}}function ude(){return typeof window>"u"?!1:new URLSearchParams(window.location.search).get("kimi_onboarded")==="1"}const K$=ude();if(K$&&U$(av)!=="1")try{Js(av,"1")}catch{}const V$=G(K$||U$(av)==="1");function cde(e){V$.value=e;try{Js(av,e?"1":"0")}catch{}e&&window.kimiDesktop?.setOnboarded?.()}let Wr=null;const cv=Hce({api:Pt(),connectEventsIfNeeded:b6,getEventConnection:()=>Wr});let ZS=0;function Z$(){return ZS+=1,`msg_opt_${Date.now().toString(36)}_${ZS}`}function GS(e,t,n){const i={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=xie(i,e,{sessionId:t,seq:n},{t:(o,r)=>r===void 0?si(o):si(o,r)});s.sessions!==i.sessions&&y6(s.sessions),s.activeSessionId!==i.activeSessionId&&k6(s.activeSessionId),ode(s.messagesBySession),xo().applyApprovalsDiff(s.approvalsBySession),vr(Me.planReviewByToolCallId,s.planReviewByToolCallId),xo().applyQuestionsDiff(s.questionsBySession),vr(Me.tasksBySession,s.tasksBySession),vr(Me.goalBySession,s.goalBySession),vr(Me.goalVersionBySession,s.goalVersionBySession),vr(Me.lastSeqBySession,s.lastSeqBySession),vr(Me.turnActiveBySession,s.turnActiveBySession),vr(Me.turnEndedPromptIdBySession,s.turnEndedPromptIdBySession),vr(Me.turnErrorBySession,s.turnErrorBySession),vr(Me.turnRetryBySession,s.turnRetryBySession),vr(Me.compactionBySession,s.compactionBySession),s.config!==i.config&&(Me.config=s.config??null),Sie(s.warnings,i.warnings)||(Me.warnings=s.warnings),e.type==="goalUpdated"&&uv.delete(t),e.type==="configChanged"&&(Me.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(qn.loadModels(),qn.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&&jD(Me,e.sessionId,e.thinking)),e.type==="sessionDeleted"&&(aB(e.sessionId),jS(e.sessionId)),e.type==="sessionUpdated"&&e.session.archived===!0&&jS(e.session.id)}function dde(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 i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type==="toolUse"&&s.toolName==="ExitPlanMode")return s.toolCallId}}}function fde(e,t){const n=Me.lastSeqBySession[t.sessionId]??0,i=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,o=Po.sideChatTargetBySession.value[t.sessionId];if(e.type==="messageCreated"&&e.message.role==="user"&&e.agentId!==void 0&&Object.prototype.hasOwnProperty.call(Me.sideChatMessagesByAgent,e.agentId)){GS({type:"unknown",raw:{_noop:!0}},t.sessionId,t.seq),Po.reconcileSideChatUserMessage(e.agentId,e.message);return}if(GS(e,t.sessionId,t.seq),o){const{agentId:r}=o,l=t.sessionId;e.type==="agentDelta"&&e.agentId===r?e.delta.text&&Po.appendSideChatAssistantText(r,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===r?Po.finishSideChatAgent(r,l):e.type==="taskProgress"&&e.taskId===r?Po.appendSideChatAssistantText(r,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===r&&Po.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;rhe(e.sessionId,r==="cancelled"||r==="failed"||r==="blocked"?"aborted":"idle",i);const l=dde(Me.messagesBySession[e.sessionId]??[]);l!==void 0&&o0(e.sessionId,l)}if(e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&i||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&ohe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&Me.promptIdBySession[e.sessionId]===e.promptId&&Ft.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&lhe(e.sessionId,e.question),e.type==="approvalRequested"&&ahe(e.sessionId,e.approval),s!==void 0){const r=e.type==="approvalResolved"?{state:e.decision,selectedOption:e.selectedLabel,feedback:e.feedback}:{state:"cancelled"};z$(t.sessionId,s,r),o0(t.sessionId,s)}}const hh=Mse(({appEvent:e,meta:t})=>fde(e,t),({appEvent:e})=>xse(e),{coalesce:Tse}),hde=3e4;let QS=0,Oo=null;const mp=new Map;let dv=0,ph=null;function pde(){ph!==null&&(clearTimeout(ph),ph=null)}function YS(e){if(!Me.connected||ph!==null)return;const t=Math.min(hde,1e3*2**dv);dv+=1,ya("[kimi-code] session work reconciliation incomplete; retrying",e),ph=setTimeout(()=>{ph=null,Me.connected&&G$()},t)}function gde(e,t){const n=new Map(e.map(u=>[u.id,u]));let i=!1,s=!1;const o={...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),g=d>c.lastSeq,m=f>c.lastSeq,y=h!==void 0&&h.seq>c.lastSeq,A=g||m&&u.mainTurnActive===!0?u.busy||u.mainTurnActive===!0:c.busy,b=g||m?u.mainTurnActive:c.mainTurnActive??(A?u.mainTurnActive:!1),C=y?h.source==="work"?u.pendingInteraction:(Me.approvalsBySession[u.id]?.length??0)>0?"approval":(Me.questionsBySession[u.id]?.length??0)>0?"question":"none":c.pendingInteraction??(A?u.pendingInteraction:"none");(y&&h.source==="work"||!y&&(c.pendingInteraction!==void 0||c.busy===!1))&&C!==void 0&&l.set(u.id,C);const v=g?u.lastTurnReason:c.lastTurnReason;mp.set(u.id,Math.max(mp.get(u.id)??0,c.lastSeq));const x=t.turnStartBySession.get(u.id);return(b===!1||b===void 0&&!A)&&t.witnessedTurnBySession.has(u.id)&&x!==void 0&&Ft.isLocalTurnSnapshotCurrent(u.id,x)&&r.push(u.id),b===!0&&!o[u.id]?(o[u.id]=!0,s=!0):(b===!1||!A)&&o[u.id]&&(delete o[u.id],s=!0),u.busy===A&&u.mainTurnActive===b&&u.pendingInteraction===C&&u.lastTurnReason===v?u:(i=!0,{...u,busy:A,mainTurnActive:b,pendingInteraction:C,lastTurnReason:v})});i&&y6(a),s&&vr(Me.turnActiveBySession,o);for(const[u,c]of l)c==="none"?(xo().clearSessionApprovals(u),xo().clearSessionQuestions(u)):c==="question"&&xo().clearSessionApprovals(u);for(const u of r)Ft.finishPromptLocal(u,{turnWasActive:!0})}async function G$(){const e={workEventSeqBySession:new Map,turnEventSeqBySession:new Map,pendingEventBySession:new Map,turnStartBySession:new Map(Me.sessions.map(t=>[t.id,Ft.localTurnStartState(t.id)])),witnessedTurnBySession:new Set(Me.sessions.filter(t=>Me.inFlightBySession[t.id]||Me.turnActiveBySession[t.id]).map(t=>t.id))};Oo=e;try{const t=await Ft.listAllSessionsGlobal({shouldContinue:()=>Oo===e&&Me.connected});if(Oo!==e||!Me.connected)return;hh.flush(),gde(t.sessions,e),Oo=null,t.error!==void 0?YS(t.error):dv=0}catch(t){if(Oo!==e||!Me.connected)return;Oo=null,YS(t)}}function b6(){if(Wr!==null||typeof WebSocket>"u")return;dl("ws:connection",{status:"connecting"}),Me.connection="connecting",Wr=Pt().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){if(t.type==="workspaceDeleted"){const r=Me.sessions.filter(l=>l.workspaceId===t.workspaceId||l.cwd===t.root).map(l=>l.id);Kue(t.workspaceId,t.root,r)}Ft.applyWorkspaceEvent(t);return}if((t.type==="pluginsChanged"||t.type==="capabilityChanged")&&Zue(t))return;const i=t.type==="sessionWorkChanged",s=t.type==="turnActiveChanged",o=t.type==="approvalRequested"||t.type==="approvalResolved"||t.type==="approvalExpired"||t.type==="questionRequested"||t.type==="questionAnswered"||t.type==="questionDismissed";if((i||s||o)&&n.seq>0){const r=mp.get(n.sessionId)??0;if(n.seq<=r)return;mp.set(n.sessionId,n.seq)}if(Oo!==null&&(i||s||o))if(i){const r=Oo.workEventSeqBySession.get(n.sessionId)??0;if(n.seq>r&&Oo.workEventSeqBySession.set(n.sessionId,n.seq),t.pendingInteraction!==void 0||!t.busy){const l=Oo.pendingEventBySession.get(n.sessionId);(l===void 0||n.seq>l.seq)&&Oo.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"work"})}}else if(s){const r=Oo.turnEventSeqBySession.get(n.sessionId)??0;n.seq>r&&Oo.turnEventSeqBySession.set(n.sessionId,n.seq)}else{const r=Oo.pendingEventBySession.get(n.sessionId);(r===void 0||n.seq>r.seq)&&Oo.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"interaction"})}for(const r of Ese({appEvent:t,meta:n}))hh(r)},onResync(t,n,i){dl("ws:resync",{sessionId:t,status:"required",seq:n}),hh.flush(),fv.add(t),hv.request(t)},onError(t,n,i){dl("ws:error",{status:"failed",errorCode:t,fatal:i}),P0({severity:"error",title:si("warnings.wsTitle"),message:n,details:[os("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){dl("ws:connection",{status:t?"connected":"disconnected"}),Me.connected=t,Me.connection=t?"connected":"disconnected",t||(Oo=null,mp.clear(),pde(),dv=0),t&&(QS+=1,wde(),Ft.refreshServerMeta())},onReplayComplete(){hh.flush(),QS>1&&G$()},onTranscriptReset(t,n,i,s){cv.receiveReset(t,n,i,s)},onTranscriptOps(t,n,i,s){return cv.applyOps(t,n,i,s)}})}const Wb={},fv=new Set,n2=new Set,Q$=new Set;function mde(e){return zs(e)&&e.code===VS?!0:typeof e=="object"&&e!==null&&e.code===VS}function os(e,t){if(!(t==null||t===""))return{label:si(`warnings.details.${e}`),value:Y$(t)}}function Y$(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 vde(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function yde(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function kde(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function bde(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function JS(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function Ade(e,t,n){const i=Dy(t),s=zs(t),o=i||s?t.timestamp:void 0,r=i||s?t.durationMs:void 0,l=[os("operation",e),os("sessionId",n??Me.activeSessionId),os("connection",Me.connection),os("timestamp",bde(o??Date.now()))];return i?l.push(os("duration",JS(r)),os("request",`${t.method} ${t.path}`),os("endpoint",t.url),os("requestId",t.requestId),os("phase",t.phase),os("timeout",`${t.timeoutMs}ms`),os("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),os("contentType",t.contentType),os("responsePreview",t.bodyPreview),os("cause",t.cause)):s?l.push(os("duration",JS(r)),os("code",t.code),os("requestId",t.requestId),os("message",t.message),os("details",t.details)):l.push(os("errorName",vde(t)),os("message",yde(t)??Y$(t)),os("stack",kde(t))),l.filter(a=>a!==void 0)}function Cde(e,t,n={}){const i=Dy(t),s=zs(t),o=xQ(t),r=n.title??si(i?o?"warnings.daemonTimeoutTitle":"warnings.daemonNetworkTitle":s?"warnings.daemonApiTitle":"warnings.operationFailedTitle"),l=n.message??(i?si(o?"warnings.daemonTimeoutMessage":"warnings.daemonNetworkMessage"):s?t.message:si("warnings.operationFailedMessage"));return{severity:"error",title:r,message:l,details:Ade(e,t,n.sessionId)}}function P0(e){Me.warnings=[...Me.warnings,e]}function wde(){const e=si("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 Uh(e,t,n){Ua(`[kimi-code] operation failed: ${e}`,t);const i=zs(t),s=Dy(t);dl("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:i?t.code:void 0,requestId:i||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),P0(Cde(e,t,n))}const xde={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function Sde(e){if(!zs(e)||e.code===void 0)return;const t=xde[e.code];return t?si(t):void 0}async function _de(e){if(P$(e),Me.activeSessionId!==e)return;const t=Me.sessions[0];t?await Ft.selectSession(t.id,{urlMode:"replace",skipTrack:!0}):(k6(void 0),Me.sessionLoading=!1,Ft.writeSessionUrl(void 0,"replace"))}const XS=new Set;async function Ide(e){if(!XS.has(e)){XS.add(e);try{const t=await Pt().getSessionWarnings(e),n=si("warnings.noteLabel");for(const i of t)P0(`${n}: ${i.message}`)}catch{}}}async function A6(e,t){const n=Ft.localTurnStartState(e);try{const s=await Pt().getSessionSnapshot(e);if(!Me.sessions.some(d=>d.id===e))return"ok";hh.flush();const o=Me.lastSeqBySession[e]??0,r=Wb[e],l=fv.has(e)||pv.has(e);if(!l&&r!==void 0&&r===s.epoch&&o>s.asOfSeq)return n2.delete(e)||(n2.add(e),hv.request(e)),"ok";if(!Ft.isLocalTurnSnapshotCurrent(e,n))return Ft.afterLocalTurnStartsSettle(e,()=>{hv.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=Z2(s.session.usage),c=s.session.mainTurnActive??(s.inFlightTurn!==null&&s.session.busy);Gy(e,d=>LQ(d,s.session,c)),rde(e,Sae(Me.messagesBySession[e]??[],s.messages)),Me.tasksBySession[e]=$ae(s.subagents,Me.tasksBySession[e]??[]),Me.messagesHasMoreBySession[e]=s.hasMoreMessages,xo().setSessionApprovals(e,s.pendingApprovals);for(const d of s.pendingApprovals){const f=d.display;f?.kind==="plan_review"&&typeof f.plan=="string"&&f.plan.length>0&&(Me.planReviewByToolCallId[d.toolCallId]={plan:f.plan,path:typeof f.path=="string"?f.path:void 0})}return xo().setSessionQuestions(e,s.pendingQuestions),Me.lastSeqBySession[e]=s.asOfSeq,Wb[e]=s.epoch,fv.delete(e),n2.delete(e),Ft.handleSessionSnapshot(e,{inFlightTurn:s.inFlightTurn,busy:s.session.busy}),c?Me.turnActiveBySession[e]=!0:delete Me.turnActiveBySession[e],b6(),Wr&&(Wr.seedSnapshot(e,s),Wr.subscribe(e,{seq:s.asOfSeq,epoch:s.epoch}),Tde(e)),pv.delete(e),u&&t?.skipStatusRefresh!==!0&&qd(e),Ide(e),"ok"}catch(i){return mde(i)?(await _de(e),"not-found"):(Uh("getSessionSnapshot",i,{title:si("warnings.sessionSnapshotTitle"),message:si("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const hv=_ae(A6);function Mde(e){return Object.prototype.hasOwnProperty.call(Me.messagesBySession,e)}const Ede=4,Oa=[],pv=new Set;function Tde(e){const t=Oa.indexOf(e);for(t!==-1&&Oa.splice(t,1),Oa.unshift(e);Oa.length>Ede;){let n=-1;for(let s=Oa.length-1;s>=0;s--)if(Oa[s]!==Me.activeSessionId){n=s;break}if(n===-1)break;const[i]=Oa.splice(n,1);if(i===void 0)break;Wr?.unsubscribe(i),pv.add(i)}}function Lde(e){const t=Oa.indexOf(e);t!==-1&&Oa.splice(t,1),pv.delete(e)}async function Nde(e){return A6(e)}function Ud(e,t){return(Me.inFlightBySession[e]??!1)||(Me.turnActiveBySession[e]??!1)||(t??Me.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function nf(e){try{const t=new Date(e),i=Date.now()-t.getTime(),s=i/36e5;if(i<6e4)return si("sessions.justNow");if(s<1)return`${Math.round(i/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const o=i/864e5;return o<7?`${Math.round(o)}d`:o<30?`${Math.round(o/7)}w`:o<365?`${Math.round(o/30)}mo`:`${Math.round(o/365)}y`}catch{return e}}const Fde=3e4,ac=G(0);let s3=null;function Dde(){s3===null&&(s3=setInterval(()=>{ac.value=(ac.value+1)%Number.MAX_SAFE_INTEGER},Fde),s3.unref?.())}function $de(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}))}}const Bde=L(()=>{const e=Me.activeSessionId,t=e?Me.messagesBySession[e]??[]:[],n=new Map;for(const s of t)if(s.role==="assistant")for(const o of s.content){if(o.type!=="toolUse"||o.toolName!=="Bash"&&o.toolName!=="bash")continue;const r=o.input,l=r&&typeof r.command=="string"?r.command:void 0;l&&n.set(o.toolCallId,l)}const i=new Map;if(n.size===0)return i;for(const s of t)if(s.role==="tool")for(const o of s.content){if(o.type!=="toolResult")continue;const r=Y5(o.output);if(!r)continue;let l;for(const u of r){const c=/task_id:\s*(\S+)/.exec(u);if(c?.[1]){l=c[1];break}}if(!l)continue;const a=n.get(o.toolCallId);a&&i.set(l,a)}return i});function J$(e){return Bde.value.get(e.id)}const zde=L(()=>{const e=Me.activeSessionId,t=e?Me.messagesBySession[e]??[]:[],n=new Map;for(const i of t)if(i.role==="assistant")for(const s of i.content){if(s.type!=="toolUse")continue;const o=s.input,r=o&&typeof o.prompt=="string"?o.prompt:void 0;r&&!n.has(s.toolCallId)&&n.set(s.toolCallId,r);const l=o?.items;if(!r&&Array.isArray(l)&&!n.has(s.toolCallId)){const a=l.filter(u=>typeof u=="string");a.length>0&&n.set(s.toolCallId,a)}}return n});function Rde(e){if(!e.parentToolCallId)return;const t=zde.value.get(e.parentToolCallId);return Array.isArray(t)?e.swarmIndex!==void 0?t[e.swarmIndex]:void 0:t}function Ode(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",i;if(e.status==="running"&&e.startedAt){i=Date.now()-new Date(e.startedAt).getTime();const l=Math.round(i/1e3),a=Math.floor(l/60),u=l%60;n=si("tasks.timingRunning",{time:`${a}:${String(u).padStart(2,"0")}`})}else e.completedAt&&e.startedAt&&!e.completedAtEstimated?(i=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime(),n=si("tasks.timingDone",{time:su(i,{h:si("status.timeUnitHour"),m:si("status.timeUnitMinute"),s:si("status.timeUnitSecond")})})):n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,o=e.command??J$(e),r=e.kind==="bash"&&o?`$ ${o}`:e.kind==="subagent"?Rde(e)??e.subagentType:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:i,meta:r,output:s,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,swarmIndex:e.swarmIndex,completedAt:e.completedAt,createdAt:e.createdAt,model:e.model,thinkingEffort:e.thinkingEffort}}const Pde=L(()=>{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}}),jde=L(()=>(ac.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:nf(e.updatedAt),busy:Ud(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason,workspaceId:cr(e),cwd:e.cwd})))),Hde=L(()=>Me.activeSessionId??""),Wde=L(()=>{const e=Me.activeSessionId;if(e)return qn.skillsBySession.value[e]??[];const t=W0.value;return t?qn.skillsByWorkspace.value[t]??[]:[]}),qde=L(()=>{const e=Me.activeSessionId;if(e)return qn.skillsFetchedBySession.value[e]===!0;const t=W0.value;return t?qn.skillsFetchedByWorkspace.value[t]===!0:!1}),C6=L(()=>{const e=Me.activeSessionId;return e?Me.inFlightBySession[e]??!1:!1}),Ude=L(()=>Ft.isStartingFirstPrompt()),Po=Due(Me,{api:Pt(),pushOperationFailure:Uh,nextOptimisticMsgId:Z$,connectEventsIfNeeded:b6,getEventConn:()=>Wr,resolveThinkingForPrompt:(e,t)=>qn.resolveThinkingForPrompt(e,t),refreshSessionStatus:qd}),j0=L(()=>{const e=Me.activeSessionId;if(!e)return[];const t=Po.sideChatTargetBySession.value[e]?.agentId;return(Me.tasksBySession[e]??[]).filter(n=>n.id!==t)}),X$=Fue(Me,j0,{api:Pt()}),H0=L(()=>{const e=Me.activeSessionId;return e?(Me.turnActiveBySession[e]??!1)||(Me.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),Kde=L(()=>{const e=Me.activeSessionId;if(e)return Me.turnErrorBySession[e]}),Vde=L(()=>{const e=Me.activeSessionId;if(e&&H0.value)return Me.turnRetryBySession[e]}),eB=e=>Pt().getFileUrl(e),tB=(e,t)=>Pt().getSessionMediaUrl(e,t),Zde=[],Gde=_D(),nB=L(()=>{const e=Me.activeSessionId;if(!e)return[];const t=new Set(Me.sideChatUserMessageIdsBySession[e]??[]);return Gde({messages:(Me.messagesBySession[e]??[]).filter(n=>!t.has(n.id)),approvals:Me.approvalsBySession[e]??Zde,getFileUrl:eB,getSessionMediaUrl:tB,sessionActive:H0.value,planReviewByToolCallId:Me.planReviewByToolCallId,plansByToolCallId:eu[e]})}),Qde=L(()=>C6.value||H0.value),qb=new Map,Yde=L(()=>{X$.taskClock.value;const e=j0.value.map(Ode),t=Me.activeSessionId;if(t){let n=qb.get(t);n||(n=new Map,qb.set(t,n));const i=e.filter(r=>r.kind==="subagent"&&r.runInBackground);for(const r of i){const l=r.agentId??r.id;if(r.agentId!==void 0&&r.backgroundTaskId!==void 0&&!n.has(l)){const a=n.get(r.backgroundTaskId);a!==void 0&&(n.delete(r.backgroundTaskId),n.set(l,a))}}const s=i.filter(r=>!n.has(r.agentId??r.id)).sort((r,l)=>(r.createdAt??"").localeCompare(l.createdAt??""));let o=n.size===0?0:Math.max(...n.values())+1;for(const r of s)n.set(r.agentId??r.id,o++);for(const r of i)r.swarmIndex=n.get(r.agentId??r.id)}return e}),iB=L(()=>Hse(j0.value)),Jde=L(()=>qse(j0.value)),Pf=L(()=>{const e=Me.activeSessionId;return e?Me.goalBySession[e]??null:null}),Xde=L(()=>{const e=Me.activeSessionId;return e?Nse(Me.messagesBySession[e]??[]):[]}),efe=L(()=>{const e=Me.activeSessionId;return e?Me.compactionBySession[e]??null:null}),tfe=L(()=>Me.connection),nfe=L(()=>Me.loading),ife=L(()=>Me.sessionLoading),sfe=L(()=>{const e=Me.activeSessionId;return e?Me.messagesLoadingMoreBySession[e]??!1:!1}),ofe=L(()=>{const e=Me.activeSessionId;return e?Me.messagesHasMoreBySession[e]??!1:!1}),rfe=L(()=>{const e=Me.activeSessionId;return e?Me.messagesLoadMoreErrorBySession[e]??!1:!1}),lfe=L(()=>Me.serverVersion),sB=L(()=>Me.webTitle),afe=L(()=>Me.experimentalFlags),ufe=L(()=>Me.backend),cfe=L(()=>Me.dangerousBypassAuth);function dfe(){Me.dangerousBypassAuth=!1}const ffe=L(()=>Me.permission),hfe=L(()=>Me.thinking),oB=L(()=>{const e=Me.activeSessionId;return e?Me.planModeBySession[e]??!1:O0.planMode}),pfe=L(()=>{const e=Me.activeSessionId;return e?Me.planArmedBySession[e]??!1:O0.planMode}),gfe=L(()=>{const e=Me.activeSessionId;return e?Me.swarmModeBySession[e]??!1:O0.swarmMode}),mfe=L(()=>{const e=Me.activeSessionId;return e?Me.goalModeBySession[e]??!1:O0.goalMode}),vfe=L(()=>{const e=Me.activeSessionId,t=(e?eu[e]:void 0)??{},n={},i=new Set;for(const o of nB.value)for(const r of o.tools??[]){if(r.name!=="ExitPlanMode")continue;i.add(r.id);const l=t[r.id];if(l){n[r.id]=l;continue}const a=Me.planReviewByToolCallId[r.id],u=yfe(r.arg),c=a?.plan??u?.plan,d=r.planPath??a?.path;!c&&!d||(n[r.id]={agentId:"main",toolCallId:r.id,turnId:o.id,source:"interaction",plan:c??"",path:d,options:u?.options,review:v6[r.id]})}return{...Object.fromEntries(Object.entries(t).filter(([o])=>!i.has(o))),...n}});function yfe(e){try{const t=JSON.parse(e);return{plan:typeof t.plan=="string"?t.plan:void 0,options:Array.isArray(t.options)?t.options:void 0}}catch{return}}const kfe=L(()=>{const e=Wse(iB.value);return{plan:oB.value,goal:Pf.value&&Pf.value.status!=="complete"?{status:Pf.value.status,turnsUsed:Pf.value.turnsUsed,elapsedMs:Pf.value.wallClockMs}:null,swarm:e.total>0?e:null}}),bfe=L(()=>{const e=Me.activeSessionId;if(!e)return[];const t=Pt();return(Me.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(i=>C$(t,i))}))}),Afe=L(()=>Me.warnings),Cfe=L(()=>{const e=Me.activeSessionId;return e?(Me.questionsBySession[e]??[]).map($de):[]}),wfe=L(()=>{const e=Me.activeSessionId;return e?(Me.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:AD(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),w6=L(()=>{const e=Me.activeSessionId;return e?(Me.approvalsBySession[e]??[]).length>0?"awaiting-approval":(Me.questionsBySession[e]??[]).length>0?"awaiting-question":C6.value||H0.value?"running":"idle":"idle"}),qn=Jue(Me,{api:Pt(),pushOperationFailure:Uh,refreshSessionStatus:qd,persistSessionProfile:q$,savePlanModeToStorage:m6,activity:w6,updateSession:Gy,updateSessionMessages:O$,loadConfig:()=>Ft.loadConfig(),checkAuth:()=>Ft.checkAuth(),beginLocalTurn:Pb,settleLocalTurn:jb}),Ub=L(()=>{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}),xfe=L(()=>{const e=Me.activeSessionId;return e?Me.gitStatusBySession[e]?.pullRequest??null:null}),Sfe=L(()=>{const e=Me.activeSessionId;if(!e)return[];const t=Me.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,i])=>({path:n,status:i})).sort((n,i)=>n.path.localeCompare(i.path)):[]}),_fe=L(()=>{const e=Me.activeSessionId;if(!e)return null;const t=Me.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),rB=L(()=>{const e=Me.sessions.find(r=>r.id===Me.activeSessionId),t=Ub.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?qn.draftModel.value:null,i=(e?.model&&e.model.length>0?e.model:n??Me.defaultModel)??"—",s=qn.models.value.find(r=>r.id===i)??qn.models.value.find(r=>r.model===i);return{model:s?.displayName||s?.model||(i.includes("/")?i.split("/").pop():i),modelId:s?.id??i,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:Me.permission,branch:t,cwd:e?.cwd??"",isGitRepo:Ub.value!==null}}),Ife=L(()=>Ao().fileDiffLines),Mfe=L(()=>Me.sessions.find(t=>t.id===Me.activeSessionId)?.usage.totalCostUsd??0),Efe=L(()=>Me.authReady),Tfe=L(()=>Me.defaultModel),Lfe=L(()=>Me.managedProviderStatus),Nfe=L(()=>Me.managedUserInfo),Ffe=L(()=>Me.managedMembership),Dfe=L(()=>Me.config),$fe=L(()=>{const e=Me.activeSessionId;if(!e)return{};const t=Me.gitStatusBySession[e];return t?{...t.entries}:{}}),Bfe=L(()=>{const e=new Map;for(const t of Me.workspaces){const n=Ml(t.root);e.has(n)||e.set(n,t.id)}return e});function cr(e){return Bfe.value.get(Ml(e.cwd))??e.workspaceId??e.cwd}const Qy=L(()=>_oe({workspaces:Me.workspaces,sessions:Me.sessions,hiddenWorkspaceRoots:Me.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:Me.sessionsHasMoreByWorkspace})),gv=G(Lae()),mv=G(Nae());function zfe(e){mv.value!==e&&(mv.value=e,Fae(e))}const r0=G(Dae());qe(()=>Me.sessions,e=>{const t=nue(e,cr),{next:n,changed:i}=tue(r0.value,t);i&&(r0.value=n,y$(n))});const lB=L(()=>iue(Qy.value,r0.value));qe(()=>[Qy.value.map(e=>e.id).join("\0"),Me.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],i=Yae(n,gv.value,lB.value);i!==null&&(gv.value=i,v$(i));const{next:s,changed:o}=sue(r0.value,new Set(n));o&&(r0.value=s,y$(s))});const x6=L(()=>Wo().pinnedSessionIds);function Rfe(e){Wo().pinSession(e)}function aB(e){Wo().unpinSession(e)}function Ofe(e){Wo().unpinSessions(e)}function Pfe(e){Wo().togglePinSession(e)}const Lr=L(()=>{const e=Qy.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:Jce(t.root,Me.fsHome),sessionCount:t.sessionCount}));return mv.value==="recent"?eue(e,lB.value):Jae(e,gv.value)}),W0=L(()=>{const e=Me.activeWorkspaceId,t=Lr.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});qe(W0,e=>{e&&(Object.prototype.hasOwnProperty.call(qn.skillsByWorkspace.value,e)||qn.loadSkillsForWorkspace(e))},{immediate:!0});const uB=L(()=>{const e=W0.value;return e?Lr.value.find(t=>t.id===e)??null:null}),jfe=Uce({webTitle:sB,activeWorkspaceRoot:()=>uB.value?.root??null}),Hfe=L(()=>{ac.value;const e=new Set(Lr.value.map(n=>n.id)),t=new Map(Lr.value.map(n=>[n.id,n.name]));return Me.sessions.filter(n=>!n.parentSessionId&&e.has(cr(n))).map(n=>{const i=cr(n);return{id:n.id,title:n.title,time:nf(n.updatedAt),busy:Ud(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:i,workspaceName:t.get(i)}})}),Kb=G(qu),Yy=L(()=>{ac.value;const e=new Set(Lr.value.map(r=>r.id)),t=new Map(Lr.value.map(r=>[r.id,r.name])),n=new Set(x6.value),i=(r,l)=>new Date(l.updatedAt).getTime()-new Date(r.updatedAt).getTime(),s=Me.flatSessionsFrontier,o=[];for(const r of Me.sessions)r.parentSessionId||r.archived||n.has(r.id)||!e.has(cr(r))||!(qy({busy:Ud(r.id,r.mainTurnActive),unread:I6.value[r.id]??!1,questionCount:l0.value[r.id]?.questions??0,approvalCount:l0.value[r.id]?.approvals??0,pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason})!=="idle")&&s!==null&&new Date(r.updatedAt).getTime(){const l=cr(r);return{id:r.id,title:r.title,time:nf(r.updatedAt),busy:Ud(r.id,r.mainTurnActive),pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason,lastPrompt:r.lastPrompt,updatedAt:r.updatedAt,workspaceId:l,workspaceName:t.get(l),cwdLabel:r.cwd?uu(r.cwd):"-",pullRequest:r.pullRequest}})});function Wfe(e){return qy({busy:e.busy,unread:I6.value[e.id]??!1,questionCount:l0.value[e.id]?.questions??0,approvalCount:l0.value[e.id]?.approvals??0,pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})!=="idle"}const S6=L(()=>{const e=Yy.value;let t=Kb.value;for(let n=e.length-1;n>=t;n--)if(Wfe(e[n])){t=n+1;break}return t}),qfe=L(()=>Yy.value.slice(0,S6.value)),Ufe=L(()=>Me.flatSessionsHasMore||S6.valueYy.value.length&&Me.flatSessionsHasMore&&Ft.loadMoreFlatSessions()}const vv=G(qu),_6=L(()=>{ac.value;const e=new Set(Lr.value.map(n=>n.id)),t=new Map(Lr.value.map(n=>[n.id,n.name]));return Me.doneSessions.filter(n=>e.has(cr(n))).map(n=>{const i=cr(n),s=Me.sessions.find(r=>r.id===n.id),o=s!==void 0&&new Date(s.updatedAt).getTime()>new Date(n.updatedAt).getTime()?s.updatedAt:n.updatedAt;return{id:n.id,title:n.title,time:nf(o),busy:s?.busy??n.busy,pendingInteraction:s?.pendingInteraction??n.pendingInteraction,lastTurnReason:s?.lastTurnReason??n.lastTurnReason,lastPrompt:n.lastPrompt,updatedAt:o,workspaceId:i,workspaceName:t.get(i),archived:!0,cwdLabel:n.cwd?uu(n.cwd):"-",pullRequest:n.pullRequest}}).sort((n,i)=>new Date(i.updatedAt).getTime()-new Date(n.updatedAt).getTime())}),Vfe=L(()=>_6.value.slice(0,vv.value)),Zfe=L(()=>Me.doneSessionsHasMore||vv.value<_6.value.length);function Gfe(){vv.value+=qu,vv.value>_6.value.length&&Me.doneSessionsHasMore&&Ft.loadMoreDoneSessions()}const Qfe=L(()=>{const e=Me.activeSessionId;return e?Me.sessions.find(t=>t.id===e)?.archived===!0:!1});function Yfe(e,t=6){if(!e)return[];const n=new Map(Lr.value.map(r=>[r.id,r.name])),i=(r,l)=>({id:r.id,title:r.title,time:nf(l??r.updatedAt),busy:l===void 0&&Ud(r.id,r.mainTurnActive),pendingInteraction:l===void 0?r.pendingInteraction:void 0,lastTurnReason:l===void 0?r.lastTurnReason:void 0,lastPrompt:r.lastPrompt,updatedAt:l??r.updatedAt,workspaceId:e,workspaceName:n.get(e),archived:l!==void 0,cwdLabel:r.cwd?uu(r.cwd):"-",pullRequest:r.pullRequest}),s=Me.sessions.filter(r=>!r.parentSessionId&&!r.archived&&cr(r)===e).sort((r,l)=>new Date(l.updatedAt).getTime()-new Date(r.updatedAt).getTime()),o=Me.doneSessions.filter(r=>cr(r)===e);return[...s.map(r=>i(r)),...o.map(r=>i(r,r.updatedAt))].slice(0,t)}function cB(e){ac.value;const t=new Set(x6.value),n=new Map,i=new Map;for(const s of Me.sessions.toSorted((o,r)=>new Date(r.updatedAt).getTime()-new Date(o.updatedAt).getTime())){if(s.parentSessionId||s.archived)continue;const o=cr(s);if(e&&t.has(s.id)){i.set(o,(i.get(o)??0)+1);continue}const r={id:s.id,title:s.title,time:nf(s.updatedAt),busy:Ud(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt},l=n.get(o)??[];l.push(r),n.set(o,l)}return Lr.value.map(s=>({workspace:s,sessions:n.get(s.id)??[],pinnedCount:i.get(s.id)??0,hasMore:Me.sessionsHasMoreByWorkspace[s.id]??!1,loadingMore:Me.sessionsLoadingMoreByWorkspace[s.id]??!1,initialCount:Me.sessionsInitialCountByWorkspace[s.id]??e2}))}const Jfe=L(()=>cB(!0)),Xfe=L(()=>cB(!1)),ehe=L(()=>{ac.value;const e=new Set(Lr.value.map(s=>s.id)),t=new Map(Lr.value.map(s=>[s.id,s.name])),n=Me.sessions.filter(s=>!s.parentSessionId&&!s.archived&&e.has(cr(s)));return Qoe(n,x6.value).pinned.toSorted((s,o)=>new Date(o.updatedAt).getTime()-new Date(s.updatedAt).getTime()).map(s=>{const o=cr(s);return{id:s.id,title:s.title,time:nf(s.updatedAt),busy:Ud(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt,workspaceId:o,workspaceName:t.get(o),pinned:!0,cwdLabel:s.cwd?uu(s.cwd):"-",pullRequest:s.pullRequest}})});function the(e){gv.value=e,v$(e)}const dB=L(()=>{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}),l0=L(()=>{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}),I6=L(()=>{const e={};for(const[t,n]of Object.entries(Me.unreadBySession))n&&(e[t]=!0);return e}),nhe=L(()=>{const e={},t=dB.value;for(const n of Me.sessions){const i=t[n.id]??0;if(i<=0)continue;const s=cr(n);e[s]=(e[s]??0)+i}return e}),ihe=L(()=>Me.recentRoots),she=L(()=>Me.availableOpenInApps),Ft=_ce(Me,{taskPoller:X$,sideChat:Po,modelProvider:qn,pushOperationFailure:Uh,notify:P0,activity:w6,sessionsKnownEmpty:Q$,setSessions:y6,updateSession:Gy,upsertSessionSorted:nde,appendSession:ide,forgetSession:P$,unpinSessions:Ofe,setActiveSessionId:k6,updateSessionMessages:O$,nextOptimisticMsgId:Z$,getEventConn:()=>Wr,syncSessionFromSnapshot:A6,reopenSession:Nde,hasLoadedMessages:Mde,refreshSessionStatus:qd,refreshSessionGoal:W$,refillSessionGoalOnReload:ade,refreshSessionPlans:o0,settlePlanReviewLocally:z$,persistSessionProfile:q$,mergedWorkspaces:Qy,workspacesView:Lr,status:rB,workspaceIdForSession:cr,savePermissionToStorage:Vce,savePlanModeToStorage:m6,saveSwarmModeToStorage:D$,saveGoalModeToStorage:$$,draftModes:O0,saveUnread:d6,saveActiveWorkspaceToStorage:Yce,saveHiddenWorkspacesToStorage:Qce,goalErrorMessage:Sde,initialized:j$,connectIssue:H$}),Si=Nce({pushOperationFailure:Uh,applySessionsArchivedLocally:Ft.applySessionsArchivedLocally});qe(()=>Me.mainView,e=>{e==="sessionAdmin"&&Si.ensureSeeded()});function M6(e){return e===Me.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function ohe(e){Me.turnActiveBySession[e]&&delete Me.turnActiveBySession[e],Me.inFlightBySession[e]&&(Me.inFlightBySession[e]=!1)}function rhe(e,t,n){const i=Me.promptIdBySession[e],s=Me.goalBySession[e]?.status==="active"||uv.has(e);Ft.finishPromptLocal(e,{turnWasActive:n}),(Me.experimentalFlags?.auto_session_title??Me.config?.experimental?.auto_session_title)===!0&&Ft.maybeGenerateSessionTitle(e),Ao().loadGitStatus(e),e===Me.activeSessionId?qd(e):t==="idle"&&!s&&(Me.unreadBySession[e]=!0,d6({[e]:!0}));const o=(Me.approvalsBySession[e]??[]).length>0,r=(Me.questionsBySession[e]??[]).length>0;!s&&Fce(t,o,r)&&Ou().maybeNotifyCompletion(e,{isUserWatching:M6(e),sessionTitle:Me.sessions.find(l=>l.id===e)?.title??"",promptId:i,onClick:()=>{Ft.selectSession(e,{source:"notification"})}})}function lhe(e,t){const n=t.questions[0],i=n?.header?.trim()??"",s=n?.question?.trim()??"",o=i&&s?`${i}: ${s}`:s||i;Ou().maybeNotifyQuestion({isUserWatching:M6(e),sessionTitle:Me.sessions.find(r=>r.id===e)?.title??"",questionPreview:o,questionId:t.questionId,onClick:()=>{Ft.selectSession(e,{source:"notification"})}})}function ahe(e,t){Ou().maybeNotifyApproval({isUserWatching:M6(e),sessionTitle:Me.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Ft.selectSession(e,{source:"notification"})}})}function Kl(){return Dde(),{workspace:Pde,sessions:jde,activeSessionId:Hde,workspacesView:Lr,workspaceSortMode:mv,visibleWorkspace:uB,activeWorkspaceId:W0,sessionsForView:Hfe,workspaceGroups:Jfe,mobileWorkspaceGroups:Xfe,pinnedSessions:ehe,flatSessions:qfe,flatSessionsHasMore:Ufe,flatSessionsLoadingMore:L(()=>Me.flatSessionsLoadingMore),doneSessions:Vfe,doneSessionsHasMore:Zfe,doneSessionsLoadingMore:L(()=>Me.doneSessionsLoadingMore),activeSessionArchived:Qfe,recentSessionsForWorkspace:Yfe,draftEntry:L(()=>Me.draftEntry),mainView:L(()=>Me.mainView),attentionBySession:dB,pendingBySession:l0,attentionByWorkspace:nhe,unreadBySession:I6,recentRoots:ihe,turns:nB,tasks:Yde,activeAppTasks:j0,findBashCommandForTask:J$,auxiliaryTranscripts:cv,getFileUrl:eB,getSessionMediaUrl:tB,todos:Xde,goal:Pf,sessionPlans:vfe,refreshSessionPlans:o0,invalidateSessionPlans:tde,swarms:iB,swarmMembersByToolCallId:Jde,activationBadges:kfe,compaction:efe,status:rB,sessionCost:Mfe,fileDiff:Ife,selectedDiffPath:L(()=>Ao().selectedDiffPath),fileDiffLoading:L(()=>Ao().fileDiffLoading),fileDiffTexts:L(()=>Ao().fileDiffTexts),fileDiffEmptyFile:L(()=>Ao().fileDiffEmptyFile),changes:Sfe,gitInfo:Ub,gitDiffStats:_fe,activePullRequest:xfe,changesByPath:$fe,pendingApprovals:wfe,availableOpenInApps:she,connection:tfe,loading:nfe,sessionLoading:ife,loadingMoreMessages:sfe,hasMoreMessages:ofe,loadMoreMessagesError:rfe,serverVersion:lfe,webTitle:sB,documentBaseTitle:jfe,backend:ufe,dangerousBypassAuth:cfe,experimentalFlags:afe,clearDangerousBypassAuth:dfe,initialized:j$,connectIssue:H$,permission:ffe,thinking:hfe,planMode:oB,planArmed:pfe,swarmMode:gfe,goalMode:mfe,queued:bfe,warnings:Afe,questions:Cfe,activity:w6,turnActive:H0,activeTurnError:Kde,activeTurnRetry:Vde,inFlight:C6,working:Qde,isStartingFirstPrompt:Ude,models:qn.models,starredModelIds:qn.starredModelIds,providers:qn.providers,fontScale:cm.fontScale,setFontScale:cm.setFontScale,colorScheme:cm.colorScheme,setColorScheme:cm.setColorScheme,notifyEnabled:L(()=>Ou().notifyEnabled),notifySound:L(()=>Ou().notifySound),notifyPermission:L(()=>Ou().notifyPermission),setNotifyEnabled:e=>Ou().setNotifyEnabled(e),setNotifySound:e=>Ou().setNotifySound(e),onboarded:V$,setOnboarded:cde,load:Ft.load,selectSession:Ft.selectSession,clearActiveSession:Ft.clearActiveSession,openSessionAdmin:e=>{e!==void 0&&Si.applyFilters({workspaceIds:[e],status:"all",updatedFrom:"",updatedTo:""}),Ft.openSessionAdmin()},closeSessionAdmin:Ft.closeSessionAdmin,sessionAdminItems:L(()=>Si.state.items),sessionAdminTotal:L(()=>Si.state.total),sessionAdminLoading:L(()=>Si.state.loading),sessionAdminFilters:L(()=>Si.state.filters),sessionAdminPage:L(()=>Si.state.page),sessionAdminPageSize:L(()=>Si.state.pageSize),refreshSessionAdminSessions:Si.refresh,applySessionAdminFilters:Si.applyFilters,setSessionAdminWorkspaceFilter:Si.setWorkspaceIds,setSessionAdminStatusFilter:Si.setStatus,setSessionAdminTimeRange:Si.setTimeRange,setSessionAdminPage:Si.setPage,setSessionAdminPageSize:Si.setPageSize,sessionAdminSelectedIds:L(()=>Si.state.selectedIds),sessionAdminSelectedCount:L(()=>Si.state.selectedIds.size),sessionAdminOpenSelectedIds:L(()=>Si.selectedIdsByArchived(!1)),sessionAdminDoneSelectedIds:L(()=>Si.selectedIdsByArchived(!0)),toggleSessionAdminSelection:Si.toggleSelection,toggleSessionAdminPageSelection:Si.togglePageSelection,setSessionAdminSelection:Si.setSelection,clearSessionAdminSelection:Si.clearSelection,selectSessionAdminAllMatching:Si.selectAllMatching,sessionAdminAllMatching:L(()=>Si.state.allMatching),sessionAdminMaterializingAll:L(()=>Si.state.materializingAll),archiveSessions:Si.archiveSessions,restoreSessions:Si.restoreSessions,loadOlderMessages:Ft.loadOlderMessages,loadWorkspaces:Ft.loadWorkspaces,loadMoreSessions:Ft.loadMoreSessions,loadAllSessions:Ft.loadAllSessions,ensureFlatSessions:Ft.ensureFlatSessions,loadMoreFlatSessions:Kfe,ensureDoneSessions:Ft.ensureDoneSessions,loadMoreDoneSessions:Gfe,selectWorkspace:Ft.selectWorkspace,openWorkspace:Ft.openWorkspace,openWorkspaceDraft:Ft.openWorkspaceDraft,startSessionAndSendPrompt:Ft.startSessionAndSendPrompt,startSessionAndActivateSkill:Ft.startSessionAndActivateSkill,startSessionAndOpenSideChat:Ft.startSessionAndOpenSideChat,addWorkspaceByPath:Ft.addWorkspaceByPath,browseFs:Ft.browseFs,getFsHome:Ft.getFsHome,sendPrompt:Ft.sendPrompt,steerPrompt:Ft.steerPrompt,sideChatVisible:Po.sideChatVisible,sideChatSessionId:Po.sideChatSessionId,sideChatTurns:Po.sideChatTurns,sideChatRunning:Po.sideChatRunning,sideChatSending:Po.sideChatSending,openSideChat:Po.openSideChat,closeSideChat:Po.closeSideChat,sendSideChatPrompt:Po.sendSideChatPrompt,uploadImage:Ft.uploadImage,abortCurrentPrompt:Ft.abortCurrentPrompt,respondApproval:Ft.respondApproval,respondQuestion:Ft.respondQuestion,dismissQuestion:Ft.dismissQuestion,pendingQuestionActions:Ft.pendingQuestionActions,pendingApprovalActions:Ft.pendingApprovalActions,cancelTask:Ft.cancelTask,setPermission:Ft.setPermission,setThinking:qn.setThinking,setPlanMode:Ft.setPlanMode,togglePlanMode:Ft.togglePlanMode,setSwarmMode:Ft.setSwarmMode,toggleSwarmMode:Ft.toggleSwarmMode,setGoalMode:Ft.setGoalMode,toggleGoalMode:Ft.toggleGoalMode,createGoal:Ft.createGoal,controlGoal:Ft.controlGoal,enqueue:Ft.enqueue,dismissWarning:Ft.dismissWarning,renameSession:Ft.renameSession,regenerateSessionTitle:Ft.regenerateSessionTitle,renameWorkspace:Ft.renameWorkspace,deleteWorkspace:Ft.deleteWorkspace,reorderWorkspaces:the,setWorkspaceSortMode:zfe,pinSession:Rfe,unpinSession:aB,togglePinSession:Pfe,archiveSession:Ft.archiveSession,exportSession:Ft.exportSession,restoreSession:Ft.restoreSession,loadArchivedSessions:Ft.loadArchivedSessions,compact:Ft.compact,forkSession:Ft.forkSession,undo:Ft.undo,unqueue:Ft.unqueue,reorderQueue:Ft.reorderQueue,searchFiles:Ft.searchFiles,loadGitStatus:Ao().loadGitStatus,loadFileDiff:Ao().loadFileDiff,clearFileDiff:Ao().clearFileDiff,listDir:Ft.listDir,readFileContent:Ao().readFileContent,readHostFileContent:Ft.readHostFileContent,probeWorkspacePath:Ft.probeWorkspacePath,getFileDownloadUrl:Ft.getFileDownloadUrl,openWorkspaceFile:Ft.openWorkspaceFile,openInApp:Ft.openInApp,revealWorkspaceFile:Ft.revealWorkspaceFile,resolveImageUrl:Ft.resolveImageUrl,loadModels:qn.loadModels,loadProviders:qn.loadProviders,skills:Wde,skillsLoaded:qde,activateSkill:qn.activateSkill,setModel:qn.setModel,toggleStarModel:qn.toggleStarModel,addProvider:qn.addProvider,updateProvider:qn.updateProvider,getProvider:qn.getProvider,deleteProvider:qn.deleteProvider,refreshProvider:qn.refreshProvider,refreshAllProviders:qn.refreshAllProviders,loadCatalogProviders:qn.loadCatalogProviders,importCatalogProvider:qn.importCatalogProvider,importCustomRegistry:qn.importCustomRegistry,authReady:Efe,defaultModel:Tfe,managedProviderStatus:Lfe,managedUserInfo:Nfe,managedMembership:Ffe,notify:P0,config:Dfe,loadConfig:Ft.loadConfig,updateConfig:Ft.updateConfig,checkAuth:Ft.checkAuth,probeManagedMembership:Ft.probeManagedMembership,startOAuthLogin:qn.startOAuthLogin,pollOAuthLogin:qn.pollOAuthLogin,cancelOAuthLogin:qn.cancelOAuthLogin,getUsage:qn.getUsage,logout:Ft.logout}}const uhe=640,che=`(max-width: ${uhe}px)`;function dhe(){const e=G(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(che);e.value=t.matches;const n=i=>{e.value=i.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),Mn(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),Mn(()=>t.removeListener(n))),e}const fB=G(typeof window>"u"?0:window.innerWidth);let fm=0,yv=!1;function Vb(){fB.value=window.innerWidth}function fhe(){yv||typeof window>"u"||(window.addEventListener("resize",Vb),yv=!0,Vb())}function hhe(){!yv||typeof window>"u"||(window.removeEventListener("resize",Vb),yv=!1)}function hB(e,t,n){return Math.max(t,e-n)}function Zb(e,t,n){return Math.min(n,Math.max(t,e))}function pB(){return mn(()=>{fm+=1,fhe()}),Gn(()=>{fm=Math.max(0,fm-1),fm===0&&hhe()}),{viewportWidth:fB}}const phe=24;function ghe(e){const t=G(null),n=G(!0);let i=null,s=null,o=null,r=0,l=0,a=!1,u=0;function c(){const y=t.value;y&&(y.scrollTop=Math.max(y.scrollTop,r))}function d(){const A=t.value?.firstElementChild??null;A!==o&&(o&&i?.unobserve(o),o=A,A&&i?.observe(A))}function f(){const y=t.value;!y||a||(n.value=r-y.scrollTop-lh(y));return}requestAnimationFrame(()=>{requestAnimationFrame(()=>h(y))})}function m(){const y=t.value;y&&(i?.disconnect(),s?.disconnect(),o=null,a=!1,u++,r=0,l=0,typeof ResizeObserver=="function"?(i=new ResizeObserver(()=>{const A=t.value;if(!A)return;const{scrollHeight:b,clientHeight:C}=A,v=b>r+1,x=C{n.value=!0,kt(m)}),qe(t,()=>void kt(m)),mn(()=>void kt(m)),Mn(()=>{u++,i?.disconnect(),s?.disconnect()}),{scroller:t,following:n,onScroll:f,pinScroll:g}}function mhe(e){try{const t=To(e);if(t===null)return null;const n=Number(t);return Number.isFinite(n)?n:null}catch{return null}}function e_(e,t){try{Js(e,String(t))}catch{}}function vhe(e){const{storageKey:t,defaultWidth:n,min:i,max:s,reverse:o=!1,axis:r="x",applyLive:l}=e;function a(D){return Number.isFinite(D)?Math.min(Vu(s),Math.max(i,Math.round(D))):n}const u=G(a(mhe(t)??n)),c=G(!1);function d(D){const T=D<=i,N=D>=Vu(s),O=r==="x"?"col-resize":"row-resize";if(T&&N)return O;const[P,R]=r==="x"?["e-resize","w-resize"]:["s-resize","n-resize"];return N?o?P:R:T?o?R:P:O}const f=G(null),h=L(()=>d(f.value??u.value));function g(D){typeof document>"u"||(document.body.style.cursor=d(D))}function m(D){const T=a(D);u.value=T,e_(t,T)}qe(()=>Vu(s),D=>{!c.value&&u.value>D&&m(D)});let y=0,A=0,b=null,C=-1,v=0,x=0,S=0;function _(){if(x=0,!c.value)return;const D=v-y;S=a(A+(o?-D:D)),f.value=S,g(S),l?l(S):u.value=S}function I(D){if(c.value&&(v=r==="x"?D.clientX:D.clientY,x===0)){if(typeof requestAnimationFrame!="function"){_();return}x=requestAnimationFrame(_)}}function M(){if(c.value){if(x!==0&&(cancelAnimationFrame(x),_()),c.value=!1,l?m(S):e_(t,u.value),f.value=null,typeof document<"u"&&(document.body.style.userSelect="",document.body.style.cursor=""),b){try{b.releasePointerCapture(C)}catch{}b.removeEventListener("pointermove",I),b.removeEventListener("pointerup",M),b.removeEventListener("pointercancel",M)}b=null,C=-1}}function $(D){D.preventDefault(),c.value=!0,y=r==="x"?D.clientX:D.clientY,A=a(u.value),S=A,b=D.currentTarget,C=D.pointerId,typeof document<"u"&&(document.body.style.userSelect="none"),g(A);try{b.setPointerCapture(C)}catch{}b.addEventListener("pointermove",I),b.addEventListener("pointerup",M),b.addEventListener("pointercancel",M)}return Gn(M),{width:u,dragging:c,cursor:h,clamp:a,setWidth:m,onPointerDown:$}}function yhe(e){const{sessionId:t}=e;function n(a){return To(NS(a))??""}function i(a,u){const c=NS(a);u?Js(c,u):Tr(c)}const s=G(n(t())),o=G(null);qe(s,a=>{i(t(),a)}),qe(t,(a,u)=>{a!==u&&(i(u,s.value),s.value=n(a))});function r(a){s.value=a,kt(()=>{const u=o.value;if(!u)return;u.focus();const c=a.length;u.setSelectionRange(c,c)})}function l(){i(t(),"")}return{text:s,editorRef:o,loadForEdit:r,clearDraft:l}}function khe(e){return e?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable===!0:!1}function bhe(e){const{sessionId:t,mobile:n,starting:i,dockedComposer:s,emptyComposer:o}=e,r=G(!1);qe(t,()=>{n()||(r.value=!0)}),qe([r,s,o,i],()=>{if(!r.value)return;const l=s.value??o.value;if(!l)return;const a=typeof document<"u"?document.activeElement:null;if(khe(a)){r.value=!1;return}l.focus(),(typeof document>"u"||document.activeElement!==a)&&(r.value=!1)},{flush:"post"})}const kv=100;function Ahe(e){const t=tf(hn.inputHistory);if(Array.isArray(t)){const n=t.filter(o=>typeof o=="string"&&o.length>0);if(!e||n.length===0)return{};const i=n.length>kv?n.slice(-kv):n,s={[e]:i};return _c(hn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function Che(e){const{text:t,editorRef:n,sessionId:i}=e,s=G(Ahe(i())),o=L(()=>s.value[i()??""]??[]);let r=-1,l="";function a(y){const A=i();if(r=-1,!A)return;const b=y.trim();if(!b)return;const C=s.value[A]??[];if(C.at(-1)===b)return;const v=[...C,b],x=v.length>kv?v.slice(-kv):v;s.value={...s.value,[A]:x},_c(hn.inputHistory,s.value)}function u(){const y=n.value;return y?(y.selectionStart??0)===0:!1}function c(y){t.value=y,kt(()=>{const A=n.value;if(!A)return;const b=y.length;A.setSelectionRange(b,b)})}function d(){const y=o.value;if(y.length!==0){if(r===-1)l=t.value,r=y.length-1;else if(r>0)r-=1;else return;c(y[r])}}function f(){if(r===-1)return;const y=o.value;r0}return qe(i,()=>{r=-1}),{push:a,caretAtTextStart:u,recallOlder:d,recallNewer:f,resetBrowsing:h,isBrowsing:g,hasHistory:m}}function whe(e){const{text:t,editorRef:n,skills:i,emitCommand:s,historyPush:o,clearDraft:r,resolveDesc:l}=e,a=G(!1),u=G([]),c=G([]),d=G(0);function f(){const g=t.value;if(/^\/\S*$/.test(g)){const m=xae(g,p$(i()),l);u.value=m.map(y=>y.item),c.value=m.map(y=>y.ranges),d.value=0,a.value=!0}else a.value=!1}function h(g){if(a.value=!1,g.acceptsInput){t.value=`${g.name} `,kt(()=>{const m=n.value;if(!m)return;const y=t.value.length;m.setSelectionRange(y,y),m.focus()});return}t.value="",r?.(),o(g.name),s(g.name)}return{open:a,items:u,ranges:c,active:d,update:f,select:h}}function t_(e,t){const n=t.toLowerCase(),i=[],s=[];for(const o of e){const r=o.name.toLowerCase();r.startsWith(n)?i.push(o):r.includes(n)&&s.push(o)}return[...i,...s]}function n_(e){return e.kind==="directory"||e.path.endsWith("/")?"folder":"file"}function xhe(e){const{text:t,editorRef:n,searchFiles:i,skills:s,insertMention:o}=e,r=G(!1),l=G([]),a=G(!1),u=G([]),c=G(0),d=G(!1),f=L(()=>[...l.value.map(N=>({kind:n_(N),file:N})),...u.value.map(N=>({kind:"skill",skill:N}))]);let h=null,g=0,m=null,y=!1;function A(){const N=t.value,O=n.value?.selectionStart??N.length,P=n.value?.inlineTextRunStart?.()??0;let R=O-1;for(;R>=P&&!/\s/.test(N[R]);)R--;R++,R=Math.max(R,P);const q=N.slice(R,O);return!q.startsWith("@")&&!q.startsWith("@")?null:{token:q.slice(1),start:R,end:O}}function b(N){return N.kind==="skill"?`skill:${N.skill.name}`:`${N.kind}:${N.file.path}`}let C=!1,v=!1;qe(c,()=>{v||(C=!0)},{flush:"sync"});function x(N){v=!0,c.value=N,v=!1}function S(N){a.value=!1;const O=f.value[c.value],P=O?b(O):null;if(l.value=N,!C&&N.length>0&&O?.kind==="skill"){x(0);return}if(P===null){x(0);return}const R=f.value.findIndex(q=>b(q)===P);x(R===-1?0:R)}async function _(N,O){const P=++g;d.value=!0,r.value=!0;const R=()=>{const q=A();return P===g&&q!==null&&q.token===O&&r.value};try{const q=await N(O);R()&&S(q)}catch{R()&&S([])}finally{R()&&(d.value=!1)}}function I(){const N=A(),O=i();if(h!==null&&clearTimeout(h),y=!1,C=!1,!N){m=null,r.value=!1,d.value=!1,a.value=!1;return}const P=N.token;if(P!==m&&(l.value.length>0&&(a.value=!0),g+=1),m=P,u.value=P.length>0?t_(s?.()??[],P):[],x(0),!O){l.value=[],d.value=!1,a.value=!1,r.value=u.value.length>0;return}if(P.length===0){_(O,P);return}u.value.length>0&&(r.value=!0),h=setTimeout(()=>{h=null;const R=A();!R||R.token!==P||_(O,P)},200)}function M(){const N=A();N&&(u.value=N.token.length>0?t_(s?.()??[],N.token):[],c.value>=f.value.length&&x(0))}qe(()=>s?.(),()=>{y||M()});function $(N){if(N.kind==="skill")return{kind:"skill",name:N.skill.name};const O=N.file.path;return{kind:n_(N.file),path:O,name:N.file.name||O.split("/").filter(Boolean).pop()||O}}function D(){h!==null&&(clearTimeout(h),h=null),y=!0,C=!1,r.value=!1,d.value=!1,a.value=!1,l.value=[],m=null,g+=1}function T(N){const O=A();if(!O||N.kind!=="skill"&&a.value)return;if(D(),o){o($(N),{start:O.start,end:O.end});return}if(N.kind==="skill")return;const P=t.value;t.value=P.slice(0,O.start)+N.file.path+P.slice(O.end),kt(()=>{const R=n.value;if(!R)return;const q=O.start+N.file.path.length;R.setSelectionRange(q,q),R.focus()})}return{open:r,items:f,fileItems:l,fileStale:a,skillItems:u,active:c,loading:d,update:I,close:D,select:T}}const She="kimi-web.file-preview-width",jf=320;function _he({client:e,sideWidth:t,detailTarget:n,closeFilePreview:i}){const{viewportWidth:s}=pB(),o=L(()=>Math.max(0,s.value-t.value)),r=L(()=>hB(o.value,jf,jf));function l(ae){return Zb(Math.round(ae),jf,r.value)}function a(){return l(o.value/2)}const u=L(()=>a()),c=G(u.value),d=L(()=>Zb(c.value,jf,r.value)),f=G(null),h=L(()=>{const ae=f.value;if(!ae)return null;const oe=e.turns.value.find(Q=>Q.id===ae.turnId);return oe?.role==="compaction"&&oe.text?oe.text:null}),g=L(()=>h.value!==null);function m(ae){if(f.value?.turnId===ae.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=ae}function y(){f.value=null,n.value==="compaction"&&(n.value=null)}const A=G(null),b=L(()=>{const ae=A.value;if(!ae)return{entry:void 0,version:0};const oe=e.auxiliaryTranscripts.getEntry(ae.sessionId,ae.subagentId);return{entry:oe,version:oe?.version.value??0}});function C(ae){const oe=e.turns.value.flatMap(Q=>Q.tools??[]).find(Q=>Q.agentId===ae);if(!oe)return{};try{const Q=JSON.parse(oe.arg);return{name:typeof Q.description=="string"?Q.description:void 0,subagentType:typeof Q.subagent_type=="string"?Q.subagent_type:void 0,status:oe.status,outputLines:oe.output}}catch{return{}}}const v=L(()=>{const ae=A.value;if(!ae)return null;const oe=e.activeAppTasks.value.find(Mt=>Mt.agentId===ae.subagentId||Mt.id===ae.subagentId||Mt.backgroundTaskId===ae.subagentId);if(oe)return nse(oe,e.findBashCommandForTask(oe));const Q=b.value.entry?.channel,ne=Q?.agents.find(Mt=>Mt.agentId===ae.subagentId),ge=Q?.refreshError??!1,Ae=Q===void 0||Q.loading,_e=Q?.snapshot.meta.activity==="turn",Ke=C(ae.subagentId),xe=Q?.snapshot.items.findLast(Mt=>Mt.kind==="turn"),Ne=xe?.kind==="turn"&&xe.state==="cancelled",et=xe?.kind==="turn"&&xe.state==="failed"||Ke.status==="error",ut=_e?"working":Ne?"cancelled":et?"failed":Ae?"queued":ge&&Ke.status===void 0?"failed":"completed",yt=_e?"running":Ne?"cancelled":et?"failed":Ae?"running":ge&&Ke.status===void 0?"failed":"completed";return{id:ae.subagentId,name:ne?.label??Ke.name??ae.subagentId,subagentType:Ke.subagentType??(ne?.type==="sub"?"subagent":ne?.type),phase:ut,status:yt,outputLines:Ke.outputLines}}),x=L(()=>{const ae=b.value.entry;if(!ae)return[];const oe=A.value,Q=ae.channel.agents.find(ne=>ne.agentId===oe?.subagentId);return pse(ae.channel.snapshot,e.getFileUrl,Q,{sessionId:oe?.sessionId,getSessionMediaUrl:e.getSessionMediaUrl})}),S=L(()=>b.value.entry?.channel.loading??!1),_=L(()=>b.value.entry?.channel.refreshError??!1),I=L(()=>b.value.entry?.channel.loadingOlder??!1),M=L(()=>b.value.entry?.channel.loadOlderError??!1),$=L(()=>b.value.entry?.channel.snapshot.hasMoreOlder??!1),D=L(()=>b.value.entry?.channel.snapshot.meta.activity==="turn"),T=L(()=>v.value!==null);function N(ae){const oe=e.activeAppTasks.value.find(Q=>Q.agentId===ae||Q.id===ae||Q.backgroundTaskId===ae);return!oe||oe.kind==="subagent"&&oe.agentId===ae}function O(ae){return e.activeAppTasks.value.find(Q=>Q.agentId===ae||Q.id===ae||Q.backgroundTaskId===ae)?.agentId??ae}function P(ae){const oe=e.activeSessionId.value;if(!ae||!oe)return;const Q=O(ae);if(n.value==="agent"&&A.value?.sessionId===oe&&A.value.subagentId===Q){R();return}const ne=A.value;ne&&ne.subagentId!==Q&&e.auxiliaryTranscripts.deactivate(ne.sessionId,ne.subagentId),A.value={sessionId:oe,subagentId:Q},n.value="agent",N(Q)&&e.auxiliaryTranscripts.activate(oe,Q)}qe(()=>e.activeAppTasks.value,ae=>{const oe=A.value;if(!oe)return;const Q=ae.find(ne=>ne.backgroundTaskId===oe.subagentId&&ne.agentId!==void 0);!Q||Q.agentId===oe.subagentId||(A.value={sessionId:oe.sessionId,subagentId:Q.agentId},n.value==="agent"&&e.auxiliaryTranscripts.activate(oe.sessionId,Q.agentId))});function R(){const ae=A.value;ae&&e.auxiliaryTranscripts.deactivate(ae.sessionId,ae.subagentId),A.value=null,n.value==="agent"&&(n.value=null)}qe(n,(ae,oe)=>{if(oe!=="agent"||ae==="agent")return;const Q=A.value;Q&&e.auxiliaryTranscripts.deactivate(Q.sessionId,Q.subagentId)});function q(){const ae=b.value.entry;ae&&ae.channel.loadOlder().catch(()=>{})}const j=G("list"),W=G(null);function z(){if(n.value==="diff"){H();return}n.value="diff",j.value="list",W.value=null,e.loadGitStatus(e.activeSessionId.value)}function H(){n.value==="diff"&&(n.value=null),j.value="list",W.value=null,e.clearFileDiff()}async function ee(ae){j.value="detail",W.value=ae,await e.loadFileDiff(ae)}const V=Ul(null);function ie(ae){if(V.value===ae&&n.value==="turn-diff"){se();return}V.value=ae,n.value="turn-diff"}function se(){V.value=null,n.value==="turn-diff"&&(n.value=null)}async function Z(ae){if(!e.activeSessionId.value&&e.activeWorkspaceId.value){const oe=await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,ae);return n.value="btw",oe}return await e.openSideChat(ae),n.value="btw",null}function pe(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function re(){n.value==="btw"&&(n.value=null)}const fe=L(()=>e.sideChatVisible.value),Ee=L(()=>n.value!==null&&(n.value!=="compaction"||g.value)&&(n.value!=="agent"||T.value)&&(n.value!=="btw"||fe.value)),X=G(!1),we=G({});function Y(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return A.value?{kind:"agent",...A.value}:null;case"btw":return{kind:"btw"};default:return null}}function le(ae){if(ae)switch(ae.kind){case"compaction":f.value={turnId:ae.turnId},n.value="compaction";break;case"agent":if(e.activeSessionId.value){const oe=O(ae.subagentId);A.value={sessionId:e.activeSessionId.value,subagentId:oe},n.value="agent",N(oe)&&e.auxiliaryTranscripts.activate(e.activeSessionId.value,oe)}break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function Ce(){return n.value==="compaction"&&g.value?(y(),!0):n.value==="agent"&&T.value?(R(),!0):n.value==="file"?(i(),!0):n.value==="diff"?(H(),!0):n.value==="turn-diff"?(se(),!0):n.value==="btw"?(pe(),!0):!1}return qe(e.activeSessionId,(ae,oe)=>{if(oe){const Q=Y();Q?we.value[oe]=Q:delete we.value[oe]}i(),y(),R(),H(),se(),re(),ae&&le(we.value[ae])}),{PREVIEW_WIDTH_KEY:She,PREVIEW_MIN:jf,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,compactionPanelText:h,compactionPanelVisible:g,openCompactionPanel:m,closeCompactionPanel:y,agentPanelMember:v,agentPanelTurns:x,agentPanelLoading:S,agentPanelLoadError:_,agentPanelLoadingMore:I,agentPanelLoadMoreError:M,agentPanelHasMore:$,agentPanelRunning:D,agentPanelVisible:T,openAgentPanel:P,closeAgentPanel:R,loadOlderAgentMessages:q,detailDiffMode:j,detailDiffPath:W,openDiffDetail:z,closeDiffDetail:H,selectDiffFile:ee,turnDiffChange:V,openTurnDiff:ie,closeTurnDiff:se,btwVisible:fe,openSideChatTab:Z,closeSideChat:pe,hideSideChatPanel:re,sidePanelVisible:Ee,panelDragging:X,closeOpenSidePanel:Ce}}const Ihe=hn.sidebarWidth,i_=hn.sidebarCollapsed,s_=270,o3=220,Mhe=480,Ehe=320;function The(e={}){const{viewportWidth:t}=pB(),n=G(s_),i=G(!1),s=G(!1),o=L(()=>{const c=Ehe+(Vu(e.previewOpen)?jf:0);return Math.min(Mhe,hB(t.value,o3,c))}),r=L(()=>Zb(n.value,o3,o.value));function l(){try{i.value=To(i_)==="true"}catch{i.value=!1}}function a(){try{Js(i_,String(i.value))}catch{}}function u(){i.value=!i.value,a()}return{SIDEBAR_WIDTH_KEY:Ihe,SIDEBAR_DEFAULT:s_,SIDEBAR_MIN:o3,sidebarMax:o,sessionColWidth:n,sidebarCollapsed:i,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}const Lhe=40409;function o_(e){return zs(e)&&e.code===Lhe}function r_(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")}function l_(e){if(e.startsWith("\\\\"))return e;const t=/^[a-zA-Z]:/.test(e)?e.slice(0,2):"",n=[];for(const i of e.slice(t.length).split(/[\\/]+/))if(!(!i||i===".")){if(i===".."){n.pop();continue}n.push(i)}return t?`${t}/${n.join("/")}`:`/${n.join("/")}`}function Nhe({client:e,detailTarget:t,t:n}){const i=G(null),s=G(null),o=G(!1),r=G(null),l=G(null);let a=0;const u=L(()=>{const v=l.value;return v?e.getFileDownloadUrl(v):null}),c=L(()=>i.value!==null&&l.value!==null);function d(v){return v.length>1?v.replace(/\/+$/,""):v}function f(v){const x=Wy(v,e.status.value.cwd);return x===null||x.split(/[\\/]+/).includes("..")?null:h(x)||null}function h(v){const x=[];for(const S of v.split(/[\\/]+/))if(!(!S||S===".")){if(S===".."){x.pop();continue}x.push(S)}return x.join("/")}function g(v){const x=v.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 I=x===S?"":x.slice(S.length+1);if(I.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const M=h(I);return M?{path:M}:{error:n("filePreview.errors.isDirectory")}}if(x.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const _=h(x);return _?{path:_}:{error:n("filePreview.errors.emptyPath")}}async function m(v){const x=i.value;if(t.value==="file"&&x&&x.path===v.path&&x.line===v.line&&(x.content??"")===(v.content??"")){A();return}const S=++a;if(t.value="file",s.value=null,r.value=null,o.value=!0,i.value=v,l.value=null,typeof v.content=="string"){o.value=!1,s.value={path:v.path,content:v.content,encoding:"utf-8",mime:"text/markdown",isBinary:!1,size:v.content.length};return}if(!r_(v.path)&&v.path.split(/[\\/]+/).includes("..")){const I=d(e.status.value.cwd);I&&(v={...v,path:l_(`${I}/${v.path}`)})}if(r_(v.path)){v={...v,path:l_(v.path)};const I=f(v.path);if(I!==null)v={...v,path:I};else{try{const M=await e.readHostFileContent(v.path);if(S!==a)return;l.value=null,s.value={path:v.path,content:M.content,encoding:M.encoding,mime:M.mime,isBinary:M.isBinary,size:M.size}}catch(M){if(S!==a)return;r.value=o_(M)?n("filePreview.errors.notFound"):SQ(M)?n("filePreview.errors.tooLarge"):M instanceof Error?M.message:n("filePreview.errors.loadFailed")}finally{S===a&&(o.value=!1)}return}}const _=g(v.path);if("error"in _){o.value=!1,r.value=_.error;return}l.value=_.path;try{const I=await e.readFileContent(_.path);if(S!==a)return;I?s.value={...I,path:I.path||_.path}:r.value=n("filePreview.errors.loadFailed")}catch(I){if(S!==a)return;r.value=o_(I)?n("filePreview.errors.notFound"):I instanceof Error?I.message:n("filePreview.errors.loadFailed")}finally{S===a&&(o.value=!1)}}function y(){a+=1,i.value=null,l.value=null,s.value=null,r.value=null,o.value=!1}function A(){y(),t.value==="file"&&(t.value=null)}qe(t,(v,x)=>{x==="file"&&v!=="file"&&y()});function b(){const v=s.value?.path??i.value?.path;v&&e.openWorkspaceFile(v,i.value?.line)}function C(){const v=s.value?.path??i.value?.path;v&&e.revealWorkspaceFile(v)}return{previewTarget:i,previewFile:s,previewLoading:o,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:m,closeFilePreview:A,openPreviewInEditor:b,revealPreviewFile:C}}function Fhe({running:e,title:t="Kimi Code"}){if(Wh){_k(()=>{typeof document<"u"&&(document.title=Vu(t))});return}const n=["◐","◓","◑","◒"],i=G(0);let s=null;function o(){s===null&&(i.value=0,s=setInterval(()=>{i.value=(i.value+1)%n.length},250))}function r(){s!==null&&(clearInterval(s),s=null),i.value=0}qe(e,a=>{a?o():r()},{immediate:!0});const l=L(()=>`${e.value?`${n[i.value]} `:""}${Vu(t)}`);_k(()=>{typeof document<"u"&&(document.title=l.value)}),Mn(()=>{r()})}function Dhe(e){const{api:t,uploadImage:n,sessionId:i,insertFolderPaths:s}=e,o=G({}),r=L(()=>o.value[i()??""]??[]),l=G(null),a=G(null),u=G(!1);let c=0;function d(){return`att_${++c}`}function f(H,ee){o.value={...o.value,[H]:ee}}function h(H){if(H.previewUrl!==void 0)try{URL.revokeObjectURL(H.previewUrl)}catch{}}function g(H){return H.startsWith("image/")?"image":H.startsWith("video/")?"video":"file"}function m(H){return H<1024*1024?"<1mb":H<10*1024*1024?"1-10mb":H<50*1024*1024?"10-50mb":"50mb+"}async function y(H,ee){const V=n();if(!V)return;const ie=i()??"";if(H.length!==0)for(const se of H){const Z=g(se.type);m(se.size),Math.min(H.length,100);const pe=d(),re=Z==="file"?void 0:URL.createObjectURL(se),fe={localId:pe,name:se.name,kind:Z,previewUrl:re,mediaType:se.type||"application/octet-stream",size:se.size,uploading:!0};f(ie,[...o.value[ie]??[],fe]),V(se,se.name).then(Ee=>{const X=o.value[ie]??[];f(ie,X.map(we=>we.localId===pe?{...we,uploading:!1,fileId:Ee?.fileId,mediaType:Ee?.mediaType??we.mediaType,error:Ee===null}:we))}).catch(()=>{const Ee=o.value[ie]??[];f(ie,Ee.map(X=>X.localId===pe?{...X,uploading:!1,error:!0}:X))})}}function A(H){const ee=i()??"",V=o.value[ee]??[],ie=V.find(se=>se.localId===H);l.value?.localId===H&&(l.value=null),ie&&h(ie),f(ee,V.filter(se=>se.localId!==H))}function b(H){l.value=H}function C(){l.value=null}function v(){a.value?.click()}function x(H){const ee=H.target,V=Array.from(ee.files??[]);y(V),ee.value=""}function S(H){const ee=H.clipboardData;if(!ee)return;const{files:V,folderPaths:ie,hasFolders:se}=Boe(ee);if(ie.length>0?(s?.(ie),H.preventDefault()):se&&H.preventDefault(),!n()||V.length===0)return;const Z=V.map(pe=>{if(pe.name.includes("."))return pe;const re=pe.type.split("/")[1]??"png";return new File([pe],`paste-${Date.now()}.${re}`,{type:pe.type})});H.preventDefault(),y(Z)}let _=0;function I(H){!n()||!Array.from(H.dataTransfer?.items??[]).some(V=>V.kind==="file")||(H.preventDefault(),H.stopPropagation(),u.value=!0)}function M(){u.value=!1}function $(H){_=0,u.value=!1;const{files:ee,folderPaths:V}=gb(H);V.length>0&&(s?.(V),H.preventDefault(),H.stopPropagation()),n()&&(H.preventDefault(),H.stopPropagation(),y(ee))}function D(H){return Array.from(H.dataTransfer?.items??[]).some(ee=>ee.kind==="file")}function T(H){!n()||!D(H)||(H.preventDefault(),_+=1,u.value=!0)}function N(H){!n()||!D(H)||H.preventDefault()}function O(H){!n()||!D(H)||(_=Math.max(0,_-1),_===0&&(u.value=!1))}function P(H){_=0,u.value=!1;const{files:ee,folderPaths:V}=gb(H);V.length>0&&(s?.(V),H.preventDefault()),n()&&(H.preventDefault(),y(ee))}function R(){const H=i()??"";for(const ee of o.value[H]??[])h(ee);f(H,[])}function q(){l.value=null,R()}function j(H,ee,V){const ie=o.value[H]??[];ie.some(se=>se.localId===ee)&&f(H,ie.map(se=>se.localId===ee?{...se,...V}:se))}function W(H){return fetch(H).then(ee=>{if(!ee.ok)throw new Error(`fetch failed: ${ee.status}`);return ee.blob()})}function z(H,ee,V){const ie=ee??i()??"";if(V?.append!==!0){for(const se of o.value[ie]??[])h(se);f(ie,[])}for(const se of H){const Z=d(),pe=/^data:/i.test(se.url),re=/^blob:/i.test(se.url),fe=se.name??se.kind;if(se.fileId){const Ee={localId:Z,name:fe,kind:se.kind,previewUrl:se.kind==="file"?void 0:se.url,uploading:!1,fileId:se.fileId,sessionId:se.sessionId,mediaType:se.mediaType,size:se.size};f(ie,[...o.value[ie]??[],Ee]),se.kind==="image"&&!pe&&!re&&(se.sessionId?t.getSessionMediaBlob(se.sessionId,se.fileId):t.getFileBlob(se.fileId)).then(we=>{const Y=URL.createObjectURL(we);if(!(o.value[ie]??[]).some(Ce=>Ce.localId===Z)){URL.revokeObjectURL(Y);return}j(ie,Z,{previewUrl:Y})}).catch(()=>{})}else{if(!se.url)continue;const Ee=n();if(!Ee)continue;const X={localId:Z,name:fe,kind:se.kind,previewUrl:se.url,uploading:!0};f(ie,[...o.value[ie]??[],X]),W(se.url).then(we=>{const Y=fe.includes(".")?fe:`${fe}.${we.type.split("/")[1]??"bin"}`;return Ee(we,Y)}).then(we=>{if(we===null){const Y=o.value[ie]??[];f(ie,Y.filter(le=>le.localId!==Z));return}j(ie,Z,{uploading:!1,fileId:we.fileId})}).catch(()=>{const we=o.value[ie]??[];f(ie,we.filter(Y=>Y.localId!==Z))})}}}return qe(i,()=>{l.value=null}),mn(()=>{document.addEventListener("paste",S),document.addEventListener("dragenter",T),document.addEventListener("dragover",N),document.addEventListener("dragleave",O),document.addEventListener("drop",P)}),Mn(()=>{document.removeEventListener("paste",S),document.removeEventListener("dragenter",T),document.removeEventListener("dragover",N),document.removeEventListener("dragleave",O),document.removeEventListener("drop",P);for(const H of Object.values(o.value))for(const ee of H)h(ee);l.value=null}),{attachments:r,previewAttachment:l,fileInputRef:a,isDragOver:u,removeAttachment:A,openAttachmentPreview:b,closeAttachmentPreview:C,openFilePicker:v,handleFileInputChange:x,handleDragOver:I,handleDragLeave:M,handleDrop:$,clearAfterSubmit:R,clearAttachments:q,loadAttachments:z}}const $he=3;function gB(e){const t=G("starting"),n=G(!1),i=G(null),s=G(0);let o=null,r=null,l=null,a=0,u=!1,c=!1;function d(){o&&(clearTimeout(o),o=null),r&&(clearInterval(r),r=null),l&&(clearTimeout(l),l=null)}function f(A){d(),t.value="success",l=setTimeout(()=>{l=null,e.onSuccess?.()},A)}function h(){r&&clearInterval(r),r=setInterval(()=>{s.value>0?s.value--:(r&&clearInterval(r),r=null)},1e3)}function g(A){o&&clearTimeout(o),o=setTimeout(async()=>{const b=await e.onPollOAuthLogin();if(!c&&!u){if(b===null){if(a+=1,a>=$he){d(),n.value=!0,t.value="error";return}g(A);return}a=0,b.status==="authenticated"?f(1200):b.status==="expired"||b.status==="cancelled"?(d(),t.value="expired",b.status,void 0):g(A)}},A*1e3)}async function m(){d(),i.value=null,n.value=!1,a=0,u=!1,t.value="starting";const A=await e.onStartOAuthLogin();if(c){A!==null&&A.status!=="authenticated"&&e.onCancelOAuthLogin();return}if(!A){t.value="error";return}if(A.status==="authenticated"){f(800);return}i.value={flowId:A.flowId,verificationUri:A.verificationUri,verificationUriComplete:A.verificationUriComplete,userCode:A.userCode,expiresIn:A.expiresIn,interval:A.interval},s.value=A.expiresIn,t.value="device-code",h(),g(A.interval)}function y(){t.value!=="success"&&(d(),t.value==="device-code"&&!u&&(u=!0,e.onCancelOAuthLogin()))}return M0()&&Xd(()=>{c=!0,y()}),{step:t,pollError:n,flow:i,secondsLeft:s,startFlow:m,cancelFlow:y}}const Bhe={state:"idle"};function zhe(e){const t=G(Bhe),n=G(To(hn.updateSkippedVersion)),i=G(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(o=>{i.value=o}).catch(()=>{}),e!==void 0){let o=!1;e.onUpdateStatus(r=>{o=!0,t.value=r}),e.getUpdateStatus().then(r=>{o||(t.value=r)}).catch(()=>{})}const s=L(()=>{const o=t.value;return!(o.state==="idle"||o.state==="available"&&o.version!==void 0&&o.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:i,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:(o,r)=>{i.value=o,typeof e?.setUpdateAutoDownload=="function"&&e.setUpdateAutoDownload(o).then(()=>{}).catch(()=>{})},skipVersion:()=>{const o=t.value.version;t.value.state==="available"&&o!==void 0&&(n.value=o,Js(hn.updateSkippedVersion,o))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const o=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return o.outcome==="available"&&o.version!==void 0&&o.version===n.value&&(n.value=null,Tr(hn.updateSkippedVersion)),o},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let r3=null;function Rhe(){return r3===null&&(r3=zhe(window.kimiDesktop)),r3}const bv=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],Wl=PZ({locale:dF()});function E6(e){Wl.global.locale.value=e,Js(hn.locale,e)}const Ohe=["aria-expanded"],Phe={class:"user-menu-avatar","aria-hidden":"true"},jhe=["src"],Hhe={class:"user-menu-name"},Whe={class:"user-menu-name"},qhe={class:"user-menu-item-label"},Uhe={class:"user-menu-item-label"},Khe={class:"user-menu-item-label user-menu-login-label"},Vhe={class:"user-menu-item-label"},Zhe={class:"user-menu-row-value"},Ghe={class:"user-menu-item-label"},Qhe={class:"user-menu-row-value"},Yhe={class:"user-menu-item-label"},Jhe={key:0,class:"user-menu-usage"},Xhe={key:0,class:"user-menu-usage-state"},e1e={key:1,class:"user-menu-usage-state"},t1e={class:"user-menu-usage-error"},n1e={key:2,class:"user-menu-usage-state user-menu-usage-empty"},i1e={class:"user-menu-usage-main"},s1e={class:"user-menu-usage-label"},o1e={key:0,class:"user-menu-usage-hint"},r1e={class:"user-menu-item-label"},l1e={class:"user-menu-item-label"},a1e=Qe({__name:"UserMenu",emits:["login","openSettings"],setup(e,{emit:t}){const n=t,{t:i,locale:s}=Bt(),o=Kl(),{confirm:r}=Ic(),l=L(()=>o.managedProviderStatus.value==="authenticated"),a=o.managedUserInfo,u=o.managedMembership,c=L(()=>a.value?.nickname||i("sidebar.defaultUserName")),d=L(()=>u.value==="free"||Xoe(a.value?.userLevel)),f=L(()=>u.value!=="free"),h=G(!1);qe(()=>a.value?.avatar,()=>{h.value=!1});const g=L(()=>!!a.value?.avatar&&!h.value),m=o.colorScheme,y=L(()=>i(`theme.${m.value}`)),A=L(()=>m.value==="light"?"light-mode":m.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 C(ne){o.setColorScheme(ne)}const v=L(()=>bv.find(ne=>ne.code===s.value)?.label??s.value);function x(ne){s.value!==ne&&E6(ne)}const S=G(!1),_=G({}),I=G(null),M=G(null);let $=null;function D(ne){const ge=ne.target;ge.closest(".user-menu")||ge.closest(".user-menu-trigger")||ge.closest(".user-submenu")||R()}function T(ne){ne.key==="Escape"&&(ne.stopPropagation(),R())}async function N(){if(S.value){R();return}S.value=!0,document.addEventListener("mousedown",D),document.addEventListener("keydown",T,!0),window.addEventListener("resize",R),l.value&&X(),await kt(),O();const ne=M.value;ne&&($=new ResizeObserver(P),$.observe(ne))}function O(){const ne=M.value,ge=I.value?.el;if(!ne||!ge)return;const Ae=ne.getBoundingClientRect(),_e=4,Ke=8,xe=ge.offsetHeight,Ne={left:`${Math.round(Ae.left)}px`,width:`${Math.round(Ae.width)}px`};Ae.top-xe-_e{z[ne]=ge instanceof HTMLElement?ge:ge?.$el??null}}function V(ne){Z(),q.value!==ne&&(q.value=ne,kt(pe))}function ie(ne,ge){ne.key!=="Enter"&&ne.key!==" "&&ne.key!=="ArrowRight"||(ne.preventDefault(),V(ge))}function se(){Z(),H=setTimeout(()=>{q.value=null,H=null},250)}function Z(){H!==null&&(clearTimeout(H),H=null)}function pe(){const ne=q.value,ge=I.value?.el,Ae=W.value?.el,_e=ne!==null?z[ne]:null;if(!ge||!Ae||!_e)return;const Ke=4,xe=8,Ne=ge.getBoundingClientRect(),et=_e.getBoundingClientRect(),ut=Ae.offsetHeight,yt=Math.min(Ae.offsetWidth,Ne.width);let Mt=Ne.right+Ke,Ze=!1;Mt+yt>window.innerWidth-xe&&(Mt=Math.max(xe,Ne.left-yt-Ke),Ze=!0);const Ge=Math.max(xe,Math.min(et.top,window.innerHeight-ut-xe));j.value={top:`${Math.round(Ge)}px`,left:`${Math.round(Mt)}px`,maxWidth:`${Math.round(Ne.width)}px`,transformOrigin:Ze?"top right":"top left","--menu-pop-shift":"-2px"}}const re=G(!1),fe=G(null);let Ee=0;async function X(){const ne=++Ee;re.value=!0;try{const ge=await o.getUsage();ne===Ee&&(fe.value=ge)}finally{ne===Ee&&(re.value=!1)}}const we=L(()=>{if(fe.value?.kind!=="ok")return[];const{summary:ne,limits:ge}=fe.value,Ae=Yoe(ge,5,"hour");return[ne,Ae].filter(_e=>_e!=null)}),Y=L(()=>fe.value?.kind==="error"?fe.value.message:i("settings.planUsage.loadFailed"));function le(ne){return ne.resetAt===void 0?"":qD(ne.resetAt,i)}function Ce(){R(),z0()}function ae(){R(),n("login")}function oe(){R(),n("openSettings")}async function Q(){R(),await r({title:i("sidebar.logoutConfirmTitle"),message:i("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>o.logout()})}return(ne,ge)=>(k(),E(Te,null,[w("button",{ref_key:"triggerRef",ref:M,class:"user-menu-trigger",type:"button","aria-haspopup":"menu","aria-expanded":S.value,onClick:Ct(N,["stop"])},[l.value?(k(),E(Te,{key:0},[w("span",Phe,[g.value?(k(),E("img",{key:0,src:p(a)?.avatar,alt:"",onError:ge[0]||(ge[0]=Ae=>h.value=!0)},null,40,jhe)):(k(),de(p(ve),{key:1,name:"user",size:"sm"}))]),w("span",Hhe,F(c.value),1)],64)):(k(),E(Te,{key:1},[K(p(ve),{name:"user"}),w("span",Whe,F(p(i)("sidebar.notSignedIn")),1)],64))],8,Ohe),(k(),de(Gr,{to:"body"},[K(ls,{name:"menu-pop"},{default:he(()=>[S.value?(k(),de(p(sr),{key:0,ref_key:"menuRef",ref:I,class:"user-menu",style:qt(_.value),onClick:ge[14]||(ge[14]=Ct(()=>{},["stop"]))},{default:he(()=>[l.value?(k(),E(Te,{key:0},[f.value?(k(),de(p(Wt),{key:0,ref:ee("usage"),"aria-haspopup":"true","aria-expanded":q.value==="usage",onMouseenter:ge[1]||(ge[1]=Ae=>V("usage")),onMouseleave:se,onFocus:ge[2]||(ge[2]=Ae=>V("usage")),onBlur:se,onClick:ge[3]||(ge[3]=Ae=>V("usage")),onKeydown:ge[4]||(ge[4]=Ae=>ie(Ae,"usage"))},{default:he(()=>[K(p(ve),{name:"histogram",size:"sm"}),w("span",qhe,F(p(i)("settings.planUsage.title")),1),K(p(ve),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"])):te("",!0),d.value?(k(),de(p(Wt),{key:1,onClick:Ce,onMouseenter:se},{default:he(()=>[K(p(ve),{name:"music",size:"sm"}),w("span",Uhe,F(p(i)("sidebar.upgradeMembership")),1),K(p(ve),{name:"external-link",size:"sm"})]),_:1})):te("",!0),K(p(Wt),{separator:""})],64)):(k(),E(Te,{key:1},[K(p(Wt),{class:"user-menu-login",onClick:ae,onMouseenter:se},{default:he(()=>[K(p(ve),{name:"log-in",size:"sm"}),w("span",Khe,F(p(i)("sidebar.signIn")),1)]),_:1}),K(p(Wt),{separator:""})],64)),K(p(Wt),{ref:ee("theme"),"aria-haspopup":"true","aria-expanded":q.value==="theme",onMouseenter:ge[5]||(ge[5]=Ae=>V("theme")),onMouseleave:se,onFocus:ge[6]||(ge[6]=Ae=>V("theme")),onBlur:se,onClick:ge[7]||(ge[7]=Ae=>V("theme")),onKeydown:ge[8]||(ge[8]=Ae=>ie(Ae,"theme"))},{default:he(()=>[K(p(ve),{name:A.value,size:"sm"},null,8,["name"]),w("span",Vhe,F(p(i)("theme.colorSchemeLabel")),1),w("span",Zhe,F(y.value),1),K(p(ve),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),K(p(Wt),{ref:ee("language"),"aria-haspopup":"true","aria-expanded":q.value==="language",onMouseenter:ge[9]||(ge[9]=Ae=>V("language")),onMouseleave:se,onFocus:ge[10]||(ge[10]=Ae=>V("language")),onBlur:se,onClick:ge[11]||(ge[11]=Ae=>V("language")),onKeydown:ge[12]||(ge[12]=Ae=>ie(Ae,"language"))},{default:he(()=>[K(p(ve),{name:"translate",size:"sm"}),w("span",Ghe,F(p(i)("sidebar.language")),1),w("span",Qhe,F(v.value),1),K(p(ve),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),K(p(Wt),{onClick:oe,onMouseenter:se},{default:he(()=>[K(p(ve),{name:"settings",size:"sm"}),w("span",Yhe,F(p(i)("settings.title")),1)]),_:1}),l.value?(k(),E(Te,{key:2},[K(p(Wt),{separator:""}),K(p(Wt),{onClick:ge[13]||(ge[13]=Ae=>void Q()),onMouseenter:se},{default:he(()=>[K(p(ve),{name:"log-out",size:"sm"}),$e(" "+F(p(i)("sidebar.signOut")),1)]),_:1})],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1})])),(k(),de(Gr,{to:"body"},[K(ls,{name:"menu-pop"},{default:he(()=>[q.value!==null?(k(),de(p(sr),{key:0,ref_key:"submenuRef",ref:W,class:"user-submenu",style:qt(j.value),role:q.value==="usage"?"dialog":"menu",onClick:ge[16]||(ge[16]=Ct(()=>{},["stop"])),onMouseenter:Z,onMouseleave:se,onFocusin:Z,onFocusout:se},{default:he(()=>[q.value==="usage"?(k(),E("div",Jhe,[re.value?(k(),E("div",Xhe,[K(p(Mi),{size:"sm"})])):fe.value?.kind!=="ok"?(k(),E("div",e1e,[w("span",t1e,F(Y.value),1),K(p(Zt),{variant:"ghost",size:"sm",onClick:ge[15]||(ge[15]=Ae=>void X())},{default:he(()=>[$e(F(p(i)("settings.planUsage.retry")),1)]),_:1})])):we.value.length===0?(k(),E("span",n1e,F(p(i)("settings.planUsage.empty")),1)):(k(!0),E(Te,{key:3},ht(we.value,(Ae,_e)=>(k(),E("div",{key:_e,class:"user-menu-usage-row"},[w("span",i1e,[w("span",s1e,F(p(WD)(Ae,p(i))),1),le(Ae)?(k(),E("span",o1e,F(le(Ae)),1)):te("",!0)]),w("span",{class:Fe(["user-menu-usage-value",`sev-${p(mb)(Ae.used,Ae.limit)}`])},F(p(i)("settings.planUsage.usedPct",{pct:p(Qm)(Ae.used,Ae.limit)})),3)]))),128))])):q.value==="theme"?(k(),E(Te,{key:1},ht(b,Ae=>K(p(Wt),{key:Ae.value,onClick:_e=>C(Ae.value)},{default:he(()=>[K(p(ve),{name:Ae.icon,size:"sm"},null,8,["name"]),w("span",r1e,F(p(i)(Ae.labelKey)),1),p(m)===Ae.value?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)]),_:2},1032,["onClick"])),64)):(k(!0),E(Te,{key:2},ht(p(bv),Ae=>(k(),de(p(Wt),{key:Ae.code,onClick:_e=>x(Ae.code)},{default:he(()=>[w("span",l1e,F(Ae.label),1),p(s)===Ae.code?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)]),_:2},1032,["onClick"]))),128))]),_:1},8,["style","role"])):te("",!0)]),_:1})]))],64))}}),u1e=gt(a1e,[["__scopeId","data-v-ba83fe5b"]]),c1e={class:"ep-search"},d1e=["placeholder"],f1e={class:"ep-scroll"},h1e={key:0,class:"ep-grid"},p1e=["onClick"],g1e={key:1,class:"ep-empty"},m1e={class:"ep-label"},v1e={class:"ep-grid"},y1e=["onClick"],k1e={class:"ep-label"},b1e={class:"ep-grid"},A1e=["onClick"],a_="kimi-web.recent-emojis",C1e=Qe({__name:"SessionEmojiPicker",props:{current:{default:null},removable:{type:Boolean,default:!0}},emits:["pick"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{handleCompositionStart:s,handleCompositionEnd:o,isComposingKeyEvent:r}=Xr(),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=boe.map(S=>({id:S,labelKey:c[S],emojis:RD.filter(_=>_.group===S).map(_=>_.emoji)})),f=G(h());function h(){try{const S=JSON.parse(localStorage.getItem(a_)??"[]");return Array.isArray(S)?S.filter(_=>typeof _=="string"):[]}catch{return[]}}function g(S,_){f.value=xoe(f.value,S);try{localStorage.setItem(a_,JSON.stringify(f.value))}catch{}a("pick",S,_)}const m=G(""),y=L(()=>m.value.trim().length>0),A=L(()=>Coe(m.value)),b=G(null);mn(()=>b.value?.focus());function C(S){if(r(S))return;const _=A.value[0];y.value&&_&&g(_)}function v(){let S=l.current??void 0;for(;S===void 0||S===l.current;)S=u[Math.floor(Math.random()*u.length)];g(S,"random")}const x=G(null);return t({el:L(()=>x.value?.el),isComposingKeyEvent:r}),(S,_)=>(k(),de(p(sr),{ref_key:"menuRef",ref:x,class:"emoji-picker",role:"dialog","aria-label":p(i)("sidebar.sessionEmojiTitle"),onKeydown:_[4]||(_[4]=Ct(()=>{},["stop"]))},{default:he(()=>[w("div",c1e,[K(p(ve),{name:"search",size:"sm"}),$n(w("input",{ref_key:"inputRef",ref:b,"onUpdate:modelValue":_[0]||(_[0]=I=>m.value=I),class:"ep-input",type:"text",placeholder:p(i)("sidebar.searchEmoji"),autocomplete:"off",spellcheck:"false",onKeydown:_s(C,["enter"]),onCompositionstart:_[1]||(_[1]=(...I)=>p(s)&&p(s)(...I)),onCompositionend:_[2]||(_[2]=(...I)=>p(o)&&p(o)(...I))},null,40,d1e),[[uo,m.value]])]),w("div",f1e,[y.value?(k(),E(Te,{key:0},[A.value.length?(k(),E("div",h1e,[(k(!0),E(Te,null,ht(A.value,I=>(k(),E("button",{key:I,class:Fe(["ep-e",{sel:I===e.current}]),type:"button",onClick:M=>g(I)},F(I),11,p1e))),128))])):(k(),E("div",g1e,F(p(i)("sidebar.noEmojiResults")),1))],64)):(k(),E(Te,{key:1},[f.value.length?(k(),E(Te,{key:0},[w("div",m1e,F(p(i)("sidebar.recentEmojis")),1),w("div",v1e,[(k(!0),E(Te,null,ht(f.value,I=>(k(),E("button",{key:I,class:Fe(["ep-e",{sel:I===e.current}]),type:"button",onClick:M=>g(I)},F(I),11,y1e))),128))])],64)):te("",!0),(k(!0),E(Te,null,ht(p(d),I=>(k(),E(Te,{key:I.id},[w("div",k1e,F(p(i)(I.labelKey)),1),w("div",b1e,[(k(!0),E(Te,null,ht(I.emojis,M=>(k(),E("button",{key:M,class:Fe(["ep-e",{sel:M===e.current}]),type:"button",onClick:$=>g(M)},F(M),11,A1e))),128))])],64))),128))],64))]),K(p(Wt),{separator:""}),K(p(Wt),{role:"button",disabled:!(e.current&&e.removable),onClick:_[3]||(_[3]=I=>a("pick",null))},{default:he(()=>[K(p(ve),{name:"close",size:"sm"}),$e(" "+F(p(i)("sidebar.removeEmoji")),1)]),_:1},8,["disabled"]),K(p(Wt),{role:"button",onClick:v},{default:he(()=>[K(p(ve),{name:"sparkles",size:"sm"}),$e(" "+F(p(i)("sidebar.randomEmoji")),1)]),_:1})]),_:1},8,["aria-label"]))}}),w1e=gt(C1e,[["__scopeId","data-v-b0dbbae4"]]),x1e={class:"row"},S1e={key:0,class:"lead"},_1e={class:"left"},I1e=["readonly","onKeydown"],M1e={key:0,class:"gen-dots","aria-hidden":"true"},E1e=["aria-label"],T1e={key:1,class:"act"},L1e={key:0,class:"ts"},N1e={key:1,class:"st"},F1e={key:1,class:"unread-dot"},D1e={key:2,class:"ha"},$1e={key:0,class:"sub"},B1e={class:"sub-text"},z1e=["aria-label"],R1e={class:"menu-time"},O1e=Qe({__name:"SessionRow",props:{session:{},active:{type:Boolean},approvalCount:{default:0},questionCount:{default:0},unread:{type:Boolean,default:!1},stateTag:{default:void 0}},emits:["select","rename","generateTitle","renameStateChange","archive","restore","fork","export","pin"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{sidebarTabs:s}=Hh(),o=e,r=n;function l(tt){const It=new Date(tt);if(Number.isNaN(It.getTime()))return tt;const Ut=fn=>String(fn).padStart(2,"0");return`${It.getFullYear()}-${Ut(It.getMonth()+1)}-${Ut(It.getDate())} ${Ut(It.getHours())}:${Ut(It.getMinutes())}`}const a=L(()=>o.session.updatedAt?l(o.session.updatedAt):o.session.time),u=L(()=>o.session.cwdLabel!==void 0),c=L(()=>ie.value?"idle":qy({busy:o.session.busy,unread:o.unread,questionCount:o.questionCount,approvalCount:o.approvalCount,pendingInteraction:o.session.pendingInteraction,lastTurnReason:o.session.lastTurnReason})),d=L(()=>c.value==="awaiting-question"),f=L(()=>c.value==="awaiting-approval"),h=L(()=>c.value==="aborted"),g=L(()=>c.value==="running"),m=L(()=>c.value==="unread"),y=L(()=>c.value!=="idle"),A=G(!1),b=G(null),C=G({});function v(tt){const It=tt.target;b.value?.el?.contains(It)||S()}async function x(){P(),A.value=!0,setTimeout(()=>document.addEventListener("mousedown",v),0),window.addEventListener("resize",S),await kt()}function S(){A.value=!1,document.removeEventListener("mousedown",v),window.removeEventListener("resize",S)}Mn(()=>{document.removeEventListener("mousedown",v),document.removeEventListener("mousedown",R),window.removeEventListener("keydown",q,!0),window.removeEventListener("resize",S),window.removeEventListener("resize",P)});const _=L(()=>YD(o.session.title)),I=L(()=>{const tt=_.value.emoji;return tt?o.session.title.slice(tt.length):o.session.title}),M=G(!1),$=G(null),D=G({});let T=null;function N(tt,It,Ut){const fn=$.value?.el,Nn=4,Qt=8,un=fn?.offsetHeight??0,Dn=fn?.offsetWidth??0;let pn=tt.bottom+Nn,wn=!1;pn+un>window.innerHeight-Qt&&(pn=Math.max(Qt,tt.top-un-Nn),wn=!0);const bn=Ut??(It==="left"?tt.left:tt.right-Dn),Xn=Math.max(Qt,Math.min(bn,window.innerWidth-Dn-Qt)),Ue=Ut===void 0?It:`${Math.round(Math.min(Math.max(Ut-Xn,0),Dn))}px`;D.value={top:`${Math.round(pn)}px`,left:`${Math.round(Xn)}px`,transformOrigin:`${Ue} ${wn?"bottom":"top"}`,"--menu-pop-shift":wn?"2px":"-2px"}}async function O(tt,It,Ut="left",fn){const Nn=It??tt?.getBoundingClientRect();if(Nn){if(M.value){P();return}S(),T=tt??null,M.value=!0,setTimeout(()=>document.addEventListener("mousedown",R),0),window.addEventListener("keydown",q,!0),window.addEventListener("resize",P),await kt(),N(Nn,Ut,fn)}}function P(){M.value=!1,T=null,document.removeEventListener("mousedown",R),window.removeEventListener("keydown",q,!0),window.removeEventListener("resize",P)}function R(tt){const It=tt.target;$.value?.el?.contains(It)||T?.contains(It)||P()}function q(tt){tt.key==="Escape"&&($.value?.isComposingKeyEvent(tt)||(tt.preventDefault(),tt.stopPropagation(),P()))}function j(tt){return tt.clientX||tt.clientY?new DOMRect(tt.clientX,tt.clientY,0,0):void 0}function W(tt){tt.stopPropagation();const It=tt;O(It.currentTarget,j(It),"left",It.clientX||void 0)}function z(tt){const It=b.value?.el,Ut=tt,fn=j(Ut)??It?.getBoundingClientRect();S(),O(It,fn,"left",Ut.clientX||void 0)}function H(tt){if(P(),tt===_.value.emoji)return;const It=Mre(o.session.title,tt);It&&It!==o.session.title&&r("rename",o.session.id,It)}const ee=Kl(),V=L(()=>(ee.experimentalFlags.value.auto_session_title??ee.config.value?.experimental?.auto_session_title)===!0),ie=G(!1),se=G(""),Z=G(null),pe=G(null),re=G(!1);let fe="",Ee=null;const{handleCompositionStart:X,handleCompositionEnd:we,isComposingKeyEvent:Y}=Xr();async function le(){S(),P(),ie.value=!0,se.value=o.session.title,await kt();try{Z.value?.focus(),Z.value?.select()}catch{}}function Ce(){if(!ie.value)return;const tt=se.value.trim();tt&&tt!==Ee&&tt!==o.session.title&&r("rename",o.session.id,tt),ie.value=!1}function ae(){re.value||Ce()}function oe(tt){Y(tt)||re.value||Ce()}function Q(tt){Y(tt)||ne()}function ne(){re.value=!1,ie.value=!1}function ge(tt){const It=pe.value;if(!(It===null||!(tt.target instanceof Node)||It.contains(tt.target))){if(re.value){re.value=!1,ie.value=!1;return}Ce()}}qe(ie,tt=>{tt?document.addEventListener("pointerdown",ge,!0):document.removeEventListener("pointerdown",ge,!0)}),Mn(()=>document.removeEventListener("pointerdown",ge,!0));function Ae(){re.value||(re.value=!0,fe=se.value,Ee=null,se.value="",r("generateTitle",o.session.id,tt=>{re.value=!1,ie.value&&(se.value=tt??fe,Ee=tt,kt(()=>{try{Z.value?.focus(),Z.value?.select()}catch{}}))}))}qe(ie,tt=>r("renameStateChange",tt));async function _e(tt){ie.value||(tt.preventDefault(),tt.stopPropagation(),A.value&&S(),await x(),Ke(tt))}function Ke(tt){const It=b.value?.el,Ut=8,fn=It?.offsetHeight??0,Nn=It?.offsetWidth??0;let Qt=tt.clientY,un=!1;Qt+fn>window.innerHeight-Ut&&(Qt=Math.max(Ut,tt.clientY-fn),un=!0);let Dn=tt.clientX,pn=!1;Dn+Nn>window.innerWidth-Ut&&(Dn=Math.max(Ut,tt.clientX-Nn),pn=!0),C.value={top:`${Math.round(Qt)}px`,left:`${Math.round(Dn)}px`,transformOrigin:`${un?"bottom":"top"} ${pn?"right":"left"}`,"--menu-pop-shift":un?"2px":"-2px"}}const xe=G(!1),Ne=G(!1);async function et(){const tt=await ao(o.session.id);xe.value=tt,Ne.value=!tt,setTimeout(()=>{xe.value=!1,Ne.value=!1,S()},1500)}function ut(){S(),r("fork",o.session.id)}function yt(){S(),r("export",o.session.id)}function Mt(){S(),r("pin",o.session.id)}function Ze(){S(),r("archive",o.session.id)}function Ge(){S(),r("restore",o.session.id)}t({closeMenu:S});function lt(){const tt=o.session.pullRequest?.url;tt&&window.open(tt,"_blank","noopener")}return(tt,It)=>(k(),E("div",{class:Fe(["se",{on:e.active,flat:u.value}]),onClick:It[8]||(It[8]=Ut=>r("select",e.session.id)),onContextmenu:_e},[w("div",x1e,[u.value?te("",!0):(k(),E("span",S1e)),w("div",_1e,[ie.value?(k(),E("div",{key:0,ref_key:"renameWrapRef",ref:pe,class:Fe(["rename-wrap",{generating:re.value}]),onClick:It[4]||(It[4]=Ct(()=>{},["stop"]))},[$n(w("input",{ref_key:"renameInputRef",ref:Z,"onUpdate:modelValue":It[0]||(It[0]=Ut=>se.value=Ut),class:"rename-input",readonly:re.value,onKeydown:[_s(Ct(oe,["stop"]),["enter"]),_s(Ct(Q,["stop"]),["esc"])],onCompositionstart:It[1]||(It[1]=(...Ut)=>p(X)&&p(X)(...Ut)),onCompositionend:It[2]||(It[2]=(...Ut)=>p(we)&&p(we)(...Ut)),onBlur:ae},null,40,I1e),[[uo,se.value]]),re.value?(k(),E("span",M1e,[...It[9]||(It[9]=[w("i",null,null,-1),w("i",null,null,-1),w("i",null,null,-1)])])):te("",!0),V.value?(k(),de(p(kn),{key:1,text:p(i)("sidebar.genTitle")},{default:he(()=>[K(p(tn),{class:"gen-title-btn",size:"sm",label:p(i)("sidebar.genTitle"),disabled:re.value,onMousedown:It[3]||(It[3]=Ct(()=>{},["prevent","stop"])),onClick:Ct(Ae,["stop"])},{default:he(()=>[K(p(ve),{name:"gen-title"})]),_:1},8,["label","disabled"])]),_:1},8,["text"])):te("",!0)],2)):(k(),E("span",{key:1,class:"t",onDblclick:Ct(le,["stop"])},[_.value.emoji?(k(),E("button",{key:0,type:"button",class:"emoji","aria-label":p(i)("sidebar.setEmoji"),onClick:Ct(W,["stop"]),onDblclick:It[5]||(It[5]=Ct(()=>{},["stop"]))},F(_.value.emoji),41,E1e)):te("",!0),$e(F(I.value),1)],32))]),ie.value?te("",!0):(k(),E("span",T1e,[K(p(kn),{text:p(i)("workspace.awaitingAnswerTitle")},{default:he(()=>[d.value?(k(),de(p(va),{key:0,variant:"info",size:"sm"},{default:he(()=>[$e(F(p(i)("workspace.awaitingAnswer")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),K(p(kn),{text:p(i)("workspace.awaitingPermissionTitle")},{default:he(()=>[f.value?(k(),de(p(va),{key:0,variant:"warning",size:"sm"},{default:he(()=>[$e(F(p(i)("workspace.awaitingPermission")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),K(p(kn),{text:p(i)("workspace.abortedTitle")},{default:he(()=>[h.value?(k(),de(p(va),{key:0,variant:"danger",size:"sm"},{default:he(()=>[$e(F(p(i)("workspace.aborted")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),y.value?g.value||m.value?(k(),E("span",N1e,[g.value?(k(),de(p(Mi),{key:0,size:"sm"})):(k(),E("span",F1e))])):te("",!0):(k(),E("span",L1e,F(e.session.time),1)),ie.value?te("",!0):(k(),E("span",D1e,[e.stateTag==="done"?(k(),de(p(kn),{key:0,text:p(i)("sidebar.reopen")},{default:he(()=>[K(p(tn),{class:"reopen-btn",size:"sm",label:p(i)("sidebar.reopen"),onClick:Ct(Ge,["stop"])},{default:he(()=>[K(p(ve),{name:"undo"})]),_:1},8,["label"])]),_:1},8,["text"])):(k(),E(Te,{key:1},[K(p(kn),{text:e.session.pinned?p(i)("sidebar.unpin"):p(i)("sidebar.pin")},{default:he(()=>[K(p(tn),{class:"pin-btn",size:"sm",label:e.session.pinned?p(i)("sidebar.unpin"):p(i)("sidebar.pin"),onClick:Ct(Mt,["stop"])},{default:he(()=>[K(p(ve),{name:e.session.pinned?"unpin":"pin"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"]),K(p(kn),{text:p(s)?p(i)("sidebar.complete"):p(i)("sidebar.archive")},{default:he(()=>[K(p(tn),{class:Fe(p(s)?"complete-btn":"archive-btn"),size:"sm",label:p(s)?p(i)("sidebar.complete"):p(i)("sidebar.archive"),onClick:Ct(Ze,["stop"])},{default:he(()=>[K(p(ve),{name:p(s)?"state-done":"archive"},null,8,["name"])]),_:1},8,["class","label"])]),_:1},8,["text"])],64))]))]))]),e.session.cwdLabel!==void 0?(k(),E("div",$1e,[K(p(ve),{class:"sub-icon",name:"folder-closed",size:"sm"}),w("span",B1e,F(e.session.cwdLabel),1),e.session.pullRequest?(k(),E("button",{key:0,type:"button",class:Fe(["pr",`pr--${e.session.pullRequest.state}`]),"aria-label":`PR #${e.session.pullRequest.number}`,onClick:Ct(lt,["stop"])},[K(p(ve),{name:"git-pull-request",size:"sm"}),w("span",null,"#"+F(e.session.pullRequest.number),1)],10,z1e)):te("",!0)])):te("",!0),(k(),de(Gr,{to:"body"},[K(ls,{name:"menu-pop"},{default:he(()=>[A.value?(k(),de(p(sr),{key:0,ref_key:"menuRef",ref:b,class:"menu",style:qt(C.value),onClick:It[6]||(It[6]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{danger:Ne.value,onClick:et},{default:he(()=>[K(p(ve),{name:"copy",size:"sm"}),$e(" "+F(Ne.value?p(i)("sidebar.copyFailed"):xe.value?p(i)("sidebar.copied"):p(i)("sidebar.copySessionId")),1)]),_:1},8,["danger"]),K(p(Wt),{separator:""}),K(p(Wt),{onClick:le},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(i)("sidebar.rename")),1)]),_:1}),K(p(Wt),{onClick:z},{default:he(()=>[K(p(ve),{name:"emoji",size:"sm"}),$e(" "+F(p(i)("sidebar.setEmoji")),1)]),_:1}),K(p(Wt),{onClick:ut},{default:he(()=>[K(p(ve),{name:"git-fork",size:"sm"}),$e(" "+F(p(i)("sidebar.fork")),1)]),_:1}),K(p(Wt),{onClick:yt},{default:he(()=>[K(p(ve),{name:"download",size:"sm"}),$e(" "+F(p(i)("sidebar.export")),1)]),_:1}),e.stateTag!=="done"?(k(),de(p(Wt),{key:0,onClick:Mt},{default:he(()=>[K(p(ve),{name:e.session.pinned?"unpin":"pin",size:"sm"},null,8,["name"]),$e(" "+F(e.session.pinned?p(i)("sidebar.unpin"):p(i)("sidebar.pin")),1)]),_:1})):te("",!0),e.stateTag==="done"?(k(),de(p(Wt),{key:1,onClick:Ge},{default:he(()=>[K(p(ve),{name:"undo",size:"sm"}),$e(" "+F(p(i)("sidebar.reopen")),1)]),_:1})):(k(),de(p(Wt),{key:2,onClick:Ze},{default:he(()=>[K(p(ve),{name:p(s)?"state-done":"archive",size:"sm"},null,8,["name"]),$e(" "+F(p(s)?p(i)("sidebar.markDone"):p(i)("sidebar.archive")),1)]),_:1})),K(p(Wt),{separator:""}),w("div",R1e,F(a.value),1)]),_:1},8,["style"])):te("",!0)]),_:1})])),(k(),de(Gr,{to:"body"},[K(ls,{name:"menu-pop"},{default:he(()=>[M.value?(k(),de(w1e,{key:0,ref_key:"pickerRef",ref:$,class:"picker",style:qt(D.value),current:_.value.emoji,removable:_.value.rest.length>0,onClick:It[7]||(It[7]=Ct(()=>{},["stop"])),onPick:H},null,8,["style","current","removable"])):te("",!0)]),_:1})]))],34))}}),vp=gt(O1e,[["__scopeId","data-v-d577d143"]]),P1e=["draggable"],j1e={class:"gh-top"},H1e={class:"gh-name"},W1e=["inert"],q1e={key:0,class:"show-more-row"},U1e=["disabled"],K1e={class:"show-more-label"},V1e={key:1,class:"show-more-sep","aria-hidden":"true"},Z1e={class:"show-more-label"},G1e={key:1,class:"group-empty"},Q1e=Qe({__name:"WorkspaceGroup",props:{group:{},activeWorkspaceId:{},activeId:{},renamingId:{},renameValue:{},renameInputRef:{},pendingBySession:{},unreadBySession:{},wsMenuOpenId:{},dragging:{type:Boolean},sortable:{type:Boolean},isCollapsed:{type:Function},visibleLimit:{type:Function},flashSessionId:{},pinnedDragSession:{},stateTag:{}},emits:["groupClick","groupContextmenu","toggleWsMenu","createInWorkspace","selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPinnedSession","expand","collapse","confirmRename","cancelRename","updateRenameValue","wsDragstart","wsDragend"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=L({get:()=>i.renameValue,set:$=>s("updateRenameValue",$)}),r=G(!1),l=L(()=>i.pinnedDragSession!=null),a=L(()=>i.pinnedDragSession?.workspaceId===i.group.workspace.id);function u($){if(i.pinnedDragSession!=null){if(!a.value){$.dataTransfer&&($.dataTransfer.dropEffect="none");return}$.preventDefault(),$.dataTransfer&&($.dataTransfer.dropEffect="move"),r.value=!0}}function c($){i.pinnedDragSession==null||!a.value||($.preventDefault(),r.value=!1,s("dropPinnedSession",i.pinnedDragSession.id))}function d($){$.currentTarget.contains($.relatedTarget)||(r.value=!1)}const f=L(()=>i.visibleLimit(i.group.workspace.id)??i.group.initialCount),h=L(()=>{const $=i.group.sessions.slice(0,f.value);if(i.activeId&&!$.some(D=>D.id===i.activeId)){const D=i.group.sessions.find(T=>T.id===i.activeId);if(D)return[...$,D]}return $}),g=L(()=>i.group.sessions.length>f.value||i.group.hasMore||i.group.loadingMore),m=L(()=>f.value>i.group.initialCount);function y($){i.renameInputRef.value=$ instanceof HTMLInputElement?$:null}const{handleCompositionStart:A,handleCompositionEnd:b,isComposingKeyEvent:C}=Xr();function v($){C($)||s("confirmRename")}function x($){C($)||s("cancelRename")}const S=G(null);function _($){i.renamingId!==i.group.workspace.id&&s("groupContextmenu",i.group.workspace,$)}function I($){i.sortable!==!1&&$.dataTransfer&&($.dataTransfer.effectAllowed="move",$.dataTransfer.setData("text/plain",i.group.workspace.id),s("wsDragstart",i.group.workspace.id))}function M($,D){D.dataTransfer&&(D.dataTransfer.effectAllowed="move",D.dataTransfer.setData(ev,$),D.dataTransfer.setData("text/plain",$))}return($,D)=>(k(),E("div",{class:Fe(["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},[w("div",{class:Fe(["gh",{on:e.group.workspace.id===e.activeWorkspaceId&&e.activeId==="",collapsed:e.isCollapsed(e.group.workspace.id)}]),draggable:e.sortable!==!1&&e.renamingId!==e.group.workspace.id,onClick:D[7]||(D[7]=Ct(T=>s("groupClick",e.group.workspace.id,T),["stop"])),onContextmenu:_,onDragstart:I,onDragend:D[8]||(D[8]=T=>s("wsDragend"))},[w("div",j1e,[e.isCollapsed(e.group.workspace.id)?(k(),de(p(ve),{key:0,class:"gh-folder",name:"folder-closed"})):(k(),de(p(ve),{key:1,class:"gh-folder",name:"folder"})),e.renamingId!==e.group.workspace.id?(k(),de(p(kn),{key:2,text:e.group.workspace.root},{default:he(()=>[w("span",H1e,F(e.group.workspace.name),1)]),_:1},8,["text"])):$n((k(),E("input",{key:3,ref:y,"onUpdate:modelValue":D[0]||(D[0]=T=>o.value=T),class:"gh-rename",type:"text",onKeydown:[_s(v,["enter"]),_s(x,["esc"])],onCompositionstart:D[1]||(D[1]=(...T)=>p(A)&&p(A)(...T)),onCompositionend:D[2]||(D[2]=(...T)=>p(b)&&p(b)(...T)),onBlur:D[3]||(D[3]=T=>s("cancelRename")),onClick:D[4]||(D[4]=Ct(()=>{},["stop"]))},null,544)),[[uo,o.value]]),e.renamingId!==e.group.workspace.id?(k(),E("div",{key:4,class:Fe(["gh-actions",{open:e.wsMenuOpenId===e.group.workspace.id}])},[K(p(tn),{class:Fe(["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]=Ct(T=>s("toggleWsMenu",e.group.workspace,T),["stop"]))},{default:he(()=>[K(p(ve),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded"]),K(p(tn),{class:"gh-add",size:"sm",label:p(n)("workspace.newInGroup"),tooltip:p(n)("workspace.newInGroup"),onClick:D[6]||(D[6]=Ct(T=>s("createInWorkspace",e.group.workspace.id),["stop"]))},{default:he(()=>[K(p(ve),{name:"chat-new"})]),_:1},8,["label","tooltip"])],2)):te("",!0)])],42,P1e),w("div",{class:Fe(["group-sessions",{collapsed:e.isCollapsed(e.group.workspace.id)}]),inert:e.isCollapsed(e.group.workspace.id)},[(k(!0),E(Te,null,ht(h.value,T=>(k(),de(vp,{key:T.id,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,"state-tag":i.stateTag,draggable:S.value!==T.id,"data-session-id":T.id,class:Fe({"se-locate-flash":e.flashSessionId===T.id}),onDragstart:N=>M(T.id,N),onRenameStateChange:N=>S.value=N?T.id:null,onSelect:D[9]||(D[9]=N=>s("selectSession",N)),onRename:D[10]||(D[10]=(N,O)=>s("renameSession",N,O)),onGenerateTitle:D[11]||(D[11]=(N,O)=>s("generateSessionTitle",N,O)),onArchive:D[12]||(D[12]=N=>s("archiveSession",N)),onFork:D[13]||(D[13]=N=>s("forkSession",N)),onExport:D[14]||(D[14]=N=>s("exportSession",N)),onPin:D[15]||(D[15]=N=>s("pinSession",N))},null,8,["session","active","approval-count","question-count","unread","state-tag","draggable","data-session-id","class","onDragstart","onRenameStateChange"]))),128)),g.value||m.value?(k(),E("div",q1e,[g.value?(k(),E("button",{key:0,class:"show-more",disabled:e.group.loadingMore,onClick:D[16]||(D[16]=Ct(T=>s("expand",e.group.workspace.id),["stop"]))},[K(p(ve),{name:"chevron-down",size:"sm"}),w("span",K1e,F(e.group.loadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.showMore")),1)],8,U1e)):te("",!0),g.value&&m.value?(k(),E("span",V1e,"·")):te("",!0),m.value?(k(),E("button",{key:2,class:"show-more",onClick:D[17]||(D[17]=Ct(T=>s("collapse",e.group.workspace.id),["stop"]))},[K(p(ve),{name:"chevron-up",size:"sm"}),w("span",Z1e,F(p(n)("sidebar.showLess")),1)])):te("",!0)])):te("",!0),e.group.sessions.length===0?(k(),E("div",G1e,F(e.group.pinnedCount>0?p(n)("sidebar.allPinned",{count:e.group.pinnedCount}):p(n)("sidebar.noSessions")),1)):te("",!0)],10,W1e)],34))}}),Y1e=gt(Q1e,[["__scopeId","data-v-6756fbf6"]]),J1e={class:"pinned-label"},X1e={class:"pinned-title"},epe={key:0,class:"pinned-rows"},tpe=["draggable","onDragstart"],npe=Qe({__name:"PinnedSessionList",props:{sessions:{},activeId:{},pendingBySession:{},unreadBySession:{},stateTag:{},flashSessionId:{}},emits:["selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPin","sessionDragStart","sessionDragEnd"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n,r=G(Mae());function l(){r.value=!r.value,Db(r.value)}function a(){r.value&&(r.value=!1,Db(!1))}t({expand:a});const u=G(null),c=G(null);function d(b,C){if(!C.dataTransfer)return;C.dataTransfer.effectAllowed="move",C.dataTransfer.setData("text/plain",b),u.value=b;const v=s.sessions.find(x=>x.id===b)?.workspaceId;v!==void 0&&o("sessionDragStart",b,v)}function f(){u.value=null,o("sessionDragEnd")}qe(()=>s.sessions,b=>{u.value!==null&&!b.some(C=>C.id===u.value)&&(u.value=null)});const h=G(!1);function g(b){return b.dataTransfer?.types.includes(ev)??!1}function m(b){g(b)&&(b.preventDefault(),b.dataTransfer&&(b.dataTransfer.dropEffect="move"),h.value=!0)}function y(b){h.value=!1;const C=b.dataTransfer?.getData(ev);C&&o("dropPin",C)}function A(b){b.currentTarget.contains(b.relatedTarget)||(h.value=!1)}return(b,C)=>(k(),E("div",{class:Fe(["pinned",{"drop-active":h.value}]),onDragover:m,onDrop:y,onDragleave:A},[w("div",J1e,[w("span",X1e,F(p(i)("sidebar.pinned")),1),K(p(tn),{class:Fe(["pinned-toggle",{"pinned-toggle--on":r.value}]),size:"sm",label:r.value?p(i)("sidebar.expandPinned"):p(i)("sidebar.collapsePinned"),tooltip:r.value?p(i)("sidebar.expandPinned"):p(i)("sidebar.collapsePinned"),onClick:Ct(l,["stop"])},{default:he(()=>[r.value?(k(),de(p(ve),{key:0,name:"chevron-right"})):(k(),de(p(ve),{key:1,name:"chevron-down"}))]),_:1},8,["class","label","tooltip"])]),r.value?te("",!0):(k(),E("div",epe,[(k(!0),E(Te,null,ht(e.sessions,v=>(k(),E("div",{key:v.id,class:Fe(["pin-row",{dragging:u.value===v.id}]),draggable:c.value!==v.id,onDragstart:x=>d(v.id,x),onDragend:f},[K(vp,{session:v,active:v.id===e.activeId,"approval-count":e.pendingBySession[v.id]?.approvals??0,"question-count":e.pendingBySession[v.id]?.questions??0,unread:e.unreadBySession[v.id]??!1,"state-tag":s.stateTag,"data-session-id":v.id,class:Fe({"se-locate-flash":e.flashSessionId===v.id}),onRenameStateChange:x=>c.value=x?v.id:null,onSelect:C[0]||(C[0]=x=>o("selectSession",x)),onRename:C[1]||(C[1]=(x,S)=>o("renameSession",x,S)),onGenerateTitle:C[2]||(C[2]=(x,S)=>o("generateSessionTitle",x,S)),onArchive:C[3]||(C[3]=x=>o("archiveSession",x)),onFork:C[4]||(C[4]=x=>o("forkSession",x)),onExport:C[5]||(C[5]=x=>o("exportSession",x)),onPin:C[6]||(C[6]=x=>o("pinSession",x))},null,8,["session","active","approval-count","question-count","unread","state-tag","data-session-id","class","onRenameStateChange"])],42,tpe))),128))]))],34))}}),ipe=gt(npe,[["__scopeId","data-v-d4e69bf4"]]),spe={class:"ch"},ope={class:"ch-brand"},rpe={class:"ch-tail"},lpe={class:"search-input"},ape={key:0,class:"status-tabs"},upe={class:"side-section-label"},cpe={class:"side-section-title"},dpe={class:"side-section-actions"},fpe={key:0,class:"empty"},hpe={key:1,class:"show-more-row"},ppe=["disabled"],gpe={class:"show-more-label"},mpe={key:0,class:"empty"},vpe={key:1,class:"empty"},ype=["data-ws-id","onDragover","onDrop"],kpe=["onClick","onContextmenu"],bpe={class:"done-gh-name"},Ape={class:"done-gh-count"},Cpe={class:"done-gh-act"},wpe={key:0,class:"done-sessions"},xpe={key:2,class:"empty"},Spe={key:3,class:"show-more-row"},_pe=["disabled"],Ipe={class:"show-more-label"},Mpe=["onClick","onContextmenu"],Epe={class:"ws-dir-row"},Tpe=["onKeydown"],Lpe={key:1,class:"ws-dir-name"},Npe={class:"ws-dir-act"},Fpe={class:"ws-dir-sub"},Dpe={key:0,class:"empty"},$pe={class:"folder-drop-card"},Bpe={class:"view-menu-label"},zpe={class:"view-menu-check"},Rpe={class:"view-menu-check"},Ope={class:"view-menu-label"},Ppe={class:"view-menu-check"},jpe={class:"view-menu-check"},u_="var(--color-accent)",Hpe=!1,Wpe=1e3,qpe=Qe({__name:"Sidebar",props:{activeWorkspace:{default:null},activeWorkspaceId:{default:null},sessions:{},groups:{},workspaceSortMode:{default:"manual"},pinnedSessions:{default:()=>[]},flatSessions:{default:()=>[]},flatHasMore:{type:Boolean,default:!1},flatLoadingMore:{type:Boolean,default:!1},doneSessions:{default:()=>[]},doneHasMore:{type:Boolean,default:!1},doneLoadingMore:{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","generateTitle","archive","restore","fork","export","pin","dropPin","unpin","renameWorkspace","deleteWorkspace","reorderWorkspaces","setWorkspaceSortMode","loadMoreSessions","loadAllSessions","ensureFlatSessions","loadMoreFlatSessions","ensureDoneSessions","loadMoreDoneSessions","openSessionAdmin","openSettings","login","collapse"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!1),r=c()?["⌘","K"]:["Ctrl","K"],l=c()?["⌃","⇧","O"]:["Ctrl","Shift","O"];function a(){s("loadAllSessions"),o.value=!0}function u(Be){if(Fre(Be)){Be.preventDefault(),a();return}!Be.metaKey&&Be.ctrlKey&&Be.shiftKey&&Be.key.toLowerCase()==="o"&&(Be.preventDefault(),s("create"))}mn(()=>window.addEventListener("keydown",u)),Gn(()=>window.removeEventListener("keydown",u));function c(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const Be=navigator.userAgentData;return Be?.platform==="macOS"||Be?.platform==="iOS"}const d=G(null),f=G(!1),h=G(!1),g=G(!1);let m=null;function y(Be=d.value){Be&&(f.value=Be.scrollTop>0,h.value=Be.scrollTop+Be.clientHeight{g.value=!1,m=null},900)}let b=null;mn(()=>{kt(()=>{y(),typeof ResizeObserver=="function"&&d.value&&(b=new ResizeObserver(()=>y()),b.observe(d.value))})}),N0(()=>y()),Gn(()=>{b?.disconnect(),m&&clearTimeout(m),pn&&clearTimeout(pn),It&&clearTimeout(It)});const C=G(new Set(Iae()));function v(Be){return C.value.has(Be)}function x(Be){const Pe=new Set(C.value);Pe.has(Be)?Pe.delete(Be):Pe.add(Be),C.value=Pe,Y4(Pe)}function S(){const Be=new Set(i.groups.map(Pe=>Pe.workspace.id));C.value=Be,Y4(Be)}function _(){const Be=new Set;C.value=Be,Y4(Be)}const I=L(()=>i.groups.length>0&&i.groups.every(Be=>C.value.has(Be.workspace.id))),M=G(new Map);function $(Be){return M.value.get(Be)}function D(Be){const Pe=i.groups.find(An=>An.workspace.id===Be);if(!Pe)return;const dt=(M.value.get(Be)??Pe.initialCount)+h6,St=new Map(M.value);St.set(Be,dt),M.value=St,Pe.sessions.lengthAn.workspace.id),Pe,Be,dt);s("reorderWorkspaces",St)}const z=G(null);function H(Be,Pe){z.value={id:Be,workspaceId:Pe}}function ee(){z.value=null}function V(Be){z.value=null,s("unpin",Be)}const ie=G(Eae());function se(Be){ie.value!==Be&&(ie.value=Be,Tae(Be))}const Z=G("open"),{sidebarTabs:pe}=Hh();qe(pe,Be=>{!Be&&Z.value!=="open"&&(Z.value="open")});const re=L(()=>eS([...i.pinnedSessions,...i.flatSessions].map(Be=>({busy:Be.busy,unread:i.unreadBySession[Be.id]??!1,questionCount:i.pendingBySession[Be.id]?.questions??0,approvalCount:i.pendingBySession[Be.id]?.approvals??0,pendingInteraction:Be.pendingInteraction,lastTurnReason:Be.lastTurnReason})))),fe=L(()=>eS(i.doneSessions.map(Be=>({busy:Be.busy,unread:i.unreadBySession[Be.id]??!1,questionCount:i.pendingBySession[Be.id]?.questions??0,approvalCount:i.pendingBySession[Be.id]?.approvals??0,pendingInteraction:Be.pendingInteraction,lastTurnReason:Be.lastTurnReason})))),Ee=L(()=>[{value:"open",label:n("sidebar.tabOpen"),swatch:re.value===null?void 0:u_},{value:"done",label:n("sidebar.tabDone"),swatch:fe.value===null?void 0:u_},{value:"workspaces",label:n("sidebar.tabWorkspaces")}]);function X(Be){pe.value&&(Z.value=Be,Be==="done"&&s("ensureDoneSessions"))}const we=L(()=>i.groups.filter(Be=>Be.sessions.length>0||Be.workspace.id===i.activeWorkspaceId)),Y=L(()=>i.groups.map(Be=>({workspace:Be.workspace,sessions:i.doneSessions.filter(Pe=>Pe.workspaceId===Be.workspace.id).map(Pe=>({...Pe,cwdLabel:void 0}))})).filter(Be=>Be.sessions.length>0));qe(()=>i.initialized,Be=>{Be&&(s("ensureFlatSessions"),s("ensureDoneSessions"))},{immediate:!0});const le=G(!1),Ce=G({}),ae=G(null);function oe(Be){const Pe=Be.target;Pe.closest(".view-menu")||Pe.closest(".side-section-view")||ne()}async function Q(Be){if(le.value){ne();return}const Pe=Be.currentTarget;le.value=!0,document.addEventListener("mousedown",oe),window.addEventListener("resize",ne),await kt();const dt=ae.value?.el,St=Pe.getBoundingClientRect(),An=4,pi=8,hs=dt?.offsetHeight??0,is=dt?.offsetWidth??0;let Ls=St.bottom+An,Ui=!1;Ls+hs>window.innerHeight-pi&&(Ls=Math.max(pi,St.top-hs-An),Ui=!0);let On=St.right-is;OnZ.value==="open"&&ie.value==="flat"),et=G(!1);function ut(Be){!Ne.value||z.value===null||(Be.preventDefault(),Be.dataTransfer&&(Be.dataTransfer.dropEffect="move"),et.value=!0)}function yt(Be){!Ne.value||z.value===null||(Be.preventDefault(),et.value=!1,V(z.value.id))}function Mt(Be){Be.currentTarget.contains(Be.relatedTarget)||(et.value=!1)}function Ze(Be,Pe){Pe.target.closest(".gh-more, .gh-add")||x(Be)}function Ge(Be){s("select",Be)}function lt(Be){s("select",Be),un(Be)}const tt=G(null);let It=null;const Ut=L(()=>i.groups.map(Be=>Be.workspace));function fn(Be,Pe){const dt=getComputedStyle(Be).getPropertyValue(Pe).trim(),St=/^([\d.]+)(ms|s)$/.exec(dt);if(!St)return 0;const An=Number.parseFloat(St[1]);return St[2]==="s"?An*1e3:An}function Nn(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}function Qt(Be,Pe){tt.value=Be,It&&clearTimeout(It),It=setTimeout(()=>{tt.value=null,It=null},fn(Pe,"--duration-flash"))}function un(Be){const Pe=i.groups.find(dt=>dt.sessions.some(St=>St.id===Be));if(!Pe){bn.value?.expand(),kt(()=>{const St=[...bn.value?.$el?.querySelectorAll("[data-session-id]")??[]].find(An=>An.dataset.sessionId===Be);St?.scrollIntoView({block:"nearest",behavior:Nn()}),St&&Qt(Be,St)});return}Z.value!=="open"&&X("open"),ie.value!=="grouped"&&se("grouped"),v(Pe.workspace.id)&&x(Pe.workspace.id),kt(()=>{const dt=[...d.value?.querySelectorAll("[data-session-id]")??[]].find(St=>St.dataset.sessionId===Be);dt?.scrollIntoView({block:"start",behavior:Nn()}),dt&&Qt(Be,dt)})}const Dn=G(null);let pn=null;function wn(Be){Z.value!=="open"&&X("open"),ie.value!=="grouped"&&se("grouped"),v(Be)&&x(Be),s("selectWorkspace",Be),kt(()=>{const Pe=[...d.value?.querySelectorAll("[data-ws-id]")??[]].find(dt=>dt.dataset.wsId===Be);Pe?.scrollIntoView({block:"start",behavior:Nn()}),Pe&&(Dn.value=Be,pn&&clearTimeout(pn),pn=setTimeout(()=>{Dn.value=null,pn=null},fn(Pe,"--duration-flash")))})}const bn=G(null);function Xn(Be){bn.value?bn.value.expand():Db(!1),s("pin",Be)}function Ue(Be){bn.value?.expand(),s("dropPin",Be)}const st=G(0),ct=G(!1);function ot(){st.value=0,ct.value=!1}function sn(Be){!sm()||!K4(Be)||(Be.preventDefault(),Be.stopPropagation(),st.value+=1,ct.value=!0)}function Nt(Be){!sm()||!K4(Be)||(Be.preventDefault(),Be.stopPropagation(),Be.dataTransfer&&(Be.dataTransfer.dropEffect="copy"))}function Tn(Be){!sm()||!K4(Be)||(st.value=Math.max(0,st.value-1),st.value===0&&(ct.value=!1))}function fs(Be){if(ot(),!sm())return;const Pe=$oe(Be);Pe.length!==0&&(Be.preventDefault(),Be.stopPropagation(),s("addWorkspacePaths",Pe))}const vi=G(null),Dt=G(""),Is=G(""),Ei=G(null);function Pn(){return Ei}function bs(Be,Pe){vi.value=Be,Is.value=Pe,Dt.value=Pe,kt().then(()=>Ei.value?.focus())}function Lo(){const Be=vi.value,Pe=Dt.value.trim();Be&&Pe&&Pe!==Is.value&&s("renameWorkspace",Be,Pe),vi.value=null}function Oi(){vi.value=null}function co(Be){Dt.value=Be}const{handleCompositionStart:Wi,handleCompositionEnd:As,isComposingKeyEvent:fo}=Xr();function Pi(Be){fo(Be)||Lo()}const es=G(!1),Ai=G(null),No=G({}),Ci=G(null);function Ti(Be){Ci.value?.el&&!Ci.value.el.contains(Be.target)&&vn()}function Yt(Be,Pe){Pe.preventDefault(),Pe.stopPropagation(),Ai.value=Be,No.value={top:`${Pe.clientY}px`,left:`${Pe.clientX}px`,transformOrigin:"top left","--menu-pop-shift":"-2px"},es.value=!0,document.addEventListener("mousedown",Ti,!0)}function vn(){es.value=!1,document.removeEventListener("mousedown",Ti,!0),Ai.value=null}function ts(){Ai.value&&ao(Ai.value.root),vn()}function fi(){Ai.value&&bs(Ai.value.id,Ai.value.name),vn()}function Fr(){const Be=Ai.value;Be&&(vn(),s("deleteWorkspace",Be.id))}const Ni=G(null),hi=G(null),ho=G({}),Xs=G(null);function ns(Be){const Pe=Be.target;Pe.closest(".gh-more")||Pe.closest(".ws-menu")||an()}async function qi(Be,Pe){if(Ni.value===Be.id){an();return}const dt=Pe.currentTarget;hi.value=Be,Ni.value=Be.id,document.addEventListener("mousedown",ns),window.addEventListener("resize",an),await kt();const St=Xs.value?.el,An=dt.getBoundingClientRect(),pi=4,hs=8,is=St?.offsetHeight??0,Ls=St?.offsetWidth??0;let Ui=An.bottom+pi,On=!1;Ui+is>window.innerHeight-hs&&(Ui=Math.max(hs,An.top-is-pi),On=!0);let Cs=An.right-Ls;Cs{document.removeEventListener("mousedown",Ti,!0),document.removeEventListener("mousedown",ns),document.removeEventListener("mousedown",oe),window.removeEventListener("resize",an),window.removeEventListener("resize",ne)});const Ms=G(null);let Es;function to(){const Be=Ms.value;Be&&(Be.classList.remove("blink-now"),Be.getBoundingClientRect(),Be.classList.add("blink-now"),clearTimeout(Es),Es=setTimeout(()=>Be.classList.remove("blink-now"),300))}const Li=Dl(()=>vs(()=>import("./DesignSystemView-B4B2cx0C.js"),__vite__mapDeps([0,1]))),wi=G(!1);let Vo,Ts=!1;function po(Be){Ts=!1,clearTimeout(Vo),Be.currentTarget.setPointerCapture?.(Be.pointerId),Vo=setTimeout(()=>{Ts=!0,wi.value=!0},Wpe)}function Ks(Be){clearTimeout(Vo);const Pe=Be.currentTarget;Pe.hasPointerCapture?.(Be.pointerId)&&Pe.releasePointerCapture(Be.pointerId)}function Zo(){if(Ts){Ts=!1;return}to()}return Gn(()=>{clearTimeout(Vo)}),(Be,Pe)=>(k(),E("aside",{class:Fe(["side",{"macos-desktop":p(Gu),collapsed:e.collapsed,"no-anim":e.dragging}]),style:qt({width:e.collapsed?"0px":e.colWidth+"px"})},[w("div",{class:"col",style:qt({width:e.colWidth+"px"}),onDragenter:sn,onDragover:Nt,onDragleave:Tn,onDrop:fs},[w("div",spe,[w("div",ope,[p(Gu)?te("",!0):(k(),E(Te,{key:0},[(k(),E("svg",{ref_key:"logoRef",ref:Ms,class:"ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:Zo,onPointerdown:po,onPointerup:Ks,onPointercancel:Ks},[...Pe[53]||(Pe[53]=[mc('',2)])],544)),Pe[54]||(Pe[54]=w("span",{class:"ch-name"},"Kimi Code",-1))],64))]),w("div",rpe,[p(Gu)?te("",!0):(k(),de(p(tn),{key:0,class:"ch-collapse",size:"sm",label:p(n)("sidebar.collapseSidebar"),tooltip:p(n)("sidebar.collapseSidebar"),onClick:Pe[0]||(Pe[0]=Ct(dt=>s("collapse"),["stop"]))},{default:he(()=>[K(p(ve),{name:"panel-collapse"})]),_:1},8,["label","tooltip"]))])]),w("div",{class:Fe(["sidebar-actions",{"sidebar-actions--has-workspace-action":Hpe}])},[w("button",{class:"btn-new-chat",type:"button",onClick:Pe[1]||(Pe[1]=Ct(dt=>s("create"),["stop"]))},[K(p(ve),{name:"chat-new"}),w("span",null,F(p(n)("sidebar.newChat")),1),K(p(Ja),{keys:p(l)},null,8,["keys"])]),te("",!0),w("button",{class:"search",type:"button",onClick:a},[K(p(ve),{class:"search-icon",name:"search"}),w("span",lpe,F(p(n)("sidebar.search")),1),K(p(Ja),{keys:p(r)},null,8,["keys"])])],2),p(pe)?(k(),E("div",ape,[K(p(Mo),{class:"status-seg",size:"sm","model-value":Z.value,options:Ee.value,"onUpdate:modelValue":X},null,8,["model-value","options"])])):te("",!0),w("div",{class:Fe(["sessions-head",{"sessions-head--scrolled":f.value}])},[e.pinnedSessions.length>0&&Z.value==="open"?(k(),de(ipe,{key:0,ref_key:"pinnedListRef",ref:bn,sessions:e.pinnedSessions,"active-id":e.activeId,"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"state-tag":"open","flash-session-id":tt.value,onSelectSession:Ge,onRenameSession:Pe[3]||(Pe[3]=(dt,St)=>s("rename",dt,St)),onGenerateSessionTitle:Pe[4]||(Pe[4]=(dt,St)=>s("generateTitle",dt,St)),onArchiveSession:Pe[5]||(Pe[5]=dt=>s("archive",dt)),onForkSession:Pe[6]||(Pe[6]=dt=>s("fork",dt)),onExportSession:Pe[7]||(Pe[7]=dt=>s("export",dt)),onPinSession:Xn,onDropPin:Ue,onSessionDragStart:H,onSessionDragEnd:ee},null,8,["sessions","active-id","pending-by-session","unread-by-session","flash-session-id"])):te("",!0),w("div",upe,[w("span",cpe,F(Z.value==="workspaces"?p(n)("sidebar.tabWorkspaces"):Z.value==="done"?p(n)("sidebar.tabDone"):p(n)("sidebar.sessionsHeader")),1),w("div",dpe,[Z.value==="workspaces"?(k(),de(p(kn),{key:0,text:p(n)("sidebar.newWorkspace")},{default:he(()=>[K(p(tn),{class:"side-section-toggle",size:"sm",label:p(n)("sidebar.newWorkspace"),onClick:Pe[8]||(Pe[8]=Ct(dt=>s("addWorkspace"),["stop"]))},{default:he(()=>[K(p(ve),{name:"folder-plus"})]),_:1},8,["label"])]),_:1},8,["text"])):te("",!0),Z.value!=="workspaces"&&ie.value==="grouped"?(k(),de(p(tn),{key:1,class:"side-section-toggle",size:"sm",label:I.value?p(n)("sidebar.expandAll"):p(n)("sidebar.collapseAll"),tooltip:I.value?p(n)("sidebar.expandAll"):p(n)("sidebar.collapseAll"),onClick:Pe[9]||(Pe[9]=Ct(dt=>I.value?_():S(),["stop"]))},{default:he(()=>[I.value?(k(),de(p(ve),{key:0,name:"expand"})):(k(),de(p(ve),{key:1,name:"collapse"}))]),_:1},8,["label","tooltip"])):te("",!0),Z.value!=="workspaces"?(k(),de(p(kn),{key:2,text:p(n)("sidebar.viewSwitcher")},{default:he(()=>[K(p(tn),{class:"side-section-toggle side-section-view",size:"sm",label:p(n)("sidebar.viewSwitcher"),onClick:Ct(Q,["stop"])},{default:he(()=>[K(p(ve),{name:"list-settings"})]),_:1},8,["label"])]),_:1},8,["text"])):te("",!0)])])],2),w("div",{ref_key:"sessionsEl",ref:d,class:Fe(["sessions",{scrolling:g.value,"pinned-drag-active":Ne.value&&z.value!==null,"flat-pinned-drop-hover":et.value}]),onScroll:A,onDragover:ut,onDrop:yt,onDragleave:Mt},[Z.value==="open"?(k(),E(Te,{key:0},[ie.value==="flat"?(k(),E(Te,{key:0},[(k(!0),E(Te,null,ht(e.flatSessions,dt=>(k(),de(vp,{key:dt.id,session:dt,active:dt.id===e.activeId,"approval-count":e.pendingBySession[dt.id]?.approvals??0,"question-count":e.pendingBySession[dt.id]?.questions??0,unread:e.unreadBySession[dt.id]??!1,"state-tag":"open",draggable:Ke.value!==dt.id,onDragstart:St=>xe(dt.id,St),onRenameStateChange:St=>Ke.value=St?dt.id:null,onSelect:Ge,onRename:Pe[10]||(Pe[10]=(St,An)=>s("rename",St,An)),onGenerateTitle:Pe[11]||(Pe[11]=(St,An)=>s("generateTitle",St,An)),onArchive:Pe[12]||(Pe[12]=St=>s("archive",St)),onFork:Pe[13]||(Pe[13]=St=>s("fork",St)),onExport:Pe[14]||(Pe[14]=St=>s("export",St)),onPin:Xn},null,8,["session","active","approval-count","question-count","unread","draggable","onDragstart","onRenameStateChange"]))),128)),e.flatSessions.length===0&&!e.flatHasMore&&e.pinnedSessions.length===0?(k(),E("div",fpe,F(p(n)("sidebar.noSessions")),1)):te("",!0),e.flatHasMore?(k(),E("div",hpe,[w("button",{class:"show-more",disabled:e.flatLoadingMore,onClick:Pe[15]||(Pe[15]=Ct(dt=>s("loadMoreFlatSessions"),["stop"]))},[w("span",gpe,F(e.flatLoadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.loadMore")),1),K(p(ve),{name:"chevron-down",size:"sm"})],8,ppe)])):te("",!0)],64)):(k(),E(Te,{key:1},[e.groups.length===0?(k(),E("div",mpe,F(p(n)("workspace.noWorkspace")),1)):we.value.length===0&&e.pinnedSessions.length===0?(k(),E("div",vpe,F(p(n)("sidebar.noOpenSessions")),1)):(k(!0),E(Te,{key:2},ht(we.value,dt=>(k(),E("div",{key:dt.workspace.id,class:Fe(["ws-drop-target",{"drop-before":O.value?.id===dt.workspace.id&&O.value.position==="before","drop-after":O.value?.id===dt.workspace.id&&O.value.position==="after","ws-locate-flash":Dn.value===dt.workspace.id}]),"data-ws-id":dt.workspace.id,onDragover:St=>j(St,dt.workspace.id),onDrop:St=>W(dt.workspace.id)},[K(Y1e,{group:dt,"active-workspace-id":e.activeWorkspaceId,"active-id":e.activeId,"renaming-id":vi.value,"rename-value":Dt.value,"rename-input-ref":Pn(),"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"ws-menu-open-id":Ni.value,dragging:N.value===dt.workspace.id,sortable:e.workspaceSortMode==="manual","is-collapsed":v,"visible-limit":$,"flash-session-id":tt.value,"pinned-drag-session":z.value,"state-tag":"open",onGroupClick:Ze,onGroupContextmenu:Yt,onToggleWsMenu:qi,onCreateInWorkspace:Pe[16]||(Pe[16]=St=>s("createInWorkspace",St)),onSelectSession:Ge,onRenameSession:Pe[17]||(Pe[17]=(St,An)=>s("rename",St,An)),onGenerateSessionTitle:Pe[18]||(Pe[18]=(St,An)=>s("generateTitle",St,An)),onArchiveSession:Pe[19]||(Pe[19]=St=>s("archive",St)),onForkSession:Pe[20]||(Pe[20]=St=>s("fork",St)),onExportSession:Pe[21]||(Pe[21]=St=>s("export",St)),onPinSession:Xn,onDropPinnedSession:V,onExpand:D,onCollapse:T,onConfirmRename:Lo,onCancelRename:Oi,onUpdateRenameValue:co,onWsDragstart:P,onWsDragend:R},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","sortable","flash-session-id","pinned-drag-session"])],42,ype))),128))],64))],64)):Z.value==="done"?(k(),E(Te,{key:1},[ie.value==="flat"?(k(!0),E(Te,{key:0},ht(e.doneSessions,dt=>(k(),de(vp,{key:dt.id,session:dt,active:dt.id===e.activeId,"approval-count":e.pendingBySession[dt.id]?.approvals??0,"question-count":e.pendingBySession[dt.id]?.questions??0,unread:e.unreadBySession[dt.id]??!1,"state-tag":"done",onSelect:Ge,onRename:Pe[22]||(Pe[22]=(St,An)=>s("rename",St,An)),onGenerateTitle:Pe[23]||(Pe[23]=(St,An)=>s("generateTitle",St,An)),onRestore:Pe[24]||(Pe[24]=St=>s("restore",St)),onFork:Pe[25]||(Pe[25]=St=>s("fork",St)),onExport:Pe[26]||(Pe[26]=St=>s("export",St))},null,8,["session","active","approval-count","question-count","unread"]))),128)):(k(!0),E(Te,{key:1},ht(Y.value,dt=>(k(),E("div",{key:dt.workspace.id,class:"done-group"},[w("div",{class:"done-gh",onClick:St=>x(dt.workspace.id),onContextmenu:St=>Yt(dt.workspace,St)},[v(dt.workspace.id)?(k(),de(p(ve),{key:0,class:"done-gh-folder",name:"folder-closed"})):(k(),de(p(ve),{key:1,class:"done-gh-folder",name:"folder"})),w("span",bpe,F(dt.workspace.name),1),w("span",Ape,F(dt.sessions.length),1),w("span",Cpe,[K(p(tn),{class:Fe(["gh-more",{open:Ni.value===dt.workspace.id}]),size:"sm",label:p(n)("sidebar.options"),tooltip:p(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":Ni.value===dt.workspace.id,onClick:Ct(St=>qi(dt.workspace,St),["stop"])},{default:he(()=>[K(p(ve),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded","onClick"])])],40,kpe),v(dt.workspace.id)?te("",!0):(k(),E("div",wpe,[(k(!0),E(Te,null,ht(dt.sessions,St=>(k(),de(vp,{key:St.id,session:St,active:St.id===e.activeId,"approval-count":e.pendingBySession[St.id]?.approvals??0,"question-count":e.pendingBySession[St.id]?.questions??0,unread:e.unreadBySession[St.id]??!1,"state-tag":"done",onSelect:Ge,onRename:Pe[27]||(Pe[27]=(An,pi)=>s("rename",An,pi)),onGenerateTitle:Pe[28]||(Pe[28]=(An,pi)=>s("generateTitle",An,pi)),onRestore:Pe[29]||(Pe[29]=An=>s("restore",An)),onFork:Pe[30]||(Pe[30]=An=>s("fork",An)),onExport:Pe[31]||(Pe[31]=An=>s("export",An))},null,8,["session","active","approval-count","question-count","unread"]))),128))]))]))),128)),e.doneSessions.length===0&&!e.doneHasMore?(k(),E("div",xpe,F(p(n)("sidebar.noDoneSessions")),1)):te("",!0),e.doneHasMore?(k(),E("div",Spe,[w("button",{class:"show-more",disabled:e.doneLoadingMore,onClick:Pe[32]||(Pe[32]=Ct(dt=>s("loadMoreDoneSessions"),["stop"]))},[w("span",Ipe,F(e.doneLoadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.loadMore")),1),K(p(ve),{name:"chevron-down",size:"sm"})],8,_pe)])):te("",!0)],64)):(k(),E(Te,{key:2},[(k(!0),E(Te,null,ht(e.groups,dt=>(k(),E("div",{key:dt.workspace.id,class:Fe(["ws-dir",{on:dt.workspace.id===e.activeWorkspaceId}]),onClick:St=>s("createInWorkspace",dt.workspace.id),onContextmenu:St=>Yt(dt.workspace,St)},[w("div",Epe,[K(p(ve),{class:"ws-dir-icon",name:"folder-closed"}),vi.value===dt.workspace.id?$n((k(),E("input",{key:0,ref_for:!0,ref:St=>Ei.value=St,"onUpdate:modelValue":Pe[33]||(Pe[33]=St=>Dt.value=St),class:"ws-dir-rename",type:"text",onKeydown:[_s(Ct(Pi,["stop"]),["enter"]),Pe[34]||(Pe[34]=_s(Ct(St=>Oi(),["stop"]),["esc"]))],onCompositionstart:Pe[35]||(Pe[35]=(...St)=>p(Wi)&&p(Wi)(...St)),onCompositionend:Pe[36]||(Pe[36]=(...St)=>p(As)&&p(As)(...St)),onBlur:Pe[37]||(Pe[37]=St=>Oi()),onClick:Pe[38]||(Pe[38]=Ct(()=>{},["stop"]))},null,40,Tpe)),[[uo,Dt.value]]):(k(),E("span",Lpe,F(dt.workspace.name),1)),w("span",Npe,[vi.value!==dt.workspace.id?(k(),de(p(tn),{key:0,class:Fe(["gh-more",{open:Ni.value===dt.workspace.id}]),size:"sm",label:p(n)("sidebar.options"),tooltip:p(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":Ni.value===dt.workspace.id,onClick:Ct(St=>qi(dt.workspace,St),["stop"])},{default:he(()=>[K(p(ve),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded","onClick"])):te("",!0)])]),w("div",Fpe,F(dt.workspace.root),1)],42,Mpe))),128)),e.groups.length===0?(k(),E("div",Dpe,F(p(n)("workspace.noWorkspace")),1)):te("",!0)],64))],34),w("div",{class:Fe(["side-footer",{"side-footer--shadowed":h.value}])},[K(u1e,{onLogin:Pe[39]||(Pe[39]=dt=>s("login")),onOpenSettings:Pe[40]||(Pe[40]=dt=>s("openSettings"))})],2),w("div",{class:Fe(["folder-drop-overlay",{show:ct.value}]),"aria-hidden":"true"},[w("div",$pe,[K(p(ve),{name:"folder",size:"lg"}),w("span",null,F(p(n)("sidebar.dropToAddWorkspace")),1)])],2)],36),K(ls,{name:"menu-pop"},{default:he(()=>[es.value?(k(),de(p(sr),{key:0,ref_key:"ghMenuRef",ref:Ci,class:"gh-menu",style:qt(No.value),onClick:Pe[41]||(Pe[41]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{onClick:ts},{default:he(()=>[K(p(ve),{name:"copy",size:"sm"}),$e(" "+F(p(n)("sidebar.copyPath")),1)]),_:1}),K(p(Wt),{class:"workspace-rename-item",onClick:fi},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(n)("sidebar.rename")),1)]),_:1}),K(p(Wt),{danger:"",onClick:Fr},{default:he(()=>[K(p(ve),{name:"close",size:"sm"}),$e(" "+F(p(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):te("",!0)]),_:1}),K(ls,{name:"menu-pop"},{default:he(()=>[Ni.value!==null&&hi.value?(k(),de(p(sr),{key:0,ref_key:"wsMenuRef",ref:Xs,class:"ws-menu",style:qt(ho.value),onClick:Pe[45]||(Pe[45]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{onClick:Pe[42]||(Pe[42]=dt=>eo(hi.value))},{default:he(()=>[K(p(ve),{name:"copy",size:"sm"}),$e(" "+F(p(n)("sidebar.copyPath")),1)]),_:1}),K(p(Wt),{class:"workspace-rename-item",onClick:Pe[43]||(Pe[43]=dt=>Us(hi.value))},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(n)("sidebar.rename")),1)]),_:1}),K(p(Wt),{danger:"",onClick:Pe[44]||(Pe[44]=dt=>Fo(hi.value))},{default:he(()=>[K(p(ve),{name:"close",size:"sm"}),$e(" "+F(p(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):te("",!0)]),_:1}),K(ls,{name:"menu-pop"},{default:he(()=>[le.value?(k(),de(p(sr),{key:0,ref_key:"viewMenuRef",ref:ae,class:"view-menu",style:qt(Ce.value),onClick:Pe[50]||(Pe[50]=Ct(()=>{},["stop"]))},{default:he(()=>[w("div",Bpe,F(p(n)("sidebar.viewGroup")),1),K(p(Wt),{onClick:Pe[46]||(Pe[46]=dt=>ge("flat"))},{default:he(()=>[K(p(ve),{name:"list",size:"sm"}),$e(" "+F(p(n)("sidebar.viewFlat"))+" ",1),w("span",zpe,[ie.value==="flat"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),K(p(Wt),{onClick:Pe[47]||(Pe[47]=dt=>ge("grouped"))},{default:he(()=>[K(p(ve),{name:"tree-view",size:"sm"}),$e(" "+F(p(n)("sidebar.viewGrouped"))+" ",1),w("span",Rpe,[ie.value==="grouped"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),ie.value==="grouped"?(k(),E(Te,{key:0},[w("div",Ope,F(p(n)("sidebar.sortGroup")),1),K(p(Wt),{onClick:Pe[48]||(Pe[48]=dt=>Ae("manual"))},{default:he(()=>[K(p(ve),{name:"grip",size:"sm"}),$e(" "+F(p(n)("sidebar.sortManual"))+" ",1),w("span",Ppe,[e.workspaceSortMode==="manual"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),K(p(Wt),{onClick:Pe[49]||(Pe[49]=dt=>Ae("recent"))},{default:he(()=>[K(p(ve),{name:"clock",size:"sm"}),$e(" "+F(p(n)("sidebar.sortRecent"))+" ",1),w("span",jpe,[e.workspaceSortMode==="recent"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1})],64)):te("",!0),p(pe)?(k(),E(Te,{key:1},[K(p(Wt),{separator:""}),K(p(Wt),{onClick:_e},{default:he(()=>[K(p(ve),{name:"session-admin",size:"sm"}),$e(" "+F(p(n)("sidebar.sessionAdmin")),1)]),_:1})],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1}),o.value?(k(),de(Tue,{key:0,sessions:e.sessions,workspaces:Ut.value,"active-id":e.activeId,onSelect:lt,onSelectWorkspace:wn,onClose:Pe[51]||(Pe[51]=dt=>o.value=!1)},null,8,["sessions","workspaces","active-id"])):te("",!0),(k(),de(Gr,{to:"body"},[wi.value?(k(),de(p(Li),{key:0,onClose:Pe[52]||(Pe[52]=dt=>wi.value=!1)})):te("",!0)]))],6))}}),Upe=gt(qpe,[["__scopeId","data-v-2d3d457d"]]),Kpe=["aria-label"],Vpe=Qe({__name:"ResizeHandle",props:{storageKey:{},defaultWidth:{},min:{},max:{},reverse:{type:Boolean},ariaLabel:{},applyLive:{}},emits:["update:width","update:dragging"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),{width:o,dragging:r,cursor:l,onPointerDown:a}=vhe({storageKey:n.storageKey,defaultWidth:n.defaultWidth,min:n.min,max:()=>n.max,reverse:n.reverse,applyLive:n.applyLive});return i("update:width",o.value),qe(o,u=>i("update:width",u)),qe(r,u=>i("update:dragging",u)),(u,c)=>(k(),E("div",{class:Fe(["rh",{dragging:p(r)}]),style:qt({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]=[w("span",{class:"rh-bar","aria-hidden":"true"},null,-1)])],46,Kpe))}}),c_=gt(Vpe,[["__scopeId","data-v-1c6dfdc5"]]),Zpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gpe(e,t){return k(),E("svg",Zpe,[...t[0]||(t[0]=[w("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 Qpe=xt({name:"kimi-add",render:Gpe}),Ype={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Jpe(e,t){return k(),E("svg",Ype,[...t[0]||(t[0]=[w("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),w("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 Xpe=xt({name:"kimi-add-conversation",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 k(),E("svg",e0e,[...t[0]||(t[0]=[w("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),w("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 n0e=xt({name:"kimi-archive",render:t0e}),i0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s0e(e,t){return k(),E("svg",i0e,[...t[0]||(t[0]=[w("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 o0e=xt({name:"kimi-arrow-down",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 k(),E("svg",r0e,[...t[0]||(t[0]=[w("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 a0e=xt({name:"kimi-arrow-left",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 k(),E("svg",u0e,[...t[0]||(t[0]=[w("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 d0e=xt({name:"kimi-arrow-right",render:c0e}),f0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h0e(e,t){return k(),E("svg",f0e,[...t[0]||(t[0]=[w("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 p0e=xt({name:"kimi-arrow-up",render:h0e}),g0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function m0e(e,t){return k(),E("svg",g0e,[...t[0]||(t[0]=[w("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 v0e=xt({name:"kimi-check",render:m0e}),y0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k0e(e,t){return k(),E("svg",y0e,[...t[0]||(t[0]=[w("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 b0e=xt({name:"kimi-chevron-down",render:k0e}),A0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C0e(e,t){return k(),E("svg",A0e,[...t[0]||(t[0]=[w("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 w0e=xt({name:"kimi-chevron-right",render:C0e}),x0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function S0e(e,t){return k(),E("svg",x0e,[...t[0]||(t[0]=[w("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 _0e=xt({name:"kimi-chevron-up",render:S0e}),I0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M0e(e,t){return k(),E("svg",I0e,[...t[0]||(t[0]=[w("circle",{cx:"12",cy:"12",r:"10.875",stroke:"currentColor","stroke-width":"2.25"},null,-1),w("path",{d:"M7.125 12.6L10.65 16.125L17.025 8.85",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const E0e=xt({name:"kimi-circle-check",render:M0e}),T0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L0e(e,t){return k(),E("svg",T0e,[...t[0]||(t[0]=[w("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),w("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 N0e=xt({name:"kimi-clock",render:L0e}),F0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D0e(e,t){return k(),E("svg",F0e,[...t[0]||(t[0]=[w("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 $0e=xt({name:"kimi-close",render:D0e}),B0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function z0e(e,t){return k(),E("svg",B0e,[...t[0]||(t[0]=[w("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),w("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 R0e=xt({name:"kimi-collapse",render:z0e}),O0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P0e(e,t){return k(),E("svg",O0e,[...t[0]||(t[0]=[w("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 j0e=xt({name:"kimi-comment",render:P0e}),H0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function W0e(e,t){return k(),E("svg",H0e,[...t[0]||(t[0]=[w("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),w("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 q0e=xt({name:"kimi-copy",render:W0e}),U0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function K0e(e,t){return k(),E("svg",U0e,[...t[0]||(t[0]=[w("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 V0e=xt({name:"kimi-dark-mode",render:K0e}),Z0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G0e(e,t){return k(),E("svg",Z0e,[...t[0]||(t[0]=[w("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 Q0e=xt({name:"kimi-download",render:G0e}),Y0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J0e(e,t){return k(),E("svg",Y0e,[...t[0]||(t[0]=[w("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 X0e=xt({name:"kimi-edit",render:J0e}),ege={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tge(e,t){return k(),E("svg",ege,[...t[0]||(t[0]=[w("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 nge=xt({name:"kimi-expand",render:tge}),ige={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sge(e,t){return k(),E("svg",ige,[...t[0]||(t[0]=[w("g",null,[w("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 d_=xt({name:"kimi-file",render:sge}),oge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rge(e,t){return k(),E("svg",oge,[...t[0]||(t[0]=[w("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),w("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),w("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 lge=xt({name:"kimi-file-text",render:rge}),age={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function uge(e,t){return k(),E("svg",age,[...t[0]||(t[0]=[w("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 cge=xt({name:"kimi-folder",render:uge}),dge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fge(e,t){return k(),E("svg",dge,[...t[0]||(t[0]=[w("g",null,[w("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 hge=xt({name:"kimi-folder-open",render:fge}),pge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gge(e,t){return k(),E("svg",pge,[...t[0]||(t[0]=[w("path",{d:"M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z",fill:"currentColor"},null,-1),w("path",{d:"M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z",fill:"currentColor"},null,-1)])])}const mge=xt({name:"kimi-gen-title",render:gge}),vge={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function yge(e,t){return k(),E("svg",vge,[...t[0]||(t[0]=[w("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),w("g",{id:"af-p1"},[w("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 kge=xt({name:"kimi-folder-plus",render:yge}),bge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Age(e,t){return k(),E("svg",bge,[...t[0]||(t[0]=[w("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 Cge=xt({name:"kimi-follow-system",render:Age}),wge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xge(e,t){return k(),E("svg",wge,[...t[0]||(t[0]=[w("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 Sge=xt({name:"kimi-full-access",render:xge}),_ge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ige(e,t){return k(),E("svg",_ge,[...t[0]||(t[0]=[w("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 Mge=xt({name:"kimi-globe",render:Ige}),Ege={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tge(e,t){return k(),E("svg",Ege,[...t[0]||(t[0]=[w("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 Lge=xt({name:"kimi-grip",render:Tge}),Nge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fge(e,t){return k(),E("svg",Nge,[...t[0]||(t[0]=[w("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 Dge=xt({name:"kimi-hand",render:Fge}),$ge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Bge(e,t){return k(),E("svg",$ge,[...t[0]||(t[0]=[w("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 zge=xt({name:"kimi-histogram",render:Bge}),Rge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Oge(e,t){return k(),E("svg",Rge,[...t[0]||(t[0]=[w("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),w("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 Pge=xt({name:"kimi-image",render:Oge}),jge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hge(e,t){return k(),E("svg",jge,[...t[0]||(t[0]=[w("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),w("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 Wge=xt({name:"kimi-image-failed",render:Hge}),qge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Uge(e,t){return k(),E("svg",qge,[...t[0]||(t[0]=[w("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 Kge=xt({name:"kimi-info",render:Uge}),Vge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zge(e,t){return k(),E("svg",Vge,[...t[0]||(t[0]=[mc('',10)])])}const Gge=xt({name:"kimi-keyboard",render:Zge}),Qge={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Yge(e,t){return k(),E("svg",Qge,[...t[0]||(t[0]=[w("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),w("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),w("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 Jge=xt({name:"kimi-left-panel",render:Yge}),Xge={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function eme(e,t){return k(),E("svg",Xge,[...t[0]||(t[0]=[w("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),w("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),w("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 tme=xt({name:"kimi-left-panel-expand",render:eme}),nme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ime(e,t){return k(),E("svg",nme,[...t[0]||(t[0]=[mc('',1)])])}const sme=xt({name:"kimi-light-mode",render:ime}),ome={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rme(e,t){return k(),E("svg",ome,[...t[0]||(t[0]=[w("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 lme=xt({name:"kimi-link",render:rme}),ame={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ume(e,t){return k(),E("svg",ame,[...t[0]||(t[0]=[w("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 cme=xt({name:"kimi-list",render:ume}),dme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fme(e,t){return k(),E("svg",dme,[...t[0]||(t[0]=[w("g",null,[w("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 hme=xt({name:"kimi-mail",render:fme}),pme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gme(e,t){return k(),E("svg",pme,[...t[0]||(t[0]=[w("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 mme=xt({name:"kimi-minus",render:gme}),vme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yme(e,t){return k(),E("svg",vme,[...t[0]||(t[0]=[w("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 kme=xt({name:"kimi-microscope",render:yme}),bme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ame(e,t){return k(),E("svg",bme,[...t[0]||(t[0]=[w("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),w("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),w("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 Cme=xt({name:"kimi-more",render:Ame}),wme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xme(e,t){return k(),E("svg",wme,[...t[0]||(t[0]=[w("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),w("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),w("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 Sme=xt({name:"kimi-music",render:xme}),_me={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ime(e,t){return k(),E("svg",_me,[...t[0]||(t[0]=[w("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),w("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 Mme=xt({name:"kimi-pause",render:Ime}),Eme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tme(e,t){return k(),E("svg",Eme,[...t[0]||(t[0]=[w("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 Lme=xt({name:"kimi-pencil",render:Tme}),Nme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fme(e,t){return k(),E("svg",Nme,[...t[0]||(t[0]=[w("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 Dme=xt({name:"kimi-play",render:Fme}),$me={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Bme(e,t){return k(),E("svg",$me,[...t[0]||(t[0]=[w("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),w("path",{d:"M12 2v10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const zme=xt({name:"kimi-power",render:Bme}),Rme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ome(e,t){return k(),E("svg",Rme,[...t[0]||(t[0]=[w("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),w("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),w("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 Pme=xt({name:"kimi-question",render:Ome}),jme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hme(e,t){return k(),E("svg",jme,[...t[0]||(t[0]=[w("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 Wme=xt({name:"kimi-robot",render:Hme}),qme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ume(e,t){return k(),E("svg",qme,[...t[0]||(t[0]=[w("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 Kme=xt({name:"kimi-search",render:Ume}),Vme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zme(e,t){return k(),E("svg",Vme,[...t[0]||(t[0]=[w("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 Gme=xt({name:"kimi-send",render:Zme}),Qme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Yme(e,t){return k(),E("svg",Qme,[...t[0]||(t[0]=[w("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),w("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 Jme=xt({name:"kimi-setting",render:Yme}),Xme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e2e(e,t){return k(),E("svg",Xme,[...t[0]||(t[0]=[w("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),w("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),w("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 t2e=xt({name:"kimi-shield-question",render:e2e}),n2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i2e(e,t){return k(),E("svg",n2e,[...t[0]||(t[0]=[w("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 s2e=xt({name:"kimi-sign-in",render:i2e}),o2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function r2e(e,t){return k(),E("svg",o2e,[...t[0]||(t[0]=[w("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 l2e=xt({name:"kimi-sign-out",render:r2e}),a2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u2e(e,t){return k(),E("svg",a2e,[...t[0]||(t[0]=[mc('',9)])])}const c2e=xt({name:"kimi-sliders",render:u2e}),d2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f2e(e,t){return k(),E("svg",d2e,[...t[0]||(t[0]=[w("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 h2e=xt({name:"kimi-stop",render:f2e}),p2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g2e(e,t){return k(),E("svg",p2e,[...t[0]||(t[0]=[w("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 m2e=xt({name:"kimi-target",render:g2e}),v2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y2e(e,t){return k(),E("svg",v2e,[...t[0]||(t[0]=[w("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),w("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),w("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 k2e=xt({name:"kimi-task",render:y2e}),b2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A2e(e,t){return k(),E("svg",b2e,[...t[0]||(t[0]=[w("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),w("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),w("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 C2e=xt({name:"kimi-terminal",render:A2e}),w2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x2e(e,t){return k(),E("svg",w2e,[...t[0]||(t[0]=[w("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 S2e=xt({name:"kimi-thinking",render:x2e}),_2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I2e(e,t){return k(),E("svg",_2e,[...t[0]||(t[0]=[mc('',6)])])}const M2e=xt({name:"kimi-todo",render:I2e}),E2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T2e(e,t){return k(),E("svg",E2e,[...t[0]||(t[0]=[w("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),w("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),w("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 L2e=xt({name:"kimi-translate",render:T2e}),N2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F2e(e,t){return k(),E("svg",N2e,[...t[0]||(t[0]=[w("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),w("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),w("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),w("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 D2e=xt({name:"kimi-trash",render:F2e}),$2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B2e(e,t){return k(),E("svg",$2e,[...t[0]||(t[0]=[w("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 z2e=xt({name:"kimi-undo",render:B2e}),R2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O2e(e,t){return k(),E("svg",R2e,[...t[0]||(t[0]=[w("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 P2e=xt({name:"kimi-user",render:O2e}),j2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H2e(e,t){return k(),E("svg",j2e,[...t[0]||(t[0]=[w("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),w("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),w("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 W2e=xt({name:"kimi-warning",render:H2e}),q2e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function U2e(e,t){return k(),E("svg",q2e,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 6h8m4 0h4M6 12a2 2 0 1 0 4 0a2 2 0 1 0-4 0m-2 0h2m4 0h10m-5 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 18h11m4 0h1"},null,-1)])])}const K2e=xt({name:"tabler-adjustments-horizontal",render:U2e}),V2e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Z2e(e,t){return k(),E("svg",V2e,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 6l-6 6l6 6"},null,-1)])])}const G2e=xt({name:"tabler-chevron-left",render:Z2e}),Q2e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y2e(e,t){return k(),E("svg",Q2e,[...t[0]||(t[0]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"}),w("path",{d:"m9 12l2 2l4-4"})],-1)])])}const J2e=xt({name:"tabler-circle-check",render:Y2e}),X2e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function eve(e,t){return k(),E("svg",X2e,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.56 3.69a9 9 0 0 0-2.92 1.95M3.69 8.56A9 9 0 0 0 3 12m.69 3.44a9 9 0 0 0 1.95 2.92m2.92 1.95A9 9 0 0 0 12 21m3.44-.69a9 9 0 0 0 2.92-1.95m1.95-2.92A9 9 0 0 0 21 12m-.69-3.44a9 9 0 0 0-1.95-2.92m-2.92-1.95A9 9 0 0 0 12 3"},null,-1)])])}const tve=xt({name:"tabler-circle-dashed",render:eve}),nve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ive(e,t){return k(),E("svg",nve,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 3h6m-5 6h4m-4-6v6L6 20a.7.7 0 0 0 .5 1h11a.7.7 0 0 0 .5-1L14 9V3"},null,-1)])])}const sve=xt({name:"tabler-flask",render:ive}),ove={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function rve(e,t){return k(),E("svg",ove,[...t[0]||(t[0]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("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"}),w("path",{d:"m9 10l2 2l-2 2"})],-1)])])}const lve=xt({name:"tabler-layout-sidebar-right-collapse",render:rve}),ave={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uve(e,t){return k(),E("svg",ave,[...t[0]||(t[0]=[w("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 cve=xt({name:"tabler-paperclip",render:uve}),dve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fve(e,t){return k(),E("svg",dve,[...t[0]||(t[0]=[w("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 hve=xt({name:"ri-braces-line",render:fve}),pve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gve(e,t){return k(),E("svg",pve,[...t[0]||(t[0]=[w("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 mve=xt({name:"ri-calendar-close-line",render:gve}),vve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function yve(e,t){return k(),E("svg",vve,[...t[0]||(t[0]=[w("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 kve=xt({name:"ri-calendar-schedule-line",render:yve}),bve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ave(e,t){return k(),E("svg",bve,[...t[0]||(t[0]=[w("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 Cve=xt({name:"ri-calendar-todo-line",render:Ave}),wve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xve(e,t){return k(),E("svg",wve,[...t[0]||(t[0]=[w("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 Sve=xt({name:"ri-code-line",render:xve}),_ve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ive(e,t){return k(),E("svg",_ve,[...t[0]||(t[0]=[w("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 Mve=xt({name:"ri-emotion-line",render:Ive}),Eve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Tve(e,t){return k(),E("svg",Eve,[...t[0]||(t[0]=[w("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 Lve=xt({name:"ri-external-link-line",render:Tve}),Nve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fve(e,t){return k(),E("svg",Nve,[...t[0]||(t[0]=[w("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 Dve=xt({name:"ri-eye-line",render:Fve}),$ve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Bve(e,t){return k(),E("svg",$ve,[...t[0]||(t[0]=[w("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 zve=xt({name:"ri-eye-off-line",render:Bve}),Rve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ove(e,t){return k(),E("svg",Rve,[...t[0]||(t[0]=[w("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 Pve=xt({name:"ri-file-add-line",render:Ove}),jve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Hve(e,t){return k(),E("svg",jve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const Wve=xt({name:"ri-flashlight-line",render:Hve}),qve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Uve(e,t){return k(),E("svg",qve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M14 4.438A2.437 2.437 0 0 0 16.438 2h1.125A2.437 2.437 0 0 0 20 4.438v1.125A2.437 2.437 0 0 0 17.563 8h-1.125A2.437 2.437 0 0 0 14 5.563zM1 11a6 6 0 0 0 6-6h2a6 6 0 0 0 6 6v2a6 6 0 0 0-6 6H7a6 6 0 0 0-6-6zm3.876 1A8.04 8.04 0 0 1 8 15.124A8.04 8.04 0 0 1 11.124 12A8.04 8.04 0 0 1 8 8.876A8.04 8.04 0 0 1 4.876 12m12.374 2A3.25 3.25 0 0 1 14 17.25v1.5A3.25 3.25 0 0 1 17.25 22h1.5A3.25 3.25 0 0 1 22 18.75v-1.5A3.25 3.25 0 0 1 18.75 14z"},null,-1)])])}const Kve=xt({name:"ri-sparkling-line",render:Uve}),Vve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Zve(e,t){return k(),E("svg",Vve,[...t[0]||(t[0]=[w("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 Gve=xt({name:"ri-folder-fill",render:Zve}),Qve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Yve(e,t){return k(),E("svg",Qve,[...t[0]||(t[0]=[w("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 Jve=xt({name:"ri-git-fork-line",render:Yve}),Xve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function eye(e,t){return k(),E("svg",Xve,[...t[0]||(t[0]=[w("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 tye=xt({name:"ri-git-pull-request-line",render:eye}),nye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function iye(e,t){return k(),E("svg",nye,[...t[0]||(t[0]=[w("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 sye=xt({name:"ri-list-settings-line",render:iye}),oye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function rye(e,t){return k(),E("svg",oye,[...t[0]||(t[0]=[w("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 lye=xt({name:"ri-node-tree",render:rye}),aye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uye(e,t){return k(),E("svg",aye,[...t[0]||(t[0]=[w("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 cye=xt({name:"ri-pushpin-line",render:uye}),dye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fye(e,t){return k(),E("svg",dye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const hye=xt({name:"ri-sort-desc",render:fye}),pye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gye(e,t){return k(),E("svg",pye,[...t[0]||(t[0]=[w("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 mye=xt({name:"ri-star-fill",render:gye}),vye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function yye(e,t){return k(),E("svg",vye,[...t[0]||(t[0]=[w("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 kye=xt({name:"ri-star-line",render:yye}),bye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Aye(e,t){return k(),E("svg",bye,[...t[0]||(t[0]=[w("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 Cye=xt({name:"ri-tools-line",render:Aye}),wye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xye(e,t){return k(),E("svg",wye,[...t[0]||(t[0]=[w("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 Sye=xt({name:"ri-unpin-line",render:xye}),_ye=` - - -`,Iye=` - - - -`,Mye=` - - - -`,Eye=` - - -`,Tye=` - - -`,Lye=` - - -`,Nye=` - - -`,mB=` - - -`,Fye=` - - -`,Dye=` - - -`,$ye=` - - -`,Bye=` - - - -`,zye=` - - - -`,Rye=` - - -`,Oye=` - - - -`,Pye=` - - -`,vB=` - - - -`,jye=` - - -`,Hye=` - - -`,Wye=` - - -`,qye=` - - -`,Gb=` - - - - -`,Uye=` - - - - -`,Kye=` - - -`,yB=` - - - - -`,Vye=` - - - -`,Zye=` - - - - - -`,Gye=` - - -`,Qye=` - - -`,Yye=` - - -`,Jye=` - - -`,Xye=` - - -`,e9e=` - - -`,t9e=` - - - -`,n9e=` - - - -`,i9e=` - - -`,s9e=` - - - - - - - - - - - -`,o9e=` - - - - -`,r9e=` - - - - -`,l9e=` - - - - - - - - - - - - -`,a9e=` - - -`,u9e=` - - -`,c9e=` - - - - -`,d9e=` - - -`,f9e=` - - -`,h9e=` - - - - -`,p9e=` - - - - -`,g9e=` - - - -`,m9e=` - - -`,v9e=` - - -`,y9e=` - - - -`,k9e=` - - - - -`,b9e=` - - -`,A9e=` - - -`,C9e=` - - -`,w9e=` - - - -`,x9e=` - - - - -`,S9e=` - - -`,_9e=` - - -`,I9e='',M9e=` - - -`,E9e=` - - -`,T9e=` - - - - -`,L9e=` - - - - -`,N9e=` - - -`,F9e=` - - - - - - - -`,D9e=` - - - - -`,$9e=` - - - - - -`,B9e=` - - -`,z9e=` - - -`,R9e=` - - - - -`,O9e='',P9e='',j9e='',H9e='',W9e='',q9e='',U9e='',K9e='',V9e='',Z9e='',G9e='',Q9e='',Y9e='',kB='',J9e='',X9e='',e4e='',t4e='',bB='',n4e='',i4e='',s4e='',o4e='',r4e='',l4e='',a4e='',u4e='',c4e='',d4e='',f4e='',h4e={sm:14,md:16,lg:20};function Et(e,t){return{component:e,svg:t}}const AB={plus:Et(Qpe,_ye),"chat-new":Et(Xpe,Iye),"calendar-close":Et(mve,V9e),"calendar-schedule":Et(kve,Z9e),"calendar-todo":Et(Cve,G9e),close:Et($0e,Rye),check:Et(v0e,mB),"circle-check":Et(E0e,Bye),"state-open":Et(tve,H9e),"state-done":Et(J2e,j9e),archive:Et(n0e,Mye),search:Et(Kme,A9e),copy:Et(q0e,vB),link:Et(lme,a9e),"external-link":Et(Lve,kB),download:Et(Q0e,Hye),undo:Et(z2e,B9e),send:Et(Gme,C9e),image:Et(Pge,t9e),settings:Et(Jme,w9e),sliders:Et(c2e,I9e),"light-mode":Et(sme,l9e),"dark-mode":Et(V0e,jye),"follow-system":Et(Cge,Gye),"log-in":Et(s2e,S9e),"log-out":Et(l2e,_9e),hand:Et(Dge,Xye),"full-access":Et(Sge,Qye),"shield-question":Et(t2e,x9e),"chevron-down":Et(b0e,Fye),"chevron-right":Et(w0e,Dye),"chevron-left":Et(G2e,P9e),"chevron-up":Et(_0e,$ye),"arrow-up":Et(p0e,Nye),"arrow-down":Et(o0e,Eye),"arrow-right":Et(d0e,Lye),"arrow-left":Et(a0e,Tye),minus:Et(mme,d9e),microscope:Et(kme,f9e),flask:Et(sve,W9e),"panel-collapse":Et(Jge,o9e),"panel-collapse-right":Et(lve,q9e),"panel-expand":Et(tme,r9e),expand:Et(nge,qye),collapse:Et(R0e,Oye),list:Et(cme,u9e),"list-settings":Et(sye,o4e),"tree-view":Et(lye,r4e),sort:Et(hye,a4e),grip:Et(Lge,Jye),"session-admin":Et(K2e,O9e),folder:Et(hge,yB),"folder-closed":Et(cge,Kye),"folder-plus":Et(kge,Zye),"folder-solid":Et(Gve,n4e),file:Et(d_,Gb),"file-text":Et(lge,Uye),"file-edit":Et(X0e,Wye),"file-plus":Et(Pve,e4e),"file-off":Et(d_,Gb),attachment:Et(cve,U9e),"image-off":Et(Wge,n9e),eye:Et(Dve,J9e),"eye-off":Et(zve,X9e),code:Et(Sve,Q9e),terminal:Et(C2e,L9e),pencil:Et(Lme,m9e),tool:Et(Cye,d4e),glob:Et(hve,K9e),globe:Et(Mge,Yye),translate:Et(L2e,D9e),"check-list":Et(M2e,F9e),bolt:Et(Wve,t4e),sparkling:Et(Kve,bB),keyboard:Et(Gge,s9e),trash:Et(D2e,$9e),"git-fork":Et(Jve,i4e),"git-pull-request":Et(tye,s4e),message:Et(j0e,Pye),mail:Et(hme,c9e),user:Et(P2e,z9e),info:Et(Kge,i9e),"help-circle":Et(Pme,k9e),"alert-triangle":Et(W2e,R9e),clock:Et(N0e,zye),robot:Et(Wme,b9e),sparkles:Et(k2e,T9e),"gen-title":Et(mge,Vye),histogram:Et(zge,e9e),music:Et(Sme,p9e),emoji:Et(Mve,Y9e),target:Et(m2e,E9e),pause:Et(Mme,g9e),play:Et(Dme,v9e),power:Et(zme,y9e),pin:Et(cye,l4e),stop:Et(h2e,M9e),star:Et(mye,u4e),"star-outline":Et(kye,c4e),unpin:Et(Sye,f4e),"dots-horizontal":Et(Cme,h9e),thinking:Et(S2e,N9e)};function p4e(e){return AB[e]}function g4e(e,t){return e.replace(/]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^${r}`}function kbe(e,t,n){return(n.xhtmlOut?`
      -`:`
      -`)+`
      -
        -`}function bbe(){return`
      -
      -`}function Abe(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),`
    1. `}function Cbe(){return`
    2. -`}function wbe(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),` ↩︎`}function xbe(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=ybe,e.renderer.rules.footnote_block_open=kbe,e.renderer.rules.footnote_block_close=bbe,e.renderer.rules.footnote_open=Abe,e.renderer.rules.footnote_close=Cbe,e.renderer.rules.footnote_anchor=wbe,e.renderer.rules.footnote_caption=vbe,e.renderer.rules.footnote_anchor_name=mbe;function i(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 y=l.bMarks[a],A=l.tShift[a],b=l.sCount[a],C=l.parentType,v=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,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 o(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 C=0;C?@[\]^_`{|}~-])/g;function Mbe(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==94||t||i+2>=n)return!1;e.pos=i+1;let s=!1;for(;e.pos{t.exports=function(m,y){y=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},y),m.core.ruler.after("inline","github-task-lists",function(A){for(var b=A.tokens,C=0,v=2;v=0;b--)if(m[b].level===A)return b;return-1}function s(m,y){return d(m[y])&&f(m[y-1])&&h(m[y-2])&&g(m[y])}function o(m,y,A,b){var C=A.idPrefix+y;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(C,b)),m.children.push(a(b)),m.children.unshift(r(m,C,A,b)),A.divWrap&&(m.children.unshift(u(A,b)),m.children.push(c(b)))}function r(m,y,A,b){var C=new b("checkbox_input","input",0);return C.attrs=[["type","checkbox"],["id",y]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&C.attrs.push(["checked","true"]),A.disabled===!0&&C.attrs.push(["disabled","true"]),C}function l(m,y){var A=new y("label_open","label",1);return A.attrs=[["for",m]],A}function a(m){return new m("label_close","label",-1)}function u(m,y){var A=new y("checkbox_open","div",0);return A.attrs=[["class",m.divClass]],A}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)}})});const Lbe=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]]);function Nbe(e){return e>=55296&&e<=57343||e>1114111?65533:Lbe.get(e)??e}function Fbe(e){const t=atob(e),n=t.length&-2,i=new Uint16Array(n/2);for(let s=0,o=0;s=rs.ZERO&&e<=rs.NINE}function $be(e){return e>=rs.UPPER_A&&e<=rs.UPPER_F||e>=rs.LOWER_A&&e<=rs.LOWER_F}function Bbe(e){return e>=rs.UPPER_A&&e<=rs.UPPER_Z||e>=rs.LOWER_A&&e<=rs.LOWER_Z||Yb(e)}function zbe(e){return e===rs.EQUALS||Bbe(e)}var so;(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"})(so||(so={}));var Pu;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Pu||(Pu={}));var Rbe=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=so.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=Pu.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=so.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case so.EntityStart:return e.charCodeAt(t)===rs.NUM?(this.state=so.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=so.NamedEntity,this.stateNamedEntity(e,t));case so.NumericStart:return this.stateNumericStart(e,t);case so.NumericDecimal:return this.stateNumericDecimal(e,t);case so.NumericHex:return this.stateNumericHex(e,t);case so.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|v_)===rs.LOWER_X?(this.state=so.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=so.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t>14;for(;t>7;if(this.runConsumed===0){const l=i&Jo.JUMP_TABLE;if(e.charCodeAt(t)!==l)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed=e.length)return-1;const l=this.runConsumed-1,a=n[this.treeIndex+1+(l>>1)],u=l%2===0?a&255:a>>8&255;if(e.charCodeAt(t)!==u)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(r>>1),i=n[this.treeIndex],s=(i&Jo.VALUE_LENGTH)>>14}if(t>=e.length)break;const o=e.charCodeAt(t);if(o===rs.SEMI&&s!==0&&(i&Jo.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=Pbe(n,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===Pu.Attribute&&(s===0||zbe(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],s=(i&Jo.VALUE_LENGTH)>>14,s!==0){if(o===rs.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Pu.Strict&&(i&Jo.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){const{result:e,decodeTree:t}=this,n=(t[e]&Jo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:i}=this;return this.emitCodePoint(t===1?i[e]&~(Jo.VALUE_LENGTH|Jo.FLAG13):i[e+1],n),t===3&&this.emitCodePoint(i[e+2],n),n}end(){switch(this.state){case so.NamedEntity:return this.result!==0&&(this.decodeMode!==Pu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case so.NumericDecimal:return this.emitNumericEntity(0,2);case so.NumericHex:return this.emitNumericEntity(0,3);case so.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case so.EntityStart:return 0}}};function Obe(e){let t="";const n=new Rbe(e,i=>t+=String.fromCodePoint(i));return function(s,o){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(o);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 Pbe(e,t,n,i){const s=(t&Jo.BRANCH_LENGTH)>>7,o=t&Jo.JUMP_TABLE;if(s===0)return o!==0&&i===o?n:-1;if(o){const u=i-o;return u<0||u>=s?-1:e[n+u]-1}const r=s+1>>1;let l=0,a=s-1;for(;l<=a;){const u=l+a>>>1,c=e[n+(u>>1)]>>(u&1)*8&255;if(ci)a=u-1;else return e[n+r+u]}return-1}const jbe=Obe(Dbe);function F6(e,t=Pu.Legacy){return jbe(e,t)}var Hbe=LB(Tbe());const y_={};function Wbe(e){let t=y_[e];if(t)return t;t=y_[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),o+=6;continue}}if((l&248)===240&&o+91114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}s+="�"}return s})}Jy.defaultChars=";/?:@&=+$,#";Jy.componentChars="";var Jb=Jy;const k_={};function qbe(e){let t=k_[e];if(t)return t;t=k_[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const i=qbe(t);let s="";for(let o=0,r=e.length;o=55296&&l<=57343){if(l>=55296&&l<=56319&&o+1=56320&&a<=57343){s+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[o])}return s}Xy.defaultChars=";/?:@&=+$,-_.!~*'()#";Xy.componentChars="-_.!~*'()";var NB=Xy;function D6(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 xv(){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 Ube=/^([a-z0-9.+-]+:)/i,Kbe=/:[0-9]*$/,Vbe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Zbe=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` -`," "]),Gbe=["'"].concat(Zbe),b_=["%","/","?",";","#"].concat(Gbe),A_=["/","?","#"],Qbe=255,C_=/^[+a-z0-9A-Z_-]{0,63}$/,Ybe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w_={javascript:!0,"javascript:":!0},x_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Jbe(e,t){if(e&&e instanceof xv)return e;const n=new xv;return n.parse(e,t),n}xv.prototype.parse=function(e,t){let n,i,s,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=Vbe.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=Ube.exec(o);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,o=o.substr(r.length)),(t||r||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=o.substr(0,2)==="//",s&&!(r&&w_[r])&&(o=o.substr(2),this.slashes=!0)),!w_[r]&&(s||r&&!x_[r])){let u=-1;for(let g=0;g127?b+="x":b+=A[C];if(!b.match(C_)){const C=g.slice(0,m),v=g.slice(m+1),x=A.match(Ybe);x&&(C.push(x[1]),v.unshift(x[2])),v.length&&(o=v.join(".")+o),this.hostname=C.join(".");break}}}}this.hostname.length>Qbe&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=o.indexOf("#");l!==-1&&(this.hash=o.substr(l),o=o.slice(0,l));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),x_[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};xv.prototype.parseHost=function(e){let t=Kbe.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 $6=Jbe,FB=pbe({decode:()=>Jb,encode:()=>NB,format:()=>D6,parse:()=>$6}),Xbe=Object.defineProperty,DB=e=>{let t={};for(var n in e)Xbe(t,n,{get:e[n],enumerable:!0});return t},Qs=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,i=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}`}},e8e=DB({arrayReplaceAt:()=>l8e,assign:()=>o8e,countLines:()=>ps,escapeHtml:()=>m8e,escapeRE:()=>y8e,fromCodePoint:()=>u0,has:()=>s8e,isMdAsciiPunct:()=>Iv,isPunctChar:()=>_v,isPunctCode:()=>Xb,isSpace:()=>r8e,isString:()=>n8e,isValidEntityCode:()=>t9,isWhiteSpace:()=>a0,lib:()=>k8e,mdurl:()=>FB,normalizeReference:()=>e9,ucmicro:()=>Sv,unescapeAll:()=>c0,unescapeMd:()=>d8e});const Sv={Any:/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cc:/[\0-\x1F\x7F-\x9F]/,Cf:/[\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]/,P:/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,S:/[\$\+<->\^`\|~\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]/,Z:/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/};function t8e(e){return Object.prototype.toString.call(e)}function n8e(e){return t8e(e)==="[object String]"}const i8e=Object.prototype.hasOwnProperty;function s8e(e,t){return i8e.call(e,t)}function o8e(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(i=>{e[i]=n[i]})}}),e}function r8e(e){return e===9||e===32}function a0(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 _v(e){return Sv.P.test(e)||Sv.S.test(e)}const S_=new Map;function Xb(e){if(Iv(e))return!0;if(e>=0&&e<128)return!1;const t=S_.get(e);if(t!==void 0)return t;const n=_v(String.fromCharCode(e));return S_.set(e,n),n}function Iv(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 e9(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function l8e(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function t9(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 u0(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 $B=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,a8e=new RegExp(`${$B.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),u8e=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function c8e(e,t){if(t.charCodeAt(0)===35&&u8e.test(t)){const i=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return t9(i)?u0(i):e}const n=F6(e);return n!==e?n:e}function d8e(e){return e.includes("\\")?e.replace($B,"$1"):e}function c0(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(a8e,(t,n,i)=>n||c8e(t,i))}const f8e=/[&<>"]/,h8e=/[&<>"]/g,p8e={"&":"&","<":"<",">":">",'"':"""};function g8e(e){return p8e[e]}function m8e(e){return f8e.test(e)?e.replace(h8e,g8e):e}const v8e=/[.?*+^$[\]\\(){}|-]/g;function y8e(e){return e.replace(v8e,"\\$&")}const k8e={mdurl:FB,ucmicro:Sv};function ps(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` -`,n+1))!==-1;)t++;return t}const b8e=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,A8e=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,C8e=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,B6=["references","footnotes","abbreviations","abbr","abbrs"],z6=Symbol.for("markdown-it-ts.global-state"),R6=Object.prototype.hasOwnProperty;function __(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function Bl(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Yu(e){if(Array.isArray(e))return e.map(t=>Yu(t));if(Bl(e)){const t={};for(const n of Object.keys(e))t[n]=Yu(e[n]);return t}return e}function Mv(e){return Array.isArray(e)?e.map((t,n)=>String(n)):Bl(e)?Object.keys(e):[]}function e8(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;no.has(r)?!e8(s[r],BB(i.value,r)):!0)}}function ru(e){const t=O6(e);if(t){for(const n of B6){const i=t.snapshot[n];if(!i){delete e[n];continue}if(i.ownedKeys){x8e(e,n,i);continue}i.existed?e[n]=w8e(e[n],i.value):delete e[n]}delete e[z6]}}function h3(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 t8=Symbol.for("markdown-it-ts.diagnostics");function K0(e,t){if(e)try{const n=e[t8];if(n&&typeof n=="object")return n;if(!t)return;const i={};return e[t8]=i,i}catch{return}}function Pa(e){return K0(e,!1)}function _8e(e){if(e)try{const t=e[t8];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function er(e){_8e(e)}function _1(e,t){const n=K0(e,!0);n&&(n.stockFast=t)}function $s(e,t){const n=K0(e,!0);n&&(n.strategy=t)}function p3(e,t){const n=K0(e,!0);n&&(n.chunk=t)}function zB(e,t){const n=K0(e,!0);n&&(n.unbounded=t)}const I8e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,M8e=/[\0-\x1F\x7F-\x9F]/,E8e=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\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[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\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\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,T8e=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var L8e=class{src_Any=I8e.source;src_Cc=M8e.source;src_Z=T8e.source;src_P=E8e.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),s=this.escapeRE(t),o=`(?:(?!${this.src_ZCc}|${i}|${s}).)`;let r=`${i}${o}{0,1000}${s}`;for(let l=2;l<=n;l++)r=`${i}(?:${o}|${r}){0,1000}${s}`;return r}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},g3={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},N8e={"http:":g3,"https:":g3,"ftp:":g3,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const s=i.exec(e);return s?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:s[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},F8e="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|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",D8e="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function $8e(){const e=D8e.split("|");return F8e.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const s of t.slice(n+1))e.push(i+s)}),e}var B8e={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:$8e(),urlAuth:!1,maxLength:1e4},I_=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,i){const s=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=s,this.text=s,this.url=s}},RB=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:t,...n}=e;this.__opts__={...B8e,...n},this.__schemas__={...N8e},this.re=t||new L8e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,s)=>s.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const o=e.slice(Math.max(0,t.index-65),t.index);if(s.test(o))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,s,o,r,l,a,u=!1,c=!1,d=!1,f=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,o=this.re.get_mail_name_validator());;){const h=Math.max(f-1,0);if(s&&o&&!d&&(!l||l.index=f)break;s.lastIndex=f)break;i.lastIndexg.lastIndex))&&(g=r);let m;if(!u)for(;;){if(!a){n.lastIndexg.index)break;const b=a;a=void 0;const C=this.testSchemaAt(e,b.schema,b.lastIndex);if(C){m={schema:b.schema,index:b.index,lastIndex:b.lastIndex+C};break}}let y=m;if((!y||l&&(l.indexy.lastIndex))&&(y=l),(!y||r&&(r.indexy.lastIndex))&&(y=r),!y)break;y===l?l=void 0:y===r&&(r=void 0);const A=new I_(e,y.schema,y.index,y.lastIndex);A.schema?this.__schemas__[A.schema].normalize(A,this):this.normalize(A),t.push(A),f=y.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new I_(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}},z8e=TB({"../../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.js":((e,t)=>{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,y=Math.floor,A=String.fromCharCode;function b(P){throw new RangeError(g[P])}function C(P,R){const q=[];let j=P.length;for(;j--;)q[j]=R(P[j]);return q}function v(P,R){const q=P.split("@");let j="";q.length>1&&(j=q[0]+"@",P=q[1]),P=P.replace(h,".");const W=C(P.split("."),R).join(".");return j+W}function x(P){const R=[];let q=0;const j=P.length;for(;q=55296&&W<=56319&&qString.fromCodePoint(...P),_=function(P){return P>=48&&P<58?26+(P-48):P>=65&&P<91?P-65:P>=97&&P<123?P-97:36},I=function(P,R){return P+22+75*(P<26)-((R!=0)<<5)},M=function(P,R,q){let j=0;for(P=q?y(P/700):P>>1,P+=y(P/R);P>m*26>>1;j+=36)P=y(P/m);return y(j+(m+1)*P/(P+38))},$=function(P){const R=[],q=P.length;let j=0,W=128,z=72,H=P.lastIndexOf("-");H<0&&(H=0);for(let ee=0;ee=128&&b("not-basic"),R.push(P.charCodeAt(ee));for(let ee=H>0?H+1:0;ee=q&&b("invalid-input");const pe=_(P.charCodeAt(ee++));pe>=36&&b("invalid-input"),pe>y((2147483647-j)/se)&&b("overflow"),j+=pe*se;const re=Z<=z?1:Z>=z+26?26:Z-z;if(pey(2147483647/fe)&&b("overflow"),se*=fe}const ie=R.length+1;z=M(j-V,ie,V==0),y(j/ie)>2147483647-W&&b("overflow"),W+=y(j/ie),j%=ie,R.splice(j++,0,W)}return String.fromCodePoint(...R)},D=function(P){const R=[];P=x(P);const q=P.length;let j=128,W=0,z=72;for(const V of P)V<128&&R.push(A(V));const H=R.length;let ee=H;for(H&&R.push("-");ee=j&&sey((2147483647-W)/ie)&&b("overflow"),W+=(V-j)*ie,j=V;for(const se of P)if(se2147483647&&b("overflow"),se===j){let Z=W;for(let pe=36;;pe+=36){const re=pe<=z?1:pe>=z+26?26:pe-z;if(Z32))return o;if(i===41){if(r===0)break;r--}s++}return t===s||r!==0||(o.str=c0(e.slice(t,s)),o.pos=s,o.ok=!0),o}var PB=H6;const i2=-2;function R8e(e,t,n,i){let s=1,o=t+1;for(;o=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=R8e(l,t,a,n);if(f!==i2)return f;for(e.pos=t+1;e.pos=n)return r;let l=e.charCodeAt(o);if(l!==34&&l!==39&&l!==40)return r;t++,o++,l===40&&(l=41),r.marker=l}for(;o=0?e.attrs[n][1]:null}function j8e(e,t,n){const i=n9(e,t);i<0?U6(e,[t,n]):e.attrs[i][1]=`${e.attrs[i][1]} ${n}`}var H8e=DB({attrGet:()=>P8e,attrIndex:()=>n9,attrJoin:()=>j8e,attrPush:()=>U6,attrSet:()=>O8e,parseLinkDestination:()=>H6,parseLinkLabel:()=>W6,parseLinkTitle:()=>q6});function W8e(e){return e.includes("\r")||e.includes("\0")}function HB(e){return typeof e=="string"?e:e.toString()}function q8e(e){if(e.inlineMode){const t=new Qs("inline","",0);t.content=HB(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 U8e=/^([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])?)*)$/,K8e=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function V8e(e,t){let n=e.pos;const i=e.src;if(i.charCodeAt(n)!==60)return!1;const s=n,o=e.posMax;for(;;){if(++n>=o)return!1;const l=i.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=i.slice(s+1,n);if(K8e.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(U8e.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 WB=V8e;function Z8e(e,t){const n=e.src;let i=e.pos;if(n.charCodeAt(i)!==96)return!1;const s=i;i++;const o=e.posMax;for(;i2&&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 qB=Z8e;function M_(e){const t={},n=e.length;if(!n)return;let i=0,s=-2;const o=[];for(let r=0;ra;u-=o[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?o[u-1]+1:0;o[r]=r-u+h,o[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 G8e(e){const t=e.tokens_meta,n=e.tokens_meta.length;M_(e.delimiters);for(let i=0;i=0;s--){const o=t[s],r=o.marker;if(r!==95&&r!==42||o.end===-1)continue;const l=t[o.end],a=o.token,u=l.token,c=s>0&&t[s-1].end===o.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[o.end+1].token===u+1,d=r===42?UB:KB,f=i[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=i[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&&(i[t[s-1].token].content="",i[t[o.end+1].token].content="",s--)}}function J8e(e){const t=e.tokens_meta,n=e.tokens_meta.length;E_(e,e.delimiters);for(let i=0;i=48&&e<=57}function X8e(e){const t=e|32;return K6(e)||t>=97&&t<=102}function ZB(e){const t=e|32;return t>=97&&t<=122}function e5e(e){return ZB(e)||K6(e)}function t5e(e,t,n){let i=t+2;if(i>=n)return null;let s=!1,o=7,r=i;for((e.charCodeAt(i)|32)===120&&(s=!0,o=6,i++,r=i);i=n||e.charCodeAt(i)!==59?null:e.slice(t,i+1)}function n5e(e,t,n){let i=t+1;if(i>=n||!ZB(e.charCodeAt(i)))return null;for(i++;i=n||e.charCodeAt(i)!==59)return null;const s=e.slice(t,i+1);return VB(s)!==s?s:null}function i5e(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const s=t5e(e.src,n,i);if(s){if(!t){const o=(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=t9(o)?u0(o):u0(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=n5e(e.src,n,i);if(s){const o=VB(s);if(!t){const r=e.push("text_special","",0);r.content=o,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var GB=i5e;const QB=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),i8=new Array(128),YB=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);i8[e]=`\\${t}`,YB[e]=QB[e]?t:i8[e]}function T_(e,t,n){e.pending&&e.pushPending();const i=new Qs("text_special","",0);i.level=e.level,i.content=t,i.markup=n,i.info="escape",e.pendingLevel=e.level,e.tokens.push(i),e.tokens_meta.push(null)}function s5e(e,t){let n=e.pos;const i=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=i))return!1;let o=s.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(o>=55296&&o<=56319&&n+1=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return T_(e,o<256&&QB[o]?r:l,l),e.pos=n+1,!0}var JB=s5e;function o5e(e){let t,n,i=0;const s=e.tokens,o=e.tokens.length;for(t=n=0;t0&&i++,r.type==="text"&&t+1\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,ez="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",l5e=new RegExp(`^(?:${XB}|${ez}||<\\?[\\s\\S]*?\\?>|]*>|)`),a5e=new RegExp(`^(?:${XB}|${ez})`);function tz(e){return e===32||e===9||e===10||e===12||e===13}function u5e(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||tz(t)}function c5e(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 f5e(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos,s=e.src;if(s.charCodeAt(i)!==60||i+2>=n)return!1;const o=s.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!d5e(o))return!1;const r=s.slice(i).match(l5e);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,u5e(l)&&e.linkLevel++,c5e(l)&&e.linkLevel--}return e.pos+=l.length,!0}var nz=f5e;function h5e(e,t){let n,i,s,o,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=Ev(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o=f)return!1;if(l=PB(e.src,o,e.posMax),l.ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?o=l.pos:c="",u=o;o=f||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?s=e.src.slice(u,o++):o=g+1):o=g+1,s||(s=e.src.slice(h,g)),r=e.env.references[e9(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){i=e.src.slice(h,g);const m=[];e.md.inline.parse(i,e.md,e.env,m);const y=e.push("image","img",0);y.attrs=[["src",c],["alt",""]],y.children=m,y.content=i,a&&y.attrs.push(["title",a])}return e.pos=o,e.posMax=f,!0}var iz=h5e;function m3(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(o,r)),l=g+1):d=n.slice(o,r)}else d=n.slice(o,r);const f=e.env.references[e9(d)];if(!f)return e.pos=i,!1;a=f.href,u=f.title}if(!t){e.pos=o,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 sz=p5e;function oz(e){const t=e|32;return t>=97&&t<=122}function g5e(e){return e>=48&&e<=57}function m5e(e){return oz(e)||g5e(e)||e===43||e===45||e===46}function v5e(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&m5e(e.charCodeAt(t));)t--;return t++,t>=e.length||!oz(e.charCodeAt(t))?null:e.slice(t)}function y5e(e,t,n){let i=t;for(;i0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=v5e(e.pending);if(!s)return!1;const o=y5e(e.src,n-s.length,i),r=e.md.linkify.matchAtStart(o);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 k5e(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,s=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),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||N_(n.charCodeAt(i)))return!1;let o=i+1;for(;oi-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function x5e(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 uz(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,i={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:V6(),records:Object.create(null)};return t.__mdtsRuleProfile=i,i}function vh(e,t,n,i,s,o){const r=uz(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=x5e(t,n));a.calls++,a.inclusiveMs+=i,i>a.maxMs&&(a.maxMs=i),a.samples.push(i),o?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=V6()}function S5e(e){const t=uz(e);if(!t)return null;const n=Object.keys(t.records);for(let i=0;is.name===e);i>=0&&this.rules.splice(i,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const i=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(i<0)return;const s=this.rules[i];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(i<0)throw new Error(`Parser rule not found: ${e}`);this.rules[i].fn=t,n?.alt!==void 0&&(this.rules[i].alt=n.alt),this.invalidateCache()}before(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.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 i of this.rules)if(i.enabled&&i.alt)for(const s of i.alt)e.add(s);const t=new Map,n=new Map;for(const i of e){const s=[],o=[];for(const r of this.rules)r.enabled&&(i!==""&&!r.alt?.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t.set(i,s),n.set(i,o)}this.cache=t,this.namedCache=n}},cz=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,i){this.src=e,this.md=t,this.env=n,this.tokens=i,this.tokens_meta=new Array(i.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 Qs("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 Qs(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 i=new Qs(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.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(i),this.tokens_meta.push(s),i}scanDelims(e,t){const{src:n,posMax:i}=this,s=n.charCodeAt(e);let o=e;for(;o0?n.charCodeAt(e-1):32,a=o@[\]\\^_`{}~]/;function D_(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return lz(e,t);case 33:return iz(e,t);case 38:return GB(e,t);case 42:case 95:return n8.tokenize(e,t);case 58:return e.md.options.linkify&&rz(e,t);case 60:return WB(e,t)||nz(e,t);case 91:return sz(e,t);case 92:return JB(e,t);case 96:return qB(e,t);case 126:return s8.tokenize(e,t);default:return az(e,t)}}function dz(e){return!_5e.test(e)}var I5e=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new F_,this.ruler2=new F_,this.ruler.push("text",az),this.ruler.push("linkify",rz),this.ruler.push("newline",lz),this.ruler.push("escape",JB),this.ruler.push("backticks",qB),this.ruler.push("strikethrough",s8.tokenize),this.ruler.push("emphasis",n8.tokenize),this.ruler.push("link",sz),this.ruler.push("image",iz),this.ruler.push("autolink",WB),this.ruler.push("html_inline",nz),this.ruler.push("entity",GB),this.ruler2.push("balance_pairs",Q8e),this.ruler2.push("strikethrough",s8.postProcess),this.ruler2.push("emphasis",n8.postProcess),this.ruler2.push("fragments_join",r5e),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),i=n.length,s=e.cache,o=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(o!==void 0){e.pos=o;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=D_(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,i=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const o=this.isDefaultRuleset();for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=i)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>=i)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,i){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&dz(e)){const a=new Qs("text","",0);a.content=e,i.push(a);return}const s=new cz(e,t,n,i);this.tokenize(s);const o=this.getRules2(),r=o.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a0&&dz(o.content)){const r=new Qs("text","",0);r.content=o.content,o.children.push(r);continue}e.md.inline.parse(o.content,e.md,e.env,o.children)}}}const E5e=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,T5e=/[0-9a-z]/i;function L5e(e){return/^\s]/i.test(e)}function N5e(e){return/^<\/a\s*>/i.test(e)}function F5e(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"&&(L5e(l.content)&&o>0&&o--,N5e(l.content)&&o++),o>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let u=(e.md.linkify.match(a)||[]).map(h=>F5e(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 Qs("text","",0);x.content=a.slice(f,A),x.level=d,c.push(x)}const b=new Qs("link_open","a",1);b.attrs=[["href",m]],b.level=d++,b.markup="linkify",b.info="auto",c.push(b);const C=new Qs("text","",0);C.content=y,C.level=d,c.push(C);const v=new Qs("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=g.lastIndex}if(f!==0){if(f=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(O5e,j5e)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function W5e(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&fz.test(i.content)&&(i.content=i.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–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function q5e(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 i=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");R5e.test(i)&&H5e(n.children||[]),fz.test(i)&&W5e(n.children||[])}}var U5e=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(i=>i.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(i=>i.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 i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.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 K5e=/['"]/,$_=/['"]/g,B_="’";function gm(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function V5e(e,t){let n;const i=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let o=0;o=0&&!(i[n].level<=l);n--);if(i.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=o-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 y=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=A,h=b),!f&&!h){g&&(r.content=gm(r.content,d.index,B_));continue}if(h)for(n=i.length-1;n>=0;n--){let x=i[n];if(i[n].level=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const i=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!K5e.test(i)||!n.children||V5e(n.children,e)}}function G5e(e){const t=e.tokens||[],n=t.length;for(let i=0;i=4||s.charCodeAt(c)!==62)return!1;if(i)return!0;const h=[],g=[],m=[],y=[],A=e.md.block.ruler.getRulesForState(e,"blockquote"),b=e.parentType;e.parentType="blockquote";let C=!1,v;for(v=t;v=d)break;if(s.charCodeAt(c++)===62&&!M){let D=a[v]+1,T,N;s.charCodeAt(c)===32?(c++,D++,N=!1,T=!0):s.charCodeAt(c)===9?(T=!0,(u[v]+D)%4===3?(c++,D++,N=!1):N=!0):T=!1;let O=D;for(h.push(o[v]),o[v]=c;c=d,g.push(u[v]),u[v]=a[v]+1+(T?1:0),m.push(a[v]),a[v]=O-D,y.push(l[v]),l[v]=c-o[v];continue}if(C)break;let $=!1;for(let D=0,T=A.length;D";const _=[t,0];S.map=_,e.md.block.tokenize(e,t,v);const I=e.push("blockquote_close","blockquote",-1);I.markup=">",e.lineMax=f,e.parentType=b,_[1]=e.line;for(let M=0;M=4){i++,s=i;continue}break}e.line=s;const o=e.push("code_block","code",0);return o.content=`${e.getLines(t,s,4+e.blkIndent,!1)} -`,o.map=[t,e.line],!0}function t6e(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>o)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,o);if(r===96&&c.includes(String.fromCharCode(r)))return!1;if(i)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],o=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&&O_(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const h=e.push("heading_open",z_[d],1);h.markup=R_[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",z_[d],-1);return m.markup=R_[d],!0}function i6e(e){switch(e){case 9:case 32:return!0}return!1}function s6e(e,t,n,i){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(o++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;o|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp(`^|$))`,"i"),/^$/,!0],[new RegExp(`${a5e.source}\\s*$`),/^$/,!1]];function o6e(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=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,o),l=0;for(;l=48&&e<=57}var vz=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,i){this.src=e,this.md=t,this.env=n,this.tokens=i;const s=this.src;let o=0,r=0,l=0,a=!1,u=0;for(let c=0,d=s.length;c0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,i=this.eMarks;for(let s=this.lineMax;et;){const i=n.charCodeAt(--e);if(i!==9&&i!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let i=n.length;en;)if(t!==i.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";if(e+1===t){const c=e,d=this.bMarks[c];let f=d;const h=i?this.eMarks[c]+1:this.eMarks[c];let g=0;const m=this.src,y=this.bsCount,A=this.tShift;for(;fn?new Array(g-n+1).join(" ")+m.slice(f,h):m.slice(f,h)}const s=new Array(t-e),o=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(" ")+o.slice(g,m):s[c]=o.slice(g,m)}return s.join("")}};vz.prototype.Token=Qs;function l6e(e,t,n){for(let i=t;i=s)return!1;const o=n.charCodeAt(i);switch(o){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return o>=48&&o<=57?!0:l6e(n,i,s)}const j_=["","h1","h2"];function a6e(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,u=e.blkIndent,c=yz(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(v),h===45||h===61)){let _=v+1,I=_;for(;_=x){f=h===61?1:2;break}if(I-v>1)continue}if(a[g]<0||c&&!kz(e,g,s,v,x))continue;let S=!1;for(let _=0,I=i.length;_v;){const S=s.charCodeAt(x-1);if(S!==9&&S!==32)break;x--}m=s.slice(v,x)}else m=e.getLines(t,g,u,!1).trim();e.line=g+1;const y=h===61?"=":"-",A=e.push("heading_open",j_[f],1);A.markup=y,A.map=[t,e.line];const b=e.push("inline","",0);b.content=m,b.map=[t,e.line-1],b.children=[];const C=e.push("heading_close",j_[f],-1);return C.markup=y,e.parentType=d,!0}function bz(e){switch(e){case 9:case 32:return!0}return!1}function H_(e,t){const n=e.eMarks,i=e.bMarks,s=e.tShift,o=e.src,r=n[t];let l=i[t]+s[t];const a=o.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l=l)return-1;let u=o.charCodeAt(a++);if(u<48||u>57)return-1;for(;;){if(a>=l)return-1;if(u=o.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,y=e.eMarks,A=e.sCount,b=e.bsCount,C=g[l]+m[l];if(C>=y[l])return!1;const v=h.charCodeAt(C);if(v>=48&&v<=57){if(f=W_(e,l),f<0||(c=!0,r=C,d=u6e(e,l,f),u&&d!==1))return!1}else if(v===42||v===45||v===43){if(f=H_(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=y[l])return!1;if(i)return!0;const x=h.charCodeAt(f-1),S=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=S;let I=!1;const M=e.tokens.length-1,$=e.md.block.ruler.getRulesForState(e,"list"),D=e.parentType;for(e.parentType="list";l=s?P=1:P=N-T,P>4&&(P=1);const R=T+P,q=e.push("list_item_open","li",1);q.markup=S;const j=[l,0];q.map=j,c&&(q.info=f-r-1===1?c6e[h.charCodeAt(r)-48]:h.slice(r,f-1));const W=e.tight,z=e.tShift[l],H=e.sCount[l],ee=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=O-g[l],e.sCount[l]=N,O>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||I)&&(a=!1),I=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ee,e.tShift[l]=z,e.sCount[l]=H,e.tight=W,e.push("list_item_close","li",-1).markup=S,l=e.line,j[1]=l,l>=n||e.sCount[l]=4)break;let V=!1;for(let ie=0,se=$.length;ie3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const C=r[f]+l[f],v=a[f];if(C=v||q_(o.charCodeAt(C+1)))break}else if(x>=48&&x<=57&&C+1=v){S=-1;break}const _=o.charCodeAt(S++);if(_>=48&&_<=57){if(S-C>=10){S=-1;break}continue}if((_===41||_===46)&&(S>=v||q_(o.charCodeAt(S))))break;S=-1;break}if(S>=0)break}}}const y=r[f]+l[f],A=a[f];if(d&&!kz(e,f,o,y,A))continue;let b=!1;for(let C=0,v=i.length;C=4||e.src.charCodeAt(s)!==91)return!1;function a(C){const v=e.lineMax;if(C>=v||e.isEmpty(C))return null;let x=!1;if(e.sCount[C]-e.blkIndent>3&&(x=!0),e.sCount[C]<0&&(x=!0),!x){const I=e.parentType;e.parentType="reference";let M=!1;for(let $=0,D=l.length;$"u"&&(e.env.references={}),typeof e.env.references[b]>"u"&&(e.env.references[b]={title:A,href:f}),e.line=r),!0):!1}function v3(e){switch(e){case 9:case 32:return!0}return!1}const g6e=65536;function y3(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function m6e(e,t){if(e.lineFlags)return(e.lineFlags[t]&yp.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];nn)return!1;let s=t+1;if(e.sCount[s]=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;const r=e.src.charCodeAt(o++);if(r!==124&&r!==45&&r!==58||o>=e.eMarks[s])return!1;const l=e.src.charCodeAt(o++);if(l!==124&&l!==45&&l!==58&&!v3(l)||r===45&&v3(l)||!m6e(e,t))return!1;for(;o=4)return!1;u=U_(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(i)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 y=e.push("thead_open","thead",1);y.map=[t,t+1];const A=e.push("tr_open","tr",1);A.map=[t,t+1];for(let v=0;v=4||(u=U_(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),C+=d-u.length,C>g6e))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 o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:i?.alt||[]}),this.invalidateCache()}after(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:i?.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:i,fn:s})=>(o,r,l,a)=>{const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),c=s(o,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return vh(o?.env,"block",i,d-u,c,!!a),c}):this.getRules(t)}at(e,t,n){const i=this._rules.findIndex(s=>s.name===e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[i].fn=t,n?.alt&&(this._rules[i].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this._rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const i of this._rules)if(i.enabled)for(const s of i.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const i of e){const s=[],o=[];for(const r of this._rules)r.enabled&&(i!==""&&!r.alt.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t[i]=s,n[i]=o}this.cache=t,this.namedCache=n}};const vm=[["table",v6e,["paragraph","reference"]],["code",e6e],["fence",t6e,["paragraph","reference","blockquote","list"]],["blockquote",X5e,["paragraph","reference","blockquote","list"]],["hr",s6e,["paragraph","reference","blockquote","list"]],["list",f6e,["paragraph","reference","blockquote"]],["reference",p6e],["html_block",o6e,["paragraph","reference","blockquote"]],["heading",n6e,["paragraph","reference","blockquote"]],["lheading",a6e],["paragraph",h6e]];var k6e=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new y6e;for(let e=0;e=a[c];)c++;if(e.line=c,c>=n||u[c]=o){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]=o){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,i){if(!e||e.length===0)return;const s=new vz(e,t,n,i);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}},Az=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}};Az.prototype.Token=Qs;const K_=[["normalize",z5e],["block",q8e],["inline",M5e],["linkify",D5e],["replacements",q5e],["smartquotes",Z5e],["text_join",G5e]],b6e={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},A6e={parseLinkLabel:W6,parseLinkDestination:H6,parseLinkTitle:q6};function C6e(){return{...b6e}}function w6e(){return{...A6e}}var x6e=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new k6e,this.inline=new I5e,this.ruler=new U5e;for(let e=0;e@[\]\\^_`{}~]/;function Tv(e){return!S6e.test(e)}function X1(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function s2(e,t,n){for(let i=t;i3)return Tv(e);for(let t=0;t=i||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(!Tv(c))return!1;const d=I6e[o],f=M6e[o],h=pl("heading_open",d,1,0);h.map=[s,s+1],h.markup=f,e.push(h),e.push(Z6(c,s,1));const g=pl("heading_close",d,-1,0);return g.markup=f,e.push(g),!0}function T6e(e,t,n){const i=pl("paragraph_open","p",1,0);i.map=[n,n+1],e.push(i),e.push(Z6(t,n,1)),e.push(pl("paragraph_close","p",-1,0))}function L6e(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function C3(e,t){for(;t=1e5?Z_:A3,s="",o=!1,r=!1,l=0,a=0;for(;l"]/,G_=/[&<>"]/g,R6e=/&/g,O6e=/[<>"]/g,P6e={"&":"&","<":"<",">":">",'"':"""};function w3(e){return P6e[e]||e}function ki(e){if(e.length===0)return"";if(e.length<32)return z6e.test(e)?e.replace(G_,w3):e;const t=e.includes("&"),n=e.includes("<"),i=e.includes(">"),s=e.includes('"');return!t&&!n&&!i&&!s?e:t&&!n&&!i&&!s?e.replace(R6e,"&"):t?e.replace(G_,w3):e.replace(O6e,w3)}const j6e=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),H6e=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function Cz(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(j6e,(t,n,i)=>{if(n)return n;if(H6e.test(i)){const o=i[1].toLowerCase()==="x"?Number.parseInt(i.slice(2),16):Number.parseInt(i.slice(1),10);return t9(o)?u0(o):"�"}const s=F6(t);return s!==t?s:t})}const W6e=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,q6e=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,U6e=/"/g;function Jf(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Lv(e,t,n){for(let i=t;i=e.length||e.charCodeAt(t)===10?!1:!Lv(e,t,Jf(e,t))}function Q_(e,t,n){return t+2=n||e.charCodeAt(s)!==32)return null;let o=s+1;for(;oo&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>o&&e.charCodeAt(l-1)===35;)l--;if(l>o&&e.charCodeAt(l-1)===32)for(r=l-1;r>o&&e.charCodeAt(r-1)===32;)r--;const a=G6(e.slice(o,r));return a===null?null:`${a} -`}function Y_(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 Q6e(e,t,n){const i=t+2;if(n===i+1)return G6e(e,i);const s=G6(e.slice(t+2,n));return s===null?null:`
    5. ${s}
    6. -`}function Y6e(e,t,n){for(;tt;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let i=n;for(let s=t;s`:"
      ",i.lang=o,i.open=d),{html:`${d}${ki(c)}
      -`,nextPos:u=25e4,o=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n -`;v -`,l=A,a=b}let C=ym(e,y);for(;C${y}

      -`,u=h,c=g}const m=de.core.parse(t,n,e).tokens);let r=o2(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=i7e(r,s.maxChunks)),r2(t,r))return p3(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),mh(n,o,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return p3(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:o||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!o}),mh(n,o,()=>{for(let u=0;u=3&&(c?c.marker===C&&x>=c.length&&(c=null):c={marker:C,length:x})}}const y=g-f;s+=y,o+=1,l+=1,m?(a=0,u=0):(a+=1,u+=y);const A=m;if((s>=t.maxChunkChars||o>=t.maxChunkLines)&&!c)if(A)d(g);else{const b=Math.max(10,Math.floor(t.maxChunkLines*.5)),C=Math.max(t.maxChunkChars,8e3);(a>=b||u>=C)&&d(g)}f=g}return n&&d(e.length),i}function r2(e,t,n={rangesCoverWholeSource:!0}){const i=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 i=n+1;i=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function n7e(e,t){for(let n=0;n=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function wu(e){return e.length===0?0:ps(e)+(e.charCodeAt(e.length-1)===10?0:1)}function c7e(e,t,n){for(let i=t;i=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}i=s===e.length?e.length:s+1}return n!==null}function f7e(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 c7e(e,n+1,e.length-1)?!d7e(e,t):!1}function h7e(e,t,n,i={}){const s=i.mode??"full",o=i.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(i.maxChunkChars!==void 0||i.maxChunkLines!==void 0||i.autoTune===!1){const r=i.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??l7e:e.options.fullChunkSizeChars??o7e),l=i.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??a7e:e.options.fullChunkSizeLines??r7e);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:o}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:o}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:o}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}}var V0=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=wu(this.pending);if(this.pending.length=i||n>=s}function Mz(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??xz))return"yes";const i=e.options.autoUnboundedThresholdLines??Sz;return n!==void 0?n>=i?"yes":"no":t+1e.core.parse(t,n,e).tokens);const o=[],r=new V0(e,{mode:"full",...i,retainTokens:!1,onChunkTokens(l){_z(o,l)}});if(s&&P6(n,s),r.feed(t),r.flushForce(n),s&&(j6(n),i.fallbackOnGlobalState===!1)){const l=Pa(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return o}const yh=(e,t,n)=>en?n:e;function Ez(e){return e.experimental?{...e,...e.experimental}:e}const eI=[{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"}],tI=[{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 Tz(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function y7e(e,t=Math.max(0,e/40|0),n={}){const i=Ez(n),s=i.fullChunkFenceAware??!0,o=i.fullChunkTargetChunks??8,r=i.fullChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:yh(Math.ceil(e/o),8e3,64e3),maxChunkLines:yh(Math.ceil(t/o),150,700),maxChunks:yh(Math.ceil(e/64e3),o,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.fullChunkSizeChars??1e4,maxChunkLines:i.fullChunkSizeLines??200,fenceAware:s,maxChunks:i.fullChunkMaxChunks}}function nI(e,t=Math.max(0,e/40|0),n={}){const i=Ez(n),s=i.streamChunkFenceAware??!0,o=i.streamChunkTargetChunks??8,r=i.streamChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:yh(Math.ceil(e/o),8e3,64e3),maxChunkLines:yh(Math.ceil(t/o),150,700),maxChunks:yh(Math.ceil(e/64e3),o,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.streamChunkSizeChars??1e4,maxChunkLines:i.streamChunkSizeLines??200,maxChunks:i.streamChunkMaxChunks,fenceAware:s}}var k7e={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"]}}},b7e={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},A7e={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 i9(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function l2(e,t){if(i9(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const iI=e=>i9(e)?e:Promise.resolve(e);function bp(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 ki(e)}}function cc(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${bp(t[0])}="${ki(t[1])}"`;for(let i=1;i=e.length)return{langName:e,langAttrs:""};let n=t;for(;n${t} -`;const o=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${i}`;return o<0?r.push(["class",l]):(r[o]=r[o].slice(),r[o][1]+=` ${l}`),`
      ${t}
      -`}return`
      ${t}
      -`}function d0(e){return!e.attrs||e.attrs.length===0?`${ki(e.content)}`:`${ki(e.content)}`}function o8(e){const t=ki(e.content);return e.attrs?`${t} -`:`
      ${t}
      -`}function C7e(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 sI(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function w7e(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 oI(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 Fv(e,t){if(e.hidden)return"";const n=e.attrs,i=e.nesting,s=e.tag;if(!n||n.length===0)return i===0?t?`<${s} />`:`<${s}>`:i===-1?``:`<${s}>`;let o=(i===-1?"`}const x7e={langPrefix:"language-",xhtmlOut:!1,breaks:!1},km=Object.prototype.hasOwnProperty,Yn={code_inline(e,t){return d0(e[t])},code_block(e,t){return o8(e[t])},fence(e,t,n,i,s){const o=e[t],r=o.info?Cz(o.info).trim():"",{langName:l,langAttrs:a}=Lz(r),u=n.highlight,c=ki(o.content);if(!u)return Ap(o,c,r,l,n);const d=u(o.content,l,a);return i9(d)?d.then(f=>Ap(o,f||c,r,l,n)):Ap(o,d||c,r,l,n)},image(e,t,n,i,s){const o=e[t],r=s.renderInlineAsText(o.children||[],n,i),l=o.attrIndex("alt");return l>=0&&o.attrs?o.attrs[l][1]=r:o.attrs?o.attrs.push(["alt",r]):o.attrs=[["alt",r]],Fv(o,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
      -`:`
      -`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
      -`:`
      -`:` -`},text(e,t){return ki(e[t].content)},text_special(e,t){return ki(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function rI(e,t,n){const i=e.info?Cz(e.info).trim():"",{langName:s,langAttrs:o}=Lz(i),r=t.highlight,l=ki(e.content);if(!r)return Ap(e,l,i,s,t);const a=r(e.content,s,o);if(i9(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return Ap(e,a||l,i,s,t)}function x3(e,t,n,i){switch(e.type){case"text":return t.text===Yn.text?e.content.length===0?"":ki(e.content):null;case"text_special":return t.text_special===Yn.text_special?e.content.length===0?"":ki(e.content):null;case"softbreak":return t.softbreak===Yn.softbreak?i:null;case"hardbreak":return t.hardbreak===Yn.hardbreak?n:null;case"html_inline":return t.html_inline===Yn.html_inline?e.content:null;case"code_inline":return t.code_inline===Yn.code_inline?d0(e):null;default:return null}}function S7e(e,t,n,i,s){const o=e[0];switch(o.type){case"text":if(s.text===Yn.text)return o.content.length===0?"":ki(o.content);break;case"text_special":if(s.text_special===Yn.text_special)return o.content.length===0?"":ki(o.content);break;case"softbreak":if(s.softbreak===Yn.softbreak)return t.breaks?t.xhtmlOut?`
      -`:`
      -`:` -`;break;case"hardbreak":if(s.hardbreak===Yn.hardbreak)return t.xhtmlOut?`
      -`:`
      -`;break;case"html_inline":if(s.html_inline===Yn.html_inline)return o.content;break;case"code_inline":if(s.code_inline===Yn.code_inline)return d0(o);break}const r=s[o.type];if(!r)return Fv(o,t.xhtmlOut===!0);const l=r(e,0,t,n,i);return typeof l=="string"?l:l2(l,o.type)}var _7e=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...Yn}}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 i=this.mergeOptions(t),s=n??{},o=this.rules,r=i.xhtmlOut===!0;let l,a,u,c,d,f,h="",g="",m=!1,y="";for(let A=0;A0&&e[A-1].hidden?` -`:"";if(C==="list_item_open"&&(!b.attrs||b.attrs.length===0)&&A+3${this.renderInlineTokens(I.children||[],i,s)}`,A+=3;continue}}if(A+2 -`,A+=2;continue}}}if(C==="inline"){const _=b.children||[];if(_.length===1){m||(l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,h=i.xhtmlOut?`
      -`:`
      -`,g=i.breaks?h:` -`,m=!0);const I=_[0];switch(I.type){case"text":if(l===Yn.text){y+=ki(I.content);continue}break;case"text_special":if(a===Yn.text_special){y+=ki(I.content);continue}break;case"softbreak":if(u===Yn.softbreak){y+=g;continue}break;case"hardbreak":if(c===Yn.hardbreak){y+=h;continue}break;case"html_inline":if(d===Yn.html_inline){y+=I.content;continue}break;case"code_inline":if(f===Yn.code_inline){y+=d0(I);continue}break}}y+=this.renderInlineTokens(_,i,s);continue}const x=o[C];if(!x){const _=b.attrs;if(!b.hidden){if(!_||_.length===0)switch(C){case"hr":y+=r?`


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

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

      -`;continue;case"list_item_open":{const I=e[A+1];y+=v+(I&&(I.type==="inline"||I.hidden||I.nesting===-1&&I.tag==="li")?"
    7. ":`
    8. -`);continue}case"list_item_close":y+=`
    9. -`;continue;case"bullet_list_open":y+=`${v}
        -`;continue;case"bullet_list_close":y+=`
      -`;continue;case"blockquote_open":y+=v+(e[A+1]&&e[A+1].nesting===-1&&e[A+1].tag==="blockquote"?"
      ":`
      -`);continue;case"blockquote_close":y+=`
      -`;continue;case"ordered_list_open":y+=`${v}
        -`;continue;case"ordered_list_close":y+=`
      -`;continue;case"table_open":y+=`${v} -`;continue;case"table_close":y+=`
      -`;continue;case"thead_open":y+=`${v} -`;continue;case"thead_close":y+=` -`;continue;case"tbody_open":y+=`${v} -`;continue;case"tbody_close":y+=` -`;continue;case"tr_open":y+=`${v} -`;continue;case"tr_close":y+=` -`;continue;case"td_open":y+=`${v}`;continue;case"td_close":y+=` -`;continue;case"th_open":y+=`${v}`;continue;case"th_close":y+=` -`;continue}else if(_.length===1){const I=_[0];if(C==="ordered_list_open"&&I[0]==="start"){y+=`${v}
        -`;continue}if(C==="td_open"&&I[0]==="style"){y+=`${v}`;continue}if(C==="th_open"&&I[0]==="style"){y+=`${v}`;continue}}}y+=this.renderToken(e,A,i);continue}if(C==="code_block"&&x===Yn.code_block){y+=o8(b);continue}if(C==="fence"&&x===Yn.fence){y+=rI(b,i);continue}if(C==="html_block"&&x===Yn.html_block){y+=b.content;continue}const S=x(e,A,i,s,this);typeof S=="string"?y+=S:y+=l2(S,b.type)}return y}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const i=this.mergeOptions(t),s=n??{},o=this.rules;let r="";for(let l=0;l0&&e[t-1].hidden?` -`:"",c=a?`> -`:">";if(!l||l.length===0)return o===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:o===-1?`${u}(n||(n={...t}),n);if(km.call(e,"highlight")&&e.highlight!==t.highlight&&(i().highlight=e.highlight),km.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(i().langPrefix=s)}if(km.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(i().xhtmlOut=s)}if(km.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(i().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...x7e,...this.baseOptions})}renderSingleToken(e,t,n,i){const s=this.rules,o=t.type;if(o==="code_block"&&s.code_block===Yn.code_block)return o8(t);if(o==="html_block"&&s.html_block===Yn.html_block)return t.content;const r=this.mergeOptions(n),l=i??{};if(o==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[o];if(!a)return t.block?this.renderToken(e,0,r):Fv(t,r.xhtmlOut===!0);if(o==="fence"&&a===Yn.fence)return rI(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:l2(u,o)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const i=this.rules;if(e.length===1)return S7e(e,t,n,this,i);const s=t.xhtmlOut===!0,o=s?`
        -`:`
        -`,r=t.breaks?o:` -`,l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,h=i.link_open,g=i.link_close,m=i.em_open,y=i.em_close,A=i.strong_open,b=i.strong_close;let C="";for(let v=0;v`;if(u===Yn.softbreak&&v+3`,v+=1;continue}if(x.type==="em_open"&&!m&&!y&&v+2${M}`,v+=2;continue}}}if(x.type==="strong_open"&&!A&&!b&&v+2${M}`,v+=2;continue}}}switch(x.type){case"text":if(l===Yn.text){const I=x.content.length===0?"":ki(x.content);if(d===Yn.html_inline&&v+1=4)return!0;continue}if(l===9){if(r+=4-r%4,o++,r>=4)return!0;continue}break}if(o0&&u<=6){if(a=3)return!0;break}default:if(l>=48&&l<=57){let a=o+1;for(;a57)break;a++}if(a=re,!X&&fe!==void 0&&(Ee=ps(e),X=Ee>=fe)),X){const Y=this.parseFullDocument(e,N,n,Ee,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(N,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!Pa(N)?.unbounded}),Y.tokens}else if(j){const Y=(ge,Ae,_e)=>ge_e?_e:ge;Ee===void 0&&(Ee=ps(e));const le=se&&!ie?nI(e.length,Ee,n.options):null,Ce=le?.maxChunkChars??(W?Y(Math.ceil(e.length/z),8e3,64e3):H??1e4),ae=le?.maxChunkLines??(W?Y(Math.ceil(Ee/z),150,700):ee??200),oe=le?.maxChunks??(W?Y(Math.ceil(e.length/64e3),z,32):V),Q=e.length>0&&e.charCodeAt(e.length-1)===10,ne=q&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&le?.strategy!=="plain";if((R||ne)&&(e.length>=Ce*2||Ee>=ae*2)&&Q){const ge=Nv(n,e,N,{maxChunkChars:Ce,maxChunkLines:ae,fenceAware:le?.fenceAware??Z,maxChunks:oe});return this.cache={src:e,tokens:ge,env:N,lineCount:Ee,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,Ee),this.recordChunkedParseResult(N,R?"explicit-initial-large-doc":"default-initial-large-doc"),ge}}const we=this.parseFullDocument(e,N,n,Ee);return Ee=we.lineCount,this.cache={src:e,tokens:we.tokens,env:N,lineCount:Ee,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,Ee),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(N,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!Pa(N)?.unbounded}),we.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",$s(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const o=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=yr(s.src),s.globalStateReason=r);const l=r?null:o!==null?this.detectGlobalStateForAppend(s,o):yr(e),a=r||l;if(a){const N=i??s.env;ru(N);const O=yr(e),P=this.parseFullDocument(e,N,n),R=P.tokens,q=P.lineCount;return this.cache={src:e,tokens:R,env:N,lineCount:q,lastSegment:void 0,globalStateReason:O},this.updateCacheLineCount(this.cache,q),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(N,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!Pa(N)?.unbounded}),R}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?O=8:c.length>1e3?O=6:c.length>200&&(O=4),O=Math.min(O,N);let P=null;const R=n.options?.streamContextParseStrategy??"chars",q=n.options?.streamContextParseMinChars??200,j=n.options?.streamContextParseMinLines??2;let W;const z=()=>(W===void 0&&(W=ps(c)),W),H=this.canDirectlyParseAppend(s),ee=H&&this.shouldUseUnboundedAppend(e,s,c);let V=!1;if(!H)switch(R){case"lines":V=z()>=j;break;case"constructs":if(c.length>=q){V=!0;break}if(E7e(c)){V=!0;break}V=z()>=j;break;case"chars":default:V=c.length>=q}if(O>0&&V){const Z=this.getTailLines(s.src,O)+c;try{const pe=this.core.parse(Z,s.env,n).tokens,re=pe.findIndex(fe=>fe.map&&typeof fe.map[1]=="number"&&fe.map[1]>O);if(re!==-1){const fe=pe.slice(re),Ee=N-O;Ee!==0&&this.shiftTokenLines(fe,Ee),P={tokens:fe}}}catch{P=null}}else P=null;if(!P){const Z=N;if(ee)P={tokens:kp(n,c,s.env,{mode:"stream"})},Z>0&&this.shiftTokenLines(P.tokens,Z);else{const pe=this.core.parse(c,s.env,n);Z>0&&this.shiftTokenLines(pe.tokens,Z),P=pe}}let ie=0;if(s.tokens.length>0&&P.tokens.length>0){const Z=s.tokens[s.tokens.length-1],pe=P.tokens[0];try{Z.type==="inline"&&pe.type==="inline"&&(pe.children&&pe.children.length>0&&(Z.children||(Z.children=[]),this.appendTokens(Z.children,pe.children)),Z.content=(Z.content||"")+(pe.content||""),ie=1)}catch{ie=0}}const se=s.tokens.length;if(P.tokens.length>ie){const Z=s.tokens,pe=P.tokens,re=Math.min(Z.length,pe.length-ie);let fe=0;for(let Ee=re;Ee>0;Ee--){let X=!0;for(let we=0;we0&&(ie+=fe),pe.length>ie&&this.appendTokens(s.tokens,pe,ie)}if(s.src=e,s.globalStateReason=null,s.lineCount=N+(W??z()),s.tokens.length>se){const Z=this.getLastSegment(s.tokens,e,se,s.tokens.length,e.length-c.length,N);Z?s.lastSegment=Z:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,ee&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",$s(s.env,{area:"stream",path:ee?"stream-unbounded-append":"stream-append",reason:ee?"large-delta":"safe-append",unbounded:ee}),s.tokens}const d=i??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",$s(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,y=!h&&!c&&g,A=m||y,b=n.options?.streamChunkAdaptive!==!1,C=n.options?.streamChunkTargetChunks??8,v=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,S=n.options?.streamChunkMaxChunks,_=!!n.__explicitStreamChunkConfig,I=n.options?.autoTuneChunks!==!1,M=n.options?.streamChunkFenceAware??!0;let $=c&&s.lineCount!==void 0?s.lineCount+ps(c):void 0;if(A){$===void 0&&($=ps(e));const N=(z,H,ee)=>zee?ee:z,O=I&&!_?nI(e.length,$,n.options):null,P=O?.maxChunkChars??(b?N(Math.ceil(e.length/C),8e3,64e3):v??1e4),R=O?.maxChunkLines??(b?N(Math.ceil($/C),150,700):x??200),q=O?.maxChunks??(b?N(Math.ceil(e.length/64e3),C,32):S),j=e.length>0&&e.charCodeAt(e.length-1)===10,W=y&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&O?.strategy!=="plain";if((m||W)&&(e.length>=P*2||$>=R*2)&&j){const z=Nv(n,e,d,{maxChunkChars:P,maxChunkLines:R,fenceAware:O?.fenceAware??M,maxChunks:q});return this.cache={src:e,tokens:z,env:d,lineCount:$,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,$),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),z}}const D=this.parseFullDocument(e,d,n,$),T=D.tokens;return $=D.lineCount,this.cache={src:e,tokens:T,env:d,lineCount:$,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,$),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!Pa(d)?.unbounded}),T}recordChunkedParseResult(e,t){const n=Pa(e)?.chunk,i=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,i){this.stats.fullParses+=1,this.stats.lastMode="full",$s(e,{area:"stream",path:"stream-full",reason:`global-state:${i}`,unbounded:!!Pa(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",$s(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,i,s=!0){const o=yr(e);U0(t)&&ru(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?Mz(n,e.length,i):"no";if(r==="yes"){const a=kp(n,e,t);return $s(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:i??(s?ps(e):0)}}let l=i;if(r==="need-lines"&&(l=ps(e),Iz(n,e.length,l))){const a=kp(n,e,t);return $s(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?ps(e):0),{tokens:mh(t,o,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:ps(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` -`))return null;const i=n??t.slice(e.length);if(!i)return null;const s=i.length;if(i.charCodeAt(s-1)!==10)return null;let o=0,r=-1;for(let a=0;a=2));a++);if(o<2)return null;const l=(r===-1?i:i.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(i)?null:i}tryTailSegmentReparse(e,t,n,i){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const o=t.src.slice(0,s.srcOffset);if(!e.startsWith(o))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,i,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,i),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+ps(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 i=e.length-1;i>=0;i--)if(e.charCodeAt(i)===10&&(n--,n===0))return e.slice(i+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,i=e.slice(n),s=i.length;let o=null,r=0;for(;r<=s;){let l=i.indexOf(` -`,r);l===-1&&(l=s);let a=r;for(;a=3&&(o?o.marker===u&&d>=o.length&&(o=null):o={marker:u,length:d})}}if(l===s)break;r=l+1}return o!==null}peek(){return this.cache?.tokens??M7e}getStats(){return{...this.stats}}appendTokens(e,t,n=0,i=t.length){for(let s=n;sS3?n.slice(n.length-S3):n,i&&(e.globalStateReason=i),i}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,i=e.length,s,o){if(i<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=i-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:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}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:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}}return null}getLineStartOffset(e,t,n,i){if(n!==void 0&&i!==void 0&&t>=i)return this.getLineStartOffsetFrom(e,n,t-i);if(t<=0)return 0;let s=t,o=-1;for(;s>0;){if(o=e.indexOf(` -`,o+1),o===-1)return e.length;s--}return o+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let i=n,s=t-1;for(;i>0;){if(s=e.indexOf(` -`,s+1),s===-1)return e.length;i--}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,i,s,o){if(!o||this.mayContainReferenceDefinition(o))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,i,s,o,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,i,s,o,r);default:return null}}tryListTailAppendMerge(e,t,n,i,s,o,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+ps(o);t.lineCount=m;const y=this.getDocLineCount(e,m);return r.map&&(r.map[1]=y),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,i,s,o,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(o))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 y=h.tbodyCloseIndex>=0?h.tbodyCloseIndex:h.tableCloseIndex,A=t.lineCount??ps(t.src);t.tokens.splice(y,0,...g),t.src=e,t.env=n,t.globalStateReason=null;const b=A+ps(o);t.lineCount=b;const C=this.getDocLineCount(e,b);if(r.map&&(r.map[1]=C),h.tbodyOpenIndex>=0){const v=t.tokens[h.tbodyOpenIndex];v?.map&&(v.map[1]=C)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:C,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,i){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===i){s=l;break}}if(s<0)return null;let o=-1,r=-1;for(let l=t+1;l=0){for(let l=s-1;l>o;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===i+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:o,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,i){if(e.length<2)return!1;const s=e[0],o=e[e.length-1];if(s.type!==t||o.type!==n||s.level!==0||o.level!==0||i!==void 0&&s.markup!==i)return!1;let r=0;for(let l=0;l0&&l0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,i){let s=!1,o=!1;const r=i+2;for(let l=t;l=0;){const i=e.charCodeAt(n);if(i===32||i===9){n--;continue}return i===10}return!0}getDocLineCount(e,t=ps(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 i=0;i=0;o--)n.push(s.children[o]);for(;n.length>0;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let r=o.children.length-1;r>=0;r--)n.push(o.children[r])}}}}};const aI={default:b7e,zero:A7e,commonmark:k7e};function F7e(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function D7e(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 uI(e){return e.experimental?{...e,...e.experimental}:e}function ll(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 cI(e,t,n){for(let i=0;i=4?n.quotes=[I[0],I[1],I[2],I[3]]:n.quotes=["“","”","‘","’"]}let r=cI(o?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=cI(o?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=dI(o?.options,s,"fullChunkedFallback"),u=dI(o?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const h=new x6e;let g=null;const m=()=>(g||(g=new I7e(n)),g);let y=null;const A=()=>(y||(y=new N7e(h)),y);let b=null;const C=()=>(b||(b=new RB({fuzzyLink:!0})),b),v=I=>!c&&!!d&&!D7e(I,d),x=(I,M)=>i==="default"&&!c&&g===null&&f!==null&&I.parse===f&&v(I)&&!I.stream.enabled&&M<(I.options.autoUnboundedThresholdChars??4e6)&&I.options.html===!1&&I.options.xhtmlOut===!1&&I.options.breaks===!1&&I.options.langPrefix==="language-"&&I.options.linkify===!1&&I.options.typographer===!1&&I.options.highlight===null,S=(I,M)=>i==="default"&&!c&&v(I)&&!I.stream.enabled&&!I.options.fullChunkedFallback&&M<(I.options.autoUnboundedThresholdChars??4e6)&&I.options.html===!1&&I.options.linkify===!1&&I.options.typographer===!1,_={core:h,block:h.block,inline:h.inline,get linkify(){const I=C();return Object.defineProperty(this,"linkify",{value:I,writable:!0,configurable:!0}),I},get renderer(){const I=m();return Object.defineProperty(this,"renderer",{value:I,writable:!0,configurable:!0}),I},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return v(this)},set(I){const M=uI(I);return this.options={...this.options,...M},(ll(I,"fullChunkSizeChars")||ll(I,"fullChunkSizeLines")||ll(I,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(ll(I,"streamChunkSizeChars")||ll(I,"streamChunkSizeLines")||ll(I,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),ll(I,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),ll(I,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),g&&g.set(M),typeof M.stream=="boolean"&&(this.stream.enabled=M.stream,y&&(y.reset(),y.resetStats())),this},configure(I){const M=typeof I=="string"?aI[I]:I;if(!M)throw new Error("Wrong `markdown-it` preset, can't be empty");if(M.options&&this.set(M.options),M.components){const $=M.components;$.core?.rules&&this.core.ruler.enableOnly($.core.rules),$.block?.rules&&this.block.ruler.enableOnly($.block.rules),$.inline?.rules&&this.inline.ruler.enableOnly($.inline.rules),$.inline2?.rules&&this.inline.ruler2.enableOnly($.inline2.rules)}return this},enable(I,M){const $=Array.isArray(I)?I:[I],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const N of D){if(!N)continue;const O=N.enable($,!0);for(let P=0;P!T.has(O));if(N.length)throw new Error(`Rules manager: invalid rule name ${N.join(", ")}`)}return this},disable(I,M){const $=Array.isArray(I)?I:[I],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const N of D){if(!N)continue;const O=N.disable($,!0);for(let P=0;P!T.has(O));if(N.length)throw new Error(`Rules manager: invalid rule name ${N.join(", ")}`)}return this},use(I,...M){const $=typeof I=="function"?I:I&&typeof I.default=="function"?I.default:void 0;if(!$)throw new TypeError("MarkdownIt.use: plugin must be a function");const D=[this,...M],T=I;return c=!0,$.apply(T,D),this},render(I,M){let $;if(x(this,I.length)){M!==void 0&&(er(M),$=h3("render"));const N=$?Tf():0,O=$?X_(I,$):J_(I);if($&&($.attemptMs=Tf()-N,O===null&&($.fallbackReason="unsupported-stock-subset"),_1(M,$)),O!==null)return M!==void 0&&$s(M,{area:"render",path:"stock-fast",reason:"stock-subset"}),O}const D=M??{},T=this.parse(I,D);return $&&_1(D,$),m().render(T,this.options,D)},async renderAsync(I,M){let $;if(x(this,I.length)){M!==void 0&&(er(M),$=h3("render"));const N=$?Tf():0,O=$?X_(I,$):J_(I);if($&&($.attemptMs=Tf()-N,O===null&&($.fallbackReason="unsupported-stock-subset"),_1(M,$)),O!==null)return M!==void 0&&$s(M,{area:"render",path:"stock-fast",reason:"stock-subset"}),O}const D=M??{},T=this.parse(I,D);return $&&_1(D,$),m().renderAsync(T,this.options,D)},renderIterable(I,M={}){const $=this.parseIterable(I,M);return m().render($,this.options,M)},async renderAsyncIterable(I,M={}){const $=await this.parseAsyncIterable(I,M);return m().renderAsync($,this.options,M)},renderInline(I,M={}){const $=this.parseInline(I,M);return m().render($,this.options,M)},validateLink:pz,normalizeLink:gz,normalizeLinkText:mz,utils:e8e,helpers:{...H8e},parse(I,M){if(typeof I!="string")throw new TypeError("Input data should be a String");if(M!==void 0&&er(M),S(this,I.length)){const N=M===void 0?void 0:h3("parse"),O=N?Tf():0,P=B6e(I,N);if(N&&(N.attemptMs=Tf()-O,P===null&&(N.fallbackReason="unsupported-stock-subset"),_1(M,N)),P!==null)return M!==void 0&&$s(M,{area:"parse",path:"stock-fast",reason:"stock-subset"}),P}const $=M??{};let D;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&v(this)){const N=Mz(this,I.length);if(N==="yes"){const O=kp(this,I,$);return $s(M,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),O}N==="need-lines"&&(D=ps(I))}if(!this.stream.enabled){const N=I.length,O=this.options.autoTuneChunks!==!1,P=r,R=!a&&v(this),q=!!this.options.fullChunkedFallback,j=R&&N>=2e5;let W;(q||j||D!==void 0)&&(W=D??ps(I));const z=(q||j)&&O&&!P?y7e(N,W,this.options):null;if(q||j){const H=W??0;if(q?N>=(this.options.fullChunkThresholdChars??2e4)||H>=(this.options.fullChunkThresholdLines??400):j){if(z&&z.strategy!=="plain"){const ee=Nv(this,I,$,{maxChunkChars:z.maxChunkChars,maxChunkLines:z.maxChunkLines,fenceAware:z.fenceAware,maxChunks:z.maxChunks});return M&&fI(M,q?"explicit-full-chunk":"default-large-string"),ee}if(q){const ee=(X,we,Y)=>XY?Y:X,V=this.options.fullChunkAdaptive!==!1,ie=this.options.fullChunkTargetChunks??8,se=ee(Math.ceil(N/ie),8e3,64e3),Z=ee(Math.ceil(H/ie),150,700),pe=V?se:this.options.fullChunkSizeChars??1e4,re=V?Z:this.options.fullChunkSizeLines??200,fe=V?ee(Math.ceil(N/64e3),ie,32):this.options.fullChunkMaxChunks,Ee=Nv(this,I,$,{maxChunkChars:pe,maxChunkLines:re,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:fe});return M&&fI(M,"explicit-full-chunk"),Ee}}}if(D!==void 0&&v(this)&&Iz(this,N,W??D)){const H=kp(this,I,$);return $s(M,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),H}}const T=yr(I);return $s(M,{area:"parse",path:"plain",reason:"default-plain"}),mh($,T,()=>h.parse(I,$,this).tokens)},parseIterable(I,M={}){return er(M),p7e(this,I,M)},parseAsyncIterable(I,M={}){return er(M),g7e(this,I,M)},parseIterableToSink(I,M,$={}){return er($),m7e(this,I,M,$)},parseAsyncIterableToSink(I,M,$={}){return er($),v7e(this,I,M,$)},parseInline(I,M={}){if(typeof I!="string")throw new TypeError("Input data should be a String");er(M),U0(M)&&ru(M);const $=h.createState(I,M,this);return $.inlineMode=!0,h.process($),$.tokens}};if(_.stream={enabled:!!n.stream,parse(I,M){return _.stream.enabled?A().parse(I,M,_):_.parse(I,M??{})},reset(){A().reset()},peek(){return y?y.peek():[]},stats(){return y?y.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){y&&y.resetStats()}},o?.components){const I=o.components;I.core?.rules&&_.core.ruler.enableOnly(I.core.rules),I.block?.rules&&_.block.ruler.enableOnly(I.block.rules),I.inline?.rules&&_.inline.ruler.enableOnly(I.inline.rules),I.inline2?.rules&&_.inline.ruler2.enableOnly(I.inline2.rules)}return d=F7e(_),f=_.parse,_}var B7e=$7e;const Fz=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],z7e=["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"],Dz=["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"],R7e=["svg","g","path"],O7e=["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"],P7e=["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"],j7e=["action","data","href","src","srcset","poster","xlink:href","formaction"],H7e=["script"],W7e=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],dc=new Set(Fz),$z=new Set(Dz),f0=new Set([...Fz,...z7e,...Dz,...R7e]),Bz=new Set([...f0,...O7e]),q7e=new Set(P7e),U7e=new Set(j7e),Z0=new Set(H7e),zz=new Set(W7e);function Rz(e){let t="";for(const n of e){const i=n.charCodeAt(0);i<=31||i>=127&&i<=159||/\s/u.test(n)||(t+=n)}return t}const K7e={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function Oz(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,i,s)=>{const o=n??i;if(o){const r=Number.parseInt(o,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return K7e[String(s??"").toLowerCase()]??t})}const bm=new Set(["http","https","mailto","tel"]),V7e=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),ed=new Set(["http","https"]);function Pz(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const Z7e=/^https?:\/\//i;function G7e(e){if(!Z7e.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 Q7e(e,t,n){if(!Cp(t,n)||!e.startsWith("file:///"))return!1;const i=e.charAt(8);return i!=="/"&&i!=="\\"}function Cp(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Y7e(e,t){return t==="href"||t==="xlink:href"?Cp(e,t)?bm:ed:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?ed:(Cp(e,t),bm)}function Td(e,t={}){if(G7e(e))return!1;const n=Rz(Oz(e)).toLowerCase(),i=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 i==="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 o=Pz(n);return o?o==="file"?!Q7e(n,i,s):Cp(i,s)?V7e.has(o):!Y7e(i,s).has(o):!1}function J7e(e){const t=Oz(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=Pz(Rz(t).toLowerCase());return n==="http"||n==="https"}function X7e(e,t={}){const n=String(e??"").trim();return n?Td(n,t)?"":n:""}function hI(e){return X7e(e,{tagName:"img",attrName:"src"})}function eAe(e,t,n){function i(f){return f.trim().split(" ",2)[0]===t}function s(f,h,g,m,y){return f[h].nesting===1&&f[h].attrJoin("class",t),y.renderToken(f,h,g,m,y)}n=n||{};const o=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||i,c=n.render||s;function d(f,h,g,m){let y,A=!1,b=f.bMarks[h]+f.tShift[h],C=f.eMarks[h];if(l!==f.src.charCodeAt(b))return!1;for(y=b+1;y<=C&&r[(y-b)%a]===f.src[y];y++);const v=Math.floor((y-b)/a);if(v=g||(b=f.bMarks[_]+f.tShift[_],C=f.eMarks[_],b=4)){for(y=b+1;y<=C&&r[(y-b)%a]===f.src[y];y++);if(!(Math.floor((y-b)/a)=2){const r=Number(o[0]),l=Number(o[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&jz(s.children,t,n)}}function nAe(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(eAe,t,{render(n,i){return n[i].nesting===1?`
        `:`
        -`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,i,s)=>{const o=t,r=o.bMarks[n]+o.tShift[n],l=o.eMarks[n],a=o.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 S=0,_=-1;for(let I=0;I0&&(h=m.slice(0,_))}h||(f=d||void 0)}if(s)return!0;const y=!!o.env.__markstreamFinal;let A=n+1,b=!1;for(;A<=i;){const S=o.bMarks[A]+o.tShift[A],_=o.eMarks[A];if(o.src.slice(S,_).trim()===":::"){b=!0;break}A++}b||(A=i);const C=o.push("vmr_container_open","div",1);if(C.attrSet("class",`vmr-container vmr-container-${c}`),C.map=[n,b?A:i],C.meta={...C.meta??{},unclosed:!b&&!y},f&&C.attrSet("data-args",f),h)try{const S=JSON.parse(h);for(const[_,I]of Object.entries(S)){const M=I!=null&&typeof I=="object";C.attrSet(`data-${_}`,M?JSON.stringify(I):String(I))}}catch{const S=tAe(h);if(S)for(const[_,I]of Object.entries(S)){const M=I!=null&&typeof I=="object";C.attrSet(`data-${_}`,M?JSON.stringify(I):String(I))}else C.attrSet("data-attrs",h)}const v=[];for(let S=n+1;SS.trim().length>0)){let S=v.join(` -`);S.endsWith(` -`)||(S+=` -`),S.endsWith(` - -`)||(S+=` -`);const _=o.tokens[o.tokens.length-1];_&&(_.raw=S);const I=[];o.md.block.parse(S,o.md,o.env,I),jz(I,n+1,n+1+v.length),o.tokens.push(...I)}const x=o.push("vmr_container_close","div",-1);return b||(x.hidden=!0,x.map=[i,i]),o.line=b?A+1:A,!0},{alt:["paragraph","reference","blockquote","list"]})}function ql(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ys(e){let t=!1,n=!1;for(let i=0;i")return i}return-1}function s9(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=i[2]||i[3]||i[4]||"";t.push([s,o])}return t}const iAe=/^[a-z][a-z0-9_-]*$/;function pI(e){return iAe.test(String(e??"").trim().toLowerCase())}function yl(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return pI(t)?t.toLowerCase():"";let n=1;for(;n]/.test(o)?"":pI(s)?s:""}function sf(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const i of e){const s=yl(i);!s||t.has(s)||(t.add(s),n.push(s))}return n}function sAe(...e){const t=new Set,n=[];for(const i of e)for(const s of sf(i))t.has(s)||(t.add(s),n.push(s));return n}function oAe(e){const t=sf(e);return{key:t.join(","),tags:t}}function Hz(e){return yl(e)}function rAe(e,t){const n=String(e??""),i=yl(t);if(!i)return!1;const s=ql(i),o=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return o?o[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function Wz(e,t){const n=yl(t);return!!n&&!f0.has(n)&&!rAe(e,n)}function lAe(e,t){const n=String(e??""),i=yl(t);if(!i)return n;const s=ql(i),o=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(o,"").replace(r,"")}const qz=dc,aAe=f0,Uz=new Set($z);Uz.delete("details");const uAe=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,cAe=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,r8=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,dAe=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Dv(e){return(e.match(r8)?.[1]??"").toLowerCase()}function Q6(e){return/^\s*<\s*\//.test(e)}function Y6(e,t){return qz.has(t)||/\/\s*>\s*$/.test(e)}function fAe(e,t){let n=0;for(let i=0;i0&&n--;continue}Y6(s,o)||n++}}return n}function gI(e,t,n=0){const i=new RegExp(String.raw`<\s*(\/?)\s*${ql(t)}(?=[\s>/])[^>]*>`,"gi");i.lastIndex=Math.max(0,n);let s=0,o;for(;(o=i.exec(e))!==null;){const r=o[0]??"",l=!!o[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:o.index,end:o.index+r.length};s--;continue}a||s++}return null}function pAe(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${ql(t)}(?=[\s>/])[^>]*>`,"gi");let i=0,s;for(;(s=n.exec(e))!==null;){const o=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(o);if(r){i>0&&i--;continue}l||i++}return i}function $v(e){const t=e;return String(t.raw??t.content??t.markup??"")}function gAe(e){const t=e;return t.meta||(t.meta={}),t.meta}function _3(e,t,n){const i=gAe(e);i.markstreamCustomHtmlRaw=t,i.markstreamCustomHtmlInner=n}function mAe(e,t){if(!t.size)return;const n=Array.from(t,h=>new RegExp(String.raw`<\s*${ql(h)}(?=[\s>/])`,"i")),i=[];let s=!1;const o=h=>h?n.some(g=>g.test(h)):!1,r=h=>{if(!(!h||!i.length))for(const g of i)g.raw+=h,g.inner+=h},l=()=>{!i.length||!s||(r(` -`),s=!1)},a=h=>{r(h)},u=h=>{for(let m=0;m{const g=i[i.length-1]?.tag;if(!g)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${ql(g)}\s*>`,"i");return h.match(m)?.[0]??null},d=h=>!!c(h),f=(h,g,m)=>{const y=m??(h.type==="html_inline"?Dv(g):"");if(!(y&&t.has(y))){r(g);return}const A=Q6(g),b=!A&&Y6(g,y);if(A){if(!i.length||i[i.length-1].tag!==y){r(g);return}u(g);return}if(r(g),b){_3(h,g,"");return}i.push({tag:y,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(),!i.length&&!o(g)){s=!1;continue}let m=0,y=!0;for(const A of h.children){const b=$v(A),C=A.type==="html_inline"?Dv(b):"",v=C&&t.has(C);let x=b;if(y&&g&&b&&(i.length||v)){const S=g.indexOf(b,m);if(S!==-1)a(g.slice(m,S)),x=g.slice(S,S+b.length),m=S+b.length;else{if(i.length&&!v)continue;y=!1}}f(A,x,C)}y&&g&&m0;continue}if(i.length&&typeof h.content=="string"){const g=$v(h),m=h.type==="html_block"?c(g):null;if(m){u(`${s?` -`:""}${m}`),s=i.length>0;continue}if(!h.content)continue;l(),r(h.content),s=!0}}for(const h of i)_3(h.token,h.raw,h.inner)}function vAe(e){return/^\s*<\s*[!?]/.test(e)}function yAe(e){const t=new Set(aAe);if(e&&Array.isArray(e))for(const n of e){const i=String(n??"").trim();if(!i)continue;const s=i.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function mI(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function kAe(e,t){let n=null;for(const o of e.matchAll(uAe)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();mI(l,t)&&ys(e.slice(r))===-1&&(!n||r")&&(!n||o")&&(!n||o{const h=f,g=new Set(n),m=Array.isArray(h.env?.__markstreamCustomHtmlTags)?h.env.__markstreamCustomHtmlTags:[];for(const C of m){const v=yl(String(C??""));v&&g.add(v)}const y=yAe(Array.from(g)),A=new Set(CAe);for(const C of g)A.add(C);return{autoCloseInlineTagSet:A,commonHtmlTags:y,customTagSet:g,shouldMergeHtmlBlockTag:C=>g.has(C)||!y.has(C)||Uz.has(C)}},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??"")},o=(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 y={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return h==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},y,{type:"paragraph_close",tag:"p",nesting:-1}]:h==="text"?[{type:"text",content:m,raw:m}]:[y]},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}=i(f);for(const y of h){const A=y;if(A.type!=="inline"||!Array.isArray(A.children))continue;const b=String(A.content??""),C=A.children.length?A.children:b.includes("<")?[{type:"text",content:b,raw:b}]:null;if(C)try{const v=AAe(C,g);if(A.children=v.children,v.pendingBuffer){const x=b.lastIndexOf(v.pendingBuffer);if(x!==-1){const S=b.slice(0,x);A.content=S,typeof A.raw=="string"&&(A.raw=S)}}}catch(v){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",v)}}mAe(h,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const h=f.tokens??[],{autoCloseInlineTagSet:g,customTagSet:m,shouldMergeHtmlBlockTag:y}=i(f),A=[];for(let b=0;b0){const[x,S]=A[A.length-1];if(b!==S){if(C.type==="paragraph_open"||C.type==="paragraph_close"){h.splice(b,1),b--;continue}const _=String(C.content??C.raw??"");if(_){const I=h[S],M=`${String(I.content||"")} -${_}`,$=ys(M),D=$===-1?null:gI(M,x,$+1);if(D){const T=M.slice(0,D.end),N=M.slice(D.end);I.content=T,I.loading=!1,h.splice(b,1),A.pop();const O=d(I,N)?[]:u(N,c(h,b,"paragraph"));O.length&&h.splice(b,0,...O),b--;continue}I.content=M,I.loading!==!1&&(I.loading=!0)}h.splice(b,1),b--;continue}}const v=s(C);if(v){if(vAe(v))continue;const x=(v.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),S=/^\s*<\s*\//.test(v);if(!x||!y(x))continue;if(o(C,v),!S)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(v)&&pAe(v,x)>0&&A.push([x,b]);else if(A.length>0&&x&&A[A.length-1][0]===x){const[,_]=A[A.length-1],I=h[_];I.content=`${String(I.content||"")} -${v}`,I.loading=!1,A.pop(),h.splice(b,1),b--}continue}else if(A.length>0){if(C.type==="paragraph_open"||C.type==="paragraph_close"){h.splice(b,1),b--;continue}const x=C.content||"",S=new RegExp(`<\\s*\\/\\s*${A[A.length-1][0]}\\s*>`,"i").test(x);if(x){const[,_]=A[A.length-1],I=h[_];I.content=`${I.content||""} -${x}`,I.loading!==!1&&(I.loading=!S)}S&&A.pop(),h.splice(b,1),b--}else continue}if(m.size>0){const b=new Map,C=new Map,v=_=>{let I=b.get(_);return I||(I=new RegExp(`<\\s*${_}\\b`,"i"),b.set(_,I)),I},x=_=>{let I=C.get(_);return I||(I=new RegExp(`<\\s*\\/\\s*${_}\\s*>`,"i"),C.set(_,I)),I},S=[];for(let _=0;_0){const D=S[S.length-1],T=h[D.index],N=I.type==="html_block"?x(D.tag).exec(M):null;if(N){const R=N.index+N[0].length,q=M.slice(0,R),j=M.slice(R);T.content=`${String(T.content??"")} -${q}`,Array.isArray(T.children)&&T.children.push({type:"html_inline",content:``,raw:``}),S.pop();const W=d(T,j)?[]:u(j,c(h,_,"paragraph"));W.length?h.splice(_,1,...W):(h.splice(_,1),_--);continue}if(I.type!=="inline")continue;const O=Array.isArray(I.children)?I.children:[],P=fAe(O,D.tag);if(P!==-1){const R=O.slice(0,P+1),q=O.slice(P+1),j=R.map(W=>String(W?.content??W?.raw??"")).join("");if(T.content=`${String(T.content??"")} -${j}`,Array.isArray(T.children)&&T.children.push(...R),q.length){const W=q.map(z=>String(z.content??z.raw??"")).join("");if(W.trim()){const z=W.replace(/^\s+/,"");if(d(T,W))h.splice(_,1),_--;else if(z.startsWith("<"))h.splice(_,1,{type:"html_block",content:z});else{const H=u(W,c(h,_,"paragraph"));h.splice(_,1,...H)}}else h.splice(_,1),_--}else h.splice(_,1),_--;S.pop();continue}T.content=`${String(T.content??"")} -${M}`,Array.isArray(T.children)&&T.children.push(...O),h.splice(_,1),_--;continue}if(I.type!=="inline")continue;const $=Array.isArray(I.children)?I.children:[];for(const D of m)if(($.length?hAe($,D):v(D).test(M)&&!x(D).test(M)?1:0)>0){S.push({tag:D,index:_});break}}}{let b=0;for(let C=0;C0?b--:(h.splice(C,1),C--))}}for(let b=0;b/]+)/)?.[1]??"").toLowerCase();if(I.startsWith("!")||I.startsWith("?")){C.loading=!1;continue}if(m.has(I)){const P=String(C.content??""),R=ys(P),q=R===-1?null:gI(P,I,R+1);C.loading=q?!1:C.loading!==void 0?C.loading:!0;const j=q?.start??-1,W=q?q.end-q.start:0;if(j!==-1){const z=P.slice(0,j+W);let H="";R!==-1&&R]+)))?/g;let $;for(;($=M.exec(C.content||""))!==null;)$[1],$[2]||$[3]||$[4];const D=String(C.content??""),T=new RegExp(`<\\/\\s*${I}\\s*>`,"i").exec(D),N=T?T.index:-1,O=T?T[0].length:0;if(N!==-1){const P=D.slice(0,N+O),R=(D.slice(N+O)||"").replace(/^\s+/,"");C.children=[{type:"html_block",content:P,tag:I,loading:!1}],C.content=P,C.raw=P,R&&h.splice(b+1,0,R.startsWith("<")?{type:"html_block",content:R}:{type:"text",content:R,raw:R})}else C.children=[{type:"html_block",content:C.content,tag:I,loading:!0}];continue}if(!C||C.type!=="inline")continue;if(C.children.length===2&&C.children[0].type==="html_inline"){const I=(C.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),M=C.children[1],$=String(M?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(M?.type==="html_inline"&&$===I)continue;g.has(I)?(C.children[0].loading=!0,C.children[0].tag=I,C.children.push({type:"html_inline",tag:I,loading:!0,content:``})):C.children=[{type:"html_block",loading:!0,tag:I,content:String(C.children[0]?.content??"")+String(C.children[1]?.content??"")}];continue}else if(C.children.length===3&&C.children[0].type==="html_inline"&&C.children[2].type==="html_inline"){const I=(C.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(g.has(I))continue;C.children=[{type:"html_block",loading:!1,tag:I,content:C.children.map(M=>M.content).join("")}];continue}if(!C.content?.startsWith("<")||C.children?.length!==1)continue;const v=String(C.content),x=C,S=x.children[0];if(S?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(v)&&(x.children.length=0);continue}const _=String(S.content??v).match(dAe)?.[1]?.toLowerCase()??"";if(_){if(/\/\s*>\s*$/.test(v)||qz.has(_)){x.children=[{type:"html_inline",content:v}];continue}x.children.length=0}}})}function xAe(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 SAe(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const i=n.tokens??[];for(let s=0;sa.trim().length>0);if(l.length===1&&!xAe(l[0]??"")){const a=l[0]??"",u=o.level??0;i.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 Kz=/\.([a-z0-9]{1,15})$/i,_Ae=/[_()[\]{}<>]/u,IAe=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,MAe=/[?#@]/u,EAe=/[\\/]/u,TAe=/^[\p{L}\p{N}./\\-]+$/u,LAe=/^[A-Za-z0-9-]{1,63}$/u,NAe=/^xn--[a-z0-9-]{2,59}$/i,FAe=/^(?:[A-Z]{1,6}|\d{1,8})$/u,DAe=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,$Ae=/文件名\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,BAe=/文件名\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,zAe=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,RAe=2e3,OAe=512,PAe={},jAe=new Set(["ai","md","py","rs","sh","zip"]),Vz=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),HAe=new Set([...Vz,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),WAe=new Set(["com","dev","io","page","site"]),qAe=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),UAe=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"]),yd=new Map;function vI(e,t){if(!e||e.length>OAe)return t;for(yd.set(e,t);yd.size>RAe;){const n=yd.keys().next().value;if(!n)break;yd.delete(n)}return t}function h0(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function I3(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return h0(n)?n:void 0}function yI(e,t){if(!h0(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 kI(e){const t=G0(e);return h0(t)?t:void 0}function KAe(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function bI(e,t){if(!h0(t))return;const n=String(e??"").trim().split(/\s+/u).map(KAe).filter(Boolean);if(n.length===0)return;const i={};return t?.filename&&n.every(s=>Bv(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(i.filename=!0),t?.explicitFilename&&i.filename&&(i.explicitFilename=!0),t?.marketTicker&&n.every(s=>Bv(s,{marketTicker:!0}))&&(i.marketTicker=!0),h0(i)?i:void 0}function Tc(e,t=!1){let n;return{options(i){return t||i==null?yI(e,n):yI(e,I3(kI(i),bI(i,n)))},remember(i){const s=kI(i);n=t?I3(n,s):I3(s,bI(i,n))},reset(){n=void 0}}}function AI(e){return LAe.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function VAe(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return AI(n)||NAe.test(n)?t.every(AI):!1}function Zz(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function ZAe(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function GAe(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function Gz(e,t,n){const i=ZAe(t);return Zz(e)&&GAe(i)&&String(n??"").toLowerCase().includes(i.toLowerCase())}function QAe(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 G0(e){const t=String(e??""),n=yd.get(t);return n?(yd.delete(t),yd.set(t,n),n):QAe(t)?vI(t,{explicitFilename:$Ae.test(t),filename:BAe.test(t),marketTicker:zAe.test(t)}):vI(t,PAe)}function YAe(e){return VAe(e.split(/[\\/]/)[0]??"")}function JAe(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function XAe(e){if(_Ae.test(e)||!TAe.test(e))return!0;if(EAe.test(e))return!YAe(e);const t=e.replace(Kz,"");return Zz(t)?!0:t.split(".").filter(Boolean).some(JAe)}function eCe(e,t,n){if(!(n?HAe:Vz).has(t))return!1;const i=e.slice(0,-(t.length+1));return i===""?e.startsWith("."):(n?DAe:FAe).test(i)}function Bv(e,t={}){if(!e||IAe.test(e)||MAe.test(e))return!1;const n=e.match(Kz);if(!n)return!1;const i=String(n[1]??"").toLowerCase();return eCe(e,i,t.marketTicker===!0)?!0:UAe.has(i)?!jAe.has(i)||t.filename?!0:XAe(e):!!(t.explicitFilename&&WAe.has(i)||t.filename&&qAe.has(i))}const Qz=new WeakMap,Yz=new WeakSet;function l8(e,t){return Qz.set(e,t),e}function tCe(e){return Qz.get(e)}function nCe(e){Yz.add(e)}function iCe(e){return e===void 0||Yz.has(e)}const CI=["!"];function wI(e){return e==="linkify"||e==="autolink"?e:"recovery"}function pr(e){return{type:"text",content:e,raw:e}}function td(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 nd(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 xu(e,t,n,i="recovery"){let s="";if(t.includes('"')){const o=t.split('"');t=o[0].trim(),s=o[1].trim()}return l8({type:"link",loading:n,href:t,title:s,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`},i)}function sCe(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(pr(t))}}function xI(e,t){let n=-1;for(const i of t){const s=e.indexOf(i);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function rCe(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(i=>i?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function SI(e,t,n){let i="";for(let s=t+1;s{const n=t.tokens??[];for(let i=0;ir.type==="code_inline"),i=new Map;let s=0;for(let r=0;r0&&u?_I(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 o=G0(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=_I(u);g!==-1&&(d===-1||g=m.content.length){h-=m.content.length;continue}if(h<0)break;const y=m.content[h],A=m.content.slice(0,h);let b=m.content.slice(h);for(let x=g+1;x0&&(e.splice(g+1,C),a=g+1);let v=c;if(y==="!"&&f!==-1)v=c.slice(0,f);else if(b){const x=encodeURI(b);if(x&&c.endsWith(x))v=c.slice(0,c.length-x.length);else{const S=y?encodeURI(y):"",_=S?c.indexOf(S):-1;_!==-1&&(v=c.slice(0,_))}}v!==c&&rCe(l,v),b&&e.splice(a+1,0,pr(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(xu(u,c,f,"linkify"));const h=e[r+3].content?.replace(/^\)\**/,"");h&&a.push(pr(h)),e.splice(r-4,8,...a)}else a.push(l8({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`},"linkify")),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(A=>A[0]==="href")?.[1]||"",d=u.find(A=>A[0]==="title")?.[1]||"";let f=3,h=2;const g=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(g){h+=1;const A=g[1].length;td(m,A)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let A=r+1;Ay[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(xu(d,f,g)),nd(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=[];td(d,2),d.push(xu(u,c,!1)),nd(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 i=0;i{const n=t.tokens??[];for(let i=0;i=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y{const n=t;try{const i=ACe(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(i)&&(n.tokens=i)}catch(i){console.error("[applyFixTableTokens] failed to fix table tokens",i)}})}function II(){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 MI(){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 EI(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 Jz(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(i=>i.trim().length>0)?n:null}function M3(e){return Jz(e)!==null}function Xz(e){return/^:?-+:?$/.test(e.trim())}function mCe(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(Xz)}function vCe(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function yCe(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(Xz)&&vCe(n)}function kCe(e){return e==="|"||e==="|:"}function bCe(e){const t=Jz(e);return t!==null&&t.every(n=>!n.includes(":"))}function ACe(e,t=!1,n=""){const i=[...e];if(e.length<3)return i;const s=e.length-2,o=e[s];if(o.type==="inline"){const r=String(o.content??""),l=r.split(` -`)[0]??"",[a="",u="",...c]=r.split(` -`),d=!t&&!r.includes(` -`)&&/\r?\n$/.test(n)&&M3(r);if(!t&&(r.includes(` -`)&&c.length===0&&M3(a)&&yCe(u)||d)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>EI(g)),h=[...II(),...f,...MI()];i.splice(s-1,3,...h)}else if(r.includes(` -`)&&c.length===0&&M3(a)&&mCe(u)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>EI(g)),h=[...II(),...f,...MI()];i.splice(s-1,3,...h)}else r.includes(` -`)&&c.length===0&&bCe(a)&&kCe(u)&&(o.content=r.slice(0,-2),o.children.splice(2,1))}return i}function CCe(e,t,n,i){const s=e.length;if(n==="$$"&&i==="$$"){let u=t;for(;u=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const o=n[n.length-1],r=i;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===o?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var wCe=CCe;const xCe=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],zv=xCe.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),SCe=/\\[a-z]+/i,eR="(?:\\\\|\\u0008)",_Ce=new RegExp(String.raw`${eR}(?:${zv})\s*\{[^}]+\}`,"i"),ICe=new RegExp(String.raw`(?:${eR})?(?:${zv})\s*\{`,"i"),MCe=/\\(?:text|frac|left|right|times)/,ECe=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,TCe=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,LCe=/[A-Z]+\s*\([^)]+\)/i,NCe=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,FCe=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,DCe=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,$Ce={"\b":"\\b","\v":"\\v","\f":"\\f"};function BCe(e){let t="";for(const n of e)t+=$Ce[n]??n;return t}function ju(e){if(!e)return!1;const t=BCe(e),n=t.trim();if(DCe.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const i=SCe.test(t),s=_Ce.test(t),o=ICe.test(t),r=MCe.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=ECe.test(t)&&!TCe.test(t),u=LCe.test(t),c=NCe.test(n),d=FCe.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),h=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return i||s||o||r||l||a||u||c||d||f||h}const tR="__markstreamMathPluginApplied",a8=80,nR=2e4,TI=nR+4096;function J6(e){return!!e[tR]}function zCe(e){e[tR]=!0}const iR=["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"],RCe=["cdot","mathbf{","partial","mu_{"],sR=iR.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),oR="[ \r\b\f\v]",OCe=new RegExp(`([^\\\\])(${RCe.map(e=>e).join("|")})+`,"g"),PCe=/span\{([^}]+)\}/,jCe=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,HCe=/(^|[^\\])\\\r?\n/g,WCe=/(^|[^\\])\\$/g,qCe=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,UCe=new RegExp(`(${oR})|(${sR})\\b`,"g"),LI=new Map,NI=new Map;function KCe(e){if(!e)return UCe;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),i=LI.get(n);if(i)return i;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,o=new RegExp(`(${oR})|(${s})\\b`,"g");return LI.set(n,o),o}function VCe(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const i=e?"__default__":n.join(""),s=NI.get(i);if(s)return s;const o=e?[zv,sR].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),zv].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${o})\\s*\\{`,"g");return NI.set(i,r),r}const FI={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function DI(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function ZCe(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&qCe.test(n))return t;const i=n?t.slice(n.length):t;return`${n}${"\\!".repeat(i.length)}`})}function $I(e){const t=/(^|[^\\])(__|\*\*)/g;let n,i=null;for(;(n=t.exec(e))!==null;)i={marker:n[2],index:n.index+(n[1]?.length??0)};return i}function Su(e,t){const n=t?.commands??iR,i=t?.escapeExclamation??!0,s=t?.commands==null,o=KCe(s?void 0:n);let r=e.replace(o,(u,c,d,f,h)=>{if(c!==void 0&&FI[c]!==void 0)return`\\${FI[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});i&&(r=ZCe(r));let l=r;const a=VCe(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(PCe,"span\\{$1\\}").replace(jCe,"\\operatorname{span}\\{$1\\}"),l=l.replace(HCe,`$1\\\\ -`),l=l.replace(WCe,"$1\\\\"),l=l.replace(OCe,"$1\\$2"),l}function BI(e){const t=e.trim();return!(!ju(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 rR(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[o]==="\\"&&o+10;){if(e[l]==="\\"&&l+1=0&&e[n]==="\\";)i++,n--;return i%2===1}function u8(e,t){let n=t;for(;n0&&e[i-1]==="$"||i+1=l)break;const u=Rv(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}Q0(e,a)||o++,r=a+Math.max(1,t.length)}return o}function X6(e,t,n){const i=g0(String(e??""));if(!i.endsWith(t))return-1;const s=i.length-t.length;if(s<=0||!g0(i.slice(0,s)).trim()||Q0(i,s))return-1;const o=rR(i);if(Rv(o,s))return-1;const r=zI(i,t,0,s,o);if(t==="$$"){if(r%2===1)return-1}else if(r>zI(i,n,0,s,o))return-1;return s}function p0(e){return e===" "||e===" "}function g0(e){let t=e.length;for(;t>0&&p0(e[t-1]);)t--;return e.slice(0,t)}function RI(e){let t=0;for(let n=0;n=48&&t<=57}function QCe(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let i=0;i=3}function YCe(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let i=0;for(;t[n]==="-";)i++,n++;return i<3?!1:(t[n]===":"&&n++,n===t.length)}function JCe(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(YCe)}function XCe(e){let t=0;if(!OI(e[t]))return!1;for(;OI(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:p0(e[t+1])}function lR(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&&p0(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&p0(t[1])||XCe(t)||QCe(t)||JCe(t))}function PI(e,t){return e?t?`${e} -${t}`:e:t}function c8(e){const t=String(e??"").trim();return t?ju(t):!1}function jI(e){let t=0;for(let n=0;na8){h=!0;break}const m=s[g],y=Hf(m,c);if(y!==-1){const A=PI(f,m.slice(0,y));if(!c8(A)){h=!0;break}const b=m.slice(y+c.length),C=b.trim()?`suffix:${jI(b)}`:"nosuffix";return["closed",u,i+l,d,i+g,y,jI(A),C].join(":")}if(lR(m)){h=!0;break}if(f=PI(f,m),f.length>nR){h=!0;break}}if(!h&&c8(f))return["pending",u,i+l,d].join(":")}}return null}function T3(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function twe(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const i=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(i)?!1:i===""||/^[)\s,.!?;:]/.test(i)}function L3(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function nwe(e,t){zCe(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)},i=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(b,C)=>{let v=C;for(;v=3&&(!v||/\s/.test(v))){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??""),g=Math.max(0,a.pos-h.length);let m=g,y=g;const A=g;for(const[b,C]of f){const v=a.src,x=rR(v),S=GCe(v,c);let _=!1;b==="$$"&&m!==A&&(m=A);let I=-1,M=-1,$=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 P=a.push("text_special","",0);P.content=T==="\\)"?")":"(",P.markup=T,a.pos=a.pos+T.length,m=a.pos;return}if(!T)return;if(b==="$$"&&T.includes("$")){let P=0;for(;P0&&T[R-1]==="$"||R+10){const q=T.slice(0,N),j=a.push("text","",0);j.content=q,a.pos=a.pos+q.length,m=a.pos}const P=T.slice(N).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(P){const[,q,j]=P,W=j.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),z=W?W[1]:j,H=W&&W[2]?W[2]:null,ee=a.push("image","img",0);ee.attrs=[["src",z],["alt",q]],H&&ee.attrs.push(["title",H]),ee.content=q,ee.children=[{type:"text",content:q,tag:""}],a.pos=a.pos+P[0].length,m=a.pos;const V=T.slice(N+P[0].length);V&&D(V);return}const R=a.push("text","",0);R.content=T,a.pos=a.pos+T.length,m=a.pos;return}const O=a.push("text","",0);O.content=T,a.pos=a.pos+T.length,m=a.pos};for(;!(m>=v.length);){const T=v.indexOf(b,m);if(T===-1)break;if(Q0(v,T)){m=T+Math.max(1,b.length);continue}const N=Rv(x,T);if(N){m=N[1];continue}const O=Rv(S,T);if(O){m=O[1];continue}if(T===I&&m===M){if($++,$>2){m=T+Math.max(1,b.length);continue}}else $=0,I=T,M=m;if(b==="("&&T>0){let V=T-1;for(;V>=0&&v[V]===" ";)V--;if(V>=0&&v[V]==="]"){m=T+b.length;continue}}if(b==="$"&&T>0&&v[T-1]==="$"){m=T+1;continue}if(b==="$"&&T=v.length);){const N=u8(v,T);if(N===-1)break;if(N+10&&v[N-1]==="$"){T=N+1;continue}const O=E3(v,N+1);if(O===-1)break;const P=v.slice(N+1,O),R=P.includes("`"),q=!P||!P.trim(),j=v[O+1],W=T3(P,j),z=L3(P);if(!R&&!q&&!W&&!z){const H=v.slice(m,N);H&&D(H);const ee=a.push("math_inline","math",0);ee.content=Su(P,t),ee.markup="$",ee.raw=`$${P}$`,ee.loading=!1,m=O+1,T=O+1}else D("$"),T=N+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(),y=!1,A="",b="",C=!1,v="",x=!1;for(const[H,ee]of h)if(m.startsWith(H))if(H.includes("[")){const V=H==="\\["?m.slice(H.length):"";if(H==="\\["&&Hf(V,ee)===-1&&!/^\s*!\[/.test(V)&&!V.includes("`")&&ju(V)){y=!0,A=H,b=ee;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1=0?"\\]":b,$=I>=0?I:Hf(m,b,_);if(!C&&$>A.length){const H=m.slice(S+A.length,$),ee=c.push("math_block","math",0);ee.content=Su(H),ee.markup=A==="$$"?"$$":A==="["?"[]":"\\[\\]",ee.map=[l,l+1],ee.raw=`${A}${H}${M}`,ee.block=!0,ee.loading=!1,c.line=l+1;const V=m.slice($+M.length);return V.trim()&&n(c,V,l),!0}let D=l,T="",N=!1,O="",P=l;const R=C?m:m===A?"":m.slice(A.length),q=!f&&A==="\\["?"]":"",j=Hf(R,b);if(j!==-1){const H=j;T=R.slice(0,H),O=R.slice(H+b.length),P=C?l+1:l,N=!0,D=P}else for(R&&!C&&(T=R),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",i),e.block.ruler.before("lheading","explicit_math_block",o,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function iwe(e){const t=e.renderer.rules.image||function(n,i,s,o,r){const l=n,a=r;return a.renderToken?a.renderToken(l,i,s):""};e.renderer.rules.image=(n,i,s,o,r)=>{const l=n;return l[i].attrSet?.("loading","lazy"),t(l,i,s,o,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,i)=>{const s=n[i],o=String(s.info??"").trim();return`
        ${e.utils.escapeHtml(String(s.content??""))}
        `})}const swe=/^\s]/i,owe=/^<\/a\s*>/i;function rwe(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.test(String(e.content??""));let i=0;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==o.level&&n[s]?.type!=="link_open";)s--;continue}if(o?.type==="html_inline"){const r=String(o.content??"");swe.test(r)&&i>0&&i--,owe.test(r)&&i++}if(!(i>0)&&o?.type==="text"&&t.test(String(o.content??"")))return!0}return!1}function lwe(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(i=>i.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",i=>{if(!i.md?.options?.linkify)return;const s=Array.isArray(i.tokens)?i.tokens:[],o=i.md.linkify;if(!o)return;const r=s.filter(l=>rwe(l,o));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(i)),i,{tokens:r}))})}function awe(e){const t=e.inline.ruler,n=t.getNamedRules?.(),i=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof i!="function"||typeof s!="function")return;const o=e.validateLink,r=e;r.__markstreamOriginalValidateLink=o,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===o?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return i(...l);const c=a.validateLink;a.validateLink=u;try{return i(...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=o;try{return s(...l)}finally{a.validateLink=u}})}function uwe(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},i=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),o=new B7e({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:i,...n}});if(!s){const r=l=>!Td(l,{tagName:"a",attrName:"href"});nCe(r),o.set({validateLink:r})}return awe(o),lwe(o),(e.enableMath??!0)&&nwe(o,{...e.mathOptions??{}}),(e.enableContainers??!0)&&nAe(o),e.enableFixIndentedCodeBlock!==!1&&SAe(o),lCe(o),dCe(o),uCe(o),gCe(o),iwe(o),wAe(o,{customHtmlTags:e.customHtmlTags}),o}function Ld(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=>Ld(n))),t}function cwe(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function dwe(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,i=n===""||n==="true";return{type:"checkbox_input",checked:i,raw:i?"[x]":"[ ]"}}function fwe(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function Am(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;on.startsWith(t)||t.startsWith(n)):!1}function HI(e,t,n,i){n.length>0&&e.push(...n),i.length>0&&t.push(...i),n.length=0,i.length=0}function WI(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function mwe(e,t){const n=[],i=[],s=[],o=[],r=e.split(pwe),l=/\r?\n$/.test(e),a=r.some(h=>h.startsWith("diff ")||h.startsWith("--- ")||h.startsWith("+++ ")||h.startsWith("@@ ")),u=h=>{const g=h;if(!cR.some(m=>g.startsWith(m)))if(g.startsWith("-")){const m=g.slice(1);s.push(WI(m,a))}else if(g.startsWith("+")){const m=g.slice(1);o.push(WI(m,a))}else{HI(n,i,s,o);const m=a&&g.startsWith(" ")?g.slice(1):g;n.push(m),i.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let h=0;h0||o.length>0)&&HI(n,i,s,o);const d=n.join(` -`),f=i.join(` -`);return{original:t&&l&&d?`${d} -`:d,updated:t&&l&&f?`${f} -`:f}}function e7(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},i=typeof n.closed=="boolean"?n.closed:void 0,s=i===!0||i!==!1&&t,o=String(e.info??""),r=o.startsWith("diff"),l=r?(()=>{const u=o,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():o;let a=String(e.content??"");if(!s&&e.markup){const u=e.markup[0],c=e.markup.length,d=hwe(u,c);d.test(a)&&(a=a.replace(d,""))}if(r){const{original:u,updated:c}=mwe(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t}}function vwe(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function ywe(){return{type:"hardbreak",raw:`\\ -`}}function kwe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o\s*$/.test(t)||dc.has(e)}function bwe(e){if(!e||e.length===0)return qI();const t=F3.get(e);if(t)return t;const n=e.map(yl).filter(Boolean);if(!n.length){const s=qI();return F3.set(e,s),s}const i={customTagSet:new Set(n),allowedTagSet:a9({customHtmlTags:e})};return F3.set(e,i),i}function pR(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function Awe(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,i=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof i=="string"?{raw:n,inner:i}:null}function Ov(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function Cwe(e,t,n){const i=e.slice();return Ov(i,"href")||i.push(["href",t]),n!=null&&!Ov(i,"title")&&i.push(["title",n]),i}function d8(e){return e.map(pR).join("")}function a2(e){const t=[],n=i=>{const s=String(i??"");if(!s)return;const o=t[t.length-1];if(o?.type==="text"){o.content=`${o.content}${s}`,o.raw=`${o.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const i of e)if(i){if(i.type==="reference"||i.type==="footnote_reference"){n(String(i.raw??""));continue}if("children"in i&&Array.isArray(i.children)){t.push({...i,children:a2(i.children)});continue}t.push(i)}return t}function wwe(e,t,n){let i=0;for(let s=t;s`;m.toLowerCase().includes(x.toLowerCase())||(m+=x),A=!0,y=!0}const b=[],C=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let v;for(;(v=C.exec(l))!==null;){const x=v[1],S=v[2]||v[3]||v[4]||"";b.push([x,S])}if(u?.has(a)){const x=Awe(e);return[{type:a,tag:a,attrs:b,content:x?x.inner:h.innerTokens.length?d8(h.innerTokens):"",children:h.innerTokens.length?i(h.innerTokens,s,o,r):[],raw:x?.raw??m,loading:e.loading||y,autoClosed:A},h.nextIndex]}return[{type:"html_inline",tag:a,attrs:b,content:m,children:g,raw:m,loading:y,autoClosed:A},h.nextIndex]}function gR(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=>gR(t)).join(""):String(e.content??"")}function Swe(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>gR(t)).join("")}function UI(e,t=!1){let n=e.attrs??[],i=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,i=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),o=n.find(d=>d[0]==="alt")?.[1],r=Swe(i??e);let l="";r?l=r:o!=null&&String(o).length>0?l=String(o):i?.content!=null&&String(i.content).length>0?l=String(i.content):Array.isArray(i?.children)&&i.children[0]?.content?l=String(i.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 _we(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function Iwe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function Ewe(e,t,n){const i=e.slice();return Pv(i,"href")||i.push(["href",t]),n!=null&&!Pv(i,"title")&&i.push(["title",n]),i}function Cm(e,t,n){const i=e[t],s=Mwe(i.attrs),o=String(Pv(s,"href")??""),r=Pv(s,"title"),l=r==null?null:String(r),a=Ewe(s,o,l);let u=t+1;const c=[];let d=!0;for(;uy.type==="strong_open")){const y=String(h.content??""),A=String(h.raw??y),b=Ld(h);b.content=y.slice(0,-2),b.raw=A.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=b}const g=as(f,void 0,void 0,n),m=g.map(y=>{const A=y;return"content"in y?String(A.content??""):String(A.raw??"")}).join("");return{node:{type:"link",href:o,title:l,text:m,children:g,raw:`[${m}](${o}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u0?i:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:o0?i:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:o?@[\\\]^_`{|}~]/,Hwe=/\p{P}/u,Wwe=/^[\x22\x27《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,qwe=/^[\x22\x27》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,Uwe=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,Kwe=/:\/\//,f8=1,mR=2,Vwe=4,Zwe=8,vR=16,Nu=32,u2=64,ep=128,yR=256,Gwe=512,tp=1024,Qwe=1982;function wm(e){let t=0;for(let n=0;n=t){n++,i++;continue}n++,i++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function fc(e){return!!e&&Pwe.test(e)}function hc(e){return!!e&&(jwe.test(e)||Hwe.test(e))}function bR(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&Wwe.test(e)}function AR(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&qwe.test(e)}function Jwe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!i||fc(i)?!1:!(hc(i)&&!bR(i,n)&&n&&!fc(n)&&!hc(n))}function Xwe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!n||fc(n)?!1:!(hc(n)&&!AR(n,i)&&i&&!fc(i)&&!hc(i))}function exe(e,t,n=0){let i=n,s=!1;for(;i0?e[t-1]:void 0,i=e[t+2];return!i||fc(i)?!1:!(hc(i)&&!bR(i,n)&&n&&!fc(n)&&!hc(n))}function nxe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!n||fc(n)?!1:!(hc(n)&&!AR(n,i)&&i&&!fc(i)&&!hc(i))}function ixe(e,t=0){let n=t,i=!1;for(;n=0&&e[o]==="\\";o--)s++;return s%2===1}const lxe=/[\p{L}\p{N}]/u,axe=/^[\p{L}\p{N}]+$/u;function h8(e){return e?lxe.test(e):!1}function CR(e){return e?axe.test(e):!1}function wp(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&i.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return i;n=i+s.len}return-1}function fxe(e){return e?Uwe.test(e)||Kwe.test(e):!1}function hxe(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function as(e,t,n,i){if(!e||e.length===0)return[];const s=i?.__linkifyDemotionContext,o=G0(t),r={filename:s?.filename||o.filename,explicitFilename:s?.explicitFilename||o.explicitFilename,marketTicker:s?.marketTicker||o.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(i={...i,__linkifyDemotionContext:r});const l=i,a=[];let u=null,c=0;const d=i?.requireClosingStrong,f=e;function h(){return e===f&&(e=e.slice()),e}function g(){u=null}function m(X,we){const Y=e.length===1?t:String(we.content??""),le=[],Ce=uxe(X);if(Ce!==-1){x(X.slice(0,Ce),X.slice(0,Ce));const oe=X.slice(Ce);return oe&&(D({type:"text",content:oe,raw:oe}),c--),c++,!0}if(Bwe.test(X)){const oe=X.indexOf("~~");oe!==-1&&le.push({type:"strikethrough",index:oe})}if(zwe.test(X)){const oe=X.indexOf("**");oe!==-1&&le.push({type:"strong",index:oe})}if(/[^*]*\*[^*]+/.test(X)){const oe=Y?kR(Y,0):X.indexOf("*");if(Y&&oe===-1)return!1;oe!==-1&&le.push({type:"emphasis",index:oe})}le.sort((oe,Q)=>oe.index!==Q.index?oe.index-Q.index:oe.type===Q.type?0:oe.type==="strong"?-1:Q.type==="strong"?1:0);const ae=le[0];if(!ae)return!1;if(ae.type==="strikethrough"){const oe=ae.index,Q=oe>-1?X.slice(0,oe):"";if(Q&&x(Q,Q),oe===-1)return c++,!0;const ne=X.indexOf("~~",oe+2),ge=ne===-1?X.slice(oe+2):X.slice(oe+2,ne),Ae=ne===-1?"":X.slice(ne+2),{node:_e}=VI([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:ge,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,i);return g(),v(_e),Ae&&(D({type:"text",content:Ae,raw:Ae}),c--),c++,!0}if(ae.type==="strong"){const oe=ae.index,Q=oe>-1?X.slice(0,oe):"";if(Q&&x(Q,Q),oe===-1)return c++,!0;if(t&&oe===0){let xe=!1,Ne=0;for(;Ne=2)return x(X,X),c++,!0}}if(t&&(X.match(/\*/g)||[]).length>Ywe(t))return x(X.slice(Q.length),X.slice(Q.length)),c++,!0;const ne=wp(X,oe);if(ne.len>=3){const xe=dxe(X,oe+ne.len);if(xe!==-1){const Ne=X.slice(oe+ne.len,xe);if(cxe(Ne)){const{node:et}=I1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Ne,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,i);g(),v(et);const ut=X.slice(xe+3);return ut&&(D({type:"text",content:ut,raw:ut}),c--),c++,!0}}}if(!txe(X,oe)){const xe=X.slice(oe,oe+ne.len);x(xe,xe);const Ne=X.slice(oe+ne.len);return Ne&&(D({type:"text",content:Ne,raw:Ne}),c--),c++,!0}const ge=ixe(X,oe+2);let Ae="",_e="";if(ge.index!==-1){Ae=X.slice(oe+2,ge.index),_e=X.slice(ge.index+2);const xe=ge.index,Ne=wp(X,xe);if(ne.intraword&&Ne.intraword&&!CR(Ae)||!Ae&&ne.len>=4&&ne.intraword)return x(X.slice(Q.length),X.slice(Q.length)),c++,!0}else{if(d||ge.sawInvalidClose||ne.intraword)return x(X.slice(Q.length),X.slice(Q.length)),c++,!0;Ae=X.slice(oe+2),_e=""}if(!Ae&&/^\*+$/.test(_e))return x(X,X),c++,!0;const{node:Ke}=I1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:Ae,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,i);return g(),v(Ke),_e&&(D({type:"text",content:_e,raw:_e}),c--),c++,!0}if(ae.type==="emphasis"){let oe=ae.index;oe===-1&&(oe=0);const Q=X.slice(0,oe);if(Q&&x(Q,Q),!Jwe(X,oe)){x(X[oe],X[oe]);const xe=X.slice(oe+1);return xe&&(D({type:"text",content:xe,raw:xe}),c--),c++,!0}const ne=wp(X,oe),ge=exe(Y,X,oe+1),Ae=ge.index,_e=e[c+1];if(i?.final&&_e?.type==="em_open"&&Ae!==-1&&X.slice(oe+1,Ae).trim()!==X.slice(oe+1,Ae)||Ae===-1&&(ge.sawInvalidClose||i?.final||ne.intraword||!h8(X[oe+1])))return x(X.slice(oe),X.slice(oe)),c++,!0;const{node:Ke}=Am([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Ae>-1?X.slice(oe+1,Ae):X.slice(oe+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,i);if(g(),v(Ke),Ae!==-1&&Ae{for(let Ke=0;Ke<_e.length;Ke++){if(_e[Ke]!=="`")continue;let xe=0;for(let Ne=Ke-1;Ne>=0&&_e[Ne]==="\\";Ne--)xe++;if(xe%2===0)return Ke}return-1})(X);if(le===-1)return!1;let Ce=1;for(let _e=le+1;_eae?.type==="math_inline")||!Rwe.test(X))return null;const Y=we.parseInline(X,{__markstreamFinal:!!i?.final});if(!Array.isArray(Y)||Y.length===0)return null;const le=(Y.find(ae=>ae?.type==="inline")?.children??[]).filter(ae=>!(ae?.type==="text"&&String(ae.content??"")===""));if(!le.length||!le.some(ae=>ae?.type!=="text")||le.length===1&&le[0]?.type==="text"&&String(le[0].content??"")===X)return null;const Ce=as(le,X,n,i);return Ce.length?Ce:null}function b(X){g(),a.push(X)}function C(X){g();const we=Ld(X);a.push(we)}function v(X){b(X)}function x(X,we){u?(u.content+=X,u.raw+=we??X):(u={type:"text",content:String(X??""),raw:String(we??X??"")},a.push(u))}function S(X,we){if(!X)return;const Y=as([{...we,type:"text",content:X,raw:X}],X,n,i);if(Y.length===1&&Y[0]?.type==="text"){const le=Y[0];x(String(le.content??""),String(le.raw??le.content??""));return}for(const le of Y)v(le)}function _(X,we){return String(X.markup??"").startsWith(we)}function I(X){if(!u||X.loading!==!0||X.markup!=="\\(\\)")return;const we=e[c-1];!we||we.type!=="text"||!_(we,"\\(")||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 M(X){return X.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 $(X,we,Y=wm(X)){let le=X;const Ce=String(we.content??"");return(Y&f8)!==0&&le.endsWith("\\")&&!_(we,"\\\\")&&!Ce.endsWith("\\\\")&&(le=le.slice(0,-1)),(Y&tp)!==0&&le.endsWith("(")&&!_(we,"\\(")&&!Ce.endsWith("\\(")&&(le=le.slice(0,-1)),(Y&mR)!==0&&/\*+$/.test(le)&&!_(we,"\\*")&&!Ce.endsWith("\\*")&&(le=le.replace(/\*+$/,"")),le}for(;c=0;xe--){const Ne=a[xe];if(Ne.type!=="text")break;ne=xe,ge=String(Ne.content??"")+ge}nene==="href")?.[1],Q=String(oe??"");if(t&&Q){const ne=t.indexOf("](");if(ne!==-1){const ge=t.indexOf(")",ne+2);ge===-1?Y.loading=!0:Y.loading&&t.slice(ne+2,ge).includes(Q)&&(Y.loading=!1)}}/^file:\/\/\/[a-z]:\//i.test(Y.href)&&z(Y,we-1)||q(Y)||b(Y)}function P(X){if(X.markup!=="linkify")return!1;const{node:we,nextIndex:Y}=Cm(e,c,i);return W(we,Y)?(c=Y,!0):!1}function R(X){g(),v(Twe(X)),c++}function q(X){if(X.type!=="link")return!1;const we=a[a.length-1];if(!we||we.type!=="text")return!1;const Y=String(we.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!Y)return!1;const le=X,Ce=String(le.href??""),ae=String(le.text??""),oe=String(Y[2]??""),Q=Ce.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!Ce||!(ae===Ce||ae===Q||fxe(ae)))return!1;const ne=String(Y[1]??"");return ne?(we.content=ne,we.raw=ne):a.pop(),b({...X,text:oe,children:[{type:"text",content:oe,raw:oe}],raw:`[${oe}](${Ce}${le.title?` "${le.title}"`:""})`}),!0}function j(X){if(X.type!=="link")return!1;const we=X,Y=String(we.href??"");return Y?W({href:Y,title:we.title==null||we.title===""?null:String(we.title),loading:!!we.loading},c+1):!1}function W(X,we){const Y=a[a.length-1];if(Y?.type!=="image"||Y.src||!Y.loading||!String(Y.raw??"").endsWith("]("))return!1;const le=e[we],Ce=String(le?.content??"");if(le?.type!=="text"||!Ce.startsWith(")"))return!1;a.pop(),u=null;const ae=String(Y.alt??"");b({type:"image",src:X.href,alt:ae,title:X.title,raw:`![${ae}](${X.href}${X.title?` "${X.title}"`:""})`,loading:!!X.loading});const oe=Ce.slice(1),Q=Ld(le);return Q.content=oe,Q.raw=oe,h()[we]=Q,!0}function z(X,we=c-1){if(X.type!=="link")return!1;const Y=a[a.length-1],le=e[we];if(!Y||Y.type!=="text"||le?.type!=="text")return!1;const Ce=String(Y.content??""),ae=String(le.content??"");if(!Ce.endsWith("!")||!ae.endsWith("!")||_(le,"\\!"))return!1;const oe=Ce.slice(0,-1);oe?(Y.content=oe,Y.raw=oe,u=Y):(a.pop(),u=null);const Q=X,ne=String(Q.text??Q.children?.map(_e=>String(_e?.content??_e?.raw??"")).join("")??""),ge=String(Q.href??""),Ae=Q.title==null||Q.title===""?null:String(Q.title);return b({type:"image",src:ge,alt:ne,title:Ae,raw:`![${ne}](${ge}${Ae?` "${Ae}"`:""})`,loading:!!Q.loading}),!0}function H(X,we="",Y=null){const le=String(X.alt??X.raw??"");return{type:"link",href:we,title:Y,text:le,children:[X],raw:`[${le}](${we}${Y?` "${Y}"`:""})`,loading:!0}}function ee(X){const we=X.startsWith("![")?X:`![${X}`,Y=we.slice(2),le=Y.indexOf("](");return{type:"image",src:"",alt:le===-1?Y.replace(/\]$/,""):Y.slice(0,le),title:null,raw:we,loading:!0}}function V(X){const we=X.indexOf("[![");if(we===-1||typeof t=="string"&&e.length===1&&rxe(t,we,"["))return!1;const Y=X.slice(0,we);return Y&&x(Y,Y),b(H(ee(X.slice(we+1)))),c++,!0}function ie(X){if(i?.final)return!1;const we=e[c-1];if(we?.type!=="text"||!String(we.content??"").endsWith("[")||_(we,"\\["))return!1;const Y=a[a.length-1];if(Y?.type==="text"&&Y.content.endsWith("[")){const le=Y.content.slice(0,-1);le?(Y.content=le,Y.raw=le,u=Y):(a.pop(),u=null)}return b(H(UI(X))),c++,!0}function se(X){if(X.type!=="link")return!1;const we=X,Y=String(we.raw??""),le=String(we.text??"");if(!Y.startsWith("[![")&&!le.startsWith("!["))return!1;const Ce=we.title==null||we.title===""?null:String(we.title);return b(H({type:"image",src:String(we.href??""),alt:le.replace(/^!\[/,"").replace(/\]$/,""),title:Ce,raw:Y.startsWith("[![")?Y.slice(1):Y,loading:!0})),!0}function Z(X){if(!X.startsWith("]("))return!1;const we=e[c-2];if(we?.type==="text"&&String(we.content??"").endsWith("[")&&_(we,"\\["))return!1;const Y=a[a.length-1];if(Y?.type!=="image"&&Y?.type!=="link")return!1;const le=Y,Ce=Y?.type==="link"&&Array.isArray(le.children)&&le.children.length===1&&le.children[0]?.type==="image"?a.pop():null,ae=Ce?Ce.children[0]:a.pop();if(!ae||ae.type!=="image")return!1;const oe=e[c+1];let Q=String(Ce?.href??""),ne=Ce?.title==null?null:String(Ce.title),ge=!0;if(oe?.type==="link_open"){const{node:_e,nextIndex:Ke}=Cm(e,c+1,i);Q=_e.href,ne=_e.title,ge=!0,c=Ke}else{if(Q=X.slice(2),Q.includes('"')){const _e=Q.split('"');Q=String(_e[0]??"").trim(),ne=_e[1]==null?null:String(_e[1]).trim()}c++}const Ae=H(ae,Q,ne);return Ae.loading=ge,b(Ae),!0}function pe(){const X=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&X?.type==="text"&&String(X.content??"").endsWith("[")&&_(X,"\\[")}function re(X,we){const Y=X.indexOf("[");if(Y===-1)return!1;let le=X.slice(0,Y);const Ce=X.indexOf("](",Y);if(Ce!==-1){const ae=e[c+2];let oe=X.slice(Y+1,Ce);if(oe.includes("[")){const xe=oe.indexOf("[");le+=X.slice(0,Y+xe+1);const Ne=Y+xe+1;oe=X.slice(Ne+1,Ce)}const Q=e[c+1];if(X.endsWith("](")&&Q?.type==="link_open"&&ae){const xe=e[c+4];let Ne=4,et=!0;if(xe?.type==="text"){const yt=String(xe.content??"");if(yt.startsWith(")")){et=!1;const Mt=yt.slice(1);if(Mt){const Ze=Ld(xe);Ze.content=Mt,Ze.raw=Mt,h()[c+4]=Ze}else Ne++}else yt==="."&&Ne++}S(le,we);const ut=String(ae.content??"");return i?.validateLink&&!i.validateLink(ut)?x(oe,oe):b({type:"link",href:ut,title:null,text:oe,children:[{type:"text",content:oe,raw:oe}],loading:et}),c+=Ne,!0}const ne=X.indexOf(")",Ce),ge=ne!==-1?X.slice(Ce+2,ne):"",Ae=ne===-1;let _e=le.match(/\*+$/);if(_e&&(le=le.replace(/\*+$/,"")),S(le,we),_e||(_e=oe.match(/^\*+/)),!d&&_e){const xe=_e[0].length;oe=oe.replace(/^\*+/,"").replace(/\*+$/,"");const Ne=[];if(xe===1?Ne.push({type:"em_open",tag:"em",nesting:1}):xe===2?Ne.push({type:"strong_open",tag:"strong",nesting:1}):xe===3&&(Ne.push({type:"strong_open",tag:"strong",nesting:1}),Ne.push({type:"em_open",tag:"em",nesting:1})),Ne.push({type:"link",href:ge,title:null,text:oe,children:[{type:"text",content:oe,raw:oe}],loading:Ae}),xe===1){Ne.push({type:"em_close",tag:"em",nesting:-1});const{node:et}=Am(Ne,0,i);v(et)}else if(xe===2){Ne.push({type:"strong_close",tag:"strong",nesting:-1});const{node:et}=I1(Ne,0,void 0,i);v(et)}else if(xe===3){Ne.push({type:"em_close",tag:"em",nesting:-1}),Ne.push({type:"strong_close",tag:"strong",nesting:-1});const{node:et}=I1(Ne,0,void 0,i);v(et)}else{const{node:et}=Am(Ne,0,i);v(et)}}else i?.validateLink&&!i.validateLink(ge)?x(oe,oe):b({type:"link",href:ge,title:null,text:oe,children:[{type:"text",content:oe,raw:oe}],loading:Ae});const Ke=ne!==-1?X.slice(ne+1):"";return Ke&&(D({type:"text",content:Ke,raw:Ke}),c--),c++,!0}return!1}function fe(X){const we=X.indexOf("![");if(we===-1)return!1;const Y=X.slice(0,we);return Y&&!u?u={type:"text",content:Y,raw:Y}:Y&&u&&(u.content+=Y),u&&(a.push(u),u=null),b(ee(X.slice(we))),c++,!0}function Ee(X){if(!(X?.startsWith("[")&&n?.type==="list_item_open"))return!1;const we=X.slice(1).match(/[^\s\]]/);if(we===null)return c++,!0;if(we&&/x/i.test(we[0])){const Y=we[0]==="x"||we[0]==="X";return b({type:"checkbox_input",checked:Y,raw:Y?"[x]":"[ ]"}),c++,!0}return!1}return a}function n7(e,t,n){const i=n?.__sourceLineMapper;if(!i)return{startLine:e,endLine:t};const s=i(e),o=t>e?i(t-1).endLine:i(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,o)}}function ZI(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let i=0;for(let s=0;si&&e[s-1]!==` -`&&r++,{startLine:o,endLine:r}}function m0(e,t,n,i){const s=pxe(e,t,n);return n7(s.startLine,s.endLine,i)}function gxe(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const i=Number(n[0]),s=Number(n[1]);return!Number.isFinite(i)||!Number.isFinite(s)?null:n7(i,s,t)}function Jn(e,t,n){if(!n?.includeSourceMap)return e;const i=gxe(t,n);if(!i)return e;if(e.sourceMap=i,e.type==="code_block"){const s=e;s.startLine=i.startLine,s.endLine=i.endLine}return e}function mxe(e,t,n,i){if(!i?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const o=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(o)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=n7(o,Math.max(r,l),i)),e}function vxe(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??""),r=o.replace(/[ \t\r\n]+$/g,"");if(r===o)break;if(r){s.content=r;break}i.pop();continue}break}}function yxe(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 i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(o)){i.pop();continue}const r=o.replace(/[ \t\r\n\d.)]+$/g,"");r!==o&&(r?s.content=r:i.pop())}break}}function kxe(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Vh(e,t,n){const i=e[t],s=[],o=Tc(n,!0);let r=t+1;for(;rd.raw).join("")};n?.includeSourceMap&&Jn(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:i.type==="ordered_list_open",start:(()=>{if(i.attrs&&i.attrs.length){const a=i.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&&Jn(l,i,n),[l,r+1]}function bxe(e,t,n,i){const s=String(n[1]??"note"),o=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=Tc(i,!0);let a=t+1;for(;au.raw).join(` -`)} -:::`},a+1]}const Axe=new Set(["warning","info","note","tip","danger","caution"]);function Cxe(e){let t=0;for(;t=0;m--){const y=f[m];if(y.type==="text"&&/:+/.test(y.content)){h=m;break}}const g={type:"paragraph",children:as((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&&Jn(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]=Vh(e,u,a.options());n?.includeSourceMap&&Jn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=Zh(e,u,a.options());n?.includeSourceMap&&Jn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=o9(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:o,children:l,raw:`:::${s} ${o} -${l.map(d=>d.raw).join(` -`)} -:::`},u+1]}const xxe=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Sxe(e,t,n){const i=e[t];if(i.type!=="container_open")return null;const s=xxe.exec(String(i.info??""));return s?bxe(e,t,s,n):null}const i7={parseContainer:(e,t,n)=>wxe(e,t,n),matchAdmonition:Sxe};function Zh(e,t,n){const i=[],s=Tc(n,!0);let o=t+1;for(;ol.raw).join(` -`)};return n?.includeSourceMap&&Jn(r,e[t],n),[r,o+1]}function _xe(e){if(e.info?.startsWith("diff"))return e7(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let i=t;n?.[1]&&(i=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:i,raw:i,loading:!s}}function Ixe(e,t,n){const i=[];let s=t+1,o=[],r=[];const l=Tc(n,!0);for(;su.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a0&&(i.push({type:"definition_item",term:o,definition:r,raw:`${o.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` -`)}`}),o=[]),s=a+1}else s++;return[{type:"definition_list",items:i,raw:i.map(a=>a.raw).join(` -`)},s+1]}function Mxe(e,t,n){const i=e[t].meta??{},s=String(i?.label??"0"),o=[],r=Tc(n,!0);let l=t+1;for(;la.raw).join(` -`)}`},l+1]}function Exe(e,t,n){const i=e[t],s=i.attrs,o=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(i.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...o?{attrs:o}:{},children:as(a.children||[],u,void 0,n),raw:u}}function Txe(e,t,n){const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${i}(?=\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 wR(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!y.includes(">");else if(u)u=!y.includes("?>");else if(y.startsWith("");else if(y.startsWith("");else if(y.startsWith("");else{const A=s(y);if(A)if(A.closing){for(let b=r.length-1;b>=0;b--)if(r[b]===A.tag){r.length=b;break}}else A.selfClosing||o(A.after,A.tag)||r.push(A.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function gSe(e,t,n){if(!n?.length)return!1;const i=new Set(sf(n));if(!i.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===":"},o=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const y=c.indexOf(">",d);if(y===-1)return null;let A=y-1;for(;A>=0&&o(c[A]);)A--;return{closing:f,tag:g,selfClosing:!f&&c[A]==="/",after:c.slice(y+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=Gh(h);if(g){const m=r(h.slice(g.index));if(m)if(m.closing){for(let y=a.length-1;y>=0;y--)if(a[y]===m.tag){a.length=y;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 mSe(e,t){const n=Kxe.exec(e);if(!n)return null;const i=n[1]??"",s=n.index+i.length,o=e.indexOf(` -`,s),r=e.slice(s,o===-1?e.length:o);return!Gh(r.endsWith("\r")?r.slice(0,-1):r)||FR(e,s)||pSe(e,s)||gSe(e,s,t)?null:`${e.slice(0,n.index)}${i}`}function c7(e,t,n){let i=t;for(;ii&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,o+=2;continue}o++;continue}if(t.inDollarMath){if(e.startsWith("$$",o)&&!ca(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,o+=2;continue}o++;continue}if(e[o]==="`"&&!ca(e,l)){const a=c7(e,o,"`"),u=DR(e,o+a,a);if(u===-1)break;o=u+a;continue}if(e.startsWith("\\[",o)&&!ca(e,l)){t.inMath=!0,t.mathOpenOffset=n+o,o+=2;continue}if(e.startsWith("$$",o)&&!ca(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+o,o+=2;continue}o++}return r}function vSe(e,t){if(!J6(t))return e;const n=t,i=XI.get(n),s=i?.source===e?i.state:i&&e.startsWith(i.source)?$R(i.state,e.slice(i.source.length),i.source.length-i.state.lineBuffer.length).state:l9(e).state;XI.set(n,{source:e,state:s});const{context:o}=s,r=o.inMath?o.mathOpenOffset:o.inDollarMath?o.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 ju(l)&&!c?e:e.slice(0,r)}function ySe(e,t,n,i,s){const o=r7(e),r=l7(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&a7(e)==null&&O3(t),t.inFence&&t.fenceInList&&e.trim()&&o.column=t.fenceLen&&/^\s*$/.test(l.rest)&&O3(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&&o.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return iM(e,t,n,i,s)}else return iM(e,t,n,i,s);return!1}function l9(e,t=uSe(),n=null,i=!1,s=0){const o=Sp(t);let r=Sp(t),l="",a=!1,u=0;for(;uu&&e[c-1]==="\r"?c-1:d?c:e.length,h=e.slice(u,f);ySe(h,o,s+u,n,i)&&(a=!0),d?(r=Sp(o),l=""):l=h,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:o,lineBuffer:l}}}function $R(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:Sp(e.committedContext),context:Sp(e.context),lineBuffer:e.lineBuffer+t}}:l9(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function kSe(e,t){if(!J6(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const i=e,s=r9.get(i);if(s?.source===t)return;const o=s?t.startsWith(s.source):!1,r=o&&s?t.slice(s.source.length):"",l=o&&s?$R(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):l9(t),a=l.state,u=o&&s?l.closedOpenMath:!1;if(s&&o&&s.key===null&&s.pendingCandidate===!1&&!u&&!hSe(s.source,r)&&!dSe(t)){s.source=t,s.explicitBracketMath=a;return}const c=ewe(t);(s&&(s&&!o||s.key!==c||u)||!s&&c)&&n.reset(),cSe(e,t,c,a)}function bSe(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function BR(e,t){const n=e?.map,i=t?.map;return n===i?!0:!Array.isArray(n)||!Array.isArray(i)?!1:n.length===i.length&&n.every((s,o)=>s===i[o])}function ASe(e,t){const n=e?.attrs,i=t?.attrs;if(n===i)return!0;if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length)return!1;for(let s=0;s":""}function lM(e){return{type:"paragraph",children:e,raw:e.map(SSe).join("")}}function aM(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function uM(e,t){if(e.type!=="paragraph")return null;const n=e.children,i=Array.isArray(n)?n:[];if(i.length===0)return null;const s=sSe(t);if(!s?.size)return null;let o=-1;for(let c=0;ch?.type==="hardbreak")){o=c;break}}if(o===-1)return null;const r=i.slice(0,o),l=i[o];if(!l)return null;const a=[];r.length&&a.push(lM(r)),a.push(l);const u=i.slice(o+1);return u.length&&a.push(lM(u)),a}function _Se(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),i=/<\/html>\s*$/i.test(t);return!n||!i?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function _p(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function ISe(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*${ql(t)}\s*>\s*$`,"i").test(n)}const j3=new Set(["iframe","script","style","textarea","title"]);function Y0(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:C===-1?e.length:C+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:C===-1?e.length:C+3,selfClosing:!1,tag:""}}const h=ys(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 y=m.slice(1).trimStart();const A=y.startsWith("/");A&&(y=y.slice(1).trimStart());const b=y.match(/^([A-Z][\w:-]*)/i);return b?.[1]?{closing:A,end:g,selfClosing:/\/\s*>$/.test(m),tag:b[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},o=(f,h)=>{const g=new RegExp(String.raw`<\s*\/\s*${ql(f)}(?=\s|>)`,"gi");g.lastIndex=h;const m=g.exec(e);if(!m||m.index==null)return null;const y=s(m.index);return y?{start:m.index,end:y.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(j3.has(i)){const f=o(i,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 cM(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function TSe(e,t,n){return n?e.includes(n,t)?!0:cM(e.slice(Math.max(0,t))).includes(cM(n)):!1}function LSe(e,t){let n=Math.max(0,t);for(;n)`,"gi");let i=-1,s;for(;(s=n.exec(e))!==null;)i=s.index;return i}function RR(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const FSe=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),DSe=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function $Se(e){return/\n\s*\n/.test(e)||DSe.test(e)}function BSe(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(i=>FSe.has(String(i?.type??"").toLowerCase()))||t.some(i=>{if(i?.type!=="html_block")return!1;const s=i;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!$Se(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function zSe(e){const t=[];let n=0;for(;n=e.length)break;const i=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!i?.[1])return null;const s=Y0(e,i[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function RSe(e,t,n,i){const s=n.customHtmlTags?.join("\0")??"",o=t,r=JI.get(o),l=r&&r.final===i&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:kh(u,t,n));return JI.set(o,{blocks:e,children:a,customHtmlTags:s,final:i,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function OSe(e,t,n,i){return e.map(s=>{if(s?.type!=="html_block")return s;const o=s,r=String(o.tag??"").toLowerCase();if(!r||r==="details"||zz.has(r)||Array.isArray(o.children))return s;const l=String(s.raw??o.content??"");if(!l)return s;const a=ys(l);if(a===-1)return s;const u=Y0(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=RR(n,i),g=d?null:zSe(f),m=g?RSe(g,t,h,i):kh(f,t,h);return BSe(f,m)?{...s,children:m}:s})}function PSe(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function kh(e,t,n){return e.trim()?PR(e,t,{...n,__disableStreamParse:!0,__disableStructuredReuse:!0}):[]}function jSe(e,t,n){const i=kh(e,t,n),s=i[0];return i.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:i}function HSe(e,t,n){const i=wR({content:e}),s=ys(e),o=zR(e,"summary");if(s!==-1&&o!==-1&&o>=s+1){const r=jSe(e.slice(s+1,o),t,n);r.length>0&&(i.children=r)}return i.raw=e,i}function WSe(e,t,n){const i=ys(e);if(i===-1)return[];const s=e.slice(i+1);if(!s.trim())return[];const o=Y0(s,"summary",0);if(!o)return kh(s,t,n);const r=s.slice(0,o.start),l=s.slice(o.end);return[...kh(r,t,n),HSe(o.raw,t,n),...kh(l,t,n)]}function OR(e,t,n,i,s,o=0){const r=[];let l=o;for(let a=0;a{const z=zR(f,"details");return z!==-1?f.slice(0,z):f})():f,[C]=OR(A?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,i,s,h+f.length),v=WSe(b,n,RR(i,s)),x=m===-1?"":String(e[m].raw??_p(e[m])??""),S=A||m!==-1&&y?.closed===!0,_=x.replace(/[\t\r\n ]+$/,""),I=S?(()=>{const z=(y?.raw??"").lastIndexOf(_);return z===-1?t.length:h+z})():t.length,M=ys(f),$=A&&M!==-1?h+M+1:h+f.length,D=t.slice($,I===-1?t.length:I),T=n.parse(D,{__markstreamFinal:s}),N=n.renderer.render(T,n.options,{__markstreamFinal:s}),O=I+_.length,P=S?Math.max(I+x.length,LSe(t,O)):t.length,R=S?t.slice(I,P):x,q=S?t.slice(h,P):t.slice(h),j=A&&M!==-1?f.slice(0,M+1):f,W={...u,tag:"details",attrs:s9(f.slice(0,M+1)),raw:q,content:`${j}${N}${R}`,children:[...v,...C],loading:!s&&!S};if(i.includeSourceMap&&(W.sourceMap=m0(t,h,S?P:t.length,i)),r.push(W),l=S?P:t.length,m===-1&&!A)break;m!==-1&&(a=m)}return[r,l]}function qSe(e,t,n,i){if(!n)return e;const s=e.slice();let o=0;for(let r=0;r=d.start&&M.end<=d.end){s.splice(S,1);continue}break}x=I+_.length,s.splice(S,1)}}return s}function USe(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 y=m.charCodeAt(0);return y>=65&&y<=90||y>=97&&y<=122},c=m=>{const y=m.charCodeAt(0);return y>=48&&y<=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"||y==='"'||y==="'"||y==="`")break;a++}if(a>=l.length)return!0}}}return!0},i=(l,a)=>FR(l,a),s=String(e??""),o=s.lastIndexOf("<");if(o===-1||i(s,o))return s;if(o>0){const l=s[o-1],a=l===" "||l===" "||l===` -`||l==="\r",u=s[o-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(o);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` -`||r[1]==="\r")||!n(r)?s:s.slice(0,o)}function fM(e,t){if(e===t)return;const n=e.split(/\r?\n/),i=t.split(/\r?\n/),s=[];let o=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 i=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===":"},o=g=>{if(!g)return!1;if(g[0]===" ")return!0;let m=0;for(let y=0;y=4)return!0;continue}if(A===" ")return!0;break}return!1},r=g=>{let m=!1,y=!1;for(let A=0;A")return A}return-1},l=g=>{let m=0;for(;m{if(o(g))return-1;const y=g.replace(/^[ \t]+/,"");if(!y||y.startsWith(">")||y.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(y))return-1;let A=!1,b=0;for(;b=x.length){A=!0,b++;continue}const _=x[S];if(_==="!"||_==="?"){A=!0,b+=v+1;continue}if(_==="/"){A=!0,b+=v+1;continue}const I=S;for(;S"&&$!=="/"){A=!0,b++;continue}const D=new RegExp(String.raw`<\s*\/\s*${M}\s*>`,"i"),T=/\/\s*>$/.test(x),N=D.test(g.slice(b+v+1)),O=D.test(e.slice(m+b+v+1)),P=/[\r\n]/.test(e.slice(m+b+v+1));if(A&&n.has(M)&&!T&&!N&&(O||P))return b;A=!0,b+=v+1}return-1};let u=!1,c="",d=0,f="",h=0;for(;hh&&e[g-1]==="\r",A=m?y?g-1:g:e.length,b=e.slice(h,A),C=m?y?`\r -`:` -`:"",v=l(b);let x=b;if(!u&&!v){const S=a(b,h);if(S!==-1){const _=C||` -`;x=`${b.slice(0,S).replace(/[ \t]+$/,"")}${_}${_}${b.slice(S).replace(/^[ \t]+/,"")}`}}f+=x,f+=C,v&&(u?v.markerChar===c&&v.markerLen>=d&&/^\s*$/.test(v.rest)&&(u=!1,c="",d=0):(u=!0,c=v.markerChar,d=v.markerLen)),h=m?g+1:e.length}return f}function VSe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const i=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==="-"},o=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 y=m+1;for(;y=d.length||d[y]!=="/"){m=d.indexOf("<",m+1);continue}for(y++;yd.length){m=d.indexOf("<",m+1);continue}let A=!0;for(let C=0;C="A"&&v<="Z"?String.fromCharCode(v.charCodeAt(0)+32):v)!==g[C]){A=!1;break}}if(!A){m=d.indexOf("<",m+1);continue}let b=y+g.length;if(b")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 ZSe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const i=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,y=e.slice(d,m),A=h?g?`\r -`:` -`:"",b=s(y),C=b?.prefix??"",v=b?.content??y,x=o(v);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=v;if(!l&&S.includes("{if(D.replace(/^[\t ]+/,"").startsWith("|"))return I;const T=D.slice(0,$).replace(/^[\t ]+/,"");if(T.length>0){const N=M.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",O=T.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!N||!O||N!==O)return I}return`${M} - -`});if(C){const _=C+S.split(` -`).join(` -${C}`);c+=_}else c+=S;c+=A,d=h?f+1:e.length}return c}function GSe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(T=>String(T??"").toLowerCase()));if(!n.size)return e;const i=T=>T===" "||T===" ",s=T=>{if(!T)return!1;if(T[0]===" ")return!0;let N=0;for(let O=0;O=4)return!0;continue}if(P===" ")return!0;break}return!1},o=T=>{const N=T.charCodeAt(0);return N>=65&&N<=90||N>=97&&N<=122||N>=48&&N<=57||T==="_"||T==="-"||T===":"},r=T=>{let N=0;for(;N{let N=0,O=!1,P=0;for(;N=T.length||T[N]!==">")break;for(O=!0,N++;Nr(T).startsWith("<"),u=T=>{for(let N=0;N{if(s(T))return"";const N=r(T);if(!N.startsWith("<"))return"";let O=1;for(;O=N.length||N[O]==="/"||N[O]==="!"||N[O]==="?")return"";const P=O;for(;O"&&q!=="/"?"":R},d=T=>{if(s(T))return null;const N=r(T);if(!N.startsWith("<"))return null;let O=1;for(;O=N.length)return null;const P=N[O]==="/";if(P)for(O++;O"&&W!=="/")return null;if(P)return{type:"close",name:j};if(/\/\s*>\s*$/.test(N))return{type:"open",name:j,complete:!0};const z=N.indexOf(">",O);if(z!==-1){const H=N.slice(z+1);if(new RegExp(`<\\s*\\/\\s*${j}\\s*>`,"i").test(H))return{type:"open",name:j,complete:!0}}return{type:"open",name:j,complete:!1}},f=T=>{if(s(T))return null;const N=r(T).replace(/[ \t]+$/,"");if(!N.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(N))return null;const O=N.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(O?.[1])return O[1].toLowerCase();const P=N.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!P?.[1]||!P[2])return null;const R=P[1].toLowerCase();return R===P[2].toLowerCase()?R:null};let h=!1,g="",m=0;const y=T=>{let N=0;for(;Ny(T),b=T=>{const N=r(T);return N?s(T)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(N):!1},C=(T,N,O)=>{let P=T,R=0;for(;PP&&e[q-1]==="\r",z=j?W?q-1:q:e.length,H=e.slice(P,z),ee=l(H),V=ee?.key??"";if(R>0&&N&&V!==N)break;const ie=ee?.content??H,se=d(ie);if(se?.name===O){if(se.type==="open")se.complete||R++;else if(R>0&&(R--,R===0))return!1}else if(R>0&&(u(ie)||b(ie)))return!0;if(j)P=q+1;else break}return!1};let v="",x=0,S=!0,_=!1,I=!1,M=` -`;const $=[];let D="";for(;xx&&e[T-1]==="\r",P=N?O?T-1:T:e.length,R=e.slice(x,P),q=N?O?`\r -`:` -`:"",j=l(R),W=j?.key??"",z=j?.content??R,H=A(z);H&&(h?H.markerChar===g&&H.markerLen>=m&&/^\s*$/.test(H.rest)&&(h=!1,g="",m=0):(h=!0,g=H.markerChar,m=H.markerLen));const ee=$.length>0;if(!h&&!ee){const ie=c(z),se=!!ie&&!S&&_&&I&&C(x,W,ie);ie&&!S&&(!_||se)&&(W&&D&&W===D?v+=`${W}${M}`:W||(v+=M))}if(v+=R,v+=q,q&&(M=q),!h){const ie=d(z);if(ie){if(ie.type==="open")ie.complete||$.push(ie.name);else for(let se=$.length-1;se>=0;se--)if($[se]===ie.name){$.length=se;break}}}const V=u(z);S=V,_=!V&&a(z),I=!V&&!!f(z),D=W,x=N?T+1:e.length}return v}function QSe(e){let t=!1,n="",i=0,s=!1,o=!1,r=!1,l=0;const a=(c,d)=>{const f=u7(c);if(f){t?f.markerChar===n&&f.markerLen>=i&&/^\s*$/.test(f.rest)&&(t=!1,n="",i=0):(t=!0,n=f.markerChar,i=f.markerLen);return}if(t)return;let h=0;for(;h{for(;l=c?c:d,h=f>l&&e[f-1]==="\r"?f-1:f;if(a(e.slice(l,h)),d===-1||d>=c){l=c;break}r=!1,l=d+1}},inMath:()=>s||o||r}}function H3(e,t,n,i){let s=e.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2");const o=QSe(s);if(s=s.replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,(r,l,a,u)=>{o.scanTo(u+1);const c=o.inMath();return o.scanTo(u+r.length),c?`${l}\\n${a}`:r}),t||(s.endsWith("- *")&&(s=s.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*-\s*$/,r=>r.startsWith(` -`)?` -`:""):/(?:^|\n)\s*--\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*--\s*$/,r=>r.startsWith(` -`)?` -`:""):/(?:^|\n)\s*>\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*>\s*$/,r=>r.startsWith(` -`)?` -`:""):/\n\s*[*+]\s*$/.test(s)?s=s.replace(/\n\s*[*+]\s*$/,` -`):/(?:^|\n)\s*\d+\s*$/.test(s)?/^\d+$/.test(s.trim())||(s=s.replace(/(?:^|\n)\s*\d+\s*$/,r=>r.startsWith(` -`)?` -`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(s)?s=s.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(r,l,a)=>`${l}${a.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*\d+[.)]\s*$/,r=>r.startsWith(` -`)?` -`:""):/\n[[(]\n*$/.test(s)&&(s=s.replace(/(\n\[|\n\()+\n*$/g,` -`)),s=mSe(s,i.customHtmlTags)??s),i.customHtmlTags?.length&&s.includes("<")){const r=sf(i.customHtmlTags);if(r.length&&(s=KSe(s,r),s=VSe(s,r),s=GSe(s,r),s=ZSe(s,r),s.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");s=s.replace(a,"$1$2$2")}}return t||(s=USe(s)),s}function YSe(e,t,n,i){const s=e,o=`${n?"final":"stream"}:${(i.customHtmlTags??[]).join(",")}`,r=g8.get(s);let l;if(!n&&!i.customHtmlTags?.length&&r&&r.mode===o&&t.length>=r.source.length&&t.startsWith(r.source)){const a=Math.max(0,r.source.length-Vxe-Zxe),u=H3(t.slice(a),n,e,i),c=r.source.length-a;l=u.length>=c&&u.slice(0,c)===r.safeMarkdown.slice(-c)?r.safeMarkdown.slice(0,r.safeMarkdown.length-c)+u:H3(t,n,e,i)}else l=H3(t,n,e,i);return n||(l=vSe(l,e)),g8.set(s,{source:t,safeMarkdown:l,mode:o}),l}function PR(e,t,n={}){const i=IR(n),s=i?El():0,o=!!n.final,r=(e??"").toString();lSe(t,n)&&(t.stream.reset(),aSe(t),g8.delete(t));const l=YSe(t,r,o,n);i&&Ju(i,"safeMarkdownMs",El()-s);const a=_Se(l);if(a){if(n.includeSourceMap){const x={...n,__sourceLineMapper:fM(r,l)};a[0].sourceMap=m0(l,0,l.length,x)}const C=n.preTransformTokens,v=n.postTransformTokens;if(o7(t,n)||typeof C=="function"||typeof v=="function"){const x=rM(t,l,{__markstreamFinal:o},n),S=typeof C=="function"&&C(x)||x;typeof v=="function"&&v(S)}return eM(a,n,i,s)}const u=i?El():0,c=rM(t,l,{__markstreamFinal:o},n);if(i&&Ju(i,"tokenizeMs",El()-u),!c||!Array.isArray(c))return eM([],n,i,s);const d=n.preTransformTokens,f=n.postTransformTokens;let h=c;d&&typeof d=="function"&&(h=d(h)||h);const g=t,m=typeof g.validateLink=="function"&&g.__markstreamOriginalValidateLink&&g.validateLink!==g.__markstreamOriginalValidateLink?g.validateLink:void 0,y=n.validateLink??m??g.options?.validateLink??(typeof g.validateLink=="function"?g.validateLink:void 0),A={...n,validateLink:y,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?fM(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let b=iSe(t,l,h,A,i);if(f&&typeof f=="function"){const C=f(h);if(Array.isArray(C)){const v=C[0],x=v?.type;v&&typeof x=="string"?b=Wf(C,{...A,__customHtmlBlockCursor:0},i):b=C}}if(PSe(b)){const C=i?El():0;b=qSe(b,o,l,A),b=OR(b,l,t,A,o)[0],b=OSe(b,t,A,o),i&&Ju(i,"htmlBlockPassesMs",El()-C)}if(o){const C=new WeakSet,v=x=>{if(!x||typeof x!="object"||C.has(x))return;if(C.add(x),Array.isArray(x)){for(const _ of x)v(_);return}const S=x;S.type==="html_block"&&S.loading===!0&&(S.loading=!1);for(const _ of Object.values(S))v(_)};v(b)}return b=ER(b,n),n.debug&&console.log("Parsed Markdown Tree Structure:",b),MR(b,i,s)}function hM(e,t){if(!e||!Array.isArray(e))return[];const n=[],i=Tc(t),s=t?.__linkifyDemotionSeed;if(Array.isArray(s)&&s.length)for(const l of s)i.remember(String(l??""));const o=t?.includeSourceMap===!0;let r=0;for(;rd.type==="html_block")){if(o)for(const d of c)Jn(d,a,t);for(const d of c)ia(d,a,t);n.push(...c)}else{const d={type:"paragraph",raw:u,children:c};o&&Jn(d,a,t);const f=uM(d,t);if(f){o&&aM(f,d);for(const h of f)ia(h,a,t);n.push(...f)}else ia(d,a,t),n.push(d)}i.remember(u)}r+=1;break;default:r+=1;break}}return n}const JSe=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g,Ip=/\d/u,XSe=/[,.!?;:,。;、!?:]/u,e_e=/\d\p{Script=Han}{1,3}$/u;function t_e(e){return e.pos>0&&e.pos+1{const u=l,c=u.posMax,d=u.pos;if(u.src.charCodeAt(d)!==r||a||o.refuseDigitRange&&t_e(u))return!1;u.pos=d+1;let f=!1;for(;u.pos]|$)/i,o_e=new Set([...Z0,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),r_e=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 pM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l_e(e){return typeof e=="string"?e:e==null?"":String(e)}function jR(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function Hu(e){return l_e(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function HR(e){return Hu(e).replace(/`/g,"`")}function u9(e){return String(e??"").trim().toLowerCase()}function d7(e,t="safe"){const n=u9(e);return n?t==="escape"?!0:t==="trusted"?Z0.has(n):!r_e.has(n):!1}function WR(e,t="safe"){const n=u9(e);return n?t==="escape"?!0:t==="trusted"?Z0.has(n):o_e.has(n):!1}function gM(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,i])=>i===""?` ${n}`:` ${n}="${HR(i)}"`).join("")}function qR(e){const t=e.startsWith("/"),n=t?e.slice(1):e,i=n.match(s_e);return i?{attrsStr:t?"":n.slice(i[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:i[1]}:null}function a_e(e,t){const n=e.split(",").map(i=>i.trim()).filter(Boolean);return n.length===0?!1:n.some(i=>{const s=i.split(/\s+/,1)[0]??"";return!s||Td(s,{tagName:t,attrName:"srcset"})})}function UR(e,t,n,i){return q7e.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?a_e(t,i):!!(U7e.has(e)&&t&&Td(t,{tagName:i,attrName:e}))}function pd(e,t){const n=t.toLowerCase();return Object.keys(e).find(i=>i.toLowerCase()===n)}function KR(e,t,n,i=!1){if(t!=="safe"||u9(n)!=="a")return e;const s=pd(e,"href");if(i&&(!s||!e[s])){const a=pd(e,"target"),u=pd(e,"rel");return a&&delete e[a],u&&delete e[u],e}const o=pd(e,"target");if((o?String(e[o]).trim():"").toLowerCase()!=="_blank")return e;const r=pd(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 mM(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!jR(r)||UR(l,o,t,n)||(i[r]=o)}return KR(i,t,n,!!pd(e,"href"))}function VR(e,t){const n=e.toLowerCase();return Bz.has(n)?!1:pM(t,n)||pM(t,e)}function f7(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!jR(r)||UR(l,o,t,n)||(i[r]=o)}return KR(i,t,n,!!pd(e,"href"))}function Mp(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,i]of e)n&&(t[String(n)]=i==null?"":String(i));return t}function c2(e,t="safe",n){const i=f7(Mp(e),t,n),s=Object.entries(i).map(([o,r])=>[o,r]);return s.length>0?s:void 0}function u_e(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 i=Number(e);if(e!==""&&!Number.isNaN(i))return i}return e}function c_e(e){const t={};for(const[n,i]of Object.entries(e))t[n]=u_e(i,n);return t}function W3(e){return e.trim().length>0}function ZR(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const i=e.indexOf("<",n);if(i===-1){if(nn){const r=e.slice(n,i);W3(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",i+1)){const r=e.indexOf("]]>",i);if(r!==-1){t.push({type:"text",content:e.slice(i,r+3)}),n=r+3;continue}break}if(e.startsWith("!",i+1)){const r=e.indexOf(">",i);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=qR(e.slice(i+1,s));if(!o){const r=e.slice(i,s+1);W3(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(o.isClosing)t.push({type:"tag_close",tagName:o.tagName});else{const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||dc.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r})}n=s+1}return t}function d_e(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const i=e.indexOf("<",n);if(i===-1){nn&&t.push({type:"text",content:e.slice(n,i)}),e.startsWith("![CDATA[",i+1)){const l=e.indexOf("]]>",i);if(l!==-1){t.push({type:"text",content:e.slice(i,l+3)}),n=l+3;continue}break}if(e.startsWith("!",i+1)){const l=e.indexOf(">",i);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=qR(e.slice(i+1,s));if(!o){t.push({type:"text",content:e.slice(i,s+1)}),n=s+1;continue}if(o.isClosing){t.push({type:"tag_close",tagName:o.tagName}),n=s+1;continue}const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||dc.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r}),n=s+1}return t}function f_e(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${Hu(t)}>`;const n=Object.entries(e.attrs??{}).map(([i,s])=>s===""?` ${Hu(i)}`:` ${Hu(i)}="${HR(s)}"`).join("");return e.type==="self_closing"?`<${Hu(t)}${n} />`:`<${Hu(t)}${n}>`}function h_e(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of ZR(e))if((n.type==="tag_open"||n.type==="self_closing")&&VR(n.tagName??"",t))return!0;return!1}function bh(e,t="safe"){if(!e)return"";if(t==="escape")return Hu(e);const n=d_e(e),i=[],s=[],o=[];for(const r of n){if(r.type==="text"){o.length===0&&s.push(Hu(r.content??""));continue}const l=u9(r.tagName);if(!l)continue;if(WR(l,t)){r.type==="tag_open"?o.push(l):r.type==="tag_close"&&o[o.length-1]===l&&o.pop();continue}if(o.length>0)continue;if(t==="safe"&&d7(l,t)){s.push(f_e(r));continue}if(r.type==="self_closing"){s.push(`<${l}${gM(mM(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${gM(mM(r.attrs??{},t,l))}>`),dc.has(l)||i.push(l);continue}const a=i.lastIndexOf(l);if(a===-1)continue;for(;i.length>a+1;){const c=i.pop();c&&s.push(``)}const u=i.pop();u&&s.push(``)}for(;i.length>0;){const r=i.pop();r&&s.push(``)}return s.join("")}const p_e=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],vM="http://www.w3.org/2000/svg",g_e=new Set(["script","style","iframe","object","embed","link","meta"]),m_e=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"]),v_e=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),y_e=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),k_e=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function b_e(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function A_e(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function C_e(e){const t=e.nodeName.toLowerCase();return t==="use"?b_e(e):t==="image"?A_e(e):t==="text"||t==="tspan"?!!e.textContent?.trim():k_e.has(t)}function w_e(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 x_e(e,t,n){const i=e.toLowerCase(),s=t.toLowerCase(),o=String(n??"").trim();return o?(i==="use"||i==="marker"||i==="clippath"||i==="mask")&&(s==="href"||s==="xlink:href")?o.startsWith("#")?o:"":i==="a"&&(s==="href"||s==="xlink:href")?Td(o,{tagName:"a",attrName:"href"})?"":o:i==="image"&&(s==="href"||s==="xlink:href"||s==="src")?Td(o,{tagName:"img",attrName:"src"})?"":o:s==="href"||s==="xlink:href"?o.startsWith("#")?o:"":Td(o,{tagName:i,attrName:s})?"":o:""}function S_e(e,t){let n=t+4;for(;n{const i=n.trim();if(/^[0-9a-f]+$/i.test(i)){const s=Number.parseInt(i,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function QR(e){const t=GR(e),n=t.toLowerCase();let i=0;for(;in.test(t))||QR(t)}function __e(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 Sm(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function YR(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,i=n.tagName.toLowerCase();if(!g_e.has(i)){if(i==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))YR(s,t)}}function I_e(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];YR(t,n);const i=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!i.length){t.remove();continue}const s=Sm(t.getAttribute("width")),o=Sm(t.getAttribute("height")),r=Sm(t.getAttribute("x")),l=Sm(t.getAttribute("y")),a=e.ownerDocument.createElementNS(vM,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+o/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")),i.length===1)a.textContent=i[0];else{const c=-.6*(i.length-1);for(const[d,f]of i.entries()){const h=e.ownerDocument.createElementNS(vM,"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 M_e(e){I_e(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const i=n.tagName.toLowerCase();if(!m_e.has(i)){n.remove();continue}if(i==="style"&&yM(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const o of s){const r=o.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(o.name);continue}if(r==="style"&&o.value&&yM(o.value)){n.removeAttribute(o.name);continue}if(r==="srcdoc"){n.removeAttribute(o.name);continue}if(v_e.has(r)&&o.value){const l=x_e(i,r,o.value);if(!l){n.removeAttribute(o.name);continue}l!==o.value&&n.setAttribute(o.name,l);continue}if(y_e.has(r)&&o.value&&QR(o.value)){n.removeAttribute(o.name);continue}if(o.value){const l=w_e(o.value);l!==o.value&&n.setAttribute(o.name,l)}}__e(n)}}function Iat(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 M_e(n),E_e(n)?null:n}catch{return null}}function E_e(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const o=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(o)||!Number.isFinite(r)||o<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let i=!1;for(const s of n){C_e(s)&&(i=!0);for(const o of Array.from(s.attributes))if(/\bNaN\b/i.test(o.value)||o.name==="style"&&/max-width:\s*0(?:px)?/i.test(o.value))return!0}return!i}const _m=[];function q3(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function T_e(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function L_e(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function kM(e=`editor-${Date.now()}`,t={}){const n=uwe(t),i=n;i.__markstreamRegisteredPluginCount=_m.length,i.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||_m.length);const s={"common.copy":"Copy"};let o;if(typeof t.i18n=="function")o=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;o=g=>h[g]??s[g]??g}else o=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const g=h;if(Array.isArray(g)){const[m,...y]=g;typeof m=="function"&&n.use(m,...y)}else typeof g=="function"&&n.use(g)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(g){console.error("[getMarkdown] apply function threw an error",g)}if(_m.length)for(const h of _m)if(Array.isArray(h)){const[g,...m]=h;typeof g=="function"&&n.use(g,...m)}else typeof h=="function"&&n.use(h);n.use(i_e),n.use(Ebe),n.use(_be);const r=Hbe,l=r.default??r;n.use(l),n.use(Sbe),n.use(xbe),n.core.ruler.after("block","mark_fence_closed",h=>{const g=h,m=g.src,y=!!g.env?.__markstreamFinal,A=m.split(/\r?\n/);for(const b of g.tokens){if(b.type!=="fence"||!b.map||!b.markup)continue;const C=b.map[0],v=b.map[1],x=b.markup,S=x[0],_=x.length,I=A[Math.max(0,v-1)]??"";let M=0;for(;MC+1&&$>=_&&D===I.length,N=b;N.meta=N.meta??{},N.meta.unclosed=!T,N.meta.closed=!!T}}),n.renderer.rules.fence=(h,g)=>{const m=h[g],y=String(m.info??"").trim(),A=String(m.content??""),b=btoa(unescape(encodeURIComponent(A))),C=T_e(y),v=q3(C),x=L_e(`editor-${e}-${g}-${C}`),S=q3(o("common.copy"));return`
        -
        - ${q3(C.toUpperCase())} - -
        -
        -
        `};const a=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,c=h=>{if(!h.startsWith("["))return!1;const g=u.exec(h);if(!g)return h!=="["&&!/^\[\d+$/.test(h);const m=String(g[1]??"");return h.slice(g[0].length).startsWith("(")?!1:!/^\d+$/.test(m)},d=(h,g)=>{const m=h;if(m.src[m.pos]!=="[")return!1;const y=a.exec(m.src.slice(m.pos));if(!y)return!1;const A=m.src.slice(Math.max(0,m.pos-120),m.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(A))return!1;const b=m.src.slice(m.pos+y[0].length);if(b.startsWith("](")||b.startsWith("(")||c(b))return!1;if(!g){const C=y[1],v=m.push("reference","span",0);v.content=C,v.markup=y[0],v.raw=y[0]}return m.pos+=y[0].length,!0};n.inline.ruler.before("escape","reference",d),n.renderer.rules.reference=(h,g)=>{const y=String(h[g].content??"");return`${y}`};const f=n.use.bind(n);return n.use=((...h)=>(i.__markstreamHasCustomParserExtensions=!0,f(...h))),n}function N_e({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 JR({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:i,streamRenderVersionChanged:s=!1}){const o=`${n.settledContent}${n.streamedDelta}`;return i?n.streamedDelta&&o===e?s?{settledContent:o,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:N_e({nextContent:e,previousContent:t??o,typewriterEnabled:i}):{settledContent:e,streamedDelta:"",appended:!1}}const F_e={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 D_e(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function XR(e){const t=D_e(e);return F_e[t]??t}function $_e(e){if(!Array.isArray(e))return;const t=e.filter(i=>typeof i=="string").map(i=>XR(i)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function B_e(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const i of e){if(typeof i!="string")continue;const s=i.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function z_e(e){return B_e(e)?.join("\0")??""}function R_e(e,t){return`${z_e(e)}\0\0${$_e(t)?.join("\0")??""}`}function Lf(e,t,n=1){const i=Number(e);return Number.isFinite(i)?Math.max(n,i):t}function bM(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var O_e=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=AM();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=AM();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,y=W_e(g/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(y-this.currentCps)*.2,this.charBudget+=this.currentCps*(h/1e3),this.charBudget<1){this.ensureLoop();return}const A=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),b=H_e(this.source.slice(this.visible.length),A,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:i=1e3,targetLatencyMs:s=900,catchUpLatencyMs:o=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=Lf(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Lf(i,1e3,1)),this.normalizedTargetLatencyMs=Lf(s,900,1),this.normalizedCatchUpLatencyMs=Lf(o,350,1),this.normalizedCatchUpThreshold=bM(r,600),this.normalizedStartDelayMs=bM(a,80),this.maxCommitFps=Math.trunc(Lf(l,30,1)),this.maxCharsPerCommit=Math.trunc(Lf(u,80,1)),this.flushOnFinish=c,this.segmenter=j_e(),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 P_e(e={},t){const n=new O_e(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 j_e(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function H_e(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const o=Array.from(e).slice(0,t);return{text:o.join(""),graphemeCount:o.length}}let i="",s=0;for(const o of n.segment(e)){if(s>=t)break;i+=o.segment,s++}return{text:i,graphemeCount:s}}function AM(){return typeof performance<"u"?performance.now():Date.now()}function W_e(e,t,n){return Math.min(n,Math.max(t,e))}var q_e=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const v8=Symbol.for("markstream-vue:node-lifecycle");function Mat(){}const h7=new Map;let eO="material";const Xf=new Map,CM=new Map;let y8=null;function U_e(e){h7.set(e.id,e)}function K_e(e){const t=h7.get(eO);if(!t)return;const n=t.core[e];if(n)return n;const i=Xf.get(t.id);if(i){const s=i[e];if(s)return s}t.loadExtended&&!Xf.has(t.id)&&Z_e(t)}function V_e(){var e,t;return(t=(e=h7.get(eO))==null?void 0:e.fallback)!=null?t:""}function Z_e(e){return q_e(this,null,function*(){var t,n,i;if(Xf.has(e.id))return(t=Xf.get(e.id))!=null?t:null;let s=CM.get(e.id);return s||(s=((i=(n=e.loadExtended)==null?void 0:n.call(e))!=null?i:Promise.resolve(null)).then(o=>(Xf.set(e.id,o),y8?.(),o)).catch(()=>(Xf.set(e.id,null),null)),CM.set(e.id,s)),s})}const wM='',xM='',G_e={id:"material",core:{"":xM,plain:'',text:xM,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:wM,csharp:wM,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>vs(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Q_e=Ul(0);y8=()=>{Q_e.value++},U_e(G_e);const Y_e={"":"",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 c9(e){var t;const n=(function(i){if(!i)return"";const s=i.trim();if(!s)return"";const[o]=s.split(/\s+/),[r]=o.split(":");return r.toLowerCase()})(e);return(t=Y_e[n])!=null?t:n}function Eat(e){const t=c9(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 Tat(e){return K_e(c9(e))||V_e()}const SM={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 d9=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});let nr=null,kd=!1,bd=null,f9=g7;function J0(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function p7(){try{const e=globalThis;return J0(e?.katex)}catch{return null}}function g7(){return d9(null,null,function*(){const e=p7();if(e)return e;const t=yield vs(()=>import("./katex-DnlPpQZa.js"),[]);try{yield vs(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return J0(t)})}function tO(e){const t=Promise.resolve(e).then(n=>{var i;return bd===t&&n?(nr=(i=J0(n))!=null?i:n,nr):null}).catch(()=>null).finally(()=>{bd===t&&(bd=null)});return bd=t,kd=!0,t}function J_e(e){f9=e,nr=null,kd=!1,bd=null}function X_e(e){J_e(g7)}function nO(){return typeof f9=="function"}function Lat(){var e;const t=f9;if(!t||t===g7)return null;if(nr)return nr;const n=p7();if(n)return nr=n,nr;if(kd)return null;try{const i=t();return i?typeof i?.then=="function"?(tO(i),null):(nr=(e=J0(i))!=null?e:i,nr):null}catch{return null}}function iO(){return d9(this,null,function*(){var e;const t=p7();if(t)return nr=t,nr;if(nr)return nr;if(bd)return bd;if(kd)return null;const n=f9;if(!n)return kd=!0,null;try{const i=n();if(typeof i?.then=="function")return tO(i);if(i)return nr=(e=J0(i))!=null?e:i,kd=!0,nr}catch{}return kd=!0,null})}function sO(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let Uu=null,Bu=null;const Co=new Map,Za=new Map;let v0=5;const Nd=new Set;function Ep(){if(Co.size{const{id:n,html:i,error:s}=t.data,o=Co.get(n);if(o)if(Co.delete(n),clearTimeout(o.timeoutId),o.cleanup(),Ep(),s)o.aborted||o.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(Za.set(a,i),Za.size>200){const u=Za.keys().next().value;Za.delete(u)}}o.aborted||o.resolve(i)}},Uu.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,i]of Co.entries())clearTimeout(i.timeoutId),i.cleanup(),i.aborted||i.reject(new Error(`Worker error: ${t.message}`));Co.clear(),oO()}}function tIe(){var e;for(const t of Co.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Co.clear(),oO(),Uu&&((e=Uu.terminate)==null||e.call(Uu)),Uu=null,Bu=null}function nIe(e,t=!0,n=2e3,i){return d9(this,null,function*(){performance.now();const s=sO(e);if(!nO()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Bu)return Promise.reject(Bu);const o=`${t?"d":"i"}:${s}`,r=Za.get(o);if(r)return Ep(),Promise.resolve(r);const l=Uu||(Bu=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Bu.name="WorkerInitError",Bu.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(Bu);if(Co.size>=v0){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Co.size,a.max=v0,Promise.reject(a)}return new Promise((a,u)=>{if(i?.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=Co.get(c);if(!m)return;Co.delete(c),m.cleanup();const y=new Error("Worker render timed out");y.name="WorkerTimeout",y.code="WORKER_TIMEOUT",m.aborted||m.reject(y),Ep()},n);d=()=>{const m=Co.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const y=new Error("Aborted");y.name="AbortError",u(y)},i&&i.addEventListener("abort",d,{once:!0});const h=a,g=u;Co.set(c,{resolve:m=>{h(m)},reject:m=>{g(m)},timeoutId:f,aborted:!1,cleanup:()=>{i&&d&&i.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const y=Co.get(c);Co.delete(c),clearTimeout(f),y?.cleanup(),y?.reject(m),Ep()}})})}function Nat(e,t=!0,n){const i=`${t?"d":"i"}:${sO(e)}`;if(Za.set(i,n),Za.size>200){const s=Za.keys().next().value;Za.delete(s)}}const iIe="WORKER_BUSY";function sIe(e=2e3,t){return Co.size{let s,o=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Nd.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{o||(o=!0,a(),n())},Nd.add(l),s=globalThis.setTimeout(()=>{if(o)return;o=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",i(u)},e),queueMicrotask(()=>Ep()),t&&(r=()=>{if(o)return;o=!0,a();const u=new Error("Aborted");u.name="AbortError",i(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const M1={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function Fat(e){return d9(this,arguments,function*(t,n=!0,i={}){var s,o,r,l;if(!nO()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=i.timeout)!=null?s:M1.timeout,u=(o=i.waitTimeout)!=null?o:M1.waitTimeout,c=(r=i.backoffMs)!=null?r:M1.backoffMs,d=(l=i.maxRetries)!=null?l:M1.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):M1.maxRetries,h=i.signal;let g=0;for(;;){if(h?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield nIe(t,n,a,h)}catch(m){if(m?.code!==iIe||g>=f)throw m;if(g++,yield sIe(u,h).catch(()=>{}),h?.aborted){const y=new Error("Aborted");throw y.name="AbortError",y}c>0&&(yield new Promise(y=>globalThis.setTimeout(y,c*g)))}}})}function eh(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function oIe(e){var t;for(const n of e.split(/\r?\n/)){const i=n.trim();if(!i||i.startsWith("%%"))continue;const s=i.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function jv(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),i=oIe(e);return i==="gantt"?220+28*n:i==="sequencediagram"?180+26*n:i==="classdiagram"||i==="statediagram"||i==="erdiagram"?180+24*n:i==="flowchart"||i==="graph"?170+28*n:200+22*n}function Hv(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 rO(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function Wv(e,t=360,n=500){return rO(e,t,n)}function qv(e,t=360,n=500){return rO(e,t,n)}var rIe=Object.defineProperty,lIe=Object.defineProperties,aIe=Object.getOwnPropertyDescriptors,_M=Object.getOwnPropertySymbols,uIe=Object.prototype.hasOwnProperty,cIe=Object.prototype.propertyIsEnumerable,IM=(e,t,n)=>t in e?rIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lO=(e,t)=>{for(var n in t||(t={}))uIe.call(t,n)&&IM(e,n,t[n]);if(_M)for(var n of _M(t))cIe.call(t,n)&&IM(e,n,t[n]);return e},MM=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const Uv=()=>vs(()=>import("./mermaid.core-BKBZnrB_.js").then(e=>e.bp),__vite__mapDeps([4,5]));let za=null,th=Uv,ip=null,k8=!1,b8=!1,sp=0;function dIe(e){th=e,sp++,za=null,ip=null,k8=!1,b8=!1}function fIe(e){dIe(Uv)}function EM(){return typeof th=="function"}function TM(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=lO({},t),i={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:o=>typeof t.initialize=="function"?t.initialize(o):s.initialize?s.initialize(o):void 0},lIe(n,aIe(i))}var n,i;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function LM(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const i=lO({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,i):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(i):void 0}}catch{}}function Dat(){return MM(this,null,function*(){if(za)return za;const e=(function(){try{const i=globalThis;return TM(i?.mermaid)}catch{return null}})();if(e)return za=e,LM(za),za;const t=th,n=sp;return t?t===Uv&&k8?null:ip||(ip=MM(null,null,function*(){let i;try{i=yield t()}catch(s){if(t===Uv)return n===sp&&t===th&&(k8=!0,(function(o){b8||(b8=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',o))})(s)),null;throw s}finally{n===sp&&t===th&&(ip=null)}return n!==sp||t!==th?null:i?(za=TM(i),LM(za),za):null}),ip):null})}let kr=null,zu=null;const Tl=new Map,ud=new Map;function d2(e){for(const t of Tl.values())t.reject(e);Tl.clear(),ud.clear()}let NM=5,FM=!1;const hIe="WORKER_BUSY",DM="MERMAID_DISABLED";function pIe(e){if(kr&&kr!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",d2(n)}kr=e,zu=null;const t=e;kr.onmessage=n=>{if(kr!==t)return;const{id:i,ok:s,result:o,error:r}=n.data,l=Tl.get(i);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(o))},kr.onerror=n=>{var i,s;if(kr===t)if(Tl.size!==0){try{FM?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}d2(new Error(`Worker error: ${n.message}`))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},kr.onmessageerror=n=>{var i,s;if(kr===t)if(Tl.size!==0){try{FM?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}d2(new Error("Worker messageerror"))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function gIe(){var e;if(kr)try{d2(new Error("Worker cleared")),(e=kr.terminate)==null||e.call(kr)}catch{}kr=null,zu=null}function aO(e,t,n,i){if(!EM()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=DM,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let o=ud.get(s);return o||(o=(function(r,l,a=1400){if(!EM()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=DM,Promise.reject(c)}if(zu)return Promise.reject(zu);const u=kr||(zu=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),zu.name="WorkerInitError",zu.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(zu);if(Tl.size>=NM){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=hIe,c.inFlight=Tl.size,c.max=NM,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),Tl.delete(f))},y={resolve:A=>{m(),c(A)},reject:A=>{m(),d(A)}};Tl.set(f,y);try{u.postMessage({id:f,action:r,payload:l})}catch(A){return Tl.delete(f),void d(A)}h=globalThis.setTimeout(()=>{const A=new Error("Worker call timed out");A.name="WorkerTimeout",A.code="WORKER_TIMEOUT";const b=Tl.get(f);b&&b.reject(A)},a)})})(e,t,n),ud.set(s,o),o.then(()=>{ud.get(s)===o&&ud.delete(s)},()=>{ud.get(s)===o&&ud.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)})})})(o,i)}function $at(e,t,n=1400,i){return aO("canParse",{code:e,theme:t},n,i)}function Bat(e,t,n=1400,i){return aO("findPrefix",{code:e,theme:t},n,i)}var mIe=Object.defineProperty,vIe=Object.defineProperties,yIe=Object.getOwnPropertyDescriptors,$M=Object.getOwnPropertySymbols,kIe=Object.prototype.hasOwnProperty,bIe=Object.prototype.propertyIsEnumerable,BM=(e,t,n)=>t in e?mIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_t=(e,t)=>{for(var n in t||(t={}))kIe.call(t,n)&&BM(e,n,t[n]);if($M)for(var n of $M(t))bIe.call(t,n)&&BM(e,n,t[n]);return e},yn=(e,t)=>vIe(e,yIe(t)),Bi=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const AIe="__global__",U3="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",A8=(()=>{const e=globalThis;if(e[U3])return e[U3];const t={scopedCustomComponents:{},revision:Ul(0)};return e[U3]=t,t})(),zM=A8.revision,CIe=Symbol("markstreamCustomComponents"),wIe=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 X0(e){return wIe.has(String(e).trim().toLowerCase())}function xIe(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function K3(e={}){const t={};for(const[n,i]of Object.entries(e))if(i!=null){t[n]=i;for(const s of new Set([yl(n),yl(xIe(n))]))!s||X0(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=i)}return t}function qs(e){const t=cn(CIe,null);return L(()=>{var n;return zM.value,(function(i,s={}){return zM.value,_t(_t(_t({},K3(A8.scopedCustomComponents[AIe]||{})),K3(s)),K3((function(o){return o&&A8.scopedCustomComponents[o]||{}})(i)))})(e?.(),(n=t?.value)!=null?n:{})})}const SIe=["aria-label"],_Ie={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"},IIe={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"},di=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},qr=di(Qe({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(k(),E("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(k(),E("svg",IIe,[...n[1]||(n[1]=[w("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),w("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(k(),E("svg",_Ie,[...n[0]||(n[0]=[w("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,SIe))}),[["__scopeId","data-v-be21ab83"]]);qr.install=e=>{e.component(qr.__name,qr)};const MIe={class:"emoji-node"},xr=di(Qe({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(k(),E("span",MIe,F(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);xr.install=e=>{e.component(xr.__name,xr)};const EIe=["id"],TIe=["title"],Ur=di(Qe({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const i=document.querySelector(t);i?i.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(i,s)=>(k(),E("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[w("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+F(e.node.id)+"]",9,TIe)],8,EIe))}}),[["__scopeId","data-v-c1463a29"]]);Ur.install=e=>{e.component(Ur.__name,Ur)};const uO=(()=>{try{return!1}catch{}return!1})();function V3(e){uO&&console.warn(e)}function RM(e,t="safe",n){return f7(e,t,n)}function cO(e){return c_e(e)}function Z3(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function m7(e,t="safe"){const n=String(e.tag||e.type||"").trim(),i=c2((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),Z3(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),Z3(r.value)]):Object.entries(s).map(([r,l])=>[r,Z3(l)]):null,t,n);var s;if(!i)return;const o=cO(Mp(i));return Object.keys(o).length>0?o:void 0}function OM(e,t,n=!1){const i=Object.entries(t??{}),s=i.length>0?i.map(([o,r])=>r===""?` ${o}`:` ${o}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function E1(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function G3(e,t,n,i,s,o,r=!1){const l=(function(d,f){return VR(d,f)})(e,i);if(Z0.has(e.toLowerCase())||!l&&WR(e,o))return null;if(!l&&d7(e,o))return r?[OM(e,t,!0)]:[OM(e,t),...n,``];const a=f7(t,o,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=i[e]||i[e.toLowerCase()],f=cO(a);return gn(d,yn(_t({},f),{key:c}),n.length>0?n:void 0)}return gn(e,yn(_t({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function dO(e,t){return h_e(e,t)}function Kv(e,t,n="safe"){if(!e)return[];try{return(function(o,r,l="safe"){let a=0;const u=[],c=[];for(const d of o)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=G3(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);E1(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=G3(g.tagName,g.attrs||{},g.children,r,g.autoKey,l);u.length>0?E1(u[u.length-1].children,m):E1(c,m),g.tagName.toLowerCase()!==f&&u.length>h&&V3(`Auto-closing unclosed tag: <${g.tagName}>`)}else V3(`Ignoring closing tag with no matching opening tag: `)}for(;u.length>0;){const d=u.pop(),f=G3(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?E1(u[u.length-1].children,f):E1(c,f),V3(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(ZR(e),t,n)}catch(s){return i=s,uO&&console.error("Failed to parse HTML to VNodes:",i),null}var i}const LIe=["innerHTML"],Kr=di(Qe({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=cn("markstreamHtmlPolicy",void 0),i=L(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=qs(()=>t.customId),o=Qe({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=L(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(i.value==="escape")return{mode:"html",content:bh(l,i.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=Kv(l,s.value,i.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!dO(l,s.value))return{mode:"html",content:bh(l,i.value)};const a=Kv(l,s.value,i.value);return a===null?{mode:"html",content:bh(l,i.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(k(),E("span",{key:0,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[K(p(o),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(k(),E("span",{key:1,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},F(r.value.content),3)):(k(),E("span",{key:2,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,LIe))}}),[["__scopeId","data-v-d17f12b0"]]);Kr.install=e=>{e.component(Kr.__name,Kr)};const NIe={class:"inline-code"},FIe={key:0},Uo=di(Qe({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=Rh(),i=cn("markstreamFade",void 0),s=cn("markstreamTextStreamState",void 0),o=cn("markstreamStreamVersion",void 0),r=L(()=>{const b=n.fade;return b===""||b===!0||b==="true"||b!==!1&&b!=="false"&&void 0}),l=L(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=L(()=>{var b;return String((b=t.node.code)!=null?b:"")}),u=L(()=>!l.value),c=L(()=>{var b;const C=(b=n["index-key"])!=null?b:n.indexKey;return C==null||C===""?"":String(C)}),d=G(t.node.code),f=G(""),h=G(0);let g;function m(){g?.(),g=void 0}function y(){m(),f.value&&(d.value=d.value+f.value,f.value="")}qe([()=>t.node.code,c,l],([b])=>{const C=String(b??""),v=c.value,x=JR({nextContent:C,persistedContent:v?s?.get(v):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||!o)return;const S=o.value;g=qe(()=>o.value,_=>{_!==S&&y()},{flush:"sync"})})()):f.value||m(),v&&s?.set(v,C)},{immediate:!0}),Xd(m);const A=L(()=>h.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(b,C)=>(k(),E("code",NIe,[u.value?(k(),E(Te,{key:0},[$e(F(a.value),1)],64)):(k(),E(Te,{key:1},[d.value?(k(),E("span",FIe,F(d.value),1)):te("",!0),f.value?(k(),E("span",{key:1,class:Fe(["inline-code-stream-delta",[A.value]]),onAnimationend:y},F(f.value),35)):te("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);Uo.install=e=>{e.component(Uo.__name,Uo)};const C8=G(!1),PM=G(""),jM=G("top"),Tp=G(null),Lp=G(null),w8=G(null),x8=G(null),HM=G(null);let f2=null,h2=null,S8=0;function fO(){f2&&(clearTimeout(f2),f2=null),h2&&(clearTimeout(h2),h2=null)}let Im=!1,Mm=null,WM=!1;function DIe(e,t,n="top",i=!1,s,o){if(!e)return;const r=++S8;fO();const l=()=>Bi(null,null,function*(){var a,u;if(yield(function(){return Bi(this,null,function*(){if(!Im&&!WM&&typeof document<"u"){Mm!=null||(Mm=Bi(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([vs(()=>import("./vue.runtime.esm-bundler-C_QWhoww.js"),[]),vs(()=>import("./Tooltip-OrMK9Tfr.js"),[])]),h=document.createElement("div");h.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(h),c({setup:()=>()=>{var g;return d(f,{visible:C8.value,"anchor-el":Tp.value,content:PM.value,placement:jM.value,id:Lp.value,originX:w8.value,originY:x8.value,isDark:(g=HM.value)!=null?g:void 0})}}).mount(h),Im=!0}));try{yield Mm}catch(c){Im=!1,Mm=null,WM=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),Im&&r===S8){Lp.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Tp.value=e,PM.value=t,jM.value=n,w8.value=(a=s?.x)!=null?a:null,x8.value=(u=s?.y)!=null?u:null,HM.value=typeof o=="boolean"?o:null,C8.value=!0;try{e.setAttribute("aria-describedby",Lp.value)}catch{}}});i?l():f2=setTimeout(l,80)}function $Ie(e=!1){S8+=1,fO();const t=()=>{if(Tp.value&&Lp.value)try{Tp.value.removeAttribute("aria-describedby")}catch{}C8.value=!1,Tp.value=null,Lp.value=null,w8.value=null,x8.value=null};e?t():h2=setTimeout(t,120)}const BIe={"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..."},zIe=Symbol("markstreamI18nFallback");function hO(e,t){var n;return(n=t?.[e])!=null?n:BIe[e]}const _8=(e,t)=>{var n;return(n=hO(e,t))!=null?n:(function(i){return(i.split(".").pop()||i).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function qM(e,t){return{t(n){const i=hO(n,t);if(e.te&&i!=null&&!e.te(n))return _8(n,t);const s=e.t(n);return s===n&&i!=null?_8(n,t):s}}}function RIe(){const e=(function(){var n,i,s;try{const o=Ws(),r=zIe,l=o?.provides,a=(n=o?.appContext)==null?void 0:n.provides;return(s=(i=l?.[r])!=null?i:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,i;try{const s=Ws(),o=s?.proxy,r=o?.$t;if(typeof r=="function"){const u=o?.$te;return{t:r.bind(o),te:typeof u=="function"?u.bind(o):void 0}}const l=(i=(n=s?.appContext)==null?void 0:n.config)==null?void 0:i.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 qM(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const i=n();if(i&&typeof i.t=="function")return qM({t:i.t.bind(i),te:typeof i.te=="function"?i.te.bind(i):void 0},e)}catch{}}catch{}return{t:n=>_8(n,e)}}const pO=Symbol("ViewportPriority"),gO=Symbol("ViewportPriorityOptions"),mO=Symbol("OffscreenHeavyNodeDeferral"),OIe=L(()=>!1),Kd="400px";function v7(){return cn(gO,void 0)}function y7(){return cn(mO,OIe)}function PIe(e,t){var n,i;const s=typeof window<"u"&&typeof document<"u",o=typeof t=="boolean"?G(t):t,r=s?(n=window.requestIdleCallback)!=null?n:_=>window.setTimeout(()=>_({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(i=window.cancelIdleCallback)!=null?i:_=>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 I=a.get(_);return I||(I=u++,a.set(_,I)),String(I)}function y(){if(h!=null){try{l?.(h)}catch{}h=null}}function A(_){if(_){const I=c.get(_);if(I&&!I.targets.size){try{I.io.disconnect()}catch{}c.delete(_)}}d.size||f.size||y()}function b(_){const I=d.get(_);if(!I)return;const M=c.get(I.bucketKey);if(!I.visible.value){I.visible.value=!0;try{I.resolve()}catch{}}try{M?.io.unobserve(_)}catch{}M?.targets.delete(_),d.delete(_),f.delete(_),A(I.bucketKey)}function C(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&h==null&&f.size&&(h=r(()=>{h=null;const _=f.values().next().value;_&&(f.delete(_),b(_),f.size&&C())},{timeout:1200}))}function v(_,I){if(!s||typeof IntersectionObserver>"u")return null;const M=(function(P,R){var q,j,W;return{root:(q=e?.(P??null))!=null?q:null,rootMargin:(j=R?.rootMargin)!=null?j:Kd,threshold:(W=R?.threshold)!=null?W:0}})(_,I),$=[m((D=M).root),D.rootMargin,D.threshold].join("\0");var D;const T=c.get($);if(T)return{key:$,bucket:T};let N;try{N=new IntersectionObserver(P=>{for(const R of P)(R.isIntersecting||R.intersectionRatio>0)&&b(R.target)},{root:M.root,rootMargin:M.rootMargin,threshold:M.threshold})}catch{return null}const O={io:N,targets:new Map};return c.set($,O),{key:$,bucket:O}}function x(){if(s&&o.value)for(const[_,I]of Array.from(d.entries())){const M=v(_,I.opts);if(!M){b(_);continue}if(M.key===I.bucketKey)continue;const $=I.bucketKey,D=c.get($);try{D?.io.unobserve(_)}catch{}D?.targets.delete(_),I.bucketKey=M.key,M.bucket.targets.set(_,I),M.bucket.io.observe(_),A($)}}qe(o,_=>{if(!_){for(const I of Array.from(d.keys()))b(I);y()}},{flush:"sync"});const S=(_,I)=>{const M=G(!1);let $,D=!1;const T=new Promise(R=>{$=()=>{D||(D=!0,R())}}),N=()=>{const R=d.get(_);if(!R)return f.delete(_),void A();const q=c.get(R.bucketKey);try{q?.io.unobserve(_)}catch{}q?.targets.delete(_),d.delete(_),f.delete(_),A(R.bucketKey)};if(!s||!o.value)return M.value=!0,$(),{isVisible:M,whenVisible:T,destroy:N};const O=v(_,I);if(!O)return M.value=!0,$(),{isVisible:M,whenVisible:T,destroy:N};const P={resolve:$,visible:M,bucketKey:O.key,opts:I};return d.set(_,P),O.bucket.targets.set(_,P),O.bucket.io.observe(_),s&&g==null&&(g=window.requestAnimationFrame(()=>{g=null,x()})),I?.allowIdle!==!1&&(f.add(_),C()),{isVisible:M,whenVisible:T,destroy:N}};return S.refresh=x,Kn(pO,S),S}function k7(){var e,t;const n=cn(pO,void 0);if(n)return n;const i=new WeakMap,s=new Map,o=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=i.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{}i.delete(h),m?.targets.delete(h),o.delete(h),c(g.bucketKey),o.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&o.size&&(r=l(()=>{r=null;const h=o.values().next().value;h&&(o.delete(h),d(h),o.size&&f())},{timeout:1200}))};return(h,g)=>{const m=G(!1);let y,A=!1;const b=new Promise(x=>{y=()=>{A||(A=!0,x())}}),C=()=>{const x=i.get(h);if(!x)return o.delete(h),void(o.size||u());const S=s.get(x.bucketKey);try{S?.io.unobserve(h)}catch{}i.delete(h),S?.targets.delete(h),o.delete(h),c(x.bucketKey),o.size||u()},v=(x=>{var S,_;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const I=(N=>{var O,P;return[(O=N?.rootMargin)!=null?O:Kd,(P=N?.threshold)!=null?P:0].join("\0")})(x),M=s.get(I);if(M)return{key:I,bucket:M};const $=(S=x?.rootMargin)!=null?S:Kd;let D;try{D=new IntersectionObserver(N=>{for(const O of N)(O.isIntersecting||O.intersectionRatio>0)&&d(O.target)},{root:null,rootMargin:$,threshold:(_=x?.threshold)!=null?_:0})}catch{return null}const T={io:D,targets:new Set};return s.set(I,T),{key:I,bucket:T}})(g);return v?(i.set(h,{resolve:y,visible:m,bucketKey:v.key}),v.bucket.targets.add(h),v.bucket.io.observe(h),g?.allowIdle!==!1&&(o.add(h),f()),{isVisible:m,whenVisible:b,destroy:C}):(m.value=!0,y(),{isVisible:m,whenVisible:b,destroy:C})}}function jIe(e,t){var n,i;const s=(i=(n=e.indexKey)!=null?n:t["index-key"])!=null?i:t.indexKey;return s==null||s===""?"":String(s)}const HIe=["data-markstream-viewport-pending"],WIe=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],qIe={key:1,class:"image-placeholder"},UIe={key:1,class:"image-node__raw-text"},KIe={key:2,class:"image-shimmer-overlay"},VIe={key:1,class:"image-node__raw-text"},ZIe={key:3,class:"image-error"},Xu=di(Qe({__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,i,s;const o=e,r=t,l=G(!1),a=G(!1),u=G(""),c=G("primary"),d=G(null),f=Rh(),h=cn(v8,null),g=k7(),m=v7(),y=y7(),A=L(()=>hI(o.node.src)),b=L(()=>hI(o.fallbackSrc)),C=(s=(i=(n=Ws())==null?void 0:n.vnode.el)==null?void 0:i.querySelector)==null?void 0:s.call(i,"img"),v=typeof window<"u"&&C?.getAttribute("src")===(A.value||b.value),x=G(typeof window>"u"||v||!y.value),S=Ul(null);let _="",I=null;const M=L(()=>u.value),$=L(()=>!o.lazy),D=L(()=>typeof window<"u"&&y.value&&!v),T=L(()=>!D.value||x.value),N=L(()=>T.value?M.value:""),O=L(()=>{var re,fe;return(fe=(re=m?.value.heavyBlockMargin)!=null?re:m?.value.rootMargin)!=null?fe:Kd}),P=L(()=>!o.node.loading&&c.value!=="failed"&&u.value.length>0),R=L(()=>c.value==="failed"),q=L(()=>(!$.value||D.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),j=L(()=>jIe(o,f));function W(re=j.value){re&&d.value&&h?.reportHeight(re,d.value.offsetHeight)}function z(re=j.value){re&&kt(()=>{W(re)})}function H(){I&&(clearTimeout(I),I=null)}function ee(){const re=j.value;re&&_!==re&&(_&&h?.markSettled(_),H(),_=re,h?.markPending(re),typeof window<"u"&&(I=window.setTimeout(()=>{_===re&&(z(re),V())},8e3)))}function V(){return Bi(this,null,function*(){const re=_;re&&(H(),_="",yield kt(),W(re),h?.markSettled(re))})}function ie(){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 z();c.value="failed",a.value=!0,r("error",u.value),z()}function se(){l.value=!0,a.value=!1,r("load",M.value),z()}function Z(re){re.preventDefault(),l.value&&!a.value&&r("click",[re,M.value])}const{t:pe}=RIe();return qe([A,b,()=>o.node.loading],()=>(l.value=!1,a.value=!1,o.node.loading||A.value?(u.value=A.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"&&qe([d,D],([re,fe],Ee,X)=>{var we;if((we=S.value)==null||we.destroy(),S.value=null,!fe||x.value)return void(x.value=!0);if(!re)return void(x.value=!1);let Y=!0;const le=g(re,{rootMargin:O.value,allowIdle:!1});S.value=le,x.value=le.isVisible.value,le.whenVisible.then(()=>{Y&&S.value===le&&(x.value=!0)}),X(()=>{Y=!1,le.destroy(),S.value===le&&(S.value=null)})},{immediate:!0}),qe([P,l,a,M,()=>o.lazy,T],([re,fe,Ee,X,we,Y])=>re&&X&&!Ee&&Y?fe?(V(),void z()):we?(ee(),void z()):void(fe||Ee||ee()):(V(),void z()),{flush:"post",immediate:!0}),Gn(()=>{var re;(re=S.value)==null||re.destroy(),S.value=null,(function(){const fe=_;fe&&(H(),_="",h?.markSettled(fe))})()}),(re,fe)=>{var Ee,X,we,Y,le;return k(),E("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":D.value&&!x.value?"true":void 0},[P.value?(k(),E("img",{key:0,src:N.value||void 0,alt:String((X=(Ee=o.node.alt)!=null?Ee:o.node.title)!=null?X:""),title:String((Y=(we=o.node.title)!=null?we:o.node.alt)!=null?Y:""),class:Fe(["image-node__img",{"is-loading":!$.value&&!l.value,"is-loaded":$.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:o.lazy?"lazy":void 0,fetchpriority:$.value?"high":void 0,decoding:$.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(le=o.node.alt)!=null?le:p(pe)("image.preview"),onError:ie,onLoad:se,onClick:Z},null,42,WIe)):te("",!0),e.node.loading&&!a.value?(k(),E("span",qIe,[o.usePlaceholder?Rn(re.$slots,"placeholder",{key:0,node:o.node,displaySrc:M.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[fe[0]||(fe[0]=w("span",{class:"image-shimmer"},null,-1))],!0):(k(),E("span",UIe,F(e.node.raw),1))])):te("",!0),q.value&&!e.node.loading?(k(),E("span",KIe,[o.usePlaceholder?Rn(re.$slots,"placeholder",{key:0,node:o.node,displaySrc:M.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[fe[1]||(fe[1]=w("span",{class:"image-shimmer"},null,-1))],!0):(k(),E("span",VIe,F(e.node.raw),1))])):te("",!0),R.value?(k(),E("span",ZIe,[Rn(re.$slots,"error",{node:o.node,displaySrc:M.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[fe[2]||(fe[2]=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[w("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)),w("span",null,F(p(pe)("image.loadError")),1)],!0)])):te("",!0)],8,HIe)}}}),[["__scopeId","data-v-046e82ac"]]);Xu.install=e=>{e.component(Xu.__name,Xu)};const GIe={key:2},_a=Qe({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=qs(()=>t.customId),i=cn("markstreamHtmlPolicy",void 0),s=cn("markstreamNestedRendererProps",void 0),o=L(()=>{var g;return(g=i?.value)!=null?g:"safe"}),r=L(()=>{var g,m;const y=(g=s?.value)!=null?g:{};return yn(_t({},y),{customId:(m=t.customId)!=null?m:y.customId,htmlPolicy:o.value})}),l=Dl({loader:()=>Promise.resolve().then(()=>T7),suspensible:!1}),a=L(()=>t.components[String(t.node.type)]),u=L(()=>!!(a.value&&n.value[t.node.type]&&!X0(String(t.node.type)))),c=L(()=>u.value?m7(t.node,o.value):void 0),d=L(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=L(()=>{var g;return String((g=t.node.content)!=null?g:"")}),h=L(()=>{var g,m;return String((m=(g=t.node.content)!=null?g:t.node.raw)!=null?m:"")});return(g,m)=>a.value&&u.value?(k(),de(xs(a.value),Un({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:he(()=>[d.value?(k(),de(p(l),Un({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?(k(),de(p(l),Un({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?(k(),de(xs(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(k(),E("span",GIe,F(h.value),1)):te("",!0)}}),UM=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function QIe(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return yn(_t(_t({},UM),n),{enabled:(t=n.enabled)==null||t})}return _t({},UM)}function b7(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,i=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=i}function vO(e){var t,n;const i=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(i.length<3)return"";const s=i[0];if(s!=="`"&&s!=="~"||i[1]!==s||i[2]!==s)return"";let o=3;for(;i[o]===s;)o+=1;return i.slice(o).trim()}function KM(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function YIe(e){var t;return e.diff===!0||KM(e.language)||KM(vO(String((t=e.raw)!=null?t:"")))}function JIe(e,t,n){const i=(function(s){const o=vO(s);if(!o)return"";const r=o.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:i||t,caption:i?n?`Diff / ${t}`:t:""}}const XIe=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],eMe={key:0,translate:"no",class:"markstream-pre__diff-code"},tMe={class:"markstream-pre__diff-pane-content"},nMe={class:"markstream-pre__diff-number","aria-hidden":"true"},iMe={class:"markstream-pre__diff-content"},sMe={class:"markstream-pre__diff-content-inner"},oMe={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},rMe=["textContent"],lMe=["textContent"],br=Qe({__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(Z,pe){const re=String(Z??"");return pe?re:re.replace(/\r\n$|\n$|\r$/,"")}const i=L(()=>{var Z,pe,re;const fe=String((pe=(Z=t.node)==null?void 0:Z.language)!=null?pe:"");return String((re=String(fe).split(/\s+/g)[0])!=null?re:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=L(()=>`language-${i.value}`),o=L(()=>{var Z;return t.loading===!0||((Z=t.node)==null?void 0:Z.loading)===!0}),r=L(()=>{var Z;return n((Z=t.node)==null?void 0:Z.code,o.value)});let l="",a=1;const u=L(()=>(function(Z){let pe=0,re=1;Z.startsWith(l)&&(pe=l.length,re=a,pe>0&&Z[pe-1]==="\r"&&Z[pe]===` -`&&pe++);for(let fe=pe;fer.value.split(/\r\n|\n|\r/));let d=0,f="";const h=L(()=>{const Z=u.value;Z{var Z;return t.showLineNumbers===!0&&((Z=t.node)==null?void 0:Z.diff)===!0}),m=L(()=>g.value&&t.diffInline===!0),y=L(()=>{const Z=Number(t.reservedHeightPx);if(!Number.isFinite(Z)||Z<=0)return;const pe=`${Math.ceil(Z)}px`;return o.value?{maxHeight:pe,overflow:"auto"}:{height:pe,minHeight:pe,maxHeight:pe,overflow:"auto"}}),A=["diff ","index ","--- ","+++ ","@@ "];function b(Z){return String(Z??"").trim().length===0}function C(Z,pe="context",re={}){const fe=b(Z);return{code:Z,kind:fe&&pe!=="hunk"&&pe!=="spacer"&&!re.preserveBlankKind?"context":pe,empty:fe}}function v(Z){const pe=n(Z,o.value);return pe?pe.split(/\r\n|\n|\r/):[]}function x(Z,pe){return!b(Z[pe])||peA.some(re=>pe.startsWith(re)))}function M(Z,pe){return pe||!Z.startsWith(" ")||Z.startsWith(" ")?Z:` ${Z}`}function $(Z,pe){const re=Z.length,fe=pe.length,Ee=[];let X=0;for(;X=X&&le>=X&&Z[Y]===pe[le];)we.unshift({originalIndex:Y,modifiedIndex:le}),Y--,le--;const Ce=Y-X+1,ae=le-X+1;if(Ce<=0||ae<=0||o.value||(Ce+1)*(ae+1)>15e5)return Ee.concat(we);const oe=ae+1,Q=new Uint32Array((Ce+1)*(ae+1));for(let _e=Ce-1;_e>=0;_e--)for(let Ke=ae-1;Ke>=0;Ke--){const xe=_e*oe+Ke;if(Z[X+_e]===pe[X+Ke])Q[xe]=Q[(_e+1)*oe+Ke+1]+1;else{const Ne=Q[(_e+1)*oe+Ke],et=Q[_e*oe+Ke+1];Q[xe]=Ne>=et?Ne:et}}const ne=[];let ge=0,Ae=0;for(;ge=Q[ge*oe+Ae+1]?ge++:Ae++;return Ee.concat(ne,we)}function D(Z){var pe;const re=(function(){var le,Ce;const ae=t.diffHideUnchangedRegions;if(ae==null||ae===!1)return null;const oe=ae===!0?{}:ae;return oe.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((le=oe.contextLineCount)!=null?le:2)),minimumLineCount:Math.max(1,Math.floor((Ce=oe.minimumLineCount)!=null?Ce:4))}})();if(!re||Z.length<1||Z.length>2||Z.length===2&&Z[0].lines.length!==Z[1].lines.length)return Z;const fe=Z[0].lines,Ee=(pe=Z[1])==null?void 0:pe.lines,X=le=>fe[le].kind==="context"&&(Ee===void 0||Ee[le].kind==="context"&&fe[le].code===Ee[le].code),we=[];let Y=0;for(;Y=re.minimumLineCount){const ae=le+(le===0?0:re.contextLineCount),oe=Ce-(Ce===fe.length?0:re.contextLineCount);oe-ae>=re.minimumLineCount&&we.push({start:ae,end:oe})}Y===le&&Y++}return we.length?Z.map((le,Ce)=>{const ae=[];let oe=0;for(const Q of we)ae.push(...le.lines.slice(oe,Q.start)),ae.push({code:Ce===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${le.key}-collapsed-${Q.start}-${Q.end}`,number:""}),oe=Q.end;return ae.push(...le.lines.slice(oe)),yn(_t({},le),{lines:ae})}):Z}const T=L(()=>{var Z,pe,re,fe;if(!g.value)return[];const Ee=(function(Ce){const ae=Ce.some(Q=>S(Q)),oe=Ce.some(Q=>_(Q));return ae&&oe||(function(){var Q,ne,ge,Ae;if(i.value==="diff")return!0;const _e=(Ae=(ge=String((ne=(Q=t.node)==null?void 0:Q.raw)!=null?ne:"").split(/\r?\n/,1)[0])==null?void 0:ge.trim())!=null?Ae:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(_e)})()&&(ae||oe)})(c.value),X=(function(){var Ce,ae;return((Ce=t.node)==null?void 0:Ce.originalCode)!=null||((ae=t.node)==null?void 0:ae.updatedCode)!=null})();if(m.value){const Ce=X?(function(ae,oe){const Q=v(ae),ne=v(oe),ge=$(Q,ne);if(ge.length>0){const et=[];let ut=0,yt=0;for(const Mt of ge){for(;ut=_e&&xe>=_e&&Q[Ke]===ne[xe];)Ne.unshift(yn(_t({},C(ne[xe])),{key:`inline-suffix-${xe}`,number:xe+1})),Ke--,xe--;for(let et=_e;et<=Ke;et++)Ae.push(yn(_t({},C(Q[et],"removed",{preserveBlankKind:x(Q,et)})),{key:`inline-removed-source-${et}`,number:et+1}));for(let et=_e;et<=xe;et++)Ae.push(yn(_t({},C(ne[et],"added",{preserveBlankKind:x(ne,et)})),{key:`inline-added-source-${et}`,number:et+1}));return Ae.concat(Ne)})((Z=t.node)==null?void 0:Z.originalCode,(pe=t.node)==null?void 0:pe.updatedCode):(function(ae){const oe=[];let Q=1,ne=1;const ge=I(ae);for(const[Ae,_e]of ae.entries())if(_e.startsWith("@@")){const Ke=_e.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);Ke&&(Q=Number(Ke[1]),ne=Number(Ke[2])),oe.push(yn(_t({},C(_e,"hunk")),{key:`inline-hunk-${Ae}`,number:""}))}else if(S(_e))oe.push(yn(_t({},C(M(_e.slice(1),ge),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${Ae}`,number:Q++}));else if(_(_e))oe.push(yn(_t({},C(M(_e.slice(1),ge),"added",{preserveBlankKind:!0})),{key:`inline-added-${Ae}`,number:ne++}));else{const Ke=ge&&_e.startsWith(" ")?_e.slice(1):_e;oe.push(yn(_t({},C(Ke)),{key:`inline-context-${Ae}`,number:ne})),Q++,ne++}return oe})(c.value);return D([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Ce}])}if(!Ee&&X)return(function(Ce,ae){const oe=v(Ce),Q=v(ae),ne=$(oe,Q),ge=[],Ae=[];let _e=0,Ke=0,xe=0;const Ne=(et,ut)=>{const yt=Math.max(et-_e,ut-Ke);for(let Mt=0;Mtyn(_t({},Ce),{key:`original-${ae}`,number:ae+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:Y.map((Ce,ae)=>yn(_t({},Ce),{key:`modified-${ae}`,number:ae+1}))}])}),N=L(()=>{var Z,pe;if(t.showLineNumbers!==!0)return;let re=g.value?1:u.value;if(g.value){re=Math.max(re,v((Z=t.node)==null?void 0:Z.originalCode).length,v((pe=t.node)==null?void 0:pe.updatedCode).length);for(const Ee of T.value)for(const X of Ee.lines)typeof X.number=="number"&&(re=Math.max(re,X.number))}const fe=`${Math.max(2,String(re).length)}ch`;return{"--markstream-pre-line-number-width":fe,"--markstream-pre-diff-line-number-width":fe,"--markstream-code-padding-left":"calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch))"}}),O=L(()=>T.value.some(Z=>Z.lines.some(pe=>pe.kind==="collapsed"))),P=L(()=>{const Z=i.value;return Z?`Code block: ${Z}`:"Code block"}),R=G(null),q=G([]);let j=null,W=!1,z=null;function H(Z){const pe=Number.parseFloat(String(Z??""));return Number.isFinite(pe)&&pe>0?pe:0}function ee(Z,pe){var re;if(!Z)return pe;if(Z.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const fe=Z.querySelector(".markstream-pre__diff-content"),Ee=fe?.getBoundingClientRect(),X=(re=Ee?.height)!=null?re:0;return Math.max(pe,Math.ceil(X))}function V(){W||typeof window>"u"||(j!=null&&window.cancelAnimationFrame(j),j=window.requestAnimationFrame(()=>{j=null,W||(function(){var Z,pe;j=null;const re=R.value;if(!re||!g.value||m.value||!re.classList.contains("is-wrap"))return void(q.value.length&&(q.value=[]));const fe=(function(ae){const oe=window.getComputedStyle(ae),Q=H(oe.getPropertyValue("--markstream-pre-diff-line-height"));if(Q>0)return Q;const ne=H(oe.lineHeight);return ne>0?ne:18})(re),Ee=Array.from(re.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),X=Array.from(re.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),we=Math.max(Ee.length,X.length),Y=[];for(let ae=0;ae{const Q=Ce[oe];return Q&&Math.abs(ae.rowHeight-Q.rowHeight)<=.5&&Math.abs(ae.originalHeight-Q.originalHeight)<=.5&&Math.abs(ae.modifiedHeight-Q.modifiedHeight)<=.5})||(q.value=Y)})()}))}function ie(Z){z?.disconnect(),z=null,Z&&g.value&&!m.value&&typeof ResizeObserver<"u"&&(z=new ResizeObserver(()=>{V()}),z.observe(Z))}function se(Z,pe){const re=q.value[Z];if(!re)return;const fe=pe==="original"?re.originalHeight:re.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(re.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(fe)}px`}}return qe(R,Z=>{ie(Z),kt(()=>V())},{flush:"post"}),qe([g,m,T],()=>{ie(R.value),kt(()=>V())},{flush:"post",immediate:!0}),Gn(()=>{W=!0,j!=null&&(window.cancelAnimationFrame(j),j=null),z?.disconnect(),z=null}),(Z,pe)=>(k(),E("pre",{ref_key:"preRef",ref:R,style:qt([y.value,N.value]),class:Fe([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":g.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":O.value}]),"aria-busy":o.value,"aria-label":P.value,"data-language":i.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[g.value?(k(),E("code",eMe,[(k(!0),E(Te,null,ht(T.value,re=>(k(),E("span",{key:re.key,class:Fe(["markstream-pre__diff-pane",re.className])},[w("span",tMe,[(k(!0),E(Te,null,ht(re.lines,(fe,Ee)=>(k(),E("span",{key:fe.key,class:Fe(["markstream-pre__diff-line",[`markstream-pre__diff-line--${fe.kind}`,{"markstream-pre__diff-line--empty":fe.empty}]]),style:qt(se(Ee,re.key))},[pe[0]||(pe[0]=w("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),w("span",nMe,F(fe.number),1),w("span",iMe,[w("span",sMe,F(fe.code),1)])],6))),128))])],2))),128))])):(k(),E(Te,{key:1},[t.showLineNumbers?(k(),E("span",oMe,[w("span",{class:"markstream-pre__line-numbers-text",textContent:F(h.value)},null,8,rMe)])):te("",!0),w("code",{translate:"no",class:"markstream-pre__code",textContent:F(r.value)},null,8,lMe)],64))],14,XIe))}});br.install=e=>{e.component(br.__name,br)};const ks=di(Qe({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=Rh(),i=cn("markstreamFade",void 0),s=cn("markstreamTextStreamState",void 0),o=cn("markstreamStreamVersion",void 0),r=L(()=>{const x=n.fade;return x===""||x===!0||x==="true"||x!==!1&&x!=="false"&&void 0}),l=L(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=L(()=>{var x;const S=(x=n["index-key"])!=null?x:n.indexKey;return S==null||S===""?"":String(S)}),u=G(t.node.content),c=G(""),d=G(0),f=G(t.node.content);let h;const g=G(null),m=G(null);let y="",A=null;function b(){h?.(),h=void 0}function C(){b(),c.value&&(u.value=u.value+c.value,c.value="")}qe([u,g,m],function(){var x,S;const _=g.value;if(!_)return;const I=String((x=u.value)!=null?x:""),M=m.value;return A||(A=_.firstChild,y=(S=A?.data)!=null?S:""),I.startsWith(y)?!A&&I?(_.textContent=I,A=_.firstChild,void(y=I)):void(I.length>y.length&&M&&(M.appendChild(document.createTextNode(I.slice(y.length))),y=I)):(_.textContent=I,A=_.firstChild,M&&(M.textContent=""),void(y=I))},{immediate:!0}),qe([()=>t.node.content,a,l],([x])=>{const S=String(x??""),_=a.value,I=JR({nextContent:S,persistedContent:_?s?.get(_):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=I.settledContent,c.value=I.streamedDelta,I.appended?(d.value+=1,(function(){if(!c.value||h||!o)return;const M=o.value;h=qe(()=>o.value,$=>{$!==M&&C()},{flush:"sync"})})()):c.value||b(),_&&s?.set(_,S)},{immediate:!0}),Xd(b);const v=L(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(x,S)=>(k(),E("span",{class:Fe([[e.node.center?"text-node-center":""],"text-node"])},[$n(w("span",{ref_key:"settledTextEl",ref:g},F(f.value),513),[[Qi,u.value!==""]]),$n(w("span",{ref_key:"settledAppendsEl",ref:m},null,512),[[Qi,u.value!==""]]),c.value?(k(),E("span",{key:0,class:Fe(["text-node-stream-delta",[v.value]]),onAnimationend:C},F(c.value),35)):te("",!0)],2))}}),[["__scopeId","data-v-fd79037c"]]);function op(e,t,n){return Qe({name:e,inheritAttrs:!1,setup(i,{attrs:s,slots:o}){var r,l;const a=k7(),u=v7(),c=y7(),d=typeof window<"u"&&((l=(r=Ws())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=G(typeof window>"u"||d||!c.value),h=Ul(null);let g=null;function m(y){const A=y&&"$el"in y?y.$el:y;h.value=A instanceof HTMLElement?A:null}return typeof window<"u"&&qe([h,c],([y,A],b,C)=>{if(g?.destroy(),g=null,!A||f.value)return void(f.value=!0);if(!y)return;let v=!0;const x=a(y,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});g=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{v&&g===x&&(f.value=!0)}),C(()=>{v=!1,x.destroy(),g===x&&(g=null)})},{immediate:!0}),Gn(()=>{g?.destroy(),g=null}),()=>gn(f.value?t:n,yn(_t({},s),{ref:m}),o)}})}ks.install=e=>{e.component(ks.__name,ks)};const Vv=Qe({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 i,s,o,r,l,a,u;const c=c9(String((s=(i=n.node)==null?void 0:i.language)!=null?s:"")),d=SM[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):SM[""]),f=YIe(n.node),h=JIe(String((r=(o=n.node)==null?void 0:o.raw)!=null?r:""),d,f),g=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:b7(g??{},typeof window>"u"?0:window.innerWidth)),y=g?.diffAppearance,A=y==="dark"||y!=="light"&&n.isDark===!0,b=typeof g?.fontSize=="number"&&Number.isFinite(g.fontSize)&&g.fontSize>0?g.fontSize:12,C=typeof g?.lineHeight=="number"&&Number.isFinite(g.lineHeight)&&g.lineHeight>0?g.lineHeight:b===12?18:Math.max(12,Math.round(1.5*b)),v=typeof g?.tabSize=="number"&&Number.isFinite(g.tabSize)&&g.tabSize>0?g.tabSize:4,x=f?0:8,S=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,I=typeof g?.fontFamily=="string"?g.fontFamily.trim():"",M=_t(_t({fontSize:`${b}px`,lineHeight:`${C}px`,tabSize:v,paddingTop:`${S}px`,paddingBottom:`${_}px`,"--markstream-pre-line-number-top":`${S}px`},f?{"--markstream-pre-diff-line-height":`${C}px`}:{}),I?{"--markstream-code-font-family":I}:{}),$=()=>gn("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"},[gn("svg",{class:"action-icon",width:"14",height:"14"})]),D=n.isShowPreview!==!1&&(c==="html"||c==="svg"),T=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||D&&n.showPreviewButton!==!1,N=P=>{if(P!=null)return typeof P=="number"?`${P}px`:String(P)},O=_t(_t(_t({"--markstream-code-layout-character-width":"1ch"},N(n.minWidth)?{minWidth:N(n.minWidth)}:{}),N(n.maxWidth)?{maxWidth:N(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--markstream-code-fallback-bg, var(--code-bg, #fff))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return gn("div",yn(_t({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":A,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[O,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:gn("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)]"},[gn("div",{class:"code-header-main",style:{minWidth:0,flex:"1 1 auto",display:"flex",alignItems:"center",gap:"var(--ms-gap-header-main, 0.625rem)",overflow:"hidden"}},[gn("span",{class:"icon-slot h-4 w-4 flex-shrink-0","aria-hidden":"true",style:{display:"inline-flex",width:"1rem",height:"1rem",flex:"0 0 auto"}}),gn("div",{class:"code-header-copy",style:{minWidth:0,display:"grid",gap:"2px"}},[gn("div",{class:"code-header-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--ms-text-label, 0.75rem)",fontWeight:"500",color:"var(--code-action-fg)"}},h.title),h.caption?gn("div",{class:"code-header-caption",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.75rem",color:"var(--code-line-number)"}},h.caption):null])]),gn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?gn("div",{class:"code-diff-stats","aria-hidden":"true"},[gn("span",{class:"code-diff-stat removed"},"-0"),gn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:$(),n.showCollapseButton===!1?null:$(),T?gn("div",{class:"relative"},[$()]):null])]),gn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[gn(br,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?QIe(g?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:M,"data-markstream-code-loading":"1"})]),gn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[gn("div",{class:"loading-skeleton"},[gn("div",{class:"skeleton-line"}),gn("div",{class:"skeleton-line"}),gn("div",{class:"skeleton-line short"})])]),gn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),Q3=op("ViewportDeferredCodeBlockNode",Dl({loader:()=>Bi(null,null,function*(){try{return(yield vs(()=>import("./CodeBlockNode-EUGAgT_h.js"),__vite__mapDeps([6,7]))).default}catch(e){return console.warn('[markstream-vue] Failed to load the enhanced CodeBlockNode chunk; falling back to preformatted code rendering. Enhanced code blocks require the optional "stream-diffs" peer (or "stream-monaco" as a fallback).',e),br}}),loadingComponent:Vv,delay:0,suspensible:!1}),Vv),Gl=Dl(()=>Bi(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,i,s,o;return gn(ks,yn(_t({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield iO(),(yield vs(()=>import("./index7-3cymNRfD.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,i,s,o;return gn(ks,yn(_t({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))}})),yO=Dl(()=>Bi(null,null,function*(){try{return yield iO(),(yield vs(()=>import("./index6-It9n1WlQ.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,i,s;return gn(ks,yn(_t({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(i=e.node.content)!=null?i:""}$$`}}))}})),or=di(Qe({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(k(),E("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]=i=>t.$emit("click",i,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=i=>t.$emit("mouseEnter",i,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=i=>t.$emit("mouseLeave",i,e.node.id,e.messageId,e.threadId))},F(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);or.install=e=>{e.component(or.__name,or)};const aMe={class:"superscript-node"},Sr=di(Qe({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,footnote_reference:Ur,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,emoji:xr,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("sup",aMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"superscript"}-${l}`,components:i.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"]]);Sr.install=e=>{e.component(Sr.__name,Sr)};const uMe={class:"subscript-node"},_r=di(Qe({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,footnote_reference:Ur,strikethrough:lr,highlight:Vr,insert:Ir,superscript:Sr,emoji:xr,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("sub",uMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"subscript"}-${l}`,components:i.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"]]);_r.install=e=>{e.component(_r.__name,_r)};const cMe={class:"strong-node"},rr=di(Qe({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,emphasis:ur,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("strong",cMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"strong"}-${l}`,components:i.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"]]);rr.install=e=>{e.component(rr.__name,rr)};const dMe={class:"strikethrough-node"},lr=di(Qe({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("del",dMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"strikethrough"}-${l}`,components:i.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"]]);lr.install=e=>{e.component(lr.__name,lr)};const fMe=["href","title","aria-label","aria-hidden","target","rel"],hMe=["aria-hidden"],pMe={class:"link-text-wrapper relative inline-flex"},gMe={class:"leading-[normal] link-text"},ar=di(Qe({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=cn("markstreamShowTooltips",void 0),i=L(()=>{const A=n?.value;return typeof A=="boolean"?A:t.showTooltip}),s=L(()=>{var A,b,C,v,x;const S=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",_=(A=t.animationOpacity)!=null?A:.35,I=Math.max(.12,Math.min(.5*_,_)),M={"--underline-height":`${(b=t.underlineHeight)!=null?b:2}px`,"--underline-bottom":S,"--underline-opacity":String(_),"--underline-rest-opacity":String(I),"--underline-duration":`${(C=t.animationDuration)!=null?C:1.6}s`,"--underline-timing":(v=t.animationTiming)!=null?v:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(M["--link-color"]=t.color),M}),o=qs(()=>t.customId),r=L(()=>_t({text:ks,strong:rr,strikethrough:lr,emphasis:ur,image:Xu,html_inline:Kr,inline_code:Uo},o.value)),l=Rh(),a=L(()=>{var A,b;const C=(A=t.node)==null?void 0:A.attrs;if(!C||typeof C!="object")return{};const v={};if(Array.isArray(C))for(const x of C)Array.isArray(x)&&x[0]&&(v[String(x[0])]=String((b=x[1])!=null?b:""));else for(const[x,S]of Object.entries(C))x&&S!=null&&S!==!1&&(v[x]=S===!0?"":String(S));return RM(v,"safe","a")}),u=L(()=>_t(_t({},l),a.value)),c=L(()=>{var A,b;return RM({href:String((b=(A=t.node)==null?void 0:A.href)!=null?b:"")},"safe","a").href}),d=L(()=>{if(!c.value)return;const A=u.value.target;return(typeof A=="string"?A.trim():String(A??"").trim())||(J7e(c.value)?"_blank":void 0)}),f=L(()=>{var A;return String((A=d.value)!=null?A:"").trim().toLowerCase()==="_blank"}),h=L(()=>{if(!c.value)return;const A=u.value.rel,b=new Set((typeof A=="string"?A:String(A??"")).split(/\s+/).filter(Boolean)),C=new Set(Array.from(b).filter(v=>v.toLowerCase()!=="opener"));return f.value&&(C.add("noopener"),C.add("noreferrer")),C.size>0?Array.from(C).join(" "):void 0}),g=L(()=>{const A=_t({},u.value);return delete A.title,delete A.href,delete A.target,delete A.rel,A});function m(){i.value&&$Ie()}const y=L(()=>{var A,b;const C=(A=t.node)==null?void 0:A.title;return typeof C=="string"&&C.trim().length>0?C:String((b=c.value)!=null?b:"")});return(A,b)=>{var C,v;return e.node.loading?(k(),E("span",Un({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},p(l),{style:s.value}),[w("span",pMe,[w("span",gMe,[K(p(ks),{class:"leading-[normal] link-text",node:{type:"text",content:String((C=e.node.text)!=null?C:""),raw:String((v=e.node.text)!=null?v:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),b[1]||(b[1]=w("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,hMe)):(k(),E("a",Un({key:0,class:"link-node",href:c.value,title:i.value?"":y.value,"aria-label":`Link: ${y.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:h.value},g.value,{style:s.value,onMouseenter:b[0]||(b[0]=x=>(function(S){var _,I,M,$;if(!i.value)return;const D=S,T=D?.clientX!=null&&D?.clientY!=null?{x:D.clientX,y:D.clientY}:void 0,N=((_=t.node)==null?void 0:_.title)||((I=c.value)!=null&&I.includes("xn--")&&(($=(M=t.node)==null?void 0:M.text)!=null&&$.includes("://"))?t.node.text:c.value)||"";DIe(S.currentTarget,N,"top",!1,T)})(x)),onMouseleave:m}),[(k(!0),E(Te,null,ht(e.node.children,(x,S)=>(k(),de(p(_a),{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,fMe))}}}),[["__scopeId","data-v-367e6ca4"]]);ar.install=e=>{e.component(ar.__name,ar)};const mMe={class:"insert-node"},Ir=di(Qe({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,strikethrough:lr,highlight:Vr,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("ins",mMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"insert"}-${l}`,components:i.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"]]);Ir.install=e=>{e.component(Ir.__name,Ir)};const vMe={class:"highlight-node"},Vr=di(Qe({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,strikethrough:lr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("mark",vMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"highlight"}-${l}`,components:i.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"]]);Vr.install=e=>{e.component(Vr.__name,Vr)};const yMe={class:"emphasis-node"},ur=di(Qe({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("em",yMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"emphasis"}-${l}`,components:i.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"]]);ur.install=e=>{e.component(ur.__name,ur)};const kMe={class:"hard-break"},ec=di(Qe({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(k(),E("br",kMe))}),[["__scopeId","data-v-50c58f70"]]);ec.install=e=>{e.component(ec.__name,ec)};const y0=Qe({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=xt({checkbox:qr,checkbox_input:qr,emoji:xr,emphasis:ur,hardbreak:ec,highlight:Vr,inline_code:Uo,insert:Ir,link:ar,reference:or,strikethrough:lr,strong:rr,subscript:_r,superscript:Sr,text:ks}),i=qs(()=>t.customId),s=L(()=>{const o=i.value;return Object.keys(o).length>0?_t(_t({},n),o):n});return(o,r)=>(k(!0),E(Te,null,ht(e.nodes,(l,a)=>(k(),de(p(_a),{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 Zv(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 i=e[0];if(i?.type!=="paragraph"||!Array.isArray(i.children))return null;const s=i.children;return(n||s.length>0)&&s.every(I8)?s:null}function Vd(e){var t,n;if(!e?.length)return null;let i="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;i+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return i}const bMe=["cite"],AMe={key:0,dir:"auto",class:"paragraph-node"},CMe=["custom-id"],p2=di(Qe({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>!!n.value.paragraph),s=L(()=>!!n.value.text),o=L(()=>Zv(t.node.children,!i.value)),r=L(()=>t.fade!==!1||s.value?null:Vd(o.value));return Kn("markstreamShowTooltips",L(()=>t.showTooltips)),Kn("markstreamFade",L(()=>t.fade)),(l,a)=>(k(),E("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[o.value?(k(),E("p",AMe,[r.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(r.value),9,CMe)):(k(),de(p(y0),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(k(),de(p(Mr),{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,bMe))}}),[["__scopeId","data-v-abfecebc"]]);p2.install=e=>{e.component(p2.__name,p2)};const wMe={class:"definition-list"},xMe={class:"definition-term"},SMe={class:"definition-desc"},g2=di(Qe({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(k(),E("dl",wMe,[(k(!0),E(Te,null,ht(t.node.items,(s,o)=>(k(),E(Te,{key:o},[w("dt",xMe,[K(p(Mr),{"index-key":`definition-term-${t.indexKey}-${o}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),w("dd",SMe,[K(p(Mr),{"index-key":`definition-desc-${t.indexKey}-${o}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[1]||(i[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);g2.install=e=>{e.component(g2.__name,g2)};const _Me=["href","title"],Np=di(Qe({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(i){var s;if(i.preventDefault(),typeof document>"u")return;const o=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(i,s)=>(k(),E("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,_Me))}}),[["__scopeId","data-v-e1eb37b6"]]);Np.install=e=>{e.component(Np.__name,Np)};const IMe=["id"],MMe={class:"flex-1"},m2=Qe({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(k(),E("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[w("div",MMe,[K(p(Mr),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,IMe))}});m2.install=e=>{e.component(m2.__name,m2)};const EMe=["custom-id"],M8=di(Qe({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=cn("markstreamFade",void 0),s=L(()=>i?.value!==!1||n.value.text?null:Vd(t.node.children)),o=L(()=>_t({text:ks,inline_code:Uo,link:ar,image:Xu,strong:rr,emphasis:ur,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,checkbox:qr,checkbox_input:qr,footnote_reference:Ur,hardbreak:ec,math_inline:Gl,reference:or},n.value));return(r,l)=>(k(),de(xs(`h${e.node.level}`),Un({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:he(()=>[s.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(s.value),9,EMe)):(k(!0),E(Te,{key:1},ht(e.node.children,(a,u)=>(k(),de(p(_a),{key:u,components:o.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"]]),h9=M8;h9.install=e=>{e.component(M8.__name,M8)};const TMe={key:0,dir:"auto",class:"paragraph-node"},LMe=["custom-id"],NMe={dir:"auto",class:"paragraph-node"},FMe=["custom-id"],Ah=di(Qe({__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=L(()=>{var h;return(h=t.node)!=null?h:t.item}),i=qs(()=>t.customId),s=L(()=>!!i.value.paragraph),o=L(()=>!!i.value.text),r=L(()=>{var h;return Zv((h=n.value)==null?void 0:h.children,!s.value)}),l=L(()=>{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 y=g.slice(1);if(!y.every(b=>b?.type==="list"))return null;const A=Zv([m]);return A?{paragraphChildren:A,nestedLists:y}:null});function a(){return t.fade===!1&&!o.value}const u=L(()=>a()?Vd(r.value):null),c=L(()=>{var h;return a()?Vd((h=l.value)==null?void 0:h.paragraphChildren):null}),d=Object.freeze({}),f=L(()=>{const{value:h}=t;return typeof h=="number"&&Number.isFinite(h)?{value:h}:d});return Kn("markstreamShowTooltips",L(()=>t.showTooltips)),Kn("markstreamFade",L(()=>t.fade)),(h,g)=>{var m,y;return k(),E("li",Un({class:"list-item",dir:"auto"},f.value),[r.value?(k(),E("p",TMe,[u.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(u.value),9,LMe)):(k(),de(p(y0),{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?(k(),E(Te,{key:1},[w("p",NMe,[c.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(c.value),9,FMe)):(k(),de(p(y0),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(k(!0),E(Te,null,ht(l.value.nestedLists,(A,b)=>(k(),de(p(Mr),{key:b,nodes:[A],"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:g[0]||(g[0]=C=>h.$emit("copy",C))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(k(),de(p(Mr),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(y=(m=n.value)==null?void 0:m.children)!=null?y:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:g[1]||(g[1]=A=>h.$emit("copy",A))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);Ah.install=e=>{e.component(Ah.__name,Ah)};const Ch=di(Qe({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=qs(()=>e.customId),n=L(()=>t.value.list_item||Ah);return(i,s)=>(k(),de(xs(e.node.ordered?"ol":"ul"),{class:Fe(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:he(()=>[(k(!0),E(Te,null,ht(e.node.items,(o,r)=>{var l;return k(),de(xs(n.value),Un({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:o,"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=>i.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);Ch.install=e=>{e.component(Ch.__name,Ch)};const DMe={key:2,class:"html-block-node__raw"},$Me=["innerHTML"],BMe={key:1,class:"html-block-node__placeholder"},Fp=di(Qe({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=cn("markstreamHtmlPolicy",void 0),i=cn("markstreamNestedRendererProps",void 0),s=L(()=>{var T,N;return(N=(T=t.htmlPolicy)!=null?T:n?.value)!=null?N:"safe"}),o=L(()=>{var T,N;const O=(T=i?.value)!=null?T:{};return yn(_t({},O),{customId:(N=t.customId)!=null?N:O.customId,htmlPolicy:s.value})}),r=Dl({loader:()=>Promise.resolve().then(()=>T7),suspensible:!1}),l=L(()=>{const T=c2(t.node.attrs,s.value);if(!T)return;const N=Mp(T);return Object.keys(N).length>0?N:void 0}),a=L(()=>{const T=String(t.node.tag||"").trim(),N=c2(t.node.attrs,s.value,T);if(!N)return;const O=Mp(N);return Object.keys(O).length>0?O:void 0}),u=qs(()=>t.customId),c=Qe({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=G(null),f=G(typeof window>"u"),h=G(t.node.content),g=L(()=>Array.isArray(t.node.children)?t.node.children:[]),m=L(()=>String(t.node.tag||"div")),y=L(()=>{var T;if(m.value.trim().toLowerCase()!=="details"||(T=t.node.attrs)!=null&&T.some(([O])=>String(O).toLowerCase()==="open"))return null;const N=g.value[0];return N?.type==="html_block"&&String(N.tag||"").toLowerCase()==="summary"?N:null}),A=L(()=>{var T;return Vd((T=y.value)==null?void 0:T.children)}),b=L(()=>{const T=y.value;if(!T)return;const N=c2(T.attrs,s.value,"summary");if(!N)return;const O=Mp(N);return Object.keys(O).length>0?O:void 0}),C=L(()=>A.value==null?g.value:g.value.slice(1)),v=L(()=>{const T=m.value.trim().toLowerCase();return zz.has(T)||d7(T,s.value)}),x=L(()=>g.value.length>0&&!!t.node.tag&&!v.value),S=L(()=>{var T,N,O;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(T=h.value)!=null?T:""};const P=(N=h.value)!=null?N:t.node.content;if(!P)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:bh(P,s.value)};if(t.node.loading){const q=Kv(P,u.value,s.value);return q===null?{mode:"text",content:(O=t.node.raw)!=null?O:P}:{mode:"dynamic",nodes:q}}if(!dO(P,u.value))return{mode:"html",content:bh(P,s.value)};const R=Kv(P,u.value,s.value);return R===null?{mode:"html",content:bh(P,s.value)}:{mode:"dynamic",nodes:R}}),_=k7(),I=v7(),M=y7(),$=Ul(null),D=!!t.node.loading;return typeof window<"u"?(qe([()=>d.value,()=>I?.value.heavyBlockMargin,()=>I?.value.rootMargin],([T],N,O)=>{var P,R,q,j;if((R=(P=$.value)==null?void 0:P.destroy)==null||R.call(P),$.value=null,!D)return f.value=!0,void(h.value=t.node.content);if(!T)return void(f.value=!1);let W=!0;const z=(j=(q=I?.value.heavyBlockMargin)!=null?q:I?.value.rootMargin)!=null?j:Kd,H=_(T,{rootMargin:z,allowIdle:!M.value});$.value=H,f.value=f.value||H.isVisible.value,H.whenVisible.then(()=>{W&&$.value===H&&(f.value=!0)}),O(()=>{W=!1,H.destroy(),$.value===H&&($.value=null)})},{immediate:!0}),qe(()=>t.node.content,T=>{D&&!f.value||(h.value=T)})):f.value=!0,Gn(()=>{var T,N;(N=(T=$.value)==null?void 0:T.destroy)==null||N.call(T),$.value=null}),(T,N)=>(k(),de(xs(x.value?m.value:"div"),Un({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":p(M)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:he(()=>[f.value?(k(),E(Te,{key:0},[S.value.mode==="structured"?(k(),E(Te,{key:0},[A.value!==null?(k(),E(Te,{key:0},[w("summary",$H(gN(b.value)),F(A.value),17),C.value.length?(k(),de(p(r),Un({key:0},o.value,{nodes:C.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):te("",!0)],64)):(k(),de(p(r),Un({key:1},o.value,{nodes:g.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):S.value.mode==="dynamic"?(k(),de(p(c),{key:1,nodes:S.value.nodes},null,8,["nodes"])):S.value.mode==="text"?(k(),E("pre",DMe,F(S.value.content),1)):(k(),E("div",Un({key:3},l.value,{innerHTML:S.value.content}),null,16,$Me))],64)):(k(),E("div",BMe,[Rn(T.$slots,"placeholder",{node:e.node},()=>[N[0]||(N[0]=w("span",{class:"html-block-node__placeholder-bar"},null,-1)),N[1]||(N[1]=w("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),N[2]||(N[2]=w("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);Fp.install=e=>{e.component(Fp.__name,Fp)};const zMe={dir:"auto",class:"paragraph-node"},RMe=["custom-id"],Fd=di(Qe({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=qs(()=>t.customId),i=cn("markstreamHtmlPolicy",void 0),s=cn("markstreamFade",void 0),o=cn("markstreamParseOptions",void 0),r=cn("markstreamCustomMarkdownIt",void 0),l=cn("markstreamNestedRendererProps",void 0),a=L(()=>{var I;return(I=i?.value)!=null?I:"safe"}),u=L(()=>{var I;return(I=t.parseOptions)!=null?I:o?.value}),c=L(()=>{var I;return(I=t.customMarkdownIt)!=null?I:r?.value}),d=L(()=>{var I,M;return(M=t.customHtmlTags)!=null?M:(I=l?.value)==null?void 0:I.customHtmlTags}),f=L(()=>{var I,M;const $=(I=l?.value)!=null?I:{};return yn(_t({},$),{customId:(M=t.customId)!=null?M:$.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),h=Dl({loader:()=>Promise.resolve().then(()=>T7),suspensible:!1});function g(I){var M;return I.type==="text"&&String((M=I.content)!=null?M:"").trim()===""}const m=L(()=>t.node.children.filter(I=>!g(I))),y=L(()=>m.value.length>0&&m.value.every(I=>I.type==="image"||(function(M){var $;const D=(function(T){return T.type==="link"&&Array.isArray(T.children)?T.children.filter(N=>!g(N)):[]})(M);return D.length===1&&(($=D[0])==null?void 0:$.type)==="image"})(I))),A=L(()=>new Set(sf(d.value))),b=L(()=>{if(!y.value||m.value.length<=1)return t.node.children;const I=[];for(let M=0;M0,T=t.node.children.slice(M+1).some(N=>!g(N));D&&T&&I.push(yn(_t({},$),{content:" ",raw:" "}))}return I}),C=L(()=>s?.value===!1&&!n.value.text),v=L(()=>C.value?Vd(b.value):null);function x(I,M){return{node:I,"index-key":`${t.indexKey}-${M}`,"custom-id":t.customId,"custom-html-tags":d.value}}const S=L(()=>_t({inline_code:Uo,image:Xu,link:ar,hardbreak:ec,emphasis:ur,strong:rr,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,html_inline:Kr,html_block:Fp,emoji:xr,checkbox:qr,math_inline:Gl,checkbox_input:qr,reference:or,footnote_anchor:Np,footnote_reference:Ur,text:ks},n.value)),_=L(()=>b.value.map((I,M)=>{var $;const D=(function(T){var N,O,P,R;if(T.type==="html_block"||T.type==="html_inline"){const q=String((N=T.tag)!=null?N:"").trim().toLowerCase()||Hz(T.content);if(q&&!A.value.has(q)&&Wz((O=T.content)!=null?O:T.raw,q)){const j=String((R=(P=T.content)!=null?P:T.raw)!=null?R:"");return{child:{type:"text",content:j,raw:j},component:ks,isCustomComponent:!1}}}return{child:T,component:S.value[T.type],isCustomComponent:!!(n.value[T.type]&&!X0(String(T.type)))}})(I);return yn(_t({},D),{index:M,key:`${t.indexKey||"paragraph"}-${M}`,customAttrs:D.isCustomComponent?m7(D.child,a.value):void 0,hasSlotChildren:Array.isArray(D.child.children)&&D.child.children.length>0,slotContent:String(($=D.child.content)!=null?$:""),originalChild:I})}));return(I,M)=>(k(),E("p",zMe,[v.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(v.value),9,RMe)):(k(!0),E(Te,{key:1},ht(_.value,$=>{return k(),E(Te,{key:$.key},[y.value&&g($.originalChild)?(k(),E(Te,{key:0},[$e(F((D=$.originalChild,String((T=D.content)!=null?T:""))),1)],64)):$.isCustomComponent?(k(),de(xs($.component),Un({key:1,ref_for:!0},$.customAttrs,{node:$.child,loading:$.child.loading,"index-key":$.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:he(()=>[$.hasSlotChildren?(k(),de(p(h),Un({key:0,ref_for:!0},f.value,{nodes:$.child.children,"index-key":$.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):$.slotContent?(k(),de(p(h),Un({key:1,ref_for:!0},f.value,{content:$.slotContent,final:!$.child.loading,"index-key":`${$.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"])):(k(),de(xs($.component),Un({key:2,ref_for:!0},x($.child,$.index)),null,16))],64);var D,T}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Fd.install=e=>{e.component(Fd.__name,Fd)};const OMe={class:"table-node-wrapper"},PMe=["aria-busy"],jMe={key:0},HMe=["custom-id"],WMe=["aria-label","onPointerdown"],qMe=["custom-id"],UMe={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},Dp=di(Qe({__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=L(()=>{var A;return(A=t.node.loading)!=null&&A}),i=L(()=>{var A;return(A=t.node.rows)!=null?A:[]}),s=G(null),o=G([]);let r=null;const l=L(()=>t.node.header.cells.length),a=L(()=>o.value.some(A=>Number.isFinite(A)&&A>0)),u=L(()=>a.value?o.value.map(A=>A>0?{width:`${A}px`}:void 0):[]);Kn("markstreamShowTooltips",L(()=>t.showTooltips)),Kn("markstreamFade",L(()=>t.fade));const c=qs(()=>t.customId),d=L(()=>!!c.value.text),f=L(()=>!!c.value.paragraph),h=new WeakMap;function g(A){const b=t.fade===!1&&!d.value,C=!f.value,v=h.get(A);if(v?.children===A.children&&v.textFastPath===b&&v.paragraphFastPath===C)return v.info;const x=Zv(A.children,C,!0),S={simpleChildren:x,plainText:x&&b?Vd(x):null};return h.set(A,{children:A.children,textFastPath:b,paragraphFastPath:C,info:S}),S}function m(A){if(!r)return;A.preventDefault();const b=r.startWidth+r.nextStartWidth,C=Math.min(48,Math.floor(b/2)),v=Math.max(C,Math.min(b-C,Math.round(r.startWidth+A.clientX-r.startX))),x=[...r.widths];x[r.index]=v,x[r.index+1]=b-v,o.value=x}function y(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),r=null)}return qe(l,()=>{y(),o.value=[]}),Gn(y),(A,b)=>(k(),E("div",OMe,[w("table",{ref_key:"tableRef",ref:s,class:Fe(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(k(),E("colgroup",jMe,[(k(!0),E(Te,null,ht(e.node.header.cells,(C,v)=>(k(),E("col",{key:v,style:qt(u.value[v])},null,4))),128))])):te("",!0),w("thead",null,[w("tr",null,[(k(!0),E(Te,null,ht(e.node.header.cells,(C,v)=>(k(),E("th",{key:v,dir:"auto",class:Fe([C.align==="right"?"text-right":C.align==="center"?"text-center":"text-left"])},[g(C).plainText!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(g(C).plainText),9,HMe)):g(C).simpleChildren?(k(),de(p(y0),{key:1,nodes:g(C).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${v}`},null,8,["nodes","custom-id","index-key"])):(k(),de(p(Mr),{key:2,nodes:C.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=>A.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),v(function(S,_){if(_.button!==0)return;const I=(function(){var D;const T=(D=s.value)==null?void 0:D.querySelectorAll("thead th");return Array.from(T??[],N=>Math.round(N.getBoundingClientRect().width))})(),M=I[S],$=I[S+1];M&&$&&(_.preventDefault(),r={index:S,startX:_.clientX,startWidth:M,nextStartWidth:$,widths:I},o.value=I,window.addEventListener("pointermove",m),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y))})(v,x)},null,40,WMe)):te("",!0)],2))),128))])]),w("tbody",null,[(k(!0),E(Te,null,ht(i.value,(C,v)=>(k(),E("tr",{key:v},[(k(!0),E(Te,null,ht(C.cells,(x,S)=>(k(),E("td",{key:S,class:Fe([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[g(x).plainText!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(g(x).plainText),9,qMe)):g(x).simpleChildren?(k(),de(p(y0),{key:1,nodes:g(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${v}-${S}`},null,8,["nodes","custom-id","index-key"])):(k(),de(p(Mr),{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]=_=>A.$emit("copy",_))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,PMe),K(ls,{name:"table-node-fade"},{default:he(()=>[n.value?(k(),E("div",UMe,[Rn(A.$slots,"loading",{isLoading:n.value},()=>[b[2]||(b[2]=w("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),b[3]||(b[3]=w("span",{class:"sr-only"},"Loading",-1))],!0)])):te("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);Dp.install=e=>{e.component(Dp.__name,Dp)};const KMe={class:"hr-node"},v2=di({},[["render",function(e,t){return k(),E("hr",KMe)}],["__scopeId","data-v-39b2349c"]]);v2.install=e=>{e.component(v2.__name,v2)};const VMe={class:"unknown-node"},E8=Qe({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(k(),E("div",VMe,F(e.node.raw),1))}),y2=di(Qe({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=L(()=>`vmr-container vmr-container-${t.node.name}`),i=qs(()=>t.customId),s=L(()=>_t({text:ks,paragraph:Fd,heading:h9,inline_code:Uo,link:ar,image:Xu,strong:rr,emphasis:ur,strikethrough:lr,insert:Ir,subscript:_r,superscript:Sr,checkbox:qr,checkbox_input:qr,hardbreak:ec,math_inline:Gl,reference:or,list:Ch,math_block:yO,table:Dp},i.value));return(o,r)=>(k(),E("div",Un({class:n.value},e.node.attrs),[(k(!0),E(Te,null,ht(e.node.children,(l,a)=>{return k(),de(xs((u=l.type,s.value[u]||E8)),{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"]]);y2.install=e=>{e.component(y2.__name,y2)};const ZMe=["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"],VM=[[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 GMe(e){if(e<=255)return ZMe[e];let t=0,n=VM.length-1;for(;t<=n;){const i=t+n>>1,s=VM[i];if(es[1]))return s[2];t=i+1}}return"L"}const QMe=/[ \t\n\r\f]+/g,YMe=/[\t\n\r\f]| {2,}|^ | $/;let Y3=null;const JMe=new RegExp("\\p{Script=Arabic}","u"),pc=new RegExp("\\p{M}","u"),A7=new RegExp("\\p{Nd}","u");function ZM(e){return JMe.test(e)}function GM(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 ha(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&i<=57343){if(GM(i-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(GM(n))return!0}}return!1}const XMe=new Set([" "," ","⁠","\uFEFF"]),eEe=new Set(["-","‐","–","—"]);function kO(e,t){return!((function(n){const i=$p(n);return i!==null&&XMe.has(i)})(e)||t&&((function(n){const i=$p(n);return i!==null&&(C7.has(i)||Zd.has(i))})(e)||(function(n){const i=$p(n);return i!==null&&eEe.has(i)})(e)))}const C7=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),p9=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),w7=new Set(["'","’"]),Zd=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),tEe=new Set([":",".","،","؛"]),nEe=new Set(["၏"]),iEe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function sEe(e){if(x7(e))return!0;let t=!1;for(const n of e)if(Zd.has(n)||Qv(n))t=!0;else if(!t||!pc.test(n))return!1;return t}function oEe(e){for(const t of e)if(!C7.has(t)&&!Zd.has(t))return!1;return e.length>0}function rEe(e){if(x7(e))return!0;for(const t of e)if(!(p9.has(t)||w7.has(t)||pc.test(t)||Qv(t)))return!1;return e.length>0}function x7(e){let t=!1;for(const n of e)if(n!=="\\"&&!pc.test(n)){if(!(p9.has(n)||Zd.has(n)||w7.has(n)))return!1;t=!0}return t}function Gv(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function $p(e){if(e.length===0)return null;const t=Gv(e,e.length);return e.slice(t)}const lEe=[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 Qv(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,i){for(let s=0;s=i[s]&&n<=i[s+1])return!0;return!1})(t,lEe)}function aEe(e){const t=(function(n){for(const i of n)if(!pc.test(i))return i;return null})(e);return t!==null&&A7.test(t)}function uEe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(pc.test(i))n--;else{if(!p9.has(i)&&!w7.has(i))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function cEe(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function QM(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function YM(e,t){return e&&t!==null&&tEe.has(t)}function dEe(e){const t=$p(e);return t!==null&&nEe.has(t)}function fEe(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 T8(e){let t=e.length;for(;t>0;){const n=Gv(e,t),i=e.slice(n,t);if(iEe.has(i))return!0;if(!Zd.has(i))return!1;t=n}return!1}function hEe(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 pEe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function _l(e){return e.length===1?e[0]:e.join("")}function gEe(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),_l(n)}function mEe(e,t,n,i){if(!pEe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=hEe(c,i),f=d==="text"&&t;o===null||d!==o||f!==a?(o!==null&&s.push({text:_l(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return o!==null&&s.push({text:_l(r),isWordLike:a,kind:o,start:l}),s}function J3(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const vEe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function yEe(e,t){const n=e.texts[t];return!!n.startsWith("www.")||vEe.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!wEe.has(e)&&!CEe.test(e)&&AEe.test(e)}function JM(e){let t=!1;for(const n of e)if(!pc.test(n)){if(!bO(n))return!1;t=!0}return t}function xEe(e,t,n,i){const s=!t&&JM(e),o=!i&&JM(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=Gv(c,d),h=c.slice(f,d);if(!pc.test(h))return h;d=f}return null})(a);return u!==null&&Qv(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=Gv(a,u),d=a.slice(c,u);if(!pc.test(d))return bO(d)||Qv(d);u=c}return!1})(e);return!!(s||o||l)&&!ha(e)&&!ha(n)&&(t||s||r)&&(i||o)}function XM(e){for(const t of e)if(A7.test(t))return!0;return!1}function k2(e){if(e.length===0)return!1;for(const t of e)if(!A7.test(t)&&!bEe.has(t))return!1;return!0}function SEe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,h;const g=(Y3===null&&(Y3=new Intl.Segmenter(void 0,{granularity:"word"})),Y3);let m=0;const y=[],A=[],b=[],C=[],v=[],x=[],S=[],_=[],I=[],M=[],$=[],D=[];for(const R of g.segment(a))for(const q of mEe(R.segment,(d=R.isWordLike)!=null&&d,R.index,c)){let j=function(){x[Z]!==null&&(A[Z]=[QM(y,x,S,Z)],x[Z]=null),A[Z].push(q.text),b[Z]=b[Z]||q.isWordLike,_[Z]=_[Z]||H,I[Z]=I[Z]||ee,M[Z]=ie,$[Z]=se,D[Z]=YM(I[Z],V)};const W=q.kind==="text",z=cEe(q.text,q.isWordLike,q.kind),H=ha(q.text),ee=ZM(q.text),V=$p(q.text),ie=T8(q.text),se=dEe(q.text),Z=m-1;u.carryCJKAfterClosingQuote&&W&&m>0&&C[Z]==="text"&&H&&_[Z]&&M[Z]||W&&m>0&&C[Z]==="text"&&oEe(q.text)&&_[Z]||W&&m>0&&C[Z]==="text"&&$[Z]?j():W&&m>0&&C[Z]==="text"&&q.isWordLike&&ee&&D[Z]?(j(),b[Z]=!0):z!==null&&m>0&&C[Z]==="text"&&x[Z]===z?S[Z]=((f=S[Z])!=null?f:1)+1:W&&!q.isWordLike&&m>0&&C[Z]==="text"&&!_[Z]&&(sEe(q.text)||q.text==="-"&&b[Z])?j():(y[m]=q.text,A[m]=[q.text],b[m]=q.isWordLike,C[m]=q.kind,v[m]=q.start,x[m]=z,S[m]=z===null?0:1,_[m]=H,I[m]=ee,M[m]=ie,$[m]=se,D[m]=YM(ee,V),m++)}for(let R=0;Rnull);let N=-1;for(let R=m-1;R>=0;R--){const q=y[R];if(q.length!==0){if(C[R]==="text"&&!b[R]&&N>=0&&C[N]==="text"&&(rEe(q)||q==="-"&&aEe(y[N]))){const j=(h=T[N])!=null?h:[];j.push(q),T[N]=j,v[N]=v[R],y[R]="";continue}N=R}}for(let R=0;RH+1){q.push(_l(se)),j.push(pe),W.push("text"),z.push(R.starts[H]),H=Z;continue}}q.push(ee),j.push(ie),W.push(V),z.push(R.starts[H]),H++}return{len:q.length,texts:q,isWordLike:j,kinds:W,starts:z}})((function(R){const q=[],j=[],W=[],z=[];for(let H=0;H1;for(let se=0;se=R.len||J3(R.kinds[V]))continue;const ie=[],se=R.starts[V];let Z=V;for(;Z0&&(q.push(_l(ie)),j.push(!0),W.push("text"),z.push(se),H=Z-1)}return{len:q.length,texts:q,isWordLike:j,kinds:W,starts:z}})((function(R){const q=R.texts.slice(),j=R.isWordLike.slice(),W=R.kinds.slice(),z=R.starts.slice();for(let ee=0;ee=0&&!kO(u.texts[C-1],c)&&b(C),m<0&&(m=C),y=y||ha(v))}return b(u.len),{len:d.length,texts:d,isWordLike:f,kinds:h,starts:g}})(o,r,t.breakKeepAllAfterPunctuation):r;return _t({normalized:o,chunks:SEe(l,s)},l)}let Nf=null;const eE=new Map;let Ff=null;const IEe=new RegExp("\\p{Emoji_Presentation}","u"),MEe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let X3=null;const tE=new Map;function L8(){if(Nf!==null)return Nf;if(typeof OffscreenCanvas<"u")return Nf=new OffscreenCanvas(1,1).getContext("2d"),Nf;if(typeof document<"u")return Nf=document.createElement("canvas").getContext("2d"),Nf;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function _u(e,t){let n=t.get(e);return n===void 0&&(n={width:L8().measureText(e).width,containsCJK:ha(e)},t.set(e,n)),n}function Yv(){if(Ff!==null)return Ff;if(typeof navigator>"u")return Ff={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Ff;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 Ff={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Ff}function AO(){return X3===null&&(X3=new Intl.Segmenter(void 0,{granularity:"grapheme"})),X3}function EEe(e){return IEe.test(e)||e.includes("️")}function id(e,t,n){return n===0?t.width:t.width-(function(i,s){return s.emojiCount===void 0&&(s.emojiCount=(function(o){let r=0;const l=AO();for(const a of l.segment(o))EEe(a.segment)&&r++;return r})(i)),s.emojiCount})(e,t)*n}function TEe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function nE(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function iE(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function S7(e,t){return t===0?0:e+t}function FEe(e,t,n,i,s){return S7(i,t==="tab"?s+(function(o,r){return o.letterSpacing!==0&&o.spacingGraphemeCounts[r]>0?o.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function sE(e,t,n,i){return S7(i,t==="tab"?0:e.lineEndFitAdvances[n])}function oE(e,t,n,i,s){return S7(i,t==="tab"?s:e.lineEndPaintAdvances[n])}function DEe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function $Ee(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Em(e,t,n){let i=t;for(;ij){if(ae!==null&&Q>Y){Z(we,Q,ne),ge=Q,oe=Em(ae,oe,ge+1),Q=-1,ne=0;continue}Z(),re(we,ge,Ae)}else z+=Ae,ee=we,V=ge+1;else re(we,ge,Ae);const _e=ge+1;ae!==null&&ae[oe]===_e&&(Q=_e,ne=z,oe++),ge++}H&&ee===we&&V===Ce.length&&(ee=we+1,V=0)}let X=0;for(;X=O.length)));){const we=O[X],Y=nE(P[X]);if(H)if(z+we>j){if(Y){fe(X,we),Z(X+1,0,z-we),X++;continue}if(ie>=0){if(ee>ie||ee===ie&&V>0){Z();continue}Z(ie,0,se);continue}if(we>j&&R[X]!==null){Z(),Ee(X,0),X++;continue}Z()}else fe(X,we),Y&&(ie=X+1,se=z-we),X++;else we>j&&R[X]!==null?Ee(X,0):pe(X,we),Y&&(ie=X+1,se=z-we),X++}return H&&Z(),W})(n,i);const{widths:s,kinds:o,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=Yv(),d=i+c.lineFitEpsilon;let f=0,h=0,g=!1,m=0,y=0,A=-1,b=0,C=null;function v(){A=-1,b=0,C=null}function x(T=m,N=y,O){f++,h=0,g=!1,v()}function S(T,N){g=!0,m=T+1,y=0,h=N}function _(T,N,O){g=!0,m=T,y=N+1,h=O}function I(T,N){g?(h+=N,m=T+1,y=0):S(T,N)}function M(T,N,O,P,R,q){if(!N)return;const j=sE(n,T,O,R);oE(n,T,O,R,P),A=O+1,b=h-q+j,C=T}function $(T,N){var O;const P=r[T],R=(O=l[T])!=null?O:null;let q=R===null?-1:Em(R,0,N+1),j=-1,W=N;for(;Wd){if(R!==null&&j>N){x(T,j),W=j,q=Em(R,q,W+1),j=-1;continue}x(),_(T,W,z)}else h=V,m=T,y=W+1}else _(T,W,z);const H=W+1;R!==null&&R[q]===H&&(j=H,q++),W++}g&&m===T&&y===P.length&&(m=T+1,y=0)}function D(T){f++,v()}for(let T=0;T=N.endSegmentIndex)));){const P=o[O],R=nE(P),q=NEe(n,g,O),j=P==="tab"?LEe(h+q,n.tabStopAdvance):s[O],W=q+j,z=FEe(n,P,O,q,j);if(P!=="soft-hyphen")if(g){if(h+z>d){const H=h+sE(n,P,O,q);if(oE(n,P,O,q,j),C==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&b<=d){x(A,0);continue}if(R&&H<=d){I(O,W),x(O+1,0),O++;continue}if(A>=0&&b<=d){if(m>A||m===A&&y>0){x();continue}const ee=A;x(ee,0),O=ee;continue}if(z>d&&r[O]!==null){x(),$(O,0),O++;continue}x();continue}I(O,W),M(P,R,O,j,q,W),O++}else z>d&&r[O]!==null?$(O,0):S(O,j),M(P,R,O,j,q,W),O++;else g&&(m=O+1,y=0,A=O+1,b=h+a,C=P),O++}g&&(N.consumedEndSegmentIndex,x(N.consumedEndSegmentIndex,0))}return f})(e,t)}let ek=null;function _7(){return ek===null&&(ek=new Intl.Segmenter(void 0,{granularity:"grapheme"})),ek}function zEe(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,h){i=[d],s=f,o=h,r=T8(d),l=p9.has(d)}function c(d,f){i.push(d),o=o||f;const h=T8(d);r=d.length===1&&Zd.has(d)&&r||h,l=!1}for(const d of _7().segment(e)){const f=d.segment,h=ha(f);i.length!==0?l||C7.has(f)||Zd.has(f)||t.carryCJKAfterClosingQuote&&h&&r?c(f,h):o||h?(a(),u(f,d.index,h)):c(f,h):u(f,d.index,h)}return a(),n}function REe(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(l){if(!(s<0)){if(o)s+1===l?i.push(t[s]):(function(a,u){const c=t[a].start,d=u=0&&!kO(t[l-1].text,n)&&r(l),s<0&&(s=l),o=o||ha(a.text)}return r(t.length),i}function rE(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=_7();for(const s of i.segment(e))n++;return n}function OEe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function PEe(e,t,n,i,s){const o=Yv(),{cache:r,emojiCorrection:l}=(function(D,T){L8().font=D;const N=(function(R){let q=eE.get(R);return q||(q=new Map,eE.set(R,q)),q})(D),O=(function(R){const q=R.match(/(\d+(?:\.\d+)?)\s*px/);return q?parseFloat(q[1]):16})(D),P=T?(function(R,q){let j=tE.get(R);if(j!==void 0)return j;const W=L8();W.font=R;const z=W.measureText("😀").width;if(j=0,z>q+.5&&typeof document<"u"&&document.body!==null){const H=document.createElement("span");H.style.font=R,H.style.display="inline-block",H.style.visibility="hidden",H.style.position="absolute",H.textContent="😀",document.body.appendChild(H);const ee=H.getBoundingClientRect().width;document.body.removeChild(H),z-ee>.5&&(j=z-ee)}return tE.set(R,j),j})(D,O):0;return{cache:N,fontSize:O,emojiCorrection:P}})(t,(a=e.normalized,MEe.test(a)));var a;const u=id("-",_u("-",r),l)+(s===0?0:2*s),c=8*id(" ",_u(" ",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 y=e.chunks.length<=1&&!d;const A=null,b=[],C=[],v=[],x=null,S=Array.from({length:e.len});function _(D,T,N,O,P,R,q,j,W){P!=="text"&&P!=="space"&&P!=="zero-width-break"&&(y=!1),f.push(T),h.push(N),g.push(O),m.push(P),b.push(q),C.push(j),d&&v.push(W)}function I(D,T,N,O,P){const R=_u(D,r),q=d?rE(D,T):0,j=(function(ee,V,ie){return V>1?ee+(V-1)*ie:ee})(id(D,R,l),q,s),W=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:j,z=W===0?0:W+(q>0?s:0),H=T==="space"||T==="zero-width-break"?0:j;if(P&&O&&D.length>1){let ee="sum-graphemes";s!==0?ee="segment-prefixes":k2(D)?ee="pair-context":o.preferPrefixWidthsForBreakableRuns&&(ee="segment-prefixes");const V=(function(se,Z,pe,re,fe){if(Z.breakableFitAdvances!==void 0&&Z.breakableFitMode===fe)return Z.breakableFitAdvances;Z.breakableFitMode=fe;const Ee=AO(),X=[];for(const Ce of Ee.segment(se))X.push(Ce.segment);if(X.length<=1)return Z.breakableFitAdvances=null,Z.breakableFitAdvances;if(fe==="sum-graphemes"){const Ce=[];for(const ae of X){const oe=_u(ae,pe);Ce.push(id(ae,oe,re))}return Z.breakableFitAdvances=Ce,Z.breakableFitAdvances}if(fe==="pair-context"||X.length>96){const Ce=[];let ae=null,oe=0;for(const Q of X){const ne=id(Q,_u(Q,pe),re);if(ae===null)Ce.push(ne);else{const ge=ae+Q,Ae=_u(ge,pe);Ce.push(id(ge,Ae,re)-oe)}ae=Q,oe=ne}return Z.breakableFitAdvances=Ce,Z.breakableFitAdvances}const we=[];let Y="",le=0;for(const Ce of X){Y+=Ce;const ae=id(Y,_u(Y,pe),re);we.push(ae-le),le=ae}return Z.breakableFitAdvances=we,Z.breakableFitAdvances})(D,R,r,l,ee),ie=V===null||i==="keep-all"?null:(function(se){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(se))return null;const Z=[];let pe=0;for(const re of _7().segment(se))pe++,OEe(re.segment)&&Z.push(pe);return Z.length===0?null:Z})(D);return void _(D,j,z,H,T,N,V,ie,q)}_(D,j,z,H,T,N,null,null,q)}for(let D=0;D=55296&&se<=56319&&ie+1=56320&&fe<=57343&&(Z=fe-56320+(se-55296<<10)+65536,pe=2)}const re=GMe(Z);re!=="R"&&re!=="AL"&&re!=="AN"||(j=!0);for(let fe=0;fe=0&&q[se]==="ET";se--)q[se]="EN";for(se=ie+1;se0?q[ie-1]:ee)!=="L"?"R":"L";if(Z===((se{const e=globalThis;if(e[tk])return e[tk];const t={configs:{},controllers:{},revision:Ul(0),preparedCache:new Map,blockEstimateCache:new Map};return e[tk]=t,t})();let T1=null;const nk=Vs.revision;function lE(e){var t;return e&&(t=Vs.configs[e])!=null?t:null}function aE(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function HEe(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function ik(e){var t,n,i;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const o of e){if(!HEe(o))return null;o.type==="text"?s+=String((t=o.content)!=null?t:""):o.type==="emoji"?s+=String((i=(n=o.name)!=null?n:o.raw)!=null?i:""):o.type==="hardbreak"&&(s+=` -`)}return s.length>0?s:null}function sk(e,t,n){var i,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var o;if(T1!=null)return T1;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return T1=!!((o=r.getContext)!=null&&o.call(r,"2d")),T1}catch{return T1=!1,!1}})())return null;try{const o=Math.round(100*t)/100,r=[(i=n.whiteSpace)!=null?i:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,o,e].join("\0"),l=Vs.blockEstimateCache.get(r);if(l)return Vs.blockEstimateCache.delete(r),Vs.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 y=`${m}\0${g}\0${h}`,A=Vs.preparedCache.get(y);if(A)return Vs.preparedCache.delete(y),Vs.preparedCache.set(y,A),A.prepared;const b=(function(C,v,x){return(function(S,_,I,M){var $,D;const T=($=M?.wordBreak)!=null?$:"normal",N=(D=M?.letterSpacing)!=null?D:0;return PEe(_Ee(S,Yv(),M?.whiteSpace,T),_,!1,T,N)})(C,v,0,x)})(h,g,{whiteSpace:m});for(Vs.preparedCache.set(y,{prepared:b});Vs.preparedCache.size>240;){const C=Vs.preparedCache.keys().next().value;if(!C)break;Vs.preparedCache.delete(C)}return b})(e,n.font,a),c=(function(h,g,m){const y=BEe(h,g);return{lineCount:y,height:y*m}})(u,Math.max(24,o-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(Vs.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});Vs.blockEstimateCache.size>4e3;){const h=Vs.blockEstimateCache.keys().next().value;if(!h)break;Vs.blockEstimateCache.delete(h)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function CO(e,t,n){var i,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const o=ik(e.children);return o&&n.paragraph?sk(o,t,n.paragraph):null}if(e.type==="heading"){const o=Number(e.level||0),r=ik(e.children),l=n.headings[o];return r&&l?sk(r,t,l):null}if(e.type==="list_item"){const o=Array.isArray(e.children)?e.children:[];if(o.length!==1||((i=o[0])==null?void 0:i.type)!=="paragraph"||!n.listItem)return null;const r=ik((s=o[0])==null?void 0:s.children);return r?sk(r,t,n.listItem):null}if(e.type==="list"){const o=Array.isArray(e.items)?e.items:[];if(!o.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of o){const a=CO(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 sd(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function ok(e,t,n=0){return e.diff?b7(t??{},n)?(function(i){const s=sd(i.raw);if(s){const o=s.split(/\r?\n/);return i.originalCode!=null||i.updatedCode!=null?Math.max(1,o.filter(r=>!jEe.some(l=>r.startsWith(l))).length):Math.max(1,o.length)}return L1(sd(i.originalCode))+L1(sd(i.updatedCode))})(e):(function(i){const s=i.originalCode,o=i.updatedCode;if(s!=null||o!=null)return Math.max(L1(sd(s)),L1(sd(o)));const r=sd(i.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(sd(e.code,e.loading===!0))}function WEe(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function rk(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const i=window.getComputedStyle(t),s=e.offsetHeight,o=aE(i.lineHeight,1.5*aE(i.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:WEe(i),lineHeight:o,wrapperOverhead:Math.max(0,s-o),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const qEe=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function uE(e,t={}){var n;const i={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return i;const o=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(o))qEe.has(r)||s.has(r)||l.enumerable&&"value"in l&&(i[r]=l.value);return i}function cE(e,t,n,i){var s;const o=(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,o);if(!i.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,o-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const h=i.getNormalizedScrollTop(e,t,!1),g=Math.abs(h-r);gd&&(e.scrollTop=u)}function dE(e,t){let n=0,i=null,s=null;const o=()=>{const r=s;s=null,i=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(i&&(clearTimeout(i),i=null),n=l,s=null,e(...r)):i||(i=setTimeout(o,a))}}function fE(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const wO=Symbol("MarkstreamMathBlockMinHeightCache");function zat(){return cn(wO,null)}const UEe=new Set(["text","inline_code","emoji","footnote_reference"]),KEe=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function N1(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function od(e,t,n,i=22){const s=String(e??"");if(!s)return n;const o=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/o),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*i+12))}function xO(e){var t;if(!e||typeof e!="object")return!1;const n=e,i=String((t=n.type)!=null?t:"");if(UEe.has(i))return!0;if(!KEe.has(i))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(xO)}function N8(e){var t,n,i,s,o,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((i=(n=u.content)!=null?n:u.raw)!=null?i:"");if(c==="inline_code")return String((r=(o=(s=u.code)!=null?s:u.content)!=null?o: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(N8).filter(Boolean).join(" ");g&&d.push(g)}}return d.join(" ").replace(/\s+/g," ").trim()}function SO(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const i=t[n];return Array.isArray(i)&&i.some(SO)})}function VEe(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),i=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),o=Math.max(1,i,s);return 30+26*Math.max(0,o-1)}function ZEe(e,t){var n,i,s,o,r,l,a,u,c,d,f,h,g,m;if(!e||typeof e!="object")return 32;const y=e,A=String((n=y.type)!=null?n:""),b=Number.isFinite(t)&&t>0?t:640;switch(A){case"heading":return(function(C){var v;const x=Number((v=C.level)!=null?v:C.depth);return x>=4?20:x===3?30:x===2?32:44})(y);case"paragraph":return(function(C,v){const x=String(C??"");if(!x)return 28;const S=Math.max(18,Math.floor(Math.max(320,v)/8)),_=x.split(/\r?\n/).length,I=Math.ceil(x.length/S);return Math.max(1,_,I)<=1?28:od(x,v,34)})(String((s=(i=y.raw)!=null?i:y.content)!=null?s:""),b);case"list":return(function(C,v){var x;const S=Array.isArray(C.items)?C.items:[];if(!S.length)return 48;const _=Math.max(48,30*S.length+12);let I=12;for(const D of S)I+=VEe(N8(D)||String((x=D.raw)!=null?x:""),v);const M=Math.max(0,I-_);if(S.length>20){const D=Math.round(2.4*S.length);return Math.round(_+Math.max(D,Math.min(M,3*S.length)))}if(M<=0)return _;const $=S.length>8?8*S.length:M;return Math.round(_+Math.min(M,$))})(y,b);case"list_item":return od(String((r=(o=y.raw)!=null?o:y.content)!=null?r:""),b,34);case"blockquote":return od(String((a=(l=y.raw)!=null?l:y.content)!=null?a:""),b,56);case"table":return(function(C,v){const x=[...C.header?[C.header]:[],...Array.isArray(C.rows)?C.rows:[]];if(!x.length){const S=Array.isArray(C.children)?C.children.length:3;return Math.max(120,38*S+48)}return Math.max(120,Math.round(4+x.reduce((S,_)=>S+(function(I,M){const $=Math.max(1,I.length),D=Math.max(80,(M-32)/$),T=Math.max(10,Math.floor(D/8)),N=Math.max(1,...I.map(O=>{var P;const R=N8(O)||String((P=O?.raw)!=null?P:"");return Math.ceil(R.length/T)||1}));return 54+34*Math.max(0,N-1)+($<=3&&I.some(SO)?14:0)})((function(I){var M;return Array.isArray(I?.cells)&&(M=I.cells)!=null?M:[]})(_),v),0)))})(y,b);case"code_block":{const C=String((u=y.language)!=null?u:"").trim().toLowerCase(),v=String((d=(c=y.code)!=null?c:y.raw)!=null?d:"");return C==="mermaid"?Wv(jv(v)):C==="infographic"?qv(Hv(v)):od(v,b,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(C,v){var x,S,_;const I=C.match(/^\s*]*)>/i);return I&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=I[1])!=null?x:"")?od(((_=(S=C.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:S[1])==null?void 0:_.replace(/<[^>]*>/g,"").trim())||"Details",v,28,28):od(C,v,96)})(String((h=(f=y.raw)!=null?f:y.content)!=null?h:""),b);case"thematic_break":return 24;default:return od(String((m=(g=y.raw)!=null?g:y.content)!=null?m:""),b,40)}}function hE(e,t,n){return Math.min(Math.max(e,t),n)}const GEe=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],QEe=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","safeMarkdownMs","tokenizeMs","htmlBlockPassesMs","parseMarkdownToStructureTotalMs"],YEe=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),_O=["raw","content","code","originalCode","updatedCode"],pE=new WeakMap,gE=new WeakMap;let JEe=1;function Sl(){return typeof performance<"u"?performance.now():Date.now()}function mE(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Or(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=pE.get(t);return n||(n=JEe++,pE.set(t,n)),String(n)}function vE(e,t,n,i={}){var s,o;const r=i.includeFinal!==!1,l={md:Or(t),customMarkdownIt:Or(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(o=e.streamParse)!=null?o:"auto",validateLink:Or(e.validateLink),preTransformTokens:Or(e.preTransformTokens),postTransformTokens:Or(e.postTransformTokens),postTransformNodes:Or(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function yE(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 kE(e){const t=IO(e);return t.length>=2&&t.every(n=>{const i=n.trim();return i.length>=1&&i.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function IO(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function MO(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function I7(e){const t=String(e??"");return`${t.length}:${MO(t)}`}function F8(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?I7(r):`${r.length}:${MO(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Or(e)}`;if(typeof e!="object")return typeof e;const i=e,s=t.get(i);if(s)return`cycle:${s}`;if(n>=6)return`object:${Or(i)}`;const o=Or(i);if(t.set(i,o),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>F8(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}:${F8(r[u],t,n+1)}`).join(";")}`}return typeof e}function Jv(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function EO(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(i=>Jv(i)?gc(i,t,n+1):EO(i,t,n+1)).join(",")}`:Jv(e)?gc(e,t,n):F8(e,t,n)}function XEe(e,t,n){return Object.keys(e).sort().filter(i=>i!=="children"&&!_O.includes(i)).map(i=>{const s=e[i];return typeof s=="string"?`${i}=s:${I7(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${i}=${String(s)}`:typeof s=="function"?`${i}=fn:${Or(s)}`:YEe.has(i)&&(Array.isArray(s)||typeof s=="object")?`${i}=${EO(s,t,n+1)}`:s&&typeof s=="object"?`${i}=object:${Or(s)}`:""}).filter(Boolean).join(";")}function eTe(e){return _O.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${I7(n)}`:""}).filter(Boolean).join(";")}function gc(e,t=new WeakMap,n=0){const i=gE.get(e);if(i)return i;const s=e,o=t.get(s);if(o)return`node-cycle:${o}`;if(n>=6)return`node:${e.type}:${Or(s)}`;const r=Or(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=>gc(g,u,c+1)).join("|"):"";return[a.type,eTe(d),XEe(d,u,c),f.length,h].join(":")})(e,t,n);return gE.set(s,l),l}function TO(e,t){return gc(e)===gc(t)}function M7(e,t,n){const i=Sl(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Sl()-i,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function bE(e,t,n){return M7(t,n,()=>gc(e))}function LO(e,t,n){return bE(e,n,"stabilizeSignatureMs")===bE(t,n,"stabilizeSignatureMs")}function Tm(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function AE(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function CE(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function tTe(e,t){return e.length===t.length&&e===t}function E7(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const i=e,s=t,o=Object.keys(i).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(o.length!==r.length)return!1;for(let c=0;c{i=E7(e,t)}),i??LO(e,t,n)}function sTe(e,t){const n={};for(const i of GEe){const s=e[i],o=t?.[i];typeof s=="number"&&(n[i]=s-(typeof o=="number"?o:0))}return n}function oTe(e,t){var n;const i=kM(t.instanceMsgId),s=new Map,o=(n=t.smoothStreamingEnabled)!=null?n:L(()=>!1),r=G(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let O="",P=0,R=!1,q=!1,j=!1,W=!1;function z(){O="",P=0,R=!1,q=!1,j=!1,W=!1}function H(ee){let V=!1;for(let ie=0;ie{if(!ee||!V.startsWith(ee)||V.length<=ee.length)return z(),[!0,0];let ie=0;O!==ee&&(z(),H(ee),ie=ee.length);const se=V.slice(ee.length),Z=H(se);return O=V,[Z,ie+se.length]}})();let h,g=0,m=0,y=Sl(),A=-1,b=0;function C(O){A=Number.isInteger(O)?O:0,b+=1}function v(){h&&(clearTimeout(h),h=void 0)}function x(){v();const O=t.renderContent.value;r.value!==O&&(r.value=O),y=Sl()}qe([t.renderContent,t.effectiveFinal,o],([O,P,R])=>{r.value!==O&&(!R||P||(function(q,j){if(!q&&j||j.length<=80||j.length\s*|`{3,}|~{3,})/.test(W))||W.endsWith(` -`)&&!(function(z){const H=yE(z);if(kE(H))return!1;const ee=IO(H);return ee.length>=2&&ee.some(V=>V.trim())})(j))})(r.value,O)?x():(function(){if(m+=1,h)return;const q=Math.max(0,(function(j){const W=j.parseCoalesceMs;return typeof W=="number"&&Number.isFinite(W)&&W>=0?W:80})(e)-(Sl()-y));q<=0?x():h=setTimeout(x,q)})())},{flush:"sync",immediate:!0}),Xd(v);const S=L(()=>{var O,P,R,q;return sAe(e.customHtmlTags,(O=e.parseOptions)==null?void 0:O.customHtmlTags,(q=(R=(P=t.customComponentsMap)==null?void 0:P.value)!=null?R:{},Object.entries(q).map(([j,W])=>{const z=yl(j);return W==null||!z||X0(z)||Bz.has(z)||Z0.has(z)?"":z}).filter(Boolean)))}),_=L(()=>{const{key:O,tags:P}=oAe(S.value);if(!O)return i;const R=s.get(O);if(R)return R;const q=kM(t.instanceMsgId,{customHtmlTags:P});return s.set(O,q),q}),I=L(()=>{const O=_.value;if(!e.customMarkdownIt)return O;const P=e.customMarkdownIt(O);return O.__markstreamHasCustomParserExtensions=!0,P.__markstreamHasCustomParserExtensions=!0,P}),M=L(()=>{var O,P;const R=(O=e.parseOptions)!=null?O:{},q=t.effectiveFinal.value,j=S.value,W=q!=null,z=j.length>0;return W||z||R.streamParse==null?_t(_t(yn(_t({},R),{streamParse:(P=R.streamParse)==null||P}),W?{final:q}:{}),z?{customHtmlTags:j}:{}):R}),$=L(()=>{var O;return new Set(((O=M.value.customHtmlTags)!=null?O:[]).map(P=>String(P).trim().toLowerCase()).filter(Boolean))}),D=L(()=>vE(M.value,I.value,e.customMarkdownIt,{includeFinal:!0})),T=L(()=>vE(M.value,I.value,e.customMarkdownIt,{includeFinal:!1}));qe([D,T],([O,P],[R,q])=>{R&&(O===R&&P===q||(x(),P!==q&&(l=[],c="")))},{flush:"sync"});const N=L(()=>{var O,P,R,q,j,W,z,H,ee,V,ie;if((O=e.nodes)!=null&&O.length)return l=[],c="",C(0),xt(e.nodes.slice());const se=r.value;if(!se)return l=[],c="",C(-1),[];const Z=t.debugPerformanceEnabled.value,pe=Z?Sl():0,re=I.value,fe=D.value,Ee=T.value;a&&fe!==a&&(function(ut){var yt,Mt;(Mt=(yt=ut.stream)==null?void 0:yt.reset)==null||Mt.call(yt)})(re),u&&Ee!==u&&(l=[],c="");const X=Object.keys((R=(P=t.customComponentsMap)==null?void 0:P.value)!=null?R:{}).length>0||typeof M.value.postTransformNodes=="function";X!==d&&(l=[],c="");const we=!X&&l.length>0&&se.startsWith(c)&&Ee===u,Y=Z?mE(re):null,le=Z?{}:void 0,Ce=CE(re),ae=!Ce&&!X,oe=_t(_t(yn(_t({},M.value),{__reuseStableTopLevelNodes:ae}),Ce?{__disableStreamParse:!0}:{}),le?{__timing:le}:{}),Q=PR(se,re,oe),ne=Z?Sl():0,ge=Z?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let Ae,_e=Z?Tm(Q.length):void 0,Ke=0,xe=0,Ne=0;if(we){const ut=Z?Sl():0,[yt,Mt]=(function(Ge){var lt,tt;const[It,Ut]=Ge.scanGlobalReferenceAppend(Ge.previousContent,Ge.content),fn=Ge.parseOptions;return[Ge.previousDirtyStartIndex>0&&fn.final!==!0&&!Ge.customMarkdownIt&&!CE(Ge.md)&&!It&&typeof fn.preTransformTokens!="function"&&typeof fn.postTransformTokens!="function"&&typeof fn.postTransformNodes!="function"&&((tt=(lt=fn.customHtmlTags)==null?void 0:lt.length)!=null?tt:0)===0?Ge.previousDirtyStartIndex:0,Ut]})({content:se,previousContent:c,previousDirtyStartIndex:A,parseOptions:M.value,customMarkdownIt:e.customMarkdownIt,md:re,scanGlobalReferenceAppend:f});Ne=Mt;const Ze=yt<=0;if(ge){const Ge=(function(lt,tt,It,Ut={}){var fn;if(!tt.length)return{nodes:lt,metrics:Tm(lt.length)};const Nn=(fn=Ut.scanStartIndex)!=null?fn:0,Qt=Ut.reuseDirtyTail!==!1,un=(function(wn,bn,Xn,Ue=0){const st=Math.min(wn.length,bn.length);for(let ct=Math.min(st,Math.max(0,Ue));ctgc(ut[Ze]))})(Ae,ge,xe):(function(ut,yt=0){for(let Mt=Math.max(0,yt);Mt((j=Y?.total)!=null?j:0);t.logPerf(yt?"parse(stream)":"parse(sync)",_t(_t(_t({rendererId:t.instanceMsgId,ms:Math.round(Sl()-pe),nodes:Ae.length,contentLength:se.length,parseCommitCount:g,parseCoalescedCount:m,nodeReuseMs:et,referenceDefinitionScanChars:Ne,signatureMs:(W=ge?.signatureMs)!=null?W:0,stabilizeSignatureMs:(z=ge?.stabilizeSignatureMs)!=null?z:0,primeSignatureMs:(H=ge?.primeSignatureMs)!=null?H:0,signatureCallCount:(ee=ge?.signatureCallCount)!=null?ee:0,stabilizeSignatureCallCount:(V=ge?.stabilizeSignatureCallCount)!=null?V:0,primeSignatureCallCount:(ie=ge?.primeSignatureCallCount)!=null?ie:0,stabilizeMs:Ke},_e??{}),le?Object.fromEntries(QEe.map(Mt=>{var Ze;return[Mt,(Ze=le[Mt])!=null?Ze:0]})):{}),ut?{streamMode:ut.lastMode,streamDelta:sTe(ut,Y),streamStats:ut}:{}))}return xt(Ae)});return{effectiveCustomHtmlTags:S,effectiveCustomHtmlTagsSet:$,mdBase:_,mdInstance:I,mergedParseOptions:M,getParsedNodesDirtyStartIndex:()=>A,getParsedNodesRevision:()=>b,parsedNodes:N}}function rTe(e){const{isClient:t}=e,n=G(new Set),i=new Map,s=new Map,o=new Map;function r(u){if(!t)return;const c=o.get(u);c!=null&&(window.clearTimeout(c),o.delete(u))}function l(){if(t)for(const u of o.values())window.clearTimeout(u);o.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:i,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:o,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 y=n.value,A=y.has(f);if(h){if(A)return;const C=new Set(y);return C.add(f),void(n.value=C)}if(!A)return;const b=new Set(y);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,i.value=c.done},r=s.subscribe(o);o();const l=L(()=>Math.max(0,t.value.length-n.value.length)),a=L(()=>l.value===0),u=L(()=>i.value&&a.value);return M0()&&Xd(()=>{r(),s.destroy()}),{source:t,visible:n,done:i,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 aTe={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},wE=/auto|scroll|overlay/i;function uTe(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return wE.test(t)||wE.test(n)}function cTe(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 dTe={class:"m-0 p-0"},fTe=["data-probe"],hTe=di(Qe(yn(_t({},{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(i){var s,o;return(o=(s=t.headingNodes)==null?void 0:s[i])!=null?o:null}return(i,s)=>(k(),E("div",{class:"height-estimation-probes",style:qt({width:`${e.width}px`}),"aria-hidden":"true"},[w("div",{ref:o=>e.setParagraphWrapper(o),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[K(p(Fd),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),w("div",{ref:o=>e.setListItemWrapper(o),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[w("ul",dTe,[K(p(Ah),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),w("div",{ref:o=>e.setListWrapper(o),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[K(p(Ch),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(k(),E(Te,null,ht(6,o=>w("div",{key:`probe-heading-${o}`,ref_for:!0,ref:r=>e.setHeadingWrapper(o,r),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${o}`},[K(p(h9),{node:n(o),"index-key":`probe-heading-${o}`},null,8,["node","index-key"])],10,fTe)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),xE=Qe({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=L(()=>{var n,i;return qv((i=eh(e.estimatedPreviewHeightPx))!=null?i:Hv(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return gn("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?gn("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)"}},[gn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[gn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),gn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),gn("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},()=>gn("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,gn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[gn("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:"")),gn("div",{class:"absolute inset-0"},[gn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),SE=Qe({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=L(()=>{var n,i;return Wv((i=eh(e.estimatedPreviewHeightPx))!=null?i:jv(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return gn("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?gn("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)"}},[gn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[gn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),gn("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},()=>gn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[gn("span",{class:"action-icon block"})])))]):null,gn("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)"}},[gn("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:"")),gn("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"}})])])}}}),pTe={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 io(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 gTe=["data-custom-id"],mTe=["data-node-index","data-node-type"],_E="typewriter-simple-cursor-target",NO=di(Qe(yn(_t({},{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 i=e,s=n;function o(B){if(!(typeof Event<"u"&&B instanceof Event))return typeof B=="string"&&s("copy-code",B),void s("copy",B)}const r=Ws(),l=cn("markstreamNestedRendererProps",void 0);function a(B){const J=r?.vnode.props;return!!J&&(Object.prototype.hasOwnProperty.call(J,B)||Object.prototype.hasOwnProperty.call(J,String(B).replace(/[A-Z]/g,ue=>`-${ue.toLowerCase()}`)))}function u(B){var J,ue;const ce=i[B];return a(B)?ce:(ue=(J=l?.value)==null?void 0:J[B])!=null?ue:ce}const c=L(()=>{return(B=u("mode"))==="chat"||B==="minimal"||B==="docs"?B:"docs";var B}),d=L(()=>fE(u("typewriter"))),f=L(()=>d.value!=="off"),h=L(()=>u("domMode")==="minimal"?"minimal":"full"),g=L(()=>{return(B={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":B.codeRenderer==="pre"||B.codeRenderer==="shiki"||B.codeRenderer==="monaco"?B.codeRenderer:B.renderCodeBlocksAsPre===!1||B.mode==="docs"?"monaco":"pre";var B}),m=L(()=>pTe[c.value]),y=L(()=>{var B;return(B=u("showTooltips"))!=null?B:m.value.showTooltips}),A=L(()=>{var B;return(B=u("fade"))!=null?B:m.value.fade}),b=L(()=>{var B;return(B=u("batchRendering"))!=null?B:m.value.batchRendering}),C=L(()=>{var B;return(B=u("initialRenderBatchSize"))!=null?B:m.value.initialRenderBatchSize}),v=L(()=>{var B;return(B=u("renderBatchSize"))!=null?B:m.value.renderBatchSize}),x=L(()=>{var B;return(B=u("renderBatchDelay"))!=null?B:m.value.renderBatchDelay}),S=L(()=>{var B;return(B=u("renderBatchBudgetMs"))!=null?B:m.value.renderBatchBudgetMs}),_=L(()=>{var B;return(B=u("renderBatchIdleTimeoutMs"))!=null?B:m.value.renderBatchIdleTimeoutMs}),I=L(()=>{var B;return(B=u("deferNodesUntilVisible"))!=null?B:m.value.deferNodesUntilVisible}),M=L(()=>{var B;return(B=u("maxLiveNodes"))!=null?B:m.value.maxLiveNodes}),$=L(()=>{var B;return(B=u("liveNodeBuffer"))!=null?B:m.value.liveNodeBuffer}),D=L(()=>{var B;return(B=u("nodeVirtual"))!=null?B:m.value.nodeVirtual}),T={get content(){return i.content},get nodes(){return i.nodes},get final(){return i.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return i.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 y.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return i.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return i.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return A.value},get batchRendering(){return b.value},get initialRenderBatchSize(){return C.value},get renderBatchSize(){return v.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return S.value},get renderBatchIdleTimeoutMs(){return _.value},get deferNodesUntilVisible(){return I.value},get maxLiveNodes(){return M.value},get liveNodeBuffer(){return $.value},get nodeVirtual(){return D.value},get virtualScroll(){return i.virtualScroll},get renderAsFragment(){return i.renderAsFragment}};function N(B){s("height-change",B)}function O(B){s("virtual-state-change",B)}function P(B){s("anchor-change",B)}const R=G(),q=G(null),j=G(null),W=G(null),z=Ss({1:null,2:null,3:null,4:null,5:null,6:null}),H=G(!1),ee=new Map,V=G(0),ie=G(0),se=G({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Z(B,J){return typeof B!="string"?J:B.trim()||J}function pe(B){const J=Number(B);return Number.isFinite(J)&&J>0?Math.max(1,Math.trunc(J)):640}const re=L(()=>{var B;const J=(B=T.viewportPriorityOptions)!=null?B:{},ue=Z(J.rootMargin,Kd);return{rootMargin:ue,heavyBlockMargin:Z(J.heavyBlockMargin,ue),maxTargets:pe(J.maxTargets)}}),fe=L(()=>{var B;return(B=re.value.rootMargin)!=null?B:Kd}),Ee=L(()=>{var B;return(B=re.value.maxTargets)!=null?B:640});function X(){var B,J;if(((B=i.virtualScroll)==null?void 0:B.enabled)!==!0)return null;const ue=(J=i.virtualScroll)==null?void 0:J.scrollRoot;return we(typeof ue=="function"?ue():ue)}function we(B){return B?typeof HTMLElement<"u"&&B instanceof HTMLElement?B:typeof B=="object"&&"value"in B?we(B.value):typeof B=="object"&&"$el"in B?we(B.$el):null:null}Kn(gO,re);const{isClient:Y,renderAsFragment:le,debugPerformanceEnabled:Ce,resolvedShowTooltips:ae,resolvedHtmlPolicy:oe,inheritedSmoothStreaming:Q,ownsTypewriterCursor:ne}=(function(B){const J=typeof window<"u",ue=Rh(),ce=cn("markstreamHtmlPolicy",void 0),be=cn("markstreamTypewriterCursor",void 0),Le=cn("markstreamSmoothStreaming",void 0),Re=L(()=>B.renderAsFragment===!0),je=L(()=>!!(B.debugPerformance&&J&&typeof console<"u")),it=L(()=>{var nt;if(typeof B.showTooltips=="boolean")return B.showTooltips;const Oe=(nt=ue.showTooltips)!=null?nt:ue["show-tooltips"];return Oe===""||Oe===!0||Oe==="true"||Oe!==!1&&Oe!=="false"&&void 0}),He=L(()=>{var nt,Oe;return(Oe=(nt=B.htmlPolicy)!=null?nt:ce?.value)!=null?Oe:"safe"}),Je=L(()=>be?.value!==!0);return{isClient:J,renderAsFragment:Re,debugPerformanceEnabled:je,resolvedShowTooltips:it,resolvedHtmlPolicy:He,inheritedSmoothStreaming:Le,inheritedTypewriterCursor:be,ownsTypewriterCursor:Je}})(T),{resolveViewportRoot:ge,resolveScrollContainer:Ae,isReverseFlexScrollRoot:_e,getNormalizedScrollTop:Ke,getOffsetTopWithinRoot:xe}=(function(B,J){function ue(){var je,it;return(it=(je=J.scrollRoot)==null?void 0:je.call(J))!=null?it:null}function ce(je){if(typeof window>"u")return null;const it=ue();if(it)return it;const He=je??B.value;if(!He)return null;const Je=He.ownerDocument||document,nt=Je.scrollingElement||Je.documentElement;let Oe=He;for(;Oe&&Oe!==Je.body&&Oe!==nt;){if(uTe(window.getComputedStyle(Oe))&&cTe(Oe))return Oe;Oe=Oe.parentElement}return null}function be(je){if(!J.isClient)return!1;try{const it=window.getComputedStyle(je);return!!(it.display||"").toLowerCase().includes("flex")&&(it.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Le(je,it,He){var Je,nt;if(He)return Re(it);const Oe=je.scrollTop;if(!be(je))return Oe;const Xe=Oe<0?-Oe:Oe;return Math.max(0,((Je=je.scrollHeight)!=null?Je:0)-((nt=je.clientHeight)!=null?nt:0))-Xe}function Re(je){var it,He,Je,nt,Oe;const Xe=Number((it=je.scrollingElement)==null?void 0:it.scrollTop),ft=Number((Je=(He=je.documentElement)==null?void 0:He.scrollTop)!=null?Je:0),at=Number((Oe=(nt=je.body)==null?void 0:nt.scrollTop)!=null?Oe:0);return Math.max(0,Number.isFinite(Xe)?Xe:0,Number.isFinite(ft)?ft:0,Number.isFinite(at)?at:0)}return{resolveViewportRoot:ce,resolveScrollContainer:function(je){var it,He,Je,nt;const Oe=ue();if(Oe)return Oe;const Xe=ce((it=je??B.value)!=null?it:null);if(Xe)return Xe;const ft=(nt=(Je=je?.ownerDocument)!=null?Je:(He=B.value)==null?void 0:He.ownerDocument)!=null?nt:typeof document<"u"?document:null;return ft?.scrollingElement||ft?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:Le,getOffsetTopWithinRoot:function(je,it){const He=it.ownerDocument||je.ownerDocument||document;if((function(Xe,ft){return Xe===ft.documentElement||Xe===ft.body||Xe===ft.scrollingElement})(it,He))return je.getBoundingClientRect().top+Re(He);const Je=it.getBoundingClientRect(),nt=je.getBoundingClientRect(),Oe=Le(it,He,!1);return nt.top-Je.top+Oe}}})(R,{isClient:Y,scrollRoot:X});Kn("markstreamShowTooltips",ae),Kn("markstreamHtmlPolicy",oe),Kn("markstreamTypewriter",f),Kn("markstreamFade",L(()=>T.fade!==!1)),Kn("markstreamTypewriterCursor",L(()=>!0)),Kn("markstreamTextStreamState",ee),Kn("markstreamStreamVersion",V),Kn("markstreamParseOptions",L(()=>T.parseOptions)),Kn("markstreamCustomMarkdownIt",L(()=>T.customMarkdownIt));const{smoothStreamingEnabled:Ne,renderContent:et,requestedFinal:ut,effectiveFinal:yt}=(function(B,J){const ue=lTe(_t(_t({},aTe),B.smoothStreamingOptions)),ce=L(()=>{var Oe,Xe,ft;return B.smoothStreaming!==!1&&!((Oe=B.nodes)!=null&&Oe.length)&&(B.smoothStreaming===!0||!((Xe=J.inheritedSmoothStreaming)!=null&&Xe.value))&&(B.smoothStreaming===!0||fE(B.typewriter)!=="off"||((ft=B.maxLiveNodes)!=null?ft:0)<=0)}),be=G(!J.isClient||B.smoothStreaming===!0);mn(()=>{be.value=!0});const Le=L(()=>be.value&&ce.value),Re=L(()=>{var Oe;return Le.value?ue.visible.value:(Oe=B.content)!=null?Oe:""}),je=L(()=>{var Oe,Xe;const ft=(Oe=B.parseOptions)!=null?Oe:{};return(Xe=B.final)!=null?Xe:ft.final}),it=L(()=>{const Oe=je.value;return Le.value&&Oe!=null?!!Oe&&ue.caughtUp.value:Oe});let He=0,Je=!1;function nt(){He=0,Je=!1}return qe([()=>B.content,()=>B.nodes,Le,je],([Oe,Xe,ft,at])=>{if(Xe?.length)return nt(),void ue.reset("");const Lt=Oe??"";if(!ft)return nt(),ue.reset(Lt),void(at&&ue.finish({flush:!0}));const At=ue.source.value;if(Lt){if(Lt!==At)if(Lt.startsWith(At)){const Ot=Lt.slice(At.length),Kt=ue.pendingChars.value;Ot.length<=8?(He++,Je||He>=2&&Kt<=8?(Je=!0,ue.reset(Lt)):ue.enqueue(Ot)):(nt(),ue.enqueue(Ot))}else nt(),ue.reset(Lt)}else nt(),ue.reset("");at&&ue.finish()},{immediate:!0}),{smoothStream:ue,smoothStreamingEligible:ce,smoothStreamingEnabled:Le,renderContent:Re,requestedFinal:je,effectiveFinal:it}})(T,{isClient:Y,inheritedSmoothStreaming:Q}),Mt=ut.value===!0;Kn("markstreamSmoothStreaming",Ne);const Ze=G(!1),Ge=G(!1),lt=G(!1);let tt="",It=!1,Ut=null;function fn(){Y&&Ut!=null&&(window.clearTimeout(Ut),Ut=null)}function Nn(){Ze.value=!1,fn()}function Qt(B,J){if(!Ce.value)return;const ue=(function(){if(!Ce.value)return null;const ce=bn(un),be=bn(Dn),Le=Math.max(wn,be);if(ce<=0&&Le<=0)return null;const Re={total:ce,maxPerFrame:Le,byLabel:(je=un,Object.fromEntries(Array.from(je.entries()).sort((it,He)=>He[1]-it[1]||it[0].localeCompare(He[0]))))};var je;return un.clear(),Dn.clear(),wn=0,Re})();console.info(`[markstream-vue][perf] ${B}`,ue?yn(_t({},J),{layoutReads:ue}):J)}qe([()=>T.indexKey,()=>T.customId],()=>{var B,J;Nn(),Ge.value=!1,lt.value=!((B=i.nodes)!=null&&B.length)&&ut.value!==!0&&!!i.content,tt=(J=et.value)!=null?J:"",It=tt.length>0},{flush:"sync"}),qe([()=>i.content,()=>i.nodes,ut],([B,J,ue])=>{!J?.length&&ue!==!0&&B&&(lt.value=!0)},{flush:"sync",immediate:!0}),qe([et,()=>i.nodes,ut],([B,J,ue])=>{const ce=B??"";return J?.length||ue===!0?(Nn(),Ge.value=!1,tt=ce,void(It=!0)):(ce.length>0&&(lt.value=!0),It?(tt&&ce.length>tt.length&&ce.startsWith(tt)?(Ze.value=!0,Ge.value=!0,Y&&(fn(),Ut=window.setTimeout(()=>{var be;Ut=null,yt.value===!0||(be=i.nodes)!=null&&be.length||(yf(),Ze.value=!1,Ta())},1200))):(ce.length"u")return null;const Le=window;if(Le.__markstreamLayoutReadPerformance)return Le.__markstreamLayoutReadPerformance;const Re={total:0,maxPerFrame:0,byLabel:{}};return Le.__markstreamLayoutReadPerformance=Re,Re})();be&&(be.total=Number(be.total||0)+1,be.byLabel[ce]=Number(be.byLabel[ce]||0)+1,be.currentFrameTotal=Number(be.currentFrameTotal||0)+1,be.frameScheduled||(be.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Ue(be),0):queueMicrotask(()=>Ue(be)):window.requestAnimationFrame(()=>Ue(be))))})(B),pn||(pn=!0,Y&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(Xn):typeof queueMicrotask!="function"?setTimeout(Xn,0):queueMicrotask(Xn)))}function ct(B,J){return st(B),J()}const ot=T.customId?`renderer-${T.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,sn=(function(B){const J=new Map;return{scope:B,cache:J,clear:()=>J.clear()}})(ot),Nt=ot;Kn(wO,sn);const Tn=qs(()=>T.customId),{effectiveCustomHtmlTagsSet:fs,mergedParseOptions:vi,parsedNodes:Dt,getParsedNodesDirtyStartIndex:Is,getParsedNodesRevision:Ei}=oTe(T,{instanceMsgId:ot,renderContent:et,effectiveFinal:yt,smoothStreamingEnabled:Ne,debugPerformanceEnabled:Ce,customComponentsMap:Tn,logPerf:Qt});qe(Dt,()=>{Ze.value||sn.clear(),V.value+=1},{immediate:!0});const Pn=L(()=>({customId:T.customId,customHtmlTags:vi.value.customHtmlTags,parseOptions:T.parseOptions,customMarkdownIt:T.customMarkdownIt,htmlPolicy:oe.value,viewportPriority:T.viewportPriority,viewportPriorityOptions:re.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:ae.value,themes:T.themes,langs:T.langs,isDark:T.isDark,typewriter:f.value,smoothStreamingOptions:T.smoothStreamingOptions,parseCoalesceMs:T.parseCoalesceMs,fade:T.fade}));Kn("markstreamNestedRendererProps",Pn);const bs=L(()=>Dt.value),Lo=L(()=>Dt.value.length),Oi=G(null),co=G(null),Wi=G(null),As=G(null),fo=i.indexKey!=null&&String(i.indexKey).startsWith("list-item-"),Pi=!fo&&T.customId?lE(T.customId):null,es=L(()=>Pi?(nk.value,lE(T.customId)):null),Ai=L(()=>{var B;return!!(!le.value&&T.customId&&!fo&&((B=es.value)!=null&&B.enabled))}),No=L(()=>!!(Y&&Ai.value)),Ci=L(()=>{var B;return!!(!le.value&&((B=i.virtualScroll)!=null&&B.enabled))}),Ti=L(()=>Ci.value),Yt=G(!1);mn(()=>{Yt.value=!0});const vn=L(()=>!!(Y&&Ci.value));Kn("markstreamHostScrollManaged",vn);const ts=L(()=>!!(Yt.value&&vn.value)),fi=L(()=>No.value||vn.value),Fr=L(()=>No.value||ts.value),Ni=L(()=>{var B;return fi.value&&((B=es.value)==null?void 0:B.textEstimation)!==!1});function hi(){const B=ie.value||ct("getMeasuredContainerWidth.clientWidth",()=>{var J;return((J=R.value)==null?void 0:J.clientWidth)||0});return Number.isFinite(B)&&B>0?B:0}const ho=L(()=>{const B=hi();return B>0?Math.max(1,Math.round(B)):640}),Xs=L(()=>{var B,J;return!(yt.value!==!0||Ci.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(B=i.nodes)!=null&&B.length||lt.value||!(((J=T.maxLiveNodes)!=null?J:0)<=0))}),ns=L(()=>{var B;return Xs.value?50:Math.max(1,(B=T.maxLiveNodes)!=null?B:320)}),qi=L(()=>{var B;return Xs.value?16:Math.max(0,(B=T.liveNodeBuffer)!=null?B:60)}),an=L(()=>{var B;return!le.value&&T.nodeVirtual!==!1&&!(((B=T.maxLiveNodes)!=null?B:0)<=0&&!Xs.value)&&(T.nodeVirtual===!0?Dt.value.length>0:Dt.value.length>ns.value)}),eo=L(()=>an.value||No.value||vn.value),Us=L(()=>T.viewportPriority!==!1),Fo=L(()=>!!Us.value&&!H.value);var Ms;Ms=L(()=>Us.value),Kn(mO,Ms);const Es=L(()=>{var B;return!(le.value||T.deferNodesUntilVisible===!1||((B=T.maxLiveNodes)!=null?B:0)<=0||an.value||Dt.value.length>900||T.viewportPriority===!1)}),to=PIe(B=>{var J;return ge((J=B??R.value)!=null?J:null)},Us),{requestFrame:Li,cancelFrame:wi,hasIdleCallback:Vo,isTestEnv:Ts}=(function(B){const J=B.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,ue=B.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ce=B.isClient&&typeof window.requestIdleCallback=="function",be=(function(){var Le;if(typeof globalThis>"u"||!("process"in globalThis))return;const Re=(Le=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Le.value;return Re?.env})();return{requestFrame:J,cancelFrame:ue,hasIdleCallback:ce,isTestEnv:be?.NODE_ENV==="test"}})({isClient:Y}),po=L(()=>yt.value===!0&&!Ci.value),{resolvedBatchSize:Ks,resolvedInitialBatch:Zo,batchingEnabled:Be,incrementalRenderingActive:Pe,renderedCount:dt,previousRenderContext:St,adaptiveBatchSize:An,previousBatchConfig:pi}=(function(B,J){var ue;const ce=L(()=>{var nt;const Oe=Math.trunc((nt=B.renderBatchSize)!=null?nt:80);return Number.isFinite(Oe)?Math.max(0,Oe):0}),be=L(()=>{var nt;const Oe=Math.trunc((nt=B.initialRenderBatchSize)!=null?nt:ce.value);return Number.isFinite(Oe)?Math.max(0,Oe):ce.value}),Le=L(()=>!J.renderAsFragment.value&&B.batchRendering!==!1&&ce.value>0&&J.isClient&&!J.isTestEnv),Re=G(0),je=G({key:B.indexKey,total:0}),it=G(Math.max(1,ce.value||1)),He=L(()=>{var nt,Oe,Xe;return Le.value&&!((nt=J.continuousStreaming)!=null&&nt.value)&&!((Oe=J.forceFullRenderFinalContent)!=null&&Oe.value)&&((Xe=B.maxLiveNodes)!=null?Xe:0)<=0}),Je=G({batchSize:ce.value,initial:be.value,delay:(ue=B.renderBatchDelay)!=null?ue:16,enabled:He.value});return{resolvedBatchSize:ce,resolvedInitialBatch:be,batchingEnabled:Le,incrementalRenderingActive:He,renderedCount:Re,previousRenderContext:je,adaptiveBatchSize:it,previousBatchConfig:Je}})(T,{isClient:Y,isTestEnv:Ts,renderAsFragment:le,forceFullRenderFinalContent:po,continuousStreaming:L(()=>Ge.value&&yt.value!==!0)}),hs=L(()=>{var B;return!le.value&&T.batchRendering!==!1&&Ks.value>0&&!Ts&&((B=T.maxLiveNodes)!=null?B:0)<=0&&!po.value}),is=L(()=>hs.value),Ls=L(()=>fi.value||is.value),Ui=L(()=>{var B;return Ls.value&&((B=es.value)==null?void 0:B.codeBlockEstimation)!==!1}),On=new Map,Cs=new Map,Do=new WeakMap;let ws=null;const tl=new WeakMap,xi=new Map,dr=[];let rt=[],Se=[],U=-1;const me=Ul(dr),ke=new Set,ze=G(0);let Ye=0;const Ve=G(0),wt=L(()=>(Ve.value,Array.from(On.entries()).sort((B,J)=>B[0]-J[0]))),pt=G(null),Ht=G(null);let Gt,Cn=null,Qn=0,jt=null;function Rt(){Gt.markFallbackHeightPrefixDirty()}function Bn(B){return Gt.getFallbackNodeHeight(B)}function ei(B,J){return Gt.estimateHeightRange(B,J)}function ji(B){return Gt.estimateIndexForOffset(B)}const{activeRestoreAnchor:$o,getRelativeScrollTopWithinContainer:Go,setRelativeScrollTopWithinContainer:De,resolveAnchorOffset:vt,clearRestoreReconcile:mt,scheduleRestoreReconcile:Jt,captureRestoreAnchor:Ki,restoreAnchor:Bo,getAnchorDrift:bl}=(function(B){const{isClient:J,containerRef:ue,parsedNodeCount:ce,requestFrame:be,cancelFrame:Le,resolveScrollContainer:Re,getNormalizedScrollTop:je,getOffsetTopWithinRoot:it,isReverseFlexScrollRoot:He,estimateIndexForOffset:Je,estimateHeightRange:nt,getFallbackNodeHeight:Oe,clamp:Xe}=B,ft=G(null);let at=null,Lt=[];function At(){const rn=Re(),En=ue.value;if(!rn||!En)return null;const zn=rn.ownerDocument||En.ownerDocument||document;if(rn===zn.documentElement||rn===zn.body||rn===zn.scrollingElement){const yi=En.getBoundingClientRect();return Math.max(0,-yi.top)}return Math.max(0,je(rn,zn,!1)-it(En,rn))}function Ot(rn){var En;const zn=Re(),yi=ue.value;if(!zn||!yi)return;const yo=Math.max(0,rn),no=zn.ownerDocument||yi.ownerDocument||document,Cl=no.defaultView||(typeof window<"u"?window:null);if(zn===no.documentElement||zn===no.body||zn===no.scrollingElement){const Xl=je(zn,no,!0)+yi.getBoundingClientRect().top;return void((En=Cl?.scrollTo)==null||En.call(Cl,0,Math.max(0,Xl+yo)))}cE(zn,no,it(yi,zn)+yo,{isReverseFlexScrollRoot:Xl=>{var v1;return(v1=He?.(Xl))!=null&&v1},getNormalizedScrollTop:je})}function Kt(rn){const En=ce.value,zn=Xe(rn.nodeIndex,0,Math.max(0,En-1));return nt(0,zn)+Math.max(0,rn.offsetWithinNodePx)}function on(){if(at!=null&&(Le?.(at),at=null),J)for(const rn of Lt)window.clearTimeout(rn);Lt=[]}function Xt(rn){const En=Kt(rn),zn=At();zn!=null&&Math.abs(zn-En)<=.5||Ot(En)}return{activeRestoreAnchor:ft,getRelativeScrollTopWithinContainer:At,setRelativeScrollTopWithinContainer:Ot,resolveAnchorOffset:Kt,clearRestoreReconcile:on,applyRestoreAnchor:Xt,scheduleRestoreReconcile:function(){ft.value&&J&&at==null&&(at=be?be(()=>{at=null,ft.value&&Xt(ft.value)}):null,at==null&&ft.value&&Xt(ft.value))},captureRestoreAnchor:function(){const rn=At(),En=ce.value;if(rn==null||En<=0)return null;const zn=Xe(Je(rn+1),0,En-1),yi=nt(0,zn),yo=Oe(zn);return{nodeIndex:zn,offsetWithinNodePx:Xe(rn-yi,0,Math.max(0,yo-1))}},restoreAnchor:function(rn){const En=ce.value;if(ft.value={nodeIndex:Xe(rn.nodeIndex,0,Math.max(0,En-1)),offsetWithinNodePx:Math.max(0,rn.offsetWithinNodePx)},on(),Xt(ft.value),J)for(const zn of[0,120,280,480])Lt.push(window.setTimeout(()=>{ft.value&&Xt(ft.value)},zn))},getAnchorDrift:function(rn){const En=At();return En==null?null:En-Kt(rn)}}})({isClient:Y,containerRef:R,parsedNodeCount:Lo,requestFrame:Li,cancelFrame:wi,resolveScrollContainer:()=>pt.value||Ae(),getNormalizedScrollTop:Ke,getOffsetTopWithinRoot:xe,isReverseFlexScrollRoot:_e,estimateIndexForOffset:ji,estimateHeightRange:ei,getFallbackNodeHeight:Bn,clamp:vo}),{nodeHeights:ss,heightStats:Ns,heightTreeSize:du,heightSumTree:lf,heightKnownTree:x9,averageNodeHeight:Qh,resetHeightMeasurements:ug,pruneHeightMeasurements:cg,rebuildHeightTrees:$c,recordNodeHeight:dg,removeNodeHeights:S9,exportHeightCache:_9,importHeightCache:I9,fenwickRangeSum:ye}=(function(B={}){const J=Ss({}),ue=Ss({total:0,count:0}),ce=G(0),be=G([]),Le=G([]);function Re(){for(const Oe of Object.keys(J))delete J[Number(Oe)];ue.total=0,ue.count=0,ce.value=0,be.value=[],Le.value=[]}function je(Oe,Xe,ft){for(let at=Xe+1;at0;at-=at&-at)ft+=Oe[at];return ft}function He(Oe){ce.value=Oe;const Xe=new Array(Oe+1).fill(0),ft=new Array(Oe+1).fill(0);for(const[at,Lt]of Object.entries(J)){const At=Number(at),Ot=Number(Lt);!Number.isFinite(At)||At<0||At>=Oe||!Number.isFinite(Ot)||Ot<=0||(je(Xe,At,Ot),je(ft,At,1))}be.value=Xe,Le.value=ft}function Je(Oe){if(!Number.isInteger(Oe)||Oe<0)return!1;const Xe=J[Oe];if(!Number.isFinite(Xe)||Xe<=0)return!1;if(delete J[Oe],ue.total=Math.max(0,ue.total-Xe),ue.count=Math.max(0,ue.count-1),ce.value>Oe){const ft=be.value,at=Le.value;ft.length&&at.length&&(je(ft,Oe,-Xe),je(at,Oe,-1))}return!0}const nt=L(()=>ue.count>0?Math.max(12,ue.total/ue.count):32);return{nodeHeights:J,heightStats:ue,heightTreeSize:ce,heightSumTree:be,heightKnownTree:Le,averageNodeHeight:nt,resetHeightMeasurements:Re,pruneHeightMeasurements:function(Oe){if(Oe<=0)return void Re();let Xe=0,ft=0;for(const[at,Lt]of Object.entries(J)){const At=Number(at),Ot=Number(Lt);!Number.isFinite(At)||At<0||At>=Oe||!Number.isFinite(Ot)||Ot<=0?delete J[At]:(Xe+=Ot,ft++)}ue.total=Xe,ue.count=ft},rebuildHeightTrees:He,recordNodeHeight:function(Oe,Xe,ft={}){(function(at,Lt,At={}){var Ot;if(!Number.isFinite(Lt)||Lt<=0)return!1;const Kt=J[at];if(Kt&&(At.allowShrink===!1&&Ltat){const on=be.value,Xt=Le.value;if(on.length&&Xt.length)if(Kt){const rn=Lt-Kt;rn!==0&&je(on,at,rn)}else je(on,at,Lt),je(Xt,at,1)}At.notify!==!1&&((Ot=B.onHeightRecorded)==null||Ot.call(B))})(Oe,Xe,yn(_t({},ft),{notify:!0}))},removeNodeHeight:function(Oe,Xe={}){var ft;const at=Je(Oe);return at&&Xe.notify!==!1&&((ft=B.onHeightRecorded)==null||ft.call(B)),at},removeNodeHeights:function(Oe,Xe={}){var ft;let at=0;for(const Lt of Oe)Je(Number(Lt))&&at++;return at>0&&Xe.notify!==!1&&((ft=B.onHeightRecorded)==null||ft.call(B)),at},exportHeightCache:function(){return Object.entries(J).map(([Oe,Xe])=>({index:Number(Oe),height:Number(Xe)})).filter(Oe=>Number.isFinite(Oe.index)&&Oe.index>=0&&Number.isFinite(Oe.height)&&Oe.height>0).sort((Oe,Xe)=>Oe.index-Xe.index)},importHeightCache:function(Oe,Xe={}){var ft;if(!Array.isArray(Oe))return;const at=ce.value;let Lt=!1;if(Xe.mode!=="merge"){const At=Object.keys(J);if(At.length>0){for(const Ot of At)delete J[Number(Ot)];Lt=!0}}for(const At of Oe){const Ot=Number(At.index),Kt=Number(At.height);if(!Number.isInteger(Ot)||Ot<0||at>0&&Ot>=at||!Number.isFinite(Kt)||Kt<=0)continue;const on=J[Ot];on&&Math.abs(on-Kt)<=1||(J[Ot]=Kt,Lt=!0)}Lt&&((function(){let At=0,Ot=0;const Kt=ce.value;for(const[on,Xt]of Object.entries(J)){const rn=Number(on),En=Number(Xt);!Number.isFinite(rn)||rn<0||Kt>0&&rn>=Kt||!Number.isFinite(En)||En<=0?delete J[rn]:(At+=En,Ot++)}ue.total=At,ue.count=Ot})(),at>0&&He(at),(ft=B.onHeightRecorded)==null||ft.call(B))},fenwickRangeSum:function(Oe,Xe,ft){if(ft<=Xe)return 0;const at=it(Oe,ft-1);return Xe<=0?at:at-it(Oe,Xe-1)}}})({onHeightRecorded:()=>{Rt(),vn.value&&d1(),$o.value&&Jt(),Ht.value&&gf(),Di("node-resize")}});function Ie(B){Number.isInteger(B)&&B>=0&&ke.add(B)}function We(B){for(const J of B)Ie(Number(J))}function $t(B){Ye++;let J=!0;try{const ue=B();return J=ue!==!1,ue}finally{Ye--,Ye===0&&J&&ze.value++}}function ln(){rt=[],Se=[],U=-1,ke.clear(),me.value=dr}function Sn(){ln(),$t(()=>ug()),xi.clear()}function ti(B){!Number.isInteger(B)||B<0||B>=Dt.value.length||xi.set(B,e1(B))}function Fi(B,J,ue={}){const ce=ss[B];Ie(B),dg(B,J,ue);const be=ss[B];return Object.is(ce,be)?(ke.delete(B),!1):(be&&be>0?ti(B):ce&&xi.delete(B),!0)}function go(B,J){const ue=ct("getNodeLayoutHeight.slot.offsetHeight",()=>{var ce,be;return(be=(ce=On.get(B))==null?void 0:ce.offsetHeight)!=null?be:0});return ue>0?ue:ct("getNodeLayoutHeight.content.offsetHeight",()=>J.offsetHeight)}function Bc(B,J={}){J.mode!=="merge"?ln():We(B.map(ue=>ue.index)),$t(()=>I9(B,J)),t4()}const Dr=L(()=>Es.value&&Fo.value),Fj=L(()=>{var B;return!le.value&&T.batchRendering!==!1&&Ks.value>0&&((B=T.maxLiveNodes)!=null?B:0)<=0}),Dj=L(()=>!le.value&&Mt&&yt.value===!0&&!an.value&&!Ci.value&&!Ai.value&&!Dr.value&&!Fj.value),lA=L(()=>!!to&&Dr.value),aA=L(()=>an.value||vn.value),{focusIndex:Ia,liveRange:mo,updateLiveRange:Yh}=(function(B,J){const{parsedNodeCount:ue,virtualizationEnabled:ce,maxLiveNodesResolved:be,liveNodeBufferResolved:Le,clamp:Re}=J,je=Le??L(()=>{var Je;return Math.max(0,(Je=B.liveNodeBuffer)!=null?Je:60)}),it=G(0),He=Ss({start:0,end:0});return{liveNodeBufferResolved:je,focusIndex:it,liveRange:He,updateLiveRange:function(){const Je=ue.value;if(!ce.value||Je===0)return He.start=0,void(He.end=Je);const nt=Math.min(be.value,Je),Oe=je.value,Xe=Re(it.value-Oe,0,Math.max(0,Je-nt));He.start=Xe,He.end=Math.min(Je,Xe+nt)}}})(T,{parsedNodeCount:Lo,virtualizationEnabled:an,maxLiveNodesResolved:ns,liveNodeBufferResolved:qi,clamp:vo}),Yl=new Map,zc=new Map,fu=new Map,fg=[],Ma=new Map,hu=new Set,uA=G(0);let M9=!1;const cA=L(()=>(uA.value,hu.size)),$r=new Map,Jl=new Map,dA=G(0),E9=L(()=>{dA.value;let B=0;for(const J of $r.values())B+=Math.max(0,J);return B});let Br=null;const hg=L(()=>{if(!an.value)return Dt.value.length;const B=qi.value,J=Math.max(mo.end+B,Zo.value),ue=Math.min(Dt.value.length,J);return Math.max(dt.value,ue)});function pg(){M9||(M9=!0,queueMicrotask(()=>{M9=!1,uA.value+=1}))}function fA(B,J,ue="node-resize"){if(!Y||typeof window>"u")return null;const ce=window.setTimeout(()=>{hu.delete(ce)&&pg();try{J()}finally{Di(ue)}},Math.max(0,B));return hu.add(ce),pg(),ce}function gg(B){Y&&B!=null&&(hu.delete(B)&&pg(),window.clearTimeout(B))}function hA(){if(Y&&typeof window<"u")for(const B of hu)window.clearTimeout(B);hu.size&&(hu.clear(),pg()),fg.length=0,fu.clear()}function $j(B){q.value=B}function Bj(B){j.value=B}function zj(B){W.value=B}const{cancelScheduledFocusSync:T9,scheduleFocusSync:Al}=(function(B){const{isClient:J,containerRef:ue,virtualizationEnabled:ce,requestFrame:be,cancelFrame:Le,syncFocusToScroll:Re}=B;let je=null;function it(){var Je,nt,Oe;return(Oe=(nt=(Je=ue.value)==null?void 0:Je.ownerDocument)==null?void 0:nt.defaultView)!=null?Oe:typeof window<"u"?window:null}function He(){if(!je)return;const Je=it();je.viaTimeout?Je?Je.clearTimeout(je.id):clearTimeout(je.id):Le?.(je.id),je=null}return{cancelScheduledFocusSync:He,scheduleFocusSync:function(Je={}){if(!ce.value)return;if(!J)return void Re(!0);if(Je.immediate)return He(),void Re(!0);if(je)return;const nt=()=>{je=null,Re()};if(be)return void(je={id:be(nt),viaTimeout:!1});const Oe=it();je={id:Oe?Oe.setTimeout(nt,16):setTimeout(nt,16),viaTimeout:!0}}}})({isClient:Y,containerRef:R,virtualizationEnabled:an,requestFrame:Li,cancelFrame:wi,syncFocusToScroll:function(B=!1){var J;if(!an.value)return;const ue=pt.value||Ae();if(!ue)return;const ce=ue.ownerDocument||((J=R.value)==null?void 0:J.ownerDocument)||document,be=ce?.defaultView||(typeof window<"u"?window:null),Le=ue===ce?.documentElement||ue===ce?.body,Re=Dt.value.length;if(Re<=0)return;if(!Le&&Re>0&&_e(ue)){const at=ct("syncFocusToScroll.clientHeight",()=>ue.clientHeight||0),Lt=ct("syncFocusToScroll.scrollTop",()=>ue.scrollTop),At=Lt<0?-Lt:Lt;return void yg(vo((je=Math.max(0,At)+.5*Math.max(0,at),Gt.estimateIndexForOffsetFromEnd(je)),0,Math.max(0,Re-1)),B)}var je;const it=(function(at,Lt,At,Ot){const Kt=R.value;if(!Kt)return null;const on=Ot?0:ct("syncFocusToScroll.model.root.getBoundingClientRect",()=>at.getBoundingClientRect().top),Xt=ct("syncFocusToScroll.model.container.getBoundingClientRect",()=>Kt.getBoundingClientRect().top),rn=Math.max(0,on-Xt),En=Ot?ct("syncFocusToScroll.model.viewport.clientHeight",()=>{var zn,yi,yo,no;return(no=(yo=(yi=At?.innerHeight)!=null?yi:(zn=Lt.documentElement)==null?void 0:zn.clientHeight)!=null?yo:at.clientHeight)!=null?no:0}):ct("syncFocusToScroll.model.root.clientHeight",()=>at.clientHeight);return vo(ji(rn+.5*Math.max(0,En)),0,Math.max(0,Dt.value.length-1))})(ue,ce,be,Le);if(it!=null)return void yg(it,B);const He=Le?null:ct("syncFocusToScroll.root.getBoundingClientRect",()=>ue.getBoundingClientRect()),Je=Le?0:He.top,nt=Le?ct("syncFocusToScroll.viewport.clientHeight",()=>{var at,Lt;return(Lt=(at=be?.innerHeight)!=null?at:ue.clientHeight)!=null?Lt:0}):He.bottom,Oe=wt.value;let Xe=null,ft=null;for(const[at,Lt]of Oe){if(!Lt)continue;const At=ct("syncFocusToScroll.slot.getBoundingClientRect",()=>Lt.getBoundingClientRect());At.bottom<=Je||At.top>=nt||(Xe==null&&(Xe=at),ft=at)}if(Xe==null||ft==null){const at=R.value;if(!at)return;const Lt=Le?{top:0}:ct("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>ue.getBoundingClientRect()),At=ct("syncFocusToScroll.fallback.scrollTop",()=>Ke(ue,ce,Le)),Ot=Le?(()=>{const on=ct("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>at.getBoundingClientRect()),Xt=(Le?0:Lt.top)-on.top;return Math.max(0,Xt)})():(()=>{const on=xe(at,ue);return Math.max(0,At-on)})(),Kt=Le?ct("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var on,Xt,rn,En;return(En=(rn=(Xt=be?.innerHeight)!=null?Xt:(on=ce?.documentElement)==null?void 0:on.clientHeight)!=null?rn:ue.clientHeight)!=null?En:0}):ct("syncFocusToScroll.fallback.root.clientHeight",()=>ue.clientHeight);return void yg(vo(ji(Ot+.5*Math.max(0,Kt)),0,Math.max(0,Dt.value.length-1)),!0)}yg(Math.round((Xe+ft)/2),B)}}),{visibleNodeIndices:L9,nodeVisibilityHandles:af,nodeVisibilityWatchStops:mg,nodeVisibilityFallbackTimers:pA,clearVisibilityFallback:vg,markNodeVisible:pu,cleanupNodeVisibility:Rj,destroyNodeVisibilityState:N9}=rTe({isClient:Y,shouldTrackVisibleNodeIndices:()=>Dr.value,shouldCleanupNodeVisibility:()=>an.value,onNodeMarkedVisible:B=>{an.value?Al():Ia.value=vo(B,0,Math.max(0,Dt.value.length-1))},onNodeVisibilityCleaned:B=>{On.delete(B)&&HA()}}),{cleanupScrollListener:gA,setupScrollListener:Oj}=(function(B){const{isClient:J,virtualizationEnabled:ue,listenerEnabled:ce,scrollRootElement:be,resolveScrollContainer:Le,scheduleFocusSync:Re,onScroll:je}=B;let it=null,He=null;function Je(){it&&(it(),it=null),He=null,be.value=null}function nt(Oe){const Xe=B.getScrollTop?B.getScrollTop(Oe):Oe.scrollTop;return Math.max(0,Number.isFinite(Xe)?Math.abs(Xe):0)}return{cleanupScrollListener:Je,setupScrollListener:function(){if(!J)return;if(!((Oe=ce?.value)!=null?Oe:ue.value))return void Je();var Oe;const Xe=Le();if(!Xe)return void Je();if(be.value===Xe&&it)return;Je(),He=nt(Xe);const ft=()=>{if(je?.(),ue.value){const at=(function(Lt){const At=nt(Lt),Ot=He;He=At;const Kt=Math.max(480,.75*(Lt.clientHeight||0));return Ot==null?At>Kt?{immediate:!0}:void 0:Math.abs(At-Ot)>Kt?{immediate:!0}:void 0})(Xe);at?Re(at):Re()}};Xe.addEventListener("scroll",ft,{passive:!0}),be.value=Xe,it=()=>{Xe.removeEventListener("scroll",ft)}}}})({isClient:Y,virtualizationEnabled:an,listenerEnabled:aA,scrollRootElement:pt,resolveScrollContainer:Ae,scheduleFocusSync:Al,onScroll:function(){const B=Ht.value;if(!B)return;const J=Xh();if(!J||(function(ce){if(o1()>=Qn)return jt=null,!1;const be=jt;if(be==null)return!0;const Le=Math.abs(ce.scrollTop-be)<=2;return Le||(jt=null),Le})(J))return;const ue=TA(J);ue!=null?(ue<-32||Math.abs(Math.max(0,ue)-Math.max(0,B.distanceFromBottomPx))>32)&&pf("restore"):pf("restore")},getScrollTop:B=>{var J;const ue=B.ownerDocument||((J=R.value)==null?void 0:J.ownerDocument)||document,ce=B===ue.documentElement||B===ue.body||B===ue.scrollingElement;return ct("scrollListener.getScrollTop",()=>Ke(B,ue,ce))}});function yg(B,J=!1){const ue=vo(B,0,Math.max(0,Dt.value.length-1));!J&&Math.abs(ue-Ia.value)<=1||(Ia.value=ue,Yh())}function vo(B,J,ue){return Math.min(Math.max(B,J),ue)}function F9(B=Dt.value.length){const J=Is();return!Number.isInteger(J)||J<0?B:vo(J,0,B)}function D9(B){return B?.firstElementChild}function mA(B,J){var ue;return B?(ue=B.matches)!=null&&ue.call(B,J)?B:B.querySelector(J):null}function Pj(B,J){B<1||B>6||(z[B]=J)}function vA(){if(!fi.value)return void(ie.value=0);const B=ct("updateExperimentContainerWidth.clientWidth",()=>{var J,ue;return(ue=(J=R.value)==null?void 0:J.clientWidth)!=null?ue:0});ie.value=B>0?B:0}let Jh=null;function $9(){Jh?.disconnect(),Jh=null}const yA=op("ViewportDeferredMarkdownCodeBlockNode",Dl({loader:()=>Bi(null,null,function*(){return(yield vs(()=>import("./index5-D0Y6cLP4.js"),__vite__mapDeps([8,6,7]))).default}),loadingComponent:Vv,delay:0,suspensible:!1}),Vv);function kA(B){return B===yA}const bA=L(()=>g.value==="pre"?br:g.value==="shiki"?yA:Q3);function AA(){var B;return((B=T.codeBlockProps)==null?void 0:B.showHeader)!==!1}function CA(B,J,ue){const ce=ss[J],be=typeof ce=="number"&&ce>0;if(Ni.value&&!be&&!(function(Le){return!!Tn.value.paragraph&&(Le.type==="paragraph"||Le.type==="list_item"||Le.type==="list")})(B)){const Le=CO(B,ue,se.value);if(Le)return Le}if(Ui.value&&B.type==="code_block"){const Le=(function(Re){if(Re.type!=="code_block")return null;const je=eC(Re,Mg(Re));return kA(je)?"markdown":je===br?"pre":je===bA.value||je===Q3?"monaco":null})(B);if(Le==="monaco"||Le==="markdown"||Le==="pre")return(function(Re,je){var it,He,Je;if(!Re||Re.type!=="code_block")return null;const nt=je.rendererKind,Oe=nt!=="pre"&&je.showHeader!==!1,Xe=!!Re.diff;let ft=0,at=500;if(nt==="monaco"){const At=(it=je.monacoOptions)!=null?it:{},Ot=ok(Re,At,je.width),Kt=(function(Xt){const rn=typeof Xt?.fontSize=="number"&&Xt.fontSize>0?Xt.fontSize:12;return typeof Xt?.lineHeight=="number"&&Xt.lineHeight>0?Xt.lineHeight:Math.round(1.5*rn)})(At),on=(function(Xt,rn){var En,zn;const yi=typeof((En=Xt?.padding)==null?void 0:En.top)=="number"?Xt.padding.top:rn?0:8,yo=typeof((zn=Xt?.padding)==null?void 0:zn.bottom)=="number"?Xt.padding.bottom:rn?0:8;return Math.max(0,yi)+Math.max(0,yo)})(At,Xe);at=typeof At.MAX_HEIGHT=="number"&&At.MAX_HEIGHT>0?At.MAX_HEIGHT:500,ft=Math.round(Ot*Kt+on)}else if(nt==="markdown"){const At=ok(Re);ft=Math.round(21*At+32)}else{const At=ok(Re);ft=Math.round(28*At),at=Number.POSITIVE_INFINITY}const Lt=Math.max(1,Math.min(ft,at));return _t({kind:"code-block",height:Math.round(Lt+(Oe?40:0)),contentHeight:Lt,rendererKind:nt},Xe&&nt==="monaco"?{diffInline:b7((He=je.monacoOptions)!=null?He:{},(Je=je.width)!=null?Je:0)}:{})})(B,{rendererKind:Le,monacoOptions:T.codeBlockMonacoOptions,showHeader:AA(),width:ue})}return null}_k(()=>{if(ze.value,Ye>0)return;const B=Dt.value,J=Ei();if(!B.length||!Ls.value)return rt=[],Se=[],U=-1,ke.clear(),void(me.value=dr);const ue=ie.value||ct("estimatedNodeHeights.clientWidth",()=>{var He;return((He=R.value)==null?void 0:He.clientWidth)||0});if(!Number.isFinite(ue)||ue<=0)return rt=[],Se=[],U=-1,ke.clear(),void(me.value=dr);const ce=(function(He){return[Math.round(He),Ni.value,Ui.value,se.value,T.codeBlockMonacoOptions,AA(),g.value,Tn.value,nk.value]})(ue),be=rt.length<=B.length&&(Re=ce,(Le=Se).length===Re.length&&Le.every((He,Je)=>Object.is(He,Re[Je])));var Le,Re;const je=be&&U===J?B.length:be?F9(B.length):0,it=be?Array.from(ke):[];rt.length=B.length;for(let He=je;He=0&&Heme.value);Gt=(function(B){let J=!0,ue=[0],ce="";function be(Je){var nt;const Oe=B.nodeHeights[Je];if(Number.isFinite(Oe)&&Oe>0)return Oe;const Xe=B.parsedNodes.value[Je],ft=Xe?.type,at=!!((nt=B.hasCustomParagraphComponent)!=null&&nt.call(B)),Lt=B.estimatedNodeHeights.value[Je],At=Lt?.height;if(!(function(Kt,on,Xt){return!!(Xt&&on?.kind==="simple-text"&&(Kt==="paragraph"||Kt==="list_item"||Kt==="list"))})(ft,Lt,at)&&Number.isFinite(At)&&At>0)return At;const Ot=ZEe(Xe,B.getContainerWidth()||640);return ft==="heading"||ft==="paragraph"&&Ot<=28&&(function(Kt,on){if(on)return!1;const Xt=Kt.children;return!Array.isArray(Xt)||!Xt.length||Xt.every(xO)})(Xe,at)?Ot:Math.max(B.averageNodeHeight.value,Ot)}function Le(){var Je;const nt=B.parsedNodes.value.length,Oe=B.getPrefixCacheKeyParts().join(":");if(!J&&ce===Oe)return ue;const Xe=new Array(nt+1);Xe[0]=0;for(let ft=0;ft=((nt=ft[Xe])!=null?nt:0))return Xe-1;let at=0,Lt=Xe-1,At=Xe-1;for(;at<=Lt;){const Ot=at+Lt>>1;((Oe=ft[Ot+1])!=null?Oe:0)>=Je?(At=Ot,Lt=Ot-1):at=Ot+1}return At}function je(Je,nt){var Oe,Xe;if(Je>=nt)return 0;if(B.heightEstimationActive.value)return(function(Lt,At){var Ot,Kt;const on=B.parsedNodes.value.length,Xt=hE(Math.trunc(Lt),0,on),rn=hE(Math.trunc(At),Xt,on);if(Xt>=rn)return 0;const En=Le();return((Ot=En[rn])!=null?Ot:0)-((Kt=En[Xt])!=null?Kt:0)})(Je,nt);if(B.heightTreeSize.value!==B.parsedNodes.value.length){let Lt=0;for(let At=Je;AtXt<=0?0:B.fenwickRangeSum(at,0,Xt)+(Xt-B.fenwickRangeSum(Lt,0,Xt))*ft;let Ot=0,Kt=Oe.length-1,on=Oe.length-1;for(;Ot<=Kt;){const Xt=Ot+Kt>>1;At(Xt+1)>=Je?(on=Xt,Kt=Xt-1):Ot=Xt+1}return on}let Xe=Je;for(let ft=0;ft0||Je++}return Je}return{markFallbackHeightPrefixDirty:function(){J=!0},getFallbackNodeHeight:be,estimateHeightRange:je,estimateIndexForOffset:it,estimateIndexForOffsetFromEnd:function(Je){var nt,Oe;const Xe=B.parsedNodes.value;if(!Xe.length)return 0;if(Je<=0)return Math.max(0,Xe.length-1);if(B.heightEstimationActive.value){const at=(nt=Le()[Xe.length])!=null?nt:0;return Re(Math.max(0,at-Je))}if(B.heightTreeSize.value===Xe.length){const at=je(0,Xe.length);return it(Math.max(0,at-Je))}let ft=Je;for(let at=Xe.length-1;at>=0;at--){const Lt=(Oe=B.nodeHeights[at])!=null?Oe:B.averageNodeHeight.value;if(ft<=Lt)return at;ft-=Lt}return 0},getEstimatedNodeHeightCount:He,buildVirtualHeightSummary:function(Je){var nt;const Oe=B.parsedNodes.value.length;return{totalNodes:Oe,measuredCount:B.heightStats.count,estimatedCount:He(),averageNodeHeight:B.averageNodeHeight.value,topSpacerHeight:Je.topSpacerHeight,bottomSpacerHeight:Je.bottomSpacerHeight,estimatedTotalHeight:je(0,Oe),width:(nt=Je.width)!=null?nt:B.getContainerWidth()}}}})({parsedNodes:Dt,nodeHeights:ss,heightStats:Ns,heightTreeSize:du,heightSumTree:lf,heightKnownTree:x9,averageNodeHeight:Qh,heightEstimationActive:fi,estimatedNodeHeights:uf,getContainerWidth:hi,hasCustomParagraphComponent:()=>!!Tn.value.paragraph,getPrefixCacheKeyParts:()=>{var B;const J=N1(ie.value||ct("getFallbackHeightPrefix.clientWidth",()=>{var ce;return((ce=R.value)==null?void 0:ce.clientWidth)||0})),ue=((B=i.virtualScroll)==null?void 0:B.measurementKey)==null?"":String(i.virtualScroll.measurementKey);return[Dt.value.length,Ns.count,Math.round(Ns.total),Math.round(100*Qh.value),ue,J,fi.value?1:0,nk.value,V.value,Tn.value.paragraph?1:0]},fenwickRangeSum:ye}),qe(()=>Dt.value.length,B=>{var J;Rt(),B<=0?Sn():(Bcg(J))),B!==du.value&&$c(B))},{immediate:!0});const jj=L(()=>{if(!an.value)return Dt.value.map((ce,be)=>({node:ce,index:be}));const B=Dt.value.length,J=vo(mo.start,0,B),ue=vo(mo.end,J,B);return Dt.value.slice(J,ue).map((ce,be)=>({node:ce,index:J+be}))}),B9=L(()=>an.value?ei(0,Math.min(mo.start,Dt.value.length)):0),z9=L(()=>{if(!an.value)return 0;const B=Dt.value.length;return ei(Math.min(mo.end,B),B)});function wA(){return Gt.buildVirtualHeightSummary({topSpacerHeight:B9.value,bottomSpacerHeight:z9.value,width:Rc()})}function Hj(){const B=Dt.value,J=wA();return yn(_t({},J),{probe:{paragraphReady:!!se.value.paragraph,listItemReady:!!se.value.listItem,listWrapperOverhead:se.value.listWrapperOverhead,headingReadyLevels:Object.entries(se.value.headings).filter(([,ue])=>!!ue).map(([ue])=>Number(ue))},nodes:B.map((ue,ce)=>{var be,Le,Re,je,it,He,Je,nt,Oe;return{index:ce,type:ue.type,estimateKind:(Le=(be=uf.value[ce])==null?void 0:be.kind)!=null?Le:null,rendererKind:(je=(Re=uf.value[ce])==null?void 0:Re.rendererKind)!=null?je:null,estimatedHeight:(He=(it=uf.value[ce])==null?void 0:it.height)!=null?He:null,estimatedContentHeight:(nt=(Je=uf.value[ce])==null?void 0:Je.contentHeight)!=null?nt:null,measuredHeight:(Oe=ss[ce])!=null?Oe:null}})})}function R9(){return i.indexKey!=null?String(i.indexKey):Ci.value?`virtual-${Vi()}`:"markdown-renderer"}function xA(B){const J=String(B),ue=`${R9()}-`;if(!J.startsWith(ue))return null;const ce=J.slice(ue.length).match(/^(\d+)(?:$|-)/);if(!ce)return null;const be=Number(ce[1]);return!Number.isInteger(be)||be<0||be>=Dt.value.length?null:be}function Vi(){var B,J,ue;const ce=(B=i.virtualScroll)==null?void 0:B.sessionKey;return String(ce!=null&&ce!==""?ce:(ue=(J=i.indexKey)!=null?J:T.customId)!=null?ue:ot)}function Fs(){var B;const J=(B=i.virtualScroll)==null?void 0:B.threadKey;return J==null||J===""?void 0:String(J)}const Wj=L(()=>{var B,J,ue;return(ue=Fs())!=null?ue:String((J=(B=i.indexKey)!=null?B:T.customId)!=null?J:ot)});function O9(B){var J;return(B??"")===((J=Fs())!=null?J:"")}function Ea(){var B,J,ue;return J=(B=i.virtualScroll)==null?void 0:B.measurementKey,ue=(function(){const ce=g.value;return(function(be){var Le,Re;const je=be.renderer,it=je==="monaco"?be.codeBlockMonacoOptions:void 0,He=be.codeBlockProps,Je=je==="shiki";return[be.isDark?"dark":"light",je==="monaco"?"code-rich":je==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",io(be.codeBlockMinWidth),io(be.codeBlockMaxWidth),...Je?[R_e((Le=He?.themes)!=null?Le:be.themes,(Re=He?.langs)!=null?Re:be.langs)]:[],io(it?.fontSize),io(it?.lineHeight),io(it?.fontFamily),io(it?.tabSize),io(it?.MAX_HEIGHT),io(it?.wordWrap),io(it?.wrappingIndent),io(it?.padding),io(He?.showHeader),io(He?.showCopyButton),io(He?.showExpandButton),io(He?.showPreviewButton),io(He?.showCollapseButton),io(He?.showFontSizeButtons)].join("\0")})({renderer:ce,isDark:T.isDark,codeBlockStream:T.codeBlockStream,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockMonacoOptions:ce==="monaco"?T.codeBlockMonacoOptions:void 0,codeBlockProps:T.codeBlockProps,themes:ce==="shiki"?T.themes:void 0,langs:ce==="shiki"?T.langs:void 0})})(),[J==null?"":String(J),ue].join("\0")}function Rc(){return hi()}const kg=L(()=>N1(Rc())),zr=L(()=>[Ea(),kg.value].join("\0")),qj=L(()=>{var B;return Ci.value?["virtual",(B=Fs())!=null?B:"",Vi(),zr.value].join("\0"):i.indexKey});function cf(){dA.value+=1}function P9(B){return!(!B||!Number.isInteger(B.index)||B.index<0||B.index>=Dt.value.length||B.sessionKey!==Vi()||B.threadKey!==Fs()||B.layoutEpochKey!==zr.value)}function SA(B){const J=String(B),ue=Jl.get(J);return ue?P9(ue)?ue.index:null:xA(J)}function _A(B="async-node"){($r.size||Jl.size)&&($r.clear(),Jl.clear(),cf(),Di(B))}const df=cn(v8,null),j9={reportHeight(B,J){if(!vn.value)return;const ue=SA(B);if(ue==null)return;const ce=Yl.get(ue);if(!ce)return;const be=Number(J),Le=go(ue,ce);(function(Re,je,it={}){$t(()=>Fi(Re,je,it))})(ue,Number.isFinite(be)&&be>0?Math.max(be,Le||0):Le)},markPending(B){if(!vn.value)return;const J=xA(B);J!=null&&(function(ue,ce){var be;const Le=Jl.get(ue);if(Le&&P9(Le))return $r.set(ue,Math.max(0,(be=$r.get(ue))!=null?be:0)+1),cf(),void Di("async-node");$r.set(ue,1),Jl.set(ue,(function(Re){return{index:Re,sessionKey:Vi(),threadKey:Fs(),layoutEpochKey:zr.value}})(ce)),cf(),Di("async-node")})(String(B),J)},markSettled(B){if(!vn.value)return;const J=String(B),ue=SA(B);(ue!=null||(function(ce){return $r.has(String(ce))})(J))&&(function(ce){var be;const Le=(be=$r.get(ce))!=null?be:0;return!(Le<=0||(Le<=1?($r.delete(ce),Jl.delete(ce)):$r.set(ce,Le-1),cf(),Le===1&&Di("async-node"),0))})(J)&&ue!=null&&Ta()}};function Uj(){let B=0;for(const J of Yl.values())B+=ct("getVisibleDomHeight.offsetHeight",()=>{var ue;return(ue=J?.offsetHeight)!=null?ue:0});return Math.ceil(Math.max(0,B))}Kn(v8,{reportHeight(B,J){j9.reportHeight(B,J),df?.reportHeight(B,J)},markPending(B){j9.markPending(B),df?.markPending(B)},markSettled(B){j9.markSettled(B),df?.markSettled(B)}});let H9,W9=null,ff=null;function bg(B){return B!==!1&&B!=null&&B!==""}function IA(){return an.value?(function(){if(!an.value)return!0;const B=Dt.value.length,J=vo(mo.start,0,B),ue=vo(mo.end,J,B);if(J>=ue)return!0;for(let ce=J;ce=hg.value}function q9(){return yt.value===!0&&!Ze.value&&E9.value===0&&hu.size===0&&Ma.size===0&&Br==null&&IA()}function MA(){var B,J;if(((B=i.virtualScroll)==null?void 0:B.settleMode)!=="manual"||W9===Vi()&&H9===Fs())return!0;const ue=(J=i.virtualScroll)==null?void 0:J.settledToken;return!!bg(ue)&&ff===f1(ue)}function U9(){return q9()&&MA()}function Kj(B,J){return J.totalNodes<=0?B==="final"?"final":"estimate":J.measuredCount>=J.totalNodes?B==="final"?"final":"measured":J.measuredCount>0||J.estimatedCount>0?"mixed":"estimate"}function Oc(B="manual",J){const ue=wA(),ce=(function(be){return be||(yt.value!==!0?Dt.value.length>0?"streaming":"estimating":!IA()||Ma.size>0||Br!=null?"measuring":U9()?"settled":"settling")})(J);return{sessionKey:Vi(),threadKey:Fs(),phase:ce,nodeCount:ue.totalNodes,liveRange:{start:mo.start,end:mo.end},renderedCount:dt.value,measuredCount:ue.measuredCount,estimatedCount:ue.estimatedCount,averageNodeHeight:ue.averageNodeHeight,topSpacerHeight:ue.topSpacerHeight,bottomSpacerHeight:ue.bottomSpacerHeight,visibleDomHeight:Uj(),totalHeight:EA(),width:ue.width,final:yt.value===!0,stable:U9(),confidence:Kj(ce,ue),reason:B}}function Xh(){const B=pt.value||Ae(),J=R.value;if(!B||!J)return null;const ue=B.ownerDocument||J.ownerDocument||document,ce=B===ue.documentElement||B===ue.body||B===ue.scrollingElement,be=ct("getScrollBox.scrollTop",()=>Ke(B,ue,ce)),Le=ct("getScrollBox.scrollHeight",()=>{var je,it,He,Je,nt;return ce?Math.max((it=(je=ue.documentElement)==null?void 0:je.scrollHeight)!=null?it:0,(Je=(He=ue.body)==null?void 0:He.scrollHeight)!=null?Je:0,(nt=B.scrollHeight)!=null?nt:0):B.scrollHeight}),Re=ct("getScrollBox.clientHeight",()=>{var je;return ce?((je=ue.documentElement)==null?void 0:je.clientHeight)||B.clientHeight||0:B.clientHeight});return{root:B,doc:ue,isViewportRoot:ce,scrollTop:be,scrollHeight:Le,clientHeight:Re}}function EA(){const B=Dt.value.length,J=Math.max(0,ei(0,B)),ue=ct("getRendererLogicalHeight.offsetHeight",()=>{var be,Le;return(Le=(be=R.value)==null?void 0:be.offsetHeight)!=null?Le:0}),ce=Math.max(0,ue>0?ue:ct("getRendererLogicalHeight.scrollHeight",()=>{var be,Le;return(Le=(be=R.value)==null?void 0:be.scrollHeight)!=null?Le:0}));return B<=0?Math.ceil(ue):an.value?J>0?Math.max(1,Math.ceil(J),(function(){let be=B9.value+z9.value;for(const Le of On.values())Le&&(be+=Math.max(0,ct("getVirtualizedDomLogicalHeight.offsetHeight",()=>Le.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,Le){return be<=0||Le<=0?0:Le<=be+Math.max(512,.05*be)?Math.ceil(Le):0})(J,ce)):Math.max(1,Math.ceil(ce)):vn.value?J>0||Ns.count>0||Gt.getEstimatedNodeHeightCount()>0?(Pe.value&&dt.value,Math.max(1,Math.ceil(ce),Math.ceil(J))):Math.ceil(ce):Math.max(1,Math.ceil(ce),Math.ceil(J))}function TA(B){const J=R.value;if(!J)return null;const ue=ct("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>J.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:ct("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(B)-ue.bottom}function Vj(B={}){const J=B.requireViewport!==!1,ue=(function(Le=64){const Re=Xh(),je=R.value;if(!Re||!je)return!1;const it=(function(Je){if(Je.isViewportRoot)return{top:0,bottom:Je.clientHeight};const nt=ct("getVirtualViewportRect.getBoundingClientRect",()=>Je.root.getBoundingClientRect());return{top:nt.top,bottom:nt.bottom}})(Re),He=ct("isRendererNearVirtualViewport.getBoundingClientRect",()=>je.getBoundingClientRect());return He.bottom>=it.top-Le&&He.top<=it.bottom+Le})();if(J&&!ue)return null;const ce=(function(){const Le=Xh(),Re=R.value;if(!Le||!Re||Math.max(0,Le.scrollHeight-Le.scrollTop-Le.clientHeight)>64)return null;const je=TA(Le);return je==null?null:je>=-8&&je<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,je)}:null})();if(ce)return{anchor:ce,captured:!0};const be=Ki();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:ue};if(B.allowFallback===!0){const Le=(function(){const Re=Dt.value.length;return Re<=0?null:{type:"node",nodeIndex:vo(Ia.value,0,Math.max(0,Re-1)),offsetWithinNodePx:0}})();return Le?{anchor:Le,captured:!1}:null}return null}function K9(B){let J=2166136261;for(let ue=0;ue>>0).toString(36)}function Zj(B,J){let ue=B;for(let ce=0;ce8192?`${ce.slice(0,8192)}...${ce.length}`:ce;return`${ce.length}:${K9(be)}`})(B)}`;if(typeof B=="function")return"fn";if(typeof B!="object")return typeof B;if(J.has(B))return"cycle";if(ue>=6)return"max-depth";J.add(B);try{if(Array.isArray(B)){if(B.length<=160){const He=[];for(let Je=0;Je=je&&Re.push(Je)}return[`a:${B.length}`,`h=${Le.join(",")}`,`t=${Re.join(",")}`,`all=${(it>>>0).toString(36)}`].join(":")}const ce=B,be=Object.keys(ce).filter(Le=>{const Re=ce[Le];return Le!=="parent"&&Le!=="el"&&Le!=="component"&&(Re==null||typeof Re=="string"||typeof Re=="number"||typeof Re=="boolean"||Gj.has(Le))}).sort();return`o:${be.length}:${be.map(Le=>`${Le}=${Ag(ce[Le],J,ue+1)}`).join(";")}`}finally{J.delete(B)}}let V9=-1,Z9="",Pc=[2166136261];function e1(B){const J=Dt.value[B];return J?K9(Ag(J)):""}function Qj(B,J){let ue=B;for(let ce=0;ce>>0}function G9(){var B,J;const ue=V.value;if(V9===ue)return Z9;const ce=Dt.value.length;let be=F9(ce);(V9!==ue-1||be>ce||Pc.length>>0).toString(36),V9=ue,Z9}function hf(B,J={}){var ue;const ce=J.includeHeightCache===!0,be=(ue=J.includeContentHash)!=null?ue:ce,Le=ce?(function(je){const it=(function(){var at,Lt;const At=Number((Lt=(at=i.virtualScroll)==null?void 0:at.heightCacheLimit)!=null?Lt:5e3);return!Number.isFinite(At)||At<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(At))})();if(!Number.isFinite(it)||je.length<=it)return je;const He=new Map,Je=at=>{!at||He.size>=it||He.set(at.index,at)},nt=Dt.value.length,Oe=vo(mo.start-2*qi.value,0,nt),Xe=vo(mo.end+2*qi.value,Oe,nt);for(const at of je)at.index>=Oe&&at.index=0&&He.sizeat.index-Lt.index).slice(0,it)})(_9().map(je=>{var it;const He=Dt.value[je.index];return He?yn(_t({},je),{nodeType:String((it=He.type)!=null?it:""),signature:e1(je.index)}):null}).filter(je=>!!je)):[],Re=Vj({allowFallback:J.allowAnchorFallback===!0,requireViewport:J.requireViewport});return Re||Le.length||J.includeEmptyState===!0?yn(_t({sessionKey:B.sessionKey,threadKey:B.threadKey},Re?{anchor:Re.anchor,anchorCaptured:Re.captured}:{anchorCaptured:!1}),{metrics:B,width:B.width,contentHash:be?G9():void 0,measurementKey:Ea()||void 0,heightCache:Le.length?Le:void 0}):null}function Q9(B){var J,ue;const ce=Xh();if(!ce)return;const be=(function(je){const it=R.value;if(!it)return null;const He=xe(it,je.root),Je=Dt.value.length,nt=ct("getRendererBottomOffsetWithinRoot.offsetHeight",()=>it.offsetHeight||0),Oe=Math.max(0,nt>0?nt:Je>0?ct("getRendererBottomOffsetWithinRoot.scrollHeight",()=>it.scrollHeight||0):0),Xe=EA();return He+Math.max(Oe,Xe)})(ce);if(be==null)return;const Le=Math.max(0,B.distanceFromBottomPx),Re=Math.max(0,be-ce.clientHeight-Le);(function(je){Qn=o1()+120,jt=je})(Re),ce.isViewportRoot?(ue=(J=ce.doc.defaultView)==null?void 0:J.scrollTo)==null||ue.call(J,0,Re):cE(ce.root,ce.doc,Re,{isReverseFlexScrollRoot:_e,getNormalizedScrollTop:Ke})}const Y9=[];function LA(){if(Y)for(Cn!=null&&(wi?.(Cn),Cn=null);Y9.length;){const B=Y9.pop();B!=null&&window.clearTimeout(B)}}function pf(B){const J=!!Ht.value;Ht.value=null,Qn=0,jt=null,LA(),J&&B&&Di(B)}function gf(){if(!Ht.value||!Y||Cn!=null)return;const B=()=>{Cn=null;const J=Ht.value;J&&Q9(J)};Cn=Li?Li(B):null,Cn==null&&B()}function NA(B,J={}){const ue=Dt.value.length;return ue<=0?[]:B.filter(ce=>!(!Number.isInteger(ce.index)||ce.index<0||ce.index>=ue)&&!(!Number.isFinite(ce.height)||ce.height<=0)&&!(J.requireSignature&&!ce.signature)&&!(J.requireCompatibilityMetadata&&!ce.nodeType&&!ce.signature)&&(function(be){var Le;const Re=Dt.value[be.index];return!(!Re||be.nodeType&&be.nodeType!==String((Le=Re.type)!=null?Le:"")||be.signature&&be.signature!==e1(be.index))})(ce))}function FA(B){const J=N1(Rc()),ue=N1(B);return J!==-1&&ue!==-1&&J===ue}function J9(B){var J;const ue=Number(B?.width);if(Number.isFinite(ue)&&ue>0)return ue;const ce=Number((J=B?.metrics)==null?void 0:J.width);return Number.isFinite(ce)&&ce>0?ce:null}function DA(B){var J;return B.sessionKey===Vi()&&!!O9(B.threadKey)&&((J=B.measurementKey)!=null?J:"")===Ea()&&!!FA(J9(B))&&!!(function(ue){const ce=ue.heightCache;return!!ce?.length&&($A(ue)?ce.some(be=>!!(be.nodeType||be.signature)):ce.some(be=>!!be.signature))})(B)}function $A(B){return!!(B.contentHash&&B.contentHash===G9())}function Yj(B){return!$A(B)}let jc=null,Hc=null,Cg=null,t1=null,n1=null;function X9(B){var J;const ue=B.map(be=>{var Le,Re;return[be.index,Math.round(10*be.height),(Le=be.nodeType)!=null?Le:"",(Re=be.signature)!=null?Re:""].join("")}).join(""),ce=N1(Rc());return[(J=Fs())!=null?J:"",Vi(),Ea(),Dt.value.length,ce,B.length,K9(ue)].join(":")}function BA(B=(J=>(J=i.virtualScroll)==null?void 0:J.heightCache)()){if(!vn.value||!B?.length||Dt.value.length<=0||!FA((J=i.virtualScroll)==null?void 0:J.heightCacheWidth))return!1;var J;const ue=NA(B,{requireSignature:!0});if(!ue.length)return!1;const ce=X9(ue);return ce===jc?(Hc="standalone",!0):(Bc(ue,{mode:"merge"}),Rt(),jc=ce,Hc="standalone",l1(),Di("restore"),!0)}function e4(B,J={}){var ue,ce,be;if(!vn.value||!B||B.sessionKey!==Vi()||!O9(B.threadKey)||Dt.value.length<=0)return!1;const Le=!!((ue=B.heightCache)!=null&&ue.length)&&!wg(),Re=!B.anchor||B.anchorCaptured===!1&&J.allowUncapturedAnchor!==!0?null:B.anchor,je=J.restoreAnchor===!0&&!!Re&&!wg()&&Number(J9(B))>0;let it=!1;if((ce=B.heightCache)!=null&&ce.length&&DA(B)){const Je=NA(B.heightCache,{requireCompatibilityMetadata:!B.contentHash,requireSignature:Yj(B)});Je.length&&(Bc(Je,{mode:"merge"}),Rt(),jc=X9(Je),Hc="restore",l1(),it=!0)}if(Le||je)return!1;if(!J.restoreAnchor||!Re)return it&&Di("restore"),!0;const He=(function(Je,nt){var Oe;const Xe=Je.anchor,ft=Xe?Xe.type==="bottom"?`bottom:${Math.round(Xe.distanceFromBottomPx)}`:`node:${Xe.nodeIndex}:${Math.round(Xe.offsetWithinNodePx)}`:"none";return[(Oe=Fs())!=null?Oe:"",Vi(),Ea(),kg.value,nt,ft].join(":")})(B,(be=J.restoreToken)!=null?be:"imperative");return Cg===He?(it&&Di("restore"),!0):(Cg=He,(function(Je){const nt=()=>{if(Je.type==="node")return pf(),void Bo({nodeIndex:Je.nodeIndex,offsetWithinNodePx:Je.offsetWithinNodePx});if(mt(),$o.value=null,Ht.value=Je,LA(),Q9(Je),Y)for(const Oe of[0,120,280,480])Y9.push(window.setTimeout(()=>{const Xe=Ht.value;Xe&&Q9(Xe)},Oe))};(function(Oe){if(!an.value)return!1;const Xe=Dt.value.length;return!(Xe<=0||(Ia.value=Oe.type==="node"?vo(Oe.nodeIndex,0,Xe-1):Xe-1,Yh(),0))})(Je)?kt(nt):nt()})(Re),Di("restore"),!0)}function wg(){const B=Rc();return Number.isFinite(B)&&B>0}function zA(B){var J;return B.sessionKey===Vi()&&!!O9(B.threadKey)&&(Dt.value.length<=0||!(!((J=B.heightCache)!=null&&J.length)||wg())||!(!(B.anchor&&Number(J9(B))>0)||wg()))}function t4(){xi.clear();for(const B of Object.keys(ss)){const J=Number(B);Number.isInteger(J)&&J>=0&&J{let J=!1,ue=null;const ce=()=>{J||(J=!0,ue!=null&&window.clearTimeout(ue),B())};if(Li)return Li(ce),void(ue=window.setTimeout(ce,50));ue=window.setTimeout(ce,0)})}function n4(B,J=Fs(),ue=zr.value){return Vi()===B&&Fs()===J&&zr.value===ue}function i4(){return Bi(this,arguments,function*(B={}){var J,ue,ce,be,Le;const Re=Vi(),je=Fs(),it=zr.value,He=(J=B.frames)!=null?J:2,Je=(ue=B.timeoutMs)!=null?ue:120,nt=(ce=B.reason)!=null?ce:"manual",Oe=B.expectedSettledTokenKey,Xe=B.flushPendingTimers===!0,ft=Oc(nt),at=()=>yn(_t({},ft),{phase:ft.final?"settling":ft.phase,stable:!1,confidence:ft.confidence==="final"?"mixed":ft.confidence,reason:nt}),Lt=()=>n4(Re,je,it)&&(Oe==null||r1()===Oe);for(let on=0;onwindow.setTimeout(Xt,on))})(Je),!Lt()||(Xe&&hA(),Ta(),i1(),!Lt()))return at();const At=q9();At&&(W9=Re,H9=je,((be=i.virtualScroll)==null?void 0:be.settleMode)==="manual"&&Oe!=null&&bg((Le=i.virtualScroll)==null?void 0:Le.settledToken)&&r1()===Oe&&(ff=f1(i.virtualScroll.settledToken)));const Ot=Lt()&&At&&MA(),Kt=Oc(nt,Ot?"final":void 0);return a4(Kt,!0),Kt})}let s4="content",Wc=null,qc=null,o4=0,s1=null,mf=null,r4=null,l4=null;function o1(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function OA(B){var J,ue;const ce=s1;if(!ce)return!0;const be=(ue=(J=i.virtualScroll)==null?void 0:J.heightDiffThresholdPx)!=null?ue:1;return Math.abs(B.totalHeight-ce.totalHeight)>be||B.sessionKey!==ce.sessionKey||B.phase!==ce.phase||B.stable!==ce.stable||B.final!==ce.final||B.threadKey!==ce.threadKey||B.nodeCount!==ce.nodeCount||B.measuredCount!==ce.measuredCount||B.width!==ce.width}function r1(B=(J=>(J=i.virtualScroll)==null?void 0:J.settledToken)()){return io(B)}function PA(B,J){var ue,ce;return[B,J.sessionKey,(ue=J.threadKey)!=null?ue:"",Ea(),G9(),io((ce=i.virtualScroll)==null?void 0:ce.settledToken),Math.round(J.totalHeight),Math.round(J.width)].join("\0")}function l1(){r4=null,l4=null,mf=null}function Jj(B){const J=B.heightCache;return J?.length?X9(J):""}function a1(B){var J,ue,ce;const be=B.metrics,Le=B.anchor?(Re=B.anchor).type==="bottom"?`bottom:${Math.round(Re.distanceFromBottomPx)}`:`node:${Re.nodeIndex}:${Math.round(Re.offsetWithinNodePx)}`:"none";var Re;return[B.sessionKey,(J=B.threadKey)!=null?J:"",(ue=B.measurementKey)!=null?ue:Ea(),(ce=B.contentHash)!=null?ce:"",Jj(B),Le,B.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 a4(B,J=!1){if(!vn.value||(function(Re=!1){return!Re&&Ci.value&&!ts.value})(J))return;const ue=J||OA(B),ce=(function(Re,je=!1){return je||Re.stable||Re.phase==="final"?{state:hf(Re,{includeHeightCache:!0})}:{state:hf(Re)}})(B,J),be=ce.state,Le=!!(be&&(ue||(function(Re,je=!1){return!!je||a1(Re)!==mf})(be,J)));if(ue&&(N(B),s1=B,o4=o1()),be&&Le&&(O(be),be.anchor&&P(be.anchor),mf=a1(be)),B.stable){const Re=PA("settled",B);if(Re!==r4){r4=Re;const je=hf(B,{includeHeightCache:!0});je&&(O(je),mf=a1(je)),(function(it){s("render-settled",it)})(B)}}if(B.phase==="final"){const Re=PA("final",B);if(Re!==l4){l4=Re;const je=hf(B,{includeHeightCache:!0});je&&(O(je),mf=a1(je)),(function(it){s("render-final",it)})(B)}}}function u4(){Wc!=null&&(wi?.(Wc),Wc=null),qc!=null&&Y&&(window.clearTimeout(qc),qc=null)}function jA(){Wc=null,qc=null,(function(B){if(Ma.size>0||Br!=null)return!0;switch(B){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(s4)&&(Ta(),i1()),a4(Oc(s4))}function Di(B){var J,ue;if(!vn.value||(s4=B,Wc!=null||qc!=null))return;const ce=Math.max(0,(ue=(J=i.virtualScroll)==null?void 0:J.emitIntervalMs)!=null?ue:32),be=Math.max(0,ce-(o1()-o4)),Le=()=>{qc=null,Wc=Li?Li(jA):null,Wc==null&&jA()};Y&&be>0?qc=window.setTimeout(Le,be):Le()}function HA(){Ve.value+=1}function xg(B){if(Pe.value&&B>=dt.value){const J=Dt.value[B],ue=ut.value===!0&&yt.value!==!0&&B>=Dt.value.length-2,ce=J?.type==="code_block"||J?.type==="image"||J?.type==="mermaid"||J?.type==="infographic";if(!ue||ce)return!1}return!Dr.value||B=Ee.value&&(H.value||(H.value=!0,N9()),!lA.value||!to))return vf(B),void(J&&pu(B,!0));if(B{if(pA.delete(Le),!Dr.value||L9.value.has(Le))return;const it=On.get(Le);if(!it)return;const He=Ae(it),Je=it.ownerDocument||document,nt=Je.defaultView||window,Oe=!He||He===Je.documentElement||He===Je.body,Xe=!Oe&&He?ct("nodeVisibilityFallback.root.getBoundingClientRect",()=>He.getBoundingClientRect()):null,ft=Oe?0:Xe.top,at=Oe?ct("nodeVisibilityFallback.clientHeight",()=>{var At,Ot;return(Ot=(At=nt.innerHeight)!=null?At:He?.clientHeight)!=null?Ot:0}):Xe.bottom,Lt=ct("nodeVisibilityFallback.node.getBoundingClientRect",()=>it.getBoundingClientRect());Lt.bottom>=ft-500&&Lt.top<=at+500&&pu(Le,!0)},1800+Re);pA.set(Le,je)})(B);let be=null;be=qe(()=>ce.isVisible.value,Le=>{if(Le){vg(B),pu(B,!0),be?.(),mg.delete(B),af.get(B)===ce&&af.delete(B);try{ce.destroy()}catch{}}},{immediate:!0}),mg.set(B,be),an.value&&Al()}function c4(){Br=null,$t(()=>{let B=!1;for(const[J,ue]of Ma)Ma.delete(J),Yl.get(J)===ue.el&&zc.get(J)===ue.version&&(B=Fi(J,ue.height,{allowShrink:ue.allowShrink})||B);return B})}function yf(){Br!=null&&(wi?.(Br),Br=null),Ma.clear()}function _g(B,J){(function(ue,ce,be){var Le;if(!Number.isFinite(be)||be<=0||Yl.get(ue)!==ce)return;const Re=zc.get(ue);if(Re==null)return;const je=Dt.value[ue],it=Ze.value&&yt.value!==!0&&!((Le=i.nodes)!=null&&Le.length)&&ue>=Dt.value.length-2,He=!(je?.loading===!0||it),Je=Ma.get(ue),nt=Je?Je.allowShrink&&He:He,Oe=Je&&!nt?Math.max(Je.height,be):be;Ma.set(ue,{height:Oe,allowShrink:nt,version:Re,el:ce}),Br==null&&(Br=Li?Li(c4):null,Br==null&&c4())})(B,J,go(B,J))}function Ta(){for(const[B,J]of Yl)J&&_g(B,J)}function WA(){ws?.disconnect(),ws=null,Cs.clear()}function d4(){for(;fg.length;)gg(fg.pop())}qe(ts,B=>{B&&Di("content")},{flush:"post"}),t({getVirtualMetrics:Oc,captureVirtualState:function(B={}){var J;return hf(Oc("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:B.allowFallbackAnchor===!0,requireViewport:B.requireViewport===!0,includeEmptyState:(J=B.includeEmptyState)==null||J})},restoreVirtualState:function(B,J={}){const ue=J.restoreAnchor===!0,ce=J.restoreToken==null?"imperative":String(J.restoreToken);t1=B,n1={restoreAnchor:ue,restoreToken:ce,allowUncapturedAnchor:J.allowUncapturedAnchor===!0},!e4(B,{restoreAnchor:ue,restoreToken:ce,allowUncapturedAnchor:J.allowUncapturedAnchor===!0})&&zA(B)||(t1=null,n1=null)},forceMeasure:function(B="manual"){return Bi(this,null,function*(){yield kt(),yield RA(),Ta(),i1(),yield kt();const J=Oc(B);return a4(J,!0),J})},settle:i4,scrollToNode:function(B,J="start"){pf(),mt();const ue=Dt.value.length;if(ue<=0)return;const ce=vo(B,0,ue-1),be=()=>{var Le;const Re=vt({nodeIndex:ce,offsetWithinNodePx:0}),je=Bn(ce),it=Xh(),He=(Le=it?.clientHeight)!=null?Le:0,Je=Go();let nt=Re;if(J==="center")nt=Re-He/2+je/2;else if(J==="end")nt=Re-He+je;else if(J==="nearest"&&Je!=null){if(Re>=Je&&Re+je<=Je+He)return;nt=Reeo.value,B=>{if(!B){WA();for(const J of fu.values())for(const ue of J)gg(ue);fu.clear(),zc.clear(),d4(),yf()}},{immediate:!0}),qe(yt,B=>{B&&(function(){if(Y&&yt.value&&Yl.size){d4();for(const J of[80,240,640]){const ue=fA(J,()=>{for(const[ce,be]of Yl)be&&_g(ce,be)},"final");ue!=null&&fg.push(ue)}}})(),Di(B?"final":"content")});const Xj=dE(()=>Di("content"),16),eH=dE(()=>Di("batch"),16);qe([()=>Dt.value.length,()=>dt.value],()=>{Ht.value&&gf(),Xj()},{flush:"post",immediate:!0}),qe([()=>mo.start,()=>mo.end],()=>{eH()},{flush:"post"});const{cleanupBatchScheduler:tH}=(function(B){const{props:J,isClient:ue,isTestEnv:ce,parsedNodesIdentity:be,parsedNodeCount:Le,desiredRenderedCount:Re,datasetKey:je,batchingEnabled:it,incrementalRenderingActive:He,resolvedBatchSize:Je,resolvedInitialBatch:nt,renderedCount:Oe,adaptiveBatchSize:Xe,previousRenderContext:ft,previousBatchConfig:at,requestFrame:Lt,cancelFrame:At,hasIdleCallback:Ot,cleanupNodeVisibility:Kt,onDatasetKeyChanged:on,onDatasetChanged:Xt}=B;let rn=null,En="raf",zn=null,yi=0,yo=!1,no=!1;const Cl=new Set,Xl=new Set;function v1(){if(ue){rn!=null&&(En==="raf"&&At?At(rn):En==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(rn):En==="timeout"&&window.clearTimeout(rn),rn=null),yi+=1;for(const zo of Cl)At&&At(zo);for(const zo of Xl)window.clearTimeout(zo);Cl.clear(),Xl.clear(),zn=null,yo=!1,no=!1}}function $g(){return typeof performance<"u"?performance.now():Date.now()}function lC(zo){(function(La){var mu;if(!He.value)return;const Na=Math.max(2,(mu=J.renderBatchBudgetMs)!=null?mu:6),Fa=Math.max(1,Je.value||1),wl=Math.max(1,Math.floor(Fa/4));La>1.5*Na?Xe.value=Math.max(wl,Math.floor(.8*Xe.value)):La<.6*Na&&Xe.value=Na)return;const Fa=Math.max(1,zo),wl=()=>{const Af=$g();rn=null;const y1=zn??Fa;zn=null;const Cf=$g();Oe.value=Math.min(Na,Oe.value+y1),Kt(Oe.value),(function(y4,Bg){if(!ue)return void lC(Bg);yo=!0;const dC=++yi;kt().then(()=>{var fC;if(dC!==yi)return;const CH=$g(),wH=Math.max(Bg,CH-y4),hC=()=>{dC===yi&&lC(wH)};if(Lt){let Kc=null,wf=null,gC=!1;const mC=()=>{gC||(gC=!0,Kc!==null&&(Cl.delete(Kc),Kc=null),wf!==null&&(Xl.delete(wf),window.clearTimeout(wf),wf=null),hC())};return Kc=Lt(()=>{mC()}),Cl.add(Kc),wf=window.setTimeout(()=>{Kc!==null&&At&&At(Kc),mC()},Math.max(32,(fC=J.renderBatchIdleTimeoutMs)!=null?fC:120)),void Xl.add(wf)}const pC=window.setTimeout(()=>{Xl.delete(pC),hC()},0);Xl.add(pC)})})(Af,$g()-Cf)};if(!ue||hr.immediate)return void wl();const vu=Math.max(0,(La=J.renderBatchDelay)!=null?La:16);if(zn=zn!=null?Math.max(zn,Fa):Fa,rn==null){if(!ce&&Ot&&window.requestIdleCallback){const Af=Math.max(0,(mu=J.renderBatchIdleTimeoutMs)!=null?mu:120);return En="idle",void(rn=window.requestIdleCallback(()=>wl(),{timeout:Af}))}if(Lt&&!ce)return En="raf",void(rn=Lt(()=>{vu===0?wl():(En="timeout",rn=window.setTimeout(()=>wl(),vu))}));En="timeout",rn=window.setTimeout(()=>wl(),vu)}}function uC(zo,hr={}){yo?no=!0:zo==null?cC():aC(zo,hr)}function cC(){He.value&&aC(it.value?Math.max(1,Math.round(Xe.value)):Math.max(1,Je.value))}return qe([be,Le,je,He,Je,nt,()=>J.renderBatchDelay],()=>{var zo;const hr=Le.value,La=ft.value,mu=je.value,Na=!Object.is(mu,La.key),Fa=hr!==La.total,wl=Na||Fa;ft.value={key:mu,total:hr};const vu=at.value,Af=(zo=J.renderBatchDelay)!=null?zo:16,y1=vu.batchSize!==Je.value||vu.initial!==nt.value||vu.delay!==Af||vu.enabled!==He.value;at.value={batchSize:Je.value,initial:nt.value,delay:Af,enabled:He.value},Na&&on(hr),(wl||y1||!He.value)&&v1(),(wl||y1)&&(Xe.value=Math.max(1,Je.value||1)),wl&&Xt();const Cf=Re.value;if(!hr)return Oe.value=0,void Kt(0);if(!He.value)return Oe.value=Cf,void Kt(Oe.value);const y4=Na||La.total===0;Oe.value=y4||y1?Math.min(Cf,nt.value):Math.min(Oe.value,Cf);const Bg=Math.max(1,nt.value||Je.value||hr);Oe.value{He.value&&(typeof hr=="number"&&zo<=hr||zo>Oe.value&&uC())}),{cleanupBatchScheduler:v1}})({props:T,isClient:Y,isTestEnv:Ts,parsedNodesIdentity:bs,parsedNodeCount:Lo,desiredRenderedCount:hg,datasetKey:qj,batchingEnabled:Be,incrementalRenderingActive:Pe,resolvedBatchSize:Ks,resolvedInitialBatch:Zo,renderedCount:dt,adaptiveBatchSize:An,previousRenderContext:St,previousBatchConfig:pi,requestFrame:Li,cancelFrame:wi,hasIdleCallback:Vo,cleanupNodeVisibility:Rj,onDatasetKeyChanged:B=>{yf(),Sn(),Rt(),l1(),B>0&&$c(B)},onDatasetChanged:()=>{an.value&&Al({immediate:!0})}});qe([aA,an,()=>R.value,()=>X()],([B,J])=>{if(!B)return gA(),void T9();Oj(),J?Al({immediate:!0}):T9()},{flush:"post",immediate:!0}),qe([()=>Dt.value.length,()=>an.value],B=>Bi(null,[B],function*([J,ue]){ue&&J&&Y&&(yield kt(),Al({immediate:!0}))}),{flush:"post"}),qe(fi,B=>{B&&(function(){var J;if(Oi.value&&co.value&&Wi.value&&((J=As.value)!=null&&J[1]))return;const ue=xt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ce=xt({type:"list_item",children:[ue],raw:"- Probe paragraph text"}),be=xt({type:"list",ordered:!1,items:[ce],raw:"- Probe paragraph text"});Oi.value=ue,co.value=ce,Wi.value=be;const Le={1:null,2:null,3:null,4:null,5:null,6:null};for(let Re=1;Re<=6;Re++)Le[Re]=xt({type:"heading",level:Re,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(Re)} Probe heading`});As.value=Le})()},{immediate:!0}),qe([()=>R.value,fi],()=>{if(!fi.value)return $9(),void(ie.value=0);vA(),$9(),fi.value&&R.value&&typeof ResizeObserver<"u"&&(Jh=new ResizeObserver(()=>{vA(),$o.value&&Jt(),Ht.value&&gf(),Di("resize")}),Jh.observe(R.value))},{immediate:!0}),qe([fi,ho,zr],()=>Bi(null,null,function*(){if(!fi.value)return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Rt();yield kt(),(function(){if(!fi.value||typeof window>"u")return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Rt();const B={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},J=mA(D9(q.value),".paragraph-node");B.paragraph=rk(q.value,J,"pre-wrap");const ue=D9(j.value),ce=ue?.querySelector(".paragraph-node");B.listItem=rk(j.value,ce,"pre-wrap");const be=ct("readSimpleTextProbeProfile.list.offsetHeight",()=>{var Re,je;return(je=(Re=W.value)==null?void 0:Re.offsetHeight)!=null?je:0}),Le=ct("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var Re,je;return(je=(Re=j.value)==null?void 0:Re.offsetHeight)!=null?je:0});B.listWrapperOverhead=Math.max(0,be-Le);for(let Re=1;Re<=6;Re++){const je=mA(D9(z[Re]),`h${Re}`);B.headings[Re]=rk(z[Re],je,"pre-wrap")}se.value=B,Rt()})()}),{flush:"post",immediate:!0}),qe(()=>Dt.value.length,()=>{an.value&&Al({immediate:!0})}),qe([fi,ie],()=>{Rt(),an.value&&Al({immediate:!0}),$o.value&&Jt(),Ht.value&&gf(),Di("resize")},{immediate:!1}),qe(()=>Dr.value,B=>{if(B)for(const[J,ue]of On)Sg(J,ue);else if(N9(),an.value)Al({immediate:!0});else for(const[J,ue]of On)ue&&pu(J,!0)},{immediate:!1}),qe([fe,Ee,()=>X()],()=>{var B;(B=to.refresh)==null||B.call(to);for(const[J,ue]of On)Sg(J,ue)},{immediate:!1}),qe([()=>T.viewportPriority,()=>Dt.value.length,Ee],([B,J,ue])=>{if(B!==!1){if(H.value&&(J<=200||J<=ue)){H.value=!1;for(const[ce,be]of On)Sg(ce,be)}}else H.value=!1}),qe(()=>dt.value,()=>{an.value&&Al({immediate:!0})}),qe([Ia,ns,qi,()=>Dt.value.length,an],()=>{Yh()},{immediate:!0});let u1=null,c1=!1,kf=null;function d1(){u1=null,W9=null,H9=void 0,ff=null,l1()}function f4(){yf(),Sn(),Rt(),xi.clear();const B=Dt.value.length;B>0&&$c(B),t4()}function h4(){u4(),hA(),s1=null,jc=null,Hc=null,Cg=null,t1=null,n1=null,c1=!1,d1(),_A("restore"),mt(),pf()}function f1(B){var J;return[(J=Fs())!=null?J:"",Vi(),Ea(),kg.value,r1(B),Dt.value.length,Math.round(ei(0,Dt.value.length)),Math.round(Rc()),Ns.count,Math.round(Ns.total)].join(":")}function qA(){return Bi(this,null,function*(){var B,J,ue,ce;const be=(B=i.virtualScroll)==null?void 0:B.settledToken,Le=r1(be),Re=Vi(),je=Fs(),it=zr.value;if(vn.value&&((J=i.virtualScroll)==null?void 0:J.settleMode)==="manual"&&bg(be))if(q9()){if(f1(be)!==ff&&!c1){c1=!0;try{const He=yield i4({reason:"manual",expectedSettledTokenKey:Le}),Je=r1()===Le;n4(Re,je,it)&&He.sessionKey===Re&&He.threadKey===je&&Je&&He.stable&&He.phase==="final"&&(ff=f1((ue=i.virtualScroll)==null?void 0:ue.settledToken))}finally{c1=!1,yield kt();const He=(ce=i.virtualScroll)==null?void 0:ce.settledToken,Je=bg(He)?f1(He):"";n4(Re,je,it)&&Je&&ff!==Je&&qA()}}}else Di("manual")})}qe(vn,(B,J)=>{if(B!==J){if(!B)return h4(),void u4();h4(),f4(),kf=zr.value,Di("content")}},{flush:"post"}),qe([vn,zr],([B,J])=>{B?kf!=null?kf!==J&&(kf=J,(function(ue="resize"){yf(),Sn(),Rt(),xi.clear();const ce=Dt.value.length;ce>0&&$c(ce),t4(),jc=null,Hc=null,Cg=null,s1=null,c1=!1,d1(),BA(),kt(()=>{Ta(),$o.value&&Jt(),Ht.value&&gf(),Di(ue)})})("resize")):kf=J:kf=null},{flush:"post",immediate:!0}),qe([vn,()=>Vi(),()=>Fs()],([B])=>{B&&(h4(),f4(),_A("content"),Di("content"))}),qe([vn,()=>Vi(),()=>Fs(),zr,()=>Dt.value.length],([B])=>{B&&(function(J="async-node"){let ue=!1;for(const[ce,be]of Array.from(Jl.entries()))P9(be)||(Jl.delete(ce),$r.delete(ce),ue=!0);ue&&(cf(),Di(J))})("async-node")},{flush:"post"}),qe([vn,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.sessionKey},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.measurementKey},()=>i.indexKey,()=>V.value],([B])=>{B&&(l1(),(function(J="content"){if(!vn.value)return;const ue=[],ce=Dt.value.length,be=F9(ce);for(const Le of Array.from(xi.keys())){if(Le>=ce){ue.push(Le);continue}if(Le=ce&&xi.delete(Le);ue.length&&((function(Le,Re={}){const je=Array.from(Le,Number);We(je);let it=0;if($t(()=>(it=S9(je,Re),it>0)),it>0)(function(He){for(const Je of He)xi.delete(Je)})(je);else for(const He of je)ke.delete(He)})(ue,{notify:!1}),Rt(),d1(),$o.value&&Jt(),Ht.value&&gf(),Di(J))})("content"))},{flush:"post",immediate:!0}),qe([vn,()=>Dt.value.length,()=>Vi(),()=>Fs()],([B,J,ue,ce],[be,Le,Re,je])=>{B&&be&&ue===Re&&ce===je&&J!==Le&&d1()},{flush:"post"}),qe([vn,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.heightCache},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.heightCacheWidth},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.restoreState},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.measurementKey},()=>Dt.value.length,()=>Vi(),ie],()=>{BA()},{flush:"post",immediate:!0}),qe([vn,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.restoreState},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.restoreAnchor},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.measurementKey},()=>Dt.value.length,()=>Vi(),ie],B=>Bi(null,[B],function*([J,ue]){if(!J||!ue)return;yield kt();const ce=(function(){var be;const Le=(be=i.virtualScroll)==null?void 0:be.restoreAnchor;return Le==null||Le===!1?null:Le===!0?"true":String(Le)})();e4(ue,{restoreAnchor:ce!=null,restoreToken:ce??void 0})}),{flush:"post",immediate:!0}),qe([vn,ie,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.restoreState},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.measurementKey}],([B])=>{var J;if(!B)return;const ue=(J=i.virtualScroll)==null?void 0:J.restoreState;ue&&jc&&Hc==="restore"&&(DA(ue)||(f4(),jc=null,Hc=null,Di("resize")))},{flush:"post"}),qe([vn,()=>Dt.value.length,()=>Vi(),ie],B=>Bi(null,[B],function*([J]){var ue;const ce=t1,be=n1;J&&ce&&(yield kt(),!e4(ce,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(ue=be?.restoreToken)!=null?ue:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&zA(ce)||(t1=null,n1=null))}),{flush:"post",immediate:!0}),qe([vn,yt,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.settleMode},()=>Vi(),()=>Fs(),zr,E9,cA,()=>dt.value,hg,()=>Ns.count,()=>Ns.total],([B,J,ue])=>{if(!B||J!==!0||ue==="manual"||!U9())return;const ce=(function(){var be;const Le=Dt.value.length;return[(be=Fs())!=null?be:"",Vi(),Ea(),kg.value,Le,Math.round(ei(0,Le)),Math.round(Rc()),Ns.count,Math.round(Ns.total)].join(":")})();u1!==ce&&(u1=ce,i4({reason:"final"}).then(be=>{be.stable||u1!==ce||(u1=null)}))},{flush:"post",immediate:!0}),qe([vn,yt,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.settleMode},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.settledToken},()=>Vi(),()=>Fs(),zr,E9,cA,()=>dt.value,hg,()=>Dt.value.length,()=>Ns.count,()=>Ns.total],()=>{qA()},{flush:"post",immediate:!0}),qe([()=>Dt.value.length,an,ns,qi,()=>mo.start,()=>mo.end],([B,J,ue,ce,be,Le])=>{Ce.value&&Qt("virtualization",{nodes:B,virtualization:J,maxLiveNodes:ue,buffer:ce,focusIndex:Ia.value,scroll:J?(()=>{const Re=pt.value||Ae();return Re?{reverse:_e(Re),scrollTop:Math.round(Re.scrollTop),scrollTopAbs:Math.round(Math.abs(Re.scrollTop)),scrollHeight:Math.round(Re.scrollHeight),clientHeight:Math.round(Re.clientHeight)}:null})():null,liveRange:{start:be,end:Le},rendered:dt.value})}),qe([()=>T.customId],([B],J,ue)=>{if(!B||fo)return;const ce=(function(be,Le){return be?(Vs.controllers[be]=Le,()=>{Vs.controllers[be]===Le&&delete Vs.controllers[be]}):()=>{}})(B,{captureRestoreAnchor:Ki,restoreAnchor:Bo,getAnchorDrift:bl,getReport:Hj});ue(()=>{ce()})},{immediate:!0}),Gn(()=>{(function(){if(vn.value)try{Ta(),i1();const B=Oc("manual");OA(B)&&(N(B),s1=B,o4=o1());const J=hf(B,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});J&&(O(J),J.anchor&&P(J.anchor),mf=a1(J))}catch{}})(),tH(),N9(),fn(),WA();for(const B of fu.values())for(const J of B)gg(J);fu.clear(),zc.clear(),xi.clear(),d4(),yf(),$9(),mt(),pf(),u4(),gA(),T9()});const nH=op("ViewportDeferredMermaidBlockNode",Dl({loader:()=>Bi(null,null,function*(){try{return(yield vs(()=>import("./index11-D6nykIM1.js"),__vite__mapDeps([9,7]))).default}catch(B){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".',B),br}}),loadingComponent:SE,delay:0}),SE),iH=op("ViewportDeferredInfographicBlockNode",Dl({loader:()=>Bi(null,null,function*(){try{return(yield vs(()=>import("./index10-BY9KLppN.js"),[])).default}catch(B){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.',B),br}}),loadingComponent:xE,delay:0}),xE),sH=op("ViewportDeferredD2BlockNode",Dl(()=>Bi(null,null,function*(){try{return(yield vs(()=>import("./index8-CdUxL-Tk.js"),[])).default}catch(B){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".',B),br}})),br),UA={text:ks,paragraph:Fd,heading:h9,code_block:Q3,list:Ch,list_item:Ah,blockquote:p2,table:Dp,definition_list:g2,footnote:m2,footnote_reference:Ur,footnote_anchor:Np,admonition:b2,vmr_container:y2,hardbreak:ec,link:ar,image:Xu,thematic_break:v2,math_inline:Gl,math_block:yO,strong:rr,emphasis:ur,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,checkbox:qr,checkbox_input:qr,inline_code:Uo,html_inline:Kr,reference:or,html_block:Fp},oH=L(()=>R9()),KA=L(()=>uE(T.codeBlockProps)),rH=L(()=>uE(T.codeBlockProps,{omit:["langs"]})),VA=L(()=>_t(_t({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 ae.value=="boolean"?{showTooltips:ae.value}:{}),rH.value)),ZA=L(()=>_t(yn(_t({},VA.value),{langs:T.langs}),KA.value));function GA(B){return typeof B=="boolean"?B:void 0}const lH=L(()=>{const B=T.codeBlockProps||{},J={},ue=GA(B.showLineNumbers);ue!==void 0&&(J.showLineNumbers=ue);const ce=GA(B.diffInline);ce!==void 0&&(J.diffInline=ce);const be=(function(Le){const Re=Number(Le);return Number.isFinite(Re)&&Re>0?Re:void 0})(B.reservedHeightPx);return be!==void 0&&(J.reservedHeightPx=be),J}),aH=L(()=>_t(_t({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,themes:T.themes,langs:T.langs,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof ae.value=="boolean"?{showTooltips:ae.value}:{}),KA.value)),uH=L(()=>_t({},T.mermaidProps||{})),QA=L(()=>_t({},T.d2Props||{})),cH=L(()=>_t({},T.infographicProps||{})),h1=L(()=>({typewriter:f.value,fade:T.fade,customHtmlTags:vi.value.customHtmlTags})),dH=L(()=>_t(_t({},h1.value),typeof ae.value=="boolean"?{showTooltip:ae.value}:{})),fH=L(()=>_t(_t({},h1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{})),hH=L(()=>_t(_t({},h1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{})),pH=L(()=>_t(_t({},h1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{}));function gH(B){return Array.isArray(B.children)&&B.children.length>0}const Ig=L(()=>jj.value.map(B=>{var J,ue,ce,be,Le,Re,je,it;let He=(function(At){var Ot,Kt,on,Xt,rn,En,zn;if(At.type!=="code_block")return At;const yi=At,yo=[String((Ot=yi.language)!=null?Ot:""),String((Kt=yi.loading)!=null?Kt:""),String((on=yi.diff)!=null?on:""),String((Xt=yi.code)!=null?Xt:""),String((rn=yi.originalCode)!=null?rn:""),String((En=yi.updatedCode)!=null?En:""),String((zn=yi.raw)!=null?zn:"")].join("\0"),no=tl.get(yi);if(no&&no.signature===yo)return no.node;const Cl=_t({},yi);return tl.set(yi,{signature:yo,node:Cl}),Cl})(B.node);const Je=Mg(He);let nt=eC(He,Je);if((He.type==="html_block"||He.type==="html_inline")&&nt===UA[He.type]){const At=He,Ot=String((J=At.tag)!=null?J:"").trim().toLowerCase()||Hz(At.content);if(Ot){const Kt=Tn.value[Ot];if(fs.value.has(Ot)&&Kt)nt=Kt,He=yn(_t({},At),{type:Ot,tag:Ot,content:lAe(At.content,Ot)});else if(Wz((ue=At.content)!=null?ue:At.raw,Ot)){const on=String((be=(ce=At.content)!=null?ce:At.raw)!=null?be:"");He.type==="html_inline"?(nt=ks,He={type:"text",content:on,raw:on}):(nt=Fd,He={type:"paragraph",children:[{type:"text",content:on,raw:on}],raw:on})}}}const Oe=He.type==="code_block"&&g.value==="pre"&&nt===br&&!p4(Tn.value,Je);let Xe=_t({},(function(At,Ot,Kt){const on=Ot??Mg(At);if(At.type==="code_block"){const Xt=on?p4(Tn.value,on):void 0;if(Kt&&g.value==="pre"&&!Xt&&Kt===br)return lH.value;if(Kt&&on&&Kt===Xt)return on==="mermaid"?JA(At):on==="infographic"?XA(At):on==="d2"||on==="d2lang"?QA.value:ZA.value;if(Kt&&Kt===Tn.value.code_block)return ZA.value;if(kA(Kt))return aH.value}return on==="mermaid"?JA(At):on==="infographic"?XA(At):on==="d2"||on==="d2lang"?QA.value:At.type==="link"?dH.value:At.type==="list"?fH.value:At.type==="blockquote"?hH.value:At.type==="table"?pH.value:At.type==="code_block"?VA.value:h1.value})(He,Je,nt));const ft=fi.value?uf.value[B.index]:null;He.type==="code_block"&&ft?.kind==="code-block"&&(Xe=yn(_t({},Xe),Oe?{reservedHeightPx:(Le=ft.height)!=null?Le:ft.contentHeight}:{estimatedHeightPx:ft.height,estimatedContentHeightPx:ft.contentHeight,estimatedDiffInline:ft.diffInline})),Oe||He.type!=="code_block"||Je!=="mermaid"||eh(Xe.estimatedPreviewHeightPx)!=null||(Xe=yn(_t({},Xe),{estimatedPreviewHeightPx:Wv(jv(String((Re=He.code)!=null?Re:"")))})),Oe||He.type!=="code_block"||Je!=="infographic"||eh(Xe.estimatedPreviewHeightPx)!=null||(Xe=yn(_t({},Xe),{estimatedPreviewHeightPx:qv(Hv(String((je=He.code)!=null?je:"")))})),He.type==="math_block"&&(Xe=yn(_t({},Xe),{cacheScope:Nt}));const at=(function(At,Ot){const Kt=String(At.type);return!X0(Kt)&&Tn.value[Kt]===Ot})(He,nt),Lt=at?m7(He,oe.value):void 0;return yn(_t({},B),{node:He,component:nt,bindings:Xe,customBindings:_t(_t({},Lt??{}),Xe),rendersCustomNode:at,hasSlotChildren:gH(He),slotContent:String((it=He.content)!=null?it:""),isCodeBlock:He.type==="code_block",indexKey:`${oH.value}-${B.index}`,vnodeKey:`${Wj.value}\0${B.index}\0${He.type}`})}));function Mg(B){var J;return B?.type==="code_block"?String((J=B.language)!=null?J:"").trim().toLowerCase():""}function p4(B,J){const ue=J.trim().toLowerCase();if(ue)for(const ce of[ue,c9(ue),XR(ue)]){const be=ce&&B[ce];if(be)return be}}function YA(B,J,ue,ce){var be,Le;const Re=_t({},B.value);return eh(Re.estimatedPreviewHeightPx)==null&&(Re.estimatedPreviewHeightPx=ce(ue(String((be=J?.code)!=null?be:"")),void 0,Re.maxHeight==="none"?null:(Le=eh(Re.maxHeight))!=null?Le:void 0)),Re}function JA(B){return YA(uH,B,jv,Wv)}function XA(B){return YA(cH,B,Hv,qv)}function eC(B,J){if(!B)return E8;const ue=Tn.value,ce=ue[String(B.type)];if(B.type==="code_block"){const be=J??Mg(B),Le=be?p4(ue,be):void 0;return Le||(g.value==="pre"?ue.code_block||br:be==="mermaid"?ue.mermaid||nH:be==="infographic"?ue.infographic||iH:be==="d2"||be==="d2lang"?ue.d2||sH:ce||ue.code_block||bA.value)}return ce||UA[String(B.type)]||E8}function g4(B){s("click",B)}function mH(B){var J;(J=B.target)!=null&&J.closest("[data-node-index]")&&s("mouseover",B)}function vH(B){var J;(J=B.target)!=null&&J.closest("[data-node-index]")&&s("mouseout",B)}function tC(B){s("mouseover",B)}function nC(B){s("mouseout",B)}const Uc=G(null),fr=G(!1),p1=G(null),yH=L(()=>!(T.domMode!=="minimal"||le.value||T.fade!==!1||f.value||fr.value||hs.value||an.value||Ti.value||Ai.value||Es.value||Object.keys(Tn.value).length!==0));let g1,bf=null,m4=0,Eg=0,Tg=0;const iC=["code_block","admonition","table","math_block","html_block","image","thematic_break"],kH=new Set(iC),sC=[".typewriter-cursor",".height-estimation-probes",...iC.map(B=>`[data-node-type="${B}"]`),"script","style"].join(",");function oC(B){if(!B||typeof B!="object")return!1;const J=B.type;return typeof J=="string"&&kH.has(J)}function Lg(B){var J,ue;if(!B||typeof B!="object")return 0;const ce=B,be=(ue=(J=ce.raw)!=null?J:ce.content)!=null?ue:ce.code;if(typeof be=="string")return be.length;const Le=ce.children;if(Array.isArray(Le))return Le.reduce((je,it)=>je+Lg(it),0);const Re=ce.items;return Array.isArray(Re)?Re.reduce((je,it)=>je+Lg(it),0):0}function Ng(){g1&&(clearTimeout(g1),g1=void 0)}function v4(){m4+=1,bf!=null&&(wi?.(bf),bf=null)}function m1(){v4(),gu(),Uc.value&&(Uc.value.style.visibility="hidden")}function bH(B){var J;if(B.nodeType!==Node.TEXT_NODE||!((J=B.textContent)!=null?J:"").trim())return!1;const ue=B.parentElement;return!!ue&&!ue.closest(sC)}function AH(B){let J=B.lastChild;for(;J;){if(bH(J))return J;if(J.nodeType===Node.ELEMENT_NODE){const ue=J;if(!ue.matches(sC)&&ue.lastChild){J=ue.lastChild;continue}}for(;J&&J!==B&&!J.previousSibling;)J=J.parentNode;if(!J||J===B)break;J=J.previousSibling}return null}function rC(){const B=Ig.value;for(let J=B.length-1;J>=0;J--){const ue=B[J];if(!ue||oC(ue.node)||!xg(ue.index))continue;const ce=On.get(ue.index);if(!ce)continue;const be=AH(ce);if(be)return be}return null}function gu(){p1.value&&(p1.value.classList.remove(_E),p1.value=null)}function Fg(){if(d.value!=="simple"||!Y||!fr.value||!R.value)return void gu();const B=rC(),J=B?(function(ue){var ce;const be=(ce=ue.parentElement)==null?void 0:ce.closest(".text-node");return be instanceof HTMLElement?be:ue.parentElement})(B):null;J!==p1.value&&(gu(),J&&(J.classList.add(_E),p1.value=J))}function Dg(){if(d.value!=="precise"||!Y||!fr.value||bf!=null)return;const B=m4,J=()=>{bf=null,B===m4&&(function(){var ue,ce;if(d.value!=="precise"||!(Y&&fr.value&&R.value&&Uc.value))return;const be=R.value,Le=Uc.value;Le.style.visibility="hidden";const Re=rC();if(!Re)return;let je=0,it=0,He=20,Je=!1;if(Re?.textContent){const nt=Re.textContent.length,Oe=document.createRange();Oe.setStart(Re,Math.max(0,nt-1)),Oe.setEnd(Re,nt);const Xe=typeof Oe.getClientRects=="function"?Oe.getClientRects():void 0,ft=(ce=Xe?.[Xe.length-1])!=null?ce:(ue=Re.parentElement)==null?void 0:ue.getBoundingClientRect();if(ft){const at=ct("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());je=ft.right-at.left+be.scrollLeft,it=ft.top-at.top+be.scrollTop,He=ft.height||He,Je=!0}Oe.detach()}Je&&(Le.style.transform=`translate(${Math.max(0,je)}px, ${Math.max(0,it)}px)`,Le.style.height=`${He}px`,Le.style.visibility="visible")})()};Li?bf=Li(J):J()}return qe([et,()=>i.content,()=>i.nodes,()=>T.typewriter,yt],()=>Bi(null,null,function*(){var B,J;if(!Y||le.value||!ne.value)return;if(yt.value)return fr.value=!1,Ng(),void m1();if((B=i.nodes)!=null&&B.length)return fr.value=!1,Ng(),m1(),Eg=((J=i.content)!=null?J:"").length,void(Tg=et.value.length);const ue=(function(){var je,it;return(je=i.nodes)!=null&&je.length?i.nodes.reduce((He,Je)=>He+Lg(Je),0):((it=i.content)!=null?it:"").length})(),ce=(function(){var je;return(je=i.nodes)!=null&&je.length?i.nodes.reduce((it,He)=>it+Lg(He),0):et.value.length})(),be=!oC(Dt.value[Dt.value.length-1]),Le=ue>Eg,Re=ce>Tg;if(!f.value||!be||!Le&&!Re)return f.value&&be||(fr.value=!1,m1()),Eg=ue,void(Tg=ce);Eg=ue,Tg=ce,fr.value=!0,d.value==="precise"&&Uc.value&&(Uc.value.style.visibility="hidden"),Ng(),yield kt(),d.value==="simple"?Fg():(gu(),Dg()),g1=setTimeout(()=>{g1=void 0,fr.value=!1},3e3)}),{flush:"post",immediate:!0}),qe(fr,B=>Bi(null,null,function*(){B?(yield kt(),d.value!=="simple"?(gu(),d.value==="precise"&&Dg()):Fg()):m1()}),{flush:"post"}),qe(d,()=>Bi(null,null,function*(){if(Y&&!le.value&&ne.value&&fr.value){if(yield kt(),d.value==="simple")return v4(),void Fg();gu(),d.value!=="precise"?m1():Dg()}}),{flush:"post"}),qe([()=>dt.value,()=>mo.start,()=>mo.end],()=>Bi(null,null,function*(){Y&&!le.value&&ne.value&&fr.value&&(yield kt(),d.value!=="simple"?(gu(),d.value==="precise"&&Dg()):Fg())}),{flush:"post"}),Gn(()=>{Ng(),v4(),gu(),sn.clear()}),(B,J)=>{const ue=WL("NodeRenderer",!0);return p(le)?(k(!0),E(Te,{key:0},ht(Ig.value,ce=>(k(),E(Te,{key:ce.vnodeKey},[ce.rendersCustomNode?(k(),de(xs(ce.component),Un({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onClick:g4,onMouseover:tC,onMouseout:nC,onCopy:J[0]||(J[0]=be=>o(be)),onHandleArtifactClick:J[1]||(J[1]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ce.hasSlotChildren?(k(),de(ue,Un({key:0,ref_for:!0},Pn.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(k(),de(ue,Un({key:1,ref_for:!0},Pn.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.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"])):(k(),de(xs(ce.component),Un({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onClick:g4,onMouseover:tC,onMouseout:nC,onCopy:J[2]||(J[2]=be=>o(be)),onHandleArtifactClick:J[3]||(J[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(k(),E("div",{key:1,ref_key:"containerRef",ref:R,class:Fe(["markstream-vue markdown-renderer",[{dark:T.isDark},{virtualized:an.value},{"virtual-scroll-coordinated":ts.value},{"stable-layout":Dj.value},{"typewriter-simple-cursor":fr.value&&d.value==="simple"}]]),"data-custom-id":T.customId,onClick:g4,onMouseover:mH,onMouseout:vH},[Fr.value||an.value?(k(),E(Te,{key:0},[Fr.value?(k(),de(hTe,{key:0,width:ho.value,"flow-root":an.value||ts.value,"paragraph-node":Oi.value,"list-item-node":co.value,"list-node":Wi.value,"heading-nodes":As.value,"set-paragraph-wrapper":$j,"set-list-item-wrapper":Bj,"set-list-wrapper":zj,"set-heading-wrapper":Pj},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):te("",!0),an.value?(k(),E("div",{key:1,class:"node-spacer",style:qt({height:`${B9.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],64)):te("",!0),yH.value?(k(!0),E(Te,{key:1},ht(Ig.value,ce=>(k(),E(Te,{key:ce.vnodeKey},[xg(ce.index)?(k(),de(xs(ce.component),Un({key:0,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.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=>o(be)),onHandleArtifactClick:J[7]||(J[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):te("",!0)],64))),128)):(k(!0),E(Te,{key:2},ht(Ig.value,ce=>(k(),E("div",{key:ce.vnodeKey,ref_for:!0,ref:be=>Sg(ce.index,be),class:"node-slot","data-node-index":ce.index,"data-node-type":ce.node.type},[xg(ce.index)?(k(),E("div",{key:0,ref_for:!0,ref:be=>(function(Le,Re){var je;Re||(function(nt){const Oe=`${R9()}-${nt}`;let Xe=!1;for(const ft of Array.from($r.keys())){const at=Jl.get(ft);(at?.index===nt||ft===Oe||ft.startsWith(`${Oe}-`))&&($r.delete(ft),Jl.delete(ft),Xe=!0)}Xe&&(cf(),Di("async-node"))})(Le),Ma.delete(Le),(function(nt){var Oe;const Xe=((Oe=zc.get(nt))!=null?Oe:0)+1;zc.set(nt,Xe)})(Le);const it=fu.get(Le);if(it){for(const nt of it)gg(nt);fu.delete(Le)}if((function(nt){const Oe=Cs.get(nt);Oe&&(ws?.unobserve(Oe),Do.delete(Oe),Cs.delete(nt))})(Le),!Re||!eo.value)return Yl.delete(Le),void zc.delete(Le);Yl.set(Le,Re);const He=()=>{_g(Le,Re)};queueMicrotask(He);const Je=(ws||typeof ResizeObserver>"u"||(ws=new ResizeObserver(nt=>{if(nt.length)for(const Oe of nt){const Xe=Do.get(Oe.target),ft=Cs.get(Xe??-1);Xe!=null&&ft&&_g(Xe,ft)}else Ta()})),ws);if(Je&&(Cs.set(Le,Re),Do.set(Re,Le),Je.observe(Re)),typeof window<"u"){const nt=((je=Dt.value[Le])==null?void 0:je.type)==="code_block"?[16,80,240,800]:yt.value?[80]:[];if(nt.length){const Oe=nt.map(Xe=>fA(Xe,He,"node-resize")).filter(Xe=>Xe!=null);Oe.length&&fu.set(Le,Oe)}}})(ce.index,be),class:"node-content"},[ce.isCodeBlock?ce.rendersCustomNode?(k(),de(xs(ce.component),Un({key:1,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:J[12]||(J[12]=be=>o(be)),onHandleArtifactClick:J[13]||(J[13]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ce.hasSlotChildren?(k(),de(ue,Un({key:0,ref_for:!0},Pn.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(k(),de(ue,Un({key:1,ref_for:!0},Pn.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.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"])):(k(),de(xs(ce.component),Un({key:2,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:J[14]||(J[14]=be=>o(be)),onHandleArtifactClick:J[15]||(J[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(k(),de(ls,{key:0,name:"fade",css:T.fade!==!1,appear:T.fade!==!1},{default:he(()=>[ce.rendersCustomNode?(k(),de(xs(ce.component),Un({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:J[8]||(J[8]=be=>o(be)),onHandleArtifactClick:J[9]||(J[9]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ce.hasSlotChildren?(k(),de(ue,Un({key:0,ref_for:!0},Pn.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(k(),de(ue,Un({key:1,ref_for:!0},Pn.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.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"])):(k(),de(xs(ce.component),Un({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:J[10]||(J[10]=be=>o(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)):(k(),E("div",{key:1,class:"node-placeholder",style:qt({height:`${Bn(ce.index)}px`})},null,4))],8,mTe))),128)),fr.value&&d.value==="precise"?(k(),E("span",{key:3,ref_key:"typewriterCursorRef",ref:Uc,class:"typewriter-cursor","aria-hidden":"true"},null,512)):te("",!0),an.value?(k(),E("div",{key:4,class:"node-spacer",style:qt({height:`${z9.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],42,gTe))}}})),[["__scopeId","data-v-a9489508"]]),Mr=NO;Mr.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Mr.__name,Mr.name].filter(n=>!!n));for(const n of t)e.component(n,NO)};const T7=Object.freeze(Object.defineProperty({__proto__:null,default:Mr},Symbol.toStringTag,{value:"Module"})),vTe={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"},yTe={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"},kTe={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"},bTe={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"},ATe={class:"admonition-title"},CTe=["aria-expanded","aria-controls"],wTe=["id"],b2=di(Qe({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const i=e,s=t,o=L(()=>{if(i.node.title&&i.node.title.trim().length)return i.node.title;const u=i.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=G(!!i.node.collapsible&&!((n=i.node.open)==null||n));function l(){i.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(k(),E("div",{class:Fe(["admonition",[`admonition-${i.node.kind}`]])},[w("div",{id:a,class:"admonition-legend"},[i.node.kind==="note"||i.node.kind==="info"?(k(),E("svg",vTe,[...c[1]||(c[1]=[w("circle",{cx:"12",cy:"12",r:"10"},null,-1),w("path",{d:"M12 16v-4"},null,-1),w("path",{d:"M12 8h.01"},null,-1)])])):i.node.kind==="tip"?(k(),E("svg",yTe,[...c[2]||(c[2]=[w("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),w("path",{d:"M9 18h6"},null,-1),w("path",{d:"M10 22h4"},null,-1)])])):i.node.kind==="warning"||i.node.kind==="caution"?(k(),E("svg",kTe,[...c[3]||(c[3]=[w("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),w("path",{d:"M12 9v4"},null,-1),w("path",{d:"M12 17h.01"},null,-1)])])):i.node.kind==="danger"||i.node.kind==="error"?(k(),E("svg",bTe,[...c[4]||(c[4]=[w("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),w("path",{d:"M12 8v4"},null,-1),w("path",{d:"M12 16h.01"},null,-1)])])):te("",!0),w("span",ATe,F(o.value),1),i.node.collapsible?(k(),E("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(k(),E("svg",{style:qt({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]=[w("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,CTe)):te("",!0)]),$n(w("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[K(p(Mr),{"index-key":`admonition-${e.indexKey}`,nodes:i.node.children,"custom-id":i.customId,typewriter:i.typewriter,fade:i.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,wTe),[[Qi,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);b2.install=e=>{e.component(b2.__name,b2)};const D8=()=>vs(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let Lm=null,Nm=D8,Fm=null,IE=!1,ME=!1;function Rat(){return Bi(this,null,function*(){if(Lm)return Lm;const e=Nm;return e?e===D8&&IE?null:Fm||(Fm=Bi(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===D8)return e===Nm&&(IE=!0,(function(i){ME||(ME=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',i))})(n)),null;throw n}finally{e===Nm&&(Fm=null)}return e!==Nm?null:t?(Lm=(function(n){var i;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=(i=n.default)!=null?i:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),Lm):null}),Fm):null})}let Dm=null,FO=null,$m=null;function Oat(){return typeof FO=="function"}function Pat(){return Bi(this,null,function*(){if(Dm)return Dm;const e=FO;return e?$m||($m=Bi(null,null,function*(){const t=yield e(),n=(function(i){var s,o,r;if(!i)return null;const l=(s=i.default)!=null?s:i,a=typeof l=="function"&&typeof((o=l.prototype)==null?void 0:o.render)=="function"?l:(r=i.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(Dm=n,Dm):null}).finally(()=>{$m=null}),$m):null})}const jat=Symbol("markstreamLanguageIconResolver"),EE=document.createElement("i");function xTe(e){const t="&"+e+";";EE.innerHTML=t;const n=EE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wa(e,t,n,i){const s=e.length;let o=0,r;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)r=Array.from(i),r.unshift(t,n),e.splice(...r);else for(n&&e.splice(t,n);o0?(wa(e,e.length,0,t),e):t}const TE={}.hasOwnProperty;function STe(e){const t={};let n=-1;for(;++n-1&&e.test(String.fromCharCode(n))}}function zi(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(a){return ui(a)?(e.enter(n),l(a)):t(a)}function l(a){return ui(a)&&o++r))return;const _=t.events.length;let I=_,M,$;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(M){$=t.events[I][1].end;break}M=!0}for(A(i),S=_;SC;){const x=n[v];t.containerState=x[1],x[0].exit.call(t,e)}n.length=C}function b(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function zTe(e,t,n){return zi(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function NE(e){if(e===null||Er(e)||NTe(e))return 1;if(LTe(e))return 2}function N7(e,t,n){const i=[];let s=-1;for(;++s1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[i][1].end},f={...e[n][1].start};FE(d,-a),FE(f,a),r={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:a>1?"strong":"emphasis",start:{...r.start},end:{...l.end}},e[i][1].end={...r.start},e[n][1].start={...l.end},u=[],e[i][1].end.offset-e[i][1].start.offset&&(u=fl(u,[["enter",e[i][1],t],["exit",e[i][1],t]])),u=fl(u,[["enter",s,t],["enter",r,t],["exit",r,t],["enter",o,t]]),u=fl(u,N7(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),u=fl(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=fl(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,wa(e,i-1,n-i+3,u),n=i+u.length-c-2;break}}for(n=-1;++n0&&ui(S)?zi(e,b,"linePrefix",o+1)(S):b(S)}function b(S){return S===null||In(S)?e.check(DE,m,v)(S):(e.enter("codeFlowValue"),C(S))}function C(S){return S===null||In(S)?(e.exit("codeFlowValue"),b(S)):(e.consume(S),C)}function v(S){return e.exit("codeFenced"),t(S)}function x(S,_,I){let M=0;return $;function $(P){return S.enter("lineEnding"),S.consume(P),S.exit("lineEnding"),D}function D(P){return S.enter("codeFencedFence"),ui(P)?zi(S,T,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):T(P)}function T(P){return P===l?(S.enter("codeFencedFenceSequence"),N(P)):I(P)}function N(P){return P===l?(M++,S.consume(P),N):M>=r?(S.exit("codeFencedFenceSequence"),ui(P)?zi(S,O,"whitespace")(P):O(P)):I(P)}function O(P){return P===null||In(P)?(S.exit("codeFencedFence"),_(P)):I(P)}}}function GTe(e,t,n){const i=this;return s;function s(r){return r===null?n(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),o)}function o(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}const lk={name:"codeIndented",tokenize:YTe},QTe={partial:!0,tokenize:JTe};function YTe(e,t,n){const i=this;return s;function s(u){return e.enter("codeIndented"),zi(e,o,"linePrefix",5)(u)}function o(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?r(u):n(u)}function r(u){return u===null?a(u):In(u)?e.attempt(QTe,r,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||In(u)?(e.exit("codeFlowValue"),r(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function JTe(e,t,n){const i=this;return s;function s(r){return i.parser.lazy[i.now().line]?n(r):In(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),s):zi(e,o,"linePrefix",5)(r)}function o(r){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(r):In(r)?s(r):n(r)}}const XTe={name:"codeText",previous:tLe,resolve:eLe,tokenize:nLe};function eLe(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&F1(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),F1(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),F1(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}function RO(e,t,n,i,s,o,r,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(A){return A===60?(e.enter(i),e.enter(s),e.enter(o),e.consume(A),e.exit(o),f):A===null||A===32||A===41||$8(A)?n(A):(e.enter(i),e.enter(r),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(A))}function f(A){return A===62?(e.enter(o),e.consume(A),e.exit(o),e.exit(s),e.exit(i),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===62?(e.exit("chunkString"),e.exit(l),f(A)):A===null||A===60||In(A)?n(A):(e.consume(A),A===92?g:h)}function g(A){return A===60||A===62||A===92?(e.consume(A),h):h(A)}function m(A){return!c&&(A===null||A===41||Er(A))?(e.exit("chunkString"),e.exit(l),e.exit(r),e.exit(i),t(A)):c999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in r.parser.constructs?n(h):h===93?(e.exit(o),e.enter(s),e.consume(h),e.exit(s),e.exit(i),t):In(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||In(h)||l++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!ui(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function PO(e,t,n,i,s,o){let r;return l;function l(f){return f===34||f===39||f===40?(e.enter(i),e.enter(s),e.consume(f),e.exit(s),r=f===40?41:f,a):n(f)}function a(f){return f===r?(e.enter(s),e.consume(f),e.exit(s),e.exit(i),t):(e.enter(o),u(f))}function u(f){return f===r?(e.exit(o),a(r)):f===null?n(f):In(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),zi(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===r||f===null||In(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===r||f===92?(e.consume(f),c):c(f)}}function Bp(e,t){let n;return i;function i(s){return In(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):ui(s)?zi(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const cLe={name:"definition",tokenize:fLe},dLe={partial:!0,tokenize:hLe};function fLe(e,t,n){const i=this;let s;return o;function o(h){return e.enter("definition"),r(h)}function r(h){return OO.call(i,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return s=L7(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return Er(h)?Bp(e,u)(h):u(h)}function u(h){return RO(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(dLe,d,d)(h)}function d(h){return ui(h)?zi(e,f,"whitespace")(h):f(h)}function f(h){return h===null||In(h)?(e.exit("definition"),i.parser.defined.push(s),t(h)):n(h)}}function hLe(e,t,n){return i;function i(l){return Er(l)?Bp(e,s)(l):n(l)}function s(l){return PO(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return ui(l)?zi(e,r,"whitespace")(l):r(l)}function r(l){return l===null||In(l)?t(l):n(l)}}const pLe={name:"hardBreakEscape",tokenize:gLe};function gLe(e,t,n){return i;function i(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return In(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const mLe={name:"headingAtx",resolve:vLe,tokenize:yLe};function vLe(e,t){let n=e.length-2,i=3,s,o;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},o={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},wa(e,i,n-i+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function yLe(e,t,n){let i=0;return s;function s(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),r(c)}function r(c){return c===35&&i++<6?(e.consume(c),r):c===null||Er(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||In(c)?(e.exit("atxHeading"),t(c)):ui(c)?zi(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||Er(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const kLe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],BE=["pre","script","style","textarea"],bLe={concrete:!0,name:"htmlFlow",resolveTo:wLe,tokenize:xLe},ALe={partial:!0,tokenize:_Le},CLe={partial:!0,tokenize:SLe};function wLe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xLe(e,t,n){const i=this;let s,o,r,l,a;return u;function u(V){return c(V)}function c(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),d}function d(V){return V===33?(e.consume(V),f):V===47?(e.consume(V),o=!0,m):V===63?(e.consume(V),s=3,i.interrupt?t:z):da(V)?(e.consume(V),r=String.fromCharCode(V),y):n(V)}function f(V){return V===45?(e.consume(V),s=2,h):V===91?(e.consume(V),s=5,l=0,g):da(V)?(e.consume(V),s=4,i.interrupt?t:z):n(V)}function h(V){return V===45?(e.consume(V),i.interrupt?t:z):n(V)}function g(V){const ie="CDATA[";return V===ie.charCodeAt(l++)?(e.consume(V),l===ie.length?i.interrupt?t:T:g):n(V)}function m(V){return da(V)?(e.consume(V),r=String.fromCharCode(V),y):n(V)}function y(V){if(V===null||V===47||V===62||Er(V)){const ie=V===47,se=r.toLowerCase();return!ie&&!o&&BE.includes(se)?(s=1,i.interrupt?t(V):T(V)):kLe.includes(r.toLowerCase())?(s=6,ie?(e.consume(V),A):i.interrupt?t(V):T(V)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(V):o?b(V):C(V))}return V===45||zl(V)?(e.consume(V),r+=String.fromCharCode(V),y):n(V)}function A(V){return V===62?(e.consume(V),i.interrupt?t:T):n(V)}function b(V){return ui(V)?(e.consume(V),b):$(V)}function C(V){return V===47?(e.consume(V),$):V===58||V===95||da(V)?(e.consume(V),v):ui(V)?(e.consume(V),C):$(V)}function v(V){return V===45||V===46||V===58||V===95||zl(V)?(e.consume(V),v):x(V)}function x(V){return V===61?(e.consume(V),S):ui(V)?(e.consume(V),x):C(V)}function S(V){return V===null||V===60||V===61||V===62||V===96?n(V):V===34||V===39?(e.consume(V),a=V,_):ui(V)?(e.consume(V),S):I(V)}function _(V){return V===a?(e.consume(V),a=null,M):V===null||In(V)?n(V):(e.consume(V),_)}function I(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||Er(V)?x(V):(e.consume(V),I)}function M(V){return V===47||V===62||ui(V)?C(V):n(V)}function $(V){return V===62?(e.consume(V),D):n(V)}function D(V){return V===null||In(V)?T(V):ui(V)?(e.consume(V),D):n(V)}function T(V){return V===45&&s===2?(e.consume(V),R):V===60&&s===1?(e.consume(V),q):V===62&&s===4?(e.consume(V),H):V===63&&s===3?(e.consume(V),z):V===93&&s===5?(e.consume(V),W):In(V)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ALe,ee,N)(V)):V===null||In(V)?(e.exit("htmlFlowData"),N(V)):(e.consume(V),T)}function N(V){return e.check(CLe,O,ee)(V)}function O(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),P}function P(V){return V===null||In(V)?N(V):(e.enter("htmlFlowData"),T(V))}function R(V){return V===45?(e.consume(V),z):T(V)}function q(V){return V===47?(e.consume(V),r="",j):T(V)}function j(V){if(V===62){const ie=r.toLowerCase();return BE.includes(ie)?(e.consume(V),H):T(V)}return da(V)&&r.length<8?(e.consume(V),r+=String.fromCharCode(V),j):T(V)}function W(V){return V===93?(e.consume(V),z):T(V)}function z(V){return V===62?(e.consume(V),H):V===45&&s===2?(e.consume(V),z):T(V)}function H(V){return V===null||In(V)?(e.exit("htmlFlowData"),ee(V)):(e.consume(V),H)}function ee(V){return e.exit("htmlFlow"),t(V)}}function SLe(e,t,n){const i=this;return s;function s(r){return In(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),o):n(r)}function o(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}function _Le(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(g9,t,n)}}const ILe={name:"htmlText",tokenize:MLe};function MLe(e,t,n){const i=this;let s,o,r;return l;function l(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),a}function a(z){return z===33?(e.consume(z),u):z===47?(e.consume(z),x):z===63?(e.consume(z),C):da(z)?(e.consume(z),I):n(z)}function u(z){return z===45?(e.consume(z),c):z===91?(e.consume(z),o=0,g):da(z)?(e.consume(z),b):n(z)}function c(z){return z===45?(e.consume(z),h):n(z)}function d(z){return z===null?n(z):z===45?(e.consume(z),f):In(z)?(r=d,q(z)):(e.consume(z),d)}function f(z){return z===45?(e.consume(z),h):d(z)}function h(z){return z===62?R(z):z===45?f(z):d(z)}function g(z){const H="CDATA[";return z===H.charCodeAt(o++)?(e.consume(z),o===H.length?m:g):n(z)}function m(z){return z===null?n(z):z===93?(e.consume(z),y):In(z)?(r=m,q(z)):(e.consume(z),m)}function y(z){return z===93?(e.consume(z),A):m(z)}function A(z){return z===62?R(z):z===93?(e.consume(z),A):m(z)}function b(z){return z===null||z===62?R(z):In(z)?(r=b,q(z)):(e.consume(z),b)}function C(z){return z===null?n(z):z===63?(e.consume(z),v):In(z)?(r=C,q(z)):(e.consume(z),C)}function v(z){return z===62?R(z):C(z)}function x(z){return da(z)?(e.consume(z),S):n(z)}function S(z){return z===45||zl(z)?(e.consume(z),S):_(z)}function _(z){return In(z)?(r=_,q(z)):ui(z)?(e.consume(z),_):R(z)}function I(z){return z===45||zl(z)?(e.consume(z),I):z===47||z===62||Er(z)?M(z):n(z)}function M(z){return z===47?(e.consume(z),R):z===58||z===95||da(z)?(e.consume(z),$):In(z)?(r=M,q(z)):ui(z)?(e.consume(z),M):R(z)}function $(z){return z===45||z===46||z===58||z===95||zl(z)?(e.consume(z),$):D(z)}function D(z){return z===61?(e.consume(z),T):In(z)?(r=D,q(z)):ui(z)?(e.consume(z),D):M(z)}function T(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),s=z,N):In(z)?(r=T,q(z)):ui(z)?(e.consume(z),T):(e.consume(z),O)}function N(z){return z===s?(e.consume(z),s=void 0,P):z===null?n(z):In(z)?(r=N,q(z)):(e.consume(z),N)}function O(z){return z===null||z===34||z===39||z===60||z===61||z===96?n(z):z===47||z===62||Er(z)?M(z):(e.consume(z),O)}function P(z){return z===47||z===62||Er(z)?M(z):n(z)}function R(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),t):n(z)}function q(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),j}function j(z){return ui(z)?zi(e,W,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):W(z)}function W(z){return e.enter("htmlTextData"),r(z)}}const F7={name:"labelEnd",resolveAll:NLe,resolveTo:FLe,tokenize:DLe},ELe={tokenize:$Le},TLe={tokenize:BLe},LLe={tokenize:zLe};function NLe(e){let t=-1;const n=[];for(;++t=3&&(u===null||In(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===s?(e.consume(u),i++,a):(e.exit("thematicBreakSequence"),ui(u)?zi(e,l,"whitespace")(u):l(u))}}const gr={continuation:{tokenize:VLe},exit:GLe,name:"list",tokenize:KLe},qLe={partial:!0,tokenize:QLe},ULe={partial:!0,tokenize:ZLe};function KLe(e,t,n){const i=this,s=i.events[i.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,r=0;return l;function l(h){const g=i.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!i.containerState.marker||h===i.containerState.marker:B8(h)){if(i.containerState.type||(i.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(A2,n,u)(h):u(h);if(!i.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return B8(h)&&++r<10?(e.consume(h),a):(!i.interrupt||r<2)&&(i.containerState.marker?h===i.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||h,e.check(g9,i.interrupt?n:c,e.attempt(qLe,f,d))}function c(h){return i.containerState.initialBlankLine=!0,o++,f(h)}function d(h){return ui(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function VLe(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(g9,s,o);function s(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,zi(e,t,"listItemIndent",i.containerState.size+1)(l)}function o(l){return i.containerState.furtherBlankLines||!ui(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(ULe,t,r)(l))}function r(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,zi(e,e.attempt(gr,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function ZLe(e,t,n){const i=this;return zi(e,s,"listItemIndent",i.containerState.size+1);function s(o){const r=i.events[i.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(o):n(o)}}function GLe(e){e.exit(this.containerState.type)}function QLe(e,t,n){const i=this;return zi(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const r=i.events[i.events.length-1];return!ui(o)&&r&&r[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const zE={name:"setextUnderline",resolveTo:YLe,tokenize:JLe};function YLe(e,t){let n=e.length,i,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const r={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",r,t]),e.splice(o+1,0,["exit",e[i][1],t]),e[i][1].end={...e[o][1].end}):e[i][1]=r,e.push(["exit",r,t]),e}function JLe(e,t,n){const i=this;let s;return o;function o(u){let c=i.events.length,d;for(;c--;)if(i.events[c][1].type!=="lineEnding"&&i.events[c][1].type!=="linePrefix"&&i.events[c][1].type!=="content"){d=i.events[c][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),s=u,r(u)):n(u)}function r(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===s?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),ui(u)?zi(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||In(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const XLe={tokenize:eNe};function eNe(e){const t=this,n=e.attempt(g9,i,e.attempt(this.parser.constructs.flowInitial,s,zi(e,e.attempt(this.parser.constructs.flow,s,e.attempt(oLe,s)),"linePrefix")));return n;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const tNe={resolveAll:HO()},nNe=jO("string"),iNe=jO("text");function jO(e){return{resolveAll:HO(e==="text"?sNe:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],o=n.attempt(s,r,l);return r;function r(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=s[c];let f=-1;if(d)for(;++f-1){const l=r[0];typeof l=="string"?r[0]=l.slice(i):r.shift()}o>0&&r.push(e[s].slice(0,o))}return r}function vNe(e,t){let n=-1;const i=[];let s;for(;++n>1}};ko.from=function(e){if(e instanceof ko)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ko(t)};function WO(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let s=e.child(i),o=t.child(i);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){let r=s.text,l=o.text,a=0;for(;r[a]==l[a];a++)n++;return a&&a0&&f>0&&u[d-1]==c[f-1];)d--,f--,n--,i--;return d&&f&&d=56320&&e<57344}function KO(e){return e>=55296&&e<56320}class Ln{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;it&&i(a,s+l,o||null,r)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),i,s+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,s){let o="",r=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&i&&(r?r=!1:o+=i),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(s[s.length-1]=n.withText(n.text+i.text),o=1);ot)for(let o=0,r=0;rt&&((rn)&&(l.isText?l=l.cut(Math.max(0,t-r),Math.min(l.text.length,n-r)):l=l.cut(Math.max(0,t-r-1),Math.min(l.content.size,n-r-1))),i.push(l),s+=l.nodeSize),r=a}return new Ln(i,s)}cutByIndex(t,n){return t==n?Ln.empty:t==0&&n==this.content.length?this:new Ln(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return s[t]=n,new Ln(s,o)}addToStart(t){return new Ln([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Ln(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t?Bm(n+1,o):Bm(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Ln.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return Ln.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Ln.empty;let n,i=0;for(let s=0;sthis.type.rank&&(n||(n=t.slice(0,s)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;ni.type.rank-s.type.rank),n}}Ri.none=[];class k0 extends Error{}class Hn{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=ZO(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new Hn(i,this.openStart,this.openEnd)}removeBetween(t,n){return new Hn(VO(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Hn.empty;let i=n.openStart||0,s=n.openEnd||0;if(typeof i!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Hn(Ln.fromJSON(t,n.content),i,s)}static maxOpen(t,n=!0){let i=0,s=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new Hn(t,i,s)}}Hn.empty=new Hn(Ln.empty,0,0);function VO(e,t,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i),{index:r,offset:l}=e.findIndex(n);if(s==t||o.isText){if(l!=n&&!e.child(r).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(VO(o.content,t-s-1,n-s-1)))}function ZO(e,t,n,i,s,o){let{index:r,offset:l}=e.findIndex(t),a=e.maybeChild(r);if(l==t||a.isText)return o&&i<=0&&s<=0&&!o.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=ZO(a.content,t-l-1,n,r==0?i-1:0,r==e.childCount-1?s-1:0,a);return u&&e.replaceChild(r,a.copy(u))}function ANe(e,t,n){if(n.openStart>e.depth)throw new k0("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new k0("Inconsistent open depths");return GO(e,t,n,0)}function GO(e,t,n,i){let s=e.index(i),o=e.node(i);if(s==t.index(i)&&i=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function zp(e,t,n,i){let s=(t||e).node(n),o=0,r=t?t.index(n):s.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Dd(e.nodeAfter,i),o++));for(let l=o;ls&&R8(e,t,s+1),r=i.depth>s&&R8(n,i,s+1),l=[];return zp(null,e,s,l),o&&r&&t.index(s)==n.index(s)?(QO(o,r),Dd($d(o,YO(e,t,n,i,s+1)),l)):(o&&Dd($d(o,ey(e,t,s+1)),l),zp(t,n,s,l),r&&Dd($d(r,ey(n,i,s+1)),l)),zp(i,null,s,l),new Ln(l)}function ey(e,t,n){let i=[];if(zp(null,e,n,i),e.depth>n){let s=R8(e,t,n+1);Dd($d(s,ey(e,t,n+1)),i)}return zp(t,null,n,i),new Ln(i)}function CNe(e,t){let n=t.depth-e.openStart,s=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)s=t.node(o).copy(Ln.from(s));return{start:s.resolveNoCache(e.openStart+n),end:s.resolveNoCache(s.content.size-e.openEnd-n)}}class b0{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],s=t.child(n);return i?t.child(n).cut(i):s}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new SNe(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],s=0,o=n;for(let r=t;;){let{index:l,offset:a}=r.content.findIndex(o),u=o-a;if(i.push(r,l,s+a),!u||(r=r.child(l),r.isText))break;o=u-1,s+=a+1}return new b0(n,i,o)}static resolveCached(t,n){let i=OE.get(t);if(i)for(let o=0;ot&&this.nodesBetween(t,n,o=>(i.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),JO(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=Ln.empty,s=0,o=i.childCount){let r=this.contentMatchAt(t).matchFragment(i,s,o),l=r&&r.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=s;an.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let s=Ln.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};wh.prototype.text=void 0;class ty extends wh{constructor(t,n,i,s){if(super(t,n,null,s),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):JO(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new ty(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new ty(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function JO(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Gd{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new INe(t,n);if(i.next==null)return Gd.empty;let s=XO(i);i.next&&i.err("Unexpected trailing text");let o=DNe(FNe(s));return $Ne(o,i),o}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let s=0;s{let o=s+(i.validEnd?"*":" ")+" ";for(let r=0;r"+t.indexOf(i.next[r].next);return o}).join(` -`)}}Gd.empty=new Gd(!0);class INe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function XO(e){let t=[];do t.push(MNe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function MNe(e){let t=[];do t.push(ENe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function ENe(e){let t=NNe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=TNe(e,t);else break;return t}function PE(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function TNe(e,t){let n=PE(e),i=n;return e.eat(",")&&(e.next!="}"?i=PE(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function LNe(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let s=[];for(let o in n){let r=n[o];r.isInGroup(t)&&s.push(r)}return s.length==0&&e.err("No node type or group '"+t+"' found"),s}function NNe(e){if(e.eat("(")){let t=XO(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=LNe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function FNe(e){let t=[[]];return s(o(e,0),n()),t;function n(){return t.push([])-1}function i(r,l,a){let u={term:a,to:l};return t[r].push(u),u}function s(r,l){r.forEach(a=>a.to=l)}function o(r,l){if(r.type=="choice")return r.exprs.reduce((a,u)=>a.concat(o(u,l)),[]);if(r.type=="seq")for(let a=0;;a++){let u=o(r.exprs[a],l);if(a==r.exprs.length-1)return u;s(u,l=n())}else if(r.type=="star"){let a=n();return i(l,a),s(o(r.expr,a),a),[i(a)]}else if(r.type=="plus"){let a=n();return s(o(r.expr,l),a),s(o(r.expr,a),a),[i(a)]}else{if(r.type=="opt")return[i(l)].concat(o(r.expr,l));if(r.type=="range"){let a=l;for(let u=0;u{e[r].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c{u||s.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new Gd(i.indexOf(e.length-1)>-1);for(let r=0;r-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:nP(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new wh(this,this.computeAttrs(t),Ln.from(n),Ri.setFrom(i))}createChecked(t=null,n,i){return n=Ln.from(n),this.checkContent(n),new wh(this,this.computeAttrs(t),n,Ri.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=Ln.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(Ln.empty,!0);return o?new wh(this,t,n.append(o),Ri.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;ni[o]=new oP(o,n,r));let s=n.spec.topNode||"doc";if(!i[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function BNe(e,t,n){let i=n.split("|");return s=>{let o=s===null?"null":typeof s;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${o}`)}}class zNe{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?BNe(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class D7{constructor(t,n,i,s){this.name=t,this.rank=n,this.schema=i,this.spec=s,this.attrs=sP(t,s.attrs),this.excluded=null;let o=tP(this.attrs);this.instance=o?new Ri(this,o):null}create(t=null){return!t&&this.instance?this.instance:new Ri(this,nP(this.attrs,t))}static compile(t,n){let i=Object.create(null),s=0;return t.forEach((o,r)=>i[o]=new D7(o,s++,n,r)),i}removeFromSet(t){for(var n=0;n-1}}class RNe{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in t)n[s]=t[s];n.nodes=ko.from(t.nodes),n.marks=ko.from(t.marks||{}),this.nodes=HE.compile(this.spec.nodes,this),this.marks=D7.compile(this.spec.marks,this);let i=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],r=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=i[r]||(i[r]=Gd.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?WE(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:WE(this,r.split(" "))}this.nodeFromJSON=s=>wh.fromJSON(this,s),this.markFromJSON=s=>Ri.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,s){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof HE){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,s)}text(t,n){let i=this.nodes.text;return new ty(i,i.defaultAttrs,t,Ri.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function WE(e,t){let n=[];for(let i=0;i-1)&&n.push(r=a)}if(!r)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}function ONe(e){return e.tag!=null}function PNe(e){return e.style!=null}let jNe=class P8{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(s=>{if(ONe(s))this.tags.push(s);else if(PNe(s)){let o=/[^=]*/.exec(s.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let o=t.nodes[s.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let i=new UE(this,n,!1);return i.addAll(t,Ri.none,n.from,n.to),i.finish()}parseSlice(t,n={}){let i=new UE(this,n,!0);return i.addAll(t,Ri.none,n.from,n.to),Hn.maxOpen(i.finish())}matchTag(t,n,i){for(let s=i?this.tags.indexOf(i)+1:0;st.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(r.getAttrs){let a=r.getAttrs(n);if(a===!1)continue;r.attrs=a||void 0}return r}}}static schemaRules(t){let n=[];function i(s){let o=s.priority==null?50:s.priority,r=0;for(;r{i(r=KE(r)),r.mark||r.ignore||r.clearMark||(r.mark=s)})}for(let s in t.nodes){let o=t.nodes[s].spec.parseDOM;o&&o.forEach(r=>{i(r=KE(r)),r.node||r.ignore||r.mark||(r.node=s)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new P8(t,P8.schemaRules(t)))}};const rP={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},HNe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},lP={ol:!0,ul:!0},A0=1,j8=2,Rp=4;function qE(e,t,n){return t!=null?(t?A0:0)|(t==="full"?j8:0):e&&e.whitespace=="pre"?A0|j8:n&~Rp}class zm{constructor(t,n,i,s,o,r){this.type=t,this.attrs=n,this.marks=i,this.solid=s,this.options=r,this.content=[],this.activeMarks=Ri.none,this.match=o||(r&Rp?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ln.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,s;return(s=i.findWrapping(t.type))?(this.match=i,s):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&A0)){let i=this.content[this.content.length-1],s;if(i&&i.isText&&(s=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-s[0].length))}}let n=Ln.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Ln.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!rP.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class UE{constructor(t,n,i){this.parser=t,this.options=n,this.isOpen=i,this.open=0,this.localPreserveWS=!1;let s=n.topNode,o,r=qE(null,n.preserveWhitespace,0)|(i?Rp:0);s?o=new zm(s.type,s.attrs,Ri.none,!0,n.topMatch||s.type.contentMatch,r):i?o=new zm(null,null,Ri.none,!0,null,r):o=new zm(t.schema.topNodeType,null,Ri.none,!0,null,r),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let i=t.nodeValue,s=this.top,o=s.options&j8?"full":this.localPreserveWS||(s.options&A0)>0,{schema:r}=this.parser;if(o==="full"||s.inlineContext(t)||/[^ \t\r\n\u000c]/.test(i)){if(o)if(o==="full")i=i.replace(/\r\n?/g,` -`);else if(r.linebreakReplacement&&/[\r\n]/.test(i)&&this.top.findWrapping(r.linebreakReplacement.create())){let l=i.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,i,s){let o,r;if(n.node)if(r=this.parser.schema.nodes[n.node],r.isLeaf)this.insertNode(r.create(n.attrs),i,t.nodeName=="BR")||this.leafFallback(t,i);else{let a=this.enter(r,n.attrs||null,i,n.preserveWhitespace);a&&(o=!0,i=a)}else{let a=this.parser.schema.marks[n.mark];i=i.concat(a.create(n.attrs))}let l=this.top;if(r&&r.isLeaf)this.findInside(t);else if(s)this.addElement(t,i,s);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,i,!1));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,i),this.findAround(t,a,!1)}o&&this.sync(l)&&this.open--}addAll(t,n,i,s){let o=i||0;for(let r=i?t.childNodes[i]:t.firstChild,l=s==null?null:t.childNodes[s];r!=l;r=r.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(r,n);this.findAtPoint(t,o)}findPlace(t,n,i){let s,o;for(let r=this.open,l=0;r>=0;r--){let a=this.nodes[r],u=a.findWrapping(t);if(u&&(!s||s.length>u.length+l)&&(s=u,o=a,!u.length))break;if(a.solid){if(i)break;l+=2}}if(!s)return null;this.sync(o);for(let r=0;r(r.type?r.type.allowsMarkType(u.type):VE(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new zm(t,n,a,s,null,l)),this.open++,i}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=A0)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let s=i.length-1;s>=0;s--)t+=i[s].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let i=0;i-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),i=this.options.context,s=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(s?0:1),r=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=o;a--)if(r(l-1,a))return!0;return!1}else{let c=a>0||a==0&&s?this.nodes[a].type:i&&a>=o?i.node(a-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return r(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function WNe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let i=t.nodeType==1?t.nodeName.toLowerCase():null;i&&lP.hasOwnProperty(i)&&n?(n.appendChild(t),t=n):i=="li"?n=t:i&&(n=null)}}function qNe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function KE(e){let t={};for(let n in e)t[n]=e[n];return t}function VE(e,t){let n=t.schema.nodes;for(let i in n){let s=n[i];if(!s.allowsMarkType(e))continue;let o=[],r=l=>{o.push(l);for(let a=0;a{if(o.length||r.marks.length){let l=0,a=0;for(;l=0;s--){let o=this.serializeMark(t.marks[s],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,n,i={}){let s=this.marks[t.type.name];return s&&C2(Rm(i),s(t,n),null,t.attrs)}static renderSpec(t,n,i=null,s){return typeof n=="string"?{dom:t.createTextNode(n)}:C2(t,n,i,s)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new m9(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=ZE(t.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(t){return ZE(t.marks)}}function ZE(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function Rm(e){return e.document||window.document}const GE=new WeakMap;function UNe(e){let t=GE.get(e);return t===void 0&&GE.set(e,t=KNe(e)),t}function KNe(e){let t=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")t||(t=[]),t.push(i);else for(let s=0;s-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let r=s.indexOf(" ");r>0&&(n=s.slice(0,r),s=s.slice(r+1));let l,a=n?e.createElementNS(n,s):e.createElement(s),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(e.createTextNode(f));else{let{dom:h,contentDOM:g}=C2(e,f,n,i);if(a.appendChild(h),g){if(l)throw new RangeError("Multiple content holes");l=g}}}return{dom:a,contentDOM:l}}const aP=65535,uP=Math.pow(2,16);function VNe(e,t){return e+t*uP}function QE(e){return e&aP}function ZNe(e){return(e-(e&aP))/uP}const cP=1,dP=2,w2=4,fP=8;class YE{constructor(t,n,i){this.pos=t,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&fP)>0}get deletedBefore(){return(this.delInfo&(cP|w2))>0}get deletedAfter(){return(this.delInfo&(dP|w2))>0}get deletedAcross(){return(this.delInfo&w2)>0}}class Pr{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Pr.empty)return Pr.empty}recover(t){let n=0,i=QE(t);if(!this.inverted)for(let s=0;st)break;let u=this.ranges[l+o],c=this.ranges[l+r],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,h=a+s+(f<0?0:c);if(i)return h;let g=t==(n<0?a:d)?null:VNe(l/3,t-a),m=t==a?dP:t==d?cP:w2;return(n<0?t!=a:t!=d)&&(m|=fP),new YE(h,m,g)}s+=c-u}return i?t+s:new YE(t+s,0,null)}touches(t,n){let i=0,s=QE(n),o=this.inverted?2:1,r=this.inverted?1:2;for(let l=0;lt)break;let u=this.ranges[l+o],c=a+u;if(t<=c&&l==s*3)return!0;i+=this.ranges[l+r]-u}return!1}forEach(t){let n=this.inverted?2:1,i=this.inverted?1:2;for(let s=0,o=0;s!r.isAtom||!l.type.allowsMarkType(this.mark.type)?r:r.mark(this.mark.addToSet(r.marks)),s),n.openStart,n.openEnd);return Ps.fromReplace(t,this.from,this.to,o)}invert(){return new Cd(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Ad(n.pos,i.pos,this.mark)}merge(t){return t instanceof Ad&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ad(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ad(n.from,n.to,t.markFromJSON(n.mark))}}Ko.jsonID("addMark",Ad);class Cd extends Ko{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=new Hn($7(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),t),n.openStart,n.openEnd);return Ps.fromReplace(t,this.from,this.to,i)}invert(){return new Ad(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Cd(n.pos,i.pos,this.mark)}merge(t){return t instanceof Cd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Cd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Cd(n.from,n.to,t.markFromJSON(n.mark))}}Ko.jsonID("removeMark",Cd);class wd extends Ko{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ps.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ps.fromReplace(t,this.pos,this.pos+1,new Hn(Ln.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let s=0;si.pos?null:new xh(n.pos,i.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new xh(n.from,n.to,n.gapFrom,n.gapTo,Hn.fromJSON(t,n.slice),n.insert,!!n.structure)}}Ko.jsonID("replaceAround",xh);function H8(e,t,n){let i=e.resolve(t),s=n-t,o=i.depth;for(;s>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,s--;if(s>0){let r=i.node(o).maybeChild(i.indexAfter(o));for(;s>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,s--}}return!1}function GNe(e,t,n){let i=e.resolve(t);if(!n.content.size)return t;let s=n.content;for(let o=0;o=0;r--){let l=r==i.depth?0:i.pos<=(i.start(r+1)+i.end(r+1))/2?-1:1,a=i.index(r)+(l>0?1:0),u=i.node(r),c=!1;if(o==1)c=u.canReplace(a,a,s);else{let d=u.contentMatchAt(a).findWrapping(s.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?i.pos:l<0?i.before(r+1):i.after(r+1)}return null}class Op extends Ko{constructor(t,n,i){super(),this.pos=t,this.attr=n,this.value=i}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ps.fail("No node at attribute step's position");let i=Object.create(null);for(let o in n.attrs)i[o]=n.attrs[o];i[this.attr]=this.value;let s=n.type.create(i,null,n.marks);return Ps.fromReplace(t,this.pos,this.pos+1,new Hn(Ln.from(s),0,n.isLeaf?0:1))}getMap(){return Pr.empty}invert(t){return new Op(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Op(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Op(n.pos,n.attr,n.value)}}Ko.jsonID("attr",Op);class ny extends Ko{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let s in t.attrs)n[s]=t.attrs[s];n[this.attr]=this.value;let i=t.type.create(n,t.content,t.marks);return Ps.ok(i)}getMap(){return Pr.empty}invert(t){return new ny(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new ny(n.attr,n.value)}}Ko.jsonID("docAttr",ny);let w0=class extends Error{};w0=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};w0.prototype=Object.create(Error.prototype);w0.prototype.constructor=w0;w0.prototype.name="TransformError";const dk=Object.create(null);class gs{constructor(t,n,i){this.$anchor=t,this.$head=n,this.ranges=i||[new QNe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;o--){let r=n<0?qf(t.node(0),t.node(o),t.before(o+1),t.index(o),n,i):qf(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,i);if(r)return r}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new ka(t.node(0))}static atStart(t){return qf(t,t,0,0,1)||new ka(t)}static atEnd(t){return qf(t,t,t.content.size,t.childCount,-1)||new ka(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=dk[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in dk)throw new RangeError("Duplicate use of selection JSON ID "+t);return dk[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Yi.between(this.$anchor,this.$head).getBookmark()}}gs.prototype.visible=!0;class QNe{constructor(t,n){this.$from=t,this.$to=n}}let JE=!1;function XE(e){!JE&&!e.parent.inlineContent&&(JE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Yi extends gs{constructor(t,n=t){XE(t),XE(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let i=t.resolve(n.map(this.head));if(!i.parent.inlineContent)return gs.near(i);let s=t.resolve(n.map(this.anchor));return new Yi(s.parent.inlineContent?s:i,i)}replace(t,n=Hn.empty){if(super.replace(t,n),n==Hn.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof Yi&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new v9(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Yi(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){let s=t.resolve(n);return new this(s,i==n?s:t.resolve(i))}static between(t,n,i){let s=t.pos-n.pos;if((!i||s)&&(i=s>=0?1:-1),!n.parent.inlineContent){let o=gs.findFrom(n,i,!0)||gs.findFrom(n,-i,!0);if(o)n=o.$head;else return gs.near(n,i)}return t.parent.inlineContent||(s==0?t=n:(t=(gs.findFrom(t,-i,!0)||gs.findFrom(t,i,!0)).$anchor,t.pos0?0:1);s>0?r=0;r+=s){let l=t.child(r);if(l.isAtom){if(!o&&li.isSelectable(l))return li.create(e,n-(s<0?l.nodeSize:0))}else{let a=qf(e,l,n+s,s<0?l.childCount:0,s,o);if(a)return a}n+=l.nodeSize*s}return null}function eT(e,t,n){let i=e.steps.length-1;if(i{r==null&&(r=c)}),e.setSelection(gs.near(e.doc.resolve(r),n))}function tT(e,t){return!t||!e?e:e.bind(t)}class Om{constructor(t,n,i){this.name=t,this.init=tT(n.init,i),this.apply=tT(n.apply,i)}}new Om("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Om("selection",{init(e,t){return e.selection||gs.atStart(t.doc)},apply(e){return e.selection}}),new Om("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,i){return i.selection.$cursor?e.storedMarks:null}}),new Om("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}});function hP(e,t,n){for(let i in e){let s=e[i];s instanceof Function?s=s.bind(t):i=="handleDOMEvents"&&(s=hP(s,t,{})),n[i]=s}return n}class JNe{constructor(t){this.spec=t,this.props={},t.props&&hP(t.props,this,this.props),this.key=t.key?t.key.key:XNe("plugin")}getState(t){return t[this.key]}}const fk=Object.create(null);function XNe(e){return e in fk?e+"$"+ ++fk[e]:(fk[e]=0,e+"$")}const iy="kimi-code://skill/";function pP(e){return e?e.startsWith(iy)&&e.length>iy.length?"skill":e.startsWith("#")||e.startsWith("?")||e.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(e)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test(e)?null:e.endsWith("/")||e.endsWith("\\")||/%5c$/i.test(e)?"folder":"file":null}function rp(e){const t=e.search(/[#?]/);return t>0?e.slice(0,t):e}function gP(e){let t="";for(const n of e)n.codePointAt(0)>127||/[A-Za-z0-9\-._~]/.test(n)?t+=n:t+=`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`;return t}function eFe(e){const t=e.split("/").map(gP).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function tFe(e){return e.replace(/%/g,"%25").replace(/&/g,"%26").replace(//g,"%3E").replace(/([\\[\]])/g,"\\$1").replace(/\n/g,"%0A").replace(/\r/g,"%0D")}function nFe(e){return e.replace(/\\([\\[\]])/g,"$1").replace(/%0A/g,` -`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function iFe(e){return e.replace(/%0A/g,` -`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function sFe(e,t){const n=t?e.replace(/\\([\\<>])/g,"$1"):e.replace(/\\([\\()])/g,"$1");try{return decodeURIComponent(n)}catch{return n}}function mP(e){const t=e.slice(iy.length);try{return decodeURIComponent(t)}catch{return t}}function vP(e){const t=tFe(e.name);if(e.kind==="skill")return`[${t}](${iy}${gP(e.name)})`;const n=e.kind==="folder"&&!e.path.endsWith("/")&&!e.path.endsWith("\\")?`${e.path}/`:e.path;return`[${t}](${eFe(n)})`}const oFe=new RNe({nodes:{doc:{content:"block+"},paragraph:{group:"block",content:"inline*",toDOM:()=>["p",0],parseDOM:[{tag:"p"}]},text:{group:"inline"},mention:{group:"inline",inline:!0,atom:!0,selectable:!0,attrs:{kind:{},name:{},path:{default:""}},leafText:e=>vP(e.attrs),toDOM:e=>{const t=e.attrs;return["span",{class:`mention-pill mention-${t.kind}`,"data-mention-path":t.path},t.name]}}}}),rFe={extensions:[{disable:{null:["attention","autolink","blockQuote","characterReference","codeFenced","codeIndented","codeText","definition","hardBreakEscape","headingAtx","htmlFlow","htmlText","list","setextUnderline","thematicBreak"]}}]};function z7(e){if(e.includes(` -`)){const a=[];let u=0;for(const c of e.split(` -`)){for(const d of z7(c))a.push({...d,start:d.start+u,end:d.end+u});u+=c.length+1}return a}const t=kNe(yNe(rFe).document().write(bNe()(e,void 0,!0))),n=[];let i=null,s=!1,o=!1,r=null,l=0;for(const[a,u]of t){if(u.type==="image"){l+=a==="enter"?1:-1;continue}if(l>0)continue;if(a==="enter"){u.type==="label"?i={start:u.start.offset,end:u.end.offset}:u.type==="resource"&&i!==null&&u.start.offset===i.end?(s=!0,o=!1,r=null):u.type==="resourceTitle"&&s?o=!0:u.type==="resourceDestination"&&s&&(r={start:u.start.offset,end:u.end.offset});continue}if(u.type!=="resource"||!s||i===null)continue;s=!1;const{start:c,end:d}=i;i=null;const f=u.end.offset;if(o||e[c]!=="["||r===null)continue;const h=e.slice(c+1,d-1);let g=e.slice(r.start,r.end),m=!1;if(g.startsWith("<")&&(m=!0,g=g.slice(1,-1)),!h||!g)continue;const y=pP(g);if(y!==null)if(y==="skill")n.push({start:c,end:f,attrs:{kind:y,name:mP(g),path:""},rawDest:g});else{const A=sFe(g,m);n.push({start:c,end:f,attrs:{kind:y,name:nFe(h),path:A},rawDest:g})}}return n}function lFe(e){const t=z7(e);if(t.length===0)return[{type:"text",value:e}];const n=[];let i=0;for(const s of t)s.start>i&&n.push({type:"text",value:e.slice(i,s.start)}),n.push({type:"mention",attrs:s.attrs,rawDest:s.rawDest}),i=s.end;return i2),ul=O7||(xa?/Mac/.test(xa.platform):!1),xP=xa?/Win/.test(xa.platform):!1,tg=/Android \d/.test(Nc),P7=!!iT&&"webkitFontSmoothing"in iT.documentElement.style,cFe=P7?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function dFe(e,t=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let s=e.docView.nearestDesc(n.focusNode),o=s&&s.size==0,r=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let l=i.resolve(r),a,u;if(kP(n)){for(a=r;s&&!s.node;)s=s.parent;let d=s.node;if(s&&d.isAtom&&li.isSelectable(d)&&s.parent&&!(d.isInline&&uFe(n.focusNode,n.focusOffset,s.dom))){let f=s.posBefore;u=new li(r==f?l:i.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=r,f=r;for(let h=0;h{(n.anchorNode!=i||n.anchorOffset!=s)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!SP(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function hFe(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?t.collapse(n.parentNode,of(n)+1):t.collapse(n,0),!i&&!e.state.selection.visible&&eg&&CP<=11&&(n.disabled=!0,n.disabled=!1)}function pFe(e,t){if(t instanceof li){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(lT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else lT(e)}function lT(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function _P(e,t,n,i){return e.someProp("createSelectionBetween",s=>s(e,t,n))||Yi.between(t,n,i)}function gFe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function K8(e,t){let{$anchor:n,$head:i}=e.selection,s=t>0?n.max(i):n.min(i),o=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return o&&gs.findFrom(o,t)}function Ru(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function aT(e,t,n){let i=e.state.selection;if(i instanceof Yi)if(n.indexOf("s")>-1){let{$head:s}=i,o=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let r=e.state.doc.resolve(s.pos+o.nodeSize*(t<0?-1:1));return Ru(e,new Yi(i.$anchor,r))}else if(i.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let s=K8(e.state,t);return s&&s instanceof li?Ru(e,s):!1}else if(!(ul&&n.indexOf("m")>-1)){let s=i.$head,o=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter,r;if(!o||o.isText)return!1;let l=t<0?s.pos-o.nodeSize:s.pos;return o.isAtom||(r=e.docView.descAt(l))&&!r.contentDOM?li.isSelectable(o)?Ru(e,new li(t<0?e.state.doc.resolve(s.pos-o.nodeSize):s)):P7?Ru(e,new Yi(e.state.doc.resolve(t<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof li&&i.node.isInline)return Ru(e,new Yi(t>0?i.$to:i.$from));{let s=K8(e.state,t);return s?Ru(e,s):!1}}}function oy(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Pp(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Df(e,t){return t<0?mFe(e):vFe(e)}function mFe(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let s,o,r=!1;for(y9&&n.nodeType==1&&i0){if(n.nodeType!=1)break;{let l=n.childNodes[i-1];if(Pp(l,-1))s=n,o=--i;else if(l.nodeType==3)n=l,i=n.nodeValue.length;else break}}else{if(IP(n))break;{let l=n.previousSibling;for(;l&&Pp(l,-1);)s=n.parentNode,o=of(l),l=l.previousSibling;if(l)n=l,i=oy(n);else{if(n=n.parentNode,n==e.dom)break;i=0}}}r?V8(e,n,i):s&&V8(e,s,o)}function vFe(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let s=oy(n),o,r;for(;;)if(i{e.state==s&&j7(e)},50)}function uT(e,t){let n=e.state.doc.resolve(t);if(!(Fc||xP)&&n.parent.inlineContent){let s=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),r=(o.top+o.bottom)/2;if(r>s.top&&r1)return o.lefts.top&&r1)return o.left>s.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function cT(e,t,n){let i=e.state.selection;if(i instanceof Yi&&!i.empty||n.indexOf("s")>-1||ul&&n.indexOf("m")>-1)return!1;let{$from:s,$to:o}=i;if(!s.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let r=K8(e.state,t);if(r&&r instanceof li)return Ru(e,r)}if(!s.parent.inlineContent){let r=t<0?s:o,l=i instanceof ka?gs.near(r,t):gs.findFrom(r,t);return l?Ru(e,l):!1}return!1}function dT(e,t){if(!(e.state.selection instanceof Yi))return!0;let{$head:n,$anchor:i,empty:s}=e.state.selection;if(!n.sameParent(i))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function fT(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function bFe(e){if(!rf||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let i=t.firstChild;fT(e,i,"true"),setTimeout(()=>fT(e,i,"false"),20)}return!1}function AFe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function CFe(e,t){let n=t.keyCode,i=AFe(t);if(n==8||ul&&n==72&&i=="c")return dT(e,-1)||Df(e,-1);if(n==46&&!t.shiftKey||ul&&n==68&&i=="c")return dT(e,1)||Df(e,1);if(n==13||n==27)return!0;if(n==37||ul&&n==66&&i=="c"){let s=n==37?uT(e,e.state.selection.from)=="ltr"?-1:1:-1;return aT(e,s,i)||Df(e,s)}else if(n==39||ul&&n==70&&i=="c"){let s=n==39?uT(e,e.state.selection.from)=="ltr"?1:-1:1;return aT(e,s,i)||Df(e,s)}else{if(n==38||ul&&n==80&&i=="c")return cT(e,-1,i)||Df(e,-1);if(n==40||ul&&n==78&&i=="c")return bFe(e)||cT(e,1,i)||Df(e,1);if(i==(ul?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function MP(e,t){e.someProp("transformCopied",h=>{t=h(t,e)});let n=[],{content:i,openStart:s,openEnd:o}=t;for(;s>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){s--,o--;let h=i.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),i=h.content}let r=e.someProp("clipboardSerializer")||m9.fromSchema(e.state.schema),l=DP(),a=l.createElement("div");a.appendChild(r.serializeFragment(i,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=FP[u.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let g=l.createElement(c[h]);for(;a.firstChild;)g.appendChild(a.firstChild);a.appendChild(g),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${s} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,` - -`);return{dom:a,text:f,slice:t}}function EP(e,t,n,i,s){let o=s.parent.type.spec.code,r,l;if(!n&&!t)return null;let a=!!t&&(i||o||!n);if(a){if(e.someProp("transformPastedText",f=>{t=f(t,o||i,e)}),o)return l=new Hn(Ln.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0),e.someProp("transformPasted",f=>{l=f(l,e,!0)}),l;let d=e.someProp("clipboardTextParser",f=>f(t,s,i,e));if(d)l=d;else{let f=s.marks(),{schema:h}=e.state,g=m9.fromSchema(h);r=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=r.appendChild(document.createElement("p"));m&&y.appendChild(g.serializeNode(h.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),r=_Fe(n),P7&&IFe(r);let u=r&&r.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=r.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;r=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||jNe.fromSchema(e.state.schema)).parseSlice(r,{preserveWhitespace:!!(a||c),context:s,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!wFe.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=MFe(hT(l,+c[1],+c[2]),c[4]);else if(l=Hn.maxOpen(xFe(l.content,s),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d{l=d(l,e,a)}),l}const wFe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function xFe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let s=t.node(n).contentMatchAt(t.index(n)),o,r=[];if(e.forEach(l=>{if(!r)return;let a=s.findWrapping(l.type),u;if(!a)return r=null;if(u=r.length&&o.length&&LP(a,o,l,r[r.length-1],0))r[r.length-1]=u;else{r.length&&(r[r.length-1]=NP(r[r.length-1],o.length));let c=TP(l,a);r.push(c),s=s.matchType(c.type),o=a}}),r)return Ln.from(r)}return e}function TP(e,t,n=0){for(let i=t.length-1;i>=n;i--)e=t[i].create(null,Ln.from(e));return e}function LP(e,t,n,i,s){if(s1&&(o=0),s=n&&(l=t<0?r.contentMatchAt(0).fillBefore(l,o<=s).append(l):l.append(r.contentMatchAt(r.childCount).fillBefore(Ln.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,r.copy(l))}function hT(e,t,n){return tn})),pk.createHTML(e)):e}function _Fe(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=DP(),i=n.body,s=/<([a-z][^>\s]+)/i.exec(e),o;if((o=s&&FP[s[1].toLowerCase()])&&(e=o.map(r=>"<"+r+">").join("")+e+o.map(r=>"").reverse().join("")),i.innerHTML=SFe(e),o)for(let r=0;r=0;l-=2){let a=n.nodes[i[l]];if(!a||a.hasRequiredAttrs())break;s=Ln.from(a.create(i[l+1],s)),o++,r++}return new Hn(s,o,r)}const Ql={},Jr={};function Ga(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}Jr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!RP(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(tg&&Fc&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),O7&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();e.input.lastIOSEnter=i,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==i&&(e.someProp("handleKeyDown",s=>s(e,bP(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",i=>i(e,n))||CFe(e,n)?n.preventDefault():Ga(e,"key")};Jr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Jr.keypress=(e,t)=>{let n=t;if(RP(e)||!n.charCode||n.ctrlKey&&!n.altKey||ul&&n.metaKey)return;if(e.someProp("handleKeyPress",s=>s(e,n))){n.preventDefault();return}let i=e.state.selection;if(!(i instanceof Yi)||!i.$from.sameParent(i.$to)){let s=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!e.someProp("handleTextInput",r=>r(e,i.$from.pos,i.$to.pos,s,o))&&e.dispatch(o()),n.preventDefault()}};function ng(e){return{left:e.clientX,top:e.clientY}}function EFe(e,t){let n=t.x-e.clientX,i=t.y-e.clientY;return n*n+i*i<100}function H7(e,t,n,i,s){if(i==-1)return!1;let o=e.state.doc.resolve(i);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,l=>r>o.depth?l(e,n,o.nodeAfter,o.before(r),s,!0):l(e,n,o.node(r),o.before(r),s,!1)))return!0;return!1}function ig(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let i=e.state.tr.setSelection(t);i.setMeta("pointer",!0),e.dispatch(i)}function TFe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return i&&i.isAtom&&li.isSelectable(i)?(ig(e,new li(n)),!0):!1}function LFe(e,t){if(t==-1)return!1;let n=e.state.selection,i,s;n instanceof li&&(i=n.node);let o=e.state.doc.resolve(t);for(let r=o.depth+1;r>0;r--){let l=r>o.depth?o.nodeAfter:o.node(r);if(li.isSelectable(l)){i&&n.$from.depth>0&&r>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?s=o.before(n.$from.depth):s=o.before(r);break}}return s!=null?(ig(e,li.create(e.state.doc,s)),!0):!1}function NFe(e,t,n,i,s){return H7(e,"handleClickOn",t,n,i)||e.someProp("handleClick",o=>o(e,t,i))||(s?LFe(e,n):TFe(e,n))}function FFe(e,t,n,i){return H7(e,"handleDoubleClickOn",t,n,i)||e.someProp("handleDoubleClick",s=>s(e,t,i))}function DFe(e,t,n,i){return H7(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",s=>s(e,t,i))||$Fe(e,n,i)}function $Fe(e,t,n){if(n.button!=0)return!1;let i=$P(e,t,!0),s=e.state.doc;return i?(ig(e,i),i instanceof Yi&&s.eq(e.state.doc)&&(e.input.mouseDown=new zFe(e,i)),!0):!1}function $P(e,t,n){let i=e.state.doc;if(t==-1)return i.inlineContent?Yi.create(i,0,i.content.size):null;let s=i.resolve(t);for(let o=s.depth+1;o>0;o--){let r=o>s.depth?s.nodeAfter:s.node(o),l=s.before(o);if(r.inlineContent)return Yi.create(i,l+1,l+1+r.content.size);if(n&&li.isSelectable(r))return li.create(i,l)}return null}function W7(e){return ry(e)}const BP=ul?"metaKey":"ctrlKey";Ql.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let i=W7(e),s=Date.now(),o="singleClick";s-e.input.lastClick.time<500&&EFe(n,e.input.lastClick)&&!n[BP]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:o,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let r=e.posAtCoords(ng(n));r&&(o=="singleClick"?e.input.mouseDown=new BFe(e,r,n,!!i):(o=="doubleClick"?FFe:DFe)(e,r.pos,r.inside,n)?n.preventDefault():Ga(e,"pointer"))};class zP{constructor(t){this.view=t,this.mightDrag=null,t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(t){this.done()}move(t){t.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class BFe extends zP{constructor(t,n,i,s){super(t),this.pos=n,this.event=i,this.flushed=s,this.delayedSelectionSync=!1,this.startDoc=t.state.doc,this.selectNode=!!i[BP],this.allowDefault=i.shiftKey;let o,r;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),r=n.inside;else{let c=t.state.doc.resolve(n.pos);o=c.parent,r=c.depth?c.before():0}const l=s?null:i.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=t.state;i.button==0&&(o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof li&&u.from<=r&&u.to>r)&&(this.mightDrag={node:o,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&y9&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Ga(t,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||j7(this.view)})}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ng(t))),this.updateAllowDefault(t),this.allowDefault||!n?Ga(this.view,"pointer"):NFe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||rf&&this.mightDrag&&!this.mightDrag.node.isAtom||Fc&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ig(this.view,gs.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Ga(this.view,"pointer")}move(t){this.updateAllowDefault(t),Ga(this.view,"pointer"),super.move(t)}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}class zFe extends zP{constructor(t,n){super(t),this.startSelection=n,this.startDoc=t.state.doc}move(t){if(t.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}t.preventDefault(),Ga(this.view,"pointer");let n=this.view.posAtCoords(ng(t)),i=n&&$P(this.view,n.inside,!1);if(!i)return;let{doc:s}=this.view.state,o=this.startSelection,[r,l]=i.from{e.input.lastTouch=Date.now(),W7(e),Ga(e,"pointer")};Ql.touchmove=e=>{e.input.lastTouch=Date.now(),Ga(e,"pointer")};Ql.contextmenu=e=>W7(e);function RP(e,t){return e.composing?!0:rf&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const RFe=tg?5e3:-1;Jr.compositionstart=Jr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Yi&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)||Fc&&xP&&OFe(e)))e.markCursor=e.state.storedMarks||n.marks(),ry(e,!0),e.markCursor=null;else if(ry(e,!t.selection.empty),y9&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=e.domSelectionRange();for(let s=i.focusNode,o=i.focusOffset;s&&s.nodeType==1&&o!=0;){let r=o<0?s.lastChild:s.childNodes[o-1];if(!r)break;if(r.nodeType==3){let l=e.domSelection();l&&l.collapse(r,r.nodeValue.length);break}else s=r,o=-1}}e.input.composing=!0}OP(e,RFe)};function OFe(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let i=t.childNodes[n];return i.nodeType==1&&i.contentEditable=="false"}Jr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,OP(e,20))};function OP(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ry(e),t))}function PFe(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function ry(e,t=!1){if(!(tg&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),PFe(e),t||e.docView&&e.docView.dirty){let n=dFe(e),i=e.state.selection;return n&&!n.eq(i)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!i.$from.node(i.$from.sharedDepth(i.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function jFe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),s=document.createRange();s.selectNodeContents(t),e.dom.blur(),i.removeAllRanges(),i.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const x0=eg&&CP<15||O7&&cFe<604;Ql.copy=Jr.cut=(e,t)=>{let n=t,i=e.state.selection,s=n.type=="cut";if(i.empty)return;let o=x0?null:n.clipboardData,r=i.content(),{dom:l,text:a}=MP(e,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",a)):jFe(e,l),s&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function HFe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function WFe(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,i=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let s=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),i.parentNode&&i.parentNode.removeChild(i),n?G8(e,i.value,null,s,t):G8(e,i.textContent,i.innerHTML,s,t)},50)}function G8(e,t,n,i,s){let o=EP(e,t,n,i,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,s,o||Hn.empty)))return!0;if(!o)return!1;let r=HFe(o),l=r?e.state.tr.replaceSelectionWith(r,i):e.state.tr.replaceSelection(o);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function PP(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Jr.paste=(e,t)=>{let n=t;if(e.composing&&!tg)return;let i=x0?null:n.clipboardData,s=e.input.shiftKey&&e.input.lastKeyCode!=45;i&&G8(e,PP(i),i.getData("text/html"),s,n)?n.preventDefault():WFe(e,n)};class qFe{constructor(t,n,i){this.slice=t,this.move=n,this.node=i}}const UFe=ul?"altKey":"ctrlKey";function jP(e,t){let n;return e.someProp("dragCopies",i=>{n=n||i(t)}),n!=null?!n:!t[UFe]}Ql.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let s=e.state.selection,o=s.empty?null:e.posAtCoords(ng(n)),r;if(!(o&&o.pos>=s.from&&o.pos<=(s instanceof li?s.to-1:s.to))){if(i&&i.mightDrag)r=li.create(e.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(r=li.create(e.state.doc,d.posBefore))}}let l=(r||e.state.selection).content(),{dom:a,text:u,slice:c}=MP(e,l);(!n.dataTransfer.files.length||!Fc||wP>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(x0?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",x0||n.dataTransfer.setData("text/plain",u),e.dragging=new qFe(c,jP(e,n),r)};Ql.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Jr.dragover=Jr.dragenter=(e,t)=>t.preventDefault();Jr.drop=(e,t)=>{try{KFe(e,t,e.dragging)}finally{e.dragging=null}};function KFe(e,t,n){if(!t.dataTransfer)return;let i=e.posAtCoords(ng(t));if(!i)return;let s=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",h=>{o=h(o,e,!1)}):o=EP(e,PP(t.dataTransfer),x0?null:t.dataTransfer.getData("text/html"),!1,s);let r=!!(n&&jP(e,t));if(e.someProp("handleDrop",h=>h(e,t,o||Hn.empty,r))){t.preventDefault();return}if(!o)return;t.preventDefault();let l=o?GNe(e.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let a=e.state.tr;if(r){let{node:h}=n;h?h.replace(a):a.deleteSelection()}let u=a.mapping.map(l),c=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,o.content.firstChild):a.replaceRange(u,u,o),a.doc.eq(d))return;let f=a.doc.resolve(u);if(c&&li.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))a.setSelection(new li(f));else{let h=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((g,m,y,A)=>h=A),a.setSelection(_P(e,f,a.doc.resolve(h)))}e.focus(),e.dispatch(a.setMeta("uiEvent","drop"))}Ql.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&j7(e)},20))};Ql.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Ql.beforeinput=(e,t)=>{if(tg&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:i}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=i||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,bP(8,"Backspace")))))return;let{$cursor:s}=e.state.selection;s&&s.pos>0&&e.dispatch(e.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let e in Jr)Ql[e]=Jr[e];function S0(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class ly{constructor(t,n){this.toDOM=t,this.spec=n||Bd,this.side=this.spec.side||0}map(t,n,i,s){let{pos:o,deleted:r}=t.mapResult(n.from+s,this.side<0?-1:1);return r?null:new pa(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof ly&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&S0(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class tc{constructor(t,n){this.attrs=t,this.spec=n||Bd}map(t,n,i,s){let o=t.map(n.from+s,this.spec.inclusiveStart?-1:1)-i,r=t.map(n.to+s,this.spec.inclusiveEnd?1:-1)-i;return o>=r?null:new pa(o,r,this)}valid(t,n){return n.from=t&&(!o||o(l.spec))&&i.push(l.copy(l.from+s,l.to+s))}for(let r=0;rt){let l=this.children[r]+1;this.children[r+2].findInner(t-l,n-l,i,s+l,o)}}map(t,n,i){return this==Xo||t.maps.length==0?this:this.mapInner(t,n,0,0,i||Bd)}mapInner(t,n,i,s,o){let r;for(let l=0;l{let u=a+i,c;if(c=WP(n,l,u)){for(s||(s=this.children.slice());ol&&d.to=t){this.children[l]==t&&(i=this.children[l+2]);break}let o=t+1,r=o+n.content.size;for(let l=0;lo&&a.type instanceof tc){let u=Math.max(o,a.from)-o,c=Math.min(r,a.to)-o;us.map(t,n,Bd));return gd.from(i)}forChild(t,n){if(n.isLeaf)return lo.empty;let i=[];for(let s=0;sn instanceof lo)?t:t.reduce((n,i)=>n.concat(i instanceof lo?i:i.members),[]))}}forEachSet(t){for(let n=0;n{let y=m-g-(h-f);for(let A=0;Ab+c-d)continue;let C=l[A]+c-d;h>=C?l[A+1]=f<=C?-2:-1:f>=c&&y&&(l[A]+=y,l[A+1]+=y)}d+=y}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u=i.content.size){a=!0;continue}let f=n.map(e[u+1]+o,-1),h=f-s,{index:g,offset:m}=i.content.findIndex(d),y=i.maybeChild(g);if(y&&m==d&&m+y.nodeSize==h){let A=l[u+2].mapInner(n,y,c+1,e[u]+o+1,r);A!=Xo?(l[u]=d,l[u+1]=h,l[u+2]=A):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=ZFe(l,e,t,n,s,o,r),c=ay(u,i,0,r);t=c.local;for(let d=0;dn&&r.to{let u=WP(e,l,a+n);if(u){o=!0;let c=ay(u,l,n+a+1,i);c!=Xo&&s.push(a,a+l.nodeSize,c)}});let r=HP(o?qP(e):e,-n).sort(zd);for(let l=0;l0;)t++;e.splice(t,0,n)}const GFe={sm:14,md:16,lg:20},QFe={file:Gb,folder:yB,skill:bB,copy:vB,check:mB,"external-link":kB};function Dh(e,t="md"){const n=GFe[t];return QFe[e].replace(/]*>/,i=>i.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^