agentic-mermaid 0.5.5 → 0.5.6

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 (123) hide show
  1. package/AGENT_NATIVE.md +5 -9
  2. package/CHANGELOG.md +37 -0
  3. package/Instructions_for_agents.md +171 -97
  4. package/dist/agent-core.d.ts +7 -7
  5. package/dist/agent-core.js +1 -1
  6. package/dist/agent.d.ts +9 -10
  7. package/dist/agent.js +1 -1
  8. package/dist/agentic-mermaid-mcp.js +1 -1
  9. package/dist/am.js +1 -1
  10. package/dist/browser-lazy/chunks/{agentic-producer-core-CWRJNRIK.js → agentic-producer-core-MYYZCUJS.js} +1 -1
  11. package/dist/browser-lazy/chunks/{architecture-VU5WEHCH.js → architecture-OHEIJI33.js} +6 -6
  12. package/dist/browser-lazy/chunks/{block-Z2DOU2NP.js → block-DMBSQUFZ.js} +5 -5
  13. package/dist/browser-lazy/chunks/{builtin-backends-6UTVDXF4.js → builtin-backends-JTN3XG37.js} +2 -2
  14. package/dist/browser-lazy/chunks/{c4-6FTCDDGS.js → c4-TK5GVVGU.js} +4 -4
  15. package/dist/browser-lazy/chunks/{chunk-BCPZYXNZ.js → chunk-2R6M4CUH.js} +10 -10
  16. package/dist/browser-lazy/chunks/{chunk-Q6FTXOZS.js → chunk-3K25OV6X.js} +1 -1
  17. package/dist/browser-lazy/chunks/{chunk-UJLLOK3R.js → chunk-3QXHJBE3.js} +1 -1
  18. package/dist/browser-lazy/chunks/{chunk-3VXXFUXR.js → chunk-4G652M75.js} +1 -1
  19. package/dist/browser-lazy/chunks/{chunk-EBJK4IHL.js → chunk-4WON4RCG.js} +3 -3
  20. package/dist/browser-lazy/chunks/{chunk-WSZXZ4HF.js → chunk-5SZ2YBKG.js} +9 -9
  21. package/dist/browser-lazy/chunks/{chunk-6RXXXV66.js → chunk-CJZMMNPO.js} +1 -1
  22. package/dist/browser-lazy/chunks/{chunk-FCXWXIUB.js → chunk-F4CQMYR2.js} +4 -4
  23. package/dist/browser-lazy/chunks/{chunk-PRXEMB2V.js → chunk-GK5PSUKH.js} +3 -3
  24. package/dist/browser-lazy/chunks/{chunk-OLZVJBI5.js → chunk-HAMXYU5V.js} +1 -1
  25. package/dist/browser-lazy/chunks/{chunk-FNGOGVYM.js → chunk-IFUYPCDA.js} +6 -6
  26. package/dist/browser-lazy/chunks/{chunk-37ORXEBA.js → chunk-ILCWDEZN.js} +3 -3
  27. package/dist/browser-lazy/chunks/{chunk-LRN76QCY.js → chunk-JJFXEH35.js} +1 -1
  28. package/dist/browser-lazy/chunks/{chunk-UKIYI4IO.js → chunk-KOO3MCMJ.js} +1 -1
  29. package/dist/browser-lazy/chunks/{chunk-K6V5KN7D.js → chunk-LO25KEJY.js} +1 -1
  30. package/dist/browser-lazy/chunks/{chunk-DS3L2TY6.js → chunk-MGB5QQEH.js} +1 -1
  31. package/dist/browser-lazy/chunks/{chunk-CURBYGWU.js → chunk-NVZKY7UI.js} +7 -7
  32. package/dist/browser-lazy/chunks/{chunk-UOXZICCT.js → chunk-PA7YKMP5.js} +1 -1
  33. package/dist/browser-lazy/chunks/{chunk-AVGL6Y22.js → chunk-PS4HSV54.js} +1 -1
  34. package/dist/browser-lazy/chunks/{chunk-TWYX5NPD.js → chunk-QG67RIGQ.js} +1 -1
  35. package/dist/browser-lazy/chunks/{chunk-PRBLS664.js → chunk-QOIFBX26.js} +1 -1
  36. package/dist/browser-lazy/chunks/chunk-QQCKPJF3.js +1 -0
  37. package/dist/browser-lazy/chunks/{chunk-XJVCY4DA.js → chunk-QXSPMZ67.js} +1 -1
  38. package/dist/browser-lazy/chunks/{chunk-QRPOIILY.js → chunk-QYORAVMZ.js} +1 -1
  39. package/dist/browser-lazy/chunks/{chunk-TG7JY42H.js → chunk-SC7LXD2V.js} +1 -1
  40. package/dist/browser-lazy/chunks/{chunk-XBLK7VXJ.js → chunk-SZAI2WB4.js} +1 -1
  41. package/dist/browser-lazy/chunks/{chunk-OF4QKIRV.js → chunk-TXYQEDUF.js} +1 -1
  42. package/dist/browser-lazy/chunks/{chunk-VRXTQTLX.js → chunk-VR6YRNUZ.js} +1 -1
  43. package/dist/browser-lazy/chunks/{chunk-NIAOQ3V2.js → chunk-WNTLLJPT.js} +1 -1
  44. package/dist/browser-lazy/chunks/{chunk-TZMTDADJ.js → chunk-YYF5TS6K.js} +1 -1
  45. package/dist/browser-lazy/chunks/{class-B7ED4IO7.js → class-QOJOM2XO.js} +8 -8
  46. package/dist/browser-lazy/chunks/{er-RJO33M6U.js → er-2W6UXQT7.js} +6 -6
  47. package/dist/browser-lazy/chunks/{eventmodeling-NZJFH7CB.js → eventmodeling-IVAFIO2U.js} +9 -9
  48. package/dist/browser-lazy/chunks/{flowchart-6WEGVIJH.js → flowchart-Y6OWQ46O.js} +1 -1
  49. package/dist/browser-lazy/chunks/{gantt-3EBT47PN.js → gantt-BXTFJPZM.js} +6 -6
  50. package/dist/browser-lazy/chunks/{gitgraph-LXYWMWAG.js → gitgraph-PW6R75SQ.js} +4 -4
  51. package/dist/browser-lazy/chunks/{ishikawa-TNFYQLXS.js → ishikawa-GFX3XQQZ.js} +2 -2
  52. package/dist/browser-lazy/chunks/{journey-ATEGEGT7.js → journey-Q3M2GVKJ.js} +7 -7
  53. package/dist/browser-lazy/chunks/{kanban-4SGNSK5P.js → kanban-WVGVXROE.js} +10 -10
  54. package/dist/browser-lazy/chunks/{mindmap-5T7X3ENQ.js → mindmap-CEDNSFJ6.js} +4 -4
  55. package/dist/browser-lazy/chunks/{packet-4SQYN6UC.js → packet-Z56OVP2O.js} +3 -3
  56. package/dist/browser-lazy/chunks/{pie-HNPY7QHS.js → pie-FOJURIAM.js} +7 -7
  57. package/dist/browser-lazy/chunks/{quadrant-HG5UVCOG.js → quadrant-OGUQEK5C.js} +4 -4
  58. package/dist/browser-lazy/chunks/{radar-EIHX3Y7A.js → radar-XTAUIQIJ.js} +8 -8
  59. package/dist/browser-lazy/chunks/render-core-QRFSDWGQ.js +3 -0
  60. package/dist/browser-lazy/chunks/{requirement-PDLTNSWC.js → requirement-KEJ7ILX2.js} +7 -7
  61. package/dist/browser-lazy/chunks/{sankey-K5QOVS24.js → sankey-ODWGDRAM.js} +7 -7
  62. package/dist/browser-lazy/chunks/{sequence-CVTNAN4F.js → sequence-4ZNQR7S7.js} +1 -1
  63. package/dist/browser-lazy/chunks/{state-EMHRVZIX.js → state-6IWPVJ4C.js} +2 -2
  64. package/dist/browser-lazy/chunks/{timeline-GCGZPQWS.js → timeline-LPJMPVPV.js} +4 -4
  65. package/dist/browser-lazy/chunks/{treemap-BXAVM6C5.js → treemap-2KFOQZRA.js} +4 -4
  66. package/dist/browser-lazy/chunks/{xychart-DSHCGE3Q.js → xychart-KIPWFNVQ.js} +5 -5
  67. package/dist/browser-lazy/chunks/{zenuml-QU75FNEC.js → zenuml-2ABFLOUP.js} +8 -8
  68. package/dist/browser-lazy/index.js +1 -1
  69. package/dist/browser.global.js +375 -375
  70. package/dist/chunk-3QC3FE2X.js +4 -0
  71. package/dist/chunk-5XKELJT2.js +2 -0
  72. package/dist/chunk-7HIKKNPP.js +150 -0
  73. package/dist/chunk-A5TX2FW5.js +2 -0
  74. package/dist/{chunk-BHJZLM35.js → chunk-AS6A6XHE.js} +2 -2
  75. package/dist/{chunk-QULSM7S3.js → chunk-CGCGMO4U.js} +3 -3
  76. package/dist/{chunk-2WNJCUZG.js → chunk-GO4CS5KS.js} +28 -28
  77. package/dist/{chunk-5JQIK3AC.js → chunk-JRLCGATA.js} +3 -3
  78. package/dist/{chunk-NZQWSAD5.js → chunk-K6TYUPTW.js} +2 -2
  79. package/dist/{chunk-CPO4MGL7.js → chunk-QVP364DJ.js} +2 -2
  80. package/dist/chunk-V5RFODN6.js +2 -0
  81. package/dist/cli-PVKOWT4V.js +191 -0
  82. package/dist/elk-constructor.js +1 -1
  83. package/dist/{index-BvPnCHcw.d.ts → index-Bs7imZCS.d.ts} +3 -3
  84. package/dist/index.d.ts +4 -4
  85. package/dist/index.js +1 -1
  86. package/dist/{jsonl-RPJY6YWO.js → jsonl-5N4DTV7P.js} +2 -2
  87. package/dist/mcp-cli-EPIA7DTH.js +2 -0
  88. package/dist/{paint-certification-6UB6BRr6.d.ts → paint-certification-aIPtFDcn.d.ts} +2 -2
  89. package/dist/{server-ZKAXVFA2.js → server-X6OFY2ZN.js} +2 -2
  90. package/dist/{svg-styles-CyT8yUfG.d.ts → svg-styles-DfHloZTH.d.ts} +1 -1
  91. package/dist/svg-styles.d.ts +1 -1
  92. package/dist/svg-styles.js +1 -1
  93. package/dist/svg.d.ts +4 -4
  94. package/dist/svg.js +1 -1
  95. package/dist/{types-DMKjdWeL.d.ts → types-DkUbM48-.d.ts} +1 -1
  96. package/dist/zenuml/chunks/{appearance-UJSXEKCJ.js → appearance-ROFRJDW7.js} +1 -1
  97. package/dist/zenuml/chunks/{builtin-backends-2ETI2OTB.js → builtin-backends-LM2A6WWK.js} +3 -3
  98. package/dist/zenuml/chunks/{chunk-S2NMJ7E6.js → chunk-E6ZQYSVJ.js} +2 -2
  99. package/dist/zenuml/chunks/{chunk-O23VFGJM.js → chunk-KCHXQ5UA.js} +1 -1
  100. package/dist/zenuml/chunks/{chunk-AT55WY2L.js → chunk-TEDVLVJM.js} +1 -1
  101. package/dist/zenuml/chunks/{chunk-NGGC5EHN.js → chunk-WD3ZPN3X.js} +1 -1
  102. package/dist/zenuml/chunks/{chunk-Y7DUY2UU.js → chunk-WUHZDXTF.js} +10 -10
  103. package/dist/zenuml/chunks/{chunk-WLQR46A6.js → chunk-ZGLUBUQJ.js} +5 -5
  104. package/dist/zenuml/chunks/{render-core-MBXTLSVO.js → render-core-WTHYSKBN.js} +2 -2
  105. package/dist/zenuml/chunks/{zenuml-FDVVN4IM.js → zenuml-3TCHUQJZ.js} +7 -7
  106. package/dist/zenuml.d.ts +2 -2
  107. package/dist/zenuml.js +1 -1
  108. package/docs/api.md +1 -1
  109. package/docs/testing-strategy.md +54 -49
  110. package/examples/styles/readme-hero.md +4 -3
  111. package/package.json +2 -3
  112. package/server.json +2 -2
  113. package/skills/agentic-mermaid-diagram-workflow/SKILL.md +19 -154
  114. package/skills/agentic-mermaid-diagram-workflow/references/code-mode.md +2 -1
  115. package/dist/browser-lazy/chunks/chunk-UG33LVTQ.js +0 -1
  116. package/dist/browser-lazy/chunks/render-core-37F7UHHU.js +0 -3
  117. package/dist/chunk-BNS3NO3O.js +0 -4
  118. package/dist/chunk-BRFXOVQK.js +0 -2
  119. package/dist/chunk-E4AJQAEN.js +0 -2
  120. package/dist/chunk-VUFVLGTH.js +0 -2
  121. package/dist/chunk-ZKCI4BXW.js +0 -150
  122. package/dist/cli-6N2OYXG7.js +0 -226
  123. package/dist/mcp-cli-O4YD2NQB.js +0 -2
@@ -1 +1 @@
1
- import{G as e,_ as o}from"./chunk-XBLK7VXJ.js";var t={nodeLabel:13,edgeLabel:11,groupHeader:12},r={nodeLabel:500,edgeLabel:400,groupHeader:600},n={outerBox:1,innerBox:.75,connector:1},i={width:8,height:5,strokeWidth:.75},d={dash:4,gap:4},a={nodeLabelFontSize:t.nodeLabel,edgeLabelFontSize:t.edgeLabel,groupHeaderFontSize:t.groupHeader,nodeLabelFontWeight:r.nodeLabel,edgeLabelFontWeight:r.edgeLabel,groupHeaderFontWeight:r.groupHeader,nodePaddingX:20,nodePaddingY:10,diamondExtraPadding:24,edgeLineWidth:n.connector,groupCornerRadius:0,groupPaddingX:16,groupPaddingY:16,groupLabelPaddingX:12,groupLineWidth:n.outerBox};function g(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}function l(e,...o){for(let e of o){let o=g(e);if(null!=o&&o>0)return o}return e}function u(e,...o){for(let e of o){let o=g(e);if(null!=o&&o>=0)return o}return e}function p(...e){for(let o of e)if("string"==typeof o&&o.trim().length>0)return o}function f(...e){for(let o of e){let e=p(o)?.toLowerCase();if("uppercase"===e||"lowercase"===e||"capitalize"===e)return e}}function s(o,t){if("string"!=typeof o)return e(o,o.display,t);if(!t)return o;let r=e(o,"formatted",t),n=0,i="";for(let e of r.lines)for(let t of e)i+=o.slice(n,t.sourceStart)+t.text,n=t.sourceEnd;return i+o.slice(n)}function c(e={},o=a,t){let r=t??e.styleFace,i=r?.text,d=r?.node,s=r?.edge,h=r?.group,x=u(void 0,h?.paddingX),L=null==o.nodeCornerRadius?u(void 0,d?.cornerRadius):u(o.nodeCornerRadius,d?.cornerRadius);return{nodeLabelFontSize:l(o.nodeLabelFontSize,d?.fontSize,i?.fontSize),edgeLabelFontSize:l(o.edgeLabelFontSize,s?.fontSize,i?.fontSize),groupHeaderFontSize:l(o.groupHeaderFontSize,h?.fontSize,i?.fontSize),nodeLabelFontWeight:l(o.nodeLabelFontWeight,d?.fontWeight,i?.fontWeight),edgeLabelFontWeight:l(o.edgeLabelFontWeight,s?.fontWeight,i?.fontWeight),groupHeaderFontWeight:l(o.groupHeaderFontWeight,h?.fontWeight,i?.fontWeight),nodeTextTransform:f(d?.textTransform,i?.textTransform,o.nodeTextTransform),edgeTextTransform:f(s?.textTransform,i?.textTransform,o.edgeTextTransform),nodeLetterSpacing:g(d?.letterSpacing)??g(i?.letterSpacing)??o.nodeLetterSpacing??0,edgeLetterSpacing:g(s?.letterSpacing)??g(i?.letterSpacing)??o.edgeLetterSpacing??0,groupLetterSpacing:g(h?.letterSpacing)??g(i?.letterSpacing)??o.groupLetterSpacing??0,nodePaddingX:u(o.nodePaddingX,d?.paddingX),nodePaddingY:u(o.nodePaddingY,d?.paddingY),diamondExtraPadding:o.diamondExtraPadding??24,cornerRadius:L,nodeLineWidth:l(o.nodeLineWidth??n.innerBox,d?.lineWidth),nodeFillColor:p(d?.fillColor,o.nodeFillColor),nodeBorderColor:p(d?.borderColor,o.nodeBorderColor),nodeTextColor:p(d?.textColor,i?.textColor,o.nodeTextColor),lineWidth:l(o.edgeLineWidth,s?.lineWidth),edgeBendRadius:u(o.edgeBendRadius??0,s?.bendRadius),edgeStrokeColor:p(s?.strokeColor,o.edgeStrokeColor),edgeTextColor:p(s?.textColor,i?.textColor,o.edgeTextColor),groupFont:p(h?.fontFamily,o.groupFont),groupTextTransform:f(h?.textTransform,i?.textTransform,o.groupTextTransform),groupCornerRadius:u(o.groupCornerRadius,h?.cornerRadius),groupBorderColor:p(h?.borderColor,o.groupBorderColor),groupFillColor:p(h?.fillColor,o.groupFillColor),groupHeaderFillColor:p(h?.headerFillColor,o.groupHeaderFillColor),groupTextColor:p(h?.textColor,i?.textColor,o.groupTextColor),groupPaddingX:x??o.groupPaddingX,groupPaddingY:u(o.groupPaddingY,h?.paddingY),groupLabelPaddingX:x??o.groupLabelPaddingX??o.groupPaddingX,groupLineWidth:l(o.groupLineWidth??n.outerBox,h?.lineWidth)}}var h=18,x=600,L=12;function b(e,t){if(void 0===e)return;let r=o(e,{display:"formatted",transform:t.groupTextTransform,fontSize:h,fontWeight:x,letterSpacing:t.groupLetterSpacing,fontFamily:t.groupFont});return{text:r.text,width:r.width,height:r.height+L,block:r}}function C(e,o,t=o){let r=e.width+2*o;return{width:r,height:e.height-L+2*t,title:S(e,r,t)}}function S(e,o,t){return{text:e.text,x:o/2,y:t+(e.height-L)/2,...e.block?{block:e.block}:{}}}function F(e,o){let t=o.groupTextColor??"var(--_text)";return{id:"diagram-title",role:"title",text:e.text,block:e.block,x:e.x,y:e.y,fontSize:h,fontWeight:x,letterSpacing:o.groupLetterSpacing,anchor:"middle",paint:{fill:t},attributes:{className:"diagram-title"}}}export{t as a,r as b,n as c,i as d,d as e,a as f,s as g,c as h,h as i,x as j,L as k,b as l,C as m,S as n,F as o};
1
+ import{G as e,_ as o}from"./chunk-SZAI2WB4.js";var t={nodeLabel:13,edgeLabel:11,groupHeader:12},r={nodeLabel:500,edgeLabel:400,groupHeader:600},n={outerBox:1,innerBox:.75,connector:1},i={width:8,height:5,strokeWidth:.75},d={dash:4,gap:4},a={nodeLabelFontSize:t.nodeLabel,edgeLabelFontSize:t.edgeLabel,groupHeaderFontSize:t.groupHeader,nodeLabelFontWeight:r.nodeLabel,edgeLabelFontWeight:r.edgeLabel,groupHeaderFontWeight:r.groupHeader,nodePaddingX:20,nodePaddingY:10,diamondExtraPadding:24,edgeLineWidth:n.connector,groupCornerRadius:0,groupPaddingX:16,groupPaddingY:16,groupLabelPaddingX:12,groupLineWidth:n.outerBox};function g(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}function l(e,...o){for(let e of o){let o=g(e);if(null!=o&&o>0)return o}return e}function u(e,...o){for(let e of o){let o=g(e);if(null!=o&&o>=0)return o}return e}function p(...e){for(let o of e)if("string"==typeof o&&o.trim().length>0)return o}function f(...e){for(let o of e){let e=p(o)?.toLowerCase();if("uppercase"===e||"lowercase"===e||"capitalize"===e)return e}}function s(o,t){if("string"!=typeof o)return e(o,o.display,t);if(!t)return o;let r=e(o,"formatted",t),n=0,i="";for(let e of r.lines)for(let t of e)i+=o.slice(n,t.sourceStart)+t.text,n=t.sourceEnd;return i+o.slice(n)}function c(e={},o=a,t){let r=t??e.styleFace,i=r?.text,d=r?.node,s=r?.edge,h=r?.group,x=u(void 0,h?.paddingX),L=null==o.nodeCornerRadius?u(void 0,d?.cornerRadius):u(o.nodeCornerRadius,d?.cornerRadius);return{nodeLabelFontSize:l(o.nodeLabelFontSize,d?.fontSize,i?.fontSize),edgeLabelFontSize:l(o.edgeLabelFontSize,s?.fontSize,i?.fontSize),groupHeaderFontSize:l(o.groupHeaderFontSize,h?.fontSize,i?.fontSize),nodeLabelFontWeight:l(o.nodeLabelFontWeight,d?.fontWeight,i?.fontWeight),edgeLabelFontWeight:l(o.edgeLabelFontWeight,s?.fontWeight,i?.fontWeight),groupHeaderFontWeight:l(o.groupHeaderFontWeight,h?.fontWeight,i?.fontWeight),nodeTextTransform:f(d?.textTransform,i?.textTransform,o.nodeTextTransform),edgeTextTransform:f(s?.textTransform,i?.textTransform,o.edgeTextTransform),nodeLetterSpacing:g(d?.letterSpacing)??g(i?.letterSpacing)??o.nodeLetterSpacing??0,edgeLetterSpacing:g(s?.letterSpacing)??g(i?.letterSpacing)??o.edgeLetterSpacing??0,groupLetterSpacing:g(h?.letterSpacing)??g(i?.letterSpacing)??o.groupLetterSpacing??0,nodePaddingX:u(o.nodePaddingX,d?.paddingX),nodePaddingY:u(o.nodePaddingY,d?.paddingY),diamondExtraPadding:o.diamondExtraPadding??24,cornerRadius:L,nodeLineWidth:l(o.nodeLineWidth??n.innerBox,d?.lineWidth),nodeFillColor:p(d?.fillColor,o.nodeFillColor),nodeBorderColor:p(d?.borderColor,o.nodeBorderColor),nodeTextColor:p(d?.textColor,i?.textColor,o.nodeTextColor),lineWidth:l(o.edgeLineWidth,s?.lineWidth),edgeBendRadius:u(o.edgeBendRadius??0,s?.bendRadius),edgeStrokeColor:p(s?.strokeColor,o.edgeStrokeColor),edgeTextColor:p(s?.textColor,i?.textColor,o.edgeTextColor),groupFont:p(h?.fontFamily,o.groupFont),groupTextTransform:f(h?.textTransform,i?.textTransform,o.groupTextTransform),groupCornerRadius:u(o.groupCornerRadius,h?.cornerRadius),groupBorderColor:p(h?.borderColor,o.groupBorderColor),groupFillColor:p(h?.fillColor,o.groupFillColor),groupHeaderFillColor:p(h?.headerFillColor,o.groupHeaderFillColor),groupTextColor:p(h?.textColor,i?.textColor,o.groupTextColor),groupPaddingX:x??o.groupPaddingX,groupPaddingY:u(o.groupPaddingY,h?.paddingY),groupLabelPaddingX:x??o.groupLabelPaddingX??o.groupPaddingX,groupLineWidth:l(o.groupLineWidth??n.outerBox,h?.lineWidth)}}var h=18,x=600,L=12;function b(e,t){if(void 0===e)return;let r=o(e,{display:"formatted",transform:t.groupTextTransform,fontSize:h,fontWeight:x,letterSpacing:t.groupLetterSpacing,fontFamily:t.groupFont});return{text:r.text,width:r.width,height:r.height+L,block:r}}function C(e,o,t=o){let r=e.width+2*o;return{width:r,height:e.height-L+2*t,title:S(e,r,t)}}function S(e,o,t){return{text:e.text,x:o/2,y:t+(e.height-L)/2,...e.block?{block:e.block}:{}}}function F(e,o){let t=o.groupTextColor??"var(--_text)";return{id:"diagram-title",role:"title",text:e.text,block:e.block,x:e.x,y:e.y,fontSize:h,fontWeight:x,letterSpacing:o.groupLetterSpacing,anchor:"middle",paint:{fill:t},attributes:{className:"diagram-title"}}}export{t as a,r as b,n as c,i as d,d as e,a as f,s as g,c as h,h as i,x as j,L as k,b as l,C as m,S as n,F as o};
@@ -1 +1 @@
1
- import{Z as e,a as t,d as n}from"./chunk-PRXEMB2V.js";import{Tb as i}from"./chunk-XBLK7VXJ.js";function r(e){return t=>e(t)}function o(e){return n(e,t=>e(t))}function s(e,t={}){return{positioned:e,...t}}function a(e,n){let i=Object.freeze({...e,...n,contractVersion:2,capabilityEvidence:Object.freeze([])});return t(i),i}function u(e){if(!Number.isFinite(e))throw RangeError(`expected a finite number, got ${String(e)}`);return e}e.error.code,e.error.severity,e.warn.code,e.warn.severity,e.error.code,e.error.tier,e.warn.code,e.warn.tier;var l,f={font:"Inter",padding:40,nodeSpacing:28,layerSpacing:i,mergeEdges:!0,thoroughness:3};function d(e){let t=new Map,n=[],i=e=>{let i=t.get(e);return void 0===i&&(i=n.length,t.set(e,i),n.push([])),i};for(let t of e)n[i(t.source)].push(i(t.target));let r=new Uint32Array(n.length),o=[],s=0;return(e,i)=>{if(e===i)return!0;let a=t.get(e),u=t.get(i);if(void 0===a||void 0===u)return!1;for(0xffffffff==++s&&(r.fill(0),s=1),o.length=0,o.push(a),r[a]=s;o.length;)for(let e of n[o.pop()]){if(e===u)return!0;r[e]!==s&&(r[e]=s,o.push(e))}return!1}}function h(e){let t=[];for(let n of e)t.push({x:n.x,y:n.y,right:n.x+n.width,bottom:n.y+n.height}),t.push(...h(n.children));return t}function c(e){let t=0;for(let n=1;n<e.length;n++){let i=e[n].x-e[n-1].x,r=e[n].y-e[n-1].y;t+=Math.sqrt(i*i+r*r)}return t}function g(e){return function(e,t){if(0===e.length)return{point:{x:0,y:0},segmentIndex:0,pathDistance:0};if(1===e.length)return{point:e[0],segmentIndex:0,pathDistance:0};let n=Math.max(0,Math.min(c(e),t)),i=0;for(let t=1;t<e.length;t++){let r=e[t].x-e[t-1].x,o=e[t].y-e[t-1].y,s=Math.sqrt(r*r+o*o);if(0!==s){if(n<=s){let a=n/s;return{point:{x:e[t-1].x+a*r,y:e[t-1].y+a*o},segmentIndex:t,pathDistance:i+n}}n-=s,i+=s}}return{point:e[e.length-1],segmentIndex:e.length-1,pathDistance:i}}(e,c(e)/2).point}function p(e){return"LR"===e?{isHorizontal:!0,main:"x",cross:"y",sign:1,sourceSide:"E",targetSide:"W"}:"RL"===e?{isHorizontal:!0,main:"x",cross:"y",sign:-1,sourceSide:"W",targetSide:"E"}:"BT"===e?{isHorizontal:!1,main:"y",cross:"x",sign:-1,sourceSide:"N",targetSide:"S"}:{isHorizontal:!1,main:"y",cross:"x",sign:1,sourceSide:"S",targetSide:"N"}}function y(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function m(e,t){return e[p(t).main]}function x(e,t){return e[p(t).cross]}function b(e,t){return p(t).isHorizontal?e.height:e.width}function w(e,t){return p(t).isHorizontal?e.width:e.height}function v(e,t){return x(e,t)+b(e,t)/2}function S(e,t){return m(e,t)+w(e,t)/2}function $(e,t,n=0){return e.x<t.x+t.width+n&&e.x+e.width+n>t.x&&e.y<t.y+t.height+n&&e.y+e.height+n>t.y}function I(e,t){for(let n of e){if(n.id===t)return n;let e=I(n.children,t);if(e)return e}}function M(e){let t=globalThis.process?.env?.[e];return"1"===t||"true"===t}function E(...e){M("APL_DEBUG")&&console.error(...e)}function j(e){let t=new Map;return e.map(e=>{let n=`${e.source}->${e.target}`,i=t.get(n)??0;return t.set(n,i+1),`${n}#${i}`})}function k(e){let t=new Map;j(e).forEach((e,n)=>{t.set(e,n),e.endsWith("#0")&&t.set(e.slice(0,-2),n)});for(let n=e.length-1;n>=0;n--){let i=e[n].id;i&&t.set(i,n)}return t}function z(e,t,n,i="middle"){if(e)return{x:u(t-("start"===i?0:"end"===i?e.width:e.width/2)),y:u(n-e.height/2),w:u(e.width),h:u(e.height)}}function B(e,t,n,i,r="middle"){let o=z(e,t,n,r);return o?{labelBounds:o,labelContainer:{x:u(i.x),y:u(i.y),w:u(i.width),h:u(i.height)}}:{}}function D(e){return{id:e.id,x:u(e.x),y:u(e.y),w:u(e.width),h:u(e.height),shape:e.shape,label:e.label,...B(e.labelBlock,e.x+e.width/2,e.y+e.height/2,e)}}function H(e,t={}){let n=e.edges.map((e,t)=>({value:e,index:t})).sort((e,t)=>(e.value.edgeIndex??e.index)-(t.value.edgeIndex??t.index)).map(e=>e.value),i=j(n),r=k(n),o=new Set(e.nodes.map(e=>e.id)),s=[...e.groups];for(let e of s)o.add(e.id),s.push(...e.children);let a=new Map(n.map((e,t)=>{let n=e.id,s=i[t],a=s.replace(/#0$/,"");return[e,n&&!o.has(n)&&r.get(n)===t?n:r.get(a)===t?a:s]}));return{version:1,nodes:e.nodes.map(D),edges:e.edges.map(e=>{var n,i;let r;return n=a.get(e),i=!0===t.debug,r=e.label?e.labelPosition??g(e.points):void 0,{id:n,from:e.source,to:e.target,path:e.points.map(e=>[u(e.x),u(e.y)]),..."invisible"===e.style?{visibility:"hidden"}:{},label:e.label&&r?{x:u(r.x),y:u(r.y),text:e.label,bounds:z(e.labelBlock,r.x,r.y)}:void 0,...i&&e.routeCertificate?{route:e.routeCertificate}:{}}}),groups:function(e,t){let n=[],i=(e,t)=>t.x>=e.x-.5&&t.y>=e.y-.5&&t.x+t.width<=e.x+e.width+.5&&t.y+t.height<=e.y+e.height+.5,r=(e,o)=>{let s=e.nodeIds?new Set(e.nodeIds):void 0,a=t.filter(t=>s?s.has(t.id):i(e,t)&&!e.children.some(e=>i(e,t))).map(e=>e.id);for(let t of(n.push({id:e.id,x:u(e.x),y:u(e.y),w:u(e.width),h:u(e.height),members:a,label:e.label,...o?{parentId:o}:{}}),e.children))r(t,e.id)};for(let t of e)r(t);return n}(e.groups,e.nodes),bounds:{w:u(e.width),h:u(e.height)}}}function A(e){return l?.family===e}function O(e,t,n,i){let r=l;l={family:e,observer:t,mutations:i?.mutations?new Set(i.mutations):void 0};try{let e=n();if(null!==e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then)throw Promise.resolve(e).catch(()=>{}),TypeError("Parser observation scopes must be synchronous");return e}finally{l=r}}function P(e,t){let n=l;if(!(!n||n.family!==e)){l=void 0;try{n.observer(t)}finally{l=n}}}function L(e,t,n,i){A(e)&&P(e,{family:e,unit:"statement",kind:t,text:n,...i?{source:{...i}}:{}})}function N(e,t,n,i){A(e)&&P(e,{family:e,unit:"token",kind:t,text:n,...i?{source:{...i}}:{}})}function R(e,t,n,i){A(e)&&(l?.mutations&&!l.mutations.has(t)||P(e,{family:e,unit:"mutation",kind:t,value:function e(t,n=new Map,i="$"){let r;if(null==t)return null;if("number"==typeof t)return Number.isFinite(t)?t:{$number:String(t)};if("string"==typeof t||"boolean"==typeof t)return t;if("object"!=typeof t)return String(t);let o=n.get(t);if(void 0!==o)return{$ref:o};if(n.set(t,i),t instanceof Date)r=t.toISOString();else if(t instanceof Map)r=[...t].map(([t,r],o)=>[e(t,n,`${i}.${o}.0`),e(r,n,`${i}.${o}.1`)]);else if(t instanceof Set)r=[...t].map((t,r)=>e(t,n,`${i}.${r}`));else if(Array.isArray(t))r=t.map((t,r)=>e(t,n,`${i}.${r}`));else{let o=Object.create(null);for(let[r,s]of Object.entries(t))"function"!=typeof s&&void 0!==s&&(o[r]=e(s,n,`${i}.${r}`));r=o}return n.delete(t),r}(n),...i?{source:{...i}}:{}}))}export{r as a,o as b,s as c,a as d,A as e,O as f,L as g,N as h,R as i,u as j,f as k,d as l,h as m,c as n,g as o,p as p,y as q,m as r,x as s,b as t,w as u,v as v,S as w,$ as x,I as y,M as z,E as A,k as B,z as C,B as D,H as E};
1
+ import{Z as e,a as t,d as n}from"./chunk-GK5PSUKH.js";import{Tb as i}from"./chunk-SZAI2WB4.js";function r(e){return t=>e(t)}function o(e){return n(e,t=>e(t))}function s(e,t={}){return{positioned:e,...t}}function a(e,n){let i=Object.freeze({...e,...n,contractVersion:2,capabilityEvidence:Object.freeze([])});return t(i),i}function u(e){if(!Number.isFinite(e))throw RangeError(`expected a finite number, got ${String(e)}`);return e}e.error.code,e.error.severity,e.warn.code,e.warn.severity,e.error.code,e.error.tier,e.warn.code,e.warn.tier;var l,f={font:"Inter",padding:40,nodeSpacing:28,layerSpacing:i,mergeEdges:!0,thoroughness:3};function d(e){let t=new Map,n=[],i=e=>{let i=t.get(e);return void 0===i&&(i=n.length,t.set(e,i),n.push([])),i};for(let t of e)n[i(t.source)].push(i(t.target));let r=new Uint32Array(n.length),o=[],s=0;return(e,i)=>{if(e===i)return!0;let a=t.get(e),u=t.get(i);if(void 0===a||void 0===u)return!1;for(0xffffffff==++s&&(r.fill(0),s=1),o.length=0,o.push(a),r[a]=s;o.length;)for(let e of n[o.pop()]){if(e===u)return!0;r[e]!==s&&(r[e]=s,o.push(e))}return!1}}function h(e){let t=[];for(let n of e)t.push({x:n.x,y:n.y,right:n.x+n.width,bottom:n.y+n.height}),t.push(...h(n.children));return t}function c(e){let t=0;for(let n=1;n<e.length;n++){let i=e[n].x-e[n-1].x,r=e[n].y-e[n-1].y;t+=Math.sqrt(i*i+r*r)}return t}function g(e){return function(e,t){if(0===e.length)return{point:{x:0,y:0},segmentIndex:0,pathDistance:0};if(1===e.length)return{point:e[0],segmentIndex:0,pathDistance:0};let n=Math.max(0,Math.min(c(e),t)),i=0;for(let t=1;t<e.length;t++){let r=e[t].x-e[t-1].x,o=e[t].y-e[t-1].y,s=Math.sqrt(r*r+o*o);if(0!==s){if(n<=s){let a=n/s;return{point:{x:e[t-1].x+a*r,y:e[t-1].y+a*o},segmentIndex:t,pathDistance:i+n}}n-=s,i+=s}}return{point:e[e.length-1],segmentIndex:e.length-1,pathDistance:i}}(e,c(e)/2).point}function p(e){return"LR"===e?{isHorizontal:!0,main:"x",cross:"y",sign:1,sourceSide:"E",targetSide:"W"}:"RL"===e?{isHorizontal:!0,main:"x",cross:"y",sign:-1,sourceSide:"W",targetSide:"E"}:"BT"===e?{isHorizontal:!1,main:"y",cross:"x",sign:-1,sourceSide:"N",targetSide:"S"}:{isHorizontal:!1,main:"y",cross:"x",sign:1,sourceSide:"S",targetSide:"N"}}function y(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function m(e,t){return e[p(t).main]}function x(e,t){return e[p(t).cross]}function b(e,t){return p(t).isHorizontal?e.height:e.width}function w(e,t){return p(t).isHorizontal?e.width:e.height}function v(e,t){return x(e,t)+b(e,t)/2}function S(e,t){return m(e,t)+w(e,t)/2}function $(e,t,n=0){return e.x<t.x+t.width+n&&e.x+e.width+n>t.x&&e.y<t.y+t.height+n&&e.y+e.height+n>t.y}function I(e,t){for(let n of e){if(n.id===t)return n;let e=I(n.children,t);if(e)return e}}function M(e){let t=globalThis.process?.env?.[e];return"1"===t||"true"===t}function E(...e){M("APL_DEBUG")&&console.error(...e)}function j(e){let t=new Map;return e.map(e=>{let n=`${e.source}->${e.target}`,i=t.get(n)??0;return t.set(n,i+1),`${n}#${i}`})}function k(e){let t=new Map;j(e).forEach((e,n)=>{t.set(e,n),e.endsWith("#0")&&t.set(e.slice(0,-2),n)});for(let n=e.length-1;n>=0;n--){let i=e[n].id;i&&t.set(i,n)}return t}function z(e,t,n,i="middle"){if(e)return{x:u(t-("start"===i?0:"end"===i?e.width:e.width/2)),y:u(n-e.height/2),w:u(e.width),h:u(e.height)}}function B(e,t,n,i,r="middle"){let o=z(e,t,n,r);return o?{labelBounds:o,labelContainer:{x:u(i.x),y:u(i.y),w:u(i.width),h:u(i.height)}}:{}}function H(e){return{id:e.id,x:u(e.x),y:u(e.y),w:u(e.width),h:u(e.height),shape:e.shape,label:e.label,...B(e.labelBlock,e.x+e.width/2,e.y+e.height/2,e)}}function A(e,t={}){let n=e.edges.map((e,t)=>({value:e,index:t})).sort((e,t)=>(e.value.edgeIndex??e.index)-(t.value.edgeIndex??t.index)).map(e=>e.value),i=j(n),r=k(n),o=new Set(e.nodes.map(e=>e.id)),s=[...e.groups];for(let e of s)o.add(e.id),s.push(...e.children);let a=new Map(n.map((e,t)=>{let n=e.id,s=i[t],a=s.replace(/#0$/,"");return[e,n&&!o.has(n)&&r.get(n)===t?n:r.get(a)===t?a:s]}));return{version:1,nodes:e.nodes.map(H),edges:e.edges.map(e=>{var n,i;let r;return n=a.get(e),i=!0===t.debug,r=e.label?e.labelPosition??g(e.points):void 0,{id:n,from:e.source,to:e.target,path:e.points.map(e=>[u(e.x),u(e.y)]),..."invisible"===e.style?{visibility:"hidden"}:{},label:e.label&&r?{x:u(r.x),y:u(r.y),text:e.label,bounds:z(e.labelBlock,r.x,r.y)}:void 0,...i&&e.routeCertificate?{route:e.routeCertificate}:{}}}),groups:function(e,t){let n=[],i=(e,t)=>t.x>=e.x-.5&&t.y>=e.y-.5&&t.x+t.width<=e.x+e.width+.5&&t.y+t.height<=e.y+e.height+.5,r=(e,o)=>{let s=e.nodeIds?new Set(e.nodeIds):void 0,a=t.filter(t=>s?s.has(t.id):i(e,t)&&!e.children.some(e=>i(e,t))).map(e=>e.id);for(let t of(n.push({id:e.id,x:u(e.x),y:u(e.y),w:u(e.width),h:u(e.height),members:a,label:e.label,...o?{parentId:o}:{}}),e.children))r(t,e.id)};for(let t of e)r(t);return n}(e.groups,e.nodes),bounds:{w:u(e.width),h:u(e.height)}}}function D(e){return l?.family===e}function O(e,t,n,i){let r=l;l={family:e,observer:t,mutations:i?.mutations?new Set(i.mutations):void 0};try{let e=n();if(null!==e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then)throw Promise.resolve(e).catch(()=>{}),TypeError("Parser observation scopes must be synchronous");return e}finally{l=r}}function P(e,t){let n=l;if(!(!n||n.family!==e)){l=void 0;try{n.observer(t)}finally{l=n}}}function N(e,t,n,i){D(e)&&P(e,{family:e,unit:"statement",kind:t,text:n,...i?{source:{...i}}:{}})}function T(e,t,n,i){D(e)&&P(e,{family:e,unit:"token",kind:t,text:n,...i?{source:{...i}}:{}})}function W(e,t,n,i){D(e)&&(l?.mutations&&!l.mutations.has(t)||P(e,{family:e,unit:"mutation",kind:t,value:function e(t,n=new Map,i="$"){let r;if(null==t)return null;if("number"==typeof t)return Number.isFinite(t)?t:{$number:String(t)};if("string"==typeof t||"boolean"==typeof t)return t;if("object"!=typeof t)return String(t);let o=n.get(t);if(void 0!==o)return{$ref:o};if(n.set(t,i),t instanceof Date)r=t.toISOString();else if(t instanceof Map)r=[...t].map(([t,r],o)=>[e(t,n,`${i}.${o}.0`),e(r,n,`${i}.${o}.1`)]);else if(t instanceof Set)r=[...t].map((t,r)=>e(t,n,`${i}.${r}`));else if(Array.isArray(t))r=t.map((t,r)=>e(t,n,`${i}.${r}`));else{let o=Object.create(null);for(let[r,s]of Object.entries(t))"function"!=typeof s&&void 0!==s&&(o[r]=e(s,n,`${i}.${r}`));r=o}return n.delete(t),r}(n),...i?{source:{...i}}:{}}))}export{r as a,o as b,s as c,a as d,D as e,O as f,N as g,T as h,W as i,u as j,f as k,d as l,h as m,c as n,g as o,p as p,y as q,m as r,x as s,b as t,w as u,v as v,S as w,$ as x,I as y,M as z,E as A,k as B,z as C,B as D,A as E};
@@ -1,3 +1,3 @@
1
- import{i as t,j as e,k as o}from"./chunk-37ORXEBA.js";function h(h,n,i,r,s,a){let d=r.font??"Inter",p=t(r);return{family:n,width:i.width,height:i.height,colors:r,transparent:s,parts:[h.documentOpen({id:"prelude",width:i.width,height:i.height,colors:r,transparent:s,font:d,hasMonoFont:!1},`${o(i.width,i.height,r,s)}
1
+ import{i as t,j as e,k as o}from"./chunk-ILCWDEZN.js";function h(h,n,i,r,s,a){let d=r.font??"Inter",p=t(r);return{family:n,width:i.width,height:i.height,colors:r,transparent:s,parts:[h.documentOpen({id:"prelude",width:i.width,height:i.height,colors:r,transparent:s,font:d,hasMonoFont:!1},`${o(i.width,i.height,r,s)}
2
2
  ${e(d,!1,r.shadow,r.embedFontImport)}${p?`
3
3
  <defs>${p}</defs>`:""}`),...a,h.documentClose()]}}export{h as a};
@@ -1,3 +1,3 @@
1
- import{a as e,c as t}from"./chunk-MFTQWHUB.js";import{d as r,e as o,f as i,h as n,m as a,p as l}from"./chunk-AVGL6Y22.js";import{b as d,c as s,d as h}from"./chunk-UKIYI4IO.js";import{o as c}from"./chunk-UJLLOK3R.js";import{c as p,na as g,oa as u}from"./chunk-PRXEMB2V.js";import{i as f,j as k,k as m,u as y}from"./chunk-37ORXEBA.js";import{c as x,e as $,h as b,o as w}from"./chunk-Q6FTXOZS.js";import{C as S,G as v,N as C,O as M,a as A,tb as _}from"./chunk-XBLK7VXJ.js";function B(p,B,L){let{positioned:W,colors:j,resolved:z}=B,E=z.renderOptions,R=j.font??"Inter",N=E.transparent??!1,P=[],I=z.familyAppearance?.visual??E.stateVisual,H=b(E,I?.styleDefaults,z.styleFace);P.push(p.documentOpen({id:"prelude",width:W.width,height:W.height,colors:j,transparent:N,font:R,hasMonoFont:!1},m(W.width,W.height,j,N)+`
2
- `+k(R,!1,j.shadow,j.embedFontImport)));let O=[];O.push("<defs>");let T=f(j);T&&O.push(T);let X=new Set,V=new Set;H.edgeStrokeColor&&X.add(H.edgeStrokeColor);let D=!1,K=!1;for(let e of W.edges)e.inlineStyle?.stroke&&X.add(e.inlineStyle.stroke),e.inlineStyle?.["stroke-width"]&&V.add(e.inlineStyle.stroke??H.edgeStrokeColor),("circle"===e.startMarker||"circle"===e.endMarker)&&(D=!0),("cross"===e.startMarker||"cross"===e.endMarker)&&(K=!0);let U=r(X,V,D,K);for(let e of(O.splice(1,0,y(U)),O.push("</defs>"),P.push(p.definitions({id:"defs",markerResources:U},O.join(`
3
- `))),W.title&&P.push(p.text(w(W.title,H))),L?.surfaces===!1?[]:W.groups))P.push(function e(t,r,o,i,n){if(r.concurrencyRegion)return t.group({id:`group:${r.id}`,role:"group",open:`<g class="concurrency-region" data-id="${C(r.id)}"${n?` data-parent-id="${C(n)}"`:""}>`,close:"</g>",children:r.children.map(n=>({indent:0,node:e(t,n,o,i,r.id)}))});let a=r.labelBlock??d(S(r.label,r.labelContent),i,"group"),l=r.headerHeight??i.groupHeaderFontSize+16+a.height-a.lineHeight,s=[],h=`<g class="subgraph" data-id="${C(r.id)}" data-region="subgraph" data-label="${M(r.label)}"${n?` data-parent-id="${C(n)}"`:""}>`,c=r.inlineStyle,p=c?.fill??i.groupFillColor??"var(--_group-fill)",g=c?.stroke??i.groupBorderColor??"var(--_node-stroke)",u=c?.["stroke-width"]??String(i.groupLineWidth);s.push({indent:2,node:t.shape({id:`group-rect:${r.id}`,role:"group",geometry:{kind:"rect",x:r.x,y:r.y,width:r.width,height:r.height,rx:i.groupCornerRadius,ry:i.groupCornerRadius},paint:{fill:p,stroke:g,strokeWidth:u}})});let f=i.groupHeaderFillColor??"var(--_group-hdr)",k=_(r.x,r.y,r.width,l,i.groupCornerRadius);s.push({indent:2,node:t.shape({id:`group-header:${r.id}`,role:"group-header",geometry:{kind:"path",d:k},paint:{fill:f,stroke:g,strokeWidth:u}})});let m=a.text,y=c?.color??i.groupTextColor??"var(--_text-sec)";for(let e of(s.push({indent:2,node:t.text({id:`group-label:${r.id}`,role:"group-header",text:m,block:a,x:r.x+i.groupLabelPaddingX,y:r.y+l/2,fontSize:i.groupHeaderFontSize,anchor:"start",paint:{fill:y}})}),function(e,t){let r=e.children.filter(e=>e.concurrencyRegion);if(r.length<2)return[];let o=e=>Math.max(...r.map(e))-Math.min(...r.map(e)),i=o(e=>e.x+e.width/2)>=o(e=>e.y+e.height/2),n=[...r].sort((e,t)=>i?e.x-t.x:e.y-t.y),a=[];for(let r=1;r<n.length;r++){let o=n[r-1],l=n[r];if(i){let i=(o.x+o.width+l.x)/2;a.push({index:r-1,x1:i,y1:e.y+t+4,x2:i,y2:e.y+e.height-4})}else{let t=(o.y+o.height+l.y)/2;a.push({index:r-1,x1:e.x+4,y1:t,x2:e.x+e.width-4,y2:t})}}return a}(r,l)))s.push({indent:2,node:t.shape({id:`region-separator:${r.id}:${e.index}`,role:"group",geometry:{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},paint:{stroke:g,strokeWidth:String(i.groupLineWidth),strokeDasharray:"6 4"},attributes:{className:"region-separator"}})});for(let n of r.children)s.push({indent:0,node:e(t,n,o,i,r.id)});return t.group({id:`group:${r.id}`,role:"group",open:h,close:"</g>",children:s})}(p,e,R,H));L?.beforeEdges&&P.push(...L.beforeEdges());let Z=new Set(W.nodes.map(e=>e.id)),G=e=>e.forEach(e=>{Z.add(e.id),G(e.children)});G(W.groups);let J=new Map,Q=new Map;for(let e of W.edges){if(e.points.length<2)continue;let t=`${e.source}->${e.target}`,r=J.get(t)??0;J.set(t,r+1);let a=`edge:${t}#${r}`;Q.set(e,a);let l=void 0===e.id||Z.has(e.id)?a:e.id;P.push(function(e,t,r,a,l,d){let s="dotted"===t.style?"dotted":"thick"===t.style?"thick":"invisible"===t.style?"invisible":"solid",h=F(a),p=t.labelPosition??c(t.points),g=r.edgeTextColor??"var(--_text-sec)",u=t.label?[{id:`${a}:label`,text:t.label,textContent:{value:t.label,prepared:v(S(t.label,t.labelContent))},anchor:p,paint:{fill:g},fontSize:r.edgeLabelFontSize,textAnchor:"middle",visual:{kind:"companion",markId:`${h}:text`}}]:[],f=(t.classNames??[]).map(e=>e.replace(/[^A-Za-z0-9_-]/g,"")).filter(Boolean),k={identity:{id:l,...f.length?{classNames:f}:{}},endpoints:{from:t.source,to:t.target},relationship:{kind:"flowchart-edge",direction:t.source===t.target?"self":t.hasArrowStart&&t.hasArrowEnd?"bidirectional":t.hasArrowStart?"reverse":t.hasArrowEnd?"forward":"undirected"},route:{ownership:"layout",bendRadius:r.edgeBendRadius,labelAnchors:t.labelPosition?[t.labelPosition]:[]},labels:u};if("invisible"===t.style)return e.connector({id:a,role:"edge",geometry:{kind:"polyline",points:t.points},lineStyle:"invisible",paint:{},...k});let m=n(t,r),y="dotted"===t.style?`${$.dash} ${$.gap}`:t.animate?"8 4":void 0,x="thick"===t.style?2*r.lineWidth:r.lineWidth,b=t.inlineStyle?.stroke??r.edgeStrokeColor,w=`${b?`-${i(b)}`:""}${t.inlineStyle?.["stroke-width"]?"-fixed":""}`,C,M;if(t.hasArrowEnd){let e=o(t.endMarker??"arrow");if(!(C=d.find(t=>t.id===`${e}${w}`)))throw Error(`Missing marker resource "${e}${w}"`)}if(t.hasArrowStart){let e=o(t.startMarker??"arrow");if(!(M=d.find(t=>t.id===`${e}-start${w}`)))throw Error(`Missing marker resource "${e}-start${w}"`)}let _={className:["edge",...f].join(" "),data:{style:t.style,"arrow-start":String(t.hasArrowStart),"arrow-end":String(t.hasArrowEnd),...t.hasArrowStart?{"marker-start":t.startMarker??"arrow"}:{},...t.hasArrowEnd?{"marker-end":t.endMarker??"arrow"}:{},...t.label?{label:A(t.label)}:{},...t.curve?{curve:t.curve}:{},...t.animate?{animate:"true",animation:t.animation??"slow"}:{}}},B={stroke:b??"var(--_line)",strokeWidth:t.inlineStyle?.["stroke-width"]??String(x),...y?{strokeDasharray:y}:{}};if(r.edgeBendRadius>0||t.curve){if(!m)throw Error(`Missing path projection for flowchart edge "${a}"`);return e.connector({id:a,role:"edge",geometry:m.geometry,lineStyle:s,paint:B,markers:{...M?{start:M}:{},mid:[],...C?{end:C}:{}},...k,route:{...k.route,contours:m.contours},attributes:_})}return e.connector({id:a,role:"edge",geometry:{kind:"polyline",points:t.points},lineStyle:s,paint:B,markers:{...M?{start:M}:{},mid:[],...C?{end:C}:{}},...k,attributes:_})}(p,e,H,a,l,U))}for(let e of W.edges){let t=Q.get(e);L?.edgeLabels!==!1&&e.label&&t&&P.push(function(e,t,r,o,i){let n=t.labelPosition??c(t.points),a=t.labelBlock??d(S(t.label,t.labelContent),o,"edge"),l=a.text,p=s+h(t,o.lineWidth),g=a.width+2*p,u=a.height+2*p,f=n.x-g/2,k=n.y-u/2,m=e.shape({id:`${i}:halo`,role:"chrome",geometry:{kind:"rect",x:f,y:k,width:g,height:u,rx:4,ry:4},paint:{fill:"var(--bg)",stroke:"none"},attributes:{className:"edge-label-halo"}}),y=a.width+2*s,x=a.height+2*s,$=e.shape({id:`${i}:pill`,role:"chrome",geometry:{kind:"rect",x:n.x-y/2,y:n.y-x/2,width:y,height:x,rx:2,ry:2},paint:{fill:"var(--bg)",stroke:"var(--_inner-stroke)",strokeWidth:"1"}}),b=o.edgeTextColor??"var(--_text-sec)",w=e.text({id:`${i}:text`,role:"label",text:l,block:a,x:n.x,y:n.y,fontSize:o.edgeLabelFontSize,anchor:"middle",paint:{fill:b}});return e.group({id:i,role:"edge-label",open:`<g class="edge-label" data-from="${C(t.source)}" data-to="${C(t.target)}" data-label="${M(t.label)}">`,close:"</g>",children:[{indent:2,node:m},{indent:2,node:$},{indent:2,node:w}]})}(p,e,0,H,F(t)))}for(let r of L?.surfaces===!1?[]:W.nodes)P.push(function(r,o,i,n,s,h){let c=function(e,t,r){let{x:o,y:i,width:n,height:l,shape:d,inlineStyle:s}=t,h=a(t,{fill:s?.fill??r.nodeFillColor??"var(--_node-fill)",stroke:s?.stroke??r.nodeBorderColor??"var(--_node-stroke)",strokeWidth:s?.["stroke-width"]??String(r.nodeLineWidth)},r.cornerRadius);return e.shape({id:`node-shape:${t.id}`,role:"state-note"===t.shape?"note":"node",geometry:h.geometry,paint:h.paint,...h.childPaints?{childPaints:h.childPaints}:{}})}(r,o,n),p=function(e,t,r){let o=t.nodeTextColor??(e.inlineStyle?.fill||!l(e)?"var(--_text)":u("var(--_text)",t.nodeFillColor??"var(--_node-fill)",r));return g(e.inlineStyle,o)}(o,n,s),f=function(e,t,r,o,i){if(("state-start"===t.shape||"state-end"===t.shape||"state-fork"===t.shape||"state-join"===t.shape||"state-choice"===t.shape)&&!t.label)return null;let n=t.x+t.width/2,a=t.y+t.height/2,l=t.labelBlock??d(S(t.label,t.labelContent),o,"node"),s=l.text;return e.text({id:`node-label:${t.id}`,role:"label",text:s,block:l,x:n,y:a,fontSize:o.nodeLabelFontSize,anchor:"middle",paint:{fill:i}})}(r,o,0,n,p),k=(o.classNames??[]).map(e=>e.replace(/[^A-Za-z0-9_-]/g,"")).filter(Boolean),m=["node",..."state-note"===o.shape?["state-note"]:[],...k].join(" "),y="state-start"===o.shape?{status:"start"}:"state-end"===o.shape?{status:"end"}:void 0,x=[{indent:2,node:c}],$=function(r,o,i){let n=Math.min(28,.4*o.height),a=o.x+o.width/2,l=o.y+6;if(o.icon){let d=t(o.icon);if(d){let e=n/24;return r.pathArtwork({id:`node:${o.id}:icon`,paths:d.paths,owner:{id:o.id,role:"node"},open:`<g class="flowchart-icon" data-icon="${C(o.icon)}" transform="translate(${a-n/2} ${l}) scale(${e})">`,transform:{kind:"matrix",a:e,b:0,c:0,d:e,e:a-n/2,f:l},paint:{fill:i,stroke:i,strokeWidth:"0.8"}})}let s=e(o.icon);return r.text({id:`node:${o.id}:icon`,role:"icon",owner:{id:o.id,role:"node"},text:s,block:o.iconFallbackBlock,x:a,y:l+n/2,fontSize:10,anchor:"middle",paint:{fill:i},baselineShift:0,attributes:{className:"flowchart-icon-fallback",data:{icon:o.icon}}})}if(o.image){let e=a-n/2,t=`M${e+2} ${l+.66*n}L${e+.36*n} ${l+.36*n}L${e+.52*n} ${l+.5*n}L${e+.7*n} ${l+.32*n}L${e+n-2} ${l+.66*n}`,d={fill:"none",stroke:i,strokeWidth:"1.2"},s={id:o.id,role:"node"};return r.group({id:`node:${o.id}:image`,role:"icon",owner:s,open:`<g class="flowchart-image-placeholder" data-image-src="${C(o.image)}">`,close:"</g>",join:"",children:[{indent:0,node:r.shape({id:`node:${o.id}:image:frame`,role:"icon",owner:s,geometry:{kind:"rect",x:e,y:l,width:n,height:.72*n,rx:2},paint:d})},{indent:0,node:r.shape({id:`node:${o.id}:image:sun`,role:"icon",owner:s,geometry:{kind:"circle",cx:e+.72*n,cy:l+.2*n,r:.08*n},paint:d})},{indent:0,node:r.shape({id:`node:${o.id}:image:landscape`,role:"icon",owner:s,geometry:{kind:"path",d:t},paint:d})}]})}return null}(r,o,p);$&&x.push({indent:2,node:$}),f&&x.push({indent:2,node:f});let b=o.semanticShape?` data-semantic-shape="${C(o.semanticShape)}"`:"",w=h&&o.href?` data-href="${C(o.href)}" role="link" tabindex="0"`:"",v=void 0===o.floatingNoteId?"":` data-floating-note-id="${C(o.floatingNoteId)}"`;return r.group({id:`node:${o.id}`,role:"state-note"===o.shape?"note":"node",open:`<g class="${m}" data-id="${C(o.id)}" data-label="${M(o.label)}" data-shape="${o.shape}"${b}${w}${v}>`,close:"</g>",children:x,channels:y})}(p,r,0,H,j,"strict"!==E.security));for(let e of W.notes??[])P.push(function(e,t,r,o){let{x:i,y:n,width:a,height:l}=t,s=o.groupHeaderFillColor??"var(--_group-hdr)",h=o.groupBorderColor??"var(--_node-stroke)",c=o.edgeTextColor??"var(--_text-sec)",p=t.textBlock??d(S(t.text,t.textContent),o,"note"),g=p.text,u=`state-note:${t.id}`;return e.group({id:u,role:"note",open:`<g class="state-note" data-id="${C(t.id)}" data-target="${C(t.target)}" data-side="${t.side}">`,close:"</g>",children:[{indent:2,node:e.shape({id:`${u}:rect`,role:"note",geometry:{kind:"rect",x:i,y:n,width:a,height:l,rx:4,ry:4},paint:{fill:s,stroke:h,strokeWidth:String(x.innerBox)}})},{indent:2,node:e.text({id:`${u}:text`,role:"label",text:g,block:p,x:i+a/2,y:n+l/2,fontSize:o.edgeLabelFontSize,anchor:"middle",paint:{fill:c}})}]})}(p,e,0,H));return P.push(p.documentClose()),{family:"flowchart",width:W.width,height:W.height,colors:j,transparent:N,parts:P}}function F(e){return e.startsWith("edge:")?`edge-label:${e.slice(5)}`:`${e}:label`}var L=p(B);export{B as a,L as b};
1
+ import{a as e,c as t}from"./chunk-MFTQWHUB.js";import{d as r,e as o,f as i,h as n,m as a,p as l}from"./chunk-PS4HSV54.js";import{b as d,c as s,d as h}from"./chunk-KOO3MCMJ.js";import{o as c}from"./chunk-3QXHJBE3.js";import{c as p,na as g,oa as u}from"./chunk-GK5PSUKH.js";import{i as f,j as k,k as m,u as y}from"./chunk-ILCWDEZN.js";import{c as x,e as $,h as b,o as w}from"./chunk-3K25OV6X.js";import{C as S,G as v,N as C,O as M,a as W,tb as _}from"./chunk-SZAI2WB4.js";function A(p,A,F){let{positioned:j,colors:z,resolved:E}=A,L=E.renderOptions,N=z.font??"Inter",H=L.transparent??!1,P=[],R=E.familyAppearance?.visual??L.stateVisual,I=b(L,R?.styleDefaults,E.styleFace);P.push(p.documentOpen({id:"prelude",width:j.width,height:j.height,colors:z,transparent:H,font:N,hasMonoFont:!1},m(j.width,j.height,z,H)+`
2
+ `+k(N,!1,z.shadow,z.embedFontImport)));let O=[];O.push("<defs>");let T=f(z);T&&O.push(T);let D=new Set,K=new Set;I.edgeStrokeColor&&D.add(I.edgeStrokeColor);let Z=!1,V=!1;for(let e of j.edges)e.inlineStyle?.stroke&&D.add(e.inlineStyle.stroke),e.inlineStyle?.["stroke-width"]&&K.add(e.inlineStyle.stroke??I.edgeStrokeColor),("circle"===e.startMarker||"circle"===e.endMarker)&&(Z=!0),("cross"===e.startMarker||"cross"===e.endMarker)&&(V=!0);let X=r(D,K,Z,V);for(let e of(O.splice(1,0,y(X)),O.push("</defs>"),P.push(p.definitions({id:"defs",markerResources:X},O.join(`
3
+ `))),j.title&&P.push(p.text(w(j.title,I))),F?.surfaces===!1?[]:j.groups))P.push(function e(t,r,o,i,n){if(r.concurrencyRegion)return t.group({id:`group:${r.id}`,role:"group",open:`<g class="concurrency-region" data-id="${C(r.id)}"${n?` data-parent-id="${C(n)}"`:""}>`,close:"</g>",children:r.children.map(n=>({indent:0,node:e(t,n,o,i,r.id)}))});let a=r.labelBlock??d(S(r.label,r.labelContent),i,"group"),l=r.headerHeight??i.groupHeaderFontSize+16+a.height-a.lineHeight,s=[],h=`<g class="subgraph" data-id="${C(r.id)}" data-region="subgraph" data-label="${M(r.label)}"${n?` data-parent-id="${C(n)}"`:""}>`,c=r.inlineStyle,p=c?.fill??i.groupFillColor??"var(--_group-fill)",g=c?.stroke??i.groupBorderColor??"var(--_node-stroke)",u=c?.["stroke-width"]??String(i.groupLineWidth);s.push({indent:2,node:t.shape({id:`group-rect:${r.id}`,role:"group",geometry:{kind:"rect",x:r.x,y:r.y,width:r.width,height:r.height,rx:i.groupCornerRadius,ry:i.groupCornerRadius},paint:{fill:p,stroke:g,strokeWidth:u}})});let f=i.groupHeaderFillColor??"var(--_group-hdr)",k=_(r.x,r.y,r.width,l,i.groupCornerRadius);s.push({indent:2,node:t.shape({id:`group-header:${r.id}`,role:"group-header",geometry:{kind:"path",d:k},paint:{fill:f,stroke:g,strokeWidth:u}})});let m=a.text,y=c?.color??i.groupTextColor??"var(--_text-sec)";for(let e of(s.push({indent:2,node:t.text({id:`group-label:${r.id}`,role:"group-header",text:m,block:a,x:r.x+i.groupLabelPaddingX,y:r.y+l/2,fontSize:i.groupHeaderFontSize,anchor:"start",paint:{fill:y}})}),function(e,t){let r=e.children.filter(e=>e.concurrencyRegion);if(r.length<2)return[];let o=e=>Math.max(...r.map(e))-Math.min(...r.map(e)),i=o(e=>e.x+e.width/2)>=o(e=>e.y+e.height/2),n=[...r].sort((e,t)=>i?e.x-t.x:e.y-t.y),a=[];for(let r=1;r<n.length;r++){let o=n[r-1],l=n[r];if(i){let i=(o.x+o.width+l.x)/2;a.push({index:r-1,x1:i,y1:e.y+t+4,x2:i,y2:e.y+e.height-4})}else{let t=(o.y+o.height+l.y)/2;a.push({index:r-1,x1:e.x+4,y1:t,x2:e.x+e.width-4,y2:t})}}return a}(r,l)))s.push({indent:2,node:t.shape({id:`region-separator:${r.id}:${e.index}`,role:"group",geometry:{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},paint:{stroke:g,strokeWidth:String(i.groupLineWidth),strokeDasharray:"6 4"},attributes:{className:"region-separator"}})});for(let n of r.children)s.push({indent:0,node:e(t,n,o,i,r.id)});return t.group({id:`group:${r.id}`,role:"group",open:h,close:"</g>",children:s})}(p,e,N,I));F?.beforeEdges&&P.push(...F.beforeEdges());let G=new Set(j.nodes.map(e=>e.id)),J=e=>e.forEach(e=>{G.add(e.id),J(e.children)});J(j.groups);let Q=new Map,U=new Map;for(let e of j.edges){if(e.points.length<2)continue;let t=`${e.source}->${e.target}`,r=Q.get(t)??0;Q.set(t,r+1);let a=`edge:${t}#${r}`;U.set(e,a);let l=void 0===e.id||G.has(e.id)?a:e.id;P.push(function(e,t,r,a,l,d){let s="dotted"===t.style?"dotted":"thick"===t.style?"thick":"invisible"===t.style?"invisible":"solid",h=B(a),p=t.labelPosition??c(t.points),g=r.edgeTextColor??"var(--_text-sec)",u=t.label?[{id:`${a}:label`,text:t.label,textContent:{value:t.label,prepared:v(S(t.label,t.labelContent))},anchor:p,paint:{fill:g},fontSize:r.edgeLabelFontSize,textAnchor:"middle",visual:{kind:"companion",markId:`${h}:text`}}]:[],f=(t.classNames??[]).map(e=>e.replace(/[^A-Za-z0-9_-]/g,"")).filter(Boolean),k={identity:{id:l,...f.length?{classNames:f}:{}},endpoints:{from:t.source,to:t.target},relationship:{kind:"flowchart-edge",direction:t.source===t.target?"self":t.hasArrowStart&&t.hasArrowEnd?"bidirectional":t.hasArrowStart?"reverse":t.hasArrowEnd?"forward":"undirected"},route:{ownership:"layout",bendRadius:r.edgeBendRadius,labelAnchors:t.labelPosition?[t.labelPosition]:[]},labels:u};if("invisible"===t.style)return e.connector({id:a,role:"edge",geometry:{kind:"polyline",points:t.points},lineStyle:"invisible",paint:{},...k});let m=n(t,r),y="dotted"===t.style?`${$.dash} ${$.gap}`:t.animate?"8 4":void 0,x="thick"===t.style?2*r.lineWidth:r.lineWidth,b=t.inlineStyle?.stroke??r.edgeStrokeColor,w=`${b?`-${i(b)}`:""}${t.inlineStyle?.["stroke-width"]?"-fixed":""}`,C,M;if(t.hasArrowEnd){let e=o(t.endMarker??"arrow");if(!(C=d.find(t=>t.id===`${e}${w}`)))throw Error(`Missing marker resource "${e}${w}"`)}if(t.hasArrowStart){let e=o(t.startMarker??"arrow");if(!(M=d.find(t=>t.id===`${e}-start${w}`)))throw Error(`Missing marker resource "${e}-start${w}"`)}let _={className:["edge",...f].join(" "),data:{style:t.style,"arrow-start":String(t.hasArrowStart),"arrow-end":String(t.hasArrowEnd),...t.hasArrowStart?{"marker-start":t.startMarker??"arrow"}:{},...t.hasArrowEnd?{"marker-end":t.endMarker??"arrow"}:{},...t.label?{label:W(t.label)}:{},...t.curve?{curve:t.curve}:{},...t.animate?{animate:"true",animation:t.animation??"slow"}:{}}},A={stroke:b??"var(--_line)",strokeWidth:t.inlineStyle?.["stroke-width"]??String(x),...y?{strokeDasharray:y}:{}};if(r.edgeBendRadius>0||t.curve){if(!m)throw Error(`Missing path projection for flowchart edge "${a}"`);return e.connector({id:a,role:"edge",geometry:m.geometry,lineStyle:s,paint:A,markers:{...M?{start:M}:{},mid:[],...C?{end:C}:{}},...k,route:{...k.route,contours:m.contours},attributes:_})}return e.connector({id:a,role:"edge",geometry:{kind:"polyline",points:t.points},lineStyle:s,paint:A,markers:{...M?{start:M}:{},mid:[],...C?{end:C}:{}},...k,attributes:_})}(p,e,I,a,l,X))}for(let e of j.edges){let t=U.get(e);F?.edgeLabels!==!1&&e.label&&t&&P.push(function(e,t,r,o,i){let n=t.labelPosition??c(t.points),a=t.labelBlock??d(S(t.label,t.labelContent),o,"edge"),l=a.text,p=s+h(t,o.lineWidth),g=a.width+2*p,u=a.height+2*p,f=n.x-g/2,k=n.y-u/2,m=e.shape({id:`${i}:halo`,role:"chrome",geometry:{kind:"rect",x:f,y:k,width:g,height:u,rx:4,ry:4},paint:{fill:"var(--bg)",stroke:"none"},attributes:{className:"edge-label-halo"}}),y=a.width+2*s,x=a.height+2*s,$=e.shape({id:`${i}:pill`,role:"chrome",geometry:{kind:"rect",x:n.x-y/2,y:n.y-x/2,width:y,height:x,rx:2,ry:2},paint:{fill:"var(--bg)",stroke:"var(--_inner-stroke)",strokeWidth:"1"}}),b=o.edgeTextColor??"var(--_text-sec)",w=e.text({id:`${i}:text`,role:"label",text:l,block:a,x:n.x,y:n.y,fontSize:o.edgeLabelFontSize,anchor:"middle",paint:{fill:b}});return e.group({id:i,role:"edge-label",open:`<g class="edge-label" data-from="${C(t.source)}" data-to="${C(t.target)}" data-label="${M(t.label)}">`,close:"</g>",children:[{indent:2,node:m},{indent:2,node:$},{indent:2,node:w}]})}(p,e,0,I,B(t)))}for(let r of F?.surfaces===!1?[]:j.nodes)P.push(function(r,o,i,n,s,h){let c=function(e,t,r){let{x:o,y:i,width:n,height:l,shape:d,inlineStyle:s}=t,h=a(t,{fill:s?.fill??r.nodeFillColor??"var(--_node-fill)",stroke:s?.stroke??r.nodeBorderColor??"var(--_node-stroke)",strokeWidth:s?.["stroke-width"]??String(r.nodeLineWidth)},r.cornerRadius);return e.shape({id:`node-shape:${t.id}`,role:"state-note"===t.shape?"note":"node",geometry:h.geometry,paint:h.paint,...h.childPaints?{childPaints:h.childPaints}:{}})}(r,o,n),p=function(e,t,r){let o=t.nodeTextColor??(e.inlineStyle?.fill||!l(e)?"var(--_text)":u("var(--_text)",t.nodeFillColor??"var(--_node-fill)",r));return g(e.inlineStyle,o)}(o,n,s),f=function(e,t,r,o,i){if(("state-start"===t.shape||"state-end"===t.shape||"state-fork"===t.shape||"state-join"===t.shape||"state-choice"===t.shape)&&!t.label)return null;let n=t.x+t.width/2,a=t.y+t.height/2,l=t.labelBlock??d(S(t.label,t.labelContent),o,"node"),s=l.text;return e.text({id:`node-label:${t.id}`,role:"label",text:s,block:l,x:n,y:a,fontSize:o.nodeLabelFontSize,anchor:"middle",paint:{fill:i}})}(r,o,0,n,p),k=(o.classNames??[]).map(e=>e.replace(/[^A-Za-z0-9_-]/g,"")).filter(Boolean),m=["node",..."state-note"===o.shape?["state-note"]:[],...k].join(" "),y="state-start"===o.shape?{status:"start"}:"state-end"===o.shape?{status:"end"}:void 0,x=[{indent:2,node:c}],$=function(r,o,i){let n=Math.min(28,.4*o.height),a=o.x+o.width/2,l=o.y+6;if(o.icon){let d=t(o.icon);if(d){let e=n/24;return r.pathArtwork({id:`node:${o.id}:icon`,paths:d.paths,owner:{id:o.id,role:"node"},open:`<g class="flowchart-icon" data-icon="${C(o.icon)}" transform="translate(${a-n/2} ${l}) scale(${e})">`,transform:{kind:"matrix",a:e,b:0,c:0,d:e,e:a-n/2,f:l},paint:{fill:i,stroke:i,strokeWidth:"0.8"}})}let s=e(o.icon);return r.text({id:`node:${o.id}:icon`,role:"icon",owner:{id:o.id,role:"node"},text:s,block:o.iconFallbackBlock,x:a,y:l+n/2,fontSize:10,anchor:"middle",paint:{fill:i},baselineShift:0,attributes:{className:"flowchart-icon-fallback",data:{icon:o.icon}}})}if(o.image){let e=a-n/2,t=`M${e+2} ${l+.66*n}L${e+.36*n} ${l+.36*n}L${e+.52*n} ${l+.5*n}L${e+.7*n} ${l+.32*n}L${e+n-2} ${l+.66*n}`,d={fill:"none",stroke:i,strokeWidth:"1.2"},s={id:o.id,role:"node"};return r.group({id:`node:${o.id}:image`,role:"icon",owner:s,open:`<g class="flowchart-image-placeholder" data-image-src="${C(o.image)}">`,close:"</g>",join:"",children:[{indent:0,node:r.shape({id:`node:${o.id}:image:frame`,role:"icon",owner:s,geometry:{kind:"rect",x:e,y:l,width:n,height:.72*n,rx:2},paint:d})},{indent:0,node:r.shape({id:`node:${o.id}:image:sun`,role:"icon",owner:s,geometry:{kind:"circle",cx:e+.72*n,cy:l+.2*n,r:.08*n},paint:d})},{indent:0,node:r.shape({id:`node:${o.id}:image:landscape`,role:"icon",owner:s,geometry:{kind:"path",d:t},paint:d})}]})}return null}(r,o,p);$&&x.push({indent:2,node:$}),f&&x.push({indent:2,node:f});let b=o.semanticShape?` data-semantic-shape="${C(o.semanticShape)}"`:"",w=h&&o.href?` data-href="${C(o.href)}" role="link" tabindex="0"`:"",v=void 0===o.floatingNoteId?"":` data-floating-note-id="${C(o.floatingNoteId)}"`;return r.group({id:`node:${o.id}`,role:"state-note"===o.shape?"note":"node",open:`<g class="${m}" data-id="${C(o.id)}" data-label="${M(o.label)}" data-shape="${o.shape}"${b}${w}${v}>`,close:"</g>",children:x,channels:y})}(p,r,0,I,z,"strict"!==L.security));for(let e of j.notes??[])P.push(function(e,t,r,o){let{x:i,y:n,width:a,height:l}=t,s=o.groupHeaderFillColor??"var(--_group-hdr)",h=o.groupBorderColor??"var(--_node-stroke)",c=o.edgeTextColor??"var(--_text-sec)",p=t.textBlock??d(S(t.text,t.textContent),o,"note"),g=p.text,u=`state-note:${t.id}`;return e.group({id:u,role:"note",open:`<g class="state-note" data-id="${C(t.id)}" data-target="${C(t.target)}" data-side="${t.side}">`,close:"</g>",children:[{indent:2,node:e.shape({id:`${u}:rect`,role:"note",geometry:{kind:"rect",x:i,y:n,width:a,height:l,rx:4,ry:4},paint:{fill:s,stroke:h,strokeWidth:String(x.innerBox)}})},{indent:2,node:e.text({id:`${u}:text`,role:"label",text:g,block:p,x:i+a/2,y:n+l/2,fontSize:o.edgeLabelFontSize,anchor:"middle",paint:{fill:c}})}]})}(p,e,0,I));return P.push(p.documentClose()),{family:"flowchart",width:j.width,height:j.height,colors:z,transparent:H,parts:P}}function B(e){return e.startsWith("edge:")?`edge-label:${e.slice(5)}`:`${e}:label`}var F=p(A);export{A as a,F as b};
@@ -1,17 +1,17 @@
1
- import{a as e,b as t,c as r}from"./chunk-BCPZYXNZ.js";import{E as n,G as i,H as o,I as a,V as l,W as s,X as c,Y as d,j as u,p as f,q as m,s as g,x as p,y as b,z as h}from"./chunk-PRXEMB2V.js";import{b as y,e as x,f as k}from"./chunk-37ORXEBA.js";import{Qb as v,b as S,d as _,f as w,g as C,h as j,i as F,j as O,k as A,m as T,pb as L}from"./chunk-XBLK7VXJ.js";import{a as z,b as $,c as W,d as E,e as B,f as P,g as I,h as M,i as q,j as N}from"./chunk-PJJSDGLB.js";import{a as R}from"./chunk-YHMTSXIR.js";var D,J,X=new Map;function Y(e,t="strict"){return M(e)?"flowchart":("loose"===t?N(e):q(e))?"state":null}function V(e){X.set(e.id,e)}function G(e){return J?.(e)??X.get(e)}function H(e,t="strict"){let r=D?.(e,t);if(r)return r;let n=P(e);return[...X.values()].sort((e,t)=>t.collisionPriority-e.collisionPriority||L(e.id,t.id)).find(e=>"loose"===t?(e.detectLoose??e.detect)(n):e.detect(n))??null}function U(e,t,r){return t.some(e=>/acc(?:Title|Descr)/i.test(e))?(void 0===r?H(e,"loose"):r)?.statementEnds?.(t):void 0}var Z=Object.freeze({maxDepth:64,maxNodes:1e5,maxItemsPerContainer:4096,maxAggregateTextCharacters:5e6,maxAggregateTextBytes:1e7,maxDiagnostics:64});function K(e){return"__proto__"===e||"prototype"===e||"constructor"===e}function Q(e){return"number"==typeof e?"must be a finite number":`must be a JSON value, not ${typeof e}`}function ee(r,n=[],i={}){let o=[],a=new WeakSet,l=[{kind:"visit",value:r,path:n,depth:0}],s=0,c=0,d=0,u=!1,f=(e,t,r,i=!1)=>{if(!u){if(o.length>=Z.maxDiagnostics-1){o.push({code:"JSON_DIAGNOSTIC_LIMIT",path:n,message:`exceeds the ${Z.maxDiagnostics}-diagnostic admission limit`}),u=!0;return}o.push({code:e,path:t,message:r}),i&&(u=!0)}},m=(t,r)=>{if(u)return;if((c+=t.length)>Z.maxAggregateTextCharacters)return void f("JSON_TEXT_CHARACTER_LIMIT",r,`exceeds the aggregate ${Z.maxAggregateTextCharacters}-character text limit`,!0);let n=Z.maxAggregateTextBytes-d;(d+=e(t,Math.max(0,n)))>Z.maxAggregateTextBytes&&f("JSON_TEXT_BYTE_LIMIT",r,`exceeds the aggregate ${Z.maxAggregateTextBytes}-byte UTF-8 text limit`,!0)};for(;l.length>0&&!u;){let e=l.pop();if("exit"===e.kind){a.delete(e.value);continue}if(e.depth>Z.maxDepth){f("JSON_DEPTH_LIMIT",e.path,`exceeds maximum nesting depth ${Z.maxDepth}`,!0);continue}if(++s>Z.maxNodes){f("JSON_NODE_LIMIT",e.path,`exceeds the aggregate ${Z.maxNodes}-node limit`,!0);continue}let r=e.value;if(null===r||"boolean"==typeof r)continue;if("string"==typeof r){m(r,e.path);continue}if("number"==typeof r){Number.isFinite(r)||f("JSON_NON_JSON_VALUE",e.path,Q(r));continue}if("object"!=typeof r){f("JSON_NON_JSON_VALUE",e.path,Q(r));continue}if(a.has(r)){f("JSON_CYCLE",e.path,"must be acyclic");continue}if(Array.isArray(r)){if(r.length>Z.maxItemsPerContainer){f("JSON_ITEM_LIMIT",e.path,`must contain at most ${Z.maxItemsPerContainer} items`,!0);continue}a.add(r),l.push({kind:"exit",value:r});for(let t=r.length-1;t>=0;t--){if(!Object.prototype.hasOwnProperty.call(r,t)){f("JSON_SPARSE_ARRAY",[...e.path,t],"must not be a sparse array");continue}l.push({kind:"visit",value:r[t],path:[...e.path,t],depth:e.depth+1})}continue}if(!t(r)){f("JSON_NON_PLAIN_OBJECT",e.path,"must be a plain JSON object");continue}let n=Object.entries(r);if(n.length>Z.maxItemsPerContainer){f("JSON_ITEM_LIMIT",e.path,`must contain at most ${Z.maxItemsPerContainer} properties`,!0);continue}a.add(r),l.push({kind:"exit",value:r});for(let t=n.length-1;t>=0;t--){let[r,o]=n[t],a=[...e.path,r];if(m(r,a),K(r)){f("JSON_PROTOTYPE_KEY",a,"uses a forbidden prototype key");continue}void 0===o&&i.allowUndefinedObjectProperties||l.push({kind:"visit",value:o,path:a,depth:e.depth+1})}}return o}var et=class extends TypeError{constructor(e,t){super(`${e} failed JSON/config admission: ${t.map(e=>`${function(e){let t="$";for(let r of e)"number"==typeof r?t+=`[${r}]`:/^[A-Za-z_$][\w$]*$/.test(r)?t+=`.${r}`:t+=`[${JSON.stringify(r)}]`;return t}(e.path)} ${e.message}`).join("; ")}`),this.context=e,this.problems=t,this.name="JsonConfigAdmissionError"}context;problems;code="JSON_CONFIG_ADMISSION_FAILED"};function er(e,t,r={}){let n=ee(e,[],r);if(n.length>0)throw new et(t,n)}function en(t,r,n={}){let i=[];if(t.length>Z.maxAggregateTextCharacters?i.push({code:"JSON_TEXT_CHARACTER_LIMIT",path:[],message:`exceeds the aggregate ${Z.maxAggregateTextCharacters}-character text limit`}):e(t,Z.maxAggregateTextBytes)>Z.maxAggregateTextBytes&&i.push({code:"JSON_TEXT_BYTE_LIMIT",path:[],message:`exceeds the aggregate ${Z.maxAggregateTextBytes}-byte UTF-8 text limit`}),0===i.length&&n.trackFlowDepth){let e=[],r,n=!1,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(o){(l===`
1
+ import{a as e,b as t,c as r}from"./chunk-2R6M4CUH.js";import{E as n,G as i,H as o,I as a,V as l,W as s,X as c,Y as d,j as u,p as f,q as m,s as g,x as p,y as b,z as h}from"./chunk-GK5PSUKH.js";import{b as y,e as x,f as k}from"./chunk-ILCWDEZN.js";import{Qb as v,b as S,d as _,f as w,g as C,h as j,i as F,j as O,k as A,m as T,pb as L}from"./chunk-SZAI2WB4.js";import{a as z,b as W,c as $,d as E,e as B,f as P,g as I,h as M,i as q,j as N}from"./chunk-PJJSDGLB.js";import{a as D}from"./chunk-YHMTSXIR.js";var R,J,Y=new Map;function G(e,t="strict"){return M(e)?"flowchart":("loose"===t?N(e):q(e))?"state":null}function V(e){Y.set(e.id,e)}function X(e){return J?.(e)??Y.get(e)}function H(e,t="strict"){let r=R?.(e,t);if(r)return r;let n=P(e);return[...Y.values()].sort((e,t)=>t.collisionPriority-e.collisionPriority||L(e.id,t.id)).find(e=>"loose"===t?(e.detectLoose??e.detect)(n):e.detect(n))??null}function U(e,t,r){return t.some(e=>/acc(?:Title|Descr)/i.test(e))?(void 0===r?H(e,"loose"):r)?.statementEnds?.(t):void 0}var Z=Object.freeze({maxDepth:64,maxNodes:1e5,maxItemsPerContainer:4096,maxAggregateTextCharacters:5e6,maxAggregateTextBytes:1e7,maxDiagnostics:64});function K(e){return"__proto__"===e||"prototype"===e||"constructor"===e}function Q(e){return"number"==typeof e?"must be a finite number":`must be a JSON value, not ${typeof e}`}function ee(r,n=[],i={}){let o=[],a=new WeakSet,l=[{kind:"visit",value:r,path:n,depth:0}],s=0,c=0,d=0,u=!1,f=(e,t,r,i=!1)=>{if(!u){if(o.length>=Z.maxDiagnostics-1){o.push({code:"JSON_DIAGNOSTIC_LIMIT",path:n,message:`exceeds the ${Z.maxDiagnostics}-diagnostic admission limit`}),u=!0;return}o.push({code:e,path:t,message:r}),i&&(u=!0)}},m=(t,r)=>{if(u)return;if((c+=t.length)>Z.maxAggregateTextCharacters)return void f("JSON_TEXT_CHARACTER_LIMIT",r,`exceeds the aggregate ${Z.maxAggregateTextCharacters}-character text limit`,!0);let n=Z.maxAggregateTextBytes-d;(d+=e(t,Math.max(0,n)))>Z.maxAggregateTextBytes&&f("JSON_TEXT_BYTE_LIMIT",r,`exceeds the aggregate ${Z.maxAggregateTextBytes}-byte UTF-8 text limit`,!0)};for(;l.length>0&&!u;){let e=l.pop();if("exit"===e.kind){a.delete(e.value);continue}if(e.depth>Z.maxDepth){f("JSON_DEPTH_LIMIT",e.path,`exceeds maximum nesting depth ${Z.maxDepth}`,!0);continue}if(++s>Z.maxNodes){f("JSON_NODE_LIMIT",e.path,`exceeds the aggregate ${Z.maxNodes}-node limit`,!0);continue}let r=e.value;if(null===r||"boolean"==typeof r)continue;if("string"==typeof r){m(r,e.path);continue}if("number"==typeof r){Number.isFinite(r)||f("JSON_NON_JSON_VALUE",e.path,Q(r));continue}if("object"!=typeof r){f("JSON_NON_JSON_VALUE",e.path,Q(r));continue}if(a.has(r)){f("JSON_CYCLE",e.path,"must be acyclic");continue}if(Array.isArray(r)){if(r.length>Z.maxItemsPerContainer){f("JSON_ITEM_LIMIT",e.path,`must contain at most ${Z.maxItemsPerContainer} items`,!0);continue}a.add(r),l.push({kind:"exit",value:r});for(let t=r.length-1;t>=0;t--){if(!Object.prototype.hasOwnProperty.call(r,t)){f("JSON_SPARSE_ARRAY",[...e.path,t],"must not be a sparse array");continue}l.push({kind:"visit",value:r[t],path:[...e.path,t],depth:e.depth+1})}continue}if(!t(r)){f("JSON_NON_PLAIN_OBJECT",e.path,"must be a plain JSON object");continue}let n=Object.entries(r);if(n.length>Z.maxItemsPerContainer){f("JSON_ITEM_LIMIT",e.path,`must contain at most ${Z.maxItemsPerContainer} properties`,!0);continue}a.add(r),l.push({kind:"exit",value:r});for(let t=n.length-1;t>=0;t--){let[r,o]=n[t],a=[...e.path,r];if(m(r,a),K(r)){f("JSON_PROTOTYPE_KEY",a,"uses a forbidden prototype key");continue}void 0===o&&i.allowUndefinedObjectProperties||l.push({kind:"visit",value:o,path:a,depth:e.depth+1})}}return o}var et=class extends TypeError{constructor(e,t){super(`${e} failed JSON/config admission: ${t.map(e=>`${function(e){let t="$";for(let r of e)"number"==typeof r?t+=`[${r}]`:/^[A-Za-z_$][\w$]*$/.test(r)?t+=`.${r}`:t+=`[${JSON.stringify(r)}]`;return t}(e.path)} ${e.message}`).join("; ")}`),this.context=e,this.problems=t,this.name="JsonConfigAdmissionError"}context;problems;code="JSON_CONFIG_ADMISSION_FAILED"};function er(e,t,r={}){let n=ee(e,[],r);if(n.length>0)throw new et(t,n)}function en(t,r,n={}){let i=[];if(t.length>Z.maxAggregateTextCharacters?i.push({code:"JSON_TEXT_CHARACTER_LIMIT",path:[],message:`exceeds the aggregate ${Z.maxAggregateTextCharacters}-character text limit`}):e(t,Z.maxAggregateTextBytes)>Z.maxAggregateTextBytes&&i.push({code:"JSON_TEXT_BYTE_LIMIT",path:[],message:`exceeds the aggregate ${Z.maxAggregateTextBytes}-byte UTF-8 text limit`}),0===i.length&&n.trackFlowDepth){let e=[],r,n=!1,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(o){(l===`
2
2
  `||"\r"===l)&&(o=!1);continue}if(r){if('"'===r&&n){n=!1;continue}if('"'===r&&"\\"===l){n=!0;continue}if("'"===r&&"'"===l&&"'"===t[a+1]){a++;continue}l===r&&(r=void 0);continue}if('"'===l||"'"===l){r=l;continue}if("#"===l){o=!0;continue}if("{"===l||"["===l){if(e.push(l),e.length>Z.maxDepth){i.push({code:"JSON_DEPTH_LIMIT",path:[],message:`exceeds maximum nesting depth ${Z.maxDepth}`});break}}else("}"===l||"]"===l)&&e.pop()}}if(i.length>0)throw new et(r,i)}function ei(e,t){let r=Z.maxDiagnostics;return e.length<=r?[...e]:[...e.slice(0,r-1),`${t} exceeds the ${r}-diagnostic admission limit`]}function eo(e){let t=/%%\{\s*(\w+)/.exec(e)?.[1];return void 0!==t&&(null!==t.match(/(?:init\b)|(?:initialize\b)/)||null!==t.match("wrap"))}function ea(){let e=1e5;function t(){if(--e<0){let e=Error("Configuration validation exceeded 100000 loop steps");throw e.name="MermaidConfigWorkLimitError",e}}var r=(e,t,{depth:n=2}={})=>{let i={depth:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(t=>r(e,t,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(t=>{e.includes(t)||e.push(t)}),e):null==e||n<=0?null!=e&&"object"==typeof e&&"object"==typeof t?Object.assign(e,t):t:(null!=t&&"object"==typeof e&&"object"==typeof t&&Object.entries(t).forEach(([t,i])=>{"object"==typeof i?null!==i&&(Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),void 0===e[t]&&(e[t]=Array.isArray(i)?[]:{}),"object"==typeof e[t]&&(e[t]=r(e[t],i,{depth:n-1}))):"object"!=typeof e[t]&&(Object.hasOwn(e,t)?e[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))}),e)},n=new Set(["flowchart","useMaxWidth","theme","look","titleTopMargin","subGraphTitleMargin","top","bottom","diagramPadding","htmlLabels","nodeSpacing","rankSpacing","curve","padding","wrappingWidth","minNodeWidth","inheritDir","swimlane","layout","lineHops","ignoreCrossLaneEdges","optimizeRanksByCrossings","automaticLaneOrdering","agentflow","sequence","hideUnusedParticipants","activationWidth","diagramMarginX","diagramMarginY","actorMargin","width","height","boxMargin","boxTextMargin","noteMargin","messageMargin","messageAlign","mirrorActors","forceMenus","bottomMarginAdj","rightAngles","showSequenceNumbers","actorFontSize","actorFontFamily","actorFontWeight","noteFontSize","noteFontFamily","noteFontWeight","noteAlign","messageFontSize","messageFontFamily","messageFontWeight","wrap","wrapPadding","labelBoxWidth","labelBoxHeight","messageFont","noteFont","actorFont","gantt","barHeight","barGap","topPadding","rightPadding","leftPadding","gridLineStartPadding","fontSize","sectionFontSize","numberSectionStyles","axisFormat","topAxis","displayMode","weekday","tickInterval","useWidth","journey","leftMargin","maxLabelWidth","taskFontSize","taskFontFamily","taskMargin","textPlacement","titleColor","titleFontFamily","titleFontSize","class","hideEmptyMembersBox","hierarchicalNamespaces","state","dividerMargin","sizeUnit","textHeight","titleShift","forkWidth","forkHeight","miniPadding","fontSizeFactor","labelHeight","edgeLengthFactor","compositTitleSize","radius","er","layoutDirection","minEntityWidth","minEntityHeight","entityPadding","stroke","fill","pie","textPosition","donutHole","legendPosition","highlightSlice","quadrantChart","chartWidth","chartHeight","titlePadding","quadrantPadding","xAxisLabelPadding","yAxisLabelPadding","xAxisLabelFontSize","yAxisLabelFontSize","quadrantLabelFontSize","quadrantTextTopPadding","pointTextPadding","pointLabelFontSize","pointRadius","xAxisPosition","yAxisPosition","quadrantInternalBorderStrokeWidth","quadrantExternalBorderStrokeWidth","xyChart","showDataLabel","showDataLabelOutsideBar","showTitle","showLegend","legendFontSize","legendPadding","xAxis","$ref","showLabel","labelFontSize","labelPadding","showTick","tickLength","tickWidth","showAxisLine","axisLineWidth","labelRotation","yAxis","chartOrientation","plotReservedSpacePercent","requirement","rect_fill","text_color","rect_border_size","rect_border_color","rect_min_width","rect_min_height","rect_padding","line_height","mindmap","colorBy","maxNodeWidth","layoutAlgorithm","ishikawa","kanban","sectionWidth","ticketBaseUrl","timeline","disableMulticolor","gitGraph","nodeLabel","x","y","mainBranchName","mainBranchOrder","showCommitLabel","showBranches","rotateCommitLabel","parallelCommits","arrowMarkerAbsolute","c4","c4ShapeMargin","c4ShapePadding","c4ShapeInRow","nextLinePaddingX","c4BoundaryInRow","personFontSize","personFontFamily","personFontWeight","external_personFontSize","external_personFontFamily","external_personFontWeight","systemFontSize","systemFontFamily","systemFontWeight","external_systemFontSize","external_systemFontFamily","external_systemFontWeight","system_dbFontSize","system_dbFontFamily","system_dbFontWeight","external_system_dbFontSize","external_system_dbFontFamily","external_system_dbFontWeight","system_queueFontSize","system_queueFontFamily","system_queueFontWeight","external_system_queueFontSize","external_system_queueFontFamily","external_system_queueFontWeight","boundaryFontSize","boundaryFontFamily","boundaryFontWeight","containerFontSize","containerFontFamily","containerFontWeight","external_containerFontSize","external_containerFontFamily","external_containerFontWeight","container_dbFontSize","container_dbFontFamily","container_dbFontWeight","external_container_dbFontSize","external_container_dbFontFamily","external_container_dbFontWeight","container_queueFontSize","container_queueFontFamily","container_queueFontWeight","external_container_queueFontSize","external_container_queueFontFamily","external_container_queueFontWeight","componentFontSize","componentFontFamily","componentFontWeight","external_componentFontSize","external_componentFontFamily","external_componentFontWeight","component_dbFontSize","component_dbFontFamily","component_dbFontWeight","external_component_dbFontSize","external_component_dbFontFamily","external_component_dbFontWeight","component_queueFontSize","component_queueFontFamily","component_queueFontWeight","external_component_queueFontSize","external_component_queueFontFamily","external_component_queueFontWeight","person_bg_color","person_border_color","external_person_bg_color","external_person_border_color","system_bg_color","system_border_color","system_db_bg_color","system_db_border_color","system_queue_bg_color","system_queue_border_color","external_system_bg_color","external_system_border_color","external_system_db_bg_color","external_system_db_border_color","external_system_queue_bg_color","external_system_queue_border_color","container_bg_color","container_border_color","container_db_bg_color","container_db_border_color","container_queue_bg_color","container_queue_border_color","external_container_bg_color","external_container_border_color","external_container_db_bg_color","external_container_db_border_color","external_container_queue_bg_color","external_container_queue_border_color","component_bg_color","component_border_color","component_db_bg_color","component_db_border_color","component_queue_bg_color","component_queue_border_color","external_component_bg_color","external_component_border_color","external_component_db_bg_color","external_component_db_border_color","external_component_queue_bg_color","external_component_queue_border_color","personFont","external_personFont","systemFont","external_systemFont","system_dbFont","external_system_dbFont","system_queueFont","external_system_queueFont","containerFont","external_containerFont","container_dbFont","external_container_dbFont","container_queueFont","external_container_queueFont","componentFont","external_componentFont","component_dbFont","external_component_dbFont","component_queueFont","external_component_queueFont","boundaryFont","sankey","linkColor","nodeAlignment","showValues","prefix","suffix","nodeWidth","nodePadding","labelStyle","nodeColors","block","packet","rowHeight","bitWidth","bitsPerRow","showBits","bitOrder","paddingX","paddingY","treeView","rowIndent","lineThickness","showIcons","defaultIconPack","filenameIcons","extensionIcons","architecture","iconSize","randomize","nodeSeparation","idealEdgeLengthMultiplier","edgeElasticity","numIter","seed","eventmodeling","radar","marginTop","marginRight","marginBottom","marginLeft","axisScaleFactor","axisLabelFactor","curveTension","usecase","usecaseFontSize","usecaseFontFamily","usecaseFontWeight","colorScheme","venn","useDebugLayout","cynefin","showDomainDescriptions","boundaryAmplitude","handDrawnSeed","maxTextSize","maxEdges","darkMode","fontFamily","logLevel","securityLevel","startOnLoad","legacyMathML","forceLegacyMathML","deterministicIds","markdownAutoWrap","suppressErrorRendering","deterministicIDSeed","elk","mergeEdges","straightenEdges","preset","nodePlacementStrategy","layeringStrategy","cycleBreakingStrategy","layeringLayerBound","nodePlacementAlignment","forceNodeModelOrder","considerModelOrder","keepEntryNodeOnTop","orientFeedbackEdges","themeCSS","themeVariables","background","primaryColor","secondaryColor","tertiaryColor","primaryBorderColor","secondaryBorderColor","tertiaryBorderColor","primaryTextColor","secondaryTextColor","tertiaryTextColor","lineColor","textColor","mainBkg","secondBkg","border1","border2","arrowheadColor","labelBackground","THEME_COLOR_LIMIT","strokeWidth","nodeBkg","nodeBorder","clusterBkg","clusterBorder","defaultLinkColor","edgeLabelBackground","actorBorder","actorBkg","actorTextColor","actorLineColor","signalColor","signalTextColor","labelBoxBkgColor","labelBoxBorderColor","labelTextColor","loopTextColor","noteBorderColor","noteBkgColor","noteTextColor","activationBorderColor","activationBkgColor","sequenceNumberColor","sectionBkgColor","altSectionBkgColor","sectionBkgColor2","excludeBkgColor","taskBorderColor","taskBkgColor","taskTextLightColor","taskTextColor","taskTextDarkColor","taskTextOutsideColor","taskTextClickableColor","activeTaskBorderColor","activeTaskBkgColor","gridColor","doneTaskBkgColor","doneTaskBorderColor","critBorderColor","critBkgColor","todayLineColor","vertLineColor","fontWeight","personBorder","personBkg","archEdgeColor","archEdgeArrowColor","archEdgeWidth","archGroupBorderColor","archGroupBorderWidth","rowOdd","rowEven","labelColor","errorBkgColor","errorTextColor","useGradient","gradientStart","gradientStop","dropShadow","cScale0","cScale1","cScale2","cScale3","cScale4","cScale5","cScale6","cScale7","cScale8","cScale9","cScale10","cScale11","cScalePeer1","cScalePeer2","cScalePeer0","cScalePeer3","cScalePeer4","cScalePeer5","cScalePeer6","cScalePeer7","cScalePeer8","cScalePeer9","cScalePeer10","cScalePeer11","cScaleInv0","cScaleInv1","cScaleInv2","cScaleInv3","cScaleInv4","cScaleInv5","cScaleInv6","cScaleInv7","cScaleInv8","cScaleInv9","cScaleInv10","cScaleInv11","surface0","surfacePeer0","surface1","surfacePeer1","surface2","surfacePeer2","surface3","surfacePeer3","surface4","surfacePeer4","scaleLabelColor","flowContainerStroke","rectBkgColor","transitionColor","transitionLabelColor","stateLabelColor","stateBkg","labelBackgroundColor","compositeBackground","altBackground","compositeTitleBackground","compositeBorder","innerEndBackground","specialStateColor","classText","fillType0","fillType1","fillType2","fillType3","fillType4","fillType5","fillType6","fillType7","pie1","pie2","pie3","pie4","pie5","pie6","pie7","pie8","pie9","pie10","pie11","pie12","pieTitleTextSize","pieTitleTextColor","pieSectionTextSize","pieSectionTextColor","pieLegendTextSize","pieLegendTextColor","pieStrokeColor","pieStrokeWidth","pieOuterStrokeWidth","pieOuterStrokeColor","pieOpacity","venn1","venn2","venn3","venn4","venn5","venn6","venn7","venn8","vennTitleTextColor","vennSetTextColor","domainFontSize","itemFontSize","boundaryColor","boundaryWidth","cliffColor","cliffWidth","arrowColor","arrowWidth","complexBg","complicatedBg","chaoticBg","clearBg","confusionBg","quadrant1Fill","quadrant2Fill","quadrant3Fill","quadrant4Fill","quadrant1TextFill","quadrant2TextFill","quadrant3TextFill","quadrant4TextFill","quadrantPointFill","quadrantPointTextFill","quadrantXAxisTextFill","quadrantYAxisTextFill","quadrantInternalBorderStrokeFill","quadrantExternalBorderStrokeFill","quadrantTitleFill","axisColor","axisStrokeWidth","axisLabelFontSize","curveOpacity","curveStrokeWidth","graticuleColor","graticuleStrokeWidth","graticuleOpacity","legendBoxSize","wardleyEvolutionColor","wardley","backgroundColor","axisTextColor","componentFill","componentStroke","componentLabelColor","linkStroke","evolutionStroke","annotationStroke","annotationTextColor","annotationFill","dataLabelColor","legendTextColor","xAxisTitleColor","xAxisLabelColor","xAxisTickColor","xAxisLineColor","yAxisTitleColor","yAxisLabelColor","yAxisTickColor","yAxisLineColor","plotColorPalette","requirementBackground","requirementBorderColor","requirementBorderSize","requirementTextColor","relationColor","relationLabelBackground","relationLabelColor","git0","git1","git2","git3","git4","git5","git6","git7","gitInv0","gitInv1","gitInv2","gitInv3","gitInv4","gitInv5","gitInv6","gitInv7","gitBranchLabel0","gitBranchLabel1","gitBranchLabel2","gitBranchLabel3","gitBranchLabel4","gitBranchLabel5","gitBranchLabel6","gitBranchLabel7","tagLabelColor","tagLabelBackground","tagLabelBorder","tagLabelFontSize","commitLabelColor","commitLabelBackground","commitLabelFontSize","emUiFill","emUiStroke","emProcessorFill","emProcessorStroke","emReadModelFill","emReadModelStroke","emCommandFill","emCommandStroke","emEventFill","emEventStroke","emSwimlaneBackgroundOdd","emSwimlaneBackgroundStroke","emArrowhead","emRelationStroke","attributeBackgroundColorOdd","attributeBackgroundColorEven","cScaleLabel0","cScaleLabel3","cScaleLabel1","cScaleLabel2","cScaleLabel4","cScaleLabel5","cScaleLabel6","cScaleLabel7","cScaleLabel8","cScaleLabel9","cScaleLabel10","cScaleLabel11","railroad","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","treemap","nodeHeight","borderWidth","valueFontSize","valueFormat"]),i={trace(){},debug(){},info(){},warn(){},error(){},fatal(){}},o={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},a=(e,r)=>{for(let n of Object.keys(e)){t();let o=e[n];(n.startsWith("__")||n.includes("proto")||n.includes("constr")||"string"!=typeof o||!r.test(o))&&(i.debug("sanitize deleting dictionary entry:",n,o),delete e[n])}},l=e=>{if(i.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e){if(Array.isArray(e))return void e.forEach(e=>l(e));for(let r of Object.keys(e)){if(t(),i.debug("Checking key",r),r.startsWith("__")||r.includes("proto")||r.includes("constr")||!n.has(r)||null==e[r]){i.debug("sanitize deleting key: ",r),delete e[r];continue}if("object"==typeof e[r]){let t=o[r];t?a(e[r],t):(i.debug("sanitizing object",r),l(e[r]));continue}for(let n of["themeCSS","fontFamily","altFontFamily"])t(),r.includes(n)&&(i.debug("sanitizing css option",r),e[r]=s(e[r]))}if(e.themeVariables)for(let r of Object.keys(e.themeVariables)){t();let n=e.themeVariables[r];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[r]="")}i.debug("After sanitization",e)}},s=e=>{let r=0,n=0;for(let i of e){if(t(),r<n)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?r++:"}"===i&&n++}return r!==n?"{ /* ERROR: Unbalanced CSS */ }":e};function c(){}function d(e){return null==e||"object"!=typeof e&&"function"!=typeof e}function u(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var f="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||function(){return this}();function m(e){return"u">typeof f.Buffer&&f.Buffer.isBuffer(e)}function g(e){if("object"!=typeof e||null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){var r;let t=e[Symbol.toStringTag];return null!=t&&!!(null!=(r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))&&r.writable)&&e.toString()===`[object ${t}]`}let n=e;for(;null!==Object.getPrototypeOf(n);)t(),n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}function p(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var h="[object String]",y="[object Number]",x="[object Boolean]",k="[object Arguments]",v=Object.prototype.hasOwnProperty;function S(e,r,n,i,o){if(null!=o){let t=o(e,r,n,i);if(void 0!==t)return t}if(d(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){let r=Array(e.length);i.set(e,r);for(let a=0;a<e.length;a++)t(),r[a]=S(e[a],a,n,i,o);return v.call(e,"index")&&(r.index=e.index),v.call(e,"input")&&(r.input=e.input),r}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;return i.set(e,t),e.forEach((e,r)=>{t.set(r,S(e,r,n,i,o))}),t}if(e instanceof Set){let t=new Set;return i.set(e,t),e.forEach(e=>{t.add(S(e,void 0,n,i,o))}),t}if(m(e))return e.subarray();if(p(e)){let r=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,r);for(let a=0;a<e.length;a++)t(),r[a]=S(e[a],a,n,i,o);return r}if(e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,t),_(t,e,n,i,o),t}if("u">typeof File&&e instanceof File){let t=new File([e],e.name,{type:e.type});return i.set(e,t),_(t,e,n,i,o),t}if("u">typeof Blob&&e instanceof Blob){let t=new Blob([e],{type:e.type});return i.set(e,t),_(t,e,n,i,o),t}let a=b(e);if("[object Error]"===a)return e===n?{}:e;switch(a){case y:case h:case x:{let t=new e.constructor(e.valueOf());return i.set(e,t),_(t,e,n,i,o),t}case k:{let t={};return i.set(e,t),_(t,e,n,i,o),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}}if("object"==typeof e&&function(e){switch(e){case k:case"[object Array]":case"[object ArrayBuffer]":case"[object DataView]":case x:case"[object Date]":case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Map]":case y:case"[object Object]":case"[object RegExp]":case"[object Set]":case h:case"[object Symbol]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return!0;default:return!1}}(a)){let t="[object Object]"===a&&"function"!=typeof e.constructor?{}:Object.create(Object.getPrototypeOf(e));return i.set(e,t),_(t,e,n,i,o),t}return e}function _(e,r,n,i,o){let a=[...Object.keys(r),...u(r)];for(let l=0;l<a.length;l++){t();let s=a[l],c=Object.getOwnPropertyDescriptor(e,s);(null==c||c.writable)&&(e[s]=S(r[s],s,n,i,o))}}function w(e){return S(e,void 0,e,new Map,void 0)}function C(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===b(e)}function j(e){return"object"==typeof e&&null!==e}var F={debug(){},error(){}},O="",A=!1,T=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,L=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,z=function(e,r=null){try{let n=RegExp(`[%]{2}(?![{]${L.source})(?=[}][%]{2}).*
3
- `,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),F.debug(`Detecting diagram directive${null!==r?" type:"+r:""} based on the text:${e}`);let i,o=[];for(;null!==(i=T.exec(e));)if(t(),i.index===T.lastIndex&&T.lastIndex++,i&&!r||r&&i[1]?.match(r)||r&&i[2]?.match(r)){let e=i[1]?i[1]:i[2],t=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:e,args:t})}return 0===o.length?{type:e,args:null}:1===o.length?o[0]:o}catch(t){return F.error(`ERROR: ${t.message} - Unable to parse directive type: '${r}' based on the text: '${e}'`),{type:void 0,args:null}}},$=function(e,n){let i=z(e,/(?:init\b)|(?:initialize\b)/),o={};if(Array.isArray(i)){let e,n=i.map(e=>e.args);e=A?structuredClone(n):void 0,l(n),e&&function e(r,n){if(!(!r||!n||"object"!=typeof r||"object"!=typeof n))for(let i of Object.keys(n))t(),"string"==typeof r[i]&&"string"==typeof n[i]?n[i]=r[i]:e(r[i],n[i])}(e,n),o=r(o,[...n])}else o=i.args;if(!o)return;let a=O,s="config";return void 0!==o[s]&&("flowchart-v2"===a&&(a="flowchart"),o[a]=o[s],delete o[s]),o};function W(e,t,r=!0){if(!/^\w+$/.test(e))throw Error("Invalid directive name");if(!r)return"%%{"+e+"}%%";let n="%%{"+e+": "+(Object.is(t,-0)?"-0":JSON.stringify(t)).replace(/[&<>#%'\u2028\u2029]/g,e=>"\\u"+e.charCodeAt(0).toString(16).padStart(4,"0"))+"}%%";T.lastIndex=0;let i=T.exec(n);T.lastIndex=0;let o=z(n,e);if(!i||i[0]!==n||!Object.is(typeof o.args,typeof t))throw Error("init argument has no complete pinned scalar token");return n}function E(e){return W("init",e)}function B(e,r,n,i=!1){O=n,A=i;try{let n,i;return function(e,...r){return function(e,...r){let n=r.slice(0,-1),i=r[r.length-1],o=e;for(let e=0;e<n.length;e++)t(),o=function e(r,n,i,o){if(d(r)&&(r=Object(r)),null==n||"object"!=typeof n)return r;if(o.has(n))return function(e){if(d(e))return e;if(Array.isArray(e)||p(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(null==t)return Object.assign(Object.create(t),e);let r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let t=new r(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let t;return(t="u">typeof AggregateError&&e instanceof AggregateError?new r(e.errors,e.message,{cause:e.cause}):new r(e.message,{cause:e.cause})).stack=e.stack,Object.assign(t,e),t}return"u">typeof File&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}(o.get(n));if(o.set(n,r),Array.isArray(n)){n=n.slice();for(let e=0;e<n.length;e++)t(),e in n||(n[e]=void 0)}let a=[...Object.keys(n),...u(n)];for(let l=0;l<a.length;l++){t();let s=a[l];if("__proto__"===s)continue;let c=n[s],d=r[s];if(C(c)&&(c=Object.assign({},c)),C(d)&&(d=Object.assign({},d)),m(c)&&(c=w(c)),Array.isArray(c))if(Array.isArray(d)){let e=[],r=Reflect.ownKeys(d);for(let n=0;n<r.length;n++){t();let i=r[n];e[i]=d[i]}d=e}else if(function(e){var t;return j(e)&&null!=e&&"function"!=typeof e&&Number.isSafeInteger(t=e.length)&&t>=0}(d)){let e=[];for(let r=0;r<d.length;r++)t(),e[r]=d[r];d=e}else d=[];let u=i(d,c,s,r,n,o);void 0!==u?r[s]=u:Array.isArray(c)||j(d)&&j(c)&&(g(d)||g(c)||p(d)||p(c))?r[s]=e(d,c,i,o):null==d&&g(c)?r[s]=e({},c,i,o):null==d&&p(c)?r[s]=w(c):(void 0===d||void 0!==c)&&(r[s]=c)}return r}(o,n[e],i,new Map);return o}(e,...r,c)}({},structuredClone(e),(n=$(r)??{},i=z(r,"wrap"),Array.isArray(i)?n.wrap=i.some(({type:e})=>"wrap"===e):i?.type==="wrap"&&(n.wrap=!0),{text:r.replace(T,""),directive:n}).directive)}finally{A=!1}}return{configDirective:W,initDirective:E,mergeConfig:function(e,t,r,n=!1,i=!1){O=r,A=i;try{let o=t.map(E).join(`
3
+ `,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),F.debug(`Detecting diagram directive${null!==r?" type:"+r:""} based on the text:${e}`);let i,o=[];for(;null!==(i=T.exec(e));)if(t(),i.index===T.lastIndex&&T.lastIndex++,i&&!r||r&&i[1]?.match(r)||r&&i[2]?.match(r)){let e=i[1]?i[1]:i[2],t=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:e,args:t})}return 0===o.length?{type:e,args:null}:1===o.length?o[0]:o}catch(t){return F.error(`ERROR: ${t.message} - Unable to parse directive type: '${r}' based on the text: '${e}'`),{type:void 0,args:null}}},W=function(e,n){let i=z(e,/(?:init\b)|(?:initialize\b)/),o={};if(Array.isArray(i)){let e,n=i.map(e=>e.args);e=A?structuredClone(n):void 0,l(n),e&&function e(r,n){if(!(!r||!n||"object"!=typeof r||"object"!=typeof n))for(let i of Object.keys(n))t(),"string"==typeof r[i]&&"string"==typeof n[i]?n[i]=r[i]:e(r[i],n[i])}(e,n),o=r(o,[...n])}else o=i.args;if(!o)return;let a=O,s="config";return void 0!==o[s]&&("flowchart-v2"===a&&(a="flowchart"),o[a]=o[s],delete o[s]),o};function $(e,t,r=!0){if(!/^\w+$/.test(e))throw Error("Invalid directive name");if(!r)return"%%{"+e+"}%%";let n="%%{"+e+": "+(Object.is(t,-0)?"-0":JSON.stringify(t)).replace(/[&<>#%'\u2028\u2029]/g,e=>"\\u"+e.charCodeAt(0).toString(16).padStart(4,"0"))+"}%%";T.lastIndex=0;let i=T.exec(n);T.lastIndex=0;let o=z(n,e);if(!i||i[0]!==n||!Object.is(typeof o.args,typeof t))throw Error("init argument has no complete pinned scalar token");return n}function E(e){return $("init",e)}function B(e,r,n,i=!1){O=n,A=i;try{let n,i;return function(e,...r){return function(e,...r){let n=r.slice(0,-1),i=r[r.length-1],o=e;for(let e=0;e<n.length;e++)t(),o=function e(r,n,i,o){if(d(r)&&(r=Object(r)),null==n||"object"!=typeof n)return r;if(o.has(n))return function(e){if(d(e))return e;if(Array.isArray(e)||p(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(null==t)return Object.assign(Object.create(t),e);let r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let t=new r(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let t;return(t="u">typeof AggregateError&&e instanceof AggregateError?new r(e.errors,e.message,{cause:e.cause}):new r(e.message,{cause:e.cause})).stack=e.stack,Object.assign(t,e),t}return"u">typeof File&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}(o.get(n));if(o.set(n,r),Array.isArray(n)){n=n.slice();for(let e=0;e<n.length;e++)t(),e in n||(n[e]=void 0)}let a=[...Object.keys(n),...u(n)];for(let l=0;l<a.length;l++){t();let s=a[l];if("__proto__"===s)continue;let c=n[s],d=r[s];if(C(c)&&(c=Object.assign({},c)),C(d)&&(d=Object.assign({},d)),m(c)&&(c=w(c)),Array.isArray(c))if(Array.isArray(d)){let e=[],r=Reflect.ownKeys(d);for(let n=0;n<r.length;n++){t();let i=r[n];e[i]=d[i]}d=e}else if(function(e){var t;return j(e)&&null!=e&&"function"!=typeof e&&Number.isSafeInteger(t=e.length)&&t>=0}(d)){let e=[];for(let r=0;r<d.length;r++)t(),e[r]=d[r];d=e}else d=[];let u=i(d,c,s,r,n,o);void 0!==u?r[s]=u:Array.isArray(c)||j(d)&&j(c)&&(g(d)||g(c)||p(d)||p(c))?r[s]=e(d,c,i,o):null==d&&g(c)?r[s]=e({},c,i,o):null==d&&p(c)?r[s]=w(c):(void 0===d||void 0!==c)&&(r[s]=c)}return r}(o,n[e],i,new Map);return o}(e,...r,c)}({},structuredClone(e),(n=W(r)??{},i=z(r,"wrap"),Array.isArray(i)?n.wrap=i.some(({type:e})=>"wrap"===e):i?.type==="wrap"&&(n.wrap=!0),{text:r.replace(T,""),directive:n}).directive)}finally{A=!1}}return{configDirective:$,initDirective:E,mergeConfig:function(e,t,r,n=!1,i=!1){O=r,A=i;try{let o=t.map(E).join(`
4
4
  `)+(n?`
5
5
  %%{wrap}%%`:"");return B(e,o,r,i)}finally{A=!1}},mergeConfigSource:B}}var el=/^note\s+(left|right)\s+of\s+([\w\p{L}-]+)\s*$/iu,es=/^note\s+(left|right)\s+of\s+([\w\p{L}-]+)\s+([^\s:].*)$/iu,ec=/^end\s+note$/i;function ed(e,t=!1){for(let r=0;r<e.length;r++){let n=e[r];if('"'===n){t=!t;continue}if(t)continue;if("%"===n&&"%"===e[r+1])return{comment:r,quoted:t};if(":"!==n||":"===e[r-1]||":"===e[r+1])continue;let i=e.slice(0,r).trim();if(/^[\w\p{L}-]+$/u.test(i)||i.includes("--\x3e")||/^note\s+(?:left|right)\s+of\s+[\w\p{L}-]+$/iu.test(i))return{comment:-1,quoted:!1}}return{comment:-1,quoted:t}}function eu(e){let t=[],r=[];for(let n=e.length-1,i=!1,o=!1;n>=0;n--)t[n]=i,r[n]=o,i||=ec.test(function(e){let t=ed(e).comment;return(t<0?e:e.slice(0,t)).trim()}(e[n])),o||=e[n].includes('"');let n=!1,i=!1;return e.map((e,o)=>{let a=i,l=ed(e,!n&&a),s=(l.comment<0?e:e.slice(0,l.comment)).trim(),c=n&&!ec.test(s),d=c?e.trim():s,u=!1;n?c||(n=!1):!a&&(el.test(d)||t[o]&&es.test(d))&&(n=u=!0),i=!n&&l.quoted&&r[o]&&(a||/^(?:state|note)\s/i.test(d));let f=!c&&l.comment>0&&!/\s/.test(e[l.comment-1]);return{text:d,commentIndex:c?-1:l.comment,noteBody:c,noteOpen:u,openQuote:i,commentGlued:f}})}function ef(e,t,r,n){if("{"!==e[t])throw RangeError(`scanMetadataBlock: no "{" at ${t}`);if("sequence"===r){let r=e.indexOf("}",t+1);return r<0?{kind:"unclosed"}:r===t+1?{kind:"invalid",message:"empty @{} participant metadata"}:{kind:"closed",body:e.slice(t+1,r).trim(),end:r}}let i="";for(let r=t+1;r<e.length;r++){let t=e[r];if('"'===t){let t=e.indexOf('"',r+1);if(t<0)return{kind:"unclosed"};let o=r+1;i+=`"${e.slice(o,t).replace(/\n\s*/g,(e,t)=>(n?.(o+t,o+t+e.length,5),"<br/>"))}"`,r=t}else{if("}"===t)return{kind:"closed",body:i,end:r};if("^"===t)return{kind:"invalid",message:'unquoted "^" in @{} metadata'};i+=t}}return{kind:"unclosed"}}function em(e){return/^(?:%(?!\{)|#(?![a-z\d]+;))/i.test(e.trimStart())}function eg(e){return eh(e,eb)}function ep(e){return e}function eb(e,t,r){return{raw:e,line:t,column:r,endColumn:r+e.length}}function eh(e,t){let r=[],n=!1;for(let[i,o]of e.entries()){let e=0,a=!o.trim(),l=(n,o)=>{if(!n.trim()&&!a)return;let l=e+o;r.push(t(n,i,l))},s=o;if(n){let t=s.indexOf("}");if(t<0){l(s,0);continue}l(s.slice(0,t+1),0),s=s.slice(t+1),e=t+1,n=!1}let c=0,d=!1,u=-1;for(let e=0;e<s.length;e++){if(e===c){let t=s.slice(c).trimStart();if(/^accDescr\s*:?\s*\{/i.exec(t)){let t=s.indexOf("{",c),r=s.indexOf("}",t+1);if(r<0){l(s.slice(c),c),n=!0,d=!0;break}l(s.slice(c,r+1),c),c=r+1,e=r;continue}let r=/^\s*end(?=[^\S\r\n]+\S)/i.exec(s.slice(c));if(r){l(s.slice(c,c+r[0].length),c),c+=r[0].length,e=c-1;continue}if(/^(?:rect|box)\s+#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8});/i.test(t)||em(t)||/^(?:accTitle|accDescr)(?:\s*:|\s+)/i.test(t)){l(s.slice(c),c),d=!0;break}}let t=s[e];if("@"===t&&"{"===s[e+1]&&/^(?:participant|actor)\b/i.test(s.slice(c,e).trimStart())){let t=ef(s,e+1,"sequence");e="closed"===t.kind?t.end:"unclosed"===t.kind?s.length:e+1;continue}if("#"===t&&u<0&&(u=e),"#"===t&&!ex(s,e)&&!(/^\s*(?:rect|box)\s*$/i.test(s.slice(c,e))&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})(?=\s|;|$)/i.test(s.slice(e)))){l(s.slice(c,e),c),l(s.slice(e),e),d=!0;break}";"!==s[e]||function(e,t,r,n){let i=r-1;for(;i>=t&&/[a-z\d]/i.test(e[i]);)i--;return!("#"!==e[i]||i===r-1||!ex(e,i)||n===i&&/^\s*(?:rect|box)\s+#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e.slice(t,r)))}(s,c,e,u)||(l(s.slice(c,e),c),c=e+1,u=-1)}d||l(s.slice(c),c)}return r}var ey=/#(?:\d+|[a-z][a-z\d]*);/iy;function ex(e,t){return ey.lastIndex=t,ey.test(e)}function ek(e,t){let r=/[\r\n]/g;return r.lastIndex=t,r.exec(e)?.index??-1}var ev=Object.freeze([]),eS=Object.freeze([]),e_=Object.freeze([]);function ew(e){return Object.freeze({originalText:e,text:e,payloadText:e,authoredPayloadText:e,lineText:e,upstreamText:e,prepassedText:e,changes:eS,mappings:ev,lineMappings:ev,upstreamMappings:ev,prepassedMappings:ev})}function eC(e,t,r){if(0===t.length)return e;let n=[],i=[],o=0,a=0;for(let r of t){n.push(e.text.slice(o,r.start),r.text);let t=r.start+a;i.push(Object.freeze({originalStart:r.start,originalEnd:r.end,cleanedStart:t,cleanedEnd:t+r.text.length})),a+=r.text.length-(r.end-r.start),o=r.end}n.push(e.text.slice(o));let l=e.mappings.length;return{text:n.join(""),mappings:[...e.mappings,Object.freeze({edits:Object.freeze(i)})],changes:[...e.changes,...i.map(e=>({reason:r,stage:l,edit:e}))]}}function ej(e,t,r){let n=[];for(let i of e.matchAll(t)){let e=r(i[0]);e!==i[0]&&n.push({start:i.index,end:i.index+i[0].length,text:e})}return n}function eF(e){return e.text.includes("\r")?eC(e,ej(e.text,/\r\n?/g,()=>`
6
- `),"line-ending"):e}function eO(e,t,r,n=!1){let i=e.edits,o=0,a=i.length;for(;o<a;){let e=o+Math.floor((a-o)/2);(n?i[e].originalStart:i[e].cleanedStart)<=t?o=e+1:a=e}if(0===o)return t;let l=i[o-1],s=n?l.originalStart:l.cleanedStart,c=n?l.originalEnd:l.cleanedEnd,d=n?l.cleanedStart:l.originalStart,u=n?l.cleanedEnd:l.originalEnd;return t>c?t+u-c:t===s&&s!==c?d:t===c&&s!==c?u:"start"===r?d:u}function eA(e,t,r,n=e.length){for(let i=n-1;i>=0;i--)t=eO(e[i],t,r);return t}function eT(e,t){return"text"===t||"payloadText"===t?e.mappings:"lineText"===t||"authoredPayloadText"===t?e.lineMappings:"upstreamText"===t?e.upstreamMappings:e.prepassedMappings}function eL(e,t,r="start",n="text"){if(!Number.isInteger(t)||t<0||t>e[n].length)throw RangeError("Cleanup offset is outside the selected source view");return eA(eT(e,n),t,r)}function ez(e,t,r="start",n="text"){if(!Number.isInteger(t)||t<0||t>e.originalText.length)throw RangeError("Cleanup offset is outside the original source");for(let i of eT(e,n))t=eO(i,t,r,!0);return t}function e$(e,t,r,n){let i=[];for(let{reason:o,stage:a,edit:l}of e.changes){if(void 0!==n&&o!==n)continue;let s=eA(e.mappings,l.originalStart,"start",a),c=eA(e.mappings,l.originalEnd,"end",a),d=l.cleanedStart,u=l.cleanedEnd;for(let t=a+1;t<e.mappings.length;t++)d=eO(e.mappings[t],d,"start",!0),u=eO(e.mappings[t],u,"end",!0);let f=0,m=r.length;for(;f<m;){let e=f+Math.floor((m-f)/2);r[e]<=s?f=e+1:m=e}let g=Math.max(1,f);i.push(Object.freeze({reason:o,view:t,originalStart:s,originalEnd:c,cleanedStart:d,cleanedEnd:u,line:g,col:s-r[g-1]+1}))}return i}function eW(e,t=[]){let r=e.includes("\r"),n=e.includes("&"),i=e.includes("<")&&e.includes('="')&&e.includes(">"),o=e.includes(";")&&(e.includes("style")||e.includes("classDef"));if(!t.length&&!r&&!n&&!i&&!o)return ew(e);let a={text:e,mappings:ev,changes:e_},l=eC(a,t,"native-accessibility"),s=eF(l),c=n?eC(l,ej(l.text,/&(?:#[xX][0-9a-fA-F]+|#[0-9]+|[A-Za-z][A-Za-z0-9]*);/g,R),"xml-entity"):l,d=c===l?s:eF(c),f=o?function(e){if(!e.text.includes(";")||!e.text.includes("style")&&!e.text.includes("classDef"))return e;let t=[];for(let r of e.text.matchAll(/[^\r\n\u2028\u2029]+/g)){if(!r[0].includes(";")||!r[0].includes("style")&&!r[0].includes("classDef"))continue;let e=u(r[0]),n=r[0].length,i=[];for(let t=r[0].length-e.length;t>0;t--){let e=r[0].lastIndexOf(";",n-1);i.push({start:r.index+e,end:r.index+e+1,text:""}),n=e}t.push(...i.reverse())}let r=[];for(let e of t){let t=r.at(-1);t&&t.end===e.start?t.end=e.end:r.push(e)}return eC(e,r,"style-semicolon")}(s):s,m=i?function(e){let t=e.text.includes("<")?e.text.lastIndexOf(">"):-1;if(t<0)return e;let r=[];for(let n of e.text.slice(0,t+1).matchAll(/<(\w+)([^>]*)>/g)){let e=n.index+1+n[1].length;for(let t of n[2].matchAll(/="([^"]*)"/g)){let n=e+t.index+1;r.push({start:n,end:n+1,text:"'"},{start:n+t[0].length-2,end:n+t[0].length-1,text:"'"})}}return eC(e,r,"html-attribute-quotes")}(s):s;if(d===a&&f===a&&m===a)return ew(e);let g=[0];for(let t=0;t<e.length;t++)"\r"===e[t]?(e[t+1]===`
6
+ `),"line-ending"):e}function eO(e,t,r,n=!1){let i=e.edits,o=0,a=i.length;for(;o<a;){let e=o+Math.floor((a-o)/2);(n?i[e].originalStart:i[e].cleanedStart)<=t?o=e+1:a=e}if(0===o)return t;let l=i[o-1],s=n?l.originalStart:l.cleanedStart,c=n?l.originalEnd:l.cleanedEnd,d=n?l.cleanedStart:l.originalStart,u=n?l.cleanedEnd:l.originalEnd;return t>c?t+u-c:t===s&&s!==c?d:t===c&&s!==c?u:"start"===r?d:u}function eA(e,t,r,n=e.length){for(let i=n-1;i>=0;i--)t=eO(e[i],t,r);return t}function eT(e,t){return"text"===t||"payloadText"===t?e.mappings:"lineText"===t||"authoredPayloadText"===t?e.lineMappings:"upstreamText"===t?e.upstreamMappings:e.prepassedMappings}function eL(e,t,r="start",n="text"){if(!Number.isInteger(t)||t<0||t>e[n].length)throw RangeError("Cleanup offset is outside the selected source view");return eA(eT(e,n),t,r)}function ez(e,t,r="start",n="text"){if(!Number.isInteger(t)||t<0||t>e.originalText.length)throw RangeError("Cleanup offset is outside the original source");for(let i of eT(e,n))t=eO(i,t,r,!0);return t}function eW(e,t,r,n){let i=[];for(let{reason:o,stage:a,edit:l}of e.changes){if(void 0!==n&&o!==n)continue;let s=eA(e.mappings,l.originalStart,"start",a),c=eA(e.mappings,l.originalEnd,"end",a),d=l.cleanedStart,u=l.cleanedEnd;for(let t=a+1;t<e.mappings.length;t++)d=eO(e.mappings[t],d,"start",!0),u=eO(e.mappings[t],u,"end",!0);let f=0,m=r.length;for(;f<m;){let e=f+Math.floor((m-f)/2);r[e]<=s?f=e+1:m=e}let g=Math.max(1,f);i.push(Object.freeze({reason:o,view:t,originalStart:s,originalEnd:c,cleanedStart:d,cleanedEnd:u,line:g,col:s-r[g-1]+1}))}return i}function e$(e,t=[]){let r=e.includes("\r"),n=e.includes("&"),i=e.includes("<")&&e.includes('="')&&e.includes(">"),o=e.includes(";")&&(e.includes("style")||e.includes("classDef"));if(!t.length&&!r&&!n&&!i&&!o)return ew(e);let a={text:e,mappings:ev,changes:e_},l=eC(a,t,"native-accessibility"),s=eF(l),c=n?eC(l,ej(l.text,/&(?:#[xX][0-9a-fA-F]+|#[0-9]+|[A-Za-z][A-Za-z0-9]*);/g,D),"xml-entity"):l,d=c===l?s:eF(c),f=o?function(e){if(!e.text.includes(";")||!e.text.includes("style")&&!e.text.includes("classDef"))return e;let t=[];for(let r of e.text.matchAll(/[^\r\n\u2028\u2029]+/g)){if(!r[0].includes(";")||!r[0].includes("style")&&!r[0].includes("classDef"))continue;let e=u(r[0]),n=r[0].length,i=[];for(let t=r[0].length-e.length;t>0;t--){let e=r[0].lastIndexOf(";",n-1);i.push({start:r.index+e,end:r.index+e+1,text:""}),n=e}t.push(...i.reverse())}let r=[];for(let e of t){let t=r.at(-1);t&&t.end===e.start?t.end=e.end:r.push(e)}return eC(e,r,"style-semicolon")}(s):s,m=i?function(e){let t=e.text.includes("<")?e.text.lastIndexOf(">"):-1;if(t<0)return e;let r=[];for(let n of e.text.slice(0,t+1).matchAll(/<(\w+)([^>]*)>/g)){let e=n.index+1+n[1].length;for(let t of n[2].matchAll(/="([^"]*)"/g)){let n=e+t.index+1;r.push({start:n,end:n+1,text:"'"},{start:n+t[0].length-2,end:n+t[0].length-1,text:"'"})}}return eC(e,r,"html-attribute-quotes")}(s):s;if(d===a&&f===a&&m===a)return ew(e);let g=[0];for(let t=0;t<e.length;t++)"\r"===e[t]?(e[t+1]===`
7
7
  `&&t++,g.push(t+1)):e[t]===`
8
- `&&g.push(t+1);let p=[...e$(d,"text",g),...e$(f,"prepassedText",g,"style-semicolon"),...e$(m,"upstreamText",g,"html-attribute-quotes")];return Object.freeze({originalText:e,text:d.text,payloadText:c.text.includes("\r")?c.text.replace(/\r\n/g,`
8
+ `&&g.push(t+1);let p=[...eW(d,"text",g),...eW(f,"prepassedText",g,"style-semicolon"),...eW(m,"upstreamText",g,"html-attribute-quotes")];return Object.freeze({originalText:e,text:d.text,payloadText:c.text.includes("\r")?c.text.replace(/\r\n/g,`
9
9
  `):c.text,authoredPayloadText:r?l.text.replace(/\r\n/g,`
10
- `):l.text,lineText:s.text,upstreamText:m.text,prepassedText:f.text,changes:Object.freeze(p),mappings:Object.freeze(d.mappings),lineMappings:Object.freeze(s.mappings),upstreamMappings:Object.freeze(m.mappings),prepassedMappings:Object.freeze(f.mappings)})}function eE(e,t){let r=eB(t);return void 0!==e.title||void 0===r?e:{...e,title:r}}function eB(e){let t=e?.title;return"string"==typeof t&&""!==t.trim()?t:void 0}var eP=/^\s*%%(?!\{)\s*(.*)\r?$/;function eI(e,t="render"){return function(e,t="render"){var r;let n=e.cleanup??eW(e.originalText),i=e.wrapperSource?.length??0,o=e.cleanup&&void 0!==e.authoredWrapperLength?eL(n,i,"end","text"):i,a=e.cleanup&&"render"===t?"payloadText":"authoredPayloadText",l=ez(n,o,"end",a),s=n[a].slice(l),c,d=0,u=(r=(e,t)=>{let r=e-d,n=c?.at(-1);n?.at===r?n.after=e+t:(c??=[]).push({at:r,before:e,after:e+t}),d+=t})?s.replace($,(e,t,n,i)=>(r(i,e.length),"")):s.replace($,"");return{text:u,sourceOffset:(e,t="start")=>{if(!Number.isInteger(e)||e<0||e>u.length)throw RangeError("Family source offset is outside the preserved payload");let r=0,i=c?.length??0;for(;r<i;){let t=r+Math.floor((i-r)/2);c[t].at<=e?r=t+1:i=t}let o=c?.[r-1];return eL(n,l+(o?e===o.at?"start"===t?o.before:o.after:e+o.after-o.at:e),t,a)},familyOffset:(e,t="start")=>{let r=ez(n,e,t,a)-l;if(r<0||r>s.length)throw RangeError("Authored offset is outside the preserved family");let i=0,o=c?.length??0;for(;i<o;){let e=i+Math.floor((o-i)/2);c[e].before<=r?i=e+1:o=e}let d=c?.[i-1];return d?r<=d.after?d.at:r-d.after+d.at:r}}}(e,t).text}function eM(e){let t=[],r=RegExp($.source,"gm"),n;for(;null!==(n=r.exec(e));)eo(n[0])&&t.push({raw:n[0],parsed:function(e){let t=RegExp($.source,"m").exec(e);return t?void 0!==t[1]||void 0!==t[2]?eQ(t[1]??t[2]):/%%\{\s*wrap\s*\}/.test(t[0])?{wrap:!0}:{}:void 0}(n[0])??{}});return t}function eq(e,t={},r="authored",n){let i=eN(e,null),a=eW(e,i),l=I("render"===r?a.text:a.lineText),s=n?n(l,"loose"):H("authored"===r?R(l):l,"loose"),c=eN(e,s),d=i.length>0||c.length>0?eW(e,c):a;return function e(t,r,n,i,a){let l="render"===n?i.text:i.lineText,s=function(e,t={},r=H(R(I(e)),"loose")){for(let t of eN(e,r).toReversed())e=e.slice(0,t.start)+t.text+e.slice(t.end);let n=z(e),i=n?eZ(function(e){en(e,"Mermaid frontmatter");let t=o(e);if(!t.ok)throw new eK(g({what:`Mermaid frontmatter is not valid YAML: ${t.message}`,expectedForm:"a YAML mapping between the two `---` lines",example:`---
10
+ `):l.text,lineText:s.text,upstreamText:m.text,prepassedText:f.text,changes:Object.freeze(p),mappings:Object.freeze(d.mappings),lineMappings:Object.freeze(s.mappings),upstreamMappings:Object.freeze(m.mappings),prepassedMappings:Object.freeze(f.mappings)})}function eE(e,t){let r=eB(t);return void 0!==e.title||void 0===r?e:{...e,title:r}}function eB(e){let t=e?.title;return"string"==typeof t&&""!==t.trim()?t:void 0}var eP=/^\s*%%(?!\{)\s*(.*)\r?$/;function eI(e,t="render"){return function(e,t="render"){var r;let n=e.cleanup??e$(e.originalText),i=e.wrapperSource?.length??0,o=e.cleanup&&void 0!==e.authoredWrapperLength?eL(n,i,"end","text"):i,a=e.cleanup&&"render"===t?"payloadText":"authoredPayloadText",l=ez(n,o,"end",a),s=n[a].slice(l),c,d=0,u=(r=(e,t)=>{let r=e-d,n=c?.at(-1);n?.at===r?n.after=e+t:(c??=[]).push({at:r,before:e,after:e+t}),d+=t})?s.replace(W,(e,t,n,i)=>(r(i,e.length),"")):s.replace(W,"");return{text:u,sourceOffset:(e,t="start")=>{if(!Number.isInteger(e)||e<0||e>u.length)throw RangeError("Family source offset is outside the preserved payload");let r=0,i=c?.length??0;for(;r<i;){let t=r+Math.floor((i-r)/2);c[t].at<=e?r=t+1:i=t}let o=c?.[r-1];return eL(n,l+(o?e===o.at?"start"===t?o.before:o.after:e+o.after-o.at:e),t,a)},familyOffset:(e,t="start")=>{let r=ez(n,e,t,a)-l;if(r<0||r>s.length)throw RangeError("Authored offset is outside the preserved family");let i=0,o=c?.length??0;for(;i<o;){let e=i+Math.floor((o-i)/2);c[e].before<=r?i=e+1:o=e}let d=c?.[i-1];return d?r<=d.after?d.at:r-d.after+d.at:r}}}(e,t).text}function eM(e){let t=[],r=RegExp(W.source,"gm"),n;for(;null!==(n=r.exec(e));)eo(n[0])&&t.push({raw:n[0],parsed:function(e){let t=RegExp(W.source,"m").exec(e);return t?void 0!==t[1]||void 0!==t[2]?eQ(t[1]??t[2]):/%%\{\s*wrap\s*\}/.test(t[0])?{wrap:!0}:{}:void 0}(n[0])??{}});return t}function eq(e,t={},r="authored",n){let i=eN(e,null),a=e$(e,i),l=I("render"===r?a.text:a.lineText),s=n?n(l,"loose"):H("authored"===r?D(l):l,"loose"),c=eN(e,s),d=i.length>0||c.length>0?e$(e,c):a;return function e(t,r,n,i,a){let l="render"===n?i.text:i.lineText,s=function(e,t={},r=H(D(I(e)),"loose")){for(let t of eN(e,r).toReversed())e=e.slice(0,t.start)+t.text+e.slice(t.end);let n=z(e),i=n?eZ(function(e){en(e,"Mermaid frontmatter");let t=o(e);if(!t.ok)throw new eK(g({what:`Mermaid frontmatter is not valid YAML: ${t.message}`,expectedForm:"a YAML mapping between the two `---` lines",example:`---
11
11
  title: "Order flow: v2"
12
- ---`}).message);return er(t.value,"Mermaid frontmatter"),e0(t.value)??{}}(n.yaml)):{},a=function(e,t,r){let n,i=eM(e).flatMap(e=>{let t=function(e){let t=RegExp($.source,"m").exec(e),r=function(e){let t=RegExp($.source,"m").exec(e);if(!t)return;let r=t[1]??t[2];if(void 0===r)return null;if(!r.trim())return{};if(/^\w+$/.test(r.trim()))return r.trim();en(r,"Mermaid init directive",{trackFlowDepth:!0});try{let e=JSON.parse(r.replace(/'/g,'"'));return er(e,"Mermaid init directive"),e1(e)}catch(e){if(e instanceof et)throw e;return eQ(r)}}(e);if(!(!t||void 0===r))return{kind:/%%\{\s*(\w+)/.exec(t[0])[1],hasArgs:void 0!==t[1]||void 0!==t[2],payload:r}}(e.raw);return t?[t]:[]}),o=W(e),a=E(o)[0]?.split(/\s/)[0]??"",l=(n=(r?.id??a).split(/[;:\s]/,1)[0].replace(/-(?:v2|beta)$/i,"").toLowerCase(),/^c4(?:context|container|component|dynamic|deployment)?$/.test(n)?"c4":({graph:"flowchart-v2",flowchart:"flowchart-v2",class:"classDiagram",classdiagram:"classDiagram",state:"stateDiagram",statediagram:"stateDiagram",sequencediagram:"sequence",erdiagram:"er",requirementdiagram:"requirement",quadrant:"quadrantChart",quadrantchart:"quadrantChart",gitgraph:"gitGraph"})[n]??n);if(0===i.length&&0===Object.keys(t).length)return{body:o,frontmatter:t};let s=i.filter(e=>/(?:init\b)|(?:initialize\b)/.test(e.kind)).map(e=>e.payload),c=i.some(e=>"wrap"===e.kind);try{return{body:o,frontmatter:function(...e){return ea().mergeConfigSource(...e)}(t,i.map(e=>(function(...e){return ea().configDirective(...e)})(e.kind,e.payload,e.hasArgs)).join(`
13
- `),l,!0)}}catch{let e=eD({},t);for(let t of s){if(!t||"object"!=typeof t||Array.isArray(t))continue;let r=eD({},t);void 0!==r.config&&(1===s.length&&(r["flowchart-v2"===l?"flowchart":l]=r.config),delete r.config),e=eD(e,r)}return c&&(e.wrap=!0),{body:o,frontmatter:e}}}(n?e.slice(n.source.length):e,eD(eZ(t),i),r),l=B(a.body),s=a.frontmatter;return{body:l,lines:E(l),frontmatter:s}}(l,eV(r),a),c=s.body.split(/\r?\n/),d=/^sequenceDiagram\b/i.test(s.lines[0]??"")&&/;\s*acc(?:Title|Descr)\b/i.test(s.body)?eh(c,ep):c,u=b(d,U(R(s.lines[0]??""),d,a),"render"===n?e=>("native"===e.form?m:f)({title:e.value}).title:void 0),y=function(e,t,r){let n=z(e),i=n?.source.length??+!!e.startsWith("\uFEFF"),o=eM(e.slice(i)),a=e=>e.replace(/[^\r\n]/g," "),l=(n?a(n.source)+e.slice(n.source.length):e).replace(RegExp($.source,"gm"),a),s=[],c=l.split(/\r?\n/),d=c.find(e=>e.trim().length>0&&!eP.test(e))?.trim()??"",u=/^stateDiagram(?:-v2)?(?=$|[\s;%])/i.test(d),f=/^sequenceDiagram\b/i.test(d),m=u?eu(c):void 0,g=(e,t)=>{if(!f)return;let r=eh([e],ep).find(e=>e.trimStart().startsWith("%%"));r&&s.push({text:r.trimStart().slice(2).trim(),line:t})},b=U(R(d),c,r),y=-1;for(let e=0;e<c.length;e++){let t=e>y?p(c,e):null;if(void 0===t)break;if(null!==t){t.suffixLine&&g(t.suffixLine,t.endIndex+1),e=t.endIndex;continue}e>y&&(y=h(b,e,c.length));let r=c[e],n=m?.[e];if(n){n.commentIndex>=0&&s.push({text:r.slice(n.commentIndex+2).trim(),line:e+1});continue}let i=r.match(eP);i?s.push({text:i[1],line:e+1}):f&&g(r,e+1)}let x=i,k=new RegExp($.source);for(;;){let t=e.slice(x);if(0===t.length)break;let r=t.match(k);if(r?.index===0&&r[0].length>0){x+=r[0].length;continue}let n=t.indexOf(`
14
- `),i=-1===n?t:t.slice(0,n);if(p([i],0)?.form==="native")break;if(/^\s*$/.test(i)||eP.test(i)){x+=-1===n?t.length:n+1;continue}break}return{...x>0?{wrapperSource:e.slice(0,x)}:{},initDirectives:o,comments:s,accessibility:t}}(l,u.accessibility,a),x=l===i.lineText;if(x&&l!==t){void 0!==y.wrapperSource&&(y.wrapperSource=t.slice(0,eL(i,y.wrapperSource.length,"end","lineText")));let e=z(l)?.source.length??+!!l.startsWith("\uFEFF"),r=[...l.slice(e).matchAll(RegExp($.source,"gm"))].filter(e=>eo(e[0])).values();for(let t of y.initDirectives){let n=e+r.next().value.index,o=n+t.raw.length;t.raw=function(e,t,r,n="text"){let i=function(e,t,r,n="text"){if(r<t)throw RangeError("Cleanup range ends before it starts");return{start:eL(e,t,"start",n),end:eL(e,r,"end",n)}}(e,t,r,n);return e.originalText.slice(i.start,i.end)}(i,n,o,"lineText")}}let k=u.familyLines.join(`
12
+ ---`}).message);return er(t.value,"Mermaid frontmatter"),e0(t.value)??{}}(n.yaml)):{},a=function(e,t,r){let n,i=eM(e).flatMap(e=>{let t=function(e){let t=RegExp(W.source,"m").exec(e),r=function(e){let t=RegExp(W.source,"m").exec(e);if(!t)return;let r=t[1]??t[2];if(void 0===r)return null;if(!r.trim())return{};if(/^\w+$/.test(r.trim()))return r.trim();en(r,"Mermaid init directive",{trackFlowDepth:!0});try{let e=JSON.parse(r.replace(/'/g,'"'));return er(e,"Mermaid init directive"),e1(e)}catch(e){if(e instanceof et)throw e;return eQ(r)}}(e);if(!(!t||void 0===r))return{kind:/%%\{\s*(\w+)/.exec(t[0])[1],hasArgs:void 0!==t[1]||void 0!==t[2],payload:r}}(e.raw);return t?[t]:[]}),o=$(e),a=E(o)[0]?.split(/\s/)[0]??"",l=(n=(r?.id??a).split(/[;:\s]/,1)[0].replace(/-(?:v2|beta)$/i,"").toLowerCase(),/^c4(?:context|container|component|dynamic|deployment)?$/.test(n)?"c4":({graph:"flowchart-v2",flowchart:"flowchart-v2",class:"classDiagram",classdiagram:"classDiagram",state:"stateDiagram",statediagram:"stateDiagram",sequencediagram:"sequence",erdiagram:"er",requirementdiagram:"requirement",quadrant:"quadrantChart",quadrantchart:"quadrantChart",gitgraph:"gitGraph"})[n]??n);if(0===i.length&&0===Object.keys(t).length)return{body:o,frontmatter:t};let s=i.filter(e=>/(?:init\b)|(?:initialize\b)/.test(e.kind)).map(e=>e.payload),c=i.some(e=>"wrap"===e.kind);try{return{body:o,frontmatter:function(...e){return ea().mergeConfigSource(...e)}(t,i.map(e=>(function(...e){return ea().configDirective(...e)})(e.kind,e.payload,e.hasArgs)).join(`
13
+ `),l,!0)}}catch{let e=eR({},t);for(let t of s){if(!t||"object"!=typeof t||Array.isArray(t))continue;let r=eR({},t);void 0!==r.config&&(1===s.length&&(r["flowchart-v2"===l?"flowchart":l]=r.config),delete r.config),e=eR(e,r)}return c&&(e.wrap=!0),{body:o,frontmatter:e}}}(n?e.slice(n.source.length):e,eR(eZ(t),i),r),l=B(a.body),s=a.frontmatter;return{body:l,lines:E(l),frontmatter:s}}(l,eV(r),a),c=s.body.split(/\r?\n/),d=/^sequenceDiagram\b/i.test(s.lines[0]??"")&&/;\s*acc(?:Title|Descr)\b/i.test(s.body)?eh(c,ep):c,u=b(d,U(D(s.lines[0]??""),d,a),"render"===n?e=>("native"===e.form?m:f)({title:e.value}).title:void 0),y=function(e,t,r){let n=z(e),i=n?.source.length??+!!e.startsWith("\uFEFF"),o=eM(e.slice(i)),a=e=>e.replace(/[^\r\n]/g," "),l=(n?a(n.source)+e.slice(n.source.length):e).replace(RegExp(W.source,"gm"),a),s=[],c=l.split(/\r?\n/),d=c.find(e=>e.trim().length>0&&!eP.test(e))?.trim()??"",u=/^stateDiagram(?:-v2)?(?=$|[\s;%])/i.test(d),f=/^sequenceDiagram\b/i.test(d),m=u?eu(c):void 0,g=(e,t)=>{if(!f)return;let r=eh([e],ep).find(e=>e.trimStart().startsWith("%%"));r&&s.push({text:r.trimStart().slice(2).trim(),line:t})},b=U(D(d),c,r),y=-1;for(let e=0;e<c.length;e++){let t=e>y?p(c,e):null;if(void 0===t)break;if(null!==t){t.suffixLine&&g(t.suffixLine,t.endIndex+1),e=t.endIndex;continue}e>y&&(y=h(b,e,c.length));let r=c[e],n=m?.[e];if(n){n.commentIndex>=0&&s.push({text:r.slice(n.commentIndex+2).trim(),line:e+1});continue}let i=r.match(eP);i?s.push({text:i[1],line:e+1}):f&&g(r,e+1)}let x=i,k=new RegExp(W.source);for(;;){let t=e.slice(x);if(0===t.length)break;let r=t.match(k);if(r?.index===0&&r[0].length>0){x+=r[0].length;continue}let n=t.indexOf(`
14
+ `),i=-1===n?t:t.slice(0,n);if(p([i],0)?.form==="native")break;if(/^\s*$/.test(i)||eP.test(i)){x+=-1===n?t.length:n+1;continue}break}return{...x>0?{wrapperSource:e.slice(0,x)}:{},initDirectives:o,comments:s,accessibility:t}}(l,u.accessibility,a),x=l===i.lineText;if(x&&l!==t){void 0!==y.wrapperSource&&(y.wrapperSource=t.slice(0,eL(i,y.wrapperSource.length,"end","lineText")));let e=z(l)?.source.length??+!!l.startsWith("\uFEFF"),r=[...l.slice(e).matchAll(RegExp(W.source,"gm"))].filter(e=>eo(e[0])).values();for(let t of y.initDirectives){let n=e+r.next().value.index,o=n+t.raw.length;t.raw=function(e,t,r,n="text"){let i=function(e,t,r,n="text"){if(r<t)throw RangeError("Cleanup range ends before it starts");return{start:eL(e,t,"start",n),end:eL(e,r,"end",n)}}(e,t,r,n);return e.originalText.slice(i.start,i.end)}(i,n,o,"lineText")}}let k=u.familyLines.join(`
15
15
  `),v=/^stateDiagram(?:-v2)?(?=$|[\s;%])/i.test(s.lines[0]??""),S=/^timeline(?=$|[\s;#%])/i.test(s.lines[0]??""),_=v?eu(u.familyLines).filter(e=>e.noteBody||e.text.length>0).map(e=>e.text):S?u.familyLines.map(e=>e.trimStart()).filter(e=>e.trim().length>0&&!eP.test(e)):E(k),w=x?void 0:e(t,r,"authored",i,a);return{originalText:t,cleanup:i,...w?{authoredFamilyLines:w.familyLines,authoredFamilyBody:w.familyBody,authoredHeader:w.lines[0]??"",authoredWrapperLength:w.wrapperSource?.length??0}:{},text:s.lines.join(`
16
16
  `),body:s.body,lines:s.lines,familyBody:k,familyText:_.join(`
17
- `),familyLines:_,firstLine:s.lines[0]?.toLowerCase()??"",config:eG(s.frontmatter),frontmatter:s.frontmatter,...void 0!==y.wrapperSource?{wrapperSource:y.wrapperSource}:{},initDirectives:y.initDirectives,comments:y.comments,accessibility:y.accessibility}}(e,t,r,d,s)}function eN(e,t){if(!e.includes("%% agentic-mermaid "))return[];let r=z(e)?.source.length??0,o=e.slice(r);return n(o,U(R(I(e)),i(o).split(/\r\n?|\n/),t)).map(e=>({...e,start:r+e.start,end:r+e.end}))}function eR(e,t,r){return function(e,t={},r="authored",n){let i=eq(e,{},r,n);if(0===Object.keys(t).length)return i;let o=eD(i.frontmatter,eV(t));return{...i,frontmatter:o,config:eG(o)}}(e,t,"render",r)}function eD(e,t){let r=e2(e);for(let[e,n]of Object.entries(t)){if(void 0===n)continue;let t=r[e];if(e6(t)&&e6(n)){r[e]=eD(t,n);continue}r[e]=e4(n)}return r}function eJ(e,t){let r=e;for(let e of t){if(!e6(r))return;r=r[e]}return e6(r)?r:void 0}function eX(e,t){let r=e;for(let e of t){if(!e6(r))return;r=r[e]}return void 0===r||Array.isArray(r)||"object"==typeof r&&null!==r?void 0:r}function eY(e,t){let r=e;for(let e of t){if(!e6(r))return;r=r[e]}return Array.isArray(r)?r:void 0}function eV(e){return er(e,"Mermaid runtime configuration"),eZ(e0(e)??{})}function eG(e){let t,r,n,i,o=e2(e);return e6(o.themeVariables)&&(o.themeVariables=e2(o.themeVariables)),e6(o.timeline)&&("boolean"!=typeof(t=e2(o.timeline)).disableMulticolor&&delete t.disableMulticolor,(r=eU(t.sectionFills)).length>0?t.sectionFills=r:delete t.sectionFills,n=eU(t.sectionColours),i=eU(t.sectionColors),n.length>0?t.sectionColours=n:i.length>0?t.sectionColours=i:delete t.sectionColours,delete t.sectionColors,o.timeline=t),e6(o.journey)&&(o.journey=function(e){let t=e2(e);for(let e of["diagramMarginX","diagramMarginY","leftMargin","maxLabelWidth","width","height","boxMargin","boxTextMargin","noteMargin","messageMargin","bottomMarginAdj","taskMargin","activationWidth"]){let r=t[e];("number"!=typeof r||!Number.isFinite(r)||r<0)&&delete t[e]}"boolean"!=typeof t.useMaxWidth&&delete t.useMaxWidth,"boolean"!=typeof t.rightAngles&&delete t.rightAngles,"left"!==t.messageAlign&&"center"!==t.messageAlign&&"right"!==t.messageAlign&&delete t.messageAlign;let r=eH(t.taskFontSize);for(let e of(void 0!==r?t.taskFontSize=r:delete t.taskFontSize,["taskFontFamily","textPlacement","titleColor","titleFontFamily"]))("string"!=typeof t[e]||0===t[e].trim().length)&&delete t[e];let n=eH(t.titleFontSize);for(let e of(void 0!==n?t.titleFontSize=n:delete t.titleFontSize,["actorColours","sectionFills","sectionColours"])){let r=eU(t[e]);r.length>0?t[e]=r:delete t[e]}return t}(o.journey)),o}function eH(e){return"number"==typeof e&&Number.isFinite(e)&&e>0?e:"string"==typeof e&&e.trim().length>0?e.trim():void 0}function eU(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e):[]}function eZ(e){er(e,"Mermaid configuration");let t=e2(e),r=e6(t.config)?t.config:void 0;return delete t.config,r?eD(r,t):t}var eK=class extends Error{};function eQ(e){return void 0===e?{wrap:!0}:""===e.trim()?{}:function(e){en(e,"Mermaid init directive",{trackFlowDepth:!0});try{let t=a(e);return er(t,"Mermaid init directive"),e0(t)}catch(n){let t;if(n instanceof et||n instanceof v)throw n;let r=e6(t=function e(t){let r=t.trim();if(0!==r.length)return r.startsWith("{")&&r.endsWith("}")?function(t){let r={};for(let n of e5(t)){let t=function(e,t){let r=null,n=0,i=0;for(let t=0;t<e.length;t++){let o=e[t];if(r){o===r&&"\\"!==e[t-1]&&(r=null);continue}if('"'===o||"'"===o){r=o;continue}if("{"===o){n++;continue}if("}"===o){n--;continue}if("["===o){i++;continue}if("]"===o){i--;continue}if(":"===o&&0===n&&0===i)return t}return -1}(n,0);if(-1===t)return;let i=n.slice(0,t).trim(),o=n.slice(t+1).trim(),a=function(e){let t=e.trim();if(t)return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?e8(t):t}(i);if(!a)return;let l=e(o);if(void 0===l)return;r[a]=l}return r}(r.slice(1,-1)):r.startsWith("[")&&r.endsWith("]")?function(t){let r=[];for(let n of e5(t)){let t=e(n);if(void 0===t)return;r.push(t)}return r}(r.slice(1,-1)):r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'")?e8(r):"true"===r||"false"!==r&&("null"===r?null:/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/.test(r)?Number(r):r)}(e.trim()))?t:void 0;return void 0!==r&&er(r,"Mermaid init directive"),r}}(e.trim())}function e0(e){if(!(e&&"object"==typeof e&&!Array.isArray(e)))return;let t={};for(let[r,n]of Object.entries(e)){let e=e1(n);void 0!==e&&(t[r]=e)}return t}function e1(e){if(null===e)return null;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e;if(Array.isArray(e)){let t=[];for(let r of e){let e=e1(r);if(void 0===e)return;t.push(e)}return t}return e0(e)}function e2(e){let t={};for(let[r,n]of Object.entries(e))t[r]=e4(n);return t}function e4(e){return null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?e:Array.isArray(e)?e.map(e=>e4(e)):e2(e)}function e6(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function e5(e){let t=[],r="",n=null,i=0,o=0;for(let a=0;a<e.length;a++){let l=e[a];if(n){r+=l,l===n&&"\\"!==e[a-1]&&(n=null);continue}if('"'===l||"'"===l){n=l,r+=l;continue}if("{"===l){i++,r+=l;continue}if("}"===l){i--,r+=l;continue}if("["===l){o++,r+=l;continue}if("]"===l){o--,r+=l;continue}if(","===l&&0===i&&0===o){let e=r.trim();e&&t.push(e),r="";continue}r+=l}let a=r.trim();return a&&t.push(a),t}function e8(e){try{return e.startsWith("'")?e.slice(1,-1).replace(/\\\\/g,"\\").replace(/\\'/g,"'"):JSON.parse(e)}catch{return e.slice(1,-1)}}var e3=r({bg:{},fg:{},line:{},accent:{},muted:{},surface:{},border:{}}),e7=Object.freeze(["category"]),e9=r({formatVersion:{kind:"const",value:1},$schema:{kind:"string"},name:{kind:"string"},blurb:{kind:"string"},colors:{kind:"colors"},font:{kind:"string",runtimeValidator:"safeCssFontFamily"},roles:{kind:"roles"},semanticSlots:{kind:"semanticSlots"},bindings:{kind:"bindings"},constraints:{kind:"constraints"},stroke:{kind:"enum",values:["crisp","jittered","freehand"]},roughness:{kind:"number",minimum:0,maximum:10,expected:"between 0 and 10"},bowing:{kind:"number",minimum:0,maximum:10,expected:"between 0 and 10"},passes:{kind:"integer",minimum:1,maximum:8,expected:"an integer from 1 through 8"},strokeWidth:{kind:"number",exclusiveMinimum:0,maximum:20,expected:"greater than 0 and at most 20"},fill:{kind:"enum",values:["none","hachure","solid","wash"]},hachureAngle:{kind:"number",minimum:-360,maximum:360,expected:"between -360 and 360"},hachureGap:{kind:"number",exclusiveMinimum:0,maximum:100,expected:"greater than 0 and at most 100"},fillWeight:{kind:"number",exclusiveMinimum:0,maximum:20,expected:"greater than 0 and at most 20"},washOpacity:{kind:"number",minimum:0,maximum:1,expected:"between 0 and 1"},washEdge:{kind:"number",minimum:0,maximum:1,expected:"between 0 and 1"},backdrop:{kind:"enum",values:["plain","paper-ruled","grid"]},intent:{kind:"enum",values:["premium","draft","lofi"]},mono:{kind:"boolean"}});function te(e,t){return!("number"!=typeof e||!Number.isFinite(e)||"integer"===t.kind&&!Number.isInteger(e)||void 0!==t.minimum&&e<t.minimum||void 0!==t.exclusiveMinimum&&e<=t.exclusiveMinimum||void 0!==t.maximum&&e>t.maximum)}var tt=new Set(Object.freeze(["--bg","--fg","--_text","--_text-sec","--_text-muted","--_text-faint","--_line","--_arrow","--_node-fill","--_node-stroke","--_group-fill","--_group-hdr","--_inner-stroke","--_key-badge"])),tr=new Map(T.map(e=>[e.role,e])),tn=F.map(e=>tr.get(e)),ti=new Set(O),to=/^[A-Za-z][A-Za-z0-9._-]{0,63}$/,ta=new Set(["__proto__","constructor","prototype"]);function tl(e,r,n){if(!t(e))return[`"${r}" must be an object`];let i=[];for(let[t,o]of Object.entries(e)){if(!Object.hasOwn(j,t)){i.push(`unknown role style field "${r.slice(r.indexOf(".")+1)}.${t}"`);continue}if(n&&!n.has(t)){i.push(`role style field "${r}.${t}" is not applicable`);continue}let e=j[t],a=`${r}.${t}`;void 0!==o&&("number"!==e.kind||te(o,e)?"font"===e.kind&&("string"!=typeof o||void 0===k(o))?i.push(`"${a}" must be a safe non-fetching CSS font family or stack`):"color"!==e.kind||"string"==typeof o&&void 0!==x(o)&&[...o.matchAll(/var\(\s*(--[a-z0-9_-]+)/gi)].map(e=>e[1]).every(e=>tt.has(e))?"enum"!==e.kind||"string"==typeof o&&e.values.includes(o)||i.push(`"${a}" must be one of ${e.values.join(" | ")}`):i.push(`"${a}" must be a safe non-fetching CSS paint`):i.push(`"${a}" must be ${e.expected}`))}return i}function ts(e){return"string"==typeof e&&to.test(e)&&!ta.has(e)}function tc(e){if(!t(e))return["style spec must be a plain object"];if(Object.keys(e).length>Z.maxItemsPerContainer)return[`style spec must contain at most ${Z.maxItemsPerContainer} fields`];let r=[];for(let[n,i]of Object.entries(e)){if(!Object.hasOwn(e9,n)){r.push(`unknown field "${n}"`);continue}let e=e9[n];if(void 0!==i)switch(e.kind){case"const":i!==e.value&&r.push(`"${n}" must be ${e.value}`);break;case"string":"string"!=typeof i?r.push(`"${n}" must be a string`):"safeCssFontFamily"===e.runtimeValidator&&void 0===k(i)&&r.push(`"${n}" must be a safe non-fetching CSS font family or stack`);break;case"boolean":"boolean"!=typeof i&&r.push(`"${n}" must be a boolean`);break;case"number":case"integer":te(i,e)||r.push(`"${n}" must be ${e.expected}`);break;case"enum":"string"==typeof i&&e.values.includes(i)||r.push(`"${n}" must be one of ${e.values.join(" | ")}`);break;case"roles":r.push(...function(e){if(!t(e))return['"roles" must be an object of SceneRole records'];let r=[];for(let[t,n]of Object.entries(e)){let e=tr.get(t);if(!e){r.push(`unknown scene role "${t}"`);continue}if("fallback-only"===e.traits.styleConsumption){r.push(`scene role "${t}" is fallback-only; set roles.${e.style.fallbackRole} instead`);continue}let i=tl(n,`roles.${t}`,new Set(e.style.applicableProperties)).map(e=>e===`"roles.${t}" must be an object`?e:e.replace(`role style field "roles.${t}.`,`role style field "${t}.`).replace('" is not applicable',`" is not applicable to ${t} roles`));r.push(...i)}return r}(i));break;case"semanticSlots":r.push(...function(e){if(!t(e))return['"semanticSlots" must be an object of named role-style slots'];if(Object.keys(e).length>Z.maxItemsPerContainer)return[`"semanticSlots" must contain at most ${Z.maxItemsPerContainer} slots`];let r=[];for(let[t,n]of Object.entries(e)){if(!ts(t)){r.push(`invalid semantic slot name "${t}"`);continue}r.push(...tl(n,`semanticSlots.${t}`))}return r}(i));break;case"bindings":r.push(...function(e){if(!Array.isArray(e))return['"bindings" must be an array'];if(e.length>Z.maxItemsPerContainer)return[`"bindings" must contain at most ${Z.maxItemsPerContainer} entries`];let r=[];return e.forEach((e,n)=>{let i=`bindings[${n}]`;if(!t(e))return void r.push(`"${i}" must be an object`);for(let t of Object.keys(e))["channel","value","slot","role"].includes(t)||r.push(`unknown binding field "${i}.${t}"`);"string"==typeof e.channel&&e7.includes(e.channel)||r.push(`"${i}.channel" must be one of ${e7.join(" | ")}`),("string"!=typeof e.value||0===e.value.length||e.value.length>256||/[\r\n\0]/.test(e.value))&&r.push(`"${i}.value" must be a non-empty single-line string of at most 256 characters`),ts(e.slot)||r.push(`"${i}.slot" must be a valid semantic slot name`),void 0===e.role||ti.has(e.role)||r.push(`"${i}.role" must be a SceneRole with an executable category-binding consumer (${O.join(" | ")})`)}),r}(i));break;case"constraints":r.push(...function(e){if(!Array.isArray(e))return['"constraints" must be an array'];if(e.length>Z.maxItemsPerContainer)return[`"constraints" must contain at most ${Z.maxItemsPerContainer} entries`];let r=[];return e.forEach((e,n)=>{let i=`constraints[${n}]`;if(!t(e))return void r.push(`"${i}" must be an object`);if("string"!=typeof e.kind||!l.includes(e.kind))return void r.push(`"${i}.kind" must be one of ${l.join(" | ")}`);let o=e.kind,a=s(o),d=new Set(c(o));for(let t of Object.keys(e))d.has(t)||r.push(`unknown constraint field "${i}.${t}"`);for(let[t,n]of("warn"!==e.action&&"error"!==e.action&&r.push(`"${i}.action" must be one of warn | error`),Object.entries(a))){let a=e[t];if(void 0===a){n.required&&r.push(`"${i}.${t}" is required for ${o}`);continue}"role"!==n.kind||tr.has(a)?"number"!==n.kind||te(a,n)||r.push(`"${i}.${t}" must be between ${n.minimum} and ${n.maximum}`):r.push(`"${i}.${t}" must be a registered built-in SceneRole`)}}),r}(i));break;case"colors":if(!t(i)){r.push('"colors" must be an object of color tokens');break}for(let[e,t]of Object.entries(i))Object.hasOwn(e3,e)?void 0!==t&&"string"!=typeof t?r.push(`color token "${e}" must be a string`):void 0!==t&&void 0===y(t)&&r.push(`color token "${e}" must be a safe non-fetching CSS color`):r.push(`unknown color token "${e}"`)}}return ei(r,"Style validation")}function td(e=Object.keys(j)){let t=Object.fromEntries(Object.entries(j).map(([e,t])=>"number"===t.kind?[e,{type:"number",...void 0!==t.minimum?{minimum:t.minimum}:{},...void 0!==t.exclusiveMinimum?{exclusiveMinimum:t.exclusiveMinimum}:{},...void 0!==t.maximum?{maximum:t.maximum}:{}}]:"enum"===t.kind?[e,{type:"string",enum:[...t.values]}]:[e,{type:"string","x-agentic-mermaid-runtime-validator":"font"===t.kind?"safeCssFontFamily":"safeStylePaint"}]));return{type:"object",additionalProperties:!1,maxProperties:e.length,properties:Object.fromEntries(e.map(e=>[e,t[e]]))}}function tu(e){return`roleStyle-${e.role}`}var tf="^[A-Za-z][A-Za-z0-9._-]{0,63}$";function tm(){let e=Object.fromEntries(tn.map(e=>[tu(e),td(e.style.applicableProperties)]));return{type:"object",additionalProperties:!1,maxProperties:Object.keys(e9).length,properties:Object.fromEntries(Object.entries(e9).map(([e,t])=>[e,function(e){switch(e.kind){case"const":return{const:e.value};case"string":return{type:"string",...e.runtimeValidator?{"x-agentic-mermaid-runtime-validator":e.runtimeValidator}:{}};case"boolean":return{type:"boolean"};case"enum":return{type:"string",enum:[...e.values]};case"number":case"integer":return{type:e.kind,...void 0!==e.minimum?{minimum:e.minimum}:{},...void 0!==e.exclusiveMinimum?{exclusiveMinimum:e.exclusiveMinimum}:{},...void 0!==e.maximum?{maximum:e.maximum}:{}};case"roles":return{type:"object",additionalProperties:!1,properties:Object.fromEntries(tn.map(e=>[e.role,{$ref:`#/$defs/${tu(e)}`}]))};case"semanticSlots":return{type:"object",maxProperties:Z.maxItemsPerContainer,propertyNames:{pattern:tf,not:{enum:[...ta]}},additionalProperties:{$ref:"#/$defs/roleStyle-any"}};case"bindings":return{type:"array",maxItems:Z.maxItemsPerContainer,items:{type:"object",additionalProperties:!1,maxProperties:4,required:["channel","value","slot"],properties:{channel:{type:"string",enum:[...e7]},value:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\r\\n\\u0000]+$"},slot:{type:"string",pattern:tf,not:{enum:[...ta]}},role:{type:"string",enum:[...O]}}}};case"constraints":{let e={type:"string",enum:["warn","error"]},t={type:"string",enum:T.map(e=>e.role)},r=l.map(r=>{let n=Object.fromEntries(Object.entries(s(r)).map(([e,r])=>[e,"role"===r.kind?t:{type:"number",minimum:r.minimum,maximum:r.maximum}]));return{type:"object",additionalProperties:!1,required:[...d(r)],properties:{kind:{const:r},action:e,...n}}});return{type:"array",maxItems:Z.maxItemsPerContainer,items:{oneOf:r}}}case"colors":return{type:"object",additionalProperties:!1,maxProperties:Object.keys(e3).length,properties:Object.fromEntries(Object.entries(e3).map(([e,t])=>[e,{type:"string","x-agentic-mermaid-runtime-validator":"safeCssColor"}]))}}}(t)])),$defs:{...e,"roleStyle-any":td()}}}var tg=Object.freeze([{id:"palette:paper",inputName:"paper",displayLabel:"Paper",colors:{bg:"#F5F0E4",fg:"#221E16",accent:"#9A4A24"}},{id:"palette:dusk",inputName:"dusk",displayLabel:"Dusk",colors:{bg:"#2A2521",fg:"#E9DFCC",accent:"#CC8A57"}},{id:"palette:zinc-light",inputName:"zinc-light",displayLabel:"Zinc Light",colors:{bg:"#FFFFFF",fg:"#27272A"}},{id:"palette:zinc-dark",inputName:"zinc-dark",displayLabel:"Zinc Dark",colors:{bg:"#18181B",fg:"#FAFAFA"}},{id:"palette:tokyo-night",inputName:"tokyo-night",displayLabel:"Tokyo Night",colors:{bg:"#1a1b26",fg:"#a9b1d6",line:"#3d59a1",accent:"#7aa2f7",muted:"#565f89"}},{id:"palette:tokyo-night-storm",inputName:"tokyo-night-storm",displayLabel:"Tokyo Night Storm",colors:{bg:"#24283b",fg:"#a9b1d6",line:"#3d59a1",accent:"#7aa2f7",muted:"#565f89"}},{id:"palette:tokyo-night-light",inputName:"tokyo-night-light",displayLabel:"Tokyo Night Light",colors:{bg:"#d5d6db",fg:"#343b58",line:"#34548a",accent:"#34548a",muted:"#9699a3"}},{id:"palette:catppuccin-mocha",inputName:"catppuccin-mocha",displayLabel:"Catppuccin Mocha",colors:{bg:"#1e1e2e",fg:"#cdd6f4",line:"#585b70",accent:"#cba6f7",muted:"#6c7086"}},{id:"palette:catppuccin-latte",inputName:"catppuccin-latte",displayLabel:"Catppuccin Latte",colors:{bg:"#eff1f5",fg:"#4c4f69",line:"#9ca0b0",accent:"#8839ef",muted:"#9ca0b0"}},{id:"palette:nord",inputName:"nord",displayLabel:"Nord",colors:{bg:"#2e3440",fg:"#d8dee9",line:"#4c566a",accent:"#88c0d0",muted:"#616e88"}},{id:"palette:nord-light",inputName:"nord-light",displayLabel:"Nord Light",colors:{bg:"#eceff4",fg:"#2e3440",line:"#aab1c0",accent:"#5e81ac",muted:"#7b88a1"}},{id:"palette:dracula",inputName:"dracula",displayLabel:"Dracula",colors:{bg:"#282a36",fg:"#f8f8f2",line:"#6272a4",accent:"#bd93f9",muted:"#6272a4"}},{id:"palette:github-light",inputName:"github-light",displayLabel:"GitHub Light",colors:{bg:"#ffffff",fg:"#1f2328",line:"#d1d9e0",accent:"#0969da",muted:"#59636e"}},{id:"palette:github-dark",inputName:"github-dark",displayLabel:"GitHub Dark",colors:{bg:"#0d1117",fg:"#e6edf3",line:"#3d444d",accent:"#4493f8",muted:"#9198a1"}},{id:"palette:solarized-light",inputName:"solarized-light",displayLabel:"Solarized Light",colors:{bg:"#fdf6e3",fg:"#657b83",line:"#93a1a1",accent:"#268bd2",muted:"#93a1a1"}},{id:"palette:solarized-dark",inputName:"solarized-dark",displayLabel:"Solarized Dark",colors:{bg:"#002b36",fg:"#839496",line:"#586e75",accent:"#268bd2",muted:"#586e75"}},{id:"palette:one-dark",inputName:"one-dark",displayLabel:"One Dark",colors:{bg:"#282c34",fg:"#abb2bf",line:"#4b5263",accent:"#c678dd",muted:"#5c6370"}},{id:"palette:salmon",inputName:"salmon",displayLabel:"Salmon",colors:{bg:"#FFFBF5",fg:"#521000",line:"#C9A88A",accent:"#FF4801",muted:"#85532E",surface:"#FFFDFB",border:"#D4B89E"}},{id:"palette:salmon-dark",inputName:"salmon-dark",displayLabel:"Salmon Dark",colors:{bg:"#1F1008",fg:"#F5DCC8",line:"#6B4A2E",accent:"#FF6B35",muted:"#A07858",surface:"#2A1810",border:"#5A3A22"}},{id:"palette:tufte-dark",inputName:"tufte-dark",displayLabel:"Tufte Dark",colors:{bg:"#1C1C1A",fg:"#E8E4DC",line:"#666660",accent:"#C87070",muted:"#908880",surface:"#2A2926",border:"#444440"}}]),tp=0;function tb(e){tp++;try{return e()}finally{tp--}}var th=Object.freeze(["fontSize","fontWeight","letterSpacing","textTransform","textColor"]),ty=Object.freeze(["paddingX","paddingY","cornerRadius","lineWidth","fillColor","borderColor"]),tx=(Object.freeze({text:Object.freeze({sourceRole:"label",fields:th}),node:Object.freeze({sourceRole:"node",fields:Object.freeze([...th,...ty])}),edge:Object.freeze({sourceRole:"edge",fields:Object.freeze([...th,"lineWidth","bendRadius","strokeColor"])}),group:Object.freeze({sourceRole:"group",fields:Object.freeze([...th,...ty,"fontFamily","headerFillColor"])})}),"1.0.0"),tk=Object.freeze({core:S}),tv=Object.freeze({owner:"agentic-mermaid",source:"built-in",reference:"src/scene/style-registry.ts"}),tS=Object.freeze({owner:"host",source:"in-process"}),t_=new Map,tw=new Map,tC=class extends Error{constructor(e){super(e),this.name="StyleSpecError"}};function tj(e){if(e)return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.freeze({...t})])))}function tF(e){if(e)return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.freeze({...t})])))}function tO(e){return e?Object.freeze(e.map(e=>Object.freeze({...e}))):void 0}function tA(e){if(!e)return;let{displayLabel:t,...r}=e;return Object.freeze({...r,formatVersion:1,...r.colors?{colors:Object.freeze({...r.colors})}:{},...r.roles?{roles:tj(r.roles)}:{},...r.semanticSlots?{semanticSlots:tF(r.semanticSlots)}:{},...r.bindings?{bindings:tO(r.bindings)}:{},...r.constraints?{constraints:tO(r.constraints)}:{}})}function tT(e,t="look",r=e.name??""){if(!e.name)throw Error("registerBuiltInStyle requires a name");let n=_(t,e.name),i=tc(tA({...e,name:n}));if(i.length)throw Error(`Invalid built-in style "${n}": ${i.join("; ")}`);!function(e,t,r,n){let i=e.name,o=Object.freeze({...e,formatVersion:1,...e.colors?{colors:Object.freeze({...e.colors})}:{},...e.roles?{roles:tj(e.roles)}:{},...e.semanticSlots?{semanticSlots:tF(e.semanticSlots)}:{},...e.bindings?{bindings:tO(e.bindings)}:{},...e.constraints?{constraints:tO(e.constraints)}:{}});if(C(t_,{identity:w({id:i,kind:t,version:r.version??tx,compatibility:{...tk,...r.compatibility},provenance:r.provenance??tS}),value:o}),void 0!==n){let e=tw.get(n),t=t_.has(n)&&n!==i?n:void 0;if(void 0!==e||void 0!==t)throw t_.delete(i),Error(`Style input name "${n}" already selects "${e??t}"`);tw.set(n,i)}}({...e,name:n},t,{version:tx,compatibility:tk,provenance:tv},r)}function tL(e){return t_.has(e)?e:tw.get(e)}function tz(e){let t=tL(e);if(!t)return;let r=tA(t_.get(t)?.value);if(r)return Object.freeze({canonicalId:t,spec:r})}function t$(e){return"freehand"===e.stroke||"wash"===e.fill?"hybrid":"jittered"===e.stroke||"hachure"===e.fill||void 0!==e.backdrop&&"plain"!==e.backdrop||void 0!==e.roughness||void 0!==e.bowing||void 0!==e.passes||void 0!==e.hachureGap||void 0!==e.hachureAngle||void 0!==e.fillWeight?"rough":"default"}function tW(e,t){if(!e&&!t)return;let r=[],n=new Set;for(let i of[...e??[],...t??[]]){let e=JSON.stringify(i);n.has(e)||(n.add(e),r.push(i))}return r}function tE(e){if(void 0===e)return;let r=Array.isArray(e)?e:[e],n=[];for(let e of r)if("string"==typeof e){let t=tL(e);if("look:crisp"===t)continue;let r=t?t_.get(t)?.value:void 0;if(!r)throw new tC(`Unknown style "${e}". Known styles: ${Object.freeze(Array.from(t_.values(),({identity:e,value:t})=>{let r=Array.from(tw.entries()).find(([,t])=>t===e.id)?.[0]??e.id,n=e.id.slice(e.id.indexOf(":")+1),i=t.displayLabel??n.split("-").filter(Boolean).map(e=>"ops"===e?"OPS":e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return Object.freeze({identity:e,spec:tA(t),inputName:r,displayLabel:i,kind:e.kind,isDefault:"look:crisp"===e.id})})).map(e=>e.inputName).join(", ")}`);n.push(r)}else n.push(function(e){let r,n,i,o,a,l,s=(r=new WeakMap,n=new WeakSet,i=new Set(["__proto__","prototype","constructor"]),o=0,a=0,(l=(e,s)=>{if(s>Z.maxDepth)throw TypeError(`Style input exceeds maximum nesting depth ${Z.maxDepth}`);if(++o>Z.maxNodes)throw TypeError(`Style input exceeds the ${Z.maxNodes}-node limit`);if("string"==typeof e){if((a+=e.length)>Z.maxAggregateTextCharacters)throw TypeError(`Style input exceeds the ${Z.maxAggregateTextCharacters}-character text limit`);return e}if("object"!=typeof e||null===e)return e;if(n.has(e))throw TypeError("Style input must be acyclic");let c=r.get(e);if(void 0!==c)return c;if(Array.isArray(e)){if(e.length>Z.maxItemsPerContainer)throw TypeError(`Style array must contain at most ${Z.maxItemsPerContainer} items`);let t=[];r.set(e,t),n.add(e);for(let r=0;r<e.length;r++){if(!Object.prototype.hasOwnProperty.call(e,r))throw TypeError("Style arrays must not be sparse");t.push(l(e[r],s+1))}return n.delete(e),Object.freeze(t)}if(!t(e))return e;let d=Object.entries(e);if(d.length>Z.maxItemsPerContainer)throw TypeError(`Style object must contain at most ${Z.maxItemsPerContainer} properties`);let u=Object.create(null);for(let[t,o]of(r.set(e,u),n.add(e),d)){if(i.has(t))throw TypeError(`Style input uses forbidden key "${t}"`);if((a+=t.length)>Z.maxAggregateTextCharacters)throw TypeError(`Style input exceeds the ${Z.maxAggregateTextCharacters}-character text limit`);Object.defineProperty(u,t,{value:l(o,s+1),enumerable:!0,writable:!1,configurable:!1})}return n.delete(e),Object.freeze(u)})(e,0)),c=tc(s);if(c.length)throw new tC(`Invalid style spec: ${c.join("; ")}`);return s}(e));if(0===n.length)return;let i={formatVersion:1};for(let e of n)for(let[t,r]of Object.entries(e))if(void 0!==r)if("colors"===t){let t={...i.colors};for(let[r,n]of Object.entries(e.colors??{}))void 0!==n&&(t[r]=n);i.colors=t}else"roles"===t?i.roles=function(e,t){if(!e&&!t)return;let r={...e};for(let[e,n]of Object.entries(t??{}))void 0!==n&&(r[e]={...r[e],...n});return r}(i.roles,e.roles):"semanticSlots"===t?i.semanticSlots=function(e,t){if(!e&&!t)return;let r={...e};for(let[e,n]of Object.entries(t??{}))r[e]={...r[e],...n};return r}(i.semanticSlots,e.semanticSlots):"bindings"===t?i.bindings=tW(i.bindings,e.bindings):"constraints"===t?i.constraints=tW(i.constraints,e.constraints):i[t]=r;return i}function tB(e){return tb(()=>{let t=tE(e);return t&&tP(t),tA(t)})}function tP(e){for(let[t,r]of(e.bindings??[]).entries()){let n=e.semanticSlots?.[r.slot];if(!n)throw new tC(`Invalid style spec: binding ${t+1} references missing semantic slot "${r.slot}"`);let i=new Set(void 0===r.role?A:T.find(e=>e.role===r.role).style.applicableProperties);if(!Object.keys(n).some(e=>i.has(e)))throw new tC(void 0===r.role?`Invalid style spec: semantic slot "${r.slot}" has no field applicable to any executable category-binding role`:`Invalid style spec: semantic slot "${r.slot}" has no field applicable to role "${r.role}"`)}let t=["hachureAngle","hachureGap","fillWeight"].filter(t=>void 0!==e[t]&&"hachure"!==e.fill);if(t.length>0)throw new tC(`Invalid style spec: ${t.map(e=>`"${e}"`).join(", ")} require fill "hachure" in the final Style stack`);let r=["washOpacity","washEdge"].filter(t=>void 0!==e[t]&&"wash"!==e.fill);if(r.length>0)throw new tC(`Invalid style spec: ${r.map(e=>`"${e}"`).join(", ")} require fill "wash" in the final Style stack`);if(void 0!==e.fill&&"default"===t$(e))throw new tC('Invalid style spec: "fill" has no crisp/default backend projection; combine it with stroke "jittered"/"freehand" or another rough/hybrid backend field')}function tI(e){return tb(()=>{let t=tE(e);if(void 0===t)return{};tP(t);let r=tA(t),n=function(e){let t=e.strokeWidth,r=e.roles?Object.fromEntries(Object.entries(e.roles).map(([e,t])=>[e,t?{...t}:void 0])):void 0,n={...void 0!==t&&t>0&&"default"===t$(e)?{lineWidth:t}:{},...r?.node},i={...void 0!==t&&t>0&&"default"===t$(e)?{lineWidth:t}:{},...r?.edge},o={...void 0!==t&&t>0&&"default"===t$(e)?{lineWidth:t}:{},...r?.group};if(!(!r&&!e.semanticSlots&&!e.bindings&&!e.constraints&&0===Object.keys(n).length&&0===Object.keys(i).length&&0===Object.keys(o).length))return{...r?{roles:tj(r)}:{},...e.semanticSlots?{semanticSlots:tF(e.semanticSlots)}:{},...e.bindings?{bindings:tO(e.bindings)}:{},...e.constraints?{constraints:tO(e.constraints)}:{},...r?.label?{text:{...r.label}}:{},...Object.keys(n).length?{node:n}:{},...Object.keys(i).length?{edge:i}:{},...Object.keys(o).length?{group:o}:{}}}(t);return{...r?{style:r}:{},...n?{face:n}:{}}})}function tM(e){return"default"!==t$(e)||void 0!==e.colors||void 0!==e.font||void 0!==e.strokeWidth||void 0!==e.roles||void 0!==e.semanticSlots||void 0!==e.bindings||void 0!==e.constraints}for(let e of(tT({name:"crisp",displayLabel:"Crisp",blurb:"The default renderer with precise SVG geometry.",stroke:"crisp"},"look"),tg)){let{inputName:t,colors:r}=e;if(_("palette",t)!==e.id)throw Error(`Built-in palette identity mismatch: ${e.id}`);tT({name:t,displayLabel:e.displayLabel,blurb:`Palette: ${t}.`,colors:{bg:r.bg,fg:r.fg,line:r.line,accent:r.accent,muted:r.muted,surface:r.surface,border:r.border}},"palette",t)}tT({name:"hand-drawn",displayLabel:"Hand-drawn",blurb:"Black ink on ruled paper — wobbly double strokes, unfilled boxes.",intent:"draft",colors:{bg:"#f7f5ef",fg:"#1a1a1e",line:"#26262b",accent:"#26262b",border:"#26262b"},font:"Caveat",stroke:"jittered",roughness:1,bowing:1,passes:2,strokeWidth:1.8,fill:"none",backdrop:"paper-ruled",mono:!0}),tT({name:"excalidraw",displayLabel:"Excalidraw",blurb:"Virtual whiteboard style — rough strokes, pastel hachure fills.",intent:"draft",colors:{bg:"#ffffff",fg:"#1e1e1e",line:"#1e1e1e",accent:"#4263eb",surface:"#f1f3f5"},font:"Caveat",stroke:"jittered",roughness:1.1,bowing:1.2,passes:2,strokeWidth:1.6,fill:"hachure",hachureAngle:-41,hachureGap:5.5,fillWeight:.9}),tT({name:"pen-and-ink",displayLabel:"Pen & ink",blurb:"Fine single-pass linework on warm cream — no interior hatching.",intent:"premium",colors:{bg:"#faf6ec",fg:"#241f1a",line:"#2b241d",accent:"#2b241d",border:"#2b241d"},font:"EB Garamond",stroke:"jittered",roughness:.5,bowing:.6,passes:1,strokeWidth:1.5,fill:"none",mono:!0}),tT({name:"freehand",displayLabel:"Freehand",blurb:"Pressure-sensitive marker ribbons — variable-width filled strokes.",intent:"draft",colors:{bg:"#fbfaf7",fg:"#16161a",line:"#1d1d22",accent:"#1d1d22",border:"#1d1d22"},font:"Architects Daughter",stroke:"freehand",roughness:.9,passes:1,strokeWidth:1.6,fill:"none",mono:!0}),tT({name:"watercolor",displayLabel:"Watercolor",blurb:"Rough outlines over translucent glazes with pigment-pooled edges.",intent:"premium",colors:{bg:"#fdfbf6",fg:"#31302c",line:"#4d4a44",accent:"#7a6a52",surface:"#ead9b9",border:"#5a564e"},font:"Caveat",stroke:"jittered",roughness:.9,bowing:.8,passes:1,strokeWidth:1.5,fill:"wash",washOpacity:.3,washEdge:.34}),tT({name:"blueprint",displayLabel:"Blueprint",blurb:"Cyanotype: white linework on Prussian blue with a drafting grid.",intent:"premium",colors:{bg:"#123a63",fg:"#eaf2fb",line:"#dbe9f7",accent:"#ffffff",muted:"#b8cfe6",surface:"#1c4a78",border:"#dbe9f7"},font:"Share Tech Mono",stroke:"jittered",roughness:.4,bowing:.4,passes:1,strokeWidth:1.4,fill:"none",backdrop:"grid",mono:!0}),tT({name:"tufte",displayLabel:"Tufte",blurb:"Maximal data-ink: crisp hairlines, warm paper, one red accent.",intent:"premium",colors:{bg:"#fffff8",fg:"#111111",line:"#4a4a45",accent:"#a00000",muted:"#6b6b64",border:"#8a8a80"},font:"EB Garamond",roles:{node:{lineWidth:.8,cornerRadius:0},edge:{lineWidth:.8},group:{lineWidth:.8}},mono:!0},"look","look:tufte"),tT({name:"accessible-high-contrast",displayLabel:"Accessible Contrast",blurb:"Accessibility-first: large labels, heavy strokes, white ground, colorblind-safe blue accent.",intent:"premium",colors:{bg:"#ffffff",fg:"#050505",line:"#111111",accent:"#005fcc",muted:"#333333",surface:"#ffffff",border:"#050505"},roles:{node:{fontSize:17,fontWeight:700,textColor:"var(--fg)",paddingX:28,paddingY:16,cornerRadius:8,lineWidth:2.4,borderColor:"var(--fg)"},edge:{fontSize:14,fontWeight:700,textColor:"var(--fg)",lineWidth:2.6,bendRadius:10,strokeColor:"var(--fg)"},group:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:22,cornerRadius:8,lineWidth:2.2,borderColor:"var(--fg)"}}}),tT({name:"patent-drawing",displayLabel:"Patent Hatching",blurb:"Print-safe patent figure: uniform ink, strong outlines, tone via oblique hatching.",intent:"premium",colors:{bg:"#ffffff",fg:"#111111",line:"#111111",accent:"#111111",muted:"#444444",surface:"#ffffff",border:"#111111"},font:"EB Garamond",stroke:"jittered",roughness:.3,bowing:.2,passes:1,strokeWidth:1.35,fill:"hachure",hachureAngle:-50,hachureGap:7,fillWeight:.65,roles:{node:{fontSize:14,fontWeight:600,textColor:"var(--fg)",paddingX:24,paddingY:13,lineWidth:1.35,cornerRadius:0,borderColor:"var(--fg)"},edge:{fontSize:12,textColor:"var(--fg)",lineWidth:1.45,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:12,fontWeight:700,textColor:"var(--fg)",paddingX:22,paddingY:18,lineWidth:1.35,cornerRadius:0,borderColor:"var(--fg)"}},mono:!0}),tT({name:"status-dashboard",displayLabel:"Dark Ops Dashboard",blurb:"Operational dashboard: dark surface, rounded modules, bright status-friendly accent.",intent:"premium",colors:{bg:"#08111f",fg:"#e6f4ff",line:"#5a7c99",accent:"#2dd4bf",muted:"#8aa6bf",surface:"#102033",border:"#2e4c63"},roles:{node:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:13,cornerRadius:10,lineWidth:1.4,borderColor:"var(--fg)"},edge:{fontSize:12,fontWeight:600,textColor:"var(--fg)",lineWidth:2,bendRadius:14,strokeColor:"var(--fg)"},group:{fontSize:13,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.06,paddingX:22,paddingY:20,cornerRadius:10,lineWidth:1.3,borderColor:"var(--fg)"}}}),tT({name:"ops-schematic",displayLabel:"Compact Trace Map",blurb:"Dense operational schematic: compact mono labels, sturdy traces, theme-friendly geometry.",intent:"lofi",colors:{bg:"#f8faf7",fg:"#17211c",line:"#24523b",accent:"#0f766e",muted:"#4f665a",surface:"#f0f5ef",border:"#24523b"},font:"Share Tech Mono",stroke:"jittered",roughness:.18,bowing:.2,passes:1,strokeWidth:1.6,fill:"none",roles:{node:{fontSize:12,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",paddingX:16,paddingY:8,cornerRadius:2,lineWidth:1.6,borderColor:"var(--fg)"},edge:{fontSize:10,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",lineWidth:1.8,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:11,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.05,paddingX:16,paddingY:16,cornerRadius:2,lineWidth:1.5,borderColor:"var(--fg)"}}}),tT({name:"chalkboard",displayLabel:"Chalkboard",blurb:"Classroom chalkboard: dusty off-white strokes on green slate.",intent:"draft",colors:{bg:"#17362f",fg:"#f5f1df",line:"#ece6cf",accent:"#ffe08a",muted:"#c7d2c4",surface:"#17362f",border:"#f3ecd5"},font:"Caveat",stroke:"jittered",roughness:1.25,bowing:1,passes:2,strokeWidth:1.9,fill:"none",roles:{node:{fontSize:16,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:12,borderColor:"var(--fg)"},edge:{fontSize:13,textColor:"var(--fg)",lineWidth:1.8,strokeColor:"var(--fg)"},group:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:20,paddingY:20,lineWidth:1.7,borderColor:"var(--fg)"}},mono:!0}),tT({name:"risograph",displayLabel:"Riso Print",blurb:"Two-ink poster print: warm stock, offset blue linework, coral accent, coarse hachure.",intent:"premium",colors:{bg:"#fff5df",fg:"#2b2725",line:"#1f3d5a",accent:"#ff5a5f",muted:"#876a52",surface:"#ffd166",border:"#1f3d5a"},font:"EB Garamond",stroke:"jittered",roughness:.7,bowing:.55,passes:1,strokeWidth:1.5,fill:"hachure",hachureAngle:18,hachureGap:6.5,fillWeight:.75,roles:{node:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:13,cornerRadius:3,borderColor:"var(--fg)"},edge:{fontSize:12,textColor:"var(--fg)",lineWidth:1.5,strokeColor:"var(--fg)"},group:{fontSize:13,fontWeight:700,textColor:"var(--fg)",paddingX:22,paddingY:18,cornerRadius:3,borderColor:"var(--fg)"}}}),tT({name:"architectural-plan",displayLabel:"Plan Drafting",blurb:"Architectural plan: square technical linework, uppercase mono labels, room-like frames.",intent:"premium",colors:{bg:"#fbf7ea",fg:"#202a2f",line:"#38535e",accent:"#1f6f8b",muted:"#60727a",surface:"#fffaf0",border:"#38535e"},font:"Share Tech Mono",stroke:"jittered",roughness:.18,bowing:.25,passes:1,strokeWidth:1.45,fill:"none",roles:{node:{fontSize:12,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",paddingX:20,paddingY:10,cornerRadius:0,lineWidth:1.45,borderColor:"var(--fg)"},edge:{fontSize:10,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",lineWidth:1.55,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:11,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.06,paddingX:20,paddingY:20,cornerRadius:0,lineWidth:1.45,borderColor:"var(--fg)"}}}),tT({name:"publication-figure",displayLabel:"Report Figure",blurb:"Polished publication figure: serif labels, confident rules, rounded boxes, one quiet accent.",intent:"premium",colors:{bg:"#fffdf8",fg:"#171512",line:"#24211d",accent:"#1d4ed8",muted:"#5f5a52",surface:"#faf5ea",border:"#24211d"},font:"EB Garamond",strokeWidth:1.45,roles:{node:{fontSize:15,fontWeight:700,textColor:"var(--fg)",paddingX:26,paddingY:14,cornerRadius:7,lineWidth:1.45,borderColor:"var(--fg)"},edge:{fontSize:12,fontWeight:600,textColor:"var(--fg)",lineWidth:1.45,bendRadius:8,strokeColor:"var(--fg)"},group:{fontSize:12,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.08,paddingX:24,paddingY:22,cornerRadius:7,lineWidth:1.35,borderColor:"var(--fg)"}}});export{eo as a,el as b,es as c,ec as d,eu as e,Y as f,V as g,G as h,H as i,U as j,Z as k,K as l,ee as m,er as n,ei as o,ef as p,em as q,eg as r,ek as s,eE as t,eB as u,eI as v,eq as w,eR as x,eJ as y,eX as z,eY as A,tm as B,tz as C,t$ as D,tB as E,tI as F,tM as G};
17
+ `),familyLines:_,firstLine:s.lines[0]?.toLowerCase()??"",config:eX(s.frontmatter),frontmatter:s.frontmatter,...void 0!==y.wrapperSource?{wrapperSource:y.wrapperSource}:{},initDirectives:y.initDirectives,comments:y.comments,accessibility:y.accessibility}}(e,t,r,d,s)}function eN(e,t){if(!e.includes("%% agentic-mermaid "))return[];let r=z(e)?.source.length??0,o=e.slice(r);return n(o,U(D(I(e)),i(o).split(/\r\n?|\n/),t)).map(e=>({...e,start:r+e.start,end:r+e.end}))}function eD(e,t,r){return function(e,t={},r="authored",n){let i=eq(e,{},r,n);if(0===Object.keys(t).length)return i;let o=eR(i.frontmatter,eV(t));return{...i,frontmatter:o,config:eX(o)}}(e,t,"render",r)}function eR(e,t){let r=e2(e);for(let[e,n]of Object.entries(t)){if(void 0===n)continue;let t=r[e];if(e6(t)&&e6(n)){r[e]=eR(t,n);continue}r[e]=e4(n)}return r}function eJ(e,t){let r=e;for(let e of t){if(!e6(r))return;r=r[e]}return e6(r)?r:void 0}function eY(e,t){let r=e;for(let e of t){if(!e6(r))return;r=r[e]}return void 0===r||Array.isArray(r)||"object"==typeof r&&null!==r?void 0:r}function eG(e,t){let r=e;for(let e of t){if(!e6(r))return;r=r[e]}return Array.isArray(r)?r:void 0}function eV(e){return er(e,"Mermaid runtime configuration"),eZ(e0(e)??{})}function eX(e){let t,r,n,i,o=e2(e);return e6(o.themeVariables)&&(o.themeVariables=e2(o.themeVariables)),e6(o.timeline)&&("boolean"!=typeof(t=e2(o.timeline)).disableMulticolor&&delete t.disableMulticolor,(r=eU(t.sectionFills)).length>0?t.sectionFills=r:delete t.sectionFills,n=eU(t.sectionColours),i=eU(t.sectionColors),n.length>0?t.sectionColours=n:i.length>0?t.sectionColours=i:delete t.sectionColours,delete t.sectionColors,o.timeline=t),e6(o.journey)&&(o.journey=function(e){let t=e2(e);for(let e of["diagramMarginX","diagramMarginY","leftMargin","maxLabelWidth","width","height","boxMargin","boxTextMargin","noteMargin","messageMargin","bottomMarginAdj","taskMargin","activationWidth"]){let r=t[e];("number"!=typeof r||!Number.isFinite(r)||r<0)&&delete t[e]}"boolean"!=typeof t.useMaxWidth&&delete t.useMaxWidth,"boolean"!=typeof t.rightAngles&&delete t.rightAngles,"left"!==t.messageAlign&&"center"!==t.messageAlign&&"right"!==t.messageAlign&&delete t.messageAlign;let r=eH(t.taskFontSize);for(let e of(void 0!==r?t.taskFontSize=r:delete t.taskFontSize,["taskFontFamily","textPlacement","titleColor","titleFontFamily"]))("string"!=typeof t[e]||0===t[e].trim().length)&&delete t[e];let n=eH(t.titleFontSize);for(let e of(void 0!==n?t.titleFontSize=n:delete t.titleFontSize,["actorColours","sectionFills","sectionColours"])){let r=eU(t[e]);r.length>0?t[e]=r:delete t[e]}return t}(o.journey)),o}function eH(e){return"number"==typeof e&&Number.isFinite(e)&&e>0?e:"string"==typeof e&&e.trim().length>0?e.trim():void 0}function eU(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e):[]}function eZ(e){er(e,"Mermaid configuration");let t=e2(e),r=e6(t.config)?t.config:void 0;return delete t.config,r?eR(r,t):t}var eK=class extends Error{};function eQ(e){return void 0===e?{wrap:!0}:""===e.trim()?{}:function(e){en(e,"Mermaid init directive",{trackFlowDepth:!0});try{let t=a(e);return er(t,"Mermaid init directive"),e0(t)}catch(n){let t;if(n instanceof et||n instanceof v)throw n;let r=e6(t=function e(t){let r=t.trim();if(0!==r.length)return r.startsWith("{")&&r.endsWith("}")?function(t){let r={};for(let n of e5(t)){let t=function(e,t){let r=null,n=0,i=0;for(let t=0;t<e.length;t++){let o=e[t];if(r){o===r&&"\\"!==e[t-1]&&(r=null);continue}if('"'===o||"'"===o){r=o;continue}if("{"===o){n++;continue}if("}"===o){n--;continue}if("["===o){i++;continue}if("]"===o){i--;continue}if(":"===o&&0===n&&0===i)return t}return -1}(n,0);if(-1===t)return;let i=n.slice(0,t).trim(),o=n.slice(t+1).trim(),a=function(e){let t=e.trim();if(t)return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?e8(t):t}(i);if(!a)return;let l=e(o);if(void 0===l)return;r[a]=l}return r}(r.slice(1,-1)):r.startsWith("[")&&r.endsWith("]")?function(t){let r=[];for(let n of e5(t)){let t=e(n);if(void 0===t)return;r.push(t)}return r}(r.slice(1,-1)):r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'")?e8(r):"true"===r||"false"!==r&&("null"===r?null:/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/.test(r)?Number(r):r)}(e.trim()))?t:void 0;return void 0!==r&&er(r,"Mermaid init directive"),r}}(e.trim())}function e0(e){if(!(e&&"object"==typeof e&&!Array.isArray(e)))return;let t={};for(let[r,n]of Object.entries(e)){let e=e1(n);void 0!==e&&(t[r]=e)}return t}function e1(e){if(null===e)return null;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e;if(Array.isArray(e)){let t=[];for(let r of e){let e=e1(r);if(void 0===e)return;t.push(e)}return t}return e0(e)}function e2(e){let t={};for(let[r,n]of Object.entries(e))t[r]=e4(n);return t}function e4(e){return null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?e:Array.isArray(e)?e.map(e=>e4(e)):e2(e)}function e6(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function e5(e){let t=[],r="",n=null,i=0,o=0;for(let a=0;a<e.length;a++){let l=e[a];if(n){r+=l,l===n&&"\\"!==e[a-1]&&(n=null);continue}if('"'===l||"'"===l){n=l,r+=l;continue}if("{"===l){i++,r+=l;continue}if("}"===l){i--,r+=l;continue}if("["===l){o++,r+=l;continue}if("]"===l){o--,r+=l;continue}if(","===l&&0===i&&0===o){let e=r.trim();e&&t.push(e),r="";continue}r+=l}let a=r.trim();return a&&t.push(a),t}function e8(e){try{return e.startsWith("'")?e.slice(1,-1).replace(/\\\\/g,"\\").replace(/\\'/g,"'"):JSON.parse(e)}catch{return e.slice(1,-1)}}var e3=r({bg:{},fg:{},line:{},accent:{},muted:{},surface:{},border:{}}),e7=Object.freeze(["category"]),e9=r({formatVersion:{kind:"const",value:1},$schema:{kind:"string"},name:{kind:"string"},blurb:{kind:"string"},colors:{kind:"colors"},font:{kind:"string",runtimeValidator:"safeCssFontFamily"},roles:{kind:"roles"},semanticSlots:{kind:"semanticSlots"},bindings:{kind:"bindings"},constraints:{kind:"constraints"},stroke:{kind:"enum",values:["crisp","jittered","freehand"]},roughness:{kind:"number",minimum:0,maximum:10,expected:"between 0 and 10"},bowing:{kind:"number",minimum:0,maximum:10,expected:"between 0 and 10"},passes:{kind:"integer",minimum:1,maximum:8,expected:"an integer from 1 through 8"},strokeWidth:{kind:"number",exclusiveMinimum:0,maximum:20,expected:"greater than 0 and at most 20"},fill:{kind:"enum",values:["none","hachure","solid","wash"]},hachureAngle:{kind:"number",minimum:-360,maximum:360,expected:"between -360 and 360"},hachureGap:{kind:"number",exclusiveMinimum:0,maximum:100,expected:"greater than 0 and at most 100"},fillWeight:{kind:"number",exclusiveMinimum:0,maximum:20,expected:"greater than 0 and at most 20"},washOpacity:{kind:"number",minimum:0,maximum:1,expected:"between 0 and 1"},washEdge:{kind:"number",minimum:0,maximum:1,expected:"between 0 and 1"},backdrop:{kind:"enum",values:["plain","paper-ruled","grid"]},intent:{kind:"enum",values:["premium","draft","lofi"]},mono:{kind:"boolean"}});function te(e,t){return!("number"!=typeof e||!Number.isFinite(e)||"integer"===t.kind&&!Number.isInteger(e)||void 0!==t.minimum&&e<t.minimum||void 0!==t.exclusiveMinimum&&e<=t.exclusiveMinimum||void 0!==t.maximum&&e>t.maximum)}var tt=new Set(Object.freeze(["--bg","--fg","--_text","--_text-sec","--_text-muted","--_text-faint","--_line","--_arrow","--_node-fill","--_node-stroke","--_group-fill","--_group-hdr","--_inner-stroke","--_key-badge"])),tr=new Map(T.map(e=>[e.role,e])),tn=F.map(e=>tr.get(e)),ti=new Set(O),to=/^[A-Za-z][A-Za-z0-9._-]{0,63}$/,ta=new Set(["__proto__","constructor","prototype"]);function tl(e,r,n){if(!t(e))return[`"${r}" must be an object`];let i=[];for(let[t,o]of Object.entries(e)){if(!Object.hasOwn(j,t)){i.push(`unknown role style field "${r.slice(r.indexOf(".")+1)}.${t}"`);continue}if(n&&!n.has(t)){i.push(`role style field "${r}.${t}" is not applicable`);continue}let e=j[t],a=`${r}.${t}`;void 0!==o&&("number"!==e.kind||te(o,e)?"font"===e.kind&&("string"!=typeof o||void 0===k(o))?i.push(`"${a}" must be a safe non-fetching CSS font family or stack`):"color"!==e.kind||"string"==typeof o&&void 0!==x(o)&&[...o.matchAll(/var\(\s*(--[a-z0-9_-]+)/gi)].map(e=>e[1]).every(e=>tt.has(e))?"enum"!==e.kind||"string"==typeof o&&e.values.includes(o)||i.push(`"${a}" must be one of ${e.values.join(" | ")}`):i.push(`"${a}" must be a safe non-fetching CSS paint`):i.push(`"${a}" must be ${e.expected}`))}return i}function ts(e){return"string"==typeof e&&to.test(e)&&!ta.has(e)}function tc(e){if(!t(e))return["style spec must be a plain object"];if(Object.keys(e).length>Z.maxItemsPerContainer)return[`style spec must contain at most ${Z.maxItemsPerContainer} fields`];let r=[];for(let[n,i]of Object.entries(e)){if(!Object.hasOwn(e9,n)){r.push(`unknown field "${n}"`);continue}let e=e9[n];if(void 0!==i)switch(e.kind){case"const":i!==e.value&&r.push(`"${n}" must be ${e.value}`);break;case"string":"string"!=typeof i?r.push(`"${n}" must be a string`):"safeCssFontFamily"===e.runtimeValidator&&void 0===k(i)&&r.push(`"${n}" must be a safe non-fetching CSS font family or stack`);break;case"boolean":"boolean"!=typeof i&&r.push(`"${n}" must be a boolean`);break;case"number":case"integer":te(i,e)||r.push(`"${n}" must be ${e.expected}`);break;case"enum":"string"==typeof i&&e.values.includes(i)||r.push(`"${n}" must be one of ${e.values.join(" | ")}`);break;case"roles":r.push(...function(e){if(!t(e))return['"roles" must be an object of SceneRole records'];let r=[];for(let[t,n]of Object.entries(e)){let e=tr.get(t);if(!e){r.push(`unknown scene role "${t}"`);continue}if("fallback-only"===e.traits.styleConsumption){r.push(`scene role "${t}" is fallback-only; set roles.${e.style.fallbackRole} instead`);continue}let i=tl(n,`roles.${t}`,new Set(e.style.applicableProperties)).map(e=>e===`"roles.${t}" must be an object`?e:e.replace(`role style field "roles.${t}.`,`role style field "${t}.`).replace('" is not applicable',`" is not applicable to ${t} roles`));r.push(...i)}return r}(i));break;case"semanticSlots":r.push(...function(e){if(!t(e))return['"semanticSlots" must be an object of named role-style slots'];if(Object.keys(e).length>Z.maxItemsPerContainer)return[`"semanticSlots" must contain at most ${Z.maxItemsPerContainer} slots`];let r=[];for(let[t,n]of Object.entries(e)){if(!ts(t)){r.push(`invalid semantic slot name "${t}"`);continue}r.push(...tl(n,`semanticSlots.${t}`))}return r}(i));break;case"bindings":r.push(...function(e){if(!Array.isArray(e))return['"bindings" must be an array'];if(e.length>Z.maxItemsPerContainer)return[`"bindings" must contain at most ${Z.maxItemsPerContainer} entries`];let r=[];return e.forEach((e,n)=>{let i=`bindings[${n}]`;if(!t(e))return void r.push(`"${i}" must be an object`);for(let t of Object.keys(e))["channel","value","slot","role"].includes(t)||r.push(`unknown binding field "${i}.${t}"`);"string"==typeof e.channel&&e7.includes(e.channel)||r.push(`"${i}.channel" must be one of ${e7.join(" | ")}`),("string"!=typeof e.value||0===e.value.length||e.value.length>256||/[\r\n\0]/.test(e.value))&&r.push(`"${i}.value" must be a non-empty single-line string of at most 256 characters`),ts(e.slot)||r.push(`"${i}.slot" must be a valid semantic slot name`),void 0===e.role||ti.has(e.role)||r.push(`"${i}.role" must be a SceneRole with an executable category-binding consumer (${O.join(" | ")})`)}),r}(i));break;case"constraints":r.push(...function(e){if(!Array.isArray(e))return['"constraints" must be an array'];if(e.length>Z.maxItemsPerContainer)return[`"constraints" must contain at most ${Z.maxItemsPerContainer} entries`];let r=[];return e.forEach((e,n)=>{let i=`constraints[${n}]`;if(!t(e))return void r.push(`"${i}" must be an object`);if("string"!=typeof e.kind||!l.includes(e.kind))return void r.push(`"${i}.kind" must be one of ${l.join(" | ")}`);let o=e.kind,a=s(o),d=new Set(c(o));for(let t of Object.keys(e))d.has(t)||r.push(`unknown constraint field "${i}.${t}"`);for(let[t,n]of("warn"!==e.action&&"error"!==e.action&&r.push(`"${i}.action" must be one of warn | error`),Object.entries(a))){let a=e[t];if(void 0===a){n.required&&r.push(`"${i}.${t}" is required for ${o}`);continue}"role"!==n.kind||tr.has(a)?"number"!==n.kind||te(a,n)||r.push(`"${i}.${t}" must be between ${n.minimum} and ${n.maximum}`):r.push(`"${i}.${t}" must be a registered built-in SceneRole`)}}),r}(i));break;case"colors":if(!t(i)){r.push('"colors" must be an object of color tokens');break}for(let[e,t]of Object.entries(i))Object.hasOwn(e3,e)?void 0!==t&&"string"!=typeof t?r.push(`color token "${e}" must be a string`):void 0!==t&&void 0===y(t)&&r.push(`color token "${e}" must be a safe non-fetching CSS color`):r.push(`unknown color token "${e}"`)}}return ei(r,"Style validation")}function td(e=Object.keys(j)){let t=Object.fromEntries(Object.entries(j).map(([e,t])=>"number"===t.kind?[e,{type:"number",...void 0!==t.minimum?{minimum:t.minimum}:{},...void 0!==t.exclusiveMinimum?{exclusiveMinimum:t.exclusiveMinimum}:{},...void 0!==t.maximum?{maximum:t.maximum}:{}}]:"enum"===t.kind?[e,{type:"string",enum:[...t.values]}]:[e,{type:"string","x-agentic-mermaid-runtime-validator":"font"===t.kind?"safeCssFontFamily":"safeStylePaint"}]));return{type:"object",additionalProperties:!1,maxProperties:e.length,properties:Object.fromEntries(e.map(e=>[e,t[e]]))}}function tu(e){return`roleStyle-${e.role}`}var tf="^[A-Za-z][A-Za-z0-9._-]{0,63}$";function tm(){let e=Object.fromEntries(tn.map(e=>[tu(e),td(e.style.applicableProperties)]));return{type:"object",additionalProperties:!1,maxProperties:Object.keys(e9).length,properties:Object.fromEntries(Object.entries(e9).map(([e,t])=>[e,function(e){switch(e.kind){case"const":return{const:e.value};case"string":return{type:"string",...e.runtimeValidator?{"x-agentic-mermaid-runtime-validator":e.runtimeValidator}:{}};case"boolean":return{type:"boolean"};case"enum":return{type:"string",enum:[...e.values]};case"number":case"integer":return{type:e.kind,...void 0!==e.minimum?{minimum:e.minimum}:{},...void 0!==e.exclusiveMinimum?{exclusiveMinimum:e.exclusiveMinimum}:{},...void 0!==e.maximum?{maximum:e.maximum}:{}};case"roles":return{type:"object",additionalProperties:!1,properties:Object.fromEntries(tn.map(e=>[e.role,{$ref:`#/$defs/${tu(e)}`}]))};case"semanticSlots":return{type:"object",maxProperties:Z.maxItemsPerContainer,propertyNames:{pattern:tf,not:{enum:[...ta]}},additionalProperties:{$ref:"#/$defs/roleStyle-any"}};case"bindings":return{type:"array",maxItems:Z.maxItemsPerContainer,items:{type:"object",additionalProperties:!1,maxProperties:4,required:["channel","value","slot"],properties:{channel:{type:"string",enum:[...e7]},value:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\r\\n\\u0000]+$"},slot:{type:"string",pattern:tf,not:{enum:[...ta]}},role:{type:"string",enum:[...O]}}}};case"constraints":{let e={type:"string",enum:["warn","error"]},t={type:"string",enum:T.map(e=>e.role)},r=l.map(r=>{let n=Object.fromEntries(Object.entries(s(r)).map(([e,r])=>[e,"role"===r.kind?t:{type:"number",minimum:r.minimum,maximum:r.maximum}]));return{type:"object",additionalProperties:!1,required:[...d(r)],properties:{kind:{const:r},action:e,...n}}});return{type:"array",maxItems:Z.maxItemsPerContainer,items:{oneOf:r}}}case"colors":return{type:"object",additionalProperties:!1,maxProperties:Object.keys(e3).length,properties:Object.fromEntries(Object.entries(e3).map(([e,t])=>[e,{type:"string","x-agentic-mermaid-runtime-validator":"safeCssColor"}]))}}}(t)])),$defs:{...e,"roleStyle-any":td()}}}var tg=Object.freeze([{id:"palette:paper",inputName:"paper",displayLabel:"Paper",colors:{bg:"#F5F0E4",fg:"#221E16",accent:"#9A4A24"}},{id:"palette:dusk",inputName:"dusk",displayLabel:"Dusk",colors:{bg:"#2A2521",fg:"#E9DFCC",accent:"#CC8A57"}},{id:"palette:zinc-light",inputName:"zinc-light",displayLabel:"Zinc Light",colors:{bg:"#FFFFFF",fg:"#27272A"}},{id:"palette:zinc-dark",inputName:"zinc-dark",displayLabel:"Zinc Dark",colors:{bg:"#18181B",fg:"#FAFAFA"}},{id:"palette:tokyo-night",inputName:"tokyo-night",displayLabel:"Tokyo Night",colors:{bg:"#1a1b26",fg:"#a9b1d6",line:"#3d59a1",accent:"#7aa2f7",muted:"#565f89"}},{id:"palette:tokyo-night-storm",inputName:"tokyo-night-storm",displayLabel:"Tokyo Night Storm",colors:{bg:"#24283b",fg:"#a9b1d6",line:"#3d59a1",accent:"#7aa2f7",muted:"#565f89"}},{id:"palette:tokyo-night-light",inputName:"tokyo-night-light",displayLabel:"Tokyo Night Light",colors:{bg:"#d5d6db",fg:"#343b58",line:"#34548a",accent:"#34548a",muted:"#9699a3"}},{id:"palette:catppuccin-mocha",inputName:"catppuccin-mocha",displayLabel:"Catppuccin Mocha",colors:{bg:"#1e1e2e",fg:"#cdd6f4",line:"#585b70",accent:"#cba6f7",muted:"#6c7086"}},{id:"palette:catppuccin-latte",inputName:"catppuccin-latte",displayLabel:"Catppuccin Latte",colors:{bg:"#eff1f5",fg:"#4c4f69",line:"#9ca0b0",accent:"#8839ef",muted:"#9ca0b0"}},{id:"palette:nord",inputName:"nord",displayLabel:"Nord",colors:{bg:"#2e3440",fg:"#d8dee9",line:"#4c566a",accent:"#88c0d0",muted:"#616e88"}},{id:"palette:nord-light",inputName:"nord-light",displayLabel:"Nord Light",colors:{bg:"#eceff4",fg:"#2e3440",line:"#aab1c0",accent:"#5e81ac",muted:"#7b88a1"}},{id:"palette:dracula",inputName:"dracula",displayLabel:"Dracula",colors:{bg:"#282a36",fg:"#f8f8f2",line:"#6272a4",accent:"#bd93f9",muted:"#6272a4"}},{id:"palette:github-light",inputName:"github-light",displayLabel:"GitHub Light",colors:{bg:"#ffffff",fg:"#1f2328",line:"#d1d9e0",accent:"#0969da",muted:"#59636e"}},{id:"palette:github-dark",inputName:"github-dark",displayLabel:"GitHub Dark",colors:{bg:"#0d1117",fg:"#e6edf3",line:"#3d444d",accent:"#4493f8",muted:"#9198a1"}},{id:"palette:solarized-light",inputName:"solarized-light",displayLabel:"Solarized Light",colors:{bg:"#fdf6e3",fg:"#657b83",line:"#93a1a1",accent:"#268bd2",muted:"#93a1a1"}},{id:"palette:solarized-dark",inputName:"solarized-dark",displayLabel:"Solarized Dark",colors:{bg:"#002b36",fg:"#839496",line:"#586e75",accent:"#268bd2",muted:"#586e75"}},{id:"palette:one-dark",inputName:"one-dark",displayLabel:"One Dark",colors:{bg:"#282c34",fg:"#abb2bf",line:"#4b5263",accent:"#c678dd",muted:"#5c6370"}},{id:"palette:salmon",inputName:"salmon",displayLabel:"Salmon",colors:{bg:"#FFFBF5",fg:"#521000",line:"#C9A88A",accent:"#FF4801",muted:"#85532E",surface:"#FFFDFB",border:"#D4B89E"}},{id:"palette:salmon-dark",inputName:"salmon-dark",displayLabel:"Salmon Dark",colors:{bg:"#1F1008",fg:"#F5DCC8",line:"#6B4A2E",accent:"#FF6B35",muted:"#A07858",surface:"#2A1810",border:"#5A3A22"}},{id:"palette:tufte-dark",inputName:"tufte-dark",displayLabel:"Tufte Dark",colors:{bg:"#1C1C1A",fg:"#E8E4DC",line:"#666660",accent:"#C87070",muted:"#908880",surface:"#2A2926",border:"#444440"}}]),tp=0;function tb(e){tp++;try{return e()}finally{tp--}}var th=Object.freeze(["fontSize","fontWeight","letterSpacing","textTransform","textColor"]),ty=Object.freeze(["paddingX","paddingY","cornerRadius","lineWidth","fillColor","borderColor"]),tx=(Object.freeze({text:Object.freeze({sourceRole:"label",fields:th}),node:Object.freeze({sourceRole:"node",fields:Object.freeze([...th,...ty])}),edge:Object.freeze({sourceRole:"edge",fields:Object.freeze([...th,"lineWidth","bendRadius","strokeColor"])}),group:Object.freeze({sourceRole:"group",fields:Object.freeze([...th,...ty,"fontFamily","headerFillColor"])})}),"1.0.0"),tk=Object.freeze({core:S}),tv=Object.freeze({owner:"agentic-mermaid",source:"built-in",reference:"src/scene/style-registry.ts"}),tS=Object.freeze({owner:"host",source:"in-process"}),t_=new Map,tw=new Map,tC=class extends Error{constructor(e){super(e),this.name="StyleSpecError"}};function tj(e){if(e)return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.freeze({...t})])))}function tF(e){if(e)return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.freeze({...t})])))}function tO(e){return e?Object.freeze(e.map(e=>Object.freeze({...e}))):void 0}function tA(e){if(!e)return;let{displayLabel:t,...r}=e;return Object.freeze({...r,formatVersion:1,...r.colors?{colors:Object.freeze({...r.colors})}:{},...r.roles?{roles:tj(r.roles)}:{},...r.semanticSlots?{semanticSlots:tF(r.semanticSlots)}:{},...r.bindings?{bindings:tO(r.bindings)}:{},...r.constraints?{constraints:tO(r.constraints)}:{}})}function tT(e,t="look",r=e.name??""){if(!e.name)throw Error("registerBuiltInStyle requires a name");let n=_(t,e.name),i=tc(tA({...e,name:n}));if(i.length)throw Error(`Invalid built-in style "${n}": ${i.join("; ")}`);!function(e,t,r,n){let i=e.name,o=Object.freeze({...e,formatVersion:1,...e.colors?{colors:Object.freeze({...e.colors})}:{},...e.roles?{roles:tj(e.roles)}:{},...e.semanticSlots?{semanticSlots:tF(e.semanticSlots)}:{},...e.bindings?{bindings:tO(e.bindings)}:{},...e.constraints?{constraints:tO(e.constraints)}:{}});if(C(t_,{identity:w({id:i,kind:t,version:r.version??tx,compatibility:{...tk,...r.compatibility},provenance:r.provenance??tS}),value:o}),void 0!==n){let e=tw.get(n),t=t_.has(n)&&n!==i?n:void 0;if(void 0!==e||void 0!==t)throw t_.delete(i),Error(`Style input name "${n}" already selects "${e??t}"`);tw.set(n,i)}}({...e,name:n},t,{version:tx,compatibility:tk,provenance:tv},r)}function tL(e){return t_.has(e)?e:tw.get(e)}function tz(e){let t=tL(e);if(!t)return;let r=tA(t_.get(t)?.value);if(r)return Object.freeze({canonicalId:t,spec:r})}function tW(e){return"freehand"===e.stroke||"wash"===e.fill?"hybrid":"jittered"===e.stroke||"hachure"===e.fill||void 0!==e.backdrop&&"plain"!==e.backdrop||void 0!==e.roughness||void 0!==e.bowing||void 0!==e.passes||void 0!==e.hachureGap||void 0!==e.hachureAngle||void 0!==e.fillWeight?"rough":"default"}function t$(e,t){if(!e&&!t)return;let r=[],n=new Set;for(let i of[...e??[],...t??[]]){let e=JSON.stringify(i);n.has(e)||(n.add(e),r.push(i))}return r}function tE(e){if(void 0===e)return;let r=Array.isArray(e)?e:[e],n=[];for(let e of r)if("string"==typeof e){let t=tL(e);if("look:crisp"===t)continue;let r=t?t_.get(t)?.value:void 0;if(!r)throw new tC(`Unknown style "${e}". Known styles: ${Object.freeze(Array.from(t_.values(),({identity:e,value:t})=>{let r=Array.from(tw.entries()).find(([,t])=>t===e.id)?.[0]??e.id,n=e.id.slice(e.id.indexOf(":")+1),i=t.displayLabel??n.split("-").filter(Boolean).map(e=>"ops"===e?"OPS":e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return Object.freeze({identity:e,spec:tA(t),inputName:r,displayLabel:i,kind:e.kind,isDefault:"look:crisp"===e.id})})).map(e=>e.inputName).join(", ")}`);n.push(r)}else n.push(function(e){let r,n,i,o,a,l,s=(r=new WeakMap,n=new WeakSet,i=new Set(["__proto__","prototype","constructor"]),o=0,a=0,(l=(e,s)=>{if(s>Z.maxDepth)throw TypeError(`Style input exceeds maximum nesting depth ${Z.maxDepth}`);if(++o>Z.maxNodes)throw TypeError(`Style input exceeds the ${Z.maxNodes}-node limit`);if("string"==typeof e){if((a+=e.length)>Z.maxAggregateTextCharacters)throw TypeError(`Style input exceeds the ${Z.maxAggregateTextCharacters}-character text limit`);return e}if("object"!=typeof e||null===e)return e;if(n.has(e))throw TypeError("Style input must be acyclic");let c=r.get(e);if(void 0!==c)return c;if(Array.isArray(e)){if(e.length>Z.maxItemsPerContainer)throw TypeError(`Style array must contain at most ${Z.maxItemsPerContainer} items`);let t=[];r.set(e,t),n.add(e);for(let r=0;r<e.length;r++){if(!Object.prototype.hasOwnProperty.call(e,r))throw TypeError("Style arrays must not be sparse");t.push(l(e[r],s+1))}return n.delete(e),Object.freeze(t)}if(!t(e))return e;let d=Object.entries(e);if(d.length>Z.maxItemsPerContainer)throw TypeError(`Style object must contain at most ${Z.maxItemsPerContainer} properties`);let u=Object.create(null);for(let[t,o]of(r.set(e,u),n.add(e),d)){if(i.has(t))throw TypeError(`Style input uses forbidden key "${t}"`);if((a+=t.length)>Z.maxAggregateTextCharacters)throw TypeError(`Style input exceeds the ${Z.maxAggregateTextCharacters}-character text limit`);Object.defineProperty(u,t,{value:l(o,s+1),enumerable:!0,writable:!1,configurable:!1})}return n.delete(e),Object.freeze(u)})(e,0)),c=tc(s);if(c.length)throw new tC(`Invalid style spec: ${c.join("; ")}`);return s}(e));if(0===n.length)return;let i={formatVersion:1};for(let e of n)for(let[t,r]of Object.entries(e))if(void 0!==r)if("colors"===t){let t={...i.colors};for(let[r,n]of Object.entries(e.colors??{}))void 0!==n&&(t[r]=n);i.colors=t}else"roles"===t?i.roles=function(e,t){if(!e&&!t)return;let r={...e};for(let[e,n]of Object.entries(t??{}))void 0!==n&&(r[e]={...r[e],...n});return r}(i.roles,e.roles):"semanticSlots"===t?i.semanticSlots=function(e,t){if(!e&&!t)return;let r={...e};for(let[e,n]of Object.entries(t??{}))r[e]={...r[e],...n};return r}(i.semanticSlots,e.semanticSlots):"bindings"===t?i.bindings=t$(i.bindings,e.bindings):"constraints"===t?i.constraints=t$(i.constraints,e.constraints):i[t]=r;return i}function tB(e){return tb(()=>{let t=tE(e);return t&&tP(t),tA(t)})}function tP(e){for(let[t,r]of(e.bindings??[]).entries()){let n=e.semanticSlots?.[r.slot];if(!n)throw new tC(`Invalid style spec: binding ${t+1} references missing semantic slot "${r.slot}"`);let i=new Set(void 0===r.role?A:T.find(e=>e.role===r.role).style.applicableProperties);if(!Object.keys(n).some(e=>i.has(e)))throw new tC(void 0===r.role?`Invalid style spec: semantic slot "${r.slot}" has no field applicable to any executable category-binding role`:`Invalid style spec: semantic slot "${r.slot}" has no field applicable to role "${r.role}"`)}let t=["hachureAngle","hachureGap","fillWeight"].filter(t=>void 0!==e[t]&&"hachure"!==e.fill);if(t.length>0)throw new tC(`Invalid style spec: ${t.map(e=>`"${e}"`).join(", ")} require fill "hachure" in the final Style stack`);let r=["washOpacity","washEdge"].filter(t=>void 0!==e[t]&&"wash"!==e.fill);if(r.length>0)throw new tC(`Invalid style spec: ${r.map(e=>`"${e}"`).join(", ")} require fill "wash" in the final Style stack`);if(void 0!==e.fill&&"default"===tW(e))throw new tC('Invalid style spec: "fill" has no crisp/default backend projection; combine it with stroke "jittered"/"freehand" or another rough/hybrid backend field')}function tI(e){return tb(()=>{let t=tE(e);if(void 0===t)return{};tP(t);let r=tA(t),n=function(e){let t=e.strokeWidth,r=e.roles?Object.fromEntries(Object.entries(e.roles).map(([e,t])=>[e,t?{...t}:void 0])):void 0,n={...void 0!==t&&t>0&&"default"===tW(e)?{lineWidth:t}:{},...r?.node},i={...void 0!==t&&t>0&&"default"===tW(e)?{lineWidth:t}:{},...r?.edge},o={...void 0!==t&&t>0&&"default"===tW(e)?{lineWidth:t}:{},...r?.group};if(!(!r&&!e.semanticSlots&&!e.bindings&&!e.constraints&&0===Object.keys(n).length&&0===Object.keys(i).length&&0===Object.keys(o).length))return{...r?{roles:tj(r)}:{},...e.semanticSlots?{semanticSlots:tF(e.semanticSlots)}:{},...e.bindings?{bindings:tO(e.bindings)}:{},...e.constraints?{constraints:tO(e.constraints)}:{},...r?.label?{text:{...r.label}}:{},...Object.keys(n).length?{node:n}:{},...Object.keys(i).length?{edge:i}:{},...Object.keys(o).length?{group:o}:{}}}(t);return{...r?{style:r}:{},...n?{face:n}:{}}})}function tM(e){return"default"!==tW(e)||void 0!==e.colors||void 0!==e.font||void 0!==e.strokeWidth||void 0!==e.roles||void 0!==e.semanticSlots||void 0!==e.bindings||void 0!==e.constraints}for(let e of(tT({name:"crisp",displayLabel:"Crisp",blurb:"The default renderer with precise SVG geometry.",stroke:"crisp"},"look"),tg)){let{inputName:t,colors:r}=e;if(_("palette",t)!==e.id)throw Error(`Built-in palette identity mismatch: ${e.id}`);tT({name:t,displayLabel:e.displayLabel,blurb:`Palette: ${t}.`,colors:{bg:r.bg,fg:r.fg,line:r.line,accent:r.accent,muted:r.muted,surface:r.surface,border:r.border}},"palette",t)}tT({name:"hand-drawn",displayLabel:"Hand-drawn",blurb:"Black ink on ruled paper — wobbly double strokes, unfilled boxes.",intent:"draft",colors:{bg:"#f7f5ef",fg:"#1a1a1e",line:"#26262b",accent:"#26262b",border:"#26262b"},font:"Caveat",stroke:"jittered",roughness:1,bowing:1,passes:2,strokeWidth:1.8,fill:"none",backdrop:"paper-ruled",mono:!0}),tT({name:"excalidraw",displayLabel:"Excalidraw",blurb:"Virtual whiteboard style — rough strokes, pastel hachure fills.",intent:"draft",colors:{bg:"#ffffff",fg:"#1e1e1e",line:"#1e1e1e",accent:"#4263eb",surface:"#f1f3f5"},font:"Caveat",stroke:"jittered",roughness:1.1,bowing:1.2,passes:2,strokeWidth:1.6,fill:"hachure",hachureAngle:-41,hachureGap:5.5,fillWeight:.9}),tT({name:"pen-and-ink",displayLabel:"Pen & ink",blurb:"Fine single-pass linework on warm cream — no interior hatching.",intent:"premium",colors:{bg:"#faf6ec",fg:"#241f1a",line:"#2b241d",accent:"#2b241d",border:"#2b241d"},font:"EB Garamond",stroke:"jittered",roughness:.5,bowing:.6,passes:1,strokeWidth:1.5,fill:"none",mono:!0}),tT({name:"freehand",displayLabel:"Freehand",blurb:"Pressure-sensitive marker ribbons — variable-width filled strokes.",intent:"draft",colors:{bg:"#fbfaf7",fg:"#16161a",line:"#1d1d22",accent:"#1d1d22",border:"#1d1d22"},font:"Architects Daughter",stroke:"freehand",roughness:.9,passes:1,strokeWidth:1.6,fill:"none",mono:!0}),tT({name:"watercolor",displayLabel:"Watercolor",blurb:"Rough outlines over translucent glazes with pigment-pooled edges.",intent:"premium",colors:{bg:"#fdfbf6",fg:"#31302c",line:"#4d4a44",accent:"#7a6a52",surface:"#ead9b9",border:"#5a564e"},font:"Caveat",stroke:"jittered",roughness:.9,bowing:.8,passes:1,strokeWidth:1.5,fill:"wash",washOpacity:.3,washEdge:.34}),tT({name:"blueprint",displayLabel:"Blueprint",blurb:"Cyanotype: white linework on Prussian blue with a drafting grid.",intent:"premium",colors:{bg:"#123a63",fg:"#eaf2fb",line:"#dbe9f7",accent:"#ffffff",muted:"#b8cfe6",surface:"#1c4a78",border:"#dbe9f7"},font:"Share Tech Mono",stroke:"jittered",roughness:.4,bowing:.4,passes:1,strokeWidth:1.4,fill:"none",backdrop:"grid",mono:!0}),tT({name:"tufte",displayLabel:"Tufte",blurb:"Maximal data-ink: crisp hairlines, warm paper, one red accent.",intent:"premium",colors:{bg:"#fffff8",fg:"#111111",line:"#4a4a45",accent:"#a00000",muted:"#6b6b64",border:"#8a8a80"},font:"EB Garamond",roles:{node:{lineWidth:.8,cornerRadius:0},edge:{lineWidth:.8},group:{lineWidth:.8}},mono:!0},"look","look:tufte"),tT({name:"accessible-high-contrast",displayLabel:"Accessible Contrast",blurb:"Accessibility-first: large labels, heavy strokes, white ground, colorblind-safe blue accent.",intent:"premium",colors:{bg:"#ffffff",fg:"#050505",line:"#111111",accent:"#005fcc",muted:"#333333",surface:"#ffffff",border:"#050505"},roles:{node:{fontSize:17,fontWeight:700,textColor:"var(--fg)",paddingX:28,paddingY:16,cornerRadius:8,lineWidth:2.4,borderColor:"var(--fg)"},edge:{fontSize:14,fontWeight:700,textColor:"var(--fg)",lineWidth:2.6,bendRadius:10,strokeColor:"var(--fg)"},group:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:22,cornerRadius:8,lineWidth:2.2,borderColor:"var(--fg)"}}}),tT({name:"patent-drawing",displayLabel:"Patent Hatching",blurb:"Print-safe patent figure: uniform ink, strong outlines, tone via oblique hatching.",intent:"premium",colors:{bg:"#ffffff",fg:"#111111",line:"#111111",accent:"#111111",muted:"#444444",surface:"#ffffff",border:"#111111"},font:"EB Garamond",stroke:"jittered",roughness:.3,bowing:.2,passes:1,strokeWidth:1.35,fill:"hachure",hachureAngle:-50,hachureGap:7,fillWeight:.65,roles:{node:{fontSize:14,fontWeight:600,textColor:"var(--fg)",paddingX:24,paddingY:13,lineWidth:1.35,cornerRadius:0,borderColor:"var(--fg)"},edge:{fontSize:12,textColor:"var(--fg)",lineWidth:1.45,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:12,fontWeight:700,textColor:"var(--fg)",paddingX:22,paddingY:18,lineWidth:1.35,cornerRadius:0,borderColor:"var(--fg)"}},mono:!0}),tT({name:"status-dashboard",displayLabel:"Dark Ops Dashboard",blurb:"Operational dashboard: dark surface, rounded modules, bright status-friendly accent.",intent:"premium",colors:{bg:"#08111f",fg:"#e6f4ff",line:"#5a7c99",accent:"#2dd4bf",muted:"#8aa6bf",surface:"#102033",border:"#2e4c63"},roles:{node:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:13,cornerRadius:10,lineWidth:1.4,borderColor:"var(--fg)"},edge:{fontSize:12,fontWeight:600,textColor:"var(--fg)",lineWidth:2,bendRadius:14,strokeColor:"var(--fg)"},group:{fontSize:13,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.06,paddingX:22,paddingY:20,cornerRadius:10,lineWidth:1.3,borderColor:"var(--fg)"}}}),tT({name:"ops-schematic",displayLabel:"Compact Trace Map",blurb:"Dense operational schematic: compact mono labels, sturdy traces, theme-friendly geometry.",intent:"lofi",colors:{bg:"#f8faf7",fg:"#17211c",line:"#24523b",accent:"#0f766e",muted:"#4f665a",surface:"#f0f5ef",border:"#24523b"},font:"Share Tech Mono",stroke:"jittered",roughness:.18,bowing:.2,passes:1,strokeWidth:1.6,fill:"none",roles:{node:{fontSize:12,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",paddingX:16,paddingY:8,cornerRadius:2,lineWidth:1.6,borderColor:"var(--fg)"},edge:{fontSize:10,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",lineWidth:1.8,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:11,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.05,paddingX:16,paddingY:16,cornerRadius:2,lineWidth:1.5,borderColor:"var(--fg)"}}}),tT({name:"chalkboard",displayLabel:"Chalkboard",blurb:"Classroom chalkboard: dusty off-white strokes on green slate.",intent:"draft",colors:{bg:"#17362f",fg:"#f5f1df",line:"#ece6cf",accent:"#ffe08a",muted:"#c7d2c4",surface:"#17362f",border:"#f3ecd5"},font:"Caveat",stroke:"jittered",roughness:1.25,bowing:1,passes:2,strokeWidth:1.9,fill:"none",roles:{node:{fontSize:16,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:12,borderColor:"var(--fg)"},edge:{fontSize:13,textColor:"var(--fg)",lineWidth:1.8,strokeColor:"var(--fg)"},group:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:20,paddingY:20,lineWidth:1.7,borderColor:"var(--fg)"}},mono:!0}),tT({name:"risograph",displayLabel:"Riso Print",blurb:"Two-ink poster print: warm stock, offset blue linework, coral accent, coarse hachure.",intent:"premium",colors:{bg:"#fff5df",fg:"#2b2725",line:"#1f3d5a",accent:"#ff5a5f",muted:"#876a52",surface:"#ffd166",border:"#1f3d5a"},font:"EB Garamond",stroke:"jittered",roughness:.7,bowing:.55,passes:1,strokeWidth:1.5,fill:"hachure",hachureAngle:18,hachureGap:6.5,fillWeight:.75,roles:{node:{fontSize:14,fontWeight:700,textColor:"var(--fg)",paddingX:24,paddingY:13,cornerRadius:3,borderColor:"var(--fg)"},edge:{fontSize:12,textColor:"var(--fg)",lineWidth:1.5,strokeColor:"var(--fg)"},group:{fontSize:13,fontWeight:700,textColor:"var(--fg)",paddingX:22,paddingY:18,cornerRadius:3,borderColor:"var(--fg)"}}}),tT({name:"architectural-plan",displayLabel:"Plan Drafting",blurb:"Architectural plan: square technical linework, uppercase mono labels, room-like frames.",intent:"premium",colors:{bg:"#fbf7ea",fg:"#202a2f",line:"#38535e",accent:"#1f6f8b",muted:"#60727a",surface:"#fffaf0",border:"#38535e"},font:"Share Tech Mono",stroke:"jittered",roughness:.18,bowing:.25,passes:1,strokeWidth:1.45,fill:"none",roles:{node:{fontSize:12,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",paddingX:20,paddingY:10,cornerRadius:0,lineWidth:1.45,borderColor:"var(--fg)"},edge:{fontSize:10,fontWeight:700,textTransform:"uppercase",textColor:"var(--fg)",lineWidth:1.55,bendRadius:0,strokeColor:"var(--fg)"},group:{fontSize:11,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.06,paddingX:20,paddingY:20,cornerRadius:0,lineWidth:1.45,borderColor:"var(--fg)"}}}),tT({name:"publication-figure",displayLabel:"Report Figure",blurb:"Polished publication figure: serif labels, confident rules, rounded boxes, one quiet accent.",intent:"premium",colors:{bg:"#fffdf8",fg:"#171512",line:"#24211d",accent:"#1d4ed8",muted:"#5f5a52",surface:"#faf5ea",border:"#24211d"},font:"EB Garamond",strokeWidth:1.45,roles:{node:{fontSize:15,fontWeight:700,textColor:"var(--fg)",paddingX:26,paddingY:14,cornerRadius:7,lineWidth:1.45,borderColor:"var(--fg)"},edge:{fontSize:12,fontWeight:600,textColor:"var(--fg)",lineWidth:1.45,bendRadius:8,strokeColor:"var(--fg)"},group:{fontSize:12,fontWeight:700,textColor:"var(--fg)",textTransform:"uppercase",letterSpacing:.08,paddingX:24,paddingY:22,cornerRadius:7,lineWidth:1.35,borderColor:"var(--fg)"}}});export{eo as a,el as b,es as c,ec as d,eu as e,G as f,V as g,X as h,H as i,U as j,Z as k,K as l,ee as m,er as n,ei as o,ef as p,em as q,eg as r,ek as s,eE as t,eB as u,eI as v,eq as w,eD as x,eJ as y,eY as z,eG as A,tm as B,tz as C,tW as D,tB as E,tI as F,tM as G};
@@ -1 +1 @@
1
- import{f as e}from"./chunk-37ORXEBA.js";var t=(e,t)=>({expected:e,valid:t}),i=t("a finite positive number",e=>"number"==typeof e&&Number.isFinite(e)&&e>0),n=t("a finite non-negative number",e=>"number"==typeof e&&Number.isFinite(e)&&e>=0),r=t("a finite number",e=>"number"==typeof e&&Number.isFinite(e)),a=t("a boolean",e=>"boolean"==typeof e),o=t("a string",e=>"string"==typeof e),s=t("a non-empty string",e=>"string"==typeof e&&e.trim().length>0),m=t("a CSS font-family list without url(), @import or other functions besides var()",t=>void 0!==e(t)),f=t("a non-empty array of strings",e=>Array.isArray(e)&&e.length>0&&e.every(e=>"string"==typeof e)),u=(...e)=>t(`one of: ${e.join(", ")}`,t=>"string"==typeof t&&e.includes(t)),p=(...e)=>t(`one of: ${e.join(", ")} (case-insensitive)`,t=>"string"==typeof t&&e.some(e=>e.toLowerCase()===t.toLowerCase())),b=(e,i,n=!0)=>t(`a finite number ${n?"from":"greater than"} ${e} through ${i}`,t=>"number"==typeof t&&Number.isFinite(t)&&(n?t>=e:t>e)&&t<=i),y=e=>t(`a finite positive number no greater than ${e}`,t=>"number"==typeof t&&Number.isFinite(t)&&t>0&&t<=e),g=e=>t(`a finite non-negative number no greater than ${e}`,t=>"number"==typeof t&&Number.isFinite(t)&&t>=0&&t<=e),l=t("a finite positive number or non-empty CSS size string",e=>"number"==typeof e&&Number.isFinite(e)&&e>0||"string"==typeof e&&e.trim().length>0),h=(e,i=!1)=>t(`a numeric value${i?` greater than ${e}`:` of at least ${e}`}`,t=>{let n="number"==typeof t?t:"string"==typeof t&&/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:px)?$/i.test(t.trim())?Number.parseFloat(t):NaN;return Number.isFinite(n)&&(i?n>e:n>=e)});export{t as a,i as b,n as c,r as d,a as e,o as f,s as g,m as h,f as i,u as j,p as k,b as l,y as m,g as n,l as o,h as p};
1
+ import{f as e}from"./chunk-ILCWDEZN.js";var t=(e,t)=>({expected:e,valid:t}),i=t("a finite positive number",e=>"number"==typeof e&&Number.isFinite(e)&&e>0),n=t("a finite non-negative number",e=>"number"==typeof e&&Number.isFinite(e)&&e>=0),r=t("a finite number",e=>"number"==typeof e&&Number.isFinite(e)),a=t("a boolean",e=>"boolean"==typeof e),o=t("a string",e=>"string"==typeof e),s=t("a non-empty string",e=>"string"==typeof e&&e.trim().length>0),m=t("a CSS font-family list without url(), @import or other functions besides var()",t=>void 0!==e(t)),f=t("a non-empty array of strings",e=>Array.isArray(e)&&e.length>0&&e.every(e=>"string"==typeof e)),u=(...e)=>t(`one of: ${e.join(", ")}`,t=>"string"==typeof t&&e.includes(t)),p=(...e)=>t(`one of: ${e.join(", ")} (case-insensitive)`,t=>"string"==typeof t&&e.some(e=>e.toLowerCase()===t.toLowerCase())),b=(e,i,n=!0)=>t(`a finite number ${n?"from":"greater than"} ${e} through ${i}`,t=>"number"==typeof t&&Number.isFinite(t)&&(n?t>=e:t>e)&&t<=i),y=e=>t(`a finite positive number no greater than ${e}`,t=>"number"==typeof t&&Number.isFinite(t)&&t>0&&t<=e),g=e=>t(`a finite non-negative number no greater than ${e}`,t=>"number"==typeof t&&Number.isFinite(t)&&t>=0&&t<=e),l=t("a finite positive number or non-empty CSS size string",e=>"number"==typeof e&&Number.isFinite(e)&&e>0||"string"==typeof e&&e.trim().length>0),h=(e,i=!1)=>t(`a numeric value${i?` greater than ${e}`:` of at least ${e}`}`,t=>{let n="number"==typeof t?t:"string"==typeof t&&/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:px)?$/i.test(t.trim())?Number.parseFloat(t):NaN;return Number.isFinite(n)&&(i?n>e:n>=e)});export{t as a,i as b,n as c,r as d,a as e,o as f,s as g,m as h,f as i,u as j,p as k,b as l,y as m,g as n,l as o,h as p};