@moonshot-ai/kimi-code 0.36.0 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/main.mjs +21245 -19451
  2. package/dist-web/assets/CodeBlockNode-DAv0N-7R.js +29 -0
  3. package/dist-web/assets/DesignSystemView-OnWAAu0u.js +13 -0
  4. package/dist-web/assets/DesignSystemView-T_JuY7qG.css +1 -0
  5. package/dist-web/assets/{Tooltip-BCySsRbJ.js → Tooltip-BCqOrYcp.js} +1 -1
  6. package/dist-web/assets/{abnfDiagram-VRR7QNED-LUo2ybd4.js → abnfDiagram-VRR7QNED-C1nSQTfb.js} +1 -1
  7. package/dist-web/assets/{arc-HTdwJ95y.js → arc-VnV5ZHHs.js} +1 -1
  8. package/dist-web/assets/{architectureDiagram-ZJ3FMSHR-BJZpYPA7.js → architectureDiagram-ZJ3FMSHR-vHnTqMir.js} +1 -1
  9. package/dist-web/assets/{blockDiagram-677ZJIJ3-CRh0VMzc.js → blockDiagram-677ZJIJ3-DbZfwKqi.js} +1 -1
  10. package/dist-web/assets/{c4Diagram-LMCZKHZV-0GQGcOcv.js → c4Diagram-LMCZKHZV-D9CNQmKj.js} +1 -1
  11. package/dist-web/assets/channel-CCgkeAox.js +1 -0
  12. package/dist-web/assets/{chunk-2Q5K7J3B-Dntoz8YC.js → chunk-2Q5K7J3B-BRQfHNsr.js} +1 -1
  13. package/dist-web/assets/{chunk-32BRIVSS-DNJ_Bmzz.js → chunk-32BRIVSS-BjbI6vv4.js} +1 -1
  14. package/dist-web/assets/{chunk-5VM5RSS4-CqIxm4fU.js → chunk-5VM5RSS4-BgO5oPj2.js} +1 -1
  15. package/dist-web/assets/{chunk-EX3LRPZG-6_hx8rcm.js → chunk-EX3LRPZG-CnbEmu7W.js} +1 -1
  16. package/dist-web/assets/{chunk-JWPE2WC7-R8L-LjRL.js → chunk-JWPE2WC7-CPYc1Q95.js} +1 -1
  17. package/dist-web/assets/{chunk-MOJQB5TN-CuHpGhX-.js → chunk-MOJQB5TN-t9_0csvx.js} +1 -1
  18. package/dist-web/assets/{chunk-RYQCIY6F-Dm138b37.js → chunk-RYQCIY6F-ClGLd9-g.js} +1 -1
  19. package/dist-web/assets/{chunk-V7JOEXUC-bFBk02SY.js → chunk-V7JOEXUC-DRWtsWPL.js} +1 -1
  20. package/dist-web/assets/{chunk-VR4S4FIN-Crv01XIW.js → chunk-VR4S4FIN-CFZ-U2wY.js} +1 -1
  21. package/dist-web/assets/{chunk-XXDRQBXY-B7Une-L7.js → chunk-XXDRQBXY-AKdWVjUf.js} +1 -1
  22. package/dist-web/assets/classDiagram-OUVF2IWQ-joxy0H72.js +1 -0
  23. package/dist-web/assets/classDiagram-v2-EOCWNBFH-joxy0H72.js +1 -0
  24. package/dist-web/assets/{cose-bilkent-JH36ORCC-kIdO2NbL.js → cose-bilkent-JH36ORCC-CxHxs_ia.js} +1 -1
  25. package/dist-web/assets/{cynefin-VYW2F7L2-CD6doQLg.js → cynefin-VYW2F7L2-Cbq_W2rg.js} +1 -1
  26. package/dist-web/assets/{cynefinDiagram-TSTJHNR4-CjIz9kB7.js → cynefinDiagram-TSTJHNR4-DV_qWAFu.js} +1 -1
  27. package/dist-web/assets/{dagre-VKFMJZFB-CxsYi2pz.js → dagre-VKFMJZFB-D_g3ijKj.js} +1 -1
  28. package/dist-web/assets/{diagram-FQU43EPY-BxnsH35m.js → diagram-FQU43EPY-BsAKjn07.js} +1 -1
  29. package/dist-web/assets/{diagram-G47NLZAW-CAmFU1Cj.js → diagram-G47NLZAW-BuEBRets.js} +1 -1
  30. package/dist-web/assets/{diagram-NH7WQ7WH-Db_YtFB_.js → diagram-NH7WQ7WH-DulkvbtN.js} +1 -1
  31. package/dist-web/assets/{diagram-OA4YK3LP--Kd1fr8_.js → diagram-OA4YK3LP-CkS8iR3C.js} +1 -1
  32. package/dist-web/assets/{diagram-WEI45ONY-QxbY7aVv.js → diagram-WEI45ONY-Dcl5s4A_.js} +1 -1
  33. package/dist-web/assets/{ebnfDiagram-CCIWWBDH-DJR1FAj9.js → ebnfDiagram-CCIWWBDH-D-Jk-ZBL.js} +1 -1
  34. package/dist-web/assets/{erDiagram-Q63AITRT-CKt0tq4n.js → erDiagram-Q63AITRT-Ba0EdkRL.js} +1 -1
  35. package/dist-web/assets/{flowDiagram-23GEKE2U-CB0TxYKC.js → flowDiagram-23GEKE2U-C0UVrrA6.js} +1 -1
  36. package/dist-web/assets/{ganttDiagram-NO4QXBWP-BkswX2CL.js → ganttDiagram-NO4QXBWP-JXL1f3pm.js} +1 -1
  37. package/dist-web/assets/{gitGraphDiagram-IHSO6WYX-9OkgrWLV.js → gitGraphDiagram-IHSO6WYX-koxYdU4T.js} +1 -1
  38. package/dist-web/assets/index-BkulrdXm.css +1 -0
  39. package/dist-web/assets/{index-DCogO9ha.js → index-Bpfqls0z.js} +2 -2
  40. package/dist-web/assets/{index-DyqF2DF6.js → index-CbkQVtd0.js} +1 -1
  41. package/dist-web/assets/index-CgXirkUy.js +651 -0
  42. package/dist-web/assets/{index-B1mxH1U6.js → index-D7acQhzk.js} +1 -1
  43. package/dist-web/assets/{index10-DKtGUVwa.js → index10-1H9a2FKj.js} +1 -1
  44. package/dist-web/assets/index11-DDroxORK.js +8 -0
  45. package/dist-web/assets/{index5-BZK7AFSJ.js → index5-Bc_8yuJc.js} +1 -1
  46. package/dist-web/assets/{index6-CXJ_z4n5.js → index6-ByC5gnox.js} +1 -1
  47. package/dist-web/assets/{index7-CG7TPx8g.js → index7-1my_tbsi.js} +1 -1
  48. package/dist-web/assets/{index8-B9apTeKj.js → index8-DPCQMDEU.js} +1 -1
  49. package/dist-web/assets/{infoDiagram-FWYZ7A6U-Dpbgmc1e.js → infoDiagram-FWYZ7A6U-CLfieRpE.js} +1 -1
  50. package/dist-web/assets/{ishikawaDiagram-FXEZZL3T-BA2yx5LI.js → ishikawaDiagram-FXEZZL3T-BghMxuhr.js} +1 -1
  51. package/dist-web/assets/{journeyDiagram-5HDEW3XC-DCwR4Nt_.js → journeyDiagram-5HDEW3XC-CP_Jp2XI.js} +1 -1
  52. package/dist-web/assets/{kanban-definition-HUTT4EX6-CArc2b0u.js → kanban-definition-HUTT4EX6-B_pkJKY_.js} +1 -1
  53. package/dist-web/assets/{linear-CV4KY8w2.js → linear-DLrQx2aB.js} +1 -1
  54. package/dist-web/assets/{mermaid.core-CsZwh_jB.js → mermaid.core-DHQD1STq.js} +4 -4
  55. package/dist-web/assets/{mindmap-definition-LN4V7U3C-Cg1epIhw.js → mindmap-definition-LN4V7U3C-CKYrzvBu.js} +1 -1
  56. package/dist-web/assets/{pegDiagram-2B236MQR-MoH4JZ6E.js → pegDiagram-2B236MQR-DasvmypV.js} +1 -1
  57. package/dist-web/assets/{pieDiagram-ENE6RG2P-8g8etfu6.js → pieDiagram-ENE6RG2P-BRTgRbIK.js} +1 -1
  58. package/dist-web/assets/{quadrantDiagram-ABIIQ3AL-BxCL4sof.js → quadrantDiagram-ABIIQ3AL-Cqd6UTPe.js} +1 -1
  59. package/dist-web/assets/{railroadDiagram-RFXS5EU6-DS6RTuPq.js → railroadDiagram-RFXS5EU6-nXFgW9ad.js} +1 -1
  60. package/dist-web/assets/{requirementDiagram-TGXJPOKE-Cgysyqsi.js → requirementDiagram-TGXJPOKE-C7bAU0jd.js} +1 -1
  61. package/dist-web/assets/{sankeyDiagram-HTMAVEWB-BqJCXBk-.js → sankeyDiagram-HTMAVEWB-DVlRtVRy.js} +1 -1
  62. package/dist-web/assets/{sequenceDiagram-DBY2YBRQ-FwgGv3En.js → sequenceDiagram-DBY2YBRQ-AbAJXDB5.js} +1 -1
  63. package/dist-web/assets/{sizeCapture-X5ZJPWSS-CUFKXLd6.js → sizeCapture-X5ZJPWSS-B-P0cHus.js} +1 -1
  64. package/dist-web/assets/{stateDiagram-2N3HPSRC-CR3yEYk8.js → stateDiagram-2N3HPSRC-DvqaD8Eo.js} +1 -1
  65. package/dist-web/assets/stateDiagram-v2-6OUMAXLB-D-BVu44I.js +1 -0
  66. package/dist-web/assets/{swimlanes-5IMT3BWC-C7_SkVdK.js → swimlanes-5IMT3BWC-D0t01F1o.js} +2 -2
  67. package/dist-web/assets/swimlanesDiagram-G3AALYLV-1XCKB3VS.js +8 -0
  68. package/dist-web/assets/{timeline-definition-FHXFAJF6-DlAcudfE.js → timeline-definition-FHXFAJF6-doJ2oiYT.js} +1 -1
  69. package/dist-web/assets/{vennDiagram-L72KCM5P-BV2kbjhg.js → vennDiagram-L72KCM5P-De4w5Aco.js} +1 -1
  70. package/dist-web/assets/{vue.runtime.esm-bundler-D20WEMcO.js → vue.runtime.esm-bundler-B6hrKKNQ.js} +1 -1
  71. package/dist-web/assets/{wardleyDiagram-EHGQE667-BaiOQb6Q.js → wardleyDiagram-EHGQE667-CiqgclaU.js} +1 -1
  72. package/dist-web/assets/{xychartDiagram-FW5EYKEG-BklSkO6g.js → xychartDiagram-FW5EYKEG-DvB4kNEE.js} +1 -1
  73. package/dist-web/index.html +2 -2
  74. package/package.json +8 -8
  75. package/dist-web/assets/CodeBlockNode-Do73mQqg.js +0 -29
  76. package/dist-web/assets/DesignSystemView-DVONbdv-.css +0 -1
  77. package/dist-web/assets/DesignSystemView-xF63Uyfo.js +0 -13
  78. package/dist-web/assets/channel-Dk_xUHM6.js +0 -1
  79. package/dist-web/assets/classDiagram-OUVF2IWQ-DM4TZiKk.js +0 -1
  80. package/dist-web/assets/classDiagram-v2-EOCWNBFH-DM4TZiKk.js +0 -1
  81. package/dist-web/assets/index-Bxn5yOTB.js +0 -638
  82. package/dist-web/assets/index-DGHD7Bg9.css +0 -1
  83. package/dist-web/assets/index11-TEhD5dop.js +0 -8
  84. package/dist-web/assets/stateDiagram-v2-6OUMAXLB--VVJVX-W.js +0 -1
  85. package/dist-web/assets/swimlanesDiagram-G3AALYLV-BWdA3bDm.js +0 -8
@@ -1,8 +0,0 @@
1
- import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as f,bl as Wn,af as Xn,bY as Vn,bE as I,az as Un,c8 as wn,aD as Zn,as as Y,aI as Kn,aL as M,u as C,aY as Rt,v as u,bk as w,bb as Ke,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-Bxn5yOTB.js";import{i as At}from"./safeRaf-DGuzXxDK.js";function vl(d,m){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,m-12),m))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function fl(d){const m=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(m)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(m)}function ml(d){if(!d.includes(";"))return d;const m=d.indexOf(":");if(m===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,m))return d;const y=d.slice(0,m+1),z=d.slice(m+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||fl($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function Lt(d){if(_t(d)!=="sequencediagram")return d;const m=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;z<m.length;z+=2){const a=m[z],$=ml(a);$!==a&&(m[z]=$,y=!0)}return y?m.join(""):d}var hl=Object.defineProperty,gl=Object.defineProperties,pl=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertySymbols,wl=Object.prototype.hasOwnProperty,yl=Object.prototype.propertyIsEnumerable,kl=Math.pow,Mn=(d,m,y)=>m in d?hl(d,m,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[m]=y,Tn=(d,m)=>{for(var y in m||(m={}))wl.call(m,y)&&Mn(d,y,m[y]);if(bn)for(var y of bn(m))yl.call(m,y)&&Mn(d,y,m[y]);return d},T=(d,m,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,m)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Al=["aria-label","disabled"],Ll={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:m}){var y,z;const a=d,$=m,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=f(!1),P=f(typeof window>"u"),ee=Nn(),Ht=In(),Le=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Le.value,dompurifyConfig:Le.value==="strict"?Q:void 0,flowchart:Le.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Ee(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var X;for(const J of W)(X=J.parentNode)==null||X.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ge(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Je=f(!1),V=f(!1),Qe=f(),Z=f(),v=f(),se=f(),et=f(null),En=qn(),je=f(null),xe=f(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,tt=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,tt+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++tt;yield Y(),t===tt&&((function(n=Nt.value){n&&Qe.value&&te?.reportHeight(n,Qe.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,tt+=1,te?.markSettled(e))}const Yt=f(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Le.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%%
2
- `;return n.trim().startsWith("%%{")?n:r+n}function qt(){var e;return(function(t){const n=(function(){var r;const o=Z.value?getComputedStyle(Z.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(r=zt(o))!=null?r:360})(),l=un();return ol(t,n,l)})((e=zt(a.estimatedPreviewHeightPx))!=null?e:al(D.value))}function Wt(){return`${qt()}px`}const _e=f(null);function kt(){var e;return!!((e=v.value)!=null&&e.querySelector("svg"))}function Xt(){return a.loading!==!1&&(kt()||!!_e.value)}const B=f(1),_=f(0),H=f(0),nt=f(!1),lt=f({x:0,y:0}),x=f(!0),rt=f(!1),re=f(!1),de=f(null);let xt="",bt=!1,ve="";const ot=f(0),Mt=f(!1),$n=F(()=>{var e;return Math.max(0,(e=a.renderDebounceMs)!=null?e:300)}),Pn=F(()=>{var e;return Math.max(0,(e=a.contentStableDelayMs)!=null?e:500)}),He=F(()=>{var e;return Math.max(120,(e=a.previewPollDelayMs)!=null?e:800)}),Dn=F(()=>{var e;return Math.max(He.value,(e=a.previewPollMaxDelayMs)!=null?e:4e3)}),Vt=F(()=>{var e;return Math.max(1,Math.trunc((e=a.previewPollMaxAttempts)!=null?e:12))}),fe=F(()=>a.loading!==!1);let Ne=null,Ie=null,Oe=null,Se=null,Ye=0;const Ut=(y=globalThis.requestIdleCallback)!=null?y:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),Zt=(z=globalThis.cancelIdleCallback)!=null?z:e=>clearTimeout(e);function b(e=ke){return!ue&&e===ke}function A(){return b()&&xe.value&&!V.value}function Tt(){Oe!=null&&(globalThis.clearTimeout(Oe),Oe=null),Se!=null&&(Zt(Se),Se=null)}function qe(){ue||Oe==null&&Se==null&&(Oe=globalThis.setTimeout(()=>{Oe=null,A()&&(Se=Ut(()=>{Se=null,A()&&gn()},{timeout:500}))},$n.value))}function We(){Ie!=null&&(globalThis.clearTimeout(Ie),Ie=null)}function Kt(e=600){if(typeof globalThis>"u"||ue)return;const t=Math.max(0,e);We(),Ie=globalThis.setTimeout(()=>{if(Ie=null,!ue){if(a.loading||re.value||!A())return void Kt(Math.min(1200,Math.max(300,1.2*t)));qe()}},t)}const q=f(Wt()),at=f(q.value);let $e=null;const O=f(!1),K=f(!1),me=f({}),he=f(0);let U=null,Pe=null;const N=f(!1),Rn=F(()=>{var e,t;return!(V.value||x.value||P.value&&!re.value&&!de.value&&(O.value||N.value&&((t=(e=v.value)==null?void 0:e.textContent)!=null&&t.trim())))}),Me=f({zoom:1,translateX:0,translateY:0,containerHeight:q.value}),Gt=F(()=>a.enableWheelZoom?{wheel:Fn}:{}),G=F(()=>{var e,t,n,l;return{worker:(e=a.workerTimeoutMs)!=null?e:1400,parse:(t=a.parseTimeoutMs)!=null?t:1800,render:(n=a.renderTimeoutMs)!=null?n:2500,fullRender:(l=a.fullRenderTimeoutMs)!=null?l:4e3}});let De=null,it=null,Re=!1,Te=He.value,ne=null,ut=0,Ct=!0,st=0;function Ce(e,t){const n=t?.timeoutMs,l=t?.signal;if(l?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,o=!1,c=null;return new Promise((h,i)=>{const s=()=>{r!=null&&clearTimeout(r),c&&l&&l.removeEventListener("abort",c)};n&&n>0&&(r=globalThis.setTimeout(()=>{o||(o=!0,s(),i(new Error("Operation timed out")))},n)),l&&(c=()=>{o||(o=!0,s(),i(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",c)),e().then(p=>{o||(o=!0,s(),h(p))}).catch(p=>{o||(o=!0,s(),i(p))})})}function Jt(e){if(typeof document>"u"||!v.value)return;if(typeof a.onRenderError=="function"&&a.onRenderError(e,D.value,v.value)===!0)return N.value=!0,void L();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),we(v.value),v.value.appendChild(t);const l=v.value?getComputedStyle(v.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";q.value=l||"360px",at.value=q.value,N.value=!0,L()}function Qt(e){const t=typeof e=="string"?e:typeof e?.message=="string"?e.message:"";return typeof t=="string"&&/timed out/i.test(t)}function en(e){return e?.name==="AbortError"}function Bt(e){return!Qt(e)&&!en(e)}typeof window<"u"&&I([()=>Qe.value,ee],([e,t])=>{var n;if((n=je.value)==null||n.destroy(),je.value=null,!t||xe.value)return void(xe.value=!0);if(!e)return void(xe.value=!1);const l=En(e,{rootMargin:Ht?.value.heavyBlockMargin,allowIdle:!1});je.value=l,xe.value=l.isVisible.value,l.whenVisible.then(()=>{xe.value=!0})},{immediate:!0}),Un(()=>{var e;ue=!0,ke+=1,he.value+=1,(e=je.value)==null||e.destroy(),je.value=null,It(),Tt()});const ct=F(()=>a.showTooltips!==!1);function tn(e){return!e||e.disabled}function R(e,t,n="top"){if(!ct.value||tn(e.currentTarget))return;const l=e,r=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;xn(e.currentTarget,t,n,!1,r,a.isDark)}function S(){ct.value&&wn()}function nn(e){if(!ct.value||tn(e.currentTarget))return;const t=Je.value?g("common.copied")||"Copied":g("common.copy")||"Copy",n=e,l=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;xn(e.currentTarget,t,"top",!1,l,a.isDark)}function ln(e,t){const n={theme:t==="dark"?"dark":"default"};Le.value==="strict"&&(n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%%
3
- `;return e.trimStart().startsWith("%%{")?e:l+e}function dt(){return Ct&&!x.value&&!O.value&&!N.value}function rn(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Et(e){if(_t(e)==="gantt")return(function(n){var l;const r=n.split(/\r?\n/);for(!/\r?\n$/.test(n)&&r.length>0&&r.pop();r.length>0;){const o=(l=r[r.length-1])==null?void 0:l.trim();if(o&&!o.startsWith("%%")){if(rn(o))break;r.pop()}else r.pop()}return r.some(rn)?r.join(`
4
- `):""})(e);const t=e.split(/\r?\n/);for(;t.length>0;){const n=t[t.length-1].trimEnd();if(n!==""){if(!(/^[-=~>|<\s]+$/.test(n.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(n)||/[-|><]$/.test(n)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(n)))break;t.pop()}else t.pop()}return t.join(`
5
- `)}function on(e,t,n,l){return T(this,null,function*(){try{return yield Ce(()=>e.render(t,n),{timeoutMs:l})}catch(r){if(!Bt(r))throw r;const o=Lt(n);if(o===n)throw r;try{return yield Ce(()=>e.render(`${t}-retry`,o),{timeoutMs:l})}catch{throw r}}})}function vt(e,t,n){return T(this,null,function*(){var l;try{return yield dl(e,t,(l=n?.timeoutMs)!=null?l:G.value.worker,n?.signal)}catch(r){if(r?.name==="AbortError")throw r;const o=r?.code||r?.name;if(o!=="WORKER_BUSY"&&o!=="WORKER_TIMEOUT"&&o!=="WORKER_INIT_ERROR"&&o!=="MERMAID_DISABLED"&&o!=="WORKER_REPLACED"||r?.fallbackToRenderer)return yield(function(c,h,i){return T(this,null,function*(){var s,p,E,W;const j=yield Ge();if(!j)return;const X=j,J=ln(c,h);if(typeof X.parse=="function"){try{yield Ce(()=>X.parse(J),{timeoutMs:(s=i?.timeoutMs)!=null?s:G.value.parse,signal:i?.signal})}catch(oe){if(!Bt(oe))throw oe;const Ze=Lt(J);if(Ze===J)throw oe;try{yield Ce(()=>X.parse(Ze),{timeoutMs:(p=i?.timeoutMs)!=null?p:G.value.parse,signal:i?.signal})}catch{throw oe}}return!0}const Ue=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;try{yield Ce(()=>j.render(Ue,J),{timeoutMs:(E=i?.timeoutMs)!=null?E:G.value.render,signal:i?.signal})}catch(oe){if(!Bt(oe))throw oe;const Ze=Lt(J);if(Ze===J)throw oe;try{yield Ce(()=>j.render(`${Ue}-retry`,Ze),{timeoutMs:(W=i?.timeoutMs)!=null?W:G.value.render,signal:i?.signal})}catch{throw oe}}return!0})})(e,t,n);throw r}})}function an(e,t,n){return T(this,null,function*(){var l;if(_t(e)==="gantt"){const o=Et(e);if(!o.trim())return{fullOk:!1,prefixOk:!1};try{if(yield vt(o,t,n))return o===e?{fullOk:!0,prefixOk:!1}:{fullOk:!1,prefixOk:!0,prefix:o}}catch(c){if(c?.name==="AbortError")throw c}return{fullOk:!1,prefixOk:!1}}try{if(yield vt(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(o){if(o?.name==="AbortError")throw o}let r=Et(e);if(r&&r.trim()&&r!==e)try{try{const o=yield ul(e,t,(l=n?.timeoutMs)!=null?l:G.value.worker,n?.signal);o&&o.trim()&&(r=o)}catch{}if(yield vt(r,t,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(o){if(o?.name==="AbortError")throw o}return{fullOk:!1,prefixOk:!1}})}const ft=F(()=>x.value||re.value||V.value);function un(){if(a.maxHeight==="none")return null;if(a.maxHeight!=null){const t=Number.parseFloat(String(a.maxHeight));if(Number.isFinite(t))return t}const e=Z.value;if(e){const t=getComputedStyle(e).getPropertyValue("--ms-size-code-max-height").trim(),n=Number.parseFloat(t);if(Number.isFinite(n))return n}return 500}function Xe(e,t){if(!Z.value||!v.value)return;const n=!t?.force&&a.loading!==!1&&kt(),l=v.value.querySelector("svg");if(!l)return;let r=0,o=0;const c=l.getAttribute("viewBox"),h=l.getAttribute("width"),i=l.getAttribute("height");if(c){const s=c.split(" ");s.length===4&&(r=Number.parseFloat(s[2]),o=Number.parseFloat(s[3]))}if(r&&o||h&&i&&(r=Number.parseFloat(h),o=Number.parseFloat(i)),Number.isNaN(r)||Number.isNaN(o)||r<=0||o<=0)try{const s=l.getBBox();s&&s.width>0&&s.height>0&&(r=s.width,o=s.height)}catch(s){return void console.error("Failed to get SVG BBox:",s)}if(r>0&&o>0){const s=o/r,p=e??Z.value.clientWidth,E=l.getBoundingClientRect().width,W=E>0?E:p,j=un(),X=W*s,J=j==null?X:Math.min(X,j),Ue=Math.max(J,qt());at.value=`${Math.max(X,Ue)}px`,n||zt(a.estimatedPreviewHeightPx)!=null||(q.value=`${Ue}px`)}}const le=f(!1),Ot=F(()=>({transform:`translate(${_.value}px, ${H.value}px) scale(${B.value})`}));function sn(e){e.key==="Escape"&&le.value&&$t()}function St(){var e;if(!Z.value||!se.value)return!1;if(((e=se.value.firstElementChild)==null?void 0:e.getAttribute("data-mermaid-modal-clone"))==="1")return!0;const t=Z.value.cloneNode(!0);t.dataset.mermaidModalClone="1",t.classList.add("fullscreen"),t.style.height="100%",t.style.maxHeight="100%";const n=t.querySelector("._mermaid");n&&(n.style.contain="none",n.style.contentVisibility="visible");const l=t.querySelector("[data-mermaid-wrapper]");return l&&(et.value=l,l.style.transform=Ot.value.transform),we(se.value),se.value.appendChild(t),ye(t),!0}function $t(){if(le.value=!1,se.value&&we(se.value),et.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",sn)}catch{}}function cn(){B.value<3&&(B.value+=.1)}function dn(){B.value>.5&&(B.value-=.1)}function vn(){B.value=1,_.value=0,H.value=0}function mt(e){nt.value=!0,e instanceof MouseEvent?lt.value={x:e.clientX-_.value,y:e.clientY-H.value}:lt.value={x:e.touches[0].clientX-_.value,y:e.touches[0].clientY-H.value}}function ht(e){if(!nt.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),_.value=t-lt.value.x,H.value=n-lt.value.y}function Fe(){nt.value=!1}function Fn(e){if(a.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!Z.value)return;const t=Z.value.getBoundingClientRect(),n=e.clientX-t.left,l=e.clientY-t.top,r=n-t.width/2,o=l-t.height/2,c=(r-_.value)/B.value,h=(o-H.value)/B.value,i=.01,s=-e.deltaY*i,p=Math.min(Math.max(B.value+s,.5),3);p!==B.value&&(_.value=r-c*p,H.value=o-h*p,B.value=p)}}function zn(){return T(this,null,function*(){try{const e=D.value,t={payload:{type:"copy",text:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if($("copy",t),t.defaultPrevented)return;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(e)),Je.value=!0,setTimeout(()=>{Je.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})}function An(){var e;const t=(e=v.value)==null?void 0:e.querySelector("svg");if(!t)return void console.error("SVG element not found");const n=new XMLSerializer().serializeToString(t),l={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:t,svgString:n};$("export",l),l.defaultPrevented||(function(r,o=null){T(this,null,function*(){try{const c=o??new XMLSerializer().serializeToString(r),h=new Blob([c],{type:"image/svg+xml;charset=utf-8"}),i=URL.createObjectURL(h);if(typeof document<"u"){const s=document.createElement("a");s.href=i,s.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(s),s.click(),document.body.removeChild(s)}catch{}URL.revokeObjectURL(i)}}catch(c){console.error("Failed to export SVG:",c)}})})(t,n)}function Ln(){var e,t;const n=(t=(e=v.value)==null?void 0:e.querySelector("svg"))!=null?t:null,l=n?new XMLSerializer().serializeToString(n):null,r={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:l};$("openModal",r),r.defaultPrevented||(function(){if(le.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",sn)}catch{}Y(()=>{St()||Y(St)})})()}function fn(e){const t={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};$("toggleMode",e,t),t.defaultPrevented||mn(e)}function mn(e){return T(this,null,function*(){const t=Yt.value;if(!t)return rt.value=!0,void(x.value=e==="source");const n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow="hidden",rt.value=!0,x.value=e==="source",yield Y();const l=t.scrollHeight;t.style.transition="height var(--ms-duration-standard) var(--ms-ease-standard)",t.offsetHeight,t.style.height=`${l}px`;const r=()=>{t.style.transition="",t.style.height="",t.style.overflow="",t.removeEventListener("transitionend",o)};function o(){r()}t.addEventListener("transitionend",o),setTimeout(()=>r(),220)})}function ge(e=D.value,t=a.isDark?"dark":"light",n=a.loading===!1){return{code:e,codeWithTheme:Sn(t,e),final:n,signature:`${t}\0${e}`,theme:t}}function ze(e){return e.signature===ge().signature}function Be(){return T(this,arguments,function*(e=ge()){const t=ke;if(!b(t)||!ze(e))return!1;if(re.value){const n=de.value,l=bt,r=xt;if(!n)return!1;const o=yield n;return!(!b(t)||!ze(e))&&(r===e.signature?!(!o||ve!==e.signature)||!(!e.final||a.loading!==!1||l)&&Be(e):Be(e))}if(!v.value){if(yield Y(),!b(t))return!1;if(!v.value)return console.warn("Mermaid container not ready"),!1}return!(!b(t)||!ze(e))&&(re.value=!0,bt=e.final,xt=e.signature,wt(),de.value=T(null,null,function*(){var n,l,r,o;try{const c=yield Ge();if(!b(t)||!c)return!1;const h=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;O.value||K.value||(n=c.initialize)==null||n.call(c,(r=Tn({},Bn.value),o={dompurifyConfig:Tn({},Q)},gl(r,pl(o))));const i=yield on(c,h,e.codeWithTheme,G.value.fullRender);if(!b(t)||!(function(E){return ze(E)||!E.final&&a.loading!==!1&&D.value.startsWith(E.code)})(e))return K.value&&(K.value=!1),!1;if(!v.value)return!1;const s=Ee(v.value,i?.svg,{keepPreviousOnFailure:!e.final||a.loading!==!1});if(!s)return K.value&&(K.value=!1),!1;const p=(l=i?.bindFunctions)!=null?l:null;return ie=p,ye(s.bindTarget),O.value||K.value||(At(()=>Xe()),O.value=!0,Me.value={zoom:B.value,translateX:_.value,translateY:H.value,containerHeight:q.value}),me.value[e.theme]={svg:s.svg,bindFunctions:p},K.value&&(K.value=!1),ve=e.signature,_e.value=v.value.innerHTML,N.value=!1,Ye=0,We(),!0}catch(c){if(!b(t)||!ze(e))return K.value&&(K.value=!1),!1;const h=Qt(c),i=Ye+1;return h&&i<=3?(Ye=i,Kt(Math.min(1200,600*i))):(Ye=0,We(),e.final&&a.loading===!1&&console.error("Failed to render mermaid diagram:",c),e.final&&a.loading===!1&&Jt(c)),!1}finally{bt=!1,xt="",re.value=!1,de.value=null,b(t)&&yt()}}),de.value)})}function Ae(){return T(this,null,function*(){var e;const t=D.value;if(!t.trim())return Xt()?void 0:(v.value&&we(v.value),_e.value=null,ve="",void(N.value=!1));if(!k.value||!A())return;const n=ge(t);O.value&&n.signature===ve&&((e=v.value)!=null&&e.querySelector("svg"))||(yield Be(n))&&(N.value=!1)})}function hn(e,t,n,l){return T(this,null,function*(){const r=ke;if(!b(r)||!dt()||!v.value&&(yield Y(),!b(r)||!v.value)||re.value)return;re.value=!0,wt();const o=ge(t,n),c=T(null,null,function*(){var h;try{const i=yield Ge();if(!b(r)||!i)return!1;const s=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,p=Et(e),E=p&&p.trim()?p:e,W=yield on(i,s,ln(E,n),G.value.render);if(!b(r)||he.value!==l||a.loading===!1||!dt()||!ze(o))return!1;const j=W?.svg;if(!v.value||!j)return!1;const X=Ee(v.value,j,{keepPreviousOnFailure:!0});return!!X&&(ie=(h=W?.bindFunctions)!=null?h:null,ye(X.bindTarget),At(()=>Xe()),!1)}catch{return!1}finally{de.value===c&&(re.value=!1,de.value=null),b(r)&&yt()}});return de.value=c,c})}function gn(){return T(this,null,function*(){var e;if(!A())return;const t=ke,n=Date.now(),l=++he.value;wt();try{U&&U.abort(),U=new AbortController;const r=U.signal,o=a.isDark?"dark":"light",c=D.value;if(!c.trim())return Xt()?void 0:(v.value&&we(v.value),_e.value=null,ve="",void(N.value=!1));if(ge(c,o).signature===ve)return;try{const i=yield an(c,o,{signal:r,timeoutMs:G.value.worker});if(!b(t))return;if(i.fullOk)return r.aborted||he.value!==l||!(yield Be(ge(c,o)))?void 0:void(b(t)&&he.value===l&&(N.value=!1));const s=ut&&n<=ut;if(i.prefixOk&&i.prefix&&!r.aborted&&he.value===l&&dt()&&!s)return void(yield hn(i.prefix,c,o,l))}catch(i){if(i?.name==="AbortError")return}if(!b(t)||he.value!==l||N.value)return;const h=me.value[o];if(h&&v.value){const i=Ee(v.value,h.svg);i&&(ie=(e=h.bindFunctions)!=null?e:null,ye(i.bindTarget))}}finally{b(t)&&yt()}})}function L(){Re&&(Re=!1,Te=He.value,Ct=!1,ne&&(ne.abort(),ne=null),De&&(globalThis.clearTimeout(De),De=null),it&&(Zt(it),it=null),ut=Date.now())}function Ve(){if(L(),Tt(),U){try{U.abort()}catch{}U=null}if(ne){try{ne.abort()}catch{}ne=null}We(),Ye=0}function Pt(){Pe?.abort(),Pe=null}function Dt(e=He.value){Re&&(st>=Vt.value?L():(De&&globalThis.clearTimeout(De),De=globalThis.setTimeout(()=>{it=Ut(()=>T(null,null,function*(){if(!Re)return;if(!A()||x.value||O.value)return void L();const t=a.isDark?"dark":"light",n=D.value;if(!n.trim())return a.loading===!1?void L():void Dt(Te);if(st++,st>Vt.value)L();else{ne&&ne.abort(),ne=new AbortController;try{const l=yield an(n,t,{signal:ne.signal,timeoutMs:G.value.worker});if(l.fullOk){if((yield Be(ge(n,t)))&&O.value)return void L()}else l.prefixOk&&l.prefix&&dt()&&(yield hn(l.prefix,n,t,he.value))}catch{}Te=Math.min(Math.floor(1.5*Te),Dn.value),Dt(Te)}}),{timeout:500})},e)))}function gt(){Re||fe.value&&k.value&&A()&&(x.value||O.value||(Re=!0,ut=0,Ct=!0,st=0,Te=He.value,Dt(Te)))}function pn(){return T(this,null,function*(){const e=ke;b(e)&&(yield Ge().catch(t=>{b(e)&&(k.value=!1,console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t))}),b(e)&&(yield Y(),b(e)&&(rt.value||(x.value=!k.value),A()&&(fe.value?(qe(),ot.value=D.value.length):x.value||Ae()))))})}return I(se,e=>{le.value&&e&&St()}),I(Ot,e=>{le.value&&et.value&&(et.value.style.transform=e.transform)},{immediate:!0}),I(ct,e=>{e||wn()}),I(()=>D.value,e=>{if((e.trim()||a.loading===!1)&&(O.value=!1,me.value={}),!fe.value)return L(),void(A()&&!x.value&&Ae());A()&&qe(),!x.value&&k.value&&A()?gt():L(),(function(){if(!fe.value||!x.value||!k.value)return;const t=D.value.length;t!==ot.value&&(Mt.value=!0,ot.value=t,Ne&&clearTimeout(Ne),Ne=setTimeout(()=>{Mt.value&&x.value&&D.value.trim()&&(Mt.value=!1,mn("preview"))},Pn.value))})()}),I(()=>a.isDark,()=>T(null,null,function*(){var e;if(N.value)return;const t=a.isDark?"dark":"light",n=me.value[t];if(n){if(v.value){const o=Ee(v.value,n.svg);o&&(ie=(e=n.bindFunctions)!=null?e:null,ye(o.bindTarget))}return}const l={zoom:B.value,translateX:_.value,translateY:H.value,containerHeight:q.value},r=B.value!==1||_.value!==0||H.value!==0;K.value=!0,r&&(B.value=1,_.value=0,H.value=0,yield Y()),yield Be(),r&&(yield Y(),B.value=l.zoom,_.value=l.translateX,H.value=l.translateY,q.value=l.containerHeight,Me.value=l)})),I(()=>x.value,e=>T(null,null,function*(){var t;if(e)L(),O.value&&(Me.value={zoom:B.value,translateX:_.value,translateY:H.value,containerHeight:q.value});else{if(N.value)return;const n=a.isDark?"dark":"light";if(O.value&&me.value[n]){if(yield Y(),v.value){const l=me.value[n],r=Ee(v.value,l.svg);r&&(ie=(t=l.bindFunctions)!=null?t:null,ye(r.bindTarget))}return B.value=Me.value.zoom,_.value=Me.value.translateX,H.value=Me.value.translateY,void(q.value=Me.value.containerHeight)}if(yield Y(),!k.value||!A())return;if(!fe.value)return L(),void(yield Ae());gt(),yield gn()}})),I(()=>a.loading,(e,t)=>T(null,null,function*(){var n;if(e)Pt();else if(t===!0){Pt();const l=D.value,r=l.trim();if(!r)return v.value&&we(v.value),_e.value=null,ve="",N.value=!1,Ve();if(!A())return void Ve();const o=a.isDark?"dark":"light",c=ge(l,o);if(O.value&&c.signature===ve){if(yield Y(),v.value&&!v.value.querySelector("svg")&&me.value[o]){const i=me.value[o],s=Ee(v.value,i.svg);s&&(ie=(n=i.bindFunctions)!=null?n:null,ye(s.bindTarget))}return Xe(void 0,{force:!0}),void Ve()}const h=new AbortController;Pe=h;try{let i=0;for(;;)try{yield vt(r,o,{signal:h.signal,timeoutMs:G.value.worker});break}catch(s){const p=s?.code==="WORKER_BUSY"||s?.code==="WORKER_TIMEOUT",E=s?.code==="WORKER_TIMEOUT"?2:8;if(!p||i>=E)throw s;const W=Math.min(50*kl(2,i),400);i++,yield Ce(()=>new Promise(j=>setTimeout(j,W)),{signal:h.signal})}if(!(yield Be(c)))return;N.value=!1,Ve()}catch(i){if(en(i))return;Ve(),Jt(i)}finally{Pe===h&&(Pe=null)}}})),I(Z,e=>{$e&&$e.disconnect(),e&&($e=new ResizeObserver(t=>{t&&t.length>0&&!x.value&&!V.value&&At(()=>{Xe(t[0].contentRect.width)})}),$e.observe(e))},{immediate:!0}),Zn(()=>{ee.value&&!A()||pn()}),I(()=>k.value,e=>{rt.value||(x.value=!e)}),I(()=>a.maxHeight,()=>{Y(()=>{Xe()})}),I([()=>a.estimatedPreviewHeightPx,()=>D.value],()=>{O.value||kt()||x.value||(q.value=Wt(),at.value=q.value)}),I(()=>xe.value,e=>T(null,null,function*(){e&&(P.value?(O.value||(fe.value?(qe(),ot.value=D.value.length):Ae()),a.loading||O.value||Ae(),!x.value&&k.value&&fe.value&&gt()):yield pn())}),{immediate:!1}),Kn(()=>{Ne&&clearTimeout(Ne),Tt(),$e&&$e.disconnect(),U&&(U.abort(),U=null),Pt(),L(),We(),It()}),I(()=>V.value,e=>T(null,null,function*(){e?(L(),U&&U.abort()):A()&&!O.value&&(yield Y(),fe.value?(qe(),gt()):x.value||Ae())}),{immediate:!1}),(e,t)=>(M(),C("div",{ref_key:"blockContainer",ref:Qe,class:ae(["mermaid-block-container rounded-lg border overflow-hidden",[{"is-rendering":a.loading,dark:a.isDark}]]),"data-markstream-mermaid":"1","data-markstream-mode":x.value?"fallback":O.value?"preview":"pending","data-markstream-pending":Rn.value?"true":void 0},[a.showHeader?(M(),C("div",bl,[e.$slots["header-left"]?(M(),C("div",Ml,[Rt(e.$slots,"header-left",{},void 0,!0)])):(M(),C("div",Tl,[u("span",{class:"icon-slot action-icon shrink-0",innerHTML:w(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
6
- <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M1.5 2.5c0 6 2.25 5.75 4 7 .83.67 1.17 2 1 4h3c-.17-2 .17-3.33 1-4 1.75-1.25 4-1 4-7C12 2.5 10 3 8 7 6 3 4 2.5 1.5 2.5" />
7
- </svg>
8
- `)},null,8,Cl),t[21]||(t[21]=u("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate"},"Mermaid",-1))])),e.$slots["header-center"]?(M(),C("div",Bl,[Rt(e.$slots,"header-center",{},void 0,!0)])):a.showModeToggle&&k.value?(M(),C("div",El,[u("button",{class:ae(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[x.value?"":"is-active"]]),onClick:t[0]||(t[0]=()=>fn("preview")),onMouseenter:t[1]||(t[1]=n=>R(n,w(g)("common.preview")||"Preview")),onFocus:t[2]||(t[2]=n=>R(n,w(g)("common.preview")||"Preview")),onMouseleave:S,onBlur:S},[u("div",Ol,[t[22]||(t[22]=u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("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"}),u("circle",{cx:"12",cy:"12",r:"3"})])],-1)),u("span",null,Ke(w(g)("common.preview")||"Preview"),1)])],34),u("button",{class:ae(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[x.value?"is-active":""]]),onClick:t[3]||(t[3]=()=>fn("source")),onMouseenter:t[4]||(t[4]=n=>R(n,w(g)("common.source")||"Source")),onFocus:t[5]||(t[5]=n=>R(n,w(g)("common.source")||"Source")),onMouseleave:S,onBlur:S},[u("div",Sl,[t[23]||(t[23]=u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),u("span",null,Ke(w(g)("common.source")||"Source"),1)])],34)])):pe("",!0),e.$slots["header-right"]?(M(),C("div",$l,[Rt(e.$slots,"header-right",{},void 0,!0)])):(M(),C("div",Pl,[a.showCollapseButton?(M(),C("button",{key:0,class:ae(pt),"aria-pressed":V.value,onClick:t[6]||(t[6]=n=>V.value=!V.value),onMouseenter:t[7]||(t[7]=n=>R(n,V.value?w(g)("common.expand")||"Expand":w(g)("common.collapse")||"Collapse")),onFocus:t[8]||(t[8]=n=>R(n,V.value?w(g)("common.expand")||"Expand":w(g)("common.collapse")||"Collapse")),onMouseleave:S,onBlur:S},[(M(),C("svg",{style:Ft({rotate:V.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...t[24]||(t[24]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,Dl)):pe("",!0),a.showCopyButton?(M(),C("button",{key:1,class:ae(pt),onClick:zn,onMouseenter:t[9]||(t[9]=n=>nn(n)),onFocus:t[10]||(t[10]=n=>nn(n)),onMouseleave:S,onBlur:S},[Je.value?(M(),C("svg",Fl,[...t[26]||(t[26]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(M(),C("svg",Rl,[...t[25]||(t[25]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):pe("",!0),a.showExportButton&&k.value?(M(),C("button",{key:2,class:ae(`${pt} ${ft.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":w(g)("common.export")||"Export",disabled:ft.value,onClick:An,onMouseenter:t[11]||(t[11]=n=>R(n,w(g)("common.export")||"Export")),onFocus:t[12]||(t[12]=n=>R(n,w(g)("common.export")||"Export")),onMouseleave:S,onBlur:S},[...t[27]||(t[27]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),u("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,zl)):pe("",!0),a.showFullscreenButton&&k.value?(M(),C("button",{key:3,class:ae(`${pt} ${ft.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":le.value?w(g)("common.minimize")||"Minimize":w(g)("common.open")||"Open",disabled:ft.value,onClick:Ln,onMouseenter:t[13]||(t[13]=n=>R(n,le.value?w(g)("common.minimize")||"Minimize":w(g)("common.open")||"Open")),onFocus:t[14]||(t[14]=n=>R(n,le.value?w(g)("common.minimize")||"Minimize":w(g)("common.open")||"Open")),onMouseleave:S,onBlur:S},[le.value?(M(),C("svg",jl,[...t[29]||(t[29]=[u("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)])])):(M(),C("svg",Ll,[...t[28]||(t[28]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,Al)):pe("",!0)]))])):pe("",!0),Gn(u("div",{ref_key:"modeContainerRef",ref:Yt},[x.value?(M(),C("div",_l,[u("pre",Hl,Ke(D.value),1)])):(M(),C("div",Nl,[a.showZoomControls?(M(),C("div",Il,[u("div",Yl,[u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:cn,onMouseenter:t[15]||(t[15]=n=>R(n,w(g)("common.zoomIn")||"Zoom in")),onFocus:t[16]||(t[16]=n=>R(n,w(g)("common.zoomIn")||"Zoom in")),onMouseleave:S,onBlur:S},[...t[30]||(t[30]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("circle",{cx:"11",cy:"11",r:"8"}),u("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:dn,onMouseenter:t[17]||(t[17]=n=>R(n,w(g)("common.zoomOut")||"Zoom out")),onFocus:t[18]||(t[18]=n=>R(n,w(g)("common.zoomOut")||"Zoom out")),onMouseleave:S,onBlur:S},[...t[31]||(t[31]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("circle",{cx:"11",cy:"11",r:"8"}),u("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:vn,onMouseenter:t[19]||(t[19]=n=>R(n,w(g)("common.resetZoom")||"Reset zoom")),onFocus:t[20]||(t[20]=n=>R(n,w(g)("common.resetZoom")||"Reset zoom")),onMouseleave:S,onBlur:S},Ke(Math.round(100*B.value))+"% ",33)])])):pe("",!0),u("div",yn({ref_key:"mermaidContainer",ref:Z,class:"mermaid-preview-area relative overflow-hidden block transition-[height] ease-out",style:{height:q.value}},kn(Gt.value,!0),{onMousedown:mt,onMousemove:ht,onMouseup:Fe,onMouseleave:Fe,onTouchstartPassive:mt,onTouchmovePassive:ht,onTouchendPassive:Fe}),[u("div",{"data-mermaid-wrapper":"",class:ae(["absolute inset-0 cursor-grab",{"cursor-grabbing":nt.value}]),style:Ft(Ot.value)},[u("div",{ref_key:"mermaidContent",ref:v,class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:Ft({height:at.value})},null,4)],6)],16),(M(),Qn(rl,{to:"body"},[u("div",{class:ae(["markstream-vue",{dark:a.isDark}])},[el(ll,{name:"mermaid-dialog",appear:""},{default:tl(()=>[le.value?(M(),C("div",{key:0,class:"mermaid-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:nl($t,["self"])},[u("div",ql,[u("div",Wl,[u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:cn},[...t[32]||(t[32]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("circle",{cx:"11",cy:"11",r:"8"}),u("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:dn},[...t[33]||(t[33]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("circle",{cx:"11",cy:"11",r:"8"}),u("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:vn},Ke(Math.round(100*B.value))+"% ",1),u("button",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:$t},[...t[34]||(t[34]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),u("div",yn({ref_key:"modalContent",ref:se,class:"w-full h-full flex items-center justify-center p-4 overflow-hidden"},kn(Gt.value,!0),{onMousedown:mt,onMousemove:ht,onMouseup:Fe,onMouseleave:Fe,onTouchstartPassive:mt,onTouchmovePassive:ht,onTouchendPassive:Fe}),null,16)])])):pe("",!0)]),_:1})],2)]))]))],512),[[Jn,!V.value]])],10,xl))}}),[["__scopeId","data-v-0aff75e3"]]);jt.install=d=>{d.component(jt.__name,jt)};export{jt as default};
@@ -1 +0,0 @@
1
- import{s as r,b as e,a,S as s}from"./chunk-EX3LRPZG-6_hx8rcm.js";import{_ as i}from"./mermaid.core-CsZwh_jB.js";import"./chunk-XXDRQBXY-B7Une-L7.js";import"./chunk-VR4S4FIN-Crv01XIW.js";import"./chunk-32BRIVSS-DNJ_Bmzz.js";import"./index-Bxn5yOTB.js";import"./_commonjsHelpers-CqkleIqs.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1,8 +0,0 @@
1
- import{c as r,s as e}from"./flowDiagram-23GEKE2U-CB0TxYKC.js";import{_ as a}from"./mermaid.core-CsZwh_jB.js";import"./chunk-5VM5RSS4-CqIxm4fU.js";import"./chunk-XXDRQBXY-B7Une-L7.js";import"./chunk-VR4S4FIN-Crv01XIW.js";import"./chunk-32BRIVSS-DNJ_Bmzz.js";import"./channel-Dk_xUHM6.js";import"./index-Bxn5yOTB.js";import"./_commonjsHelpers-CqkleIqs.js";var o=a(t=>`${e(t)}
2
- .swimlane.cluster rect {
3
- stroke: ${t.clusterBorder} !important;
4
- }
5
- [data-look="neo"].cluster rect {
6
- filter: none;
7
- }
8
- `,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram};