grimoire3d 0.0.0-dev.f7e9e26 → 0.1.0-dev.7c43b3d
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.
- package/README.md +4 -10
- package/cli/book-cover.d.ts +10 -0
- package/cli/book-cover.js +56 -0
- package/cli/cli.js +5 -3
- package/cli/content.js +75 -2
- package/cli/head-file.js +133 -0
- package/cli/library-footer.d.ts +10 -0
- package/cli/library-footer.js +21 -0
- package/cli/markdown.js +9 -0
- package/cli/static-pages.js +34 -6
- package/dist/BookViewer-GXuBR_bC.js +339 -0
- package/dist/components/index.js +1 -5
- package/dist/grimoire3d.css +3 -1
- package/dist/index.js +1 -4
- package/dist/site/assets/BookReader-5pM5wP2A.js +2 -0
- package/dist/site/assets/BookScene-RrBaUUYB.js +4294 -0
- package/dist/site/assets/MermaidDiagram-D_0Lzujl.js +44 -0
- package/dist/site/assets/PageMarkdown-DQOlzkxh.js +37 -0
- package/dist/site/assets/abnfDiagram-S7VZAUFO-CnBoibVK.js +1 -0
- package/dist/site/assets/architecture-WOLXFQ4H-BUW5XoSg.js +1 -0
- package/dist/site/assets/architectureDiagram-YGSQEFNW-B6gpKPRf.js +36 -0
- package/dist/site/assets/blockDiagram-APKKGZFW-DzujHYb6.js +140 -0
- package/dist/site/assets/{bpmnIcons-APHXDYXF-ByGoYv9M.js → bpmnIcons-APHXDYXF-C0jbCElo.js} +1 -1
- package/dist/site/assets/c4Diagram-KJ2TOQU5-CAApT3wg.js +38 -0
- package/dist/site/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/site/assets/{chunk-5VM5RSS4-CCNs5Q1j.js → chunk-5VM5RSS4-ZNzvKenW.js} +2 -2
- package/dist/site/assets/chunk-6MUBBAK2-CBL8kJBQ.js +2 -0
- package/dist/site/assets/chunk-AXFCVDMN-CECdpNlC.js +62 -0
- package/dist/site/assets/chunk-BG4553SI-Bit8fGUK.js +129 -0
- package/dist/site/assets/chunk-DQASFODM-DCXRnXLz.js +10 -0
- package/dist/site/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/dist/site/assets/chunk-HFQBQIA3-BBPlNXRe.js +1 -0
- package/dist/site/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/dist/site/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/site/assets/chunk-KQLB2F66-B72nJl7f.js +2 -0
- package/dist/site/assets/chunk-KS47KZWR-BmW9AsrF.js +1 -0
- package/dist/site/assets/chunk-LEVMRMFU-P01Wm6c9.js +1 -0
- package/dist/site/assets/chunk-M57EVK23-Dt9NSVMZ.js +1 -0
- package/dist/site/assets/chunk-NGNAAXSQ-DI_UYJZ4.js +136 -0
- package/dist/site/assets/chunk-OY52VR5R-55zxU9gN.js +88 -0
- package/dist/site/assets/chunk-QB3YPZ4I-Ba8Om-jB.js +213 -0
- package/dist/site/assets/chunk-R3KSYZAL-Bhkxj8pV.js +1 -0
- package/dist/site/assets/chunk-STOXU5M4-ZPfBWNfR.js +72 -0
- package/dist/site/assets/chunk-TU62E6Q5-DN_BJJox.js +1 -0
- package/dist/site/assets/chunk-X4PVCEUW-wh_-rkJf.js +1 -0
- package/dist/site/assets/chunk-XXDRQBXY-CNQnC--q.js +1 -0
- package/dist/site/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/site/assets/classDiagram-v2-L25IHNXF-DJk0rUaa.js +217 -0
- package/dist/site/assets/cose-bilkent-JH36ORCC-COco7PRi.js +1 -0
- package/dist/site/assets/cynefin-EF2NZ3EQ-WZObn4oK.js +1 -0
- package/dist/site/assets/cynefinDiagram-L36ESFBY-Bb2CAvFF.js +62 -0
- package/dist/site/assets/cytoscape.esm-nTrd5EVq.js +321 -0
- package/dist/site/assets/d3-scale-CElPUUud.js +1 -0
- package/dist/site/assets/d3-selection-DHygnWoA.js +1 -0
- package/dist/site/assets/dagre-SPEB5RXH-Bj5fBBSz.js +4 -0
- package/dist/site/assets/diagram-3B7GL73J-C2wQG_ff.js +200 -0
- package/dist/site/assets/diagram-DNEMPZML-BkCumRTy.js +24 -0
- package/dist/site/assets/diagram-L3MUGCDN-ueCGwS0n.js +41 -0
- package/dist/site/assets/diagram-LA4NIPWU-CWXyhkCR.js +24 -0
- package/dist/site/assets/diagram-MHCOC4E2-CjtgYuJD.js +3 -0
- package/dist/site/assets/diagram-XPFHEONP-DMJK3uYo.js +30 -0
- package/dist/site/assets/dist-D_7AE7hR.js +1 -0
- package/dist/site/assets/ebnfDiagram-UZSYDL2S-BOYcicjK.js +1 -0
- package/dist/site/assets/elk-XV6XMXQE-B5L8Iw7x.js +27 -0
- package/dist/site/assets/erDiagram-EYBAPDEH-CUUbHYkT.js +99 -0
- package/dist/site/assets/es-YYQGP5MR.js +2 -0
- package/dist/site/assets/eventmodeling-K75KTNOO-B7uQyKPK.js +1 -0
- package/dist/site/assets/flowDiagram-MALGAFMO-DepLaS9B.js +1 -0
- package/dist/site/assets/ganttDiagram-23REXITY-D5HywVHP.js +292 -0
- package/dist/site/assets/gitGraph-VSP46ZUC-DGApQopU.js +1 -0
- package/dist/site/assets/gitGraphDiagram-STJD7YCW-Ct1E3koZ.js +106 -0
- package/dist/site/assets/graphlib-DS17s2tU.js +1 -0
- package/dist/site/assets/index-BTjyXmrh.css +1 -0
- package/dist/site/assets/index-CiI39UEW.js +2 -0
- package/dist/site/assets/info-OHQRW6UA-Nb4bAH3m.js +1 -0
- package/dist/site/assets/infoDiagram-KBXO4MBG-DnU24S0B.js +2 -0
- package/dist/site/assets/ishikawaDiagram-M35NCXHK-BcQghjKX.js +70 -0
- package/dist/site/assets/journeyDiagram-OPLOXDXO-stnSaHRX.js +139 -0
- package/dist/site/assets/jsxRuntime-WpZ1bTm4.js +1 -0
- package/dist/site/assets/kanban-definition-BZKZHSQY-DEHcPEwn.js +89 -0
- package/dist/site/assets/katex-MEuSR36T.js +257 -0
- package/dist/site/assets/mermaid-parser.core-DeCnM7F6.js +7 -0
- package/dist/site/assets/mindmap-definition-I2QAS2VK-DmMlZUpg.js +98 -0
- package/dist/site/assets/packet-JDAUHWVQ-Bq64t2Nq.js +1 -0
- package/dist/site/assets/pegDiagram-FD4XPPHP-Dg_Jmvr8.js +1 -0
- package/dist/site/assets/pie-XZMESJXO-62QUFLOf.js +1 -0
- package/dist/site/assets/pieDiagram-J4AKIIQI-Cl6xtUfY.js +39 -0
- package/dist/site/assets/quadrantDiagram-XTYBLID2-CPskrlLu.js +7 -0
- package/dist/site/assets/radar-ABXABTNO-DcHFlqcv.js +1 -0
- package/dist/site/assets/railroad-I3PHUGI6-UN_KVEIT.js +1 -0
- package/dist/site/assets/railroad-abnf-LNEFI6M7-CBmAElE0.js +1 -0
- package/dist/site/assets/railroad-ebnf-DWYD2UWJ-cz0Vnfoe.js +1 -0
- package/dist/site/assets/railroad-peg-JR7BVNR7-CTpZf4Io.js +1 -0
- package/dist/site/assets/railroadDiagram-MRQ6NCDL-BfRdrXVU.js +1 -0
- package/dist/site/assets/requirementDiagram-Y7LWUY3S-Co7Z8efw.js +84 -0
- package/dist/site/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/site/assets/sankeyDiagram-WGJFYUXA-B9pt8sRE.js +40 -0
- package/dist/site/assets/sequenceDiagram-5NDRBG5M-6BxTaEsr.js +169 -0
- package/dist/site/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
- package/dist/site/assets/stateDiagram-v2-FJ4FJNEA-B4sFxyl8.js +291 -0
- package/dist/site/assets/swimlanes-UMQ2AFYF-BCLEQ3gh.js +1 -0
- package/dist/site/assets/swimlanesDiagram-OMPLPG4O-CSFiCK4U.js +8 -0
- package/dist/site/assets/three-core-B1q6MRTI.js +5 -0
- package/dist/site/assets/timeline-definition-SEUHKTQE-En4zD208.js +120 -0
- package/dist/site/assets/treeView-D4JQ5SDB-Co5K409-.js +1 -0
- package/dist/site/assets/treemap-SAJKECNS-6nDAfcSQ.js +1 -0
- package/dist/site/assets/usecaseDiagram-AFA6YXN4-BwnPKBeW.js +328 -0
- package/dist/site/assets/vennDiagram-NNMJR3RB-BZaUT4ro.js +34 -0
- package/dist/site/assets/wardley-7MLQ67FV-B_pofY38.js +1 -0
- package/dist/site/assets/wardleyDiagram-S7YFUSEH-Dg8pAabl.js +78 -0
- package/dist/site/assets/xychartDiagram-GGNKY7IX-Di4W3slj.js +7 -0
- package/dist/site/index.html +3 -2
- package/package.json +26 -25
- package/dist/BookViewer-CwCn-LTn.js +0 -332
- package/dist/site/assets/BookReader-BxKrexRZ.js +0 -2
- package/dist/site/assets/BookScene-DN1_Kxe3.js +0 -4045
- package/dist/site/assets/MermaidDiagram-Dma3Cwvn.js +0 -312
- package/dist/site/assets/PageMarkdown-C-gI_dXg.js +0 -37
- package/dist/site/assets/abnfDiagram-S7VZAUFO-BIA2ezcb.js +0 -1
- package/dist/site/assets/architectureDiagram-YGSQEFNW-DMB5UtEZ.js +0 -36
- package/dist/site/assets/blockDiagram-APKKGZFW-CeBSUSaW.js +0 -140
- package/dist/site/assets/c4Diagram-KJ2TOQU5-BmBo2PHu.js +0 -38
- package/dist/site/assets/chunk-2Q5K7J3B-BDgDFVbx.js +0 -1
- package/dist/site/assets/chunk-HFQBQIA3-B8uXoLoT.js +0 -1
- package/dist/site/assets/chunk-JWPE2WC7-BiKy7CcD.js +0 -1
- package/dist/site/assets/chunk-KQLB2F66-D_kpUTKA.js +0 -2
- package/dist/site/assets/chunk-KS47KZWR-C_s_qnHf.js +0 -1
- package/dist/site/assets/chunk-OY52VR5R-D8f7gl4W.js +0 -88
- package/dist/site/assets/chunk-TU62E6Q5-Bm44Znlj.js +0 -1
- package/dist/site/assets/chunk-XXDRQBXY-ChLLr56_.js +0 -1
- package/dist/site/assets/classDiagram-v2-L25IHNXF-DwKi-r2i.js +0 -217
- package/dist/site/assets/cose-bilkent-JH36ORCC-8N6YUm1i.js +0 -1
- package/dist/site/assets/cynefin-EF2NZ3EQ-Df5ATUPb.js +0 -141
- package/dist/site/assets/cynefinDiagram-L36ESFBY-DmAbfxAU.js +0 -62
- package/dist/site/assets/cytoscape.esm-BHa1VTXv.js +0 -321
- package/dist/site/assets/d3-scale-4DPf7zan.js +0 -1
- package/dist/site/assets/dagre-SPEB5RXH-B_2grAE7.js +0 -4
- package/dist/site/assets/diagram-3B7GL73J-C9FXwDlf.js +0 -200
- package/dist/site/assets/diagram-DNEMPZML-DflAT3gr.js +0 -24
- package/dist/site/assets/diagram-L3MUGCDN-B04gjrM_.js +0 -41
- package/dist/site/assets/diagram-LA4NIPWU-cfWJg8HX.js +0 -24
- package/dist/site/assets/diagram-MHCOC4E2-jRbOs2Df.js +0 -3
- package/dist/site/assets/diagram-XPFHEONP-yR45xV59.js +0 -30
- package/dist/site/assets/ebnfDiagram-UZSYDL2S-DlmNJUx4.js +0 -1
- package/dist/site/assets/elk-XV6XMXQE-cHLdRN7u.js +0 -27
- package/dist/site/assets/erDiagram-EYBAPDEH-7HsRsmBI.js +0 -99
- package/dist/site/assets/es-DoLiZPBX.js +0 -2
- package/dist/site/assets/flowDiagram-MALGAFMO-DoJjw4RA.js +0 -213
- package/dist/site/assets/ganttDiagram-23REXITY-D2uZtX_8.js +0 -292
- package/dist/site/assets/gitGraphDiagram-STJD7YCW-CjftfLRK.js +0 -106
- package/dist/site/assets/graph-D8UmR1vK.js +0 -1
- package/dist/site/assets/index-CqcyU6rA.js +0 -1
- package/dist/site/assets/index-DWW-KDWe.css +0 -1
- package/dist/site/assets/infoDiagram-KBXO4MBG-HN-1tqq1.js +0 -2
- package/dist/site/assets/ishikawaDiagram-M35NCXHK-DcnRwsO0.js +0 -70
- package/dist/site/assets/journeyDiagram-OPLOXDXO-CMZGp8mG.js +0 -139
- package/dist/site/assets/kanban-definition-BZKZHSQY-C9vGS-EW.js +0 -89
- package/dist/site/assets/katex-DLSO0Xi6.js +0 -257
- package/dist/site/assets/mindmap-definition-I2QAS2VK-R2SGME7R.js +0 -98
- package/dist/site/assets/pegDiagram-FD4XPPHP-eDMY4Hpd.js +0 -1
- package/dist/site/assets/pieDiagram-J4AKIIQI-DoHNiqwi.js +0 -39
- package/dist/site/assets/quadrantDiagram-XTYBLID2-Bz5idec8.js +0 -7
- package/dist/site/assets/railroadDiagram-MRQ6NCDL-DHJisW8P.js +0 -1
- package/dist/site/assets/requirementDiagram-Y7LWUY3S-5aETRIZz.js +0 -84
- package/dist/site/assets/sankeyDiagram-WGJFYUXA-C7O4v9rg.js +0 -40
- package/dist/site/assets/sequenceDiagram-5NDRBG5M-D4sVU6s6.js +0 -169
- package/dist/site/assets/sizeCapture-INFHLROL-Bi2DkFS3.js +0 -1
- package/dist/site/assets/stateDiagram-v2-FJ4FJNEA-WqXK7YOd.js +0 -291
- package/dist/site/assets/swimlanes-UMQ2AFYF-Czo9WyoV.js +0 -1
- package/dist/site/assets/swimlanesDiagram-OMPLPG4O-BH5aEx0X.js +0 -8
- package/dist/site/assets/three-core-Dkab0Vtn.js +0 -40
- package/dist/site/assets/timeline-definition-SEUHKTQE-KGKDZW_q.js +0 -120
- package/dist/site/assets/usecaseDiagram-AFA6YXN4-S0_9S22K.js +0 -370
- package/dist/site/assets/vennDiagram-NNMJR3RB-DJOjLlbA.js +0 -34
- package/dist/site/assets/wardleyDiagram-S7YFUSEH-BnzYzY-n.js +0 -78
- package/dist/site/assets/xychartDiagram-GGNKY7IX-CKOVznoa.js +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function Wn(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function jt(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function de(n){let e,t,r;n.length!==2?(e=Wn,t=(o,c)=>Wn(n(o),c),r=(o,c)=>n(o)-c):(e=n===Wn||n===jt?n:_t,t=n,r=n);function i(o,c,f=0,g=o.length){if(f<g){if(e(c,c)!==0)return g;do{const h=f+g>>>1;t(o[h],c)<0?f=h+1:g=h}while(f<g)}return f}function u(o,c,f=0,g=o.length){if(f<g){if(e(c,c)!==0)return g;do{const h=f+g>>>1;t(o[h],c)<=0?f=h+1:g=h}while(f<g)}return f}function a(o,c,f=0,g=o.length){const h=i(o,c,f,g-1);return h>f&&r(o[h-1],c)>-r(o[h],c)?h-1:h}return{left:i,center:a,right:u}}function _t(){return 0}function Et(n){return n===null?NaN:+n}const Zt=de(Wn),Bt=Zt.right;de(Et).center;class De extends Map{constructor(e,t=Xt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Se(this,e))}has(e){return super.has(Se(this,e))}set(e,t){return super.set(Qt(this,e),t)}delete(e){return super.delete(Vt(this,e))}}function Se({_intern:n,_key:e},t){const r=e(t);return n.has(r)?n.get(r):t}function Qt({_intern:n,_key:e},t){const r=e(t);return n.has(r)?n.get(r):(n.set(r,t),t)}function Vt({_intern:n,_key:e},t){const r=e(t);return n.has(r)&&(t=n.get(r),n.delete(r)),t}function Xt(n){return n!==null&&typeof n=="object"?n.valueOf():n}const Gt=Math.sqrt(50),Jt=Math.sqrt(10),Kt=Math.sqrt(2);function In(n,e,t){const r=(e-n)/Math.max(0,t),i=Math.floor(Math.log10(r)),u=r/Math.pow(10,i),a=u>=Gt?10:u>=Jt?5:u>=Kt?2:1;let o,c,f;return i<0?(f=Math.pow(10,-i)/a,o=Math.round(n*f),c=Math.round(e*f),o/f<n&&++o,c/f>e&&--c,f=-f):(f=Math.pow(10,i)*a,o=Math.round(n/f),c=Math.round(e/f),o*f<n&&++o,c*f>e&&--c),c<o&&.5<=t&&t<2?In(n,e,t*2):[o,c,f]}function nr(n,e,t){if(e=+e,n=+n,t=+t,!(t>0))return[];if(n===e)return[n];const r=e<n,[i,u,a]=r?In(e,n,t):In(n,e,t);if(!(u>=i))return[];const o=u-i+1,c=new Array(o);if(r)if(a<0)for(let f=0;f<o;++f)c[f]=(u-f)/-a;else for(let f=0;f<o;++f)c[f]=(u-f)*a;else if(a<0)for(let f=0;f<o;++f)c[f]=(i+f)/-a;else for(let f=0;f<o;++f)c[f]=(i+f)*a;return c}function ce(n,e,t){return e=+e,n=+n,t=+t,In(n,e,t)[2]}function se(n,e,t){e=+e,n=+n,t=+t;const r=e<n,i=r?ce(e,n,t):ce(n,e,t);return(r?-1:1)*(i<0?1/-i:i)}function Tu(n,e){let t;if(e===void 0)for(const r of n)r!=null&&(t<r||t===void 0&&r>=r)&&(t=r);else{let r=-1;for(let i of n)(i=e(i,++r,n))!=null&&(t<i||t===void 0&&i>=i)&&(t=i)}return t}function Cu(n,e){let t;if(e===void 0)for(const r of n)r!=null&&(t>r||t===void 0&&r>=r)&&(t=r);else{let r=-1;for(let i of n)(i=e(i,++r,n))!=null&&(t>i||t===void 0&&i>=i)&&(t=i)}return t}function er(n,e,t){n=+n,e=+e,t=(i=arguments.length)<2?(e=n,n=0,1):i<3?1:+t;for(var r=-1,i=Math.max(0,Math.ceil((e-n)/t))|0,u=new Array(i);++r<i;)u[r]=n+r*t;return u}function vn(n,e,t){n.prototype=e.prototype=t,t.constructor=n}function kn(n,e){var t=Object.create(n.prototype);for(var r in e)t[r]=e[r];return t}function J(){}var un=.7,Mn=1/un,yn="\\s*([+-]?\\d+)\\s*",Nn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",q="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tr=/^#([0-9a-f]{3,8})$/,rr=new RegExp(`^rgb\\(${yn},${yn},${yn}\\)$`),ir=new RegExp(`^rgb\\(${q},${q},${q}\\)$`),ur=new RegExp(`^rgba\\(${yn},${yn},${yn},${Nn}\\)$`),ar=new RegExp(`^rgba\\(${q},${q},${q},${Nn}\\)$`),or=new RegExp(`^hsl\\(${Nn},${q},${q}\\)$`),fr=new RegExp(`^hsla\\(${Nn},${q},${q},${Nn}\\)$`),ke={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};vn(J,Dn,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:$e,formatHex:$e,formatHex8:cr,formatHsl:sr,formatRgb:Fe,toString:Fe});function $e(){return this.rgb().formatHex()}function cr(){return this.rgb().formatHex8()}function sr(){return at(this).formatHsl()}function Fe(){return this.rgb().formatRgb()}function Dn(n){var e,t;return n=(n+"").trim().toLowerCase(),(e=tr.exec(n))?(t=e[1].length,e=parseInt(e[1],16),t===6?He(e):t===3?new S(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?Yn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?Yn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=rr.exec(n))?new S(e[1],e[2],e[3],1):(e=ir.exec(n))?new S(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=ur.exec(n))?Yn(e[1],e[2],e[3],e[4]):(e=ar.exec(n))?Yn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=or.exec(n))?Le(e[1],e[2]/100,e[3]/100,1):(e=fr.exec(n))?Le(e[1],e[2]/100,e[3]/100,e[4]):ke.hasOwnProperty(n)?He(ke[n]):n==="transparent"?new S(NaN,NaN,NaN,0):null}function He(n){return new S(n>>16&255,n>>8&255,n&255,1)}function Yn(n,e,t,r){return r<=0&&(n=e=t=NaN),new S(n,e,t,r)}function ye(n){return n instanceof J||(n=Dn(n)),n?(n=n.rgb(),new S(n.r,n.g,n.b,n.opacity)):new S}function Rn(n,e,t,r){return arguments.length===1?ye(n):new S(n,e,t,r??1)}function S(n,e,t,r){this.r=+n,this.g=+e,this.b=+t,this.opacity=+r}vn(S,Rn,kn(J,{brighter(n){return n=n==null?Mn:Math.pow(Mn,n),new S(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?un:Math.pow(un,n),new S(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new S(tn(this.r),tn(this.g),tn(this.b),On(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ye,formatHex:Ye,formatHex8:lr,formatRgb:Ae,toString:Ae}));function Ye(){return`#${en(this.r)}${en(this.g)}${en(this.b)}`}function lr(){return`#${en(this.r)}${en(this.g)}${en(this.b)}${en((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ae(){const n=On(this.opacity);return`${n===1?"rgb(":"rgba("}${tn(this.r)}, ${tn(this.g)}, ${tn(this.b)}${n===1?")":`, ${n})`}`}function On(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function tn(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function en(n){return n=tn(n),(n<16?"0":"")+n.toString(16)}function Le(n,e,t,r){return r<=0?n=e=t=NaN:t<=0||t>=1?n=e=NaN:e<=0&&(n=NaN),new P(n,e,t,r)}function at(n){if(n instanceof P)return new P(n.h,n.s,n.l,n.opacity);if(n instanceof J||(n=Dn(n)),!n)return new P;if(n instanceof P)return n;n=n.rgb();var e=n.r/255,t=n.g/255,r=n.b/255,i=Math.min(e,t,r),u=Math.max(e,t,r),a=NaN,o=u-i,c=(u+i)/2;return o?(e===u?a=(t-r)/o+(t<r)*6:t===u?a=(r-e)/o+2:a=(e-t)/o+4,o/=c<.5?u+i:2-u-i,a*=60):o=c>0&&c<1?0:a,new P(a,o,c,n.opacity)}function hr(n,e,t,r){return arguments.length===1?at(n):new P(n,e,t,r??1)}function P(n,e,t,r){this.h=+n,this.s=+e,this.l=+t,this.opacity=+r}vn(P,hr,kn(J,{brighter(n){return n=n==null?Mn:Math.pow(Mn,n),new P(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?un:Math.pow(un,n),new P(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,e=isNaN(n)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*e,i=2*t-r;return new S(Jn(n>=240?n-240:n+120,i,r),Jn(n,i,r),Jn(n<120?n+240:n-120,i,r),this.opacity)},clamp(){return new P(We(this.h),An(this.s),An(this.l),On(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const n=On(this.opacity);return`${n===1?"hsl(":"hsla("}${We(this.h)}, ${An(this.s)*100}%, ${An(this.l)*100}%${n===1?")":`, ${n})`}`}}));function We(n){return n=(n||0)%360,n<0?n+360:n}function An(n){return Math.max(0,Math.min(1,n||0))}function Jn(n,e,t){return(n<60?e+(t-e)*n/60:n<180?t:n<240?e+(t-e)*(240-n)/60:e)*255}const ot=Math.PI/180,ft=180/Math.PI,Pn=18,ct=.96422,st=1,lt=.82521,ht=4/29,xn=6/29,gt=3*xn*xn,gr=xn*xn*xn;function mt(n){if(n instanceof z)return new z(n.l,n.a,n.b,n.opacity);if(n instanceof E)return dt(n);n instanceof S||(n=ye(n));var e=te(n.r),t=te(n.g),r=te(n.b),i=Kn((.2225045*e+.7168786*t+.0606169*r)/st),u,a;return e===t&&t===r?u=a=i:(u=Kn((.4360747*e+.3850649*t+.1430804*r)/ct),a=Kn((.0139322*e+.0971045*t+.7141733*r)/lt)),new z(116*i-16,500*(u-i),200*(i-a),n.opacity)}function mr(n,e,t,r){return arguments.length===1?mt(n):new z(n,e,t,r??1)}function z(n,e,t,r){this.l=+n,this.a=+e,this.b=+t,this.opacity=+r}vn(z,mr,kn(J,{brighter(n){return new z(this.l+Pn*(n??1),this.a,this.b,this.opacity)},darker(n){return new z(this.l-Pn*(n??1),this.a,this.b,this.opacity)},rgb(){var n=(this.l+16)/116,e=isNaN(this.a)?n:n+this.a/500,t=isNaN(this.b)?n:n-this.b/200;return e=ct*ne(e),n=st*ne(n),t=lt*ne(t),new S(ee(3.1338561*e-1.6168667*n-.4906146*t),ee(-.9787684*e+1.9161415*n+.033454*t),ee(.0719453*e-.2289914*n+1.4052427*t),this.opacity)}}));function Kn(n){return n>gr?Math.pow(n,1/3):n/gt+ht}function ne(n){return n>xn?n*n*n:gt*(n-ht)}function ee(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function te(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function dr(n){if(n instanceof E)return new E(n.h,n.c,n.l,n.opacity);if(n instanceof z||(n=mt(n)),n.a===0&&n.b===0)return new E(NaN,0<n.l&&n.l<100?0:NaN,n.l,n.opacity);var e=Math.atan2(n.b,n.a)*ft;return new E(e<0?e+360:e,Math.sqrt(n.a*n.a+n.b*n.b),n.l,n.opacity)}function le(n,e,t,r){return arguments.length===1?dr(n):new E(n,e,t,r??1)}function E(n,e,t,r){this.h=+n,this.c=+e,this.l=+t,this.opacity=+r}function dt(n){if(isNaN(n.h))return new z(n.l,0,0,n.opacity);var e=n.h*ot;return new z(n.l,Math.cos(e)*n.c,Math.sin(e)*n.c,n.opacity)}vn(E,le,kn(J,{brighter(n){return new E(this.h,this.c,this.l+Pn*(n??1),this.opacity)},darker(n){return new E(this.h,this.c,this.l-Pn*(n??1),this.opacity)},rgb(){return dt(this).rgb()}}));var yt=-.14861,xe=1.78277,Me=-.29227,Qn=-.90649,Sn=1.97294,Ie=Sn*Qn,Re=Sn*xe,Oe=xe*Me-Qn*yt;function yr(n){if(n instanceof rn)return new rn(n.h,n.s,n.l,n.opacity);n instanceof S||(n=ye(n));var e=n.r/255,t=n.g/255,r=n.b/255,i=(Oe*r+Ie*e-Re*t)/(Oe+Ie-Re),u=r-i,a=(Sn*(t-i)-Me*u)/Qn,o=Math.sqrt(a*a+u*u)/(Sn*i*(1-i)),c=o?Math.atan2(a,u)*ft-120:NaN;return new rn(c<0?c+360:c,o,i,n.opacity)}function he(n,e,t,r){return arguments.length===1?yr(n):new rn(n,e,t,r??1)}function rn(n,e,t,r){this.h=+n,this.s=+e,this.l=+t,this.opacity=+r}vn(rn,he,kn(J,{brighter(n){return n=n==null?Mn:Math.pow(Mn,n),new rn(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?un:Math.pow(un,n),new rn(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=isNaN(this.h)?0:(this.h+120)*ot,e=+this.l,t=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(n),i=Math.sin(n);return new S(255*(e+t*(yt*r+xe*i)),255*(e+t*(Me*r+Qn*i)),255*(e+t*(Sn*r)),this.opacity)}}));function xr(n,e,t,r,i){var u=n*n,a=u*n;return((1-3*n+3*u-a)*e+(4-6*u+3*a)*t+(1+3*n+3*u-3*a)*r+a*i)/6}function Mr(n){var e=n.length-1;return function(t){var r=t<=0?t=0:t>=1?(t=1,e-1):Math.floor(t*e),i=n[r],u=n[r+1],a=r>0?n[r-1]:2*i-u,o=r<e-1?n[r+2]:2*u-i;return xr((t-r/e)*e,a,i,u,o)}}var Vn=n=>()=>n;function xt(n,e){return function(t){return n+t*e}}function pr(n,e,t){return n=Math.pow(n,t),e=Math.pow(e,t)-n,t=1/t,function(r){return Math.pow(n+r*e,t)}}function Mt(n,e){var t=e-n;return t?xt(n,t>180||t<-180?t-360*Math.round(t/360):t):Vn(isNaN(n)?e:n)}function br(n){return(n=+n)==1?Q:function(e,t){return t-e?pr(e,t,n):Vn(isNaN(e)?t:e)}}function Q(n,e){var t=e-n;return t?xt(n,t):Vn(isNaN(n)?e:n)}var Pe=(function n(e){var t=br(e);function r(i,u){var a=t((i=Rn(i)).r,(u=Rn(u)).r),o=t(i.g,u.g),c=t(i.b,u.b),f=Q(i.opacity,u.opacity);return function(g){return i.r=a(g),i.g=o(g),i.b=c(g),i.opacity=f(g),i+""}}return r.gamma=n,r})(1);function wr(n){return function(e){var t=e.length,r=new Array(t),i=new Array(t),u=new Array(t),a,o;for(a=0;a<t;++a)o=Rn(e[a]),r[a]=o.r||0,i[a]=o.g||0,u[a]=o.b||0;return r=n(r),i=n(i),u=n(u),o.opacity=1,function(c){return o.r=r(c),o.g=i(c),o.b=u(c),o+""}}}var Uu=wr(Mr);function vr(n,e){e||(e=[]);var t=n?Math.min(e.length,n.length):0,r=e.slice(),i;return function(u){for(i=0;i<t;++i)r[i]=n[i]*(1-u)+e[i]*u;return r}}function Tr(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Cr(n,e){var t=e?e.length:0,r=n?Math.min(t,n.length):0,i=new Array(r),u=new Array(t),a;for(a=0;a<r;++a)i[a]=pe(n[a],e[a]);for(;a<t;++a)u[a]=e[a];return function(o){for(a=0;a<r;++a)u[a]=i[a](o);return u}}function Ur(n,e){var t=new Date;return n=+n,e=+e,function(r){return t.setTime(n*(1-r)+e*r),t}}function qn(n,e){return n=+n,e=+e,function(t){return n*(1-t)+e*t}}function Nr(n,e){var t={},r={},i;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in n?t[i]=pe(n[i],e[i]):r[i]=e[i];return function(u){for(i in t)r[i]=t[i](u);return r}}var ge=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,re=new RegExp(ge.source,"g");function Dr(n){return function(){return n}}function Sr(n){return function(e){return n(e)+""}}function kr(n,e){var t=ge.lastIndex=re.lastIndex=0,r,i,u,a=-1,o=[],c=[];for(n=n+"",e=e+"";(r=ge.exec(n))&&(i=re.exec(e));)(u=i.index)>t&&(u=e.slice(t,u),o[a]?o[a]+=u:o[++a]=u),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,c.push({i:a,x:qn(r,i)})),t=re.lastIndex;return t<e.length&&(u=e.slice(t),o[a]?o[a]+=u:o[++a]=u),o.length<2?c[0]?Sr(c[0].x):Dr(e):(e=c.length,function(f){for(var g=0,h;g<e;++g)o[(h=c[g]).i]=h.x(f);return o.join("")})}function pe(n,e){var t=typeof e,r;return e==null||t==="boolean"?Vn(e):(t==="number"?qn:t==="string"?(r=Dn(e))?(e=r,Pe):kr:e instanceof Dn?Pe:e instanceof Date?Ur:Tr(e)?vr:Array.isArray(e)?Cr:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Nr:qn)(n,e)}function $r(n,e){return n=+n,e=+e,function(t){return Math.round(n*(1-t)+e*t)}}var Fr=1e-12;function qe(n){return((n=Math.exp(n))+1/n)/2}function Hr(n){return((n=Math.exp(n))-1/n)/2}function Yr(n){return((n=Math.exp(2*n))-1)/(n+1)}(function n(e,t,r){function i(u,a){var o=u[0],c=u[1],f=u[2],g=a[0],h=a[1],l=a[2],b=g-o,w=h-c,T=b*b+w*w,N,F;if(T<Fr)F=Math.log(l/f)/e,N=function(C){return[o+C*b,c+C*w,f*Math.exp(e*C*F)]};else{var R=Math.sqrt(T),$=(l*l-f*f+r*T)/(2*f*t*R),U=(l*l-f*f-r*T)/(2*l*t*R),W=Math.log(Math.sqrt($*$+1)-$),d=Math.log(Math.sqrt(U*U+1)-U);F=(d-W)/e,N=function(C){var j=C*F,K=qe(W),cn=f/(t*R)*(K*Yr(e*j+W)-Hr(W));return[o+cn*b,c+cn*w,f*K/qe(e*j+W)]}}return N.duration=Math.abs(F)*1e3*e/Math.SQRT2,N}return i.rho=function(u){var a=Math.max(.001,+u),o=a*a,c=o*o;return n(a,o,c)},i})(Math.SQRT2,2,4);function Ar(n){return function(e,t){var r=n((e=le(e)).h,(t=le(t)).h),i=Q(e.c,t.c),u=Q(e.l,t.l),a=Q(e.opacity,t.opacity);return function(o){return e.h=r(o),e.c=i(o),e.l=u(o),e.opacity=a(o),e+""}}}var Nu=Ar(Mt);function pt(n){return(function e(t){t=+t;function r(i,u){var a=n((i=he(i)).h,(u=he(u)).h),o=Q(i.s,u.s),c=Q(i.l,u.l),f=Q(i.opacity,u.opacity);return function(g){return i.h=a(g),i.s=o(g),i.l=c(Math.pow(g,t)),i.opacity=f(g),i+""}}return r.gamma=e,r})(1)}pt(Mt);var Du=pt(Q);function Lr(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function zn(n,e){if(!isFinite(n)||n===0)return null;var t=(n=e?n.toExponential(e-1):n.toExponential()).indexOf("e"),r=n.slice(0,t);return[r.length>1?r[0]+r.slice(2):r,+n.slice(t+1)]}function pn(n){return n=zn(Math.abs(n)),n?n[1]:NaN}function Wr(n,e){return function(t,r){for(var i=t.length,u=[],a=0,o=n[0],c=0;i>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),u.push(t.substring(i-=o,i+o)),!((c+=o+1)>r));)o=n[a=(a+1)%n.length];return u.reverse().join(e)}}function Ir(n){return function(e){return e.replace(/[0-9]/g,function(t){return n[+t]})}}var Rr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function jn(n){if(!(e=Rr.exec(n)))throw new Error("invalid format: "+n);var e;return new be({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}jn.prototype=be.prototype;function be(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}be.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Or(n){n:for(var e=n.length,t=1,r=-1,i;t<e;++t)switch(n[t]){case".":r=i=t;break;case"0":r===0&&(r=t),i=t;break;default:if(!+n[t])break n;r>0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var _n;function Pr(n,e){var t=zn(n,e);if(!t)return _n=void 0,n.toPrecision(e);var r=t[0],i=t[1],u=i-(_n=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return u===a?r:u>a?r+new Array(u-a+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+zn(n,Math.max(0,e+u-1))[0]}function ze(n,e){var t=zn(n,e);if(!t)return n+"";var r=t[0],i=t[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var je={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Lr,e:(n,e)=>n.toExponential(e),f:(n,e)=>n.toFixed(e),g:(n,e)=>n.toPrecision(e),o:n=>Math.round(n).toString(8),p:(n,e)=>ze(n*100,e),r:ze,s:Pr,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function _e(n){return n}var Ee=Array.prototype.map,Ze=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qr(n){var e=n.grouping===void 0||n.thousands===void 0?_e:Wr(Ee.call(n.grouping,Number),n.thousands+""),t=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",u=n.numerals===void 0?_e:Ir(Ee.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",o=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function f(h,l){h=jn(h);var b=h.fill,w=h.align,T=h.sign,N=h.symbol,F=h.zero,R=h.width,$=h.comma,U=h.precision,W=h.trim,d=h.type;d==="n"?($=!0,d="g"):je[d]||(U===void 0&&(U=12),W=!0,d="g"),(F||b==="0"&&w==="=")&&(F=!0,b="0",w="=");var C=(l&&l.prefix!==void 0?l.prefix:"")+(N==="$"?t:N==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():""),j=(N==="$"?r:/[%p]/.test(d)?a:"")+(l&&l.suffix!==void 0?l.suffix:""),K=je[d],cn=/[defgprs%]/.test(d);U=U===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,U)):Math.max(0,Math.min(20,U));function Fn(x){var _=C,H=j,G,Hn,sn;if(d==="c")H=K(x)+H,x="";else{x=+x;var ln=x<0||1/x<0;if(x=isNaN(x)?c:K(Math.abs(x),U),W&&(x=Or(x)),ln&&+x==0&&T!=="+"&&(ln=!1),_=(ln?T==="("?T:o:T==="-"||T==="("?"":T)+_,H=(d==="s"&&!isNaN(x)&&_n!==void 0?Ze[8+_n/3]:"")+H+(ln&&T==="("?")":""),cn){for(G=-1,Hn=x.length;++G<Hn;)if(sn=x.charCodeAt(G),48>sn||sn>57){H=(sn===46?i+x.slice(G+1):x.slice(G))+H,x=x.slice(0,G);break}}}$&&!F&&(x=e(x,1/0));var hn=_.length+x.length+H.length,O=hn<R?new Array(R-hn+1).join(b):"";switch($&&F&&(x=e(O+x,O.length?R-H.length:1/0),O=""),w){case"<":x=_+x+H+O;break;case"=":x=_+O+x+H;break;case"^":x=O.slice(0,hn=O.length>>1)+_+x+H+O.slice(hn);break;default:x=O+_+x+H;break}return u(x)}return Fn.toString=function(){return h+""},Fn}function g(h,l){var b=Math.max(-8,Math.min(8,Math.floor(pn(l)/3)))*3,w=Math.pow(10,-b),T=f((h=jn(h),h.type="f",h),{suffix:Ze[8+b/3]});return function(N){return T(w*N)}}return{format:f,formatPrefix:g}}var Ln,bt,wt;zr({thousands:",",grouping:[3],currency:["$",""]});function zr(n){return Ln=qr(n),bt=Ln.format,wt=Ln.formatPrefix,Ln}function jr(n){return Math.max(0,-pn(Math.abs(n)))}function _r(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pn(e)/3)))*3-pn(Math.abs(n)))}function Er(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,pn(e)-pn(n))+1}const ie=new Date,ue=new Date;function D(n,e,t,r){function i(u){return n(u=arguments.length===0?new Date:new Date(+u)),u}return i.floor=u=>(n(u=new Date(+u)),u),i.ceil=u=>(n(u=new Date(u-1)),e(u,1),n(u),u),i.round=u=>{const a=i(u),o=i.ceil(u);return u-a<o-u?a:o},i.offset=(u,a)=>(e(u=new Date(+u),a==null?1:Math.floor(a)),u),i.range=(u,a,o)=>{const c=[];if(u=i.ceil(u),o=o==null?1:Math.floor(o),!(u<a)||!(o>0))return c;let f;do c.push(f=new Date(+u)),e(u,o),n(u);while(f<u&&u<a);return c},i.filter=u=>D(a=>{if(a>=a)for(;n(a),!u(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;e(a,-1),!u(a););else for(;--o>=0;)for(;e(a,1),!u(a););}),t&&(i.count=(u,a)=>(ie.setTime(+u),ue.setTime(+a),n(ie),n(ue),Math.floor(t(ie,ue))),i.every=u=>(u=Math.floor(u),!isFinite(u)||!(u>0)?null:u>1?i.filter(r?a=>r(a)%u===0:a=>i.count(0,a)%u===0):i)),i}const En=D(()=>{},(n,e)=>{n.setTime(+n+e)},(n,e)=>e-n);En.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?D(e=>{e.setTime(Math.floor(e/n)*n)},(e,t)=>{e.setTime(+e+t*n)},(e,t)=>(t-e)/n):En);En.range;const Z=1e3,I=Z*60,B=I*60,V=B*24,we=V*7,Be=V*30,ae=V*365,mn=D(n=>{n.setTime(n-n.getMilliseconds())},(n,e)=>{n.setTime(+n+e*Z)},(n,e)=>(e-n)/Z,n=>n.getUTCSeconds());mn.range;const ve=D(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*Z)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getMinutes());ve.range;const Zr=D(n=>{n.setUTCSeconds(0,0)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getUTCMinutes());Zr.range;const Te=D(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*Z-n.getMinutes()*I)},(n,e)=>{n.setTime(+n+e*B)},(n,e)=>(e-n)/B,n=>n.getHours());Te.range;const Br=D(n=>{n.setUTCMinutes(0,0,0)},(n,e)=>{n.setTime(+n+e*B)},(n,e)=>(e-n)/B,n=>n.getUTCHours());Br.range;const $n=D(n=>n.setHours(0,0,0,0),(n,e)=>n.setDate(n.getDate()+e),(n,e)=>(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*I)/V,n=>n.getDate()-1);$n.range;const Ce=D(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/V,n=>n.getUTCDate()-1);Ce.range;const Qr=D(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/V,n=>Math.floor(n/V));Qr.range;function on(n){return D(e=>{e.setDate(e.getDate()-(e.getDay()+7-n)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/we)}const Xn=on(0),Zn=on(1),Vr=on(2),Xr=on(3),bn=on(4),Gr=on(5),Jr=on(6);Xn.range;Zn.range;Vr.range;Xr.range;bn.range;Gr.range;Jr.range;function fn(n){return D(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-n)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/we)}const vt=fn(0),Bn=fn(1),Kr=fn(2),ni=fn(3),wn=fn(4),ei=fn(5),ti=fn(6);vt.range;Bn.range;Kr.range;ni.range;wn.range;ei.range;ti.range;const Ue=D(n=>{n.setDate(1),n.setHours(0,0,0,0)},(n,e)=>{n.setMonth(n.getMonth()+e)},(n,e)=>e.getMonth()-n.getMonth()+(e.getFullYear()-n.getFullYear())*12,n=>n.getMonth());Ue.range;const ri=D(n=>{n.setUTCDate(1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCMonth(n.getUTCMonth()+e)},(n,e)=>e.getUTCMonth()-n.getUTCMonth()+(e.getUTCFullYear()-n.getUTCFullYear())*12,n=>n.getUTCMonth());ri.range;const X=D(n=>{n.setMonth(0,1),n.setHours(0,0,0,0)},(n,e)=>{n.setFullYear(n.getFullYear()+e)},(n,e)=>e.getFullYear()-n.getFullYear(),n=>n.getFullYear());X.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:D(e=>{e.setFullYear(Math.floor(e.getFullYear()/n)*n),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*n)});X.range;const an=D(n=>{n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e)},(n,e)=>e.getUTCFullYear()-n.getUTCFullYear(),n=>n.getUTCFullYear());an.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:D(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/n)*n),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*n)});an.range;function ii(n,e,t,r,i,u){const a=[[mn,1,Z],[mn,5,5*Z],[mn,15,15*Z],[mn,30,30*Z],[u,1,I],[u,5,5*I],[u,15,15*I],[u,30,30*I],[i,1,B],[i,3,3*B],[i,6,6*B],[i,12,12*B],[r,1,V],[r,2,2*V],[t,1,we],[e,1,Be],[e,3,3*Be],[n,1,ae]];function o(f,g,h){const l=g<f;l&&([f,g]=[g,f]);const b=h&&typeof h.range=="function"?h:c(f,g,h),w=b?b.range(f,+g+1):[];return l?w.reverse():w}function c(f,g,h){const l=Math.abs(g-f)/h,b=de(([,,N])=>N).right(a,l);if(b===a.length)return n.every(se(f/ae,g/ae,h));if(b===0)return En.every(Math.max(se(f,g,h),1));const[w,T]=a[l/a[b-1][2]<a[b][2]/l?b-1:b];return w.every(T)}return[o,c]}const[ui,ai]=ii(X,Ue,Xn,$n,Te,ve);function oe(n){if(0<=n.y&&n.y<100){var e=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return e.setFullYear(n.y),e}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function fe(n){if(0<=n.y&&n.y<100){var e=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function Tn(n,e,t){return{y:n,m:e,d:t,H:0,M:0,S:0,L:0}}function oi(n){var e=n.dateTime,t=n.date,r=n.time,i=n.periods,u=n.days,a=n.shortDays,o=n.months,c=n.shortMonths,f=Cn(i),g=Un(i),h=Cn(u),l=Un(u),b=Cn(a),w=Un(a),T=Cn(o),N=Un(o),F=Cn(c),R=Un(c),$={a:sn,A:ln,b:hn,B:O,c:null,d:Ke,e:Ke,f:$i,g:Pi,G:zi,H:Di,I:Si,j:ki,L:Tt,m:Fi,M:Hi,p:Lt,q:Wt,Q:tt,s:rt,S:Yi,u:Ai,U:Li,V:Wi,w:Ii,W:Ri,x:null,X:null,y:Oi,Y:qi,Z:ji,"%":et},U={a:It,A:Rt,b:Ot,B:Pt,c:null,d:nt,e:nt,f:Bi,g:ru,G:uu,H:_i,I:Ei,j:Zi,L:Ut,m:Qi,M:Vi,p:qt,q:zt,Q:tt,s:rt,S:Xi,u:Gi,U:Ji,V:Ki,w:nu,W:eu,x:null,X:null,y:tu,Y:iu,Z:au,"%":et},W={a:cn,A:Fn,b:x,B:_,c:H,d:Ge,e:Ge,f:Ti,g:Xe,G:Ve,H:Je,I:Je,j:pi,L:vi,m:Mi,M:bi,p:K,q:xi,Q:Ui,s:Ni,S:wi,u:hi,U:gi,V:mi,w:li,W:di,x:G,X:Hn,y:Xe,Y:Ve,Z:yi,"%":Ci};$.x=d(t,$),$.X=d(r,$),$.c=d(e,$),U.x=d(t,U),U.X=d(r,U),U.c=d(e,U);function d(m,y){return function(M){var s=[],Y=-1,v=0,A=m.length,L,nn,Ne;for(M instanceof Date||(M=new Date(+M));++Y<A;)m.charCodeAt(Y)===37&&(s.push(m.slice(v,Y)),(nn=Qe[L=m.charAt(++Y)])!=null?L=m.charAt(++Y):nn=L==="e"?" ":"0",(Ne=y[L])&&(L=Ne(M,nn)),s.push(L),v=Y+1);return s.push(m.slice(v,Y)),s.join("")}}function C(m,y){return function(M){var s=Tn(1900,void 0,1),Y=j(s,m,M+="",0),v,A;if(Y!=M.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(s.s*1e3+("L"in s?s.L:0));if(y&&!("Z"in s)&&(s.Z=0),"p"in s&&(s.H=s.H%12+s.p*12),s.m===void 0&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(v=fe(Tn(s.y,0,1)),A=v.getUTCDay(),v=A>4||A===0?Bn.ceil(v):Bn(v),v=Ce.offset(v,(s.V-1)*7),s.y=v.getUTCFullYear(),s.m=v.getUTCMonth(),s.d=v.getUTCDate()+(s.w+6)%7):(v=oe(Tn(s.y,0,1)),A=v.getDay(),v=A>4||A===0?Zn.ceil(v):Zn(v),v=$n.offset(v,(s.V-1)*7),s.y=v.getFullYear(),s.m=v.getMonth(),s.d=v.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),A="Z"in s?fe(Tn(s.y,0,1)).getUTCDay():oe(Tn(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+s.W*7-(A+5)%7:s.w+s.U*7-(A+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,fe(s)):oe(s)}}function j(m,y,M,s){for(var Y=0,v=y.length,A=M.length,L,nn;Y<v;){if(s>=A)return-1;if(L=y.charCodeAt(Y++),L===37){if(L=y.charAt(Y++),nn=W[L in Qe?y.charAt(Y++):L],!nn||(s=nn(m,M,s))<0)return-1}else if(L!=M.charCodeAt(s++))return-1}return s}function K(m,y,M){var s=f.exec(y.slice(M));return s?(m.p=g.get(s[0].toLowerCase()),M+s[0].length):-1}function cn(m,y,M){var s=b.exec(y.slice(M));return s?(m.w=w.get(s[0].toLowerCase()),M+s[0].length):-1}function Fn(m,y,M){var s=h.exec(y.slice(M));return s?(m.w=l.get(s[0].toLowerCase()),M+s[0].length):-1}function x(m,y,M){var s=F.exec(y.slice(M));return s?(m.m=R.get(s[0].toLowerCase()),M+s[0].length):-1}function _(m,y,M){var s=T.exec(y.slice(M));return s?(m.m=N.get(s[0].toLowerCase()),M+s[0].length):-1}function H(m,y,M){return j(m,e,y,M)}function G(m,y,M){return j(m,t,y,M)}function Hn(m,y,M){return j(m,r,y,M)}function sn(m){return a[m.getDay()]}function ln(m){return u[m.getDay()]}function hn(m){return c[m.getMonth()]}function O(m){return o[m.getMonth()]}function Lt(m){return i[+(m.getHours()>=12)]}function Wt(m){return 1+~~(m.getMonth()/3)}function It(m){return a[m.getUTCDay()]}function Rt(m){return u[m.getUTCDay()]}function Ot(m){return c[m.getUTCMonth()]}function Pt(m){return o[m.getUTCMonth()]}function qt(m){return i[+(m.getUTCHours()>=12)]}function zt(m){return 1+~~(m.getUTCMonth()/3)}return{format:function(m){var y=d(m+="",$);return y.toString=function(){return m},y},parse:function(m){var y=C(m+="",!1);return y.toString=function(){return m},y},utcFormat:function(m){var y=d(m+="",U);return y.toString=function(){return m},y},utcParse:function(m){var y=C(m+="",!0);return y.toString=function(){return m},y}}}var Qe={"-":"",_:" ",0:"0"},k=/^\s*\d+/,fi=/^%/,ci=/[\\^$*+?|[\]().{}]/g;function p(n,e,t){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u<t?new Array(t-u+1).join(e)+i:i)}function si(n){return n.replace(ci,"\\$&")}function Cn(n){return new RegExp("^(?:"+n.map(si).join("|")+")","i")}function Un(n){return new Map(n.map((e,t)=>[e.toLowerCase(),t]))}function li(n,e,t){var r=k.exec(e.slice(t,t+1));return r?(n.w=+r[0],t+r[0].length):-1}function hi(n,e,t){var r=k.exec(e.slice(t,t+1));return r?(n.u=+r[0],t+r[0].length):-1}function gi(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.U=+r[0],t+r[0].length):-1}function mi(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.V=+r[0],t+r[0].length):-1}function di(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.W=+r[0],t+r[0].length):-1}function Ve(n,e,t){var r=k.exec(e.slice(t,t+4));return r?(n.y=+r[0],t+r[0].length):-1}function Xe(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.y=+r[0]+(+r[0]>68?1900:2e3),t+r[0].length):-1}function yi(n,e,t){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t,t+6));return r?(n.Z=r[1]?0:-(r[2]+(r[3]||"00")),t+r[0].length):-1}function xi(n,e,t){var r=k.exec(e.slice(t,t+1));return r?(n.q=r[0]*3-3,t+r[0].length):-1}function Mi(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.m=r[0]-1,t+r[0].length):-1}function Ge(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.d=+r[0],t+r[0].length):-1}function pi(n,e,t){var r=k.exec(e.slice(t,t+3));return r?(n.m=0,n.d=+r[0],t+r[0].length):-1}function Je(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.H=+r[0],t+r[0].length):-1}function bi(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.M=+r[0],t+r[0].length):-1}function wi(n,e,t){var r=k.exec(e.slice(t,t+2));return r?(n.S=+r[0],t+r[0].length):-1}function vi(n,e,t){var r=k.exec(e.slice(t,t+3));return r?(n.L=+r[0],t+r[0].length):-1}function Ti(n,e,t){var r=k.exec(e.slice(t,t+6));return r?(n.L=Math.floor(r[0]/1e3),t+r[0].length):-1}function Ci(n,e,t){var r=fi.exec(e.slice(t,t+1));return r?t+r[0].length:-1}function Ui(n,e,t){var r=k.exec(e.slice(t));return r?(n.Q=+r[0],t+r[0].length):-1}function Ni(n,e,t){var r=k.exec(e.slice(t));return r?(n.s=+r[0],t+r[0].length):-1}function Ke(n,e){return p(n.getDate(),e,2)}function Di(n,e){return p(n.getHours(),e,2)}function Si(n,e){return p(n.getHours()%12||12,e,2)}function ki(n,e){return p(1+$n.count(X(n),n),e,3)}function Tt(n,e){return p(n.getMilliseconds(),e,3)}function $i(n,e){return Tt(n,e)+"000"}function Fi(n,e){return p(n.getMonth()+1,e,2)}function Hi(n,e){return p(n.getMinutes(),e,2)}function Yi(n,e){return p(n.getSeconds(),e,2)}function Ai(n){var e=n.getDay();return e===0?7:e}function Li(n,e){return p(Xn.count(X(n)-1,n),e,2)}function Ct(n){var e=n.getDay();return e>=4||e===0?bn(n):bn.ceil(n)}function Wi(n,e){return n=Ct(n),p(bn.count(X(n),n)+(X(n).getDay()===4),e,2)}function Ii(n){return n.getDay()}function Ri(n,e){return p(Zn.count(X(n)-1,n),e,2)}function Oi(n,e){return p(n.getFullYear()%100,e,2)}function Pi(n,e){return n=Ct(n),p(n.getFullYear()%100,e,2)}function qi(n,e){return p(n.getFullYear()%1e4,e,4)}function zi(n,e){var t=n.getDay();return n=t>=4||t===0?bn(n):bn.ceil(n),p(n.getFullYear()%1e4,e,4)}function ji(n){var e=n.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+p(e/60|0,"0",2)+p(e%60,"0",2)}function nt(n,e){return p(n.getUTCDate(),e,2)}function _i(n,e){return p(n.getUTCHours(),e,2)}function Ei(n,e){return p(n.getUTCHours()%12||12,e,2)}function Zi(n,e){return p(1+Ce.count(an(n),n),e,3)}function Ut(n,e){return p(n.getUTCMilliseconds(),e,3)}function Bi(n,e){return Ut(n,e)+"000"}function Qi(n,e){return p(n.getUTCMonth()+1,e,2)}function Vi(n,e){return p(n.getUTCMinutes(),e,2)}function Xi(n,e){return p(n.getUTCSeconds(),e,2)}function Gi(n){var e=n.getUTCDay();return e===0?7:e}function Ji(n,e){return p(vt.count(an(n)-1,n),e,2)}function Nt(n){var e=n.getUTCDay();return e>=4||e===0?wn(n):wn.ceil(n)}function Ki(n,e){return n=Nt(n),p(wn.count(an(n),n)+(an(n).getUTCDay()===4),e,2)}function nu(n){return n.getUTCDay()}function eu(n,e){return p(Bn.count(an(n)-1,n),e,2)}function tu(n,e){return p(n.getUTCFullYear()%100,e,2)}function ru(n,e){return n=Nt(n),p(n.getUTCFullYear()%100,e,2)}function iu(n,e){return p(n.getUTCFullYear()%1e4,e,4)}function uu(n,e){var t=n.getUTCDay();return n=t>=4||t===0?wn(n):wn.ceil(n),p(n.getUTCFullYear()%1e4,e,4)}function au(){return"+0000"}function et(){return"%"}function tt(n){return+n}function rt(n){return Math.floor(+n/1e3)}var gn,Dt,St,kt;ou({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ou(n){return gn=oi(n),Dt=gn.format,gn.parse,St=gn.utcFormat,kt=gn.utcParse,gn}var $t="%Y-%m-%dT%H:%M:%S.%LZ";function fu(n){return n.toISOString()}Date.prototype.toISOString||St($t);function cu(n){var e=new Date(n);return isNaN(e)?null:e}+new Date("2000-01-01T00:00:00.000Z")||kt($t);function Gn(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}const it=Symbol("implicit");function Ft(){var n=new De,e=[],t=[],r=it;function i(u){let a=n.get(u);if(a===void 0){if(r!==it)return r;n.set(u,a=e.push(u)-1)}return t[a%t.length]}return i.domain=function(u){if(!arguments.length)return e.slice();e=[],n=new De;for(const a of u)n.has(a)||n.set(a,e.push(a)-1);return i},i.range=function(u){return arguments.length?(t=Array.from(u),i):t.slice()},i.unknown=function(u){return arguments.length?(r=u,i):r},i.copy=function(){return Ft(e,t).unknown(r)},Gn.apply(i,arguments),i}function su(){var n=Ft().unknown(void 0),e=n.domain,t=n.range,r=0,i=1,u,a,o=!1,c=0,f=0,g=.5;delete n.unknown;function h(){var l=e().length,b=i<r,w=b?i:r,T=b?r:i;u=(T-w)/Math.max(1,l-c+f*2),o&&(u=Math.floor(u)),w+=(T-w-u*(l-c))*g,a=u*(1-c),o&&(w=Math.round(w),a=Math.round(a));var N=er(l).map(function(F){return w+u*F});return t(b?N.reverse():N)}return n.domain=function(l){return arguments.length?(e(l),h()):e()},n.range=function(l){return arguments.length?([r,i]=l,r=+r,i=+i,h()):[r,i]},n.rangeRound=function(l){return[r,i]=l,r=+r,i=+i,o=!0,h()},n.bandwidth=function(){return a},n.step=function(){return u},n.round=function(l){return arguments.length?(o=!!l,h()):o},n.padding=function(l){return arguments.length?(c=Math.min(1,f=+l),h()):c},n.paddingInner=function(l){return arguments.length?(c=Math.min(1,l),h()):c},n.paddingOuter=function(l){return arguments.length?(f=+l,h()):f},n.align=function(l){return arguments.length?(g=Math.max(0,Math.min(1,l)),h()):g},n.copy=function(){return su(e(),[r,i]).round(o).paddingInner(c).paddingOuter(f).align(g)},Gn.apply(h(),arguments)}function lu(n){return function(){return n}}function hu(n){return+n}var ut=[0,1];function dn(n){return n}function me(n,e){return(e-=n=+n)?function(t){return(t-n)/e}:lu(isNaN(e)?NaN:.5)}function gu(n,e){var t;return n>e&&(t=n,n=e,e=t),function(r){return Math.max(n,Math.min(e,r))}}function mu(n,e,t){var r=n[0],i=n[1],u=e[0],a=e[1];return i<r?(r=me(i,r),u=t(a,u)):(r=me(r,i),u=t(u,a)),function(o){return u(r(o))}}function du(n,e,t){var r=Math.min(n.length,e.length)-1,i=new Array(r),u=new Array(r),a=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=me(n[a],n[a+1]),u[a]=t(e[a],e[a+1]);return function(o){var c=Bt(n,o,1,r)-1;return u[c](i[c](o))}}function Ht(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function yu(){var n=ut,e=ut,t=pe,r,i,u,a=dn,o,c,f;function g(){var l=Math.min(n.length,e.length);return a!==dn&&(a=gu(n[0],n[l-1])),o=l>2?du:mu,c=f=null,h}function h(l){return l==null||isNaN(l=+l)?u:(c||(c=o(n.map(r),e,t)))(r(a(l)))}return h.invert=function(l){return a(i((f||(f=o(e,n.map(r),qn)))(l)))},h.domain=function(l){return arguments.length?(n=Array.from(l,hu),g()):n.slice()},h.range=function(l){return arguments.length?(e=Array.from(l),g()):e.slice()},h.rangeRound=function(l){return e=Array.from(l),t=$r,g()},h.clamp=function(l){return arguments.length?(a=l?!0:dn,g()):a!==dn},h.interpolate=function(l){return arguments.length?(t=l,g()):t},h.unknown=function(l){return arguments.length?(u=l,h):u},function(l,b){return r=l,i=b,g()}}function Yt(){return yu()(dn,dn)}function xu(n,e,t,r){var i=se(n,e,t),u;switch(r=jn(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(e));return r.precision==null&&!isNaN(u=_r(i,a))&&(r.precision=u),wt(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(u=Er(i,Math.max(Math.abs(n),Math.abs(e))))&&(r.precision=u-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(u=jr(i))&&(r.precision=u-(r.type==="%")*2);break}}return bt(r)}function Mu(n){var e=n.domain;return n.ticks=function(t){var r=e();return nr(r[0],r[r.length-1],t??10)},n.tickFormat=function(t,r){var i=e();return xu(i[0],i[i.length-1],t??10,r)},n.nice=function(t){t==null&&(t=10);var r=e(),i=0,u=r.length-1,a=r[i],o=r[u],c,f,g=10;for(o<a&&(f=a,a=o,o=f,f=i,i=u,u=f);g-- >0;){if(f=ce(a,o,t),f===c)return r[i]=a,r[u]=o,e(r);if(f>0)a=Math.floor(a/f)*f,o=Math.ceil(o/f)*f;else if(f<0)a=Math.ceil(a*f)/f,o=Math.floor(o*f)/f;else break;c=f}return n},n}function pu(){var n=Yt();return n.copy=function(){return Ht(n,pu())},Gn.apply(n,arguments),Mu(n)}function bu(n,e){n=n.slice();var t=0,r=n.length-1,i=n[t],u=n[r],a;return u<i&&(a=t,t=r,r=a,a=i,i=u,u=a),n[t]=e.floor(i),n[r]=e.ceil(u),n}function wu(n){return new Date(n)}function vu(n){return n instanceof Date?+n:Math.round(n)}function At(n,e,t,r,i,u,a,o,c,f){var g=Yt(),h=g.invert,l=g.domain,b=f(".%L"),w=f(":%S"),T=f("%I:%M"),N=f("%I %p"),F=f("%a %d"),R=f("%b %d"),$=f("%B"),U=f("%Y");function W(d){return(c(d)<d?b:o(d)<d?w:a(d)<d?T:u(d)<d?N:r(d)<d?i(d)<d?F:R:t(d)<d?$:U)(d)}return g.invert=function(d){return new Date(Math.round(h(d)))},g.domain=function(d){return arguments.length?l(Array.from(d,vu)):l().map(wu)},g.ticks=function(d){var C=l();return n(C[0],C[C.length-1],d??10)},g.tickFormat=function(d,C){return C==null?W:f(C)},g.nice=function(d){var C=l();return(!d||typeof d.range!="function")&&(d=e(C[0],C[C.length-1],d??10)),d?l(bu(C,d)):g},g.copy=function(){return Ht(g,At(n,e,t,r,i,u,a,o,c,f))},g}function Su(){return Gn.apply(At(ui,ai,X,Ue,Xn,$n,Te,ve,mn,Dt).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{Tu as a,su as b,Dt as c,Ue as d,Xn as e,bt as f,Jr as g,Nu as h,Gr as i,bn as j,Xr as k,pu as l,Cu as m,Vr as n,Ft as o,Zn as p,$n as q,Te as r,ve as s,Su as t,mn as u,En as v,Du as w,he as x,Rn as y,Uu as z};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{s as ce,a as Wn,c as qn,b as Hn,f as Te,e as T,i as zn}from"./chunk-KQLB2F66-D_kpUTKA.js";import{_ as x,c as Jn,l as m,b8 as Kn,b9 as Zn,as as Qn,ar as Se,ae as Ce,ac as er,ao as nr,aZ as rr}from"./MermaidDiagram-Dma3Cwvn.js";import{i as U,a as O,d as Ie,e as H,b as z,c as tn,f as le,g as an,h as tr,j as on,s as ar,o as ir,k as or,l as he,m as sr,r as dr,U as Re,S as ke,n as pe,p as ge,q as V,t as sn,u as dn,v as ur,w as I,x as fr,y as cr,z as lr,A as _e,B as hr,C as un,D as _,E as pr,F as gr,H as vr,I as X,J as fn,K as cn,L as br,M as ve,N as ln,O as wr,P as hn,Q as mr,R as yr,G as N,T as l,V as xr,W as L,X as $,Y as R,Z as J}from"./graph-D8UmR1vK.js";import"./index-CqcyU6rA.js";import"./PageMarkdown-C-gI_dXg.js";var Er=/\s/;function Lr(e){for(var n=e.length;n--&&Er.test(e.charAt(n)););return n}var Or=/^\s+/;function Nr(e){return e&&e.slice(0,Lr(e)+1).replace(Or,"")}var Me=NaN,Pr=/^[-+]0x[0-9a-f]+$/i,Tr=/^0b[01]+$/i,Sr=/^0o[0-7]+$/i,Cr=parseInt;function Ir(e){if(typeof e=="number")return e;if(U(e))return Me;if(O(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=O(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Nr(e);var r=Tr.test(e);return r||Sr.test(e)?Cr(e.slice(2),r?2:8):Pr.test(e)?Me:+e}var Ae=1/0,Rr=17976931348623157e292;function G(e){if(!e)return e===0?e:0;if(e=Ir(e),e===Ae||e===-Ae){var n=e<0?-1:1;return n*Rr}return e===e?e:0}function kr(e){var n=G(e),r=n%1;return n===n?r?n-r:n:0}var je=Object.create,_r=(function(){function e(){}return function(n){if(!O(n))return{};if(je)return je(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}})();function Mr(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n}function K(e,n,r){n=="__proto__"&&Ie?Ie(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}var Ar=Object.prototype,jr=Ar.hasOwnProperty;function Z(e,n,r){var t=e[n];(!(jr.call(e,n)&&H(t,r))||r===void 0&&!(n in e))&&K(e,n,r)}function Dr(e,n,r,t){var a=!r;r||(r={});for(var o=-1,i=n.length;++o<i;){var s=n[o],d=void 0;d===void 0&&(d=e[s]),a?K(r,s,d):Z(r,s,d)}return r}function j(e,n,r){if(!O(r))return!1;var t=typeof n;return(t=="number"?z(r)&&tn(n,r.length):t=="string"&&n in r)?H(r[n],e):!1}function Br(e){return le(function(n,r){var t=-1,a=r.length,o=a>1?r[a-1]:void 0,i=a>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(a--,o):void 0,i&&j(r[0],r[1],i)&&(o=a<3?void 0:o,a=1),n=Object(n);++t<a;){var s=r[t];s&&e(n,s,t,o)}return n})}function $r(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var Fr=Object.prototype,Xr=Fr.hasOwnProperty;function Gr(e){if(!O(e))return $r(e);var n=an(e),r=[];for(var t in e)t=="constructor"&&(n||!Xr.call(e,t))||r.push(t);return r}function Q(e){return z(e)?tr(e,!0):Gr(e)}function M(e){var n=e==null?0:e.length;return n?on(e):[]}function Yr(e){return ar(ir(e,void 0,M),e+"")}var pn=or(Object.getPrototypeOf,Object),Ur="[object Object]",Vr=Function.prototype,Wr=Object.prototype,gn=Vr.toString,qr=Wr.hasOwnProperty,Hr=gn.call(Object);function zr(e){if(!he(e)||sr(e)!=Ur)return!1;var n=pn(e);if(n===null)return!0;var r=qr.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&gn.call(r)==Hr}var vn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,De=vn&&typeof module=="object"&&module&&!module.nodeType&&module,Jr=De&&De.exports===vn,Be=Jr?dr.Buffer:void 0,$e=Be?Be.allocUnsafe:void 0;function bn(e,n){if(n)return e.slice();var r=e.length,t=$e?$e(r):new e.constructor(r);return e.copy(t),t}var Kr=Object.prototype,Zr=Kr.hasOwnProperty;function Qr(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Zr.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function be(e){var n=new e.constructor(e.byteLength);return new Re(n).set(new Re(e)),n}function et(e,n){var r=be(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var nt=/\w*$/;function rt(e){var n=new e.constructor(e.source,nt.exec(e));return n.lastIndex=e.lastIndex,n}var Fe=ke?ke.prototype:void 0,Xe=Fe?Fe.valueOf:void 0;function tt(e){return Xe?Object(Xe.call(e)):{}}function wn(e,n){var r=n?be(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var at="[object Boolean]",it="[object Date]",ot="[object Map]",st="[object Number]",dt="[object RegExp]",ut="[object Set]",ft="[object String]",ct="[object Symbol]",lt="[object ArrayBuffer]",ht="[object DataView]",pt="[object Float32Array]",gt="[object Float64Array]",vt="[object Int8Array]",bt="[object Int16Array]",wt="[object Int32Array]",mt="[object Uint8Array]",yt="[object Uint8ClampedArray]",xt="[object Uint16Array]",Et="[object Uint32Array]";function Lt(e,n,r){var t=e.constructor;switch(n){case lt:return be(e);case at:case it:return new t(+e);case ht:return et(e);case pt:case gt:case vt:case bt:case wt:case mt:case yt:case xt:case Et:return wn(e,r);case ot:return new t;case st:case ft:return new t(e);case dt:return rt(e);case ut:return new t;case ct:return tt(e)}}function mn(e){return typeof e.constructor=="function"&&!an(e)?_r(pn(e)):{}}var Ot="[object Map]";function Nt(e){return he(e)&&pe(e)==Ot}var Ge=V&&V.isMap,Pt=Ge?ge(Ge):Nt,Tt="[object Set]";function St(e){return he(e)&&pe(e)==Tt}var Ye=V&&V.isSet,Ct=Ye?ge(Ye):St,It=1,yn="[object Arguments]",Rt="[object Array]",kt="[object Boolean]",_t="[object Date]",Mt="[object Error]",xn="[object Function]",At="[object GeneratorFunction]",jt="[object Map]",Dt="[object Number]",En="[object Object]",Bt="[object RegExp]",$t="[object Set]",Ft="[object String]",Xt="[object Symbol]",Gt="[object WeakMap]",Yt="[object ArrayBuffer]",Ut="[object DataView]",Vt="[object Float32Array]",Wt="[object Float64Array]",qt="[object Int8Array]",Ht="[object Int16Array]",zt="[object Int32Array]",Jt="[object Uint8Array]",Kt="[object Uint8ClampedArray]",Zt="[object Uint16Array]",Qt="[object Uint32Array]",y={};y[yn]=y[Rt]=y[Yt]=y[Ut]=y[kt]=y[_t]=y[Vt]=y[Wt]=y[qt]=y[Ht]=y[zt]=y[jt]=y[Dt]=y[En]=y[Bt]=y[$t]=y[Ft]=y[Xt]=y[Jt]=y[Kt]=y[Zt]=y[Qt]=!0;y[Mt]=y[xn]=y[Gt]=!1;function Y(e,n,r,t,a,o){var i,s=n&It;if(i!==void 0)return i;if(!O(e))return e;var d=I(e);if(d)i=Qr(e);else{var u=pe(e),f=u==xn||u==At;if(sn(e))return bn(e,s);if(u==En||u==yn||f&&!a)i=f?{}:mn(e);else{if(!y[u])return a?e:{};i=Lt(e,u,s)}}o||(o=new dn);var c=o.get(e);if(c)return c;o.set(e,i),Ct(e)?e.forEach(function(p){i.add(Y(p,n,r,p,e,o))}):Pt(e)&&e.forEach(function(p,g){i.set(g,Y(p,n,r,g,e,o))});var h=fr,v=d?void 0:h(e);return ur(v||e,function(p,g){v&&(g=p,p=e[g]),Z(i,g,Y(p,n,r,g,e,o))}),i}var ea=1,na=4;function ra(e){return Y(e,ea|na)}var Ln=Object.prototype,ta=Ln.hasOwnProperty,aa=le(function(e,n){e=Object(e);var r=-1,t=n.length,a=t>2?n[2]:void 0;for(a&&j(n[0],n[1],a)&&(t=1);++r<t;)for(var o=n[r],i=Q(o),s=-1,d=i.length;++s<d;){var u=i[s],f=e[u];(f===void 0||H(f,Ln[u])&&!ta.call(e,u))&&(e[u]=o[u])}return e});function se(e,n,r){(r!==void 0&&!H(e[n],r)||r===void 0&&!(n in e))&&K(e,n,r)}function de(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}function ia(e){return Dr(e,Q(e))}function oa(e,n,r,t,a,o,i){var s=de(e,r),d=de(n,r),u=i.get(d);if(u){se(e,r,u);return}var f=o?o(s,d,r+"",e,n,i):void 0,c=f===void 0;if(c){var h=I(d),v=!h&&sn(d),p=!h&&!v&&cr(d);f=d,h||v||p?I(s)?f=s:lr(s)?f=Mr(s):v?(c=!1,f=bn(d,!0)):p?(c=!1,f=wn(d,!0)):f=[]:zr(d)||_e(d)?(f=s,_e(s)?f=ia(s):(!O(s)||hr(s))&&(f=mn(d))):c=!1}c&&(i.set(d,f),a(f,d,t,o,i),i.delete(d)),se(e,r,f)}function On(e,n,r,t,a){e!==n&&un(n,function(o,i){if(a||(a=new dn),O(o))oa(e,n,i,r,On,t,a);else{var s=t?t(de(e,i),o,i+"",e,n,a):void 0;s===void 0&&(s=o),se(e,i,s)}},Q)}function W(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function sa(e){return function(n,r,t){var a=Object(n);if(!z(n)){var o=_(r);n=pr(n),r=function(s){return o(a[s],s,a)}}var i=e(n,r,t);return i>-1?a[o?n[i]:i]:void 0}}var da=Math.max;function ua(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var a=r==null?0:kr(r);return a<0&&(a=da(t+a,0)),gr(e,_(n),a)}var we=sa(ua);function Nn(e,n){var r=-1,t=z(e)?Array(e.length):[];return vr(e,function(a,o,i){t[++r]=n(a,o,i)}),t}function E(e,n){var r=I(e)?X:Nn;return r(e,_(n))}function fa(e,n){return e==null?e:un(e,fn(n),Q)}function ca(e,n){return e&&cn(e,fn(n))}function la(e,n){return e>n}var ha=Object.prototype,pa=ha.hasOwnProperty;function ga(e,n){return e!=null&&pa.call(e,n)}function Pn(e,n){return e!=null&&br(e,n,ga)}function Tn(e,n){return e<n}function ee(e,n){var r={};return n=_(n),cn(e,function(t,a,o){K(r,a,n(t,a,o))}),r}function me(e,n,r){for(var t=-1,a=e.length;++t<a;){var o=e[t],i=n(o);if(i!=null&&(s===void 0?i===i&&!U(i):r(i,s)))var s=i,d=o}return d}function S(e){return e&&e.length?me(e,ve,la):void 0}var ue=Br(function(e,n,r){On(e,n,r)});function D(e){return e&&e.length?me(e,ve,Tn):void 0}function ye(e,n){return e&&e.length?me(e,_(n),Tn):void 0}function va(e,n,r,t){if(!O(e))return e;n=ln(n,e);for(var a=-1,o=n.length,i=o-1,s=e;s!=null&&++a<o;){var d=wr(n[a]),u=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=i){var f=s[d];u=void 0,u===void 0&&(u=O(f)?f:tn(n[a+1])?[]:{})}Z(s,d,u),s=s[d]}return e}function ba(e,n,r){for(var t=-1,a=n.length,o={};++t<a;){var i=n[t],s=hn(e,i);r(s,i)&&va(o,ln(i,e),s)}return o}function wa(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function ma(e,n){if(e!==n){var r=e!==void 0,t=e===null,a=e===e,o=U(e),i=n!==void 0,s=n===null,d=n===n,u=U(n);if(!s&&!u&&!o&&e>n||o&&i&&d&&!s&&!u||t&&i&&d||!r&&d||!a)return 1;if(!t&&!o&&!u&&e<n||u&&r&&a&&!t&&!o||s&&r&&a||!i&&a||!d)return-1}return 0}function ya(e,n,r){for(var t=-1,a=e.criteria,o=n.criteria,i=a.length,s=r.length;++t<i;){var d=ma(a[t],o[t]);if(d){if(t>=s)return d;var u=r[t];return d*(u=="desc"?-1:1)}}return e.index-n.index}function xa(e,n,r){n.length?n=X(n,function(o){return I(o)?function(i){return hn(i,o.length===1?o[0]:o)}:o}):n=[ve];var t=-1;n=X(n,ge(_));var a=Nn(e,function(o,i,s){var d=X(n,function(u){return u(o)});return{criteria:d,index:++t,value:o}});return wa(a,function(o,i){return ya(o,i,r)})}function Ea(e,n){return ba(e,n,function(r,t){return mr(e,t)})}var q=Yr(function(e,n){return e==null?{}:Ea(e,n)}),La=Math.ceil,Oa=Math.max;function Na(e,n,r,t){for(var a=-1,o=Oa(La((n-e)/(r||1)),0),i=Array(o);o--;)i[++a]=e,e+=r;return i}function Pa(e){return function(n,r,t){return t&&typeof t!="number"&&j(n,r,t)&&(r=t=void 0),n=G(n),r===void 0?(r=n,n=0):r=G(r),t=t===void 0?n<r?1:-1:G(t),Na(n,r,t)}}var k=Pa(),F=le(function(e,n){if(e==null)return[];var r=n.length;return r>1&&j(e,n[0],n[1])?n=[]:r>2&&j(n[0],n[1],n[2])&&(n=[n[0]]),xa(e,on(n),[])}),Ta=0;function xe(e){var n=++Ta;return yr(e)+n}function Sa(e,n,r){for(var t=-1,a=e.length,o=n.length,i={};++t<a;){var s=t<o?n[t]:void 0;r(i,e[t],s)}return i}function Ca(e,n){return Sa(e||[],n||[],Z)}class Ia{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return Ue(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&Ue(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Ra)),t=t._prev;return"["+n.join(", ")+"]"}}function Ue(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ra(e,n){if(e!=="_next"&&e!=="_prev")return n}var ka=xr(1);function _a(e,n){if(e.nodeCount()<=1)return[];var r=Aa(e,n||ka),t=Ma(r.graph,r.buckets,r.zeroIdx);return M(E(t,function(a){return e.outEdges(a.v,a.w)}))}function Ma(e,n,r){for(var t=[],a=n[n.length-1],o=n[0],i;e.nodeCount();){for(;i=o.dequeue();)re(e,n,r,i);for(;i=a.dequeue();)re(e,n,r,i);if(e.nodeCount()){for(var s=n.length-2;s>0;--s)if(i=n[s].dequeue(),i){t=t.concat(re(e,n,r,i,!0));break}}}return t}function re(e,n,r,t,a){var o=a?[]:void 0;return l(e.inEdges(t.v),function(i){var s=e.edge(i),d=e.node(i.v);a&&o.push({v:i.v,w:i.w}),d.out-=s,fe(n,r,d)}),l(e.outEdges(t.v),function(i){var s=e.edge(i),d=i.w,u=e.node(d);u.in-=s,fe(n,r,u)}),e.removeNode(t.v),o}function Aa(e,n){var r=new N,t=0,a=0;l(e.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),l(e.edges(),function(s){var d=r.edge(s.v,s.w)||0,u=n(s),f=d+u;r.setEdge(s.v,s.w,f),a=Math.max(a,r.node(s.v).out+=u),t=Math.max(t,r.node(s.w).in+=u)});var o=k(a+t+3).map(function(){return new Ia}),i=t+1;return l(r.nodes(),function(s){fe(o,i,r.node(s))}),{graph:r,buckets:o,zeroIdx:i}}function fe(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function ja(e){var n=e.graph().acyclicer==="greedy"?_a(e,r(e)):Da(e);l(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,xe("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function Da(e){var n=[],r={},t={};function a(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,l(e.outEdges(o),function(i){Object.prototype.hasOwnProperty.call(r,i.w)?n.push(i):a(i.w)}),delete r[o])}return l(e.nodes(),a),n}function Ba(e){l(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function A(e,n,r,t){var a;do a=xe(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function $a(e){var n=new N().setGraph(e.graph());return l(e.nodes(),function(r){n.setNode(r,e.node(r))}),l(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function Sn(e){var n=new N({multigraph:e.isMultigraph()}).setGraph(e.graph());return l(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),l(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Ve(e,n){var r=e.x,t=e.y,a=n.x-r,o=n.y-t,i=e.width/2,s=e.height/2;if(!a&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,u;return Math.abs(o)*i>Math.abs(a)*s?(o<0&&(s=-s),d=s*a/o,u=s):(a<0&&(i=-i),d=i,u=i*o/a),{x:r+d,y:t+u}}function ne(e){var n=E(k(Cn(e)+1),function(){return[]});return l(e.nodes(),function(r){var t=e.node(r),a=t.rank;L(a)||(n[a][t.order]=r)}),n}function Fa(e){var n=D(E(e.nodes(),function(r){return e.node(r).rank}));l(e.nodes(),function(r){var t=e.node(r);Pn(t,"rank")&&(t.rank-=n)})}function Xa(e){var n=D(E(e.nodes(),function(o){return e.node(o).rank})),r=[];l(e.nodes(),function(o){var i=e.node(o).rank-n;r[i]||(r[i]=[]),r[i].push(o)});var t=0,a=e.graph().nodeRankFactor;l(r,function(o,i){L(o)&&i%a!==0?--t:t&&l(o,function(s){e.node(s).rank+=t})})}function We(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),A(e,"border",a,n)}function Cn(e){return S(E(e.nodes(),function(n){var r=e.node(n).rank;if(!L(r))return r}))}function Ga(e,n){var r={lhs:[],rhs:[]};return l(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Ya(e,n){return n()}function Ua(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&l(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,i=a.maxRank+1;o<i;++o)qe(e,"borderLeft","_bl",r,a,o),qe(e,"borderRight","_br",r,a,o)}}l(e.children(),n)}function qe(e,n,r,t,a,o){var i={width:0,height:0,rank:o,borderType:n},s=a[n][o-1],d=A(e,"border",i,r);a[n][o]=d,e.setParent(d,t),s&&e.setEdge(s,d,{weight:1})}function Va(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&In(e)}function Wa(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&qa(e),(n==="lr"||n==="rl")&&(Ha(e),In(e))}function In(e){l(e.nodes(),function(n){He(e.node(n))}),l(e.edges(),function(n){He(e.edge(n))})}function He(e){var n=e.width;e.width=e.height,e.height=n}function qa(e){l(e.nodes(),function(n){te(e.node(n))}),l(e.edges(),function(n){var r=e.edge(n);l(r.points,te),Object.prototype.hasOwnProperty.call(r,"y")&&te(r)})}function te(e){e.y=-e.y}function Ha(e){l(e.nodes(),function(n){ae(e.node(n))}),l(e.edges(),function(n){var r=e.edge(n);l(r.points,ae),Object.prototype.hasOwnProperty.call(r,"x")&&ae(r)})}function ae(e){var n=e.x;e.x=e.y,e.y=n}function za(e){e.graph().dummyChains=[],l(e.edges(),function(n){Ja(e,n)})}function Ja(e,n){var r=n.v,t=e.node(r).rank,a=n.w,o=e.node(a).rank,i=n.name,s=e.edge(n),d=s.labelRank;if(o!==t+1){e.removeEdge(n);var u=void 0,f,c;for(c=0,++t;t<o;++c,++t)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:n,rank:t},f=A(e,"edge",u,"_d"),t===d&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),e.setEdge(r,f,{weight:s.weight},i),c===0&&e.graph().dummyChains.push(f),r=f;e.setEdge(r,a,{weight:s.weight},i)}}function Ka(e){l(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,a;for(e.setEdge(r.edgeObj,t);r.dummy;)a=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=a,r=e.node(n)})}function Ee(e){var n={};function r(t){var a=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return a.rank;n[t]=!0;var o=D(E(e.outEdges(t),function(i){return r(i.w)-e.edge(i).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),a.rank=o}l(e.sources(),r)}function B(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Rn(e){var n=new N({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var a,o;Za(n,e)<t;)a=Qa(n,e),o=n.hasNode(a.v)?B(e,a):-B(e,a),ei(n,e,o);return n}function Za(e,n){function r(t){l(n.nodeEdges(t),function(a){var o=a.v,i=t===o?a.w:o;!e.hasNode(i)&&!B(n,a)&&(e.setNode(i,{}),e.setEdge(t,i,{}),r(i))})}return l(e.nodes(),r),e.nodeCount()}function Qa(e,n){return ye(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return B(n,r)})}function ei(e,n,r){l(e.nodes(),function(t){n.node(t).rank+=r})}function ni(){}ni.prototype=new Error;function kn(e,n,r){I(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],o={};return l(n,function(i){if(!e.hasNode(i))throw new Error("Graph does not have node: "+i);_n(e,i,r==="post",o,t,a)}),a}function _n(e,n,r,t,a,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),l(a(n),function(i){_n(e,i,r,t,a,o)}),r&&o.push(n))}function ri(e,n){return kn(e,n,"post")}function ti(e,n){return kn(e,n,"pre")}C.initLowLimValues=Oe;C.initCutValues=Le;C.calcCutValue=Mn;C.leaveEdge=jn;C.enterEdge=Dn;C.exchangeEdges=Bn;function C(e){e=$a(e),Ee(e);var n=Rn(e);Oe(n),Le(n,e);for(var r,t;r=jn(n);)t=Dn(n,e,r),Bn(n,e,r,t)}function Le(e,n){var r=ri(e,e.nodes());r=r.slice(0,r.length-1),l(r,function(t){ai(e,n,t)})}function ai(e,n,r){var t=e.node(r),a=t.parent;e.edge(r,a).cutvalue=Mn(e,n,r)}function Mn(e,n,r){var t=e.node(r),a=t.parent,o=!0,i=n.edge(r,a),s=0;return i||(o=!1,i=n.edge(a,r)),s=i.weight,l(n.nodeEdges(r),function(d){var u=d.v===r,f=u?d.w:d.v;if(f!==a){var c=u===o,h=n.edge(d).weight;if(s+=c?h:-h,oi(e,r,f)){var v=e.edge(r,f).cutvalue;s+=c?-v:v}}}),s}function Oe(e,n){arguments.length<2&&(n=e.nodes()[0]),An(e,{},1,n)}function An(e,n,r,t,a){var o=r,i=e.node(t);return n[t]=!0,l(e.neighbors(t),function(s){Object.prototype.hasOwnProperty.call(n,s)||(r=An(e,n,r,s,t))}),i.low=o,i.lim=r++,a?i.parent=a:delete i.parent,r}function jn(e){return we(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Dn(e,n,r){var t=r.v,a=r.w;n.hasEdge(t,a)||(t=r.w,a=r.v);var o=e.node(t),i=e.node(a),s=o,d=!1;o.lim>i.lim&&(s=i,d=!0);var u=$(n.edges(),function(f){return d===ze(e,e.node(f.v),s)&&d!==ze(e,e.node(f.w),s)});return ye(u,function(f){return B(n,f)})}function Bn(e,n,r,t){var a=r.v,o=r.w;e.removeEdge(a,o),e.setEdge(t.v,t.w,{}),Oe(e),Le(e,n),ii(e,n)}function ii(e,n){var r=we(e.nodes(),function(a){return!n.node(a).parent}),t=ti(e,r);t=t.slice(1),l(t,function(a){var o=e.node(a).parent,i=n.edge(a,o),s=!1;i||(i=n.edge(o,a),s=!0),n.node(a).rank=n.node(o).rank+(s?i.minlen:-i.minlen)})}function oi(e,n,r){return e.hasEdge(n,r)}function ze(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function si(e){switch(e.graph().ranker){case"network-simplex":Je(e);break;case"tight-tree":ui(e);break;case"longest-path":di(e);break;default:Je(e)}}var di=Ee;function ui(e){Ee(e),Rn(e)}function Je(e){C(e)}function fi(e){var n=A(e,"root",{},"_root"),r=ci(e),t=S(R(r))-1,a=2*t+1;e.graph().nestingRoot=n,l(e.edges(),function(i){e.edge(i).minlen*=a});var o=li(e)+1;l(e.children(),function(i){$n(e,n,a,o,t,r,i)}),e.graph().nodeRankFactor=a}function $n(e,n,r,t,a,o,i){var s=e.children(i);if(!s.length){i!==n&&e.setEdge(n,i,{weight:0,minlen:r});return}var d=We(e,"_bt"),u=We(e,"_bb"),f=e.node(i);e.setParent(d,i),f.borderTop=d,e.setParent(u,i),f.borderBottom=u,l(s,function(c){$n(e,n,r,t,a,o,c);var h=e.node(c),v=h.borderTop?h.borderTop:c,p=h.borderBottom?h.borderBottom:c,g=h.borderTop?t:2*t,b=v!==p?1:a-o[i]+1;e.setEdge(d,v,{weight:g,minlen:b,nestingEdge:!0}),e.setEdge(p,u,{weight:g,minlen:b,nestingEdge:!0})}),e.parent(i)||e.setEdge(n,d,{weight:0,minlen:a+o[i]})}function ci(e){var n={};function r(t,a){var o=e.children(t);o&&o.length&&l(o,function(i){r(i,a+1)}),n[t]=a}return l(e.children(),function(t){r(t,1)}),n}function li(e){return J(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function hi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,l(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function pi(e,n,r){var t={},a;l(r,function(o){for(var i=e.parent(o),s,d;i;){if(s=e.parent(i),s?(d=t[s],t[s]=i):(d=a,a=i),d&&d!==i){n.setEdge(d,i);return}i=s}})}function gi(e,n,r){var t=vi(e),a=new N({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return l(e.nodes(),function(o){var i=e.node(o),s=e.parent(o);(i.rank===n||i.minRank<=n&&n<=i.maxRank)&&(a.setNode(o),a.setParent(o,s||t),l(e[r](o),function(d){var u=d.v===o?d.w:d.v,f=a.edge(u,o),c=L(f)?0:f.weight;a.setEdge(u,o,{weight:e.edge(d).weight+c})}),Object.prototype.hasOwnProperty.call(i,"minRank")&&a.setNode(o,{borderLeft:i.borderLeft[n],borderRight:i.borderRight[n]}))}),a}function vi(e){for(var n;e.hasNode(n=xe("_root")););return n}function bi(e,n){for(var r=0,t=1;t<n.length;++t)r+=wi(e,n[t-1],n[t]);return r}function wi(e,n,r){for(var t=Ca(r,E(r,function(u,f){return f})),a=M(E(n,function(u){return F(E(e.outEdges(u),function(f){return{pos:t[f.w],weight:e.edge(f).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var i=2*o-1;o-=1;var s=E(new Array(i),function(){return 0}),d=0;return l(a.forEach(function(u){var f=u.pos+o;s[f]+=u.weight;for(var c=0;f>0;)f%2&&(c+=s[f+1]),f=f-1>>1,s[f]+=u.weight;d+=u.weight*c})),d}function mi(e){var n={},r=$(e.nodes(),function(s){return!e.children(s).length}),t=S(E(r,function(s){return e.node(s).rank})),a=E(k(t+1),function(){return[]});function o(s){if(!Pn(n,s)){n[s]=!0;var d=e.node(s);a[d.rank].push(s),l(e.successors(s),o)}}var i=F(r,function(s){return e.node(s).rank});return l(i,o),a}function yi(e,n){return E(n,function(r){var t=e.inEdges(r);if(t.length){var a=J(t,function(o,i){var s=e.edge(i),d=e.node(i.v);return{sum:o.sum+s.weight*d.order,weight:o.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function xi(e,n){var r={};l(e,function(a,o){var i=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:o};L(a.barycenter)||(i.barycenter=a.barycenter,i.weight=a.weight)}),l(n.edges(),function(a){var o=r[a.v],i=r[a.w];!L(o)&&!L(i)&&(i.indegree++,o.out.push(r[a.w]))});var t=$(r,function(a){return!a.indegree});return Ei(t)}function Ei(e){var n=[];function r(o){return function(i){i.merged||(L(i.barycenter)||L(o.barycenter)||i.barycenter>=o.barycenter)&&Li(o,i)}}function t(o){return function(i){i.in.push(o),--i.indegree===0&&e.push(i)}}for(;e.length;){var a=e.pop();n.push(a),l(a.in.reverse(),r(a)),l(a.out,t(a))}return E($(n,function(o){return!o.merged}),function(o){return q(o,["vs","i","barycenter","weight"])})}function Li(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Oi(e,n){var r=Ga(e,function(f){return Object.prototype.hasOwnProperty.call(f,"barycenter")}),t=r.lhs,a=F(r.rhs,function(f){return-f.i}),o=[],i=0,s=0,d=0;t.sort(Ni(!!n)),d=Ke(o,a,d),l(t,function(f){d+=f.vs.length,o.push(f.vs),i+=f.barycenter*f.weight,s+=f.weight,d=Ke(o,a,d)});var u={vs:M(o)};return s&&(u.barycenter=i/s,u.weight=s),u}function Ke(e,n,r){for(var t;n.length&&(t=W(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ni(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function Fn(e,n,r,t){var a=e.children(n),o=e.node(n),i=o?o.borderLeft:void 0,s=o?o.borderRight:void 0,d={};i&&(a=$(a,function(p){return p!==i&&p!==s}));var u=yi(e,a);l(u,function(p){if(e.children(p.v).length){var g=Fn(e,p.v,r,t);d[p.v]=g,Object.prototype.hasOwnProperty.call(g,"barycenter")&&Ti(p,g)}});var f=xi(u,r);Pi(f,d);var c=Oi(f,t);if(i&&(c.vs=M([i,c.vs,s]),e.predecessors(i).length)){var h=e.node(e.predecessors(i)[0]),v=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(c,"barycenter")||(c.barycenter=0,c.weight=0),c.barycenter=(c.barycenter*c.weight+h.order+v.order)/(c.weight+2),c.weight+=2}return c}function Pi(e,n){l(e,function(r){r.vs=M(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Ti(e,n){L(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Si(e){var n=Cn(e),r=Ze(e,k(1,n+1),"inEdges"),t=Ze(e,k(n-1,-1,-1),"outEdges"),a=mi(e);Qe(e,a);for(var o=Number.POSITIVE_INFINITY,i,s=0,d=0;d<4;++s,++d){Ci(s%2?r:t,s%4>=2),a=ne(e);var u=bi(e,a);u<o&&(d=0,i=ra(a),o=u)}Qe(e,i)}function Ze(e,n,r){return E(n,function(t){return gi(e,t,r)})}function Ci(e,n){var r=new N;l(e,function(t){var a=t.graph().root,o=Fn(t,a,r,n);l(o.vs,function(i,s){t.node(i).order=s}),pi(t,r,o.vs)})}function Qe(e,n){l(n,function(r){l(r,function(t,a){e.node(t).order=a})})}function Ii(e){var n=ki(e);l(e.graph().dummyChains,function(r){for(var t=e.node(r),a=t.edgeObj,o=Ri(e,n,a.v,a.w),i=o.path,s=o.lca,d=0,u=i[d],f=!0;r!==a.w;){if(t=e.node(r),f){for(;(u=i[d])!==s&&e.node(u).maxRank<t.rank;)d++;u===s&&(f=!1)}if(!f){for(;d<i.length-1&&e.node(u=i[d+1]).minRank<=t.rank;)d++;u=i[d]}e.setParent(r,u),r=e.successors(r)[0]}})}function Ri(e,n,r,t){var a=[],o=[],i=Math.min(n[r].low,n[t].low),s=Math.max(n[r].lim,n[t].lim),d,u;d=r;do d=e.parent(d),a.push(d);while(d&&(n[d].low>i||s>n[d].lim));for(u=d,d=t;(d=e.parent(d))!==u;)o.push(d);return{path:a.concat(o.reverse()),lca:u}}function ki(e){var n={},r=0;function t(a){var o=r;l(e.children(a),t),n[a]={low:o,lim:r++}}return l(e.children(),t),n}function _i(e,n){var r={};function t(a,o){var i=0,s=0,d=a.length,u=W(o);return l(o,function(f,c){var h=Ai(e,f),v=h?e.node(h).order:d;(h||f===u)&&(l(o.slice(s,c+1),function(p){l(e.predecessors(p),function(g){var b=e.node(g),w=b.order;(w<i||v<w)&&!(b.dummy&&e.node(p).dummy)&&Xn(r,g,p)})}),s=c+1,i=v)}),o}return J(n,t),r}function Mi(e,n){var r={};function t(o,i,s,d,u){var f;l(k(i,s),function(c){f=o[c],e.node(f).dummy&&l(e.predecessors(f),function(h){var v=e.node(h);v.dummy&&(v.order<d||v.order>u)&&Xn(r,h,f)})})}function a(o,i){var s=-1,d,u=0;return l(i,function(f,c){if(e.node(f).dummy==="border"){var h=e.predecessors(f);h.length&&(d=e.node(h[0]).order,t(i,u,c,s,d),u=c,s=d)}t(i,u,i.length,d,o.length)}),i}return J(n,a),r}function Ai(e,n){if(e.node(n).dummy)return we(e.predecessors(n),function(r){return e.node(r).dummy})}function Xn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=e[n];Object.defineProperty(a,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ji(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Di(e,n,r,t){var a={},o={},i={};return l(n,function(s){l(s,function(d,u){a[d]=d,o[d]=d,i[d]=u})}),l(n,function(s){var d=-1;l(s,function(u){var f=t(u);if(f.length){f=F(f,function(g){return i[g]});for(var c=(f.length-1)/2,h=Math.floor(c),v=Math.ceil(c);h<=v;++h){var p=f[h];o[u]===u&&d<i[p]&&!ji(r,u,p)&&(o[p]=u,o[u]=a[u]=a[p],d=i[p])}}})}),{root:a,align:o}}function Bi(e,n,r,t,a){var o={},i=$i(e,n,r,a),s=a?"borderLeft":"borderRight";function d(c,h){for(var v=i.nodes(),p=v.pop(),g={};p;)g[p]?c(p):(g[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function u(c){o[c]=i.inEdges(c).reduce(function(h,v){return Math.max(h,o[v.v]+i.edge(v))},0)}function f(c){var h=i.outEdges(c).reduce(function(p,g){return Math.min(p,o[g.w]-i.edge(g))},Number.POSITIVE_INFINITY),v=e.node(c);h!==Number.POSITIVE_INFINITY&&v.borderType!==s&&(o[c]=Math.max(o[c],h))}return d(u,i.predecessors.bind(i)),d(f,i.successors.bind(i)),l(t,function(c){o[c]=o[r[c]]}),o}function $i(e,n,r,t){var a=new N,o=e.graph(),i=Ui(o.nodesep,o.edgesep,t);return l(n,function(s){var d;l(s,function(u){var f=r[u];if(a.setNode(f),d){var c=r[d],h=a.edge(c,f);a.setEdge(c,f,Math.max(i(e,u,d),h||0))}d=u})}),a}function Fi(e,n){return ye(R(n),function(r){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return fa(r,function(o,i){var s=Vi(e,i)/2;t=Math.max(o+s,t),a=Math.min(o-s,a)}),t-a})}function Xi(e,n){var r=R(n),t=D(r),a=S(r);l(["u","d"],function(o){l(["l","r"],function(i){var s=o+i,d=e[s],u;if(d!==n){var f=R(d);u=i==="l"?t-D(f):a-S(f),u&&(e[s]=ee(d,function(c){return c+u}))}})})}function Gi(e,n){return ee(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var a=F(E(e,t));return(a[1]+a[2])/2})}function Yi(e){var n=ne(e),r=ue(_i(e,n),Mi(e,n)),t={},a;l(["u","d"],function(i){a=i==="u"?n:R(n).reverse(),l(["l","r"],function(s){s==="r"&&(a=E(a,function(c){return R(c).reverse()}));var d=(i==="u"?e.predecessors:e.successors).bind(e),u=Di(e,a,r,d),f=Bi(e,a,u.root,u.align,s==="r");s==="r"&&(f=ee(f,function(c){return-c})),t[i+s]=f})});var o=Fi(e,t);return Xi(t,o),Gi(t,e.graph().align)}function Ui(e,n,r){return function(t,a,o){var i=t.node(a),s=t.node(o),d=0,u;if(d+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":u=-i.width/2;break;case"r":u=i.width/2;break}if(u&&(d+=r?u:-u),u=0,d+=(i.dummy?n:e)/2,d+=(s.dummy?n:e)/2,d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(d+=r?u:-u),u=0,d}}function Vi(e,n){return e.node(n).width}function Wi(e){e=Sn(e),qi(e),ca(Yi(e),function(n,r){e.node(r).x=n})}function qi(e){var n=ne(e),r=e.graph().ranksep,t=0;l(n,function(a){var o=S(E(a,function(i){return e.node(i).height}));l(a,function(i){e.node(i).y=t+o/2}),t+=o+r})}function Hi(e,n){var r=Ya;r("layout",()=>{var t=r(" buildLayoutGraph",()=>io(e));r(" runLayout",()=>zi(t,r)),r(" updateInputGraph",()=>Ji(e,t))})}function zi(e,n){n(" makeSpaceForEdgeLabels",()=>oo(e)),n(" removeSelfEdges",()=>vo(e)),n(" acyclic",()=>ja(e)),n(" nestingGraph.run",()=>fi(e)),n(" rank",()=>si(Sn(e))),n(" injectEdgeLabelProxies",()=>so(e)),n(" removeEmptyRanks",()=>Xa(e)),n(" nestingGraph.cleanup",()=>hi(e)),n(" normalizeRanks",()=>Fa(e)),n(" assignRankMinMax",()=>uo(e)),n(" removeEdgeLabelProxies",()=>fo(e)),n(" normalize.run",()=>za(e)),n(" parentDummyChains",()=>Ii(e)),n(" addBorderSegments",()=>Ua(e)),n(" order",()=>Si(e)),n(" insertSelfEdges",()=>bo(e)),n(" adjustCoordinateSystem",()=>Va(e)),n(" position",()=>Wi(e)),n(" positionSelfEdges",()=>wo(e)),n(" removeBorderNodes",()=>go(e)),n(" normalize.undo",()=>Ka(e)),n(" fixupEdgeLabelCoords",()=>ho(e)),n(" undoCoordinateSystem",()=>Wa(e)),n(" translateGraph",()=>co(e)),n(" assignNodeIntersects",()=>lo(e)),n(" reversePoints",()=>po(e)),n(" acyclic.undo",()=>Ba(e))}function Ji(e,n){l(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),l(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ki=["nodesep","edgesep","ranksep","marginx","marginy"],Zi={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Qi=["acyclicer","ranker","rankdir","align"],eo=["width","height"],no={width:0,height:0},ro=["minlen","weight","width","height","labeloffset"],to={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ao=["labelpos"];function io(e){var n=new N({multigraph:!0,compound:!0}),r=oe(e.graph());return n.setGraph(ue({},Zi,ie(r,Ki),q(r,Qi))),l(e.nodes(),function(t){var a=oe(e.node(t));n.setNode(t,aa(ie(a,eo),no)),n.setParent(t,e.parent(t))}),l(e.edges(),function(t){var a=oe(e.edge(t));n.setEdge(t,ue({},to,ie(a,ro),q(a,ao)))}),n}function oo(e){var n=e.graph();n.ranksep/=2,l(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function so(e){l(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),o={rank:(a.rank-t.rank)/2+t.rank,e:n};A(e,"edge-proxy",o,"_ep")}})}function uo(e){var n=0;l(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=S(n,t.maxRank))}),e.graph().maxRank=n}function fo(e){l(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function co(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,o=e.graph(),i=o.marginx||0,s=o.marginy||0;function d(u){var f=u.x,c=u.y,h=u.width,v=u.height;n=Math.min(n,f-h/2),r=Math.max(r,f+h/2),t=Math.min(t,c-v/2),a=Math.max(a,c+v/2)}l(e.nodes(),function(u){d(e.node(u))}),l(e.edges(),function(u){var f=e.edge(u);Object.prototype.hasOwnProperty.call(f,"x")&&d(f)}),n-=i,t-=s,l(e.nodes(),function(u){var f=e.node(u);f.x-=n,f.y-=t}),l(e.edges(),function(u){var f=e.edge(u);l(f.points,function(c){c.x-=n,c.y-=t}),Object.prototype.hasOwnProperty.call(f,"x")&&(f.x-=n),Object.prototype.hasOwnProperty.call(f,"y")&&(f.y-=t)}),o.width=r-n+i,o.height=a-t+s}function lo(e){l(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),o,i;r.points?(o=r.points[0],i=r.points[r.points.length-1]):(r.points=[],o=a,i=t),r.points.unshift(Ve(t,o)),r.points.push(Ve(a,i))})}function ho(e){l(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function po(e){l(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function go(e){l(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),o=e.node(W(r.borderLeft)),i=e.node(W(r.borderRight));r.width=Math.abs(i.x-o.x),r.height=Math.abs(a.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),l(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function vo(e){l(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function bo(e){var n=ne(e);l(n,function(r){var t=0;l(r,function(a,o){var i=e.node(a);i.order=o+t,l(i.selfEdges,function(s){A(e,"selfedge",{width:s.label.width,height:s.label.height,rank:i.rank,order:o+ ++t,e:s.e,label:s.label},"_se")}),delete i.selfEdges})})}function wo(e){l(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,o=t.y,i=r.x-a,s=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*i/3,y:o-s},{x:a+5*i/6,y:o-s},{x:a+i,y:o},{x:a+5*i/6,y:o+s},{x:a+2*i/3,y:o+s}],r.label.x=r.x,r.label.y=r.y}})}function ie(e,n){return ee(q(e,n),Number)}function oe(e){var n={};return l(e,function(r,t){n[t.toLowerCase()]=r}),n}var en=x((e,n,r)=>Math.max(n,Math.min(r,e)),"clamp"),nn=x((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),mo=x(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),yo=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],xo=x((e,n,r,t,a)=>{const o=[],i=new Set;if(r.forEach(({start:f,end:c})=>{f!==t&&i.add(f),c!==t&&i.add(c)}),i.forEach(f=>{const c=e.node(f);typeof c?.x=="number"&&typeof c?.y=="number"&&o.push(c)}),o.length===0&&r.forEach(({edge:f})=>{(f.points??[]).forEach(c=>{typeof c?.x=="number"&&typeof c?.y=="number"&&o.push(c)})}),o.length===0)return nn(a);const s=o.reduce((f,c)=>({x:f.x+c.x/o.length,y:f.y+c.y/o.length}),{x:0,y:0}),d=s.x-n.x,u=s.y-n.y;return Math.abs(d)>Math.abs(u)?d>0?"right":"left":Math.abs(u)>0?u>0?"bottom":"top":nn(a)},"getSelfLoopSide"),Eo=x((e,n="top",r=0,t=0)=>{const a=e.x,o=e.y-r,i=e.width/2,s=e.height/2,d=Math.max(36,Math.min(100,e.width*.8)),u=en(Math.max(t,e.width*.35),36,d),f=en(Math.min(e.width,e.height)*.45,24,48);switch(n){case"bottom":{const c=o+s;return[{x:a-u/2,y:c},{x:a-u/2,y:c+f},{x:a+u/2,y:c+f},{x:a+u/2,y:c}]}case"right":{const c=a+i;return[{x:c,y:o-u/2},{x:c+f,y:o-u/2},{x:c+f,y:o+u/2},{x:c,y:o+u/2}]}case"left":{const c=a-i;return[{x:c,y:o-u/2},{x:c-f,y:o-u/2},{x:c-f,y:o+u/2},{x:c,y:o+u/2}]}default:{const c=o-s;return[{x:a-u/2,y:c},{x:a-u/2,y:c-f},{x:a+u/2,y:c-f},{x:a+u/2,y:c}]}}},"getSelfLoopPoints"),Lo=x((e,n,r="top",t=0,a={})=>{const i=e.x,s=e.y-t,d=a.width??0,u=a.height??0;switch(r){case"bottom":return{x:i,y:Math.max(...n.map(f=>f.y))+u/2+4};case"right":return{x:Math.max(...n.map(f=>f.x))+d/2+4,y:s};case"left":return{x:Math.min(...n.map(f=>f.x))-d/2-4,y:s};default:return{x:i,y:Math.min(...n.map(f=>f.y))-u/2-4}}},"getSelfLoopLabelPosition"),Gn=x((e,n=0,{mergeSelfLoops:r=!0}={})=>{const t=new Map,a=[],o=e.graph()?.rankdir;return e.edges().forEach(i=>{const s=e.edge(i);if(r&&s.selfLoop){const d=s.selfLoop.id;t.has(d)||t.set(d,[]),t.get(d).push({edge:s,start:i.v,end:i.w})}else a.push({edge:s,start:i.v,end:i.w})}),t.forEach(i=>{if(i.length!==3){i.forEach(w=>a.push(w));return}i.sort((w,P)=>w.edge.selfLoop.order-P.edge.selfLoop.order);const[s,d,u]=i,f=s.edge.originalEdge??d.edge.originalEdge??u.edge.originalEdge??d.edge,c=e.node(f.start);if(!c){i.forEach(w=>a.push(w));return}const h={width:d.edge.width,height:d.edge.height},v=xo(e,c,i,f.start,o),p=Eo(c,v,n,h.width??0),g=Lo(c,p,v,n,h),b={...d.edge,...f,id:f.id,points:p,start:f.start,end:f.end,x:g.x,y:g.y,width:h.width,height:h.height,labelStyle:d.edge.labelStyle,fromCluster:s.edge.fromCluster??d.edge.fromCluster??u.edge.fromCluster,toCluster:s.edge.toCluster??d.edge.toCluster??u.edge.toCluster};delete b.selfLoop,delete b.originalEdge,a.push({edge:b,start:b.start,end:b.end})}),a},"getEdgesToRender"),Yn=x(async({element:e,graph:n,diagramType:r,id:t,parentCluster:a,siteConfig:o})=>{const i=n.graph().rankdir;m.trace("Dir in recursive render - dir:",i);const{clusters:s,edgePaths:d,edgeLabels:u,nodes:f,rootGroups:c}=Hn(e,{edgePathsClass:"edgePaths"});n.nodes()?m.info("Recursive render XXX",n.nodes()):m.info("No nodes found for",n),n.edges().length>0&&m.info("Recursive edges",n.edge(n.edges()[0]));const h=mo(r);await Promise.all(n.nodes().map(async function(g){const b=n.node(g);if(a!==void 0){const w=JSON.parse(JSON.stringify(a.clusterData));m.trace(`Setting data for parent cluster XXX
|
|
2
|
-
Node.id = `,g,`
|
|
3
|
-
data=`,w.height,`
|
|
4
|
-
Parent cluster`,a.height),n.setNode(a.id,w),n.parent(g)||(m.trace("Setting parent",g,a.id),n.setParent(g,a.id,w))}if(m.info("(Insert) Node XXX"+g+": "+JSON.stringify(n.node(g))),b?.clusterNode){m.info("Cluster identified XBX",g,b.width,n.node(g));const{ranksep:w,nodesep:P}=n.graph();b.graph.setGraph({...b.graph.graph(),ranksep:w+25,nodesep:P});const Ne=await So({element:f,graph:b.graph,diagramType:r,id:t,parentCluster:n.node(g),siteConfig:o}),Pe=Ne.elem;Kn(b,Pe),b.diff=Ne.diff||0,m.info("New compound node after recursive render XAX",g,"width",b.width,"height",b.height),Zn(Pe,b)}else n.children(g).length>0?(m.trace("Cluster - the non recursive path XBX",g,b.id,b,b.width,"Graph:",n),m.trace(Te(b.id,n)),T.set(b.id,{id:Te(b.id,n),node:b})):(m.trace("Node - the non recursive path XAX",g,f,n.node(g),i),await zn(f,n.node(g),{config:o,dir:i}))})),await x(async()=>{const g=n.edges().map(async function(b){const w=n.edge(b.v,b.w,b.name);if(m.info("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(b)),m.info("Edge "+b.v+" -> "+b.w+": ",b," ",JSON.stringify(n.edge(b))),m.info("Fix",T,"ids:",b.v,b.w,"Translating: ",T.get(b.v),T.get(b.w)),h&&w.selfLoop){if(w.selfLoop.order!==1)return;const P={...w.originalEdge,...w,id:w.selfLoop.id,startLabelLeft:w.originalEdge?.startLabelLeft??w.startLabelLeft,startLabelRight:w.originalEdge?.startLabelRight??w.startLabelRight,endLabelLeft:w.originalEdge?.endLabelLeft??w.endLabelLeft,endLabelRight:w.originalEdge?.endLabelRight??w.endLabelRight};await Se(u,P),w.width=P.width,w.height=P.height,w.labelStyle=P.labelStyle;return}await Se(u,w)});await Promise.all(g)},"processEdges")();const{subGraphTitleTotalMargin:p}=Qn(o);return{elem:c,graph:n,groups:{clusters:s,edgePaths:d,edgeLabels:u,nodes:f,rootGroups:c},diagramType:r,id:t,mergeSelfLoops:h,subGraphTitleTotalMargin:p}},"measureDagreGraph"),Un=x(e=>{m.info("############################################# XXX"),m.info("### Layout ### XXX"),m.info("############################################# XXX"),Hi(e)},"runDagreGraphLayout"),Oo=x((e,n,r)=>{const t=e.node(n);if(!t)return;const a={...t};return t?.clusterNode?a.y=(t.y??0)+r:e.children(n).length>0?a.height=(t.height??0)+r:a.y=(t.y??0)+r/2,a},"normalizeDagreNode"),rn=x((e,n)=>{yo.forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})},"applyDagreNodeLayout"),No=x((e,n,r,t)=>({...e,start:e.start??n,end:e.end??r,points:(e.points??[]).map(a=>({...a,y:typeof a.y=="number"?a.y+t:a.y}))}),"normalizeDagreEdge"),Po=x((e,n)=>{const{graph:r,mergeSelfLoops:t,subGraphTitleTotalMargin:a=0}=n,o=new Map(e.nodes.map(s=>[s.id,s]));ce(r).forEach(s=>{const d=Oo(r,s,a);if(!d)return;rn(r.node(s),d);const u=o.get(s);u&&rn(u,d)});const i=a/2;return e.edges=Gn(r,i,{mergeSelfLoops:t}).map(({edge:s,start:d,end:u})=>No(s,d,u,i)),e},"applyDagreLayoutResult"),To=x(async({elem:e,graph:n,groups:{clusters:r,edgePaths:t},diagramType:a,id:o,mergeSelfLoops:i,subGraphTitleTotalMargin:s})=>{let d=0;await Promise.all(ce(n).map(async function(c){const h=n.node(c);if(m.info("Position XBX => "+c+": ("+h.x,","+h.y,") width: ",h.width," height: ",h.height),h?.clusterNode)h.y+=s,m.info("A tainted cluster node XBX1",c,h.id,h.width,h.height,h.x,h.y,n.parent(c)),T.get(h.id).node=h,Ce(h);else if(n.children(c).length>0){m.info("A pure cluster node XBX1",c,h.id,h.x,h.y,h.width,h.height,n.parent(c)),h.height+=s,n.node(h.parentId);const v=h?.padding/2||0,p=h?.labelBBox?.height||0,g=p-v||0;m.debug("OffsetY",g,"labelHeight",p,"halfPadding",v),await er(r,h),T.get(h.id).node=h}else{const v=n.node(h.parentId);h.y+=s/2,m.info("A regular node XBX1 - using the padding",h.id,"parent",h.parentId,h.width,h.height,h.x,h.y,"offsetY",h.offsetY,"parent",v,v?.offsetY,h),Ce(h)}}));const u=s/2;return Gn(n,u,{mergeSelfLoops:i}).forEach(function({edge:c,start:h,end:v}){m.info("Edge "+h+" -> "+v+": "+JSON.stringify(c),c),c.points.forEach(w=>w.y+=u);const p=n.node(h),g=n.node(v),b=nr(t,c,T,a,p,g,o);rr(c,b)}),n.nodes().forEach(function(c){const h=n.node(c);m.info(c,h.type,h.diff),h.isGroup&&(d=h.diff)}),m.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"paintDagreLayoutCore"),So=x(async e=>{const n=await Yn(e);return Un(n.graph),await To(n)},"renderDagreSubgraph"),Vn=x(e=>{const n=new N({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(r=>{n.setNode(r.id,{...r}),r.parentId&&n.setParent(r.id,r.parentId)}),m.debug("Edges:",e.edges),e.edges.forEach(r=>{if(r.start===r.end){const t=r.start,a=t+"---"+t+"---1",o=t+"---"+t+"---2",i=n.node(t);n.setNode(a,{domId:a,id:a,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(a,i.parentId),n.setNode(o,{domId:o,id:o,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(o,i.parentId);const s=structuredClone(r),d=structuredClone(r),u=structuredClone(r),f=structuredClone(r);d.originalEdge=s,d.selfLoop={id:s.id,order:0},u.originalEdge=s,u.selfLoop={id:s.id,order:1},f.originalEdge=s,f.selfLoop={id:s.id,order:2},d.label="",d.arrowTypeEnd="none",d.endLabelLeft="",d.endLabelRight="",d.startLabelLeft="",d.id=t+"-cyclic-special-1",u.startLabelRight="",u.startLabelLeft="",u.endLabelLeft="",u.endLabelRight="",u.arrowTypeStart="none",u.arrowTypeEnd="none",u.id=t+"-cyclic-special-mid",f.label="",f.startLabelRight="",f.startLabelLeft="",f.arrowTypeStart="none",i.isGroup&&(d.fromCluster=t,f.toCluster=t),f.id=t+"-cyclic-special-2",f.arrowTypeStart="none",n.setEdge(t,a,d,t+"-cyclic-special-0"),n.setEdge(a,o,u,t+"-cyclic-special-1"),n.setEdge(o,t,f,t+"-cyclic-special-2")}else n.setEdge(r.start,r.end,{...r},r.id)}),Wn(n),{graph:n}},"prepareLayoutForDagre"),Co=x(async(e,{element:n,preparedLayout:r})=>{const t=r??Vn(e),a=Jn(),o=await Yn({element:n,graph:t.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:a});return t.measuredLayout=o,o},"measureDagreLayout"),Io=x((e,n)=>{const r=n.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return Un(r.graph),Po(e,r),r},"runDagreLayoutCore"),Ro=x((e,{measure:n})=>ce(n.graph).map(r=>n.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),ko=x((e,n,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),Bo=qn({prepareLayout:Vn,measureLayout:Co,runLayoutCore:Io,paintOptions:{clusterDb:T,getNodes:Ro,getEdgeNode:ko,skipNode:x((e,{measure:n})=>!n.graph.hasNode(e.id),"skipNode"),isCluster:x((e,{measure:n})=>n.graph.hasNode(e.id)&&(n.graph.children(e.id)??[]).length>0,"isCluster")}});export{Po as applyDagreLayoutResult,Gn as getEdgesToRender,Co as measureDagreLayout,Vn as prepareLayoutForDagre,Bo as render,Io as runDagreLayoutCore};
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import{g as k1}from"./chunk-5VM5RSS4-CCNs5Q1j.js";import{g as E1}from"./chunk-XXDRQBXY-ChLLr56_.js";import{s as C1}from"./chunk-TU62E6Q5-Bm44Znlj.js";import{_ as k,o as t1,l as oe,c as Ce,p as S1,r as x1,u as Gt,b as T1,s as D1,q as _1,a as v1,g as F1,t as V1,m as I1,v as s1,J as i1,x as L1,y as Rt,k as Ot,z as B1,A as M1,B as y1,C as w1,D as N1,E as R1,F as O1,G as P1,H as G1}from"./MermaidDiagram-Dma3Cwvn.js";import{c as U1}from"./chunk-HFQBQIA3-B8uXoLoT.js";import"./index-CqcyU6rA.js";import"./PageMarkdown-C-gI_dXg.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},j1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]);new Set(Object.values(tt).filter(s=>!j1.has(s)));var z1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),W1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),K1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(z1.get(s)??s)}k(et,"resolveShapeAlias");function r1(s,i){for(const n of s)if(!n.isGroup){if((!n.shape||n.shape==="squareRect"||n.shape==="rect")&&(n.shape=$e),W1.has(n.shape)){const r=`shape "${n.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e;continue}if(!K1.has(n.shape)){const r=`shape "${n.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e}}}k(r1,"normaliseNodeShapes");var Lt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),a1=Lt.size,o1=k(s=>`af-kind-${s}`,"kindClass"),H1=[...Lt.keys()],u1=k(s=>Math.max(1,s-a1),"containerSlotCount"),l1=k((s,i)=>{const n=a1+s%u1(i);return i>0?n%i:n},"containerSlot");function c1(s,i,n){const r=Ce().themeVariables?.borderColorArray,u=Array.isArray(r)?r.length:0;let l=n.size;for(const c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){const h=n.get(String(c.id))??l++;c.colorIndex=l1(h,u);continue}const a=i(String(c.id));a&&Lt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${o1(a)}`.replace(/\s+/g," ").trim())}}k(c1,"assignColorSlots");var n1="agentflow-",Pt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Y1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q1={flow:"flowGroup"};function It(s){if(Array.isArray(s))return s.map(n=>It(n));if(s===null||typeof s!="object")return s;const i={};for(const n of Object.keys(s))n==="__proto__"||n==="constructor"||n==="prototype"||(i[n]=It(s[n]));return i}k(It,"stripPrototypeKeys");function d1(s){let i=!1,n=!1,r=0,u;const l=[];for(const c of s.split(`
|
|
2
|
-
`)){if(u!==void 0){const p=c.length-c.trimStart().length;if(c.trim()===""||p>u){l.push(c);continue}u=void 0}let a=-1;for(let p=0;p<c.length;p++){const A=c[p];if(n)A==="\\"?p++:A==='"'&&(n=!1);else if(i)A==="'"&&(i=!1);else if(A==='"')n=!0;else if(A==="'")i=!0;else if(A==="#"&&(p===0||c[p-1]===" "||c[p-1]===" ")){a=p;break}else A==="["||A==="{"?r++:(A==="]"||A==="}")&&(r=Math.max(0,r-1))}if(i||n||r>0){l.push(c);continue}const h=a>=0?c.slice(0,a):c,g=a>=0?c.slice(a):"";if(/:\s*[>|][\d+-]*\s*$/.test(h)){u=c.length-c.trimStart().length,l.push(c);continue}l.push(h.replace(/,([\t ]*)$/,"$1")+g)}return l.join(`
|
|
3
|
-
`)}k(d1,"stripLineTrailingCommas");var Ze,X1=(Ze=class{constructor(){this.vertexCounter=0,this.config=Ce(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=T1,this.setAccDescription=D1,this.setDiagramTitle=_1,this.getAccTitle=v1,this.getAccDescription=F1,this.getDiagramTitle=V1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return I1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,r,u,l,c,a={},h,g){if(!i||i.trim().length===0)return;let p;if(h!==void 0){let m;h.includes(`
|
|
4
|
-
`)?m=h+`
|
|
5
|
-
`:m=`{
|
|
6
|
-
`+h+`
|
|
7
|
-
}`;try{p=s1(m,{schema:i1})??{}}catch(d){const f=h.includes(`
|
|
8
|
-
`)?d1(h):h;if(f!==h)try{p=s1(f+`
|
|
9
|
-
`,{schema:i1})??{}}catch{this.rethrowMetadataYamlError(d,h,g)}else this.rethrowMetadataYamlError(d,h,g)}p=It(p)}let A;if(p&&typeof p.shape=="string"){const m=p;A=m.shape;const d=et(A);d&&d!==A&&(m.shape=d)}const x=this.subGraphLookup.get(i);if(x&&p){x.metadata={...x.metadata,...p};return}const L=this.connectors.get(i);if(L&&p){L.metadata={...L.metadata,...p};return}if(i==="connectors")return;const C=this.edges.find(m=>m.id===i);if(C){const m=p;m?.animate!==void 0&&(C.animate=m.animate),m?.animation!==void 0&&(C.animation=m.animation),m?.curve!==void 0&&(C.interpolate=m.curve),p&&(C.metadata={...C.metadata,...p});return}let M,T=this.vertices.get(i);if(T===void 0&&(T={id:i,labelType:"text",domId:n1+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,T)),this.vertexCounter++,n!==void 0?(this.config=Ce(),M=this.sanitizeText(n.text.trim()),T.labelType=n.type,M.startsWith('"')&&M.endsWith('"')&&(M=M.substring(1,M.length-1)),T.text=M):T.text===void 0&&(T.text=i),r!==void 0&&(T.type=r),u?.forEach(m=>{T.styles.push(m)}),l?.forEach(m=>{T.classes.push(m)}),c!==void 0&&(T.dir=c),T.props===void 0?T.props=a:a!==void 0&&Object.assign(T.props,a),p){if(T.metadata={...T.metadata,...p},p.shape){const m=A??p.shape;if(typeof m!="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(m)}.`,g);if(m!==m.toLowerCase()||m.includes("_"))throw this.positionedShapeError(`No such shape: ${m}. Shape names should be lowercase.`,g);if(!L1(p.shape))throw this.positionedShapeError(`No such shape: ${p.shape}.`,g);T.type=p?.shape}p?.label&&(T.text=this.sanitizeText(p.label),T.labelType=this.sanitizeNodeLabelType(p?.labelType))}}positionedShapeError(i,n){const r=new Error(i);if(!n)return r;const u=n.first_line+this.frontmatterLineOffset;return Object.assign(r,{hash:{text:"",token:null,line:u-1,loc:{first_line:u,last_line:n.last_line+this.frontmatterLineOffset,first_column:n.first_column,last_column:n.last_column},expected:[]}}),r}rethrowMetadataYamlError(i,n,r){const u=i;if(!u||u.name!=="YAMLException"||!u.mark||!r)throw i;let l;try{const c=!n.includes(`
|
|
10
|
-
`),a=c?`{
|
|
11
|
-
`+n+`
|
|
12
|
-
}`:n+`
|
|
13
|
-
`,h=r.first_line+this.frontmatterLineOffset,g=r.first_column+2,p=k((m,d)=>c?{line:h,column:g+(m===1?d:0)}:{line:h+m,column:m===0?g+d:d},"toSource"),A=p(u.mark.line,u.mark.column),x=u.reason??(u.message??"").split(`
|
|
14
|
-
`)[0].replace(/\s*\(\d+:\d+\)\s*$/,""),L=a.split(`
|
|
15
|
-
`),C=[];if(c)C.push(1);else for(let m=u.mark.line-1;m<=u.mark.line+1;m++)m<0||m>=L.length||m===L.length-1&&L[m]===""&&m!==u.mark.line||C.push(m);const M=Math.max(...C.map(m=>String(p(m,0).line).length)),T=[];for(const m of C){const d=p(m,0).line,f=` ${String(d).padStart(M)} | `;T.push(f+L[m].replace(/\t/g,"→")),m===u.mark.line&&T.push("-".repeat(f.length+u.mark.column)+"^")}l={message:`${x} (${A.line}:${A.column+1})
|
|
16
|
-
|
|
17
|
-
${T.join(`
|
|
18
|
-
`)}`,markLine:A.line-1,markColumn:A.column,hash:{text:"",token:null,line:A.line-1,loc:{first_line:A.line,last_line:A.line,first_column:A.column,last_column:A.column+1},expected:[]}}}catch{}throw l&&(u.message=l.message,u.mark.line=l.markLine,u.mark.column=l.markColumn,u.hash=l.hash),u}addSingleLink(i,n,r,u){const a={start:i,end:n,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};oe.info("abc78 Got edge...",a);const h=r.text;if(h!==void 0&&(a.text=this.sanitizeText(h.text.trim()),a.text.startsWith('"')&&a.text.endsWith('"')&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=this.sanitizeNodeLabelType(h.type)),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length,r.edgeSemantic&&(a.edgeSemantic=r.edgeSemantic)),u&&!this.edges.some(g=>g.id===u))a.id=u,a.isUserDefinedId=!0;else{const g=this.edges.filter(p=>p.start===a.start&&p.end===a.end);g.length===0?a.id=Rt(a.start,a.end,{counter:0,prefix:"L"}):a.id=Rt(a.start,a.end,{counter:g.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))oe.info("Pushing edge..."),this.edges.push(a);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
19
|
-
|
|
20
|
-
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
21
|
-
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
22
|
-
You have to call mermaid.initialize.`)}isLinkData(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,n,r){const u=this.isLinkData(r)?r.id.replace("@",""):void 0;oe.info("addLink",i,n,u);for(const l of i)for(const c of n){const a=l===i[i.length-1],h=c===n[0];a&&h?this.addSingleLink(l,c,r,u):this.addSingleLink(l,c,r,void 0)}}updateLinkInterpolate(i,n){i.forEach(r=>{if(r==="default"){this.edges.defaultInterpolate=n;return}if(typeof r=="number"&&r>=this.edges.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[r].interpolate=n})}updateLink(i,n){i.forEach(r=>{if(typeof r=="number"&&r>=this.edges.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?this.edges.defaultStyle=n:(this.edges[r].style=n,(this.edges[r]?.style?.length??0)>0&&!this.edges[r]?.style?.some(u=>u?.startsWith("fill"))&&this.edges[r]?.style?.push("fill:none"))})}addClass(i,n){const r=n.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(u=>{let l=this.classes.get(u);l===void 0&&(l={id:u,styles:[],textStyles:[]},this.classes.set(u,l)),r?.forEach(c=>{if(/color/.exec(c)){const a=c.replace("fill","bgFill");l.textStyles.push(a)}l.styles.push(c)})})}setDirection(i){this.direction=i.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,n){for(const r of i.split(",")){const u=this.vertices.get(r);u&&u.classes.push(n);const l=this.edges.find(a=>a.id===r);l&&l.classes.push(n);const c=this.subGraphLookup.get(r);c&&c.classes.push(n)}}setTooltip(i,n){if(n!==void 0){n=this.sanitizeText(n);for(const r of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(r):r,n)}}setClickFun(i,n,r){if(Ce().securityLevel!=="loose"||n===void 0)return;let u=[];if(typeof r=="string"){u=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let c=0;c<u.length;c++){let a=u[c].trim();a.startsWith('"')&&a.endsWith('"')&&(a=a.substr(1,a.length-2)),u[c]=a}}u.length===0&&u.push(i);const l=this.vertices.get(i);l&&(l.haveCallback=!0,this.funs.push(()=>{const c=this.lookUpDomId(i),a=document.querySelector(`[id="${c}"]`);a!==null&&a.addEventListener("click",()=>{Gt.runFunc(n,...u)},!1)}))}setLink(i,n,r){i.split(",").forEach(u=>{const l=this.vertices.get(u);l!==void 0&&(l.link=Gt.formatUrl(n,this.config),l.linkTarget=r)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,n,r){i.split(",").forEach(u=>{this.setClickFun(u,n,r)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(n=>{n(i)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(i){return Y1.has(i.type)}getTools(){const i=[];for(const n of this.vertices.values())this.isToolDefinition(n)&&i.push(n);return i}getClasses(){return this.classes}setupToolTips(i){const n=U1();Ot(i).select("svg").selectAll("g.node").on("mouseover",l=>{const c=Ot(l.currentTarget),a=c.attr("title");if(a===null)return;const h=l.currentTarget?.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(c.attr("title")).style("left",window.scrollX+h.left+(h.right-h.left)/2+"px").style("top",window.scrollY+h.bottom+"px"),n.html(B1.sanitize(a)),c.classed("hover",!0)}).on("mouseout",l=>{n.transition().duration(500).style("opacity",0),Ot(l.currentTarget).classed("hover",!1)})}clear(i="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=Ce(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,M1()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,n,r,u){let l=i?.text?.trim(),c=r?.text;i===r&&r?.text&&/\s/.exec(r.text)&&(l=void 0);const h=k(C=>{const M={boolean:{},number:{},string:{}},T=[];let m;return{nodeList:C.filter(function(f){const B=typeof f;return f.stmt&&f.stmt==="dir"?(m=f.value,!1):f.trim()===""?!1:B in M?M[B].hasOwnProperty(f)?!1:M[B][f]=!0:T.includes(f)?!1:T.push(f)}),dir:m}},"uniq")(n.flat()),g=h.nodeList;let p=h.dir;const A=Ce().flowchart??{};if(p=p??(A.inheritDir?this.getDirection()??Ce().direction??void 0:void 0),this.version==="gen-1")for(let C=0;C<g.length;C++)g[C]=this.lookUpDomId(g[C]);l=l??"subGraph"+this.subCount,c=c||"",c=this.sanitizeText(c),this.subCount=this.subCount+1;const x={id:l,nodes:g.filter(C=>C!==l&&!this.globalNodes.has(C)),title:c.trim(),classes:[],dir:p,labelType:this.sanitizeNodeLabelType(r?.type),type:u??"flow"};oe.info("Adding",x.id,x.nodes,x.dir),x.nodes=this.makeUniq(x,this.subGraphs).nodes;const L=this.getPosForId(l);if(L!==-1){const C=this.subGraphs[L];for(const M of x.nodes)C.nodes.includes(M)||C.nodes.push(M);x.title&&(C.title=x.title),x.dir&&(C.dir=x.dir),x.type&&(C.type=x.type),this.subGraphLookup.set(l,C)}else this.subGraphs.push(x),this.subGraphLookup.set(l,x);return l}addGlobal(i){for(const n of i.flat()){if(typeof n!="string")continue;const r=n.trim();r!==""&&this.globalNodes.add(r)}for(const n of this.subGraphs)n.nodes=n.nodes.filter(r=>!this.globalNodes.has(r))}getPosForId(i){for(const[n,r]of this.subGraphs.entries())if(r.id===i)return n;return-1}indexNodes2(i,n){const r=this.subGraphs[n].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=n,this.subGraphs[n].id===i)return{result:!0,count:0};let u=0,l=1;for(;u<r.length;){const c=this.getPosForId(r[u]);if(c>=0){const a=this.indexNodes2(i,c);if(a.result)return{result:!0,count:l+a.count};l=l+a.count}u=u+1}return{result:!1,count:l}}getDepthFirstPos(i){return this.posCrossRef[i]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}addConnector(i,n){const r=i?.text?.trim();if(!r)return"";const u=n?.text?.trim()??"",l=u.length>0?this.sanitizeText(u):r;let c=this.connectors.get(r);return c?u.length>0&&(c.text=l):(c={id:r,labelType:"text",domId:n1+r+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:l},this.connectors.set(r,c),this.vertices.set(r,c),this.vertexCounter++),r}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}computeEdgeSemantic(i,n){if(i==="arrow_point"&&n==="normal")return"sequence";if(i==="arrow_cross"&&n==="normal")return"failure";if(i==="arrow_open"&&n==="dotted")return"reference"}destructStartLink(i){const n=i.trim(),r="arrow_open";let u="normal";return n.includes(".")&&(u="dotted"),{type:r,stroke:u}}countChar(i,n){const r=n.length;let u=0;for(let l=0;l<r;++l)n[l]===i&&++u;return u}destructEndLink(i){const n=i.trim();let r=n.slice(0,-1),u="arrow_open";switch(n.slice(-1)){case"x":u="arrow_cross";break;case">":u="arrow_point";break;case"-":case".":u="arrow_open",r=n;break}let l="normal",c=r.length-1;const a=this.countChar(".",r);return a>0&&(l="dotted",c=a),{type:u,stroke:l,length:c}}destructLink(i,n){const r=this.destructEndLink(i);let u;return n?(u=this.destructStartLink(n),u.stroke!==r.stroke?{type:"INVALID",stroke:"INVALID"}:(u.type=r.type,u.length=r.length,{...u,edgeSemantic:this.computeEdgeSemantic(u.type,u.stroke)})):{...r,edgeSemantic:this.computeEdgeSemantic(r.type,r.stroke)}}exists(i,n){for(const r of i)if(r.nodes.includes(n))return!0;return!1}makeUniq(i,n){const r=[];return i.nodes.forEach((u,l)=>{this.exists(n,u)||r.push(i.nodes[l])}),{nodes:r}}getTypeFromVertex(i){const n=typeof i.type=="string"?et(i.type):i.type;switch(n){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return n}}findNode(i,n){return i.find(r=>r.id===n)}destructEdgeType(i){let n="none",r="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":r=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":n=i.replace("double_",""),r=n;break}return{arrowTypeStart:n,arrowTypeEnd:r}}addNodeFromVertex(i,n,r,u,l,c){const a=r.get(i.id),h=u.get(i.id)??!1,g=this.findNode(n,i.id);if(g)g.cssStyles=i.styles,g.cssCompiledStyles=this.getCompiledStyles(i.classes),g.cssClasses=i.classes.join(" ");else{const p={id:i.id,label:i.text,labelType:i.labelType,labelStyle:"",parentId:a,padding:l.flowchart?.padding||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:c,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),metadata:i.metadata};h?n.push({...p,isGroup:!0,shape:"rect"}):n.push({...p,isGroup:!1,shape:this.getTypeFromVertex(i),wrappingWidth:l.agentflow?.wrappingWidth,minWidth:l.agentflow?.minNodeWidth})}}getCompiledStyles(i){let n=[];for(const r of i){const u=this.classes.get(r);u?.styles&&(n=[...n,...u.styles??[]].map(l=>l.trim())),u?.textStyles&&(n=[...n,...u.textStyles??[]].map(l=>l.trim()))}return n}runPostParseValidators(){this.postParseValidationRun||(this.postParseValidationRun=!0)}getData(){this.runPostParseValidators();const i=Ce(),n=[],r=[],u=this.getSubGraphs(),l=new Map,c=new Map,a=new Set,h=new Map,g=k((d,f,B=new Set)=>{if(B.has(d))return;B.add(d);const R=this.subGraphLookup.get(d);if(R)for(const se of R.nodes)se===f||B.has(se)||(a.add(se),h.set(se,f),g(se,f,B))},"collectDescendants");for(const d of u)d.metadata?.view==="collapsed"&&!a.has(d.id)&&g(d.id,d.id);const p=k((d,f)=>{const B=new Set;let R=f;for(;R!==void 0&&!B.has(R);){if(R===d)return!0;B.add(R),R=l.get(R)}return!1},"wouldCloseContainmentCycle");for(let d=u.length-1;d>=0;d--){const f=u[d];if(!a.has(f.id)){f.nodes.length>0&&c.set(f.id,!0);for(const B of f.nodes){if(p(B,f.id)){this.emitWarning(tt.CONTAINMENT_VIOLATION,`Container "${f.id}" cannot contain "${B}" because "${B}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:B});continue}l.set(B,f.id)}}}for(let d=u.length-1;d>=0;d--){const f=u[d];if(a.has(f.id))continue;if(f.metadata?.view==="collapsed"){const R={...f.metadata,containerType:f.type};n.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:l.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"collapsedGroup",dir:f.dir,isGroup:!1,look:i.look,metadata:R})}else n.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:l.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:q1[f.type??"flow"],dir:f.dir,isGroup:!0,look:i.look,metadata:f.metadata})}this.getVertices().forEach(d=>{a.has(d.id)||this.addNodeFromVertex(d,n,l,c,i,i.look||"classic")});const x=this.getEdges();x.forEach((d,f)=>{const B=h.get(d.start)??d.start,R=h.get(d.end)??d.end;if(B===R&&d.start!==d.end)return;const{arrowTypeStart:se,arrowTypeEnd:de}=this.destructEdgeType(d.type),le=[...x.defaultStyle??[]];d.style&&le.push(...d.style);const O={id:Rt(B,R,{counter:f,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:B,end:R,type:d.type??"normal",label:d.text,labelType:d.labelType,labelpos:"c",thickness:d.stroke,minlen:d.length,classes:d?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":se,arrowTypeEnd:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":de,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(d.classes),labelStyle:le,style:le,pattern:d.stroke,look:i.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||i.flowchart?.curve,metadata:d.metadata};r.push(O)}),r1(n,this);const L=new Map,C=new Map;for(const d of u){const f=l.get(d.id);f!==void 0&&C.set(f,[...C.get(f)??[],d.id])}let M=0;const T=k(d=>{if(!L.has(d)){L.set(d,M++);for(const f of C.get(d)??[])T(f)}},"walkContainers");for(const d of u)l.get(d.id)===void 0&&T(d.id);const m=new Set(this.getConnectors().map(d=>d.id));return c1(n,d=>{if(m.has(d))return"connector";const f=this.vertices.get(d);return f?this.deriveVertexKind(f,et(f.type)):void 0},L),{nodes:n,edges:r,other:{},config:i,connectors:this.getConnectors()}}defaultConfig(){return y1.flowchart}deriveVertexKind(i,n){return this.isToolDefinition(i)?"tool":n==="hexagon"||n==="hex"?"action":n==="lean-right"||n==="lean_right"?"input":n==="lin-doc"||n==="lined-document"?"refdoc":n==="diamond"?"decision":"task"}getSemanticModel(){this.runPostParseValidators();const i=new Set(this.subGraphs.map(a=>a.id)),n=[],r=[];for(const[a,h]of this.vertices){if(i.has(a))continue;if(h.isConnector){const A={id:a};if(h.text!==void 0&&h.text!==a&&(A.title=h.text),h.metadata&&Object.keys(h.metadata).length>0){const x={};for(const[L,C]of Object.entries(h.metadata))Pt.has(L)||(x[L]=C);Object.keys(x).length>0&&(A.metadata=x)}r.push(A);continue}const g={id:a};h.text!==void 0&&(g.label=h.text);const p=typeof h.type=="string"?et(h.type):h.type;if(p!==void 0&&(g.shape=p),g.vertexKind=this.deriveVertexKind(h,p),h.metadata&&Object.keys(h.metadata).length>0){const A={};for(const[x,L]of Object.entries(h.metadata))Pt.has(x)||(A[x]=L);Object.keys(A).length>0&&(g.metadata=A)}n.push(g)}const u=this.edges.map(a=>{const h={start:a.start,end:a.end};return a.id!==void 0&&(h.id=a.id),typeof a.text=="string"&&a.text.length>0&&(h.label=a.text),a.type!==void 0&&(h.type=a.type),a.stroke!==void 0&&(h.stroke=a.stroke),a.edgeSemantic!==void 0&&(h.edgeSemantic=a.edgeSemantic),a.length!==void 0&&(h.length=a.length),a.metadata&&Object.keys(a.metadata).length>0&&(h.metadata={...a.metadata}),h}),l=this.subGraphs.map(a=>{const h={id:a.id,nodes:[...a.nodes]};if(a.type!==void 0&&(h.type=a.type),a.title!==void 0&&(h.title=a.title),a.dir!==void 0&&(h.direction=a.dir),a.metadata&&Object.keys(a.metadata).length>0){const g={};for(const[p,A]of Object.entries(a.metadata))Pt.has(p)||(g[p]=A);Object.keys(g).length>0&&(h.metadata=g)}return h}),c={vertices:n,edges:u,subGraphs:l,connectors:r,diagnostics:this.diagnostics};return this.direction!==void 0&&(c.direction=this.direction),c}setFrontmatterLineOffset(i){this.frontmatterLineOffset=i??0}toElementPosition(i){const n=i?.first_line??0,r=i?.first_column??0,u=i?.last_line??n,l=i?.last_column??r,[c,a]=i?.range??[0,0];return{startLine:n+this.frontmatterLineOffset,startColumn:r,endLine:u+this.frontmatterLineOffset,endColumn:l,startIndex:c,endIndex:a}}pushMapping(i,n,r){if(!i)return;const u={id:i,type:n,position:this.toElementPosition(r)};return this.elementMappings.push(u),u}addVertexMapping(i,n,r,u){const l=this.pushMapping(i,"vertex",u);l&&r==null&&this.bareVertexMappings.add(l)}extendVertexMapping(i,n){if(!i||!n)return;const r=this.toElementPosition(n);for(let u=this.elementMappings.length-1;u>=0;u--){const l=this.elementMappings[u];if(l.type==="vertex"&&l.id===i){this.bareVertexMappings.has(l)&&(l.type="attachment",this.bareVertexMappings.delete(l)),(r.endLine>l.position.endLine||r.endLine===l.position.endLine&&r.endColumn>l.position.endColumn)&&(l.position.endLine=r.endLine,l.position.endColumn=r.endColumn,l.position.endIndex=r.endIndex);return}}this.pushMapping(i,"attachment",n)}addEdgeMapping(i,n,r,u){const l=Array.isArray(n)?n.map(a=>typeof a=="string"?a:a?.id??"").filter(Boolean):[],c=l.length>0?l.join(">"):"edge";this.pushMapping(c,"edge",u)}addSubgraphMapping(i,n,r,u){const l=(typeof i=="string"?i:i?.text)??"",c=this.toElementPosition(r),a=u?this.toElementPosition(u):c;l&&this.elementMappings.push({id:l,type:"subgraph",position:{startLine:c.startLine,startColumn:c.startColumn,endLine:a.endLine,endColumn:a.endColumn,startIndex:c.startIndex,endIndex:a.endIndex}})}addConnectorMapping(i,n,r,u){const l=i?.text?.trim()??"";if(!l)return;const c=this.toElementPosition(r),a=u?this.toElementPosition(u):c;this.elementMappings.push({id:l,type:"connector",position:{startLine:c.startLine,startColumn:c.startColumn,endLine:a.endLine,endColumn:a.endColumn,startIndex:c.startIndex,endIndex:a.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(i){return this.elementMappings.find(n=>n.id===i)}getElementsOnLine(i){return this.elementMappings.filter(n=>i>=n.position.startLine&&i<=n.position.endLine)}getElementAtPosition(i,n){const r=this.elementMappings.filter(l=>{const{startLine:c,startColumn:a,endLine:h,endColumn:g}=l.position;return!(i<c||i>h||i===c&&n<a||i===h&&n>g)});if(r.length===0)return;const u=k(({position:l})=>[l.endLine-l.startLine,l.endColumn-l.startColumn],"span");return r.reduce((l,c)=>{const[a,h]=u(l),[g,p]=u(c);return g!==a?g<a?c:l:p<h?c:l})}getMappingStats(){let i=0,n=0,r=0,u=0,l=0;for(const c of this.elementMappings)c.type==="vertex"?i++:c.type==="edge"?n++:c.type==="subgraph"?r++:c.type==="connector"?u++:c.type==="attachment"&&l++;return{vertices:i,edges:n,subgraphs:r,connectors:u,attachments:l,totalElements:this.elementMappings.length}}emitDiagnostic(i,n,r,u){const l=u?.nodeId??u?.edgeId,c=l?this.getElementById(l):void 0,a={id:i,severity:n,message:r,...u?.nodeId?{nodeId:u.nodeId}:{},...u?.edgeId&&!u?.nodeId?{edgeId:u.edgeId}:{},...c?{position:c.position}:{}};if(this.diagnostics.some(p=>p.id===a.id&&p.severity===a.severity&&p.message===a.message&&p.nodeId===a.nodeId&&p.edgeId===a.edgeId))return;this.diagnostics.push(a);const g=`agentflow[${i}]: ${r}`;n==="error"?oe.error(g):oe.warn(g)}emitWarning(i,n,r){this.emitDiagnostic(i,"warning",n,r)}emitError(i,n,r){this.emitDiagnostic(i,"error",n,r)}getDiagnostics(){return[...this.diagnostics]}},k(Ze,"AgentFlowDB"),Ze),J1=k(function(s,i){return i.db.getClasses()},"getClasses"),Q1=k(async function(s,i,n,r){oe.debug("Drawing agentflow diagram",i);const{securityLevel:u,agentflow:l,layout:c}=Ce();r.db.setDiagramId(i),oe.debug("Before getData: ");const a=r.db.getData();oe.debug("Data: ",a);const h=E1(i,u),g=r.db.getDirection();a.type=r.type,a.layoutAlgorithm=S1(c),a.layoutAlgorithm==="dagre"&&c==="elk"&&oe.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),a.direction=g,a.nodeSpacing=l?.nodeSpacing||50,a.rankSpacing=l?.rankSpacing||50,a.markers=["point","circle","cross","hierarchy"],a.diagramId=i,oe.debug("REF1:",a),await x1(a,h);const p=l?.diagramPadding??8;Gt.insertTitle(h,"agentflowTitleText",l?.titleTopMargin??0,r.db.getDiagramTitle()),C1(h,p,"agentflow",l?.useMaxWidth??!0)},"draw"),Z1={getClasses:J1,draw:Q1},Ut=(function(){var s=k(function(Te,b,E,S){for(E=E||{},S=Te.length;S--;E[Te[S]]=b);return E},"o"),i=[1,5],n=[1,4],r=[1,3],u=[1,6],l=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],c=[2,2],a=[1,15],h=[1,16],g=[1,17],p=[1,18],A=[1,19],x=[1,26],L=[1,27],C=[1,28],M=[1,30],T=[1,31],m=[1,32],d=[1,55],f=[1,54],B=[1,34],R=[1,35],se=[1,36],de=[1,37],le=[1,38],O=[1,50],G=[1,52],U=[1,48],j=[1,53],z=[1,49],W=[1,56],K=[1,51],H=[1,57],Y=[1,58],De=[1,39],_e=[1,40],ve=[1,41],Fe=[1,42],Ve=[1,43],Se=[1,64],D=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Z=[1,70],$=[1,68],ee=[1,67],te=[1,69],Me=[8,9,10,12,78,80,81],ye=[1,88],we=[1,101],Ne=[1,106],Re=[1,105],Oe=[1,102],Pe=[1,98],Ge=[1,104],Ue=[1,100],je=[1,107],ze=[1,103],We=[1,108],Ke=[1,99],Ie=[8,9,10,11,12,43,78,80,81],X=[8,9,10,11,12,43,49,78,80,81],ne=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],jt=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],He=[47,63,92,105,108,109,112,114,117,118,119],zt=[1,131],Wt=[1,132],st=[1,134],it=[1,133],Kt=[47,63,65,77,92,105,108,109,112,114,117,118,119],nt=[1,143],rt=[1,157],at=[1,158],ot=[1,159],ut=[1,162],lt=[1,161],ct=[1,160],dt=[1,145],ht=[1,147],pt=[1,151],Ht=[1,139],Yt=[1,140],ft=[1,152],gt=[1,153],mt=[1,154],bt=[1,155],At=[1,156],kt=[1,163],Et=[1,164],Ct=[1,141],St=[1,142],xt=[1,149],Tt=[1,144],Dt=[1,148],_t=[1,146],Ye=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],qt=[1,168],qe=[1,170],P=[8,9,10,12],re=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],_=[1,190],J=[1,186],Q=[1,187],v=[1,191],F=[1,188],V=[1,189],Xe=[80,119,122],y=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],Xt=[11,109],xe=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],he=[1,269],pe=[1,267],fe=[1,271],ge=[1,265],me=[1,266],be=[1,268],Ae=[1,270],ke=[1,272],Je=[1,292],Jt=[8,9,10,12,109],ce=[8,9,10,11,12,63,87,108,109,112,113,114,115],Bt={trace:k(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:k(function(b,E,S,o,w,e,I){var t=e.length-1;switch(w){case 2:this.$=[];break;case 3:(!Array.isArray(e[t])||e[t].length>0)&&e[t-1].push(e[t]),this.$=e[t-1];break;case 4:case 198:this.$=e[t];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:o.setDirection("TB"),this.$="TB";break;case 14:o.setDirection(e[t-1]),this.$=e[t-1];break;case 32:this.$=e[t-1].nodes;break;case 38:this.$=o.addSubGraph(e[t-6],e[t-1],e[t-4],"flow"),o.addSubgraphMapping&&o.addSubgraphMapping(e[t-6],e[t-4],I[t-8],I[t]);break;case 39:this.$=o.addSubGraph(e[t-7],e[t-1],e[t-5],"flow"),o.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,e[t-3],I[t-3]),o.addSubgraphMapping&&o.addSubgraphMapping(e[t-7],e[t-5],I[t-9],I[t]);break;case 40:this.$=o.addSubGraph(e[t-3],e[t-1],{text:"",type:"text"},"flow"),o.addSubgraphMapping&&o.addSubgraphMapping(e[t-3],{text:"",type:"text"},I[t-5],I[t]);break;case 41:this.$=o.addSubGraph(e[t-4],e[t-1],{text:"",type:"text"},"flow"),o.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,e[t-3],I[t-3]),o.addSubgraphMapping&&o.addSubgraphMapping(e[t-4],{text:"",type:"text"},I[t-6],I[t]);break;case 42:this.$=o.addSubGraph(void 0,e[t-1],void 0,"flow"),o.addSubgraphMapping&&o.addSubgraphMapping(void 0,void 0,I[t-3],I[t]);break;case 43:o.addGlobal(e[t-1]),this.$=[];break;case 44:this.$=o.addConnector(e[t-4],e[t-2]),o.addConnectorMapping&&o.addConnectorMapping(e[t-4],e[t-2],I[t-6],I[t]);break;case 45:this.$=o.addConnector(e[t-5],e[t-3]),o.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,e[t-1],I[t-1]),o.addConnectorMapping&&o.addConnectorMapping(e[t-5],e[t-3],I[t-7],I[t]);break;case 46:this.$=o.addConnector(e[t-1],{text:"",type:"text"}),o.addConnectorMapping&&o.addConnectorMapping(e[t-1],{text:"",type:"text"},I[t-3],I[t]);break;case 47:this.$=o.addConnector(e[t-2],{text:"",type:"text"}),o.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,e[t-1],I[t-1]),o.addConnectorMapping&&o.addConnectorMapping(e[t-2],{text:"",type:"text"},I[t-4],I[t]);break;case 49:this.$=e[t].trim(),o.setAccTitle(this.$);break;case 50:case 51:this.$=e[t].trim(),o.setAccDescription(this.$);break;case 56:this.$=e[t-1]+e[t];break;case 57:this.$=e[t];break;case 58:o.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t],I[t]),o.extendVertexMapping&&o.extendVertexMapping(e[t-1][e[t-1].length-1],I[t]),o.addLink(e[t-3].stmt,e[t-1],e[t-2]),o.addEdgeMapping&&o.addEdgeMapping(e[t-3].stmt,e[t-1],e[t-2],this._$),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 59:o.addLink(e[t-2].stmt,e[t],e[t-1]),o.addEdgeMapping&&o.addEdgeMapping(e[t-2].stmt,e[t],e[t-1],this._$),this.$={stmt:e[t],nodes:e[t].concat(e[t-2].nodes)};break;case 60:o.addLink(e[t-3].stmt,e[t-1],e[t-2]),o.addEdgeMapping&&o.addEdgeMapping(e[t-3].stmt,e[t-1],e[t-2],this._$),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 61:this.$={stmt:e[t-1],nodes:e[t-1]};break;case 62:o.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t],I[t]),o.extendVertexMapping&&o.extendVertexMapping(e[t-1][e[t-1].length-1],I[t]),this.$={stmt:e[t-1],nodes:e[t-1],shapeData:e[t]};break;case 63:this.$={stmt:e[t],nodes:e[t]};break;case 64:this.$=[e[t]];break;case 65:o.addVertex(e[t-5][e[t-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-4],I[t-4]),o.extendVertexMapping&&o.extendVertexMapping(e[t-5][e[t-5].length-1],I[t-4]),this.$=e[t-5].concat(e[t]);break;case 66:this.$=e[t-4].concat(e[t]);break;case 67:this.$=e[t];break;case 68:this.$=e[t-2],o.setClass(e[t-2],e[t]);break;case 69:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"square"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"square",this._$);break;case 70:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"doublecircle"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"doublecircle",this._$);break;case 71:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"circle"),o.addVertexMapping&&o.addVertexMapping(e[t-5],e[t-2],"circle",this._$);break;case 72:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"ellipse"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"ellipse",this._$);break;case 73:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"stadium"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"stadium",this._$);break;case 74:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"subroutine"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"subroutine",this._$);break;case 75:this.$=e[t-7],o.addVertex(e[t-7],e[t-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[t-5],e[t-3]]])),o.addVertexMapping&&o.addVertexMapping(e[t-7],e[t-1],"rect",this._$);break;case 76:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"cylinder"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"cylinder",this._$);break;case 77:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"round"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"round",this._$);break;case 78:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"diamond"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"diamond",this._$);break;case 79:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"hexagon"),o.addVertexMapping&&o.addVertexMapping(e[t-5],e[t-2],"hexagon",this._$);break;case 80:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"odd"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"odd",this._$);break;case 81:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"trapezoid"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"trapezoid",this._$);break;case 82:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"inv_trapezoid"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"inv_trapezoid",this._$);break;case 83:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_right"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"lean_right",this._$);break;case 84:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_left"),o.addVertexMapping&&o.addVertexMapping(e[t-3],e[t-1],"lean_left",this._$);break;case 85:this.$=e[t],o.addVertex(e[t]),o.addVertexMapping&&o.addVertexMapping(e[t],void 0,void 0,this._$);break;case 86:e[t-1].text=e[t],this.$=e[t-1];break;case 87:case 88:e[t-2].text=e[t-1],this.$=e[t-2];break;case 89:this.$=e[t];break;case 90:var N=o.destructLink(e[t],e[t-2]);this.$={type:N.type,stroke:N.stroke,length:N.length,edgeSemantic:N.edgeSemantic,text:e[t-1]};break;case 91:var N=o.destructLink(e[t],e[t-2]);this.$={type:N.type,stroke:N.stroke,length:N.length,edgeSemantic:N.edgeSemantic,text:e[t-1],id:e[t-3]};break;case 92:this.$={text:e[t],type:"text"};break;case 93:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 94:this.$={text:e[t],type:"string"};break;case 95:this.$={text:e[t],type:"markdown"};break;case 96:var N=o.destructLink(e[t]);this.$={type:N.type,stroke:N.stroke,length:N.length,edgeSemantic:N.edgeSemantic};break;case 97:var N=o.destructLink(e[t]);this.$={type:N.type,stroke:N.stroke,length:N.length,edgeSemantic:N.edgeSemantic,id:e[t-1]};break;case 98:this.$=e[t-1];break;case 99:this.$={text:e[t],type:"text"};break;case 100:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 101:this.$={text:e[t],type:"string"};break;case 102:case 119:this.$={text:e[t],type:"markdown"};break;case 116:this.$={text:e[t],type:"text"};break;case 117:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 118:this.$={text:e[t],type:"text"};break;case 120:this.$=e[t-4],o.addClass(e[t-2],e[t]);break;case 121:this.$=e[t-4],o.setClass(e[t-2],e[t]);break;case 122:case 130:this.$=e[t-1],o.setClickEvent(e[t-1],e[t]);break;case 123:case 131:this.$=e[t-3],o.setClickEvent(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 124:this.$=e[t-2],o.setClickEvent(e[t-2],e[t-1],e[t]);break;case 125:this.$=e[t-4],o.setClickEvent(e[t-4],e[t-3],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 126:this.$=e[t-2],o.setLink(e[t-2],e[t]);break;case 127:this.$=e[t-4],o.setLink(e[t-4],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 128:this.$=e[t-4],o.setLink(e[t-4],e[t-2],e[t]);break;case 129:this.$=e[t-6],o.setLink(e[t-6],e[t-4],e[t]),o.setTooltip(e[t-6],e[t-2]);break;case 132:this.$=e[t-1],o.setLink(e[t-1],e[t]);break;case 133:this.$=e[t-3],o.setLink(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 134:this.$=e[t-3],o.setLink(e[t-3],e[t-2],e[t]);break;case 135:this.$=e[t-5],o.setLink(e[t-5],e[t-4],e[t]),o.setTooltip(e[t-5],e[t-2]);break;case 136:this.$=e[t-4],o.addVertex(e[t-2],void 0,void 0,e[t]);break;case 137:this.$=e[t-4],o.updateLink([e[t-2]],e[t]);break;case 138:this.$=e[t-4],o.updateLink(e[t-2],e[t]);break;case 139:this.$=e[t-8],o.updateLinkInterpolate([e[t-6]],e[t-2]),o.updateLink([e[t-6]],e[t]);break;case 140:this.$=e[t-8],o.updateLinkInterpolate(e[t-6],e[t-2]),o.updateLink(e[t-6],e[t]);break;case 141:this.$=e[t-6],o.updateLinkInterpolate([e[t-4]],e[t]);break;case 142:this.$=e[t-6],o.updateLinkInterpolate(e[t-4],e[t]);break;case 143:case 145:this.$=[e[t]];break;case 144:case 146:e[t-2].push(e[t]),this.$=e[t-2];break;case 148:this.$=e[t-1]+e[t];break;case 196:this.$=e[t];break;case 197:this.$=e[t-1]+""+e[t];break;case 199:this.$=e[t-1]+""+e[t];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:i,10:n,11:r,13:u},{1:[3]},s(l,c,{5:7}),{4:8,8:i,10:n,11:r,13:u},{4:9,8:i,10:n,11:r,13:u},{4:10,8:i,10:n,11:r,13:u},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:a,9:h,10:g,11:p,12:A,21:20,23:21,24:22,25:23,26:24,27:25,28:x,35:L,36:C,37:29,38:M,40:T,42:m,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:de,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},s(l,[2,10]),s(l,[2,11]),s(l,[2,12]),s(l,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:Se,16:59,19:62},s(D,[2,3]),s(D,[2,4]),s(D,[2,5]),s(D,[2,6]),s(D,[2,7]),s(D,[2,8]),s(D,[2,9]),{8:Z,9:$,10:ee,12:te,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:Z,9:$,10:ee,12:te,22:75},{8:Z,9:$,10:ee,12:te,22:76},{8:Z,9:$,10:ee,12:te,22:77},{8:Z,9:$,10:ee,12:te,22:78},{8:Z,9:$,10:ee,12:te,22:79},{8:Z,9:$,10:ee,11:[1,80],12:te,22:81},{8:Z,9:$,10:ee,12:te,22:82},{11:[1,83]},s(D,[2,48]),{39:[1,84]},{41:[1,85]},s(D,[2,51]),s(Me,[2,63],{19:86,34:87,11:Se,43:ye}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:we,47:Ne,63:Re,83:[1,96],92:Oe,98:[1,93],100:[1,94],104:95,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke,123:97},s(D,[2,200]),s(D,[2,201]),s(D,[2,202]),s(D,[2,203]),s(D,[2,204]),s(Ie,[2,64]),s(Ie,[2,67],{49:[1,109]}),s(X,[2,85],{116:122,30:[1,110],47:d,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:f,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:O,105:G,108:U,109:j,112:z,114:W,117:K,118:H,119:Y}),s(ne,[2,196]),s(ne,[2,157]),s(ne,[2,158]),s(ne,[2,159]),s(ne,[2,160]),s(ne,[2,161]),s(ne,[2,162]),s(ne,[2,163]),s(ne,[2,164]),s(ne,[2,165]),s(ne,[2,166]),s(ne,[2,167]),s(l,[2,14]),s(l,[2,20]),s(l,[2,21]),{10:[1,123]},s(l,[2,23]),s(jt,[2,31],{19:124,11:Se}),s(D,[2,32]),{45:125,46:44,47:d,48:45,50:46,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},s(D,[2,52]),s(D,[2,53]),s(D,[2,54]),s(D,[2,55]),s(He,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:zt,84:Wt,119:st,122:it},{78:[1,135],80:[1,136]},s(Kt,[2,96]),s(D,[2,33]),s(D,[2,34]),s(D,[2,35]),s(D,[2,36]),s(D,[2,37]),{11:nt,13:rt,15:at,28:ot,29:137,33:ut,35:lt,36:ct,47:dt,63:ht,78:pt,83:Ht,84:Yt,86:150,87:ft,88:gt,89:mt,90:bt,91:At,92:kt,93:Et,94:138,108:Ct,112:St,114:xt,117:Tt,118:Dt,119:_t},s(Ye,c,{5:165}),s(Ye,c,{5:166}),{11:nt,13:rt,15:at,28:ot,29:167,33:ut,35:lt,36:ct,47:dt,63:ht,78:pt,83:Ht,84:Yt,86:150,87:ft,88:gt,89:mt,90:bt,91:At,92:kt,93:Et,94:138,108:Ct,112:St,114:xt,117:Tt,118:Dt,119:_t},s(D,[2,49]),s(D,[2,50]),s(Me,[2,61],{47:qt}),s(Me,[2,62],{19:169,11:Se,43:qe}),s(Ie,[2,57]),{47:d,50:171,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},{105:[1,172],106:173,108:[1,174]},{47:d,50:175,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},{47:d,50:176,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},s(P,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},s(P,[2,130],{123:181,11:[1,180],15:we,47:Ne,63:Re,92:Oe,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke}),s(P,[2,132],{11:[1,182]}),s(re,[2,198]),s(re,[2,185]),s(re,[2,186]),s(re,[2,187]),s(re,[2,188]),s(re,[2,189]),s(re,[2,190]),s(re,[2,191]),s(re,[2,192]),s(re,[2,193]),s(re,[2,194]),s(re,[2,195]),{47:d,50:183,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},{31:184,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:192,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:194,53:[1,193],70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:195,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:196,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:197,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{112:[1,198]},{31:199,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:200,68:[1,201],70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:202,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:203,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{31:204,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},s(ne,[2,197]),s(l,[2,22]),s(jt,[2,30]),s(Me,[2,59],{34:205,19:206,11:Se,43:ye}),s(He,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{80:[1,210],82:211,119:st,122:it},s(Xe,[2,92]),s(Xe,[2,94]),s(Xe,[2,95]),s(Xe,[2,183]),s(Xe,[2,184]),{79:212,82:130,83:zt,84:Wt,119:st,122:it},s(Kt,[2,97]),{8:Z,9:$,10:ee,11:nt,12:te,13:rt,15:at,22:214,28:ot,30:[1,213],33:ut,34:215,35:lt,36:ct,43:ye,47:dt,63:ht,78:pt,86:150,87:ft,88:gt,89:mt,90:bt,91:At,92:kt,93:Et,94:216,108:Ct,112:St,114:xt,117:Tt,118:Dt,119:_t},s(y,[2,116]),s(y,[2,118]),s(y,[2,119]),s(y,[2,172]),s(y,[2,173]),s(y,[2,174]),s(y,[2,175]),s(y,[2,176]),s(y,[2,177]),s(y,[2,178]),s(y,[2,179]),s(y,[2,180]),s(y,[2,181]),s(y,[2,182]),s(y,[2,103]),s(y,[2,104]),s(y,[2,105]),s(y,[2,106]),s(y,[2,107]),s(y,[2,108]),s(y,[2,109]),s(y,[2,110]),s(y,[2,111]),s(y,[2,112]),s(y,[2,113]),s(y,[2,114]),s(y,[2,115]),{6:13,7:14,8:a,9:h,10:g,11:p,12:A,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,217],35:L,36:C,37:29,38:M,40:T,42:m,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:de,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},{6:13,7:14,8:a,9:h,10:g,11:p,12:A,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,218],35:L,36:C,37:29,38:M,40:T,42:m,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:de,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},{8:Z,9:$,10:ee,11:nt,12:te,13:rt,15:at,22:220,28:ot,30:[1,219],33:ut,34:221,35:lt,36:ct,43:ye,47:dt,63:ht,78:pt,86:150,87:ft,88:gt,89:mt,90:bt,91:At,92:kt,93:Et,94:216,108:Ct,112:St,114:xt,117:Tt,118:Dt,119:_t},{11:Se,19:222},{47:[1,223]},s(Ie,[2,56]),{11:[1,224],47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:122,117:K,118:H,119:Y},{11:[1,225]},{11:[1,226],109:[1,227]},s(Xt,[2,143]),{11:[1,228],47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:122,117:K,118:H,119:Y},{11:[1,229],47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:122,117:K,118:H,119:Y},{83:[1,230]},s(P,[2,124],{11:[1,231]}),s(P,[2,126],{11:[1,232]}),{83:[1,233]},s(re,[2,199]),{83:[1,234],101:[1,235]},s(Ie,[2,68],{116:122,47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,117:K,118:H,119:Y}),{32:[1,236],70:_,85:237,119:v,120:F,121:V},s(xe,[2,99]),s(xe,[2,101]),s(xe,[2,102]),s(xe,[2,168]),s(xe,[2,169]),s(xe,[2,170]),s(xe,[2,171]),{52:[1,238],70:_,85:237,119:v,120:F,121:V},{31:239,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{54:[1,240],70:_,85:237,119:v,120:F,121:V},{56:[1,241],70:_,85:237,119:v,120:F,121:V},{58:[1,242],70:_,85:237,119:v,120:F,121:V},{60:[1,243],70:_,85:237,119:v,120:F,121:V},{63:[1,244]},{67:[1,245],70:_,85:237,119:v,120:F,121:V},{69:[1,246],70:_,85:237,119:v,120:F,121:V},{31:247,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},{32:[1,248],70:_,85:237,119:v,120:F,121:V},{70:_,72:[1,249],74:[1,250],85:237,119:v,120:F,121:V},{70:_,72:[1,252],74:[1,251],85:237,119:v,120:F,121:V},s(Me,[2,58],{19:169,11:Se,43:qe}),s(Me,[2,60],{47:qt}),s(He,[2,88]),s(He,[2,87]),{65:[1,253],70:_,85:237,119:v,120:F,121:V},s(He,[2,90]),s(Xe,[2,93]),{80:[1,254],82:211,119:st,122:it},{31:255,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},s(Ye,c,{5:256}),{8:Z,9:$,10:ee,12:te,22:257,43:qe},s(y,[2,117]),s(D,[2,42]),s(D,[2,43]),{31:258,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},s(D,[2,46]),{8:Z,9:$,10:ee,12:te,22:259,43:qe},{46:260,47:d,48:45,50:46,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},{11:Se,19:261},{11:he,63:pe,87:fe,95:262,108:ge,110:263,111:264,112:me,113:be,114:Ae,115:ke},{11:he,63:pe,87:fe,95:273,107:[1,274],108:ge,110:263,111:264,112:me,113:be,114:Ae,115:ke},{11:he,63:pe,87:fe,95:275,107:[1,276],108:ge,110:263,111:264,112:me,113:be,114:Ae,115:ke},{108:[1,277]},{11:he,63:pe,87:fe,95:278,108:ge,110:263,111:264,112:me,113:be,114:Ae,115:ke},{47:d,50:279,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},s(P,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},s(P,[2,131]),s(P,[2,133],{11:[1,283]}),s(P,[2,134]),s(X,[2,69]),s(xe,[2,100]),s(X,[2,70]),{54:[1,284],70:_,85:237,119:v,120:F,121:V},s(X,[2,77]),s(X,[2,72]),s(X,[2,73]),s(X,[2,74]),{112:[1,285]},s(X,[2,76]),s(X,[2,78]),{69:[1,286],70:_,85:237,119:v,120:F,121:V},s(X,[2,80]),s(X,[2,81]),s(X,[2,83]),s(X,[2,82]),s(X,[2,84]),s([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),s(He,[2,91]),{32:[1,287],70:_,85:237,119:v,120:F,121:V},{6:13,7:14,8:a,9:h,10:g,11:p,12:A,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,288],35:L,36:C,37:29,38:M,40:T,42:m,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:de,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},s(Ye,c,{5:289}),{32:[1,290],70:_,85:237,119:v,120:F,121:V},s(D,[2,47]),s(Ie,[2,66]),{46:291,47:d,48:45,50:46,63:f,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y},s(P,[2,136],{109:Je}),s(Jt,[2,145],{111:293,11:he,63:pe,87:fe,108:ge,112:me,113:be,114:Ae,115:ke}),s(ce,[2,147]),s(ce,[2,149]),s(ce,[2,150]),s(ce,[2,151]),s(ce,[2,152]),s(ce,[2,153]),s(ce,[2,154]),s(ce,[2,155]),s(ce,[2,156]),s(P,[2,137],{109:Je}),{11:[1,294]},s(P,[2,138],{109:Je}),{11:[1,295]},s(Xt,[2,144]),s(P,[2,120],{109:Je}),s(P,[2,121],{116:122,47:d,63:f,92:O,105:G,108:U,109:j,112:z,114:W,117:K,118:H,119:Y}),s(P,[2,125]),s(P,[2,127],{11:[1,296]}),s(P,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:Z,9:$,10:ee,12:te,22:301,34:302,43:ye},s(D,[2,40]),{6:13,7:14,8:a,9:h,10:g,11:p,12:A,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,303],35:L,36:C,37:29,38:M,40:T,42:m,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:de,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},{8:Z,9:$,10:ee,12:te,22:304,34:305,43:ye},s(Ie,[2,65]),{11:he,63:pe,87:fe,108:ge,110:306,111:264,112:me,113:be,114:Ae,115:ke},s(ce,[2,148]),{15:we,47:Ne,63:Re,92:Oe,104:307,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke,123:97},{15:we,47:Ne,63:Re,92:Oe,104:308,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke,123:97},{101:[1,309]},s(P,[2,135]),s(X,[2,71]),{31:310,70:_,83:J,84:Q,85:185,119:v,120:F,121:V},s(X,[2,79]),s(Ye,c,{5:311}),{8:Z,9:$,10:ee,12:te,22:312,43:qe},s(D,[2,41]),s(D,[2,44]),{8:Z,9:$,10:ee,12:te,22:313,43:qe},s(Jt,[2,146],{111:293,11:he,63:pe,87:fe,108:ge,112:me,113:be,114:Ae,115:ke}),s(P,[2,141],{123:181,11:[1,314],15:we,47:Ne,63:Re,92:Oe,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke}),s(P,[2,142],{123:181,11:[1,315],15:we,47:Ne,63:Re,92:Oe,108:Pe,109:Ge,112:Ue,114:je,117:ze,118:We,119:Ke}),s(P,[2,129]),{32:[1,316],70:_,85:237,119:v,120:F,121:V},{6:13,7:14,8:a,9:h,10:g,11:p,12:A,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,317],35:L,36:C,37:29,38:M,40:T,42:m,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:de,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},s(Ye,c,{5:318}),s(D,[2,45]),{11:he,63:pe,87:fe,95:319,108:ge,110:263,111:264,112:me,113:be,114:Ae,115:ke},{11:he,63:pe,87:fe,95:320,108:ge,110:263,111:264,112:me,113:be,114:Ae,115:ke},s(X,[2,75]),s(D,[2,38]),{6:13,7:14,8:a,9:h,10:g,11:p,12:A,21:20,23:21,24:22,25:23,26:24,27:25,28:x,33:[1,321],35:L,36:C,37:29,38:M,40:T,42:m,45:33,46:44,47:d,48:45,50:46,63:f,87:B,88:R,89:se,90:de,91:le,92:O,105:G,108:U,109:j,112:z,114:W,116:47,117:K,118:H,119:Y,124:De,125:_e,126:ve,127:Fe,128:Ve},s(P,[2,139],{109:Je}),s(P,[2,140],{109:Je}),s(D,[2,39])],defaultActions:{},parseError:k(function(b,E){if(E.recoverable)this.trace(b);else{var S=new Error(b);throw S.hash=E,S}},"parseError"),parse:k(function(b){var E=this,S=[0],o=[],w=[null],e=[],I=this.table,t="",N=0,Qt=0,g1=2,Zt=1,m1=e.slice.call(arguments,1),q=Object.create(this.lexer),Le={yy:{}};for(var Mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Mt)&&(Le.yy[Mt]=this.yy[Mt]);q.setInput(b,Le.yy),Le.yy.lexer=q,Le.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var yt=q.yylloc;e.push(yt);var b1=q.options&&q.options.ranges;typeof Le.yy.parseError=="function"?this.parseError=Le.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function A1(ae){S.length=S.length-2*ae,w.length=w.length-ae,e.length=e.length-ae}k(A1,"popStack");function $t(){var ae;return ae=o.pop()||q.lex()||Zt,typeof ae!="number"&&(ae instanceof Array&&(o=ae,ae=o.pop()),ae=E.symbols_[ae]||ae),ae}k($t,"lex");for(var ie,Be,ue,wt,Qe={},Ft,Ee,e1,Vt;;){if(Be=S[S.length-1],this.defaultActions[Be]?ue=this.defaultActions[Be]:((ie===null||typeof ie>"u")&&(ie=$t()),ue=I[Be]&&I[Be][ie]),typeof ue>"u"||!ue.length||!ue[0]){var Nt="";Vt=[];for(Ft in I[Be])this.terminals_[Ft]&&Ft>g1&&Vt.push("'"+this.terminals_[Ft]+"'");q.showPosition?Nt="Parse error on line "+(N+1)+`:
|
|
23
|
-
`+q.showPosition()+`
|
|
24
|
-
Expecting `+Vt.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":Nt="Parse error on line "+(N+1)+": Unexpected "+(ie==Zt?"end of input":"'"+(this.terminals_[ie]||ie)+"'"),this.parseError(Nt,{text:q.match,token:this.terminals_[ie]||ie,line:q.yylineno,loc:yt,expected:Vt})}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Be+", token: "+ie);switch(ue[0]){case 1:S.push(ie),w.push(q.yytext),e.push(q.yylloc),S.push(ue[1]),ie=null,Qt=q.yyleng,t=q.yytext,N=q.yylineno,yt=q.yylloc;break;case 2:if(Ee=this.productions_[ue[1]][1],Qe.$=w[w.length-Ee],Qe._$={first_line:e[e.length-(Ee||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(Ee||1)].first_column,last_column:e[e.length-1].last_column},b1&&(Qe._$.range=[e[e.length-(Ee||1)].range[0],e[e.length-1].range[1]]),wt=this.performAction.apply(Qe,[t,Qt,N,Le.yy,ue[1],w,e].concat(m1)),typeof wt<"u")return wt;Ee&&(S=S.slice(0,-1*Ee*2),w=w.slice(0,-1*Ee),e=e.slice(0,-1*Ee)),S.push(this.productions_[ue[1]][0]),w.push(Qe.$),e.push(Qe._$),e1=I[S[S.length-2]][S[S.length-1]],S.push(e1);break;case 3:return!0}}return!0},"parse")},f1=(function(){var Te={EOF:1,parseError:k(function(E,S){if(this.yy.parser)this.yy.parser.parseError(E,S);else throw new Error(E)},"parseError"),setInput:k(function(b,E){return this.yy=E||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:k(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var E=b.match(/(?:\r\n?|\n).*/g);return E?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},"input"),unput:k(function(b){var E=b.length,S=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1&&(this.yylineno-=S.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:S?(S.length===o.length?this.yylloc.first_column:0)+o[o.length-S.length].length-S[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this},"unput"),more:k(function(){return this._more=!0,this},"more"),reject:k(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
25
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:k(function(b){this.unput(this.match.slice(b))},"less"),pastInput:k(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:k(function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:k(function(){var b=this.pastInput(),E=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
|
26
|
-
`+E+"^"},"showPosition"),test_match:k(function(b,E){var S,o,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),o=b[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],S=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var e in w)this[e]=w[e];return!1}return!1},"test_match"),next:k(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,E,S,o;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),e=0;e<w.length;e++)if(S=this._input.match(this.rules[w[e]]),S&&(!E||S[0].length>E[0].length)){if(E=S,o=e,this.options.backtrack_lexer){if(b=this.test_match(S,w[e]),b!==!1)return b;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(b=this.test_match(E,w[o]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
27
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:k(function(){var E=this.next();return E||this.lex()},"lex"),begin:k(function(E){this.conditionStack.push(E)},"begin"),popState:k(function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:k(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:k(function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL"},"topState"),pushState:k(function(E){this.begin(E)},"pushState"),stateStackSize:k(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:k(function(E,S,o,w){switch(o){case 0:return this.begin("acc_title"),38;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),40;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),S.yytext="",43;case 8:return this.pushState("shapeDataStr"),43;case 9:return this.popState(),43;case 10:const e=/\n\s*/g;return S.yytext=S.yytext.replace(e,"<br/>"),43;case 11:return 43;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 17:this.popState();break;case 18:return 99;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:return E.lex.firstGraph()&&this.begin("dir"),13;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),14;case 45:return this.popState(),15;case 46:return this.popState(),15;case 47:return this.popState(),15;case 48:return this.popState(),15;case 49:return this.popState(),15;case 50:return this.popState(),15;case 51:return this.popState(),15;case 52:return this.popState(),15;case 53:return this.popState(),15;case 54:return this.popState(),15;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:return 114;case 63:return 49;case 64:return 63;case 65:return 47;case 66:return 9;case 67:return 109;case 68:return 118;case 69:return this.popState(),80;case 70:return this.pushState("edgeText"),78;case 71:return 122;case 72:return 80;case 73:break;case 74:return this.popState(),56;case 75:return"TEXT";case 76:return this.pushState("ellipseText"),55;case 77:return this.popState(),58;case 78:return this.pushState("text"),57;case 79:return this.popState(),60;case 80:return this.pushState("text"),59;case 81:return 61;case 82:return this.pushState("text"),70;case 83:return this.popState(),67;case 84:return this.pushState("text"),66;case 85:return this.popState(),52;case 86:return this.pushState("text"),51;case 87:break;case 88:return this.popState(),72;case 89:return this.popState(),74;case 90:return 120;case 91:return this.pushState("trapText"),71;case 92:return this.pushState("trapText"),73;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 98:return 118;case 99:return 114;case 100:return 47;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;case 106:return this.pushState("text"),65;case 107:return this.popState(),54;case 108:return this.pushState("text"),53;case 109:return this.popState(),32;case 110:return this.pushState("text"),30;case 111:return this.popState(),69;case 112:return this.pushState("text"),68;case 113:break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}};return Te})();Bt.lexer=f1;function vt(){this.yy={}}return k(vt,"Parser"),vt.prototype=Bt,Bt.Parser=vt,new vt})();Ut.parser=Ut;var h1=Ut,p1=Object.assign({},h1);p1.parse=s=>{const i=s.replace(/}[^\S\n]*\n/g,`}
|
|
28
|
-
`);return h1.parse(i)};var $1=p1,es=k(s=>{const{theme:i,bkgColorArray:n,borderColorArray:r}=s;if(!w1(i,r))return"";const u=N1(s.look),l=R1(n),c=O1(s.THEME_COLOR_LIMIT,r),a=k(p=>r[p%r.length],"border"),h=k(p=>l?`fill: ${n[p%n.length]};`:"","fill");let g="";for(const p of H1){const A=Lt.get(p),x=`[data-look="${u}"].node.${o1(p)}`;g+=`
|
|
29
|
-
|
|
30
|
-
${x} rect,
|
|
31
|
-
${x} path,
|
|
32
|
-
${x} polygon {
|
|
33
|
-
stroke: ${a(A)};
|
|
34
|
-
${h(A)}
|
|
35
|
-
}
|
|
36
|
-
`}for(let p=0;p<u1(c);p++){const A=l1(p,c),x=`[data-look="${u}"][data-color-id="color-${A}"].cluster`,L=`[data-look="${u}"][data-color-id="color-${A}"].node`,C=k(M=>`${x} ${M}, ${L} ${M}`,"rule");g+=`
|
|
37
|
-
|
|
38
|
-
${C("rect")},
|
|
39
|
-
${C("path")} {
|
|
40
|
-
stroke: ${a(A)};
|
|
41
|
-
${h(A)}
|
|
42
|
-
}
|
|
43
|
-
`}return g},"genColor"),ts=k((s,i)=>{const n=G1,r=n(s,"r"),u=n(s,"g"),l=n(s,"b");return P1(r,u,l,i)},"fade"),ss=k(s=>`${es(s)}
|
|
44
|
-
.label {
|
|
45
|
-
font-family: ${s.fontFamily};
|
|
46
|
-
color: ${s.nodeTextColor||s.textColor};
|
|
47
|
-
}
|
|
48
|
-
.cluster-label text {
|
|
49
|
-
fill: ${s.titleColor};
|
|
50
|
-
}
|
|
51
|
-
.cluster-label span {
|
|
52
|
-
color: ${s.titleColor};
|
|
53
|
-
}
|
|
54
|
-
.cluster-label span p {
|
|
55
|
-
background-color: transparent;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.label text,span {
|
|
59
|
-
fill: ${s.nodeTextColor||s.textColor};
|
|
60
|
-
color: ${s.nodeTextColor||s.textColor};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.node rect,
|
|
64
|
-
.node circle,
|
|
65
|
-
.node ellipse,
|
|
66
|
-
.node polygon,
|
|
67
|
-
.node path {
|
|
68
|
-
fill: ${s.mainBkg};
|
|
69
|
-
stroke: ${s.nodeBorder};
|
|
70
|
-
stroke-width: ${s.strokeWidth??1}px;
|
|
71
|
-
}
|
|
72
|
-
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
|
|
73
|
-
text-anchor: middle;
|
|
74
|
-
}
|
|
75
|
-
.node .katex path {
|
|
76
|
-
fill: ${s.nodeTextColor||s.textColor};
|
|
77
|
-
stroke: ${s.nodeTextColor||s.textColor};
|
|
78
|
-
stroke-width: 1px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
|
|
82
|
-
text-align: center;
|
|
83
|
-
}
|
|
84
|
-
.node.clickable {
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
.root .anchor path {
|
|
90
|
-
fill: ${s.lineColor} !important;
|
|
91
|
-
stroke-width: 0;
|
|
92
|
-
stroke: ${s.lineColor};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.arrowheadPath {
|
|
96
|
-
fill: ${s.arrowheadColor};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.edgePaths .path {
|
|
100
|
-
stroke: ${s.lineColor};
|
|
101
|
-
stroke-width: ${s.strokeWidth??2}px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.flowchart-link {
|
|
105
|
-
stroke: ${s.lineColor};
|
|
106
|
-
fill: none;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.edgeLabel {
|
|
110
|
-
background-color: ${s.edgeLabelBackground};
|
|
111
|
-
p {
|
|
112
|
-
background-color: ${s.edgeLabelBackground};
|
|
113
|
-
}
|
|
114
|
-
rect {
|
|
115
|
-
opacity: 0.5;
|
|
116
|
-
background-color: ${s.edgeLabelBackground};
|
|
117
|
-
fill: ${s.edgeLabelBackground};
|
|
118
|
-
}
|
|
119
|
-
text-align: center;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/* For html labels only */
|
|
123
|
-
.labelBkg {
|
|
124
|
-
background-color: ${ts(s.edgeLabelBackground,.5)};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.cluster rect {
|
|
128
|
-
fill: ${s.clusterBkg};
|
|
129
|
-
stroke: ${s.clusterBorder};
|
|
130
|
-
stroke-width: 1px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.flow-cluster rect {
|
|
134
|
-
fill: none;
|
|
135
|
-
stroke: ${s.clusterBorder};
|
|
136
|
-
stroke-width: 0.75px;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.node .collapsed-indicator {
|
|
140
|
-
fill: ${s.nodeBorder};
|
|
141
|
-
stroke: none;
|
|
142
|
-
stroke-width: 0;
|
|
143
|
-
opacity: 0.5;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.node .collapsed-separator {
|
|
147
|
-
stroke-width: 0.75px;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.cluster text {
|
|
151
|
-
fill: ${s.titleColor};
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.cluster span {
|
|
155
|
-
color: ${s.titleColor};
|
|
156
|
-
}
|
|
157
|
-
/* .cluster div {
|
|
158
|
-
color: ${s.titleColor};
|
|
159
|
-
} */
|
|
160
|
-
|
|
161
|
-
div.mermaidTooltip {
|
|
162
|
-
position: absolute;
|
|
163
|
-
text-align: center;
|
|
164
|
-
max-width: 200px;
|
|
165
|
-
padding: 2px;
|
|
166
|
-
font-family: ${s.fontFamily};
|
|
167
|
-
font-size: 12px;
|
|
168
|
-
background: ${s.tertiaryColor};
|
|
169
|
-
border: 1px solid ${s.border2};
|
|
170
|
-
border-radius: 2px;
|
|
171
|
-
pointer-events: none;
|
|
172
|
-
z-index: 100;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.agentflowTitleText {
|
|
176
|
-
text-anchor: middle;
|
|
177
|
-
font-size: 18px;
|
|
178
|
-
fill: ${s.textColor};
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
rect.text {
|
|
182
|
-
fill: none;
|
|
183
|
-
stroke-width: 0;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.icon-shape, .image-shape {
|
|
187
|
-
background-color: ${s.edgeLabelBackground};
|
|
188
|
-
p {
|
|
189
|
-
background-color: ${s.edgeLabelBackground};
|
|
190
|
-
padding: 2px;
|
|
191
|
-
}
|
|
192
|
-
.label rect {
|
|
193
|
-
opacity: 0.5;
|
|
194
|
-
background-color: ${s.edgeLabelBackground};
|
|
195
|
-
fill: ${s.edgeLabelBackground};
|
|
196
|
-
}
|
|
197
|
-
text-align: center;
|
|
198
|
-
}
|
|
199
|
-
${k1()}
|
|
200
|
-
`,"getStyles"),is=ss,ds={parser:$1,get db(){return new X1},renderer:Z1,styles:is,init:k(s=>{s.agentflow??={},s.layout&&t1({layout:s.layout}),s.flowchart??={},s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,t1({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{ds as diagram};
|