adminizer 5.2.0-build.32 → 5.2.0-build.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/assets/{abnfDiagram-VCTEODGH-DbgbyJcA.js → abnfDiagram-VCTEODGH-BbJTXfTE.js} +1 -1
  2. package/assets/{add-CZSjZSj4.js → add-UCuYfqnA.js} +1 -1
  3. package/assets/{add-group-D2OXN23o.js → add-group-Dqy51mK7.js} +1 -1
  4. package/assets/{add-user-DWw6yqHq.js → add-user-lHPqrZLh.js} +1 -1
  5. package/assets/ai-assistant/agent.es.js +19464 -18270
  6. package/assets/app-BKhgReUT.js +138 -0
  7. package/assets/app-Bon67K9l.css +1 -0
  8. package/assets/{architectureDiagram-5GKGNRK7-BgImmyg4.js → architectureDiagram-5GKGNRK7-DcRt--3g.js} +2 -2
  9. package/assets/{blockDiagram-I7D4REHJ-CICNz1pJ.js → blockDiagram-I7D4REHJ-8_cCt-vW.js} +4 -4
  10. package/assets/{c4Diagram-7LVT6UL2-PO45Obwl.js → c4Diagram-7LVT6UL2-Bsn2OlKb.js} +1 -1
  11. package/assets/{catalog-yW12d58W.js → catalog-DfYJNiry.js} +1 -1
  12. package/assets/channel-0VXWsV6U.js +1 -0
  13. package/assets/{chunk-2Q5K7J3B-Bw5ZGE4l.js → chunk-2Q5K7J3B-BzrtylLu.js} +1 -1
  14. package/assets/{chunk-5VM5RSS4-CGXR0Oqz.js → chunk-5VM5RSS4-D7pDUki8.js} +1 -1
  15. package/assets/{chunk-F27PBJKO-CrHFA3QY.js → chunk-F27PBJKO-Bw8mEYY6.js} +1 -1
  16. package/assets/{chunk-IMKFNOWR-2vxZURAx.js → chunk-IMKFNOWR-nZKNEeNv.js} +1 -1
  17. package/assets/{chunk-JWPE2WC7-DsNFW3Fc.js → chunk-JWPE2WC7-DxUX2M-J.js} +1 -1
  18. package/assets/{chunk-POPQ4Y6H-B9iEE0gK.js → chunk-POPQ4Y6H-Bgt0Kaqd.js} +1 -1
  19. package/assets/{chunk-SVP7TREG-gdJM9rxR.js → chunk-SVP7TREG-DLigtJWk.js} +4 -4
  20. package/assets/{chunk-TICWLB2K-na_1Z3ZQ.js → chunk-TICWLB2K-B5WjdD1M.js} +1 -1
  21. package/assets/{chunk-XXDRQBXY-BCIKd4yk.js → chunk-XXDRQBXY-BJS0Ht92.js} +1 -1
  22. package/assets/classDiagram-ZZMXUADV-DgvmCbKR.js +1 -0
  23. package/assets/classDiagram-v2-VYDZK3BY-DgvmCbKR.js +1 -0
  24. package/assets/controls/ckeditor.es.js +9602 -9418
  25. package/assets/controls/jsoneditor.es.js +667 -668
  26. package/assets/controls/toast-ui.es.js +14232 -14230
  27. package/assets/{cose-bilkent-JH36ORCC-BuPwEvrz.js → cose-bilkent-JH36ORCC-Be1z_i9Q.js} +1 -1
  28. package/assets/{cynefin-OW5HDTMX-BBWNZZ5h.js → cynefin-OW5HDTMX-na8kWeny.js} +1 -1
  29. package/assets/{cynefinDiagram-5FMLGOSQ-CFTmYo7z.js → cynefinDiagram-5FMLGOSQ-ql71XTsQ.js} +2 -2
  30. package/assets/d3-scale-4DPf7zan.js +1 -0
  31. package/assets/{dagre-GXQ25YYZ-BA5RSLP2.js → dagre-GXQ25YYZ-BuKFYbmi.js} +2 -2
  32. package/assets/{dashboard-By8UkLaw.js → dashboard-Drm_gp-G.js} +1 -1
  33. package/assets/{diagram-S7CK7UJ4-BvhL0CjC.js → diagram-S7CK7UJ4-znl5Fq0J.js} +3 -3
  34. package/assets/diagram-UQ7AKVKN-CRFVfrL1.js +41 -0
  35. package/assets/{diagram-VSXAHHWV-Bvgp8Yy3.js → diagram-VSXAHHWV-CIVgZDJa.js} +1 -1
  36. package/assets/diagram-VX7I27RA-DIQB8SES.js +24 -0
  37. package/assets/{diagram-Z3DM3KII-DKWm9OV0.js → diagram-Z3DM3KII-DeY6yMBN.js} +1 -1
  38. package/assets/{docs-ChZhTONp.js → docs-B6LIpITJ.js} +1 -1
  39. package/assets/{ebnfDiagram-PWID7BFC-hv0LYjtJ.js → ebnfDiagram-PWID7BFC-Im7jHJ-6.js} +1 -1
  40. package/assets/{erDiagram-RLTQ6QDP-CgWLeFqJ.js → erDiagram-RLTQ6QDP-CCvI6JHH.js} +1 -1
  41. package/assets/{flowDiagram-HODETNUW-DaF8dBdu.js → flowDiagram-HODETNUW-DgdTOUM1.js} +4 -4
  42. package/assets/ganttDiagram-EL5Y4UJY-BZ5DzFSb.js +292 -0
  43. package/assets/{gitGraphDiagram-WWUBYQGX-C0J3HKXb.js → gitGraphDiagram-WWUBYQGX-CQklLXfY.js} +1 -1
  44. package/assets/{history-Mnjs7E36.js → history-CbgCLusU.js} +1 -1
  45. package/assets/{infoDiagram-27XIBGKW-DGKmA2HC.js → infoDiagram-27XIBGKW-inaVWWG7.js} +1 -1
  46. package/assets/{init-user-CSUX8Zph.js → init-user-DmWRf1Jr.js} +1 -1
  47. package/assets/{ishikawaDiagram-5VMMS53U-sBPJ_zmB.js → ishikawaDiagram-5VMMS53U-R9uOXdb9.js} +3 -3
  48. package/assets/{journeyDiagram-3NMN7TZE-C_I6XtEx.js → journeyDiagram-3NMN7TZE-YhsaQCHu.js} +2 -2
  49. package/assets/{kanban-definition-UXKFOSKX-DJXuEpuj.js → kanban-definition-UXKFOSKX-SFHx0aHd.js} +6 -6
  50. package/assets/layout-CryHDwUP.js +1 -0
  51. package/assets/{list-C5s9ablZ.js → list-CMYKENzO.js} +1 -1
  52. package/assets/login-inT0h68O.js +1 -0
  53. package/assets/manifest.json +281 -322
  54. package/assets/{media-manager-BKafzZHC.js → media-manager-DLwgt3w-.js} +1 -1
  55. package/assets/mermaid.core-BJx2V7Fx.js +310 -0
  56. package/assets/{mindmap-definition-YA3MSWOX-TxmPbCcJ.js → mindmap-definition-YA3MSWOX-DavgP5bX.js} +1 -1
  57. package/assets/{module-C5ct1ybj.js → module-Cd8HVyqp.js} +1 -1
  58. package/assets/{notification-CPhQJoOk.js → notification-NHcn4uVC.js} +1 -1
  59. package/assets/{pegDiagram-XKGWAZYB-D8aHLl6X.js → pegDiagram-XKGWAZYB-yFW3IMW-.js} +1 -1
  60. package/assets/pieDiagram-E7YTZNPT-CQTyXz50.js +39 -0
  61. package/assets/{quadrantDiagram-AXDQQJYC-CAwJ1sa3.js → quadrantDiagram-AXDQQJYC-Cqjg5HSm.js} +4 -4
  62. package/assets/{railroadDiagram-O6MQD6OU-2Z1DiRqD.js → railroadDiagram-O6MQD6OU-DzL2XDLc.js} +1 -1
  63. package/assets/{register-j2fRPw-h.js → register-BrZOgrIT.js} +1 -1
  64. package/assets/{requirementDiagram-BXWQKSXE-CLSJHCUR.js → requirementDiagram-BXWQKSXE-CWcLe5E-.js} +1 -1
  65. package/assets/{ru-Ctt5rhuw.js → ru-DqbXrFdY.js} +1 -1
  66. package/assets/sankeyDiagram-P5KCCOFB-BzTZcPVf.js +40 -0
  67. package/assets/{sequenceDiagram-WJ2MYXX4-DUJm3o3w.js → sequenceDiagram-WJ2MYXX4-DM48lXLE.js} +1 -1
  68. package/assets/{sizeCapture-INFHLROL-tVk02ZBq.js → sizeCapture-INFHLROL-D7cx9va2.js} +1 -1
  69. package/assets/stateDiagram-D77RDMKH-CUReM6ha.js +1 -0
  70. package/assets/stateDiagram-v2-MP3YSRHH-UNjCyT1j.js +1 -0
  71. package/assets/{swimlanes-42K2YHIH-1bGEFd1q.js → swimlanes-42K2YHIH-DEqEyhLN.js} +1 -1
  72. package/assets/swimlanesDiagram-VR7AAH4N-Dh-s4bKd.js +8 -0
  73. package/assets/{timeline-definition-24CTP7MA-A_L0NAjr.js → timeline-definition-24CTP7MA-_OQxzNu9.js} +2 -2
  74. package/assets/{use-appearance-DexcS2XF.js → use-appearance-BfSu2Tjm.js} +1 -1
  75. package/assets/{user-filters-list-DYS6ypS7.js → user-filters-list-LqHail28.js} +1 -1
  76. package/assets/{vennDiagram-4TSXK5OY-CkVuIPLv.js → vennDiagram-4TSXK5OY-wUfSnIxp.js} +5 -5
  77. package/assets/{wardleyDiagram-VM6X3IG4-CAid-4O_.js → wardleyDiagram-VM6X3IG4-BPcd3HO7.js} +2 -2
  78. package/assets/{welcome-1CccLOAC.js → welcome-XTbUvCzA.js} +1 -1
  79. package/assets/with-app-layout-CTv_hHug.js +37 -0
  80. package/assets/xychartDiagram-S5SC5T6Z-DBXGC8lX.js +7 -0
  81. package/controllers/exportData.js +6 -6
  82. package/controllers/list.js +1 -10
  83. package/controllers/login.d.ts +1 -1
  84. package/controllers/login.js +18 -17
  85. package/helpers/fieldsHelper.d.ts +2 -0
  86. package/helpers/fieldsHelper.js +11 -0
  87. package/interfaces/global.d.ts +0 -1
  88. package/lib/helper/pretend.d.ts +4 -0
  89. package/lib/helper/pretend.js +27 -0
  90. package/lib/list-query-builder/ListQueryBuilder.d.ts +4 -0
  91. package/lib/list-query-builder/ListQueryBuilder.js +10 -3
  92. package/package.json +1 -1
  93. package/services/FeedService.js +12 -5
  94. package/system/bindInertia.js +1 -1
  95. package/system/bindReqFunctions.js +13 -4
  96. package/system/defaults.js +1 -0
  97. package/assets/app-6gn6IblM.js +0 -138
  98. package/assets/app-DM8KzeFz.css +0 -1
  99. package/assets/arc-Ds8Mu0yU.js +0 -1
  100. package/assets/channel-CVjHBlbP.js +0 -1
  101. package/assets/classDiagram-ZZMXUADV-DUJsEIfw.js +0 -1
  102. package/assets/classDiagram-v2-VYDZK3BY-DUJsEIfw.js +0 -1
  103. package/assets/defaultLocale-DX6XiGOO.js +0 -1
  104. package/assets/diagram-UQ7AKVKN-zw7Uct_H.js +0 -41
  105. package/assets/diagram-VX7I27RA-q44rgp03.js +0 -24
  106. package/assets/ganttDiagram-EL5Y4UJY-_PIGuWrs.js +0 -292
  107. package/assets/init-Gi6I4Gst.js +0 -1
  108. package/assets/layout-CDuOg8Qq.js +0 -1
  109. package/assets/linear-DYRQeDMx.js +0 -1
  110. package/assets/login-CvdKFskG.js +0 -1
  111. package/assets/mermaid.core-3Xq6zKVA.js +0 -310
  112. package/assets/ordinal-Cboi1Yqb.js +0 -1
  113. package/assets/pieDiagram-E7YTZNPT-DPECFdHR.js +0 -39
  114. package/assets/sankeyDiagram-P5KCCOFB-W7cqHKvP.js +0 -40
  115. package/assets/stateDiagram-D77RDMKH-XANTYlIR.js +0 -1
  116. package/assets/stateDiagram-v2-MP3YSRHH-D4PUgzoJ.js +0 -1
  117. package/assets/swimlanesDiagram-VR7AAH4N-CCjpImEw.js +0 -8
  118. package/assets/with-app-layout-l9hNx3ta.js +0 -34
  119. package/assets/xychartDiagram-S5SC5T6Z-WPk9HFyA.js +0 -7
@@ -0,0 +1,310 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./sizeCapture-INFHLROL-D7cx9va2.js","./app-BKhgReUT.js","./app-Bon67K9l.css","./isObject-DL-BuaBl.js","./dagre-GXQ25YYZ-BuKFYbmi.js","./layout-CryHDwUP.js","./toNumber-DZb-r9sy.js","./swimlanes-42K2YHIH-DEqEyhLN.js","./cose-bilkent-JH36ORCC-Be1z_i9Q.js","./cytoscape.esm-BDkkwuE4.js","./c4Diagram-7LVT6UL2-Bsn2OlKb.js","./chunk-F27PBJKO-Bw8mEYY6.js","./flowDiagram-HODETNUW-DgdTOUM1.js","./chunk-5VM5RSS4-D7pDUki8.js","./chunk-XXDRQBXY-BJS0Ht92.js","./chunk-POPQ4Y6H-Bgt0Kaqd.js","./channel-0VXWsV6U.js","./swimlanesDiagram-VR7AAH4N-Dh-s4bKd.js","./erDiagram-RLTQ6QDP-CCvI6JHH.js","./gitGraphDiagram-WWUBYQGX-CQklLXfY.js","./chunk-2Q5K7J3B-BzrtylLu.js","./chunk-JWPE2WC7-DxUX2M-J.js","./cynefin-OW5HDTMX-na8kWeny.js","./ganttDiagram-EL5Y4UJY-BZ5DzFSb.js","./d3-scale-4DPf7zan.js","./infoDiagram-27XIBGKW-inaVWWG7.js","./pieDiagram-E7YTZNPT-CQTyXz50.js","./quadrantDiagram-AXDQQJYC-Cqjg5HSm.js","./xychartDiagram-S5SC5T6Z-DBXGC8lX.js","./requirementDiagram-BXWQKSXE-CWcLe5E-.js","./sequenceDiagram-WJ2MYXX4-DM48lXLE.js","./classDiagram-ZZMXUADV-DgvmCbKR.js","./chunk-TICWLB2K-B5WjdD1M.js","./classDiagram-v2-VYDZK3BY-DgvmCbKR.js","./stateDiagram-D77RDMKH-CUReM6ha.js","./chunk-IMKFNOWR-nZKNEeNv.js","./stateDiagram-v2-MP3YSRHH-UNjCyT1j.js","./journeyDiagram-3NMN7TZE-YhsaQCHu.js","./timeline-definition-24CTP7MA-_OQxzNu9.js","./mindmap-definition-YA3MSWOX-DavgP5bX.js","./kanban-definition-UXKFOSKX-SFHx0aHd.js","./sankeyDiagram-P5KCCOFB-BzTZcPVf.js","./diagram-Z3DM3KII-DeY6yMBN.js","./diagram-UQ7AKVKN-CRFVfrL1.js","./blockDiagram-I7D4REHJ-8_cCt-vW.js","./diagram-S7CK7UJ4-znl5Fq0J.js","./architectureDiagram-5GKGNRK7-DcRt--3g.js","./diagram-VSXAHHWV-CIVgZDJa.js","./ishikawaDiagram-5VMMS53U-R9uOXdb9.js","./vennDiagram-4TSXK5OY-wUfSnIxp.js","./diagram-VX7I27RA-DIQB8SES.js","./wardleyDiagram-VM6X3IG4-BPcd3HO7.js","./cynefinDiagram-5FMLGOSQ-ql71XTsQ.js","./railroadDiagram-O6MQD6OU-DzL2XDLc.js","./chunk-SVP7TREG-DLigtJWk.js","./ebnfDiagram-PWID7BFC-Im7jHJ-6.js","./abnfDiagram-VCTEODGH-BbJTXfTE.js","./pegDiagram-XKGWAZYB-yFW3IMW-.js"])))=>i.map(i=>d[i]);
2
+ import{bY as eC,bZ as rC,a2 as iC,b_ as oC,aA as el,bM as $t,b$ as sC}from"./app-BKhgReUT.js";import{a as rl,S as qi,i as il,c as Io,r as zr,b as zi,f as aC}from"./isObject-DL-BuaBl.js";function nC(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Po(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const o=t?t.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);const a=e.apply(this,i);return r.cache=s.set(o,a)||s,a};return r.cache=new(Po.Cache||Map),r}Po.Cache=Map;function Dh(e){if(e==null)return!0;if(eC(e))return typeof e.splice!="function"&&typeof e!="string"&&!rC(e)&&!iC(e)&&!oC(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return nC(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}function ld(e,t){for(var r=-1,i=e==null?0:e.length,o=Array(i);++r<i;)o[r]=t(e[r],r,e);return o}var Me=Array.isArray,Ih=qi?qi.prototype:void 0,Ph=Ih?Ih.toString:void 0;function hd(e){if(typeof e=="string")return e;if(Me(e))return ld(e,hd)+"";if(rl(e))return Ph?Ph.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function qs(e){return e}var lC="[object AsyncFunction]",hC="[object Function]",cC="[object GeneratorFunction]",uC="[object Proxy]";function ys(e){if(!il(e))return!1;var t=Io(e);return t==hC||t==cC||t==lC||t==uC}var Ta=zr["__core-js_shared__"],Rh=(function(){var e=/[^.]+$/.exec(Ta&&Ta.keys&&Ta.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function dC(e){return!!Rh&&Rh in e}var fC=Function.prototype,pC=fC.toString;function oi(e){if(e!=null){try{return pC.call(e)}catch{}try{return e+""}catch{}}return""}var gC=/[\\^$.*+?()[\]{}|]/g,mC=/^\[object .+?Constructor\]$/,yC=Function.prototype,CC=Object.prototype,xC=yC.toString,bC=CC.hasOwnProperty,kC=RegExp("^"+xC.call(bC).replace(gC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function TC(e){if(!il(e)||dC(e))return!1;var t=ys(e)?kC:mC;return t.test(oi(e))}function SC(e,t){return e?.[t]}function si(e,t){var r=SC(e,t);return TC(r)?r:void 0}var bn=si(zr,"WeakMap");function wC(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function _C(){}var vC=800,BC=16,LC=Date.now;function FC(e){var t=0,r=0;return function(){var i=LC(),o=BC-(i-r);if(r=i,o>0){if(++t>=vC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function fo(e){return function(){return e}}var Nh=(function(){try{var e=si(Object,"defineProperty");return e({},"",{}),e}catch{}})(),AC=Nh?function(e,t){return Nh(e,"toString",{configurable:!0,enumerable:!1,value:fo(t),writable:!0})}:qs,EC=FC(AC);function MC(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function $C(e,t,r,i){for(var o=e.length,s=r+-1;++s<o;)if(t(e[s],s,e))return s;return-1}function OC(e){return e!==e}function DC(e,t,r){for(var i=r-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}function IC(e,t,r){return t===t?DC(e,t,r):$C(e,OC,r)}function PC(e,t){var r=e==null?0:e.length;return!!r&&IC(e,t,0)>-1}var RC=9007199254740991,NC=/^(?:0|[1-9]\d*)$/;function cd(e,t){var r=typeof e;return t=t??RC,!!t&&(r=="number"||r!="symbol"&&NC.test(e))&&e>-1&&e%1==0&&e<t}function ud(e,t){return e===t||e!==e&&t!==t}var qh=Math.max;function qC(e,t,r){return t=qh(t===void 0?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=qh(i.length-t,0),a=Array(s);++o<s;)a[o]=i[t+o];o=-1;for(var n=Array(t+1);++o<t;)n[o]=i[o];return n[t]=r(a),wC(e,this,n)}}function zC(e,t){return EC(qC(e,t,qs),e+"")}var WC=9007199254740991;function ol(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WC}function zs(e){return e!=null&&ol(e.length)&&!ys(e)}var HC=Object.prototype;function dd(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||HC;return e===r}function YC(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var UC="[object Arguments]";function zh(e){return zi(e)&&Io(e)==UC}var fd=Object.prototype,jC=fd.hasOwnProperty,GC=fd.propertyIsEnumerable,Ws=zh((function(){return arguments})())?zh:function(e){return zi(e)&&jC.call(e,"callee")&&!GC.call(e,"callee")};function XC(){return!1}var pd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wh=pd&&typeof module=="object"&&module&&!module.nodeType&&module,VC=Wh&&Wh.exports===pd,Hh=VC?zr.Buffer:void 0,ZC=Hh?Hh.isBuffer:void 0,Cs=ZC||XC,KC="[object Arguments]",QC="[object Array]",JC="[object Boolean]",t0="[object Date]",e0="[object Error]",r0="[object Function]",i0="[object Map]",o0="[object Number]",s0="[object Object]",a0="[object RegExp]",n0="[object Set]",l0="[object String]",h0="[object WeakMap]",c0="[object ArrayBuffer]",u0="[object DataView]",d0="[object Float32Array]",f0="[object Float64Array]",p0="[object Int8Array]",g0="[object Int16Array]",m0="[object Int32Array]",y0="[object Uint8Array]",C0="[object Uint8ClampedArray]",x0="[object Uint16Array]",b0="[object Uint32Array]",Gt={};Gt[d0]=Gt[f0]=Gt[p0]=Gt[g0]=Gt[m0]=Gt[y0]=Gt[C0]=Gt[x0]=Gt[b0]=!0;Gt[KC]=Gt[QC]=Gt[c0]=Gt[JC]=Gt[u0]=Gt[t0]=Gt[e0]=Gt[r0]=Gt[i0]=Gt[o0]=Gt[s0]=Gt[a0]=Gt[n0]=Gt[l0]=Gt[h0]=!1;function k0(e){return zi(e)&&ol(e.length)&&!!Gt[Io(e)]}function T0(e){return function(t){return e(t)}}var gd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ko=gd&&typeof module=="object"&&module&&!module.nodeType&&module,S0=ko&&ko.exports===gd,Sa=S0&&aC.process,Yh=(function(){try{var e=ko&&ko.require&&ko.require("util").types;return e||Sa&&Sa.binding&&Sa.binding("util")}catch{}})(),Uh=Yh&&Yh.isTypedArray,sl=Uh?T0(Uh):k0,w0=Object.prototype,_0=w0.hasOwnProperty;function v0(e,t){var r=Me(e),i=!r&&Ws(e),o=!r&&!i&&Cs(e),s=!r&&!i&&!o&&sl(e),a=r||i||o||s,n=a?YC(e.length,String):[],h=n.length;for(var c in e)(t||_0.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||cd(c,h)))&&n.push(c);return n}function B0(e,t){return function(r){return e(t(r))}}var L0=B0(Object.keys,Object),F0=Object.prototype,A0=F0.hasOwnProperty;function md(e){if(!dd(e))return L0(e);var t=[];for(var r in Object(e))A0.call(e,r)&&r!="constructor"&&t.push(r);return t}function rr(e){return zs(e)?v0(e):md(e)}var E0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M0=/^\w*$/;function al(e,t){if(Me(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||rl(e)?!0:M0.test(e)||!E0.test(e)||t!=null&&e in Object(t)}var Lo=si(Object,"create");function $0(){this.__data__=Lo?Lo(null):{},this.size=0}function O0(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var D0="__lodash_hash_undefined__",I0=Object.prototype,P0=I0.hasOwnProperty;function R0(e){var t=this.__data__;if(Lo){var r=t[e];return r===D0?void 0:r}return P0.call(t,e)?t[e]:void 0}var N0=Object.prototype,q0=N0.hasOwnProperty;function z0(e){var t=this.__data__;return Lo?t[e]!==void 0:q0.call(t,e)}var W0="__lodash_hash_undefined__";function H0(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Lo&&t===void 0?W0:t,this}function Qr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Qr.prototype.clear=$0;Qr.prototype.delete=O0;Qr.prototype.get=R0;Qr.prototype.has=z0;Qr.prototype.set=H0;function Y0(){this.__data__=[],this.size=0}function Hs(e,t){for(var r=e.length;r--;)if(ud(e[r][0],t))return r;return-1}var U0=Array.prototype,j0=U0.splice;function G0(e){var t=this.__data__,r=Hs(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():j0.call(t,r,1),--this.size,!0}function X0(e){var t=this.__data__,r=Hs(t,e);return r<0?void 0:t[r][1]}function V0(e){return Hs(this.__data__,e)>-1}function Z0(e,t){var r=this.__data__,i=Hs(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Tr.prototype.clear=Y0;Tr.prototype.delete=G0;Tr.prototype.get=X0;Tr.prototype.has=V0;Tr.prototype.set=Z0;var Fo=si(zr,"Map");function K0(){this.size=0,this.__data__={hash:new Qr,map:new(Fo||Tr),string:new Qr}}function Q0(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ys(e,t){var r=e.__data__;return Q0(t)?r[typeof t=="string"?"string":"hash"]:r.map}function J0(e){var t=Ys(this,e).delete(e);return this.size-=t?1:0,t}function tx(e){return Ys(this,e).get(e)}function ex(e){return Ys(this,e).has(e)}function rx(e,t){var r=Ys(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Sr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Sr.prototype.clear=K0;Sr.prototype.delete=J0;Sr.prototype.get=tx;Sr.prototype.has=ex;Sr.prototype.set=rx;var ix="Expected a function";function nl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ix);var r=function(){var i=arguments,o=t?t.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,i);return r.cache=s.set(o,a)||s,a};return r.cache=new(nl.Cache||Sr),r}nl.Cache=Sr;var ox=500;function sx(e){var t=nl(e,function(i){return r.size===ox&&r.clear(),i}),r=t.cache;return t}var ax=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nx=/\\(\\)?/g,lx=sx(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ax,function(r,i,o,s){t.push(o?s.replace(nx,"$1"):i||r)}),t});function hx(e){return e==null?"":hd(e)}function yd(e,t){return Me(e)?e:al(e,t)?[e]:lx(hx(e))}function Us(e){if(typeof e=="string"||rl(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Cd(e,t){t=yd(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Us(t[r++])];return r&&r==i?e:void 0}function cx(e,t,r){var i=e==null?void 0:Cd(e,t);return i===void 0?r:i}function xd(e,t){for(var r=-1,i=t.length,o=e.length;++r<i;)e[o+r]=t[r];return e}var jh=qi?qi.isConcatSpreadable:void 0;function ux(e){return Me(e)||Ws(e)||!!(jh&&e&&e[jh])}function dx(e,t,r,i,o){var s=-1,a=e.length;for(r||(r=ux),o||(o=[]);++s<a;){var n=e[s];r(n)?xd(o,n):i||(o[o.length]=n)}return o}function fx(e,t,r,i){var o=-1,s=e==null?0:e.length;for(i&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}function px(){this.__data__=new Tr,this.size=0}function gx(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function mx(e){return this.__data__.get(e)}function yx(e){return this.__data__.has(e)}var Cx=200;function xx(e,t){var r=this.__data__;if(r instanceof Tr){var i=r.__data__;if(!Fo||i.length<Cx-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Sr(i)}return r.set(e,t),this.size=r.size,this}function Cr(e){var t=this.__data__=new Tr(e);this.size=t.size}Cr.prototype.clear=px;Cr.prototype.delete=gx;Cr.prototype.get=mx;Cr.prototype.has=yx;Cr.prototype.set=xx;function bd(e,t){for(var r=-1,i=e==null?0:e.length,o=0,s=[];++r<i;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function bx(){return[]}var kx=Object.prototype,Tx=kx.propertyIsEnumerable,Gh=Object.getOwnPropertySymbols,Sx=Gh?function(e){return e==null?[]:(e=Object(e),bd(Gh(e),function(t){return Tx.call(e,t)}))}:bx;function wx(e,t,r){var i=t(e);return Me(e)?i:xd(i,r(e))}function Xh(e){return wx(e,rr,Sx)}var kn=si(zr,"DataView"),Tn=si(zr,"Promise"),ki=si(zr,"Set"),Vh="[object Map]",_x="[object Object]",Zh="[object Promise]",Kh="[object Set]",Qh="[object WeakMap]",Jh="[object DataView]",vx=oi(kn),Bx=oi(Fo),Lx=oi(Tn),Fx=oi(ki),Ax=oi(bn),yr=Io;(kn&&yr(new kn(new ArrayBuffer(1)))!=Jh||Fo&&yr(new Fo)!=Vh||Tn&&yr(Tn.resolve())!=Zh||ki&&yr(new ki)!=Kh||bn&&yr(new bn)!=Qh)&&(yr=function(e){var t=Io(e),r=t==_x?e.constructor:void 0,i=r?oi(r):"";if(i)switch(i){case vx:return Jh;case Bx:return Vh;case Lx:return Zh;case Fx:return Kh;case Ax:return Qh}return t});var tc=zr.Uint8Array,Ex="__lodash_hash_undefined__";function Mx(e){return this.__data__.set(e,Ex),this}function $x(e){return this.__data__.has(e)}function Ao(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Sr;++t<r;)this.add(e[t])}Ao.prototype.add=Ao.prototype.push=Mx;Ao.prototype.has=$x;function Ox(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function kd(e,t){return e.has(t)}var Dx=1,Ix=2;function Td(e,t,r,i,o,s){var a=r&Dx,n=e.length,h=t.length;if(n!=h&&!(a&&h>n))return!1;var c=s.get(e),l=s.get(t);if(c&&l)return c==t&&l==e;var u=-1,d=!0,f=r&Ix?new Ao:void 0;for(s.set(e,t),s.set(t,e);++u<n;){var m=e[u],y=t[u];if(i)var C=a?i(y,m,u,t,e,s):i(m,y,u,e,t,s);if(C!==void 0){if(C)continue;d=!1;break}if(f){if(!Ox(t,function(x,k){if(!kd(f,k)&&(m===x||o(m,x,r,i,s)))return f.push(k)})){d=!1;break}}else if(!(m===y||o(m,y,r,i,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function Px(e){var t=-1,r=Array(e.size);return e.forEach(function(i,o){r[++t]=[o,i]}),r}function ll(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var Rx=1,Nx=2,qx="[object Boolean]",zx="[object Date]",Wx="[object Error]",Hx="[object Map]",Yx="[object Number]",Ux="[object RegExp]",jx="[object Set]",Gx="[object String]",Xx="[object Symbol]",Vx="[object ArrayBuffer]",Zx="[object DataView]",ec=qi?qi.prototype:void 0,wa=ec?ec.valueOf:void 0;function Kx(e,t,r,i,o,s,a){switch(r){case Zx:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vx:return!(e.byteLength!=t.byteLength||!s(new tc(e),new tc(t)));case qx:case zx:case Yx:return ud(+e,+t);case Wx:return e.name==t.name&&e.message==t.message;case Ux:case Gx:return e==t+"";case Hx:var n=Px;case jx:var h=i&Rx;if(n||(n=ll),e.size!=t.size&&!h)return!1;var c=a.get(e);if(c)return c==t;i|=Nx,a.set(e,t);var l=Td(n(e),n(t),i,o,s,a);return a.delete(e),l;case Xx:if(wa)return wa.call(e)==wa.call(t)}return!1}var Qx=1,Jx=Object.prototype,tb=Jx.hasOwnProperty;function eb(e,t,r,i,o,s){var a=r&Qx,n=Xh(e),h=n.length,c=Xh(t),l=c.length;if(h!=l&&!a)return!1;for(var u=h;u--;){var d=n[u];if(!(a?d in t:tb.call(t,d)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var y=!0;s.set(e,t),s.set(t,e);for(var C=a;++u<h;){d=n[u];var x=e[d],k=t[d];if(i)var S=a?i(k,x,d,t,e,s):i(x,k,d,e,t,s);if(!(S===void 0?x===k||o(x,k,r,i,s):S)){y=!1;break}C||(C=d=="constructor")}if(y&&!C){var _=e.constructor,v=t.constructor;_!=v&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof v=="function"&&v instanceof v)&&(y=!1)}return s.delete(e),s.delete(t),y}var rb=1,rc="[object Arguments]",ic="[object Array]",Vo="[object Object]",ib=Object.prototype,oc=ib.hasOwnProperty;function ob(e,t,r,i,o,s){var a=Me(e),n=Me(t),h=a?ic:yr(e),c=n?ic:yr(t);h=h==rc?Vo:h,c=c==rc?Vo:c;var l=h==Vo,u=c==Vo,d=h==c;if(d&&Cs(e)){if(!Cs(t))return!1;a=!0,l=!1}if(d&&!l)return s||(s=new Cr),a||sl(e)?Td(e,t,r,i,o,s):Kx(e,t,h,r,i,o,s);if(!(r&rb)){var f=l&&oc.call(e,"__wrapped__"),m=u&&oc.call(t,"__wrapped__");if(f||m){var y=f?e.value():e,C=m?t.value():t;return s||(s=new Cr),o(y,C,r,i,s)}}return d?(s||(s=new Cr),eb(e,t,r,i,o,s)):!1}function hl(e,t,r,i,o){return e===t?!0:e==null||t==null||!zi(e)&&!zi(t)?e!==e&&t!==t:ob(e,t,r,i,hl,o)}var sb=1,ab=2;function nb(e,t,r,i){var o=r.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){a=r[o];var n=a[0],h=e[n],c=a[1];if(a[2]){if(h===void 0&&!(n in e))return!1}else{var l=new Cr,u;if(!(u===void 0?hl(c,h,sb|ab,i,l):u))return!1}}return!0}function Sd(e){return e===e&&!il(e)}function lb(e){for(var t=rr(e),r=t.length;r--;){var i=t[r],o=e[i];t[r]=[i,o,Sd(o)]}return t}function wd(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function hb(e){var t=lb(e);return t.length==1&&t[0][2]?wd(t[0][0],t[0][1]):function(r){return r===e||nb(r,e,t)}}function cb(e,t){return e!=null&&t in Object(e)}function ub(e,t,r){t=yd(t,e);for(var i=-1,o=t.length,s=!1;++i<o;){var a=Us(t[i]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++i!=o?s:(o=e==null?0:e.length,!!o&&ol(o)&&cd(a,o)&&(Me(e)||Ws(e)))}function db(e,t){return e!=null&&ub(e,t,cb)}var fb=1,pb=2;function gb(e,t){return al(e)&&Sd(t)?wd(Us(e),t):function(r){var i=cx(r,e);return i===void 0&&i===t?db(r,e):hl(t,i,fb|pb)}}function mb(e){return function(t){return t?.[e]}}function yb(e){return function(t){return Cd(t,e)}}function Cb(e){return al(e)?mb(Us(e)):yb(e)}function _d(e){return typeof e=="function"?e:e==null?qs:typeof e=="object"?Me(e)?gb(e[0],e[1]):hb(e):Cb(e)}function xb(e){return function(t,r,i){for(var o=-1,s=Object(t),a=i(t),n=a.length;n--;){var h=a[++o];if(r(s[h],h,s)===!1)break}return t}}var bb=xb();function kb(e,t){return e&&bb(e,t,rr)}function Tb(e,t){return function(r,i){if(r==null)return r;if(!zs(r))return e(r,i);for(var o=r.length,s=-1,a=Object(r);++s<o&&i(a[s],s,a)!==!1;);return r}}var cl=Tb(kb);function Sb(e){return zi(e)&&zs(e)}function wb(e){return typeof e=="function"?e:qs}function Wr(e,t){var r=Me(e)?MC:cl;return r(e,wb(t))}function _b(e,t){var r=[];return cl(e,function(i,o,s){t(i,o,s)&&r.push(i)}),r}function Zo(e,t){var r=Me(e)?bd:_b;return r(e,_d(t))}function vb(e,t){return ld(t,function(r){return e[r]})}function _a(e){return e==null?[]:vb(e,rr(e))}var Bb="[object Map]",Lb="[object Set]",Fb=Object.prototype,Ab=Fb.hasOwnProperty;function sc(e){if(e==null)return!0;if(zs(e)&&(Me(e)||typeof e=="string"||typeof e.splice=="function"||Cs(e)||sl(e)||Ws(e)))return!e.length;var t=yr(e);if(t==Bb||t==Lb)return!e.size;if(dd(e))return!md(e).length;for(var r in e)if(Ab.call(e,r))return!1;return!0}function mi(e){return e===void 0}function Eb(e,t,r,i,o){return o(e,function(s,a,n){r=i?(i=!1,s):t(r,s,a,n)}),r}function Mb(e,t,r){var i=Me(e)?fx:Eb,o=arguments.length<3;return i(e,_d(t),r,o,cl)}var $b=1/0,Ob=ki&&1/ll(new ki([,-0]))[1]==$b?function(e){return new ki(e)}:_C,Db=200;function Ib(e,t,r){var i=-1,o=PC,s=e.length,a=!0,n=[],h=n;if(s>=Db){var c=Ob(e);if(c)return ll(c);a=!1,o=kd,h=new Ao}else h=n;t:for(;++i<s;){var l=e[i],u=l;if(l=l!==0?l:0,a&&u===u){for(var d=h.length;d--;)if(h[d]===u)continue t;n.push(l)}else o(h,u,r)||(h!==n&&h.push(u),n.push(l))}return n}var Pb=zC(function(e){return Ib(dx(e,1,Sb,!0))}),vd=Object.defineProperty,p=(e,t)=>vd(e,"name",{value:t,configurable:!0}),Rb=(e,t)=>{for(var r in t)vd(e,r,{get:t[r],enumerable:!0})},ls={exports:{}},Nb=ls.exports,ac;function qb(){return ac||(ac=1,(function(e,t){(function(r,i){e.exports=i()})(Nb,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",h="hour",c="day",l="week",u="month",d="quarter",f="year",m="date",y="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var P=["th","st","nd","rd"],B=A%100;return"["+A+(P[(B-20)%10]||P[B]||P[0])+"]"}},S=function(A,P,B){var q=String(A);return!q||q.length>=P?A:""+Array(P+1-q.length).join(B)+A},_={s:S,z:function(A){var P=-A.utcOffset(),B=Math.abs(P),q=Math.floor(B/60),R=B%60;return(P<=0?"+":"-")+S(q,2,"0")+":"+S(R,2,"0")},m:function A(P,B){if(P.date()<B.date())return-A(B,P);var q=12*(B.year()-P.year())+(B.month()-P.month()),R=P.clone().add(q,u),st=B-R<0,tt=P.clone().add(q+(st?-1:1),u);return+(-(q+(B-R)/(st?R-tt:tt-R))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:f,w:l,d:c,D:m,h,m:n,s:a,ms:s,Q:d}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},v="en",L={};L[v]=k;var F="$isDayjsObject",E=function(A){return A instanceof J||!(!A||!A[F])},G=function A(P,B,q){var R;if(!P)return v;if(typeof P=="string"){var st=P.toLowerCase();L[st]&&(R=st),B&&(L[st]=B,R=st);var tt=P.split("-");if(!R&&tt.length>1)return A(tt[0])}else{var gt=P.name;L[gt]=P,R=gt}return!q&&R&&(v=R),R||!q&&v},W=function(A,P){if(E(A))return A.clone();var B=typeof P=="object"?P:{};return B.date=A,B.args=arguments,new J(B)},D=_;D.l=G,D.i=E,D.w=function(A,P){return W(A,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var J=(function(){function A(B){this.$L=G(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[F]=!0}var P=A.prototype;return P.parse=function(B){this.$d=(function(q){var R=q.date,st=q.utc;if(R===null)return new Date(NaN);if(D.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var tt=R.match(C);if(tt){var gt=tt[2]-1||0,Tt=(tt[7]||"0").substring(0,3);return st?new Date(Date.UTC(tt[1],gt,tt[3]||1,tt[4]||0,tt[5]||0,tt[6]||0,Tt)):new Date(tt[1],gt,tt[3]||1,tt[4]||0,tt[5]||0,tt[6]||0,Tt)}}return new Date(R)})(B),this.init()},P.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},P.$utils=function(){return D},P.isValid=function(){return this.$d.toString()!==y},P.isSame=function(B,q){var R=W(B);return this.startOf(q)<=R&&R<=this.endOf(q)},P.isAfter=function(B,q){return W(B)<this.startOf(q)},P.isBefore=function(B,q){return this.endOf(q)<W(B)},P.$g=function(B,q,R){return D.u(B)?this[q]:this.set(R,B)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(B,q){var R=this,st=!!D.u(q)||q,tt=D.p(B),gt=function(_t,Pt){var qt=D.w(R.$u?Date.UTC(R.$y,Pt,_t):new Date(R.$y,Pt,_t),R);return st?qt:qt.endOf(c)},Tt=function(_t,Pt){return D.w(R.toDate()[_t].apply(R.toDate("s"),(st?[0,0,0,0]:[23,59,59,999]).slice(Pt)),R)},wt=this.$W,vt=this.$M,bt=this.$D,nt="set"+(this.$u?"UTC":"");switch(tt){case f:return st?gt(1,0):gt(31,11);case u:return st?gt(1,vt):gt(0,vt+1);case l:var St=this.$locale().weekStart||0,Ot=(wt<St?wt+7:wt)-St;return gt(st?bt-Ot:bt+(6-Ot),vt);case c:case m:return Tt(nt+"Hours",0);case h:return Tt(nt+"Minutes",1);case n:return Tt(nt+"Seconds",2);case a:return Tt(nt+"Milliseconds",3);default:return this.clone()}},P.endOf=function(B){return this.startOf(B,!1)},P.$set=function(B,q){var R,st=D.p(B),tt="set"+(this.$u?"UTC":""),gt=(R={},R[c]=tt+"Date",R[m]=tt+"Date",R[u]=tt+"Month",R[f]=tt+"FullYear",R[h]=tt+"Hours",R[n]=tt+"Minutes",R[a]=tt+"Seconds",R[s]=tt+"Milliseconds",R)[st],Tt=st===c?this.$D+(q-this.$W):q;if(st===u||st===f){var wt=this.clone().set(m,1);wt.$d[gt](Tt),wt.init(),this.$d=wt.set(m,Math.min(this.$D,wt.daysInMonth())).$d}else gt&&this.$d[gt](Tt);return this.init(),this},P.set=function(B,q){return this.clone().$set(B,q)},P.get=function(B){return this[D.p(B)]()},P.add=function(B,q){var R,st=this;B=Number(B);var tt=D.p(q),gt=function(vt){var bt=W(st);return D.w(bt.date(bt.date()+Math.round(vt*B)),st)};if(tt===u)return this.set(u,this.$M+B);if(tt===f)return this.set(f,this.$y+B);if(tt===c)return gt(1);if(tt===l)return gt(7);var Tt=(R={},R[n]=i,R[h]=o,R[a]=r,R)[tt]||1,wt=this.$d.getTime()+B*Tt;return D.w(wt,this)},P.subtract=function(B,q){return this.add(-1*B,q)},P.format=function(B){var q=this,R=this.$locale();if(!this.isValid())return R.invalidDate||y;var st=B||"YYYY-MM-DDTHH:mm:ssZ",tt=D.z(this),gt=this.$H,Tt=this.$m,wt=this.$M,vt=R.weekdays,bt=R.months,nt=R.meridiem,St=function(Pt,qt,he,_e){return Pt&&(Pt[qt]||Pt(q,st))||he[qt].slice(0,_e)},Ot=function(Pt){return D.s(gt%12||12,Pt,"0")},_t=nt||function(Pt,qt,he){var _e=Pt<12?"AM":"PM";return he?_e.toLowerCase():_e};return st.replace(x,(function(Pt,qt){return qt||(function(he){switch(he){case"YY":return String(q.$y).slice(-2);case"YYYY":return D.s(q.$y,4,"0");case"M":return wt+1;case"MM":return D.s(wt+1,2,"0");case"MMM":return St(R.monthsShort,wt,bt,3);case"MMMM":return St(bt,wt);case"D":return q.$D;case"DD":return D.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return St(R.weekdaysMin,q.$W,vt,2);case"ddd":return St(R.weekdaysShort,q.$W,vt,3);case"dddd":return vt[q.$W];case"H":return String(gt);case"HH":return D.s(gt,2,"0");case"h":return Ot(1);case"hh":return Ot(2);case"a":return _t(gt,Tt,!0);case"A":return _t(gt,Tt,!1);case"m":return String(Tt);case"mm":return D.s(Tt,2,"0");case"s":return String(q.$s);case"ss":return D.s(q.$s,2,"0");case"SSS":return D.s(q.$ms,3,"0");case"Z":return tt}return null})(Pt)||tt.replace(":","")}))},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(B,q,R){var st,tt=this,gt=D.p(q),Tt=W(B),wt=(Tt.utcOffset()-this.utcOffset())*i,vt=this-Tt,bt=function(){return D.m(tt,Tt)};switch(gt){case f:st=bt()/12;break;case u:st=bt();break;case d:st=bt()/3;break;case l:st=(vt-wt)/6048e5;break;case c:st=(vt-wt)/864e5;break;case h:st=vt/o;break;case n:st=vt/i;break;case a:st=vt/r;break;default:st=vt}return R?st:D.a(st)},P.daysInMonth=function(){return this.endOf(u).$D},P.$locale=function(){return L[this.$L]},P.locale=function(B,q){if(!B)return this.$L;var R=this.clone(),st=G(B,q,!0);return st&&(R.$L=st),R},P.clone=function(){return D.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},A})(),I=J.prototype;return W.prototype=I,[["$ms",s],["$s",a],["$m",n],["$H",h],["$W",c],["$M",u],["$y",f],["$D",m]].forEach((function(A){I[A[1]]=function(P){return this.$g(P,A[0],A[1])}})),W.extend=function(A,P){return A.$i||(A(P,J,W),A.$i=!0),W},W.locale=G,W.isDayjs=E,W.unix=function(A){return W(1e3*A)},W.en=L[v],W.Ls=L,W.p={},W}))})(ls)),ls.exports}var zb=qb();const Wb=el(zb);var dr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ul=p(function(e="fatal"){let t=dr.fatal;typeof e=="string"?e.toLowerCase()in dr&&(t=dr[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=dr.fatal&&(z.fatal=console.error?console.error.bind(console,Pe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Pe("FATAL"))),t<=dr.error&&(z.error=console.error?console.error.bind(console,Pe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Pe("ERROR"))),t<=dr.warn&&(z.warn=console.warn?console.warn.bind(console,Pe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Pe("WARN"))),t<=dr.info&&(z.info=console.info?console.info.bind(console,Pe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Pe("INFO"))),t<=dr.debug&&(z.debug=console.debug?console.debug.bind(console,Pe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Pe("DEBUG"))),t<=dr.trace&&(z.trace=console.debug?console.debug.bind(console,Pe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Pe("TRACE")))},"setLogLevel"),Pe=p(e=>`%c${Wb().format("ss.SSS")} : ${e} : `,"format");const hs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return hs.hue2rgb(s,o,e+1/3)*255;case"g":return hs.hue2rgb(s,o,e)*255;case"b":return hs.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,h=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return h*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Hb={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Yb={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},At={channel:hs,lang:Hb,unit:Yb},$r={};for(let e=0;e<=255;e++)$r[e]=At.unit.dec2hex(e);const ye={ALL:0,RGB:1,HSL:2};let Ub=class{constructor(){this.type=ye.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ye.ALL}is(t){return this.type===t}};class jb{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ub}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ye.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=At.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=At.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=At.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=At.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=At.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=At.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),At.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),At.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),At.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),At.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),At.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),At.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ye.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ye.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ye.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ye.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ye.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ye.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const js=new jb({r:0,g:0,b:0,a:0},"transparent"),Ti={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ti.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,h=a?8:4,c=s?0:-1,l=a?255:15;return js.set({r:(i>>h*(c+3)&l)*n,g:(i>>h*(c+2)&l)*n,b:(i>>h*(c+1)&l)*n,a:s?(i&l)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${$r[Math.round(t)]}${$r[Math.round(r)]}${$r[Math.round(i)]}${$r[Math.round(o*255)]}`:`#${$r[Math.round(t)]}${$r[Math.round(r)]}${$r[Math.round(i)]}`}},Vr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Vr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return At.channel.clamp.h(parseFloat(r)*.9);case"rad":return At.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return At.channel.clamp.h(parseFloat(r)*360)}}return At.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Vr.re);if(!r)return;const[,i,o,s,a,n]=r;return js.set({h:Vr._hue2deg(i),s:At.channel.clamp.s(parseFloat(o)),l:At.channel.clamp.l(parseFloat(s)),a:a?At.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${At.lang.round(t)}, ${At.lang.round(r)}%, ${At.lang.round(i)}%, ${o})`:`hsl(${At.lang.round(t)}, ${At.lang.round(r)}%, ${At.lang.round(i)}%)`}},To={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=To.colors[e];if(t)return Ti.parse(t)},stringify:e=>{const t=Ti.stringify(e);for(const r in To.colors)if(To.colors[r]===t)return r}},po={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(po.re);if(!r)return;const[,i,o,s,a,n,h,c,l]=r;return js.set({r:At.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:At.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:At.channel.clamp.b(h?parseFloat(n)*2.55:parseFloat(n)),a:c?At.channel.clamp.a(l?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${At.lang.round(t)}, ${At.lang.round(r)}, ${At.lang.round(i)}, ${At.lang.round(o)})`:`rgb(${At.lang.round(t)}, ${At.lang.round(r)}, ${At.lang.round(i)})`}},or={format:{keyword:To,hex:Ti,rgb:po,rgba:po,hsl:Vr,hsla:Vr},parse:e=>{if(typeof e!="string")return e;const t=Ti.parse(e)||po.parse(e)||Vr.parse(e)||To.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ye.HSL)||e.data.r===void 0?Vr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?po.stringify(e):Ti.stringify(e)},Bd=(e,t)=>{const r=or.parse(e);for(const i in t)r[i]=At.channel.clamp[i](t[i]);return or.stringify(r)},Ir=(e,t,r=0,i=1)=>{if(typeof e!="number")return Bd(e,{a:t});const o=js.set({r:At.channel.clamp.r(e),g:At.channel.clamp.g(t),b:At.channel.clamp.b(r),a:At.channel.clamp.a(i)});return or.stringify(o)},Gb=e=>{const{r:t,g:r,b:i}=or.parse(e),o=.2126*At.channel.toLinear(t)+.7152*At.channel.toLinear(r)+.0722*At.channel.toLinear(i);return At.lang.round(o)},Xb=e=>Gb(e)>=.5,Ge=e=>!Xb(e),Ld=(e,t,r)=>{const i=or.parse(e),o=i[t],s=At.channel.clamp[t](o+r);return o!==s&&(i[t]=s),or.stringify(i)},H=(e,t)=>Ld(e,"l",t),Y=(e,t)=>Ld(e,"l",-t),b=(e,t)=>{const r=or.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return Bd(e,i)},Vb=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=or.parse(e),{r:n,g:h,b:c,a:l}=or.parse(t),u=r/100,d=u*2-1,f=a-l,y=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,C=1-y,x=i*y+n*C,k=o*y+h*C,S=s*y+c*C,_=a*u+l*(1-u);return Ir(x,k,S,_)},$=(e,t=100)=>{const r=or.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Vb(r,e,t)};function nc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Zb(e){if(Array.isArray(e))return e}function Kb(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],h=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(h=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);h=!0);}catch(l){c=!0,o=l}finally{try{if(!h&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function Qb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jb(e,t){return Zb(e)||Kb(e,t)||tk(e,t)||Qb()}function tk(e,t){if(e){if(typeof e=="string")return nc(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nc(e,t):void 0}}const Fd=Object.entries,lc=Object.setPrototypeOf,ek=Object.isFrozen,Ad=Object.getPrototypeOf,Ed=Object.getOwnPropertyDescriptor;let le=Object.freeze,pe=Object.seal,yi=Object.create,Md=typeof Reflect<"u"&&Reflect,Sn=Md.apply,wn=Md.construct;le||(le=function(t){return t});pe||(pe=function(t){return t});Sn||(Sn=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});wn||(wn=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const fr=Zt(Array.prototype.forEach),rk=Zt(Array.prototype.lastIndexOf),hc=Zt(Array.prototype.pop),ro=Zt(Array.prototype.push),ik=Zt(Array.prototype.slice),ok=Zt(Array.prototype.splice),Si=Array.isArray,va=$d(Set),Ba=Zt(Set.prototype.add),io=Zt(Set.prototype.has),jr=Zt(String.prototype.toLowerCase),La=Zt(String.prototype.toString),cc=Zt(String.prototype.match),oo=Zt(String.prototype.replace),uc=Zt(String.prototype.indexOf),sk=Zt(String.prototype.trim),ak=Zt(Number.prototype.toString),nk=Zt(Boolean.prototype.toString),dc=typeof BigInt>"u"?null:Zt(BigInt.prototype.toString),fc=typeof Symbol>"u"?null:Zt(Symbol.prototype.toString),Ae=Zt(Object.prototype.hasOwnProperty),so=Zt(Object.prototype.toString),de=Zt(RegExp.prototype.test),pr=$d(TypeError);function Zt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return Sn(e,t,i)}}function $d(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return wn(e,r)}}function zt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jr;if(lc&&lc(e,null),!Si(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&(ek(t)||(t[i]=s),o=s)}e[o]=!0}return e}function lk(e){for(let t=0;t<e.length;t++)Ae(e,t)||(e[t]=null);return e}function Oe(e){const t=yi(null);for(const i of Fd(e)){var r=Jb(i,2);const o=r[0],s=r[1];Ae(e,o)&&(Si(s)?t[o]=lk(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Oe(s):t[o]=s)}return t}function hk(e){switch(typeof e){case"string":return e;case"number":return ak(e);case"boolean":return nk(e);case"bigint":return dc?dc(e):"0";case"symbol":return fc?fc(e):"Symbol()";case"undefined":return so(e);case"function":case"object":{if(e===null)return so(e);const t=e,r=Re(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:so(i)}return so(e)}default:return so(e)}}function Re(e,t){for(;e!==null;){const i=Ed(e,t);if(i){if(i.get)return Zt(i.get);if(typeof i.value=="function")return Zt(i.value)}e=Ad(e)}function r(){return null}return r}function ck(e,t){for(;e!==null;){const r=Ed(e,t);if(r)return r.get?Zt(r.get):null;e=Ad(e)}return null}function uk(e){try{return de(e,""),!0}catch{return!1}}const pc=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Fa=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Aa=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),dk=le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ea=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),fk=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gc=le(["#text"]),mc=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ma=le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yc=le(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ko=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pk=pe(/{{[\w\W]*|^[\w\W]*}}/g),gk=pe(/<%[\w\W]*|^[\w\W]*%>/g),mk=pe(/\${[\w\W]*/g),yk=pe(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ck=pe(/^aria-[\-\w]+$/),Cc=pe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xk=pe(/^(?:\w+script|data):/i),bk=pe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kk=pe(/^html$/i),Tk=pe(/^[a-z][.\w]*(-[.\w]+)+$/i),$a=pe(/<[/\w!]/g),xc=pe(/<[/\w]/g),Sk=pe(/<\/no(script|embed|frames)/i),bc=pe(/\/>/i),re={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},wk=le(zt({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),_k=function(){return typeof window>"u"?null:window},vk=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},kc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Er=function(t,r,i,o){return Ae(t,r)&&Si(t[r])?zt(o.base?Oe(o.base):{},t[r],o.transform):i},Oa=function(t,r,i){const o=Ae(t,r)?t[r]:void 0;return o&&typeof o=="object"?Oe(o):i()};function Od(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_k();const t=it=>Od(it);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==re.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,n=e.Element,h=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,l=e.trustedTypes,u=n.prototype,d=Re(u,"cloneNode"),f=Re(u,"remove"),m=Re(u,"removeAttributeNode"),y=Re(u,"nextSibling"),C=Re(u,"childNodes"),x=Re(u,"parentNode"),k=Re(u,"shadowRoot"),S=Re(u,"attributes"),_=a&&a.prototype?Re(a.prototype,"nodeType"):null,v=a&&a.prototype?Re(a.prototype,"nodeName"):null,L=a&&a.prototype?Re(a.prototype,"ownerDocument"):null,F=function(w){return _?_(w):w.nodeType},E=function(w){return v?v(w):w.nodeName},G=ck(u,"namespaceURI"),W=function(w){return G?G(w):w.namespaceURI};if(typeof s=="function"){const it=r.createElement("template");it.content&&it.content.ownerDocument&&(r=it.content.ownerDocument)}let D,J="",I,A=!1,P=0;const B=function(){if(P>0)throw pr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},q=function(w){B(),P++;try{return D.createHTML(w)}finally{P--}},R=function(w){B(),P++;try{return D.createScriptURL(w)}finally{P--}},st=function(){return A||(I=vk(l,o),A=!0),I},tt=r,gt=tt.implementation,Tt=tt.createNodeIterator,wt=tt.createDocumentFragment,vt=tt.getElementsByTagName,bt=i.importNode;let nt=kc();t.isSupported=typeof Fd=="function"&&typeof x=="function"&&gt&&gt.createHTMLDocument!==void 0;const St=pk,Ot=gk,_t=mk,Pt=yk,qt=Ck,he=xk,_e=bk,De=Tk;let wr=Cc,Yt=null;const ve=zt({},[...pc,...Fa,...Aa,...Ea,...gc]);let Ht=null;const hr=zt({},[...mc,...Ma,...yc,...Ko]);let ce=Object.seal(yi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ie=null,_r=null;const ee=Object.seal(yi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let vr=!0,Ve=!0,cr=!1,ur=!0,g=!1,O=!0,j=!1,V=!1,U=null,at=null,T=!1,N=!1,et=!1,X=!1,Z=!0,ot=!1;const rt="user-content-";let dt=!0,ht=!1,mt=null,yt={},Mt=null;const jt=zt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Qi=null;const Br=zt({},["audio","video","img","source","image","track"]);let Lr=null;const Ch=zt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Yo="http://www.w3.org/1998/Math/MathML",Uo="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let li=Ze,la=!1,ha=null;const Dy=zt({},[Yo,Uo,Ze],La),xh=le(["mi","mo","mn","ms","mtext"]);let ca=zt({},xh);const bh=le(["annotation-xml"]);let ua=zt({},bh);const Iy=zt({},["title","style","font","a","script"]);let Ji=null;const Py=["application/xhtml+xml","text/html"],Ry="text/html";let Qt=null,hi=null;const Ny=r.createElement("form"),kh=function(w){return w instanceof RegExp||w instanceof Function},da=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(hi&&hi===w)return;(!w||typeof w!="object")&&(w={}),w=Oe(w),Ji=Py.indexOf(w.PARSER_MEDIA_TYPE)===-1?Ry:w.PARSER_MEDIA_TYPE,Qt=Ji==="application/xhtml+xml"?La:jr,Yt=Er(w,"ALLOWED_TAGS",ve,{transform:Qt}),Ht=Er(w,"ALLOWED_ATTR",hr,{transform:Qt}),ha=Er(w,"ALLOWED_NAMESPACES",Dy,{transform:La}),Lr=Er(w,"ADD_URI_SAFE_ATTR",Ch,{transform:Qt,base:Ch}),Qi=Er(w,"ADD_DATA_URI_TAGS",Br,{transform:Qt,base:Br}),Mt=Er(w,"FORBID_CONTENTS",jt,{transform:Qt}),Ie=Er(w,"FORBID_TAGS",Oe({}),{transform:Qt}),_r=Er(w,"FORBID_ATTR",Oe({}),{transform:Qt}),yt=Ae(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Oe(w.USE_PROFILES):w.USE_PROFILES:!1,vr=w.ALLOW_ARIA_ATTR!==!1,Ve=w.ALLOW_DATA_ATTR!==!1,cr=w.ALLOW_UNKNOWN_PROTOCOLS||!1,ur=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,g=w.SAFE_FOR_TEMPLATES||!1,O=w.SAFE_FOR_XML!==!1,j=w.WHOLE_DOCUMENT||!1,N=w.RETURN_DOM||!1,et=w.RETURN_DOM_FRAGMENT||!1,X=w.RETURN_TRUSTED_TYPE||!1,T=w.FORCE_BODY||!1,Z=w.SANITIZE_DOM!==!1,ot=w.SANITIZE_NAMED_PROPS||!1,dt=w.KEEP_CONTENT!==!1,ht=w.IN_PLACE||!1,wr=uk(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:Cc,li=typeof w.NAMESPACE=="string"?w.NAMESPACE:Ze,ca=Oa(w,"MATHML_TEXT_INTEGRATION_POINTS",()=>zt({},xh)),ua=Oa(w,"HTML_INTEGRATION_POINTS",()=>zt({},bh));const M=Oa(w,"CUSTOM_ELEMENT_HANDLING",()=>yi(null));if(ce=yi(null),Ae(M,"tagNameCheck")&&kh(M.tagNameCheck)&&(ce.tagNameCheck=M.tagNameCheck),Ae(M,"attributeNameCheck")&&kh(M.attributeNameCheck)&&(ce.attributeNameCheck=M.attributeNameCheck),Ae(M,"allowCustomizedBuiltInElements")&&typeof M.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=M.allowCustomizedBuiltInElements),pe(ce),g&&(Ve=!1),et&&(N=!0),yt&&(Yt=zt({},gc),Ht=yi(null),yt.html===!0&&(zt(Yt,pc),zt(Ht,mc)),yt.svg===!0&&(zt(Yt,Fa),zt(Ht,Ma),zt(Ht,Ko)),yt.svgFilters===!0&&(zt(Yt,Aa),zt(Ht,Ma),zt(Ht,Ko)),yt.mathMl===!0&&(zt(Yt,Ea),zt(Ht,yc),zt(Ht,Ko))),ee.tagCheck=null,ee.attributeCheck=null,Ae(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?ee.tagCheck=w.ADD_TAGS:Si(w.ADD_TAGS)&&(Yt===ve&&(Yt=Oe(Yt)),zt(Yt,w.ADD_TAGS,Qt))),Ae(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?ee.attributeCheck=w.ADD_ATTR:Si(w.ADD_ATTR)&&(Ht===hr&&(Ht=Oe(Ht)),zt(Ht,w.ADD_ATTR,Qt))),Ae(w,"ADD_FORBID_CONTENTS")&&Si(w.ADD_FORBID_CONTENTS)&&(Mt===jt&&(Mt=Oe(Mt)),zt(Mt,w.ADD_FORBID_CONTENTS,Qt)),dt&&(Yt["#text"]=!0),j&&zt(Yt,["html","head","body"]),Yt.table&&(zt(Yt,["tbody"]),delete Ie.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const K=D;D=w.TRUSTED_TYPES_POLICY;try{J=q("")}catch(Q){throw D=K,Q}}else w.TRUSTED_TYPES_POLICY===null?(D=void 0,J=""):(D===void 0&&(D=st()),D&&typeof J=="string"&&(J=q("")));le&&le(w),hi=w},Th=zt({},[...Fa,...Aa,...dk]),Sh=zt({},[...Ea,...fk]),qy=function(w,M,K){return M.namespaceURI===Ze?w==="svg":M.namespaceURI===Yo?w==="svg"&&(K==="annotation-xml"||ca[K]):!!Th[w]},zy=function(w,M,K){return M.namespaceURI===Ze?w==="math":M.namespaceURI===Uo?w==="math"&&ua[K]:!!Sh[w]},Wy=function(w,M,K){return M.namespaceURI===Uo&&!ua[K]||M.namespaceURI===Yo&&!ca[K]?!1:!Sh[w]&&(Iy[w]||!Th[w])},Hy=function(w){const M=W(w),K=jr(E(w)),Q=x(w);let kt,Ft;return Q&&F(Q)===re.element?(kt={namespaceURI:W(Q)},Ft=jr(E(Q))):(kt={namespaceURI:li},Ft="template"),ha[M]?M===Uo?qy(K,kt,Ft):M===Yo?zy(K,kt,Ft):M===Ze?Wy(K,kt,Ft):!!(Ji==="application/xhtml+xml"&&ha[M]):!1},Fr=function(w){ro(t.removed,{element:w});try{x(w).removeChild(w)}catch{if(f(w),!x(w))throw pr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},wh=function(w,M,K){try{m(w,M)}catch{try{w.removeAttribute(K)}catch{}}},fa=function(w){ga(w);const M=C(w);M&&fr(ik(M),Q=>{try{f(Q)}catch{}});const K=F(w)===re.element?S(w):null;if(K)for(let Q=K.length-1;Q>=0;--Q){const kt=K[Q],Ft=kt&&kt.name;typeof Ft=="string"&&wh(w,kt,Ft)}},ci=function(w,M,K){if(!K)try{K=M.getAttributeNode(w)}catch{K=null}ro(t.removed,{attribute:K||null,from:M});try{K?m(M,K):M.removeAttribute(w)}catch{try{M.removeAttribute(w)}catch{}}if(w==="is")if(N||et)try{Fr(M)}catch{}else try{M.setAttribute(w,"")}catch{}},_h=function(w){const M=S(w);if(M)for(let K=M.length-1;K>=0;--K){const Q=M[K],kt=Q&&Q.name;typeof kt!="string"||Ht[Qt(kt)]||wh(w,Q,kt)}},pa=function(w,M){let K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const Q=[w];for(;Q.length>0;){const kt=Q.pop();if(M(kt)===!1)continue;if(K&&F(kt)===re.element){const Dt=k(kt);Ar(Dt)&&Q.push(Dt)}const Ft=C(kt);if(Ft)for(let Dt=Ft.length-1;Dt>=0;--Dt)Q.push(Ft[Dt])}},ga=function(w){pa(w,M=>{F(M)===re.element&&_h(M)})},ma=function(w){const M=[];return pa(w,K=>{M.push(K)},!0),M},Yy=function(w,M){const K=va();fr(ma(w),Q=>{F(Q)===re.element&&Ba(K,Q)}),fr(M,Q=>{F(Q)===re.element&&!io(K,Q)&&_h(Q)})},vh=function(w,M){let K=!1;return fr(t.removed,Q=>{Q.element&&(K=K||Q.element===w,ga(Q.element))}),Yy(w,M),K},Uy=8,jy=function(w,M){const K=mt;let Q=null;const kt=()=>(Q||(Q=va(),fr(M,Ft=>{Ba(Q,Ft)})),Q);for(let Ft=0;;Ft++){const Dt=ma(w),se=[w];let Ke=!1;if(fr(Dt,Se=>{F(Se)===re.documentFragment?ro(se,Se):!Ke&&!io(K,Se)&&(Ke=io(kt(),Se))}),!Ke)return;if(Ft>=Uy)throw pr("the tree kept changing during in-place sanitization; refusing to return it");fr(se,(Se,Be)=>{Gy(Se,Be>0,w,kt())})}},Gy=function(w,M,K,Q){const kt=ya(w);let Ft;for(;Ft=kt.nextNode();)!io(Q,Ft)||io(mt,Ft)||(M&&He(nt.uponSanitizeShadowNode,Ft,null),xa(Ft,K),ba(Ft,K),Ar(Ft.content)&&eo(Ft.content))},Xy=function(w){mt&&Ba(mt,w)},Bh=function(w,M){return O?w==="patchsrc"?!0:w==="for"&&M!=="label"&&M!=="output":!1},Vy=function(w){O&&pa(w,M=>{const K=F(M);if(K===re.processingInstruction||K===re.comment&&de(xc,M.data)){try{f(M)}catch{}return!1}if(K===re.element){const Q=M,kt=Qt(E(M));try{Q.hasAttribute&&Q.hasAttribute("patchsrc")&&Q.removeAttribute("patchsrc"),Q.hasAttribute&&Q.hasAttribute("for")&&Bh("for",kt)&&Q.removeAttribute("for")}catch{}}return!0})},Lh=function(w){let M=null,K=null;if(T)w="<remove></remove>"+w;else{const Ft=cc(w,/^[\r\n\t ]+/);K=Ft&&Ft[0]}Ji==="application/xhtml+xml"&&li===Ze&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const Q=D?q(w):w;if(li===Ze)try{M=new c().parseFromString(Q,Ji)}catch{}if(!M||!M.documentElement){M=gt.createDocument(li,"template",null);try{M.documentElement.innerHTML=la?J:Q}catch{}}const kt=M.body||M.documentElement;return w&&K&&kt.insertBefore(r.createTextNode(K),kt.childNodes[0]||null),li===Ze?vt.call(M,j?"html":"body")[0]:j?M.documentElement:kt},ya=function(w){const M=L?L(w):w.ownerDocument;return Tt.call(M||w,w,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},jo=function(w){return w=oo(w,St," "),w=oo(w,Ot," "),w=oo(w,_t," "),w},Ca=function(w){var M;Fh(w);const K=(M=w.querySelectorAll)===null||M===void 0?void 0:M.call(w,"template");K&&fr(K,Q=>{Ar(Q.content)&&Ca(Q.content)})},Fh=function(w){w.normalize();const M=L?L(w):w.ownerDocument,K=Tt.call(M||w,w,h.SHOW_TEXT|h.SHOW_COMMENT|h.SHOW_CDATA_SECTION|h.SHOW_PROCESSING_INSTRUCTION,null);let Q=K.nextNode();for(;Q;)Q.data=jo(Q.data),Q=K.nextNode()},Go=function(w){const M=v?v(w):null;return typeof M!="string"||Qt(M)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==S(w)||typeof w.removeAttribute!="function"||typeof w.removeAttributeNode!="function"||typeof w.getAttributeNode!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==_(w)||w.childNodes!==C(w)},Ar=function(w){if(!_||typeof w!="object"||w===null)return!1;try{return _(w)===re.documentFragment}catch{return!1}},to=function(w){if(!_||typeof w!="object"||w===null)return!1;try{return typeof _(w)=="number"}catch{return!1}};function He(it,w,M){it.length!==0&&fr(it,K=>{K.call(t,w,M,hi)})}const Zy=function(w,M){return!!(O&&w.hasChildNodes()&&!to(w.firstElementChild)&&de($a,w.textContent)&&de($a,w.innerHTML)||O&&wk[M]&&F(w)===re.element&&W(w)===Ze&&(to(w.firstElementChild)||typeof w.textContent=="string"&&de($a,w.textContent))||w.nodeType===re.processingInstruction||O&&w.nodeType===re.comment&&de(xc,w.data))},Xo=function(w,M){if(w instanceof RegExp)return de(w,M);if(w instanceof Function){for(var K=arguments.length,Q=new Array(K>2?K-2:0),kt=2;kt<K;kt++)Q[kt-2]=arguments[kt];return!!w(M,...Q)}return!1},Ky=function(w,M,K){if(!Ie[M]&&Mh(M)&&Xo(ce.tagNameCheck,M))return!1;if(dt&&!Mt[M]&&!Mt[jr(M)]){const Q=x(w),kt=C(w);if(kt&&Q){const Ft=kt.length;for(let Dt=Ft-1;Dt>=0;--Dt){const se=w===K?d(kt[Dt],!0):kt[Dt];Q.insertBefore(se,y(w))}}}return Fr(w),!0},Ah=function(w,M,K,Q){return w.length===0?M:M===K||M===Q?Oe(M):M},ui=function(w,M){return w===M||x(w)!==null?!1:(ht&&ga(w),!0)},xa=function(w,M){if(Xy(w),He(nt.beforeSanitizeElements,w,null),ui(w,M))return!0;if(Go(w))return Fr(w),!0;const K=Qt(E(w));if(Yt=Ah(nt.uponSanitizeElement,Yt,ve,U),He(nt.uponSanitizeElement,w,{tagName:K,allowedTags:Yt}),ui(w,M))return!0;if(Zy(w,K))return Fr(w),!0;if(Ie[K]||!(ee.tagCheck instanceof Function&&ee.tagCheck(K))&&!Yt[K]){const Q=Ky(w,K,M);return Q===!1&&(He(nt.afterSanitizeElements,w,null),ui(w,M))?!0:Q}if(F(w)===re.element&&!Hy(w)||(K==="noscript"||K==="noembed"||K==="noframes")&&de(Sk,w.innerHTML))return Fr(w),!0;if(g&&w.nodeType===re.text){const Q=jo(w.textContent);w.textContent!==Q&&(ro(t.removed,{element:w.cloneNode()}),w.textContent=Q)}return He(nt.afterSanitizeElements,w,null),ui(w,M)},Eh=function(w,M,K){if(_r[M]||Bh(M,w)||Z&&(M==="id"||M==="name")&&(K in r||K in Ny))return!1;const Q=Ht[M]||ee.attributeCheck instanceof Function&&ee.attributeCheck(M,w);return Ve&&de(Pt,M)||vr&&de(qt,M)?!0:Q?Lr[M]||de(wr,oo(K,_e,""))||(M==="src"||M==="xlink:href"||M==="href")&&w!=="script"&&uc(K,"data:")===0&&Qi[w]||cr&&!de(he,oo(K,_e,""))?!0:!K:Mh(w)&&Xo(ce.tagNameCheck,w)&&Xo(ce.attributeNameCheck,M,w)||M==="is"&&ce.allowCustomizedBuiltInElements&&Xo(ce.tagNameCheck,K)},Qy=zt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Mh=function(w){return!Qy[jr(w)]&&de(De,w)},Jy=function(w,M,K,Q){if(D&&typeof l=="object"&&typeof l.getAttributeType=="function"&&!K)switch(l.getAttributeType(w,M)){case"TrustedHTML":return q(Q);case"TrustedScriptURL":return R(Q)}return Q},tC=function(w,M,K,Q){try{return K?w.setAttributeNS(K,M,Q):w.setAttribute(M,Q),Go(w)?(Fr(w),!1):!0}catch{return ci(M,w),!1}},$h=function(w,M){return O&&de(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,M)?!0:jr(w)==="attributename"&&cc(M,"href")!==null},ba=function(w,M){if(He(nt.beforeSanitizeAttributes,w,null),ui(w,M))return;const K=w.attributes;if(!K||Go(w))return;Ht=Ah(nt.uponSanitizeAttribute,Ht,hr,at);const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ht,forceKeepAttr:void 0};let kt=K.length;const Ft=Qt(w.nodeName);for(;kt--;){const Dt=K[kt],se=Dt.name,Ke=Dt.namespaceURI,Se=Dt.value,Be=Qt(se),di=Se;let Le=se==="value"?di:sk(di),Oh=!1;if(Q.attrName=Be,Q.attrValue=Le,Q.keepAttr=!0,Q.forceKeepAttr=void 0,He(nt.uponSanitizeAttribute,w,Q),Le=Q.attrValue,ot&&(Be==="id"||Be==="name")&&uc(Le,rt)!==0&&(ci(se,w,Dt),Le=rt+Le,Oh=!0),$h(se,Le)){ci(se,w,Dt);continue}if(!Q.forceKeepAttr){if(!Q.keepAttr){ci(se,w,Dt);continue}if(!ur&&de(bc,Le)){ci(se,w,Dt);continue}if(g&&(Le=jo(Le)),!Eh(Ft,Be,Le)){ci(se,w,Dt);continue}Le=Jy(Ft,Be,Ke,Le),Le!==di&&tC(w,se,Ke,Le)&&Oh&&hc(t.removed)}}He(nt.afterSanitizeAttributes,w,null),ui(w,M)},eo=function(w){let M=null;const K=ya(w);for(He(nt.beforeSanitizeShadowDOM,w,null);M=K.nextNode();)if(He(nt.uponSanitizeShadowNode,M,null),xa(M,w),ba(M,w),Ar(M.content)&&eo(M.content),F(M)===re.element){const Q=k(M);Ar(Q)&&(ka(Q),eo(Q))}g&&Fh(w),He(nt.afterSanitizeShadowDOM,w,null)},ka=function(w){const M=[{node:w,shadow:null}];for(;M.length>0;){const K=M.pop();if(K.shadow){eo(K.shadow);continue}const Q=K.node,kt=F(Q)===re.element,Ft=C(Q);if(Ft)for(let Dt=Ft.length-1;Dt>=0;--Dt)M.push({node:Ft[Dt],shadow:null});if(kt){const Dt=v?v(Q):null;if(typeof Dt=="string"&&Qt(Dt)==="template"){const se=Q.content;Ar(se)&&M.push({node:se,shadow:null})}}if(kt){const Dt=k(Q);Ar(Dt)&&M.push({node:null,shadow:Dt},{node:Dt,shadow:null})}}};return t.sanitize=function(it){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=null,K=null,Q=null,kt=null;if(la=!it,la&&(it="<!-->"),typeof it!="string"&&!to(it)&&(it=hk(it),typeof it!="string"))throw pr("dirty is not a string, aborting");if(!t.isSupported)return it;V?(Yt=U,Ht=at):da(w),(nt.uponSanitizeElement.length>0||nt.uponSanitizeAttribute.length>0)&&(Yt=Oe(Yt)),nt.uponSanitizeAttribute.length>0&&(Ht=Oe(Ht)),t.removed=[];const Ft=ht&&typeof it!="string"&&to(it);let Dt=[];const se=mt;if(Ft){Vy(it);const Be=E(it);if(typeof Be=="string"){const di=Qt(Be);if(!Yt[di]||Ie[di])throw fa(it),pr("root node is forbidden and cannot be sanitized in-place")}if(Go(it))throw fa(it),pr("root node is clobbered and cannot be sanitized in-place");Dt=ma(it),mt=va()}else if(to(it))M=Lh("<!---->"),K=M.ownerDocument.importNode(it,!0),K.nodeType===re.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?M=K:M.appendChild(K),ka(M);else{if(!N&&!g&&!j&&it.indexOf("<")===-1)return D&&X?q(it):it;if(M=Lh(it),!M)return N?null:X?J:""}M&&T&&Fr(M.firstChild);const Ke=Ft?it:M;try{Ft&&ka(it);const Be=ya(Ke);for(;Q=Be.nextNode();)xa(Q,Ke),ba(Q,Ke),Ar(Q.content)&&eo(Q.content);Ft&&jy(it,Dt)}catch(Be){throw Ft&&(fa(it),vh(it,Dt)),Be}finally{mt=se}if(Ft){if(vh(it,Dt))throw pr("a node selected for removal could not be safely returned; refusing to sanitize in place");return g&&Ca(it),it}if(N){if(g&&Ca(M),et)for(kt=wt.call(M.ownerDocument);M.firstChild;)kt.appendChild(M.firstChild);else kt=M;return(Ht.shadowroot||Ht.shadowrootmode)&&(kt=bt.call(i,kt,!0)),kt}let Se=j?M.outerHTML:M.innerHTML;return j&&Yt["!doctype"]&&M.ownerDocument&&M.ownerDocument.doctype&&M.ownerDocument.doctype.name&&de(kk,M.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+M.ownerDocument.doctype.name+`>
4
+ `+Se),g&&(Se=jo(Se)),D&&X?q(Se):Se},t.setConfig=function(){let it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};da(it),V=!0,U=Yt,at=Ht},t.clearConfig=function(){hi=null,V=!1,U=null,at=null,D=I,J=""},t.isValidAttribute=function(it,w,M){hi||da({});const K=Qt(it),Q=Qt(w);return typeof M=="string"&&($h(w,M)||!ur&&de(bc,M))?!1:Eh(K,Q,M)},t.addHook=function(it,w){typeof w=="function"&&Ae(nt,it)&&ro(nt[it],w)},t.removeHook=function(it,w){if(Ae(nt,it)){if(w!==void 0){const M=rk(nt[it],w);return M===-1?void 0:ok(nt[it],M,1)[0]}return hc(nt[it])}},t.removeHooks=function(it){Ae(nt,it)&&(nt[it]=[])},t.removeAllHooks=function(){nt=kc()},t}var Wi=Od(),_n=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(o=>_n(e,o,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(o=>{e.includes(o)||e.push(o)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const o=e;Object.entries(t).forEach(([s,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),o[s]===void 0&&(o[s]=Array.isArray(a)?[]:{}),typeof o[s]=="object"&&(o[s]=_n(o[s],a,{depth:r-1}))}else typeof o[s]!="object"&&(Object.hasOwn(e,s)?o[s]=a:Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ne=_n,sr="#ffffff",ar="#f2f2f2",Lt=p((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),_i,Bk=(_i=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Y(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Y(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Y(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Y(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||$(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Y(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(_i,"Theme"),_i),Lk=p(e=>{const t=new Bk;return t.calculate(e),t},"getThemeVariables"),vi,Fk=(vi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.lineColor=$(this.background),this.textColor=$(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H($("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=Y("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Y(this.sectionBkgColor,10),this.taskBorderColor=Ir(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ir(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=H(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=H(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=H(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=$(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||$(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??H(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=H(this.secondaryColor,20),this.git1=H(this.pie2||this.secondaryColor,20),this.git2=H(this.pie3||this.tertiaryColor,20),this.git3=H(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=H(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=H(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=H(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=H(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||$(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||$(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||H("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||H("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||H("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||H("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||H(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||H(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||H(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||H(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(vi,"Theme"),vi),Ak=p(e=>{const t=new Fk;return t.calculate(e),t},"getThemeVariables"),Bi,Ek=(Bi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.lineColor=$(this.background),this.textColor=$(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ir(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Y(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Y(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Y(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Y(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||$(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||$(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||H(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||H(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||Y($(this.git0),25),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||$(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||$(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Bi,"Theme"),Bi),Mk=p(e=>{const t=new Ek;return t.calculate(e),t},"getThemeVariables"),Li,$k=(Li=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=H("#cde498",10),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.primaryColor),this.lineColor=$(this.background),this.textColor=$(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=Y(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Y(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Y(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Y(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Y(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||$(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||$(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Li,"Theme"),Li),Ok=p(e=>{const t=new $k;return t.calculate(e),t},"getThemeVariables"),Fi,Dk=(Fi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=H(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.lineColor=$(this.background),this.textColor=$(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=H(this.contrast,55),this.border2=this.contrast,this.actorBorder=H(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||$(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||Y(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=H(this.contrast,30),this.sectionBkgColor2=H(this.contrast,30),this.taskBorderColor=Y(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=H(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Y(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Y(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Fi,"Theme"),Fi),Ik=p(e=>{const t=new Dk;return t.calculate(e),t},"getThemeVariables"),Ai,Pk=(Ai=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Y(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||H(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=Y(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=Y(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||$(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||H(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||Y(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ai,"Theme"),Ai),Rk=p(e=>{const t=new Pk;return t.calculate(e),t},"getThemeVariables"),Ei,Nk=(Ei=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H($("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=$(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Y(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Y(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Y(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||$(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Y(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ei,"Theme"),Ei),qk=p(e=>{const t=new Nk;return t.calculate(e),t},"getThemeVariables"),Mi,zk=(Mi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Lt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Y(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||H(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=this.mainBkg;if(this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=Y(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=Y(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||$(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||H(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||Y(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Mi,"Theme"),Mi),Wk=p(e=>{const t=new zk;return t.calculate(e),t},"getThemeVariables"),$i,Hk=($i=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H($("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=$(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Y(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Y(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Y(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||$(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Y(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p($i,"Theme"),$i),Yk=p(e=>{const t=new Hk;return t.calculate(e),t},"getThemeVariables"),Oi,Uk=(Oi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Y(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||H(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||$(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||H(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||Y(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Oi,"Theme"),Oi),jk=p(e=>{const t=new Uk;return t.calculate(e),t},"getThemeVariables"),Di,Gk=(Di=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H($("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=$(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Y(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||$(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Y(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=Y(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?H(this.quadrant1Fill):Y(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Y(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Di,"Theme"),Di),Xk=p(e=>{const t=new Gk;return t.calculate(e),t},"getThemeVariables"),xr={base:{getThemeVariables:Lk},dark:{getThemeVariables:Ak},default:{getThemeVariables:Mk},forest:{getThemeVariables:Ok},neutral:{getThemeVariables:Ik},neo:{getThemeVariables:Rk},"neo-dark":{getThemeVariables:qk},redux:{getThemeVariables:Wk},"redux-dark":{getThemeVariables:Yk},"redux-color":{getThemeVariables:jk},"redux-dark-color":{getThemeVariables:Xk}},ue={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Dd={...ue,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:xr.default.getThemeVariables(),sequence:{...ue.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ue.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ue.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ue.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ue.pie,useWidth:984},xyChart:{...ue.xyChart,useWidth:void 0},requirement:{...ue.requirement,useWidth:void 0},packet:{...ue.packet},eventmodeling:{...ue.eventmodeling},treeView:{...ue.treeView,useWidth:void 0},radar:{...ue.radar},railroad:{...ue.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...ue.ishikawa},sankey:{...ue.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ue.venn},cynefin:{...ue.cynefin}},Id=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Id(e[i],"")]:[...r,t+i],[]),"keyify"),Vk=new Set(Id(Dd,"")),Pd=Dd,Zk={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Kk=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(z.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),xs=p(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>xs(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Vk.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Zk[t];i?Kk(e[t],i):(z.debug("sanitizing object",t),xs(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=Rd(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),Rd=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Hi=Object.freeze(Pd),nr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ee=ne({},Hi),bs,Jr=[],So=ne({},Hi),Ro=p((e,t)=>{let r=ne({},e),i={};for(const o of t)zd(o),i=ne(i,o);if(r=ne(r,i),i.theme&&i.theme in xr){const o=ne({},bs),s=ne(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in xr&&(r.themeVariables=xr[r.theme].getThemeVariables(s))}return So=r,i1(So),So},"updateCurrentConfig"),Qk=p(e=>(Ee=ne({},Hi),Ee=ne(Ee,e),e.theme&&xr[e.theme]&&(Ee.themeVariables=xr[e.theme].getThemeVariables(e.themeVariables)),Ro(Ee,Jr),Ee),"setSiteConfig"),Jk=p(e=>{bs=ne({},e)},"saveConfigFromInitialize"),t1=p(e=>(Ee=ne(Ee,e),Ro(Ee,Jr),Ee),"updateSiteConfig"),Nd=p(()=>ne({},Ee),"getSiteConfig"),qd=p(e=>(Ro(So,[e]),Vt()),"setConfig"),Vt=p(()=>ne({},So),"getConfig"),zd=p(e=>{e&&(["secure",...Ee.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&zd(e[t])}))},"sanitize"),e1=p(e=>{xs(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Jr.push(e),Ro(Ee,Jr)},"addDirective"),ks=p((e=Ee)=>{Jr=[],Ro(e,Jr)},"reset"),r1={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Tc={},Wd=p(e=>{Tc[e]||(z.warn(r1[e]),Tc[e]=!0)},"issueWarning"),i1=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Wd("LAZY_LOAD_DEPRECATED")},"checkConfig"),pA=p(()=>{let e={};bs&&(e=ne(e,bs));for(const t of Jr)e=ne(e,t);return e},"getUserDefinedConfig"),ke=p(e=>(e.flowchart?.htmlLabels!=null&&Wd("FLOWCHART_HTML_LABELS_DEPRECATED"),nr(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Hd=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,wo=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,o1=/\s*%%.*\n/gm,Ii,Yd=(Ii=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Ii,"UnknownDiagramError"),Ii),ti={},dl=p(function(e,t){e=e.replace(Hd,"").replace(wo,"").replace(o1,`
5
+ `);for(const[r,{detector:i}]of Object.entries(ti))if(i(e,t))return r;throw new Yd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),vn=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ud(t,r,i)},"registerLazyLoadedDiagrams"),Ud=p((e,t,r)=>{ti[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),ti[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),s1=p(e=>ti[e].loader,"getDiagramLoader"),No=/<br\s*\/?>/gi,a1=p(e=>e?Xd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),n1=(()=>{let e=!1;return()=>{e||(jd(),e=!0)}})();function jd(){const e="data-temp-href-target";Wi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Wi.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(jd,"setupDompurifyHooks");var Gd=p(e=>(n1(),Wi.sanitize(e)),"removeScript"),Sc=p((e,t)=>{if(ke(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Gd(e):r!=="loose"&&(e=Xd(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=u1(e))}return e},"sanitizeMore"),Ne=p((e,t)=>e&&(t.dompurifyConfig?e=Wi.sanitize(Sc(e,t),t.dompurifyConfig).toString():e=Wi.sanitize(Sc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),l1=p((e,t)=>typeof e=="string"?Ne(e,t):e.flat().map(r=>Ne(r,t)),"sanitizeTextOrArray"),h1=p(e=>No.test(e),"hasBreaks"),c1=p(e=>e.split(No),"splitBreaks"),u1=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xd=p(e=>e.replace(No,"#br#"),"breakToPlaceholder"),d1=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),f1=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),p1=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),wc=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];g1(s,a)&&(o=s+","+a,i++,r.pop())}r.push(m1(o))}return r.join("")},"parseGenericTypes"),Bn=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),g1=p((e,t)=>{const r=Bn(e,"~"),i=Bn(t,"~");return r===1&&i===1},"shouldCombineSets"),m1=p(e=>{const t=Bn(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),_c=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ln=/\$\$(.*?)\$\$/g,Eo=p(e=>(e.match(Ln)?.length??0)>0,"hasKatex"),gA=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Vd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),y1=p(async(e,t)=>{if(!Eo(e))return e;if(!(_c()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ln,"MathML is unsupported in this environment.");{const{default:r}=await $t(async()=>{const{default:o}=await import("./katex-HP8lGamR.js");return{default:o}},[],import.meta.url),i=t.forceLegacyMathML||!_c()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(No).map(o=>Eo(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Ln,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Vd=p(async(e,t)=>Ne(await y1(e,t),t),"renderKatexSanitized"),qo={getRows:a1,sanitizeText:Ne,sanitizeTextOrArray:l1,hasBreaks:h1,splitBreaks:c1,lineBreakRegex:No,removeScript:Gd,getUrl:d1,evaluate:nr,getMax:f1,getMin:p1},C1=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),x1=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Zd=p(function(e,t,r,i){const o=x1(t,r,i);C1(e,o)},"configureSvgSize"),b1=p(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;z.info(`SVG bounds: ${s}x${a}`,o);let n=0,h=0;z.info(`Graph bounds: ${n}x${h}`,e),n=s+r*2,h=a+r*2,z.info(`Calculated bounds: ${n}x${h}`),Zd(t,h,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),cs={};function Fn(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}p(Fn,"cssStyleSheetToString");var k1=p((e,t,r,i)=>{let o="";return e in cs&&cs[e]?o=cs[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),`& {
7
+ font-family: ${r.fontFamily};
8
+ font-size: ${r.fontSize};
9
+ fill: ${r.textColor}
10
+ }
11
+ @keyframes edge-animation-frame {
12
+ from {
13
+ stroke-dashoffset: 0;
14
+ }
15
+ }
16
+ @keyframes dash {
17
+ to {
18
+ stroke-dashoffset: 0;
19
+ }
20
+ }
21
+ & .edge-animation-slow {
22
+ stroke-dasharray: 9,5 !important;
23
+ stroke-dashoffset: 900;
24
+ animation: dash 50s linear infinite;
25
+ stroke-linecap: round;
26
+ }
27
+ & .edge-animation-fast {
28
+ stroke-dasharray: 9,5 !important;
29
+ stroke-dashoffset: 900;
30
+ animation: dash 20s linear infinite;
31
+ stroke-linecap: round;
32
+ }
33
+ /* Classes common for multiple diagrams */
34
+
35
+ & .error-icon {
36
+ fill: ${r.errorBkgColor};
37
+ }
38
+ & .error-text {
39
+ fill: ${r.errorTextColor};
40
+ stroke: ${r.errorTextColor};
41
+ }
42
+
43
+ & .edge-thickness-normal {
44
+ stroke-width: ${r.strokeWidth??1}px;
45
+ }
46
+ & .edge-thickness-thick {
47
+ stroke-width: 3.5px
48
+ }
49
+ & .edge-pattern-solid {
50
+ stroke-dasharray: 0;
51
+ }
52
+ & .edge-thickness-invisible {
53
+ stroke-width: 0;
54
+ fill: none;
55
+ }
56
+ & .edge-pattern-dashed{
57
+ stroke-dasharray: 3;
58
+ }
59
+ .edge-pattern-dotted {
60
+ stroke-dasharray: 2;
61
+ }
62
+
63
+ & .marker {
64
+ fill: ${r.lineColor};
65
+ stroke: ${r.lineColor};
66
+ }
67
+ & .marker.cross {
68
+ stroke: ${r.lineColor};
69
+ }
70
+
71
+ & svg {
72
+ font-family: ${r.fontFamily};
73
+ font-size: ${r.fontSize};
74
+ }
75
+ & p {
76
+ margin: 0
77
+ }
78
+
79
+ ${o}
80
+ .node .neo-node {
81
+ stroke: ${r.nodeBorder};
82
+ }
83
+
84
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
+ }
88
+ [data-look="neo"].swimlane.cluster rect {
89
+ filter: none;
90
+ }
91
+
92
+
93
+ [data-look="neo"].node path {
94
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
95
+ stroke-width: ${r.strokeWidth??1}px;
96
+ }
97
+
98
+ [data-look="neo"].node .outer-path {
99
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
100
+ }
101
+
102
+ [data-look="neo"].node .neo-line path {
103
+ stroke: ${r.nodeBorder};
104
+ filter: none;
105
+ }
106
+
107
+ [data-look="neo"].node circle{
108
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
109
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
110
+ }
111
+
112
+ [data-look="neo"].node circle .state-start{
113
+ fill: #000000;
114
+ }
115
+
116
+ [data-look="neo"].icon-shape .icon {
117
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
118
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
119
+ }
120
+
121
+ [data-look="neo"].icon-shape .icon-neo path {
122
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
123
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
124
+ }
125
+
126
+ ${t}
127
+ `},"getStyles"),T1=p((e,t)=>{t!==void 0&&(cs[e]=t)},"addStylesForDiagram"),S1=k1,Kd={};Rb(Kd,{clear:()=>w1,getAccDescription:()=>L1,getAccTitle:()=>v1,getDiagramTitle:()=>A1,setAccDescription:()=>B1,setAccTitle:()=>_1,setDiagramTitle:()=>F1});var fl="",pl="",gl="",ml=p(e=>Ne(e,Vt()),"sanitizeText"),w1=p(()=>{fl="",gl="",pl=""},"clear"),_1=p(e=>{fl=ml(e).replace(/^\s+/g,"")},"setAccTitle"),v1=p(()=>fl,"getAccTitle"),B1=p(e=>{gl=ml(e).replace(/\n\s+/g,`
128
+ `)},"setAccDescription"),L1=p(()=>gl,"getAccDescription"),F1=p(e=>{pl=ml(e)},"setDiagramTitle"),A1=p(()=>pl,"getDiagramTitle"),vc=z,E1=ul,It=Vt,mA=qd,yA=Hi,yl=p(e=>Ne(e,It()),"sanitizeText"),M1=b1,$1=p(()=>Kd,"getCommonDb"),Ts={},Ss=p((e,t,r)=>{Ts[e]&&vc.warn(`Diagram with id ${e} already registered. Overwriting.`),Ts[e]=t,r&&Ud(e,r),T1(e,t.styles),t.injectUtils?.(vc,E1,It,yl,M1,$1(),()=>{})},"registerDiagram"),An=p(e=>{if(e in Ts)return Ts[e];throw new O1(e)},"getDiagram"),Pi,O1=(Pi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Pi,"DiagramNotFoundError"),Pi),En="http://www.w3.org/1999/xhtml",Bc={svg:"http://www.w3.org/2000/svg",xhtml:En,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Bc.hasOwnProperty(t)?{space:Bc[t],local:e}:e}function D1(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===En&&t.documentElement.namespaceURI===En?t.createElement(e):t.createElementNS(r,e)}}function I1(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Jd(e){var t=Qd(e);return(t.local?I1:D1)(t)}function P1(){}function tf(e){return e==null?P1:function(){return this.querySelector(e)}}function R1(e){typeof e!="function"&&(e=tf(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=new Array(a),h,c,l=0;l<a;++l)(h=s[l])&&(c=e.call(h,h.__data__,l,s))&&("__data__"in h&&(c.__data__=h.__data__),n[l]=c);return new qe(i,this._parents)}function N1(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function q1(){return[]}function z1(e){return e==null?q1:function(){return this.querySelectorAll(e)}}function W1(e){return function(){return N1(e.apply(this,arguments))}}function H1(e){typeof e=="function"?e=W1(e):e=z1(e);for(var t=this._groups,r=t.length,i=[],o=[],s=0;s<r;++s)for(var a=t[s],n=a.length,h,c=0;c<n;++c)(h=a[c])&&(i.push(e.call(h,h.__data__,c,a)),o.push(h));return new qe(i,o)}function Y1(e){return function(){return this.matches(e)}}function ef(e){return function(t){return t.matches(e)}}var U1=Array.prototype.find;function j1(e){return function(){return U1.call(this.children,e)}}function G1(){return this.firstElementChild}function X1(e){return this.select(e==null?G1:j1(typeof e=="function"?e:ef(e)))}var V1=Array.prototype.filter;function Z1(){return Array.from(this.children)}function K1(e){return function(){return V1.call(this.children,e)}}function Q1(e){return this.selectAll(e==null?Z1:K1(typeof e=="function"?e:ef(e)))}function J1(e){typeof e!="function"&&(e=Y1(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=[],h,c=0;c<a;++c)(h=s[c])&&e.call(h,h.__data__,c,s)&&n.push(h);return new qe(i,this._parents)}function rf(e){return new Array(e.length)}function t2(){return new qe(this._enter||this._groups.map(rf),this._parents)}function ws(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ws.prototype={constructor:ws,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function e2(e){return function(){return e}}function r2(e,t,r,i,o,s){for(var a=0,n,h=t.length,c=s.length;a<c;++a)(n=t[a])?(n.__data__=s[a],i[a]=n):r[a]=new ws(e,s[a]);for(;a<h;++a)(n=t[a])&&(o[a]=n)}function i2(e,t,r,i,o,s,a){var n,h,c=new Map,l=t.length,u=s.length,d=new Array(l),f;for(n=0;n<l;++n)(h=t[n])&&(d[n]=f=a.call(h,h.__data__,n,t)+"",c.has(f)?o[n]=h:c.set(f,h));for(n=0;n<u;++n)f=a.call(e,s[n],n,s)+"",(h=c.get(f))?(i[n]=h,h.__data__=s[n],c.delete(f)):r[n]=new ws(e,s[n]);for(n=0;n<l;++n)(h=t[n])&&c.get(d[n])===h&&(o[n]=h)}function o2(e){return e.__data__}function s2(e,t){if(!arguments.length)return Array.from(this,o2);var r=t?i2:r2,i=this._parents,o=this._groups;typeof e!="function"&&(e=e2(e));for(var s=o.length,a=new Array(s),n=new Array(s),h=new Array(s),c=0;c<s;++c){var l=i[c],u=o[c],d=u.length,f=a2(e.call(l,l&&l.__data__,c,i)),m=f.length,y=n[c]=new Array(m),C=a[c]=new Array(m),x=h[c]=new Array(d);r(l,u,y,C,x,f,t);for(var k=0,S=0,_,v;k<m;++k)if(_=y[k]){for(k>=S&&(S=k+1);!(v=C[S])&&++S<m;);_._next=v||null}}return a=new qe(a,i),a._enter=n,a._exit=h,a}function a2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function n2(){return new qe(this._exit||this._groups.map(rf),this._parents)}function l2(e,t,r){var i=this.enter(),o=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),r==null?s.remove():r(s),i&&o?i.merge(o).order():o}function h2(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,o=r.length,s=i.length,a=Math.min(o,s),n=new Array(o),h=0;h<a;++h)for(var c=r[h],l=i[h],u=c.length,d=n[h]=new Array(u),f,m=0;m<u;++m)(f=c[m]||l[m])&&(d[m]=f);for(;h<o;++h)n[h]=r[h];return new qe(n,this._parents)}function c2(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],o=i.length-1,s=i[o],a;--o>=0;)(a=i[o])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function u2(e){e||(e=d2);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s){for(var a=r[s],n=a.length,h=o[s]=new Array(n),c,l=0;l<n;++l)(c=a[l])&&(h[l]=c);h.sort(t)}return new qe(o,this._parents).order()}function d2(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function f2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function p2(){return Array.from(this)}function g2(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],o=0,s=i.length;o<s;++o){var a=i[o];if(a)return a}return null}function m2(){let e=0;for(const t of this)++e;return e}function y2(){return!this.node()}function C2(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var o=t[r],s=0,a=o.length,n;s<a;++s)(n=o[s])&&e.call(n,n.__data__,s,o);return this}function x2(e){return function(){this.removeAttribute(e)}}function b2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function k2(e,t){return function(){this.setAttribute(e,t)}}function T2(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function S2(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function w2(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function _2(e,t){var r=Qd(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?b2:x2:typeof t=="function"?r.local?w2:S2:r.local?T2:k2)(r,t))}function of(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function v2(e){return function(){this.style.removeProperty(e)}}function B2(e,t,r){return function(){this.style.setProperty(e,t,r)}}function L2(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function F2(e,t,r){return arguments.length>1?this.each((t==null?v2:typeof t=="function"?L2:B2)(e,t,r??"")):A2(this.node(),e)}function A2(e,t){return e.style.getPropertyValue(t)||of(e).getComputedStyle(e,null).getPropertyValue(t)}function E2(e){return function(){delete this[e]}}function M2(e,t){return function(){this[e]=t}}function $2(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function O2(e,t){return arguments.length>1?this.each((t==null?E2:typeof t=="function"?$2:M2)(e,t)):this.node()[e]}function sf(e){return e.trim().split(/^|\s+/)}function Cl(e){return e.classList||new af(e)}function af(e){this._node=e,this._names=sf(e.getAttribute("class")||"")}af.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function nf(e,t){for(var r=Cl(e),i=-1,o=t.length;++i<o;)r.add(t[i])}function lf(e,t){for(var r=Cl(e),i=-1,o=t.length;++i<o;)r.remove(t[i])}function D2(e){return function(){nf(this,e)}}function I2(e){return function(){lf(this,e)}}function P2(e,t){return function(){(t.apply(this,arguments)?nf:lf)(this,e)}}function R2(e,t){var r=sf(e+"");if(arguments.length<2){for(var i=Cl(this.node()),o=-1,s=r.length;++o<s;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof t=="function"?P2:t?D2:I2)(r,t))}function N2(){this.textContent=""}function q2(e){return function(){this.textContent=e}}function z2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function W2(e){return arguments.length?this.each(e==null?N2:(typeof e=="function"?z2:q2)(e)):this.node().textContent}function H2(){this.innerHTML=""}function Y2(e){return function(){this.innerHTML=e}}function U2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function j2(e){return arguments.length?this.each(e==null?H2:(typeof e=="function"?U2:Y2)(e)):this.node().innerHTML}function G2(){this.nextSibling&&this.parentNode.appendChild(this)}function X2(){return this.each(G2)}function V2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Z2(){return this.each(V2)}function K2(e){var t=typeof e=="function"?e:Jd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Q2(){return null}function J2(e,t){var r=typeof e=="function"?e:Jd(e),i=t==null?Q2:typeof t=="function"?t:tf(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function tT(){var e=this.parentNode;e&&e.removeChild(this)}function eT(){return this.each(tT)}function rT(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function iT(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function oT(e){return this.select(e?iT:rT)}function sT(e){return arguments.length?this.property("__data__",e):this.node().__data__}function aT(e){return function(t){e.call(this,t,this.__data__)}}function nT(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function lT(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,o=t.length,s;r<o;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function hT(e,t,r){return function(){var i=this.__on,o,s=aT(t);if(i){for(var a=0,n=i.length;a<n;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=r),o.value=t;return}}this.addEventListener(e.type,s,r),o={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(o):this.__on=[o]}}function cT(e,t,r){var i=nT(e+""),o,s=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var h=0,c=n.length,l;h<c;++h)for(o=0,l=n[h];o<s;++o)if((a=i[o]).type===l.type&&a.name===l.name)return l.value}return}for(n=t?hT:lT,o=0;o<s;++o)this.each(n(i[o],t,r));return this}function hf(e,t,r){var i=of(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,r):(o=i.document.createEvent("Event"),r?(o.initEvent(t,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function uT(e,t){return function(){return hf(this,e,t)}}function dT(e,t){return function(){return hf(this,e,t.apply(this,arguments))}}function fT(e,t){return this.each((typeof t=="function"?dT:uT)(e,t))}function*pT(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],o=0,s=i.length,a;o<s;++o)(a=i[o])&&(yield a)}var gT=[null];function qe(e,t){this._groups=e,this._parents=t}function mT(){return this}qe.prototype={constructor:qe,select:R1,selectAll:H1,selectChild:X1,selectChildren:Q1,filter:J1,data:s2,enter:t2,exit:n2,join:l2,merge:h2,selection:mT,order:c2,sort:u2,call:f2,nodes:p2,node:g2,size:m2,empty:y2,each:C2,attr:_2,style:F2,property:O2,classed:R2,text:W2,html:j2,raise:X2,lower:Z2,append:K2,insert:J2,remove:eT,clone:oT,datum:sT,on:cT,dispatch:fT,[Symbol.iterator]:pT};function Et(e){return typeof e=="string"?new qe([[document.querySelector(e)]],[document.documentElement]):new qe([[e]],gT)}var yT=0;function Lc(){this._="@"+(++yT).toString(36)}Lc.prototype={constructor:Lc,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};const go=Math.PI,Mn=2*go,Gr=1e-6,CT=Mn-Gr;function cf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function xT(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return cf;const r=10**t;return function(i){this._+=i[0];for(let o=1,s=i.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+i[o]}}function uf(e,t,r,i){return e===r&&t===i}function bT(e){const t=Math.floor(e);if(!(t<=15))return uf;const r=10**t,i=function(o){return Math.round(o*r)};return function(o,s,a,n){return i(o)===i(a)&&i(s)===i(n)}}class kT{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?cf:xT(t),this._equal=t==null?uf:bT(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,o){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,r,i,o,s,a){this._append`C${+t},${+r},${+i},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,i,o,s){if(t=+t,r=+r,i=+i,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,n=this._y1,h=i-t,c=o-r,l=a-t,u=n-r,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Gr)if(!(Math.abs(u*h-c*l)>Gr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-a,m=o-n,y=h*h+c*c,C=f*f+m*m,x=Math.sqrt(y),k=Math.sqrt(d),S=s*Math.tan((go-Math.acos((y+d-C)/(2*x*k)))/2),_=S/k,v=S/x;Math.abs(_-1)>Gr&&this._append`L${t+_*l},${r+_*u}`,this._append`A${s},${s},0,0,${+(u*f>l*m)},${this._x1=t+v*h},${this._y1=r+v*c}`}}arc(t,r,i,o,s,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(o),h=i*Math.sin(o),c=t+n,l=r+h,u=1^a,d=a?o-s:s-o;if(this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Gr||Math.abs(this._y1-l)>Gr)&&this._append`L${c},${l}`,!!i){if(d<0&&(d=d%Mn+Mn),d>CT)this._append`A${i},${i},0,1,${u},${t-n},${r-h}A${i},${i},0,1,${u},${this._x1=c},${this._y1=l}`;else if(d>Gr){const f=t+i*Math.cos(s),m=r+i*Math.sin(s);if(d>=go&&this._equal(c,l,f,m)){d/=2;let y=o+d;this._append`A${i},${i},0,${+(d>=go)},${u},${t+i*Math.cos(y)},${r+i*Math.sin(y)}`}this._append`A${i},${i},0,${+(d>=go)},${u},${this._x1=f},${this._y1=m}`}}}rect(t,r,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function te(e){return function(){return e}}const Fc=Math.abs,ge=Math.atan2,Hr=Math.cos,TT=Math.max,Da=Math.min,Qe=Math.sin,bi=Math.sqrt,Ce=1e-12,Mo=Math.PI,_s=Mo/2,us=2*Mo;function ST(e){return e>1?0:e<-1?Mo:Math.acos(e)}function Ac(e){return e>=1?_s:e<=-1?-_s:Math.asin(e)}function df(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new kT(t)}function wT(e){return e.innerRadius}function _T(e){return e.outerRadius}function vT(e){return e.startAngle}function BT(e){return e.endAngle}function LT(e){return e&&e.padAngle}function FT(e,t,r,i,o,s,a,n){var h=r-e,c=i-t,l=a-o,u=n-s,d=u*h-l*c;if(!(d*d<Ce))return d=(l*(t-s)-u*(e-o))/d,[e+d*h,t+d*c]}function Qo(e,t,r,i,o,s,a){var n=e-r,h=t-i,c=(a?s:-s)/bi(n*n+h*h),l=c*h,u=-c*n,d=e+l,f=t+u,m=r+l,y=i+u,C=(d+m)/2,x=(f+y)/2,k=m-d,S=y-f,_=k*k+S*S,v=o-s,L=d*y-m*f,F=(S<0?-1:1)*bi(TT(0,v*v*_-L*L)),E=(L*S-k*F)/_,G=(-L*k-S*F)/_,W=(L*S+k*F)/_,D=(-L*k+S*F)/_,J=E-C,I=G-x,A=W-C,P=D-x;return J*J+I*I>A*A+P*P&&(E=W,G=D),{cx:E,cy:G,x01:-l,y01:-u,x11:E*(o/v-1),y11:G*(o/v-1)}}function CA(){var e=wT,t=_T,r=te(0),i=null,o=vT,s=BT,a=LT,n=null,h=df(c);function c(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),m=o.apply(this,arguments)-_s,y=s.apply(this,arguments)-_s,C=Fc(y-m),x=y>m;if(n||(n=l=h()),f<d&&(u=f,f=d,d=u),!(f>Ce))n.moveTo(0,0);else if(C>us-Ce)n.moveTo(f*Hr(m),f*Qe(m)),n.arc(0,0,f,m,y,!x),d>Ce&&(n.moveTo(d*Hr(y),d*Qe(y)),n.arc(0,0,d,y,m,x));else{var k=m,S=y,_=m,v=y,L=C,F=C,E=a.apply(this,arguments)/2,G=E>Ce&&(i?+i.apply(this,arguments):bi(d*d+f*f)),W=Da(Fc(f-d)/2,+r.apply(this,arguments)),D=W,J=W,I,A;if(G>Ce){var P=Ac(G/d*Qe(E)),B=Ac(G/f*Qe(E));(L-=P*2)>Ce?(P*=x?1:-1,_+=P,v-=P):(L=0,_=v=(m+y)/2),(F-=B*2)>Ce?(B*=x?1:-1,k+=B,S-=B):(F=0,k=S=(m+y)/2)}var q=f*Hr(k),R=f*Qe(k),st=d*Hr(v),tt=d*Qe(v);if(W>Ce){var gt=f*Hr(S),Tt=f*Qe(S),wt=d*Hr(_),vt=d*Qe(_),bt;if(C<Mo)if(bt=FT(q,R,wt,vt,gt,Tt,st,tt)){var nt=q-bt[0],St=R-bt[1],Ot=gt-bt[0],_t=Tt-bt[1],Pt=1/Qe(ST((nt*Ot+St*_t)/(bi(nt*nt+St*St)*bi(Ot*Ot+_t*_t)))/2),qt=bi(bt[0]*bt[0]+bt[1]*bt[1]);D=Da(W,(d-qt)/(Pt-1)),J=Da(W,(f-qt)/(Pt+1))}else D=J=0}F>Ce?J>Ce?(I=Qo(wt,vt,q,R,f,J,x),A=Qo(gt,Tt,st,tt,f,J,x),n.moveTo(I.cx+I.x01,I.cy+I.y01),J<W?n.arc(I.cx,I.cy,J,ge(I.y01,I.x01),ge(A.y01,A.x01),!x):(n.arc(I.cx,I.cy,J,ge(I.y01,I.x01),ge(I.y11,I.x11),!x),n.arc(0,0,f,ge(I.cy+I.y11,I.cx+I.x11),ge(A.cy+A.y11,A.cx+A.x11),!x),n.arc(A.cx,A.cy,J,ge(A.y11,A.x11),ge(A.y01,A.x01),!x))):(n.moveTo(q,R),n.arc(0,0,f,k,S,!x)):n.moveTo(q,R),!(d>Ce)||!(L>Ce)?n.lineTo(st,tt):D>Ce?(I=Qo(st,tt,gt,Tt,d,-D,x),A=Qo(q,R,wt,vt,d,-D,x),n.lineTo(I.cx+I.x01,I.cy+I.y01),D<W?n.arc(I.cx,I.cy,D,ge(I.y01,I.x01),ge(A.y01,A.x01),!x):(n.arc(I.cx,I.cy,D,ge(I.y01,I.x01),ge(I.y11,I.x11),!x),n.arc(0,0,d,ge(I.cy+I.y11,I.cx+I.x11),ge(A.cy+A.y11,A.cx+A.x11),x),n.arc(A.cx,A.cy,D,ge(A.y11,A.x11),ge(A.y01,A.x01),!x))):n.arc(0,0,d,v,_,x)}if(n.closePath(),l)return n=null,l+""||null}return c.centroid=function(){var l=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+o.apply(this,arguments)+ +s.apply(this,arguments))/2-Mo/2;return[Hr(u)*l,Qe(u)*l]},c.innerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:te(+l),c):e},c.outerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:te(+l),c):t},c.cornerRadius=function(l){return arguments.length?(r=typeof l=="function"?l:te(+l),c):r},c.padRadius=function(l){return arguments.length?(i=l==null?null:typeof l=="function"?l:te(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:te(+l),c):o},c.endAngle=function(l){return arguments.length?(s=typeof l=="function"?l:te(+l),c):s},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:te(+l),c):a},c.context=function(l){return arguments.length?(n=l??null,c):n},c}function ff(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function pf(e){this._context=e}pf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function _o(e){return new pf(e)}function AT(e){return e[0]}function ET(e){return e[1]}function MT(e,t){var r=te(!0),i=null,o=_o,s=null,a=df(n);e=typeof e=="function"?e:e===void 0?AT:te(e),t=typeof t=="function"?t:t===void 0?ET:te(t);function n(h){var c,l=(h=ff(h)).length,u,d=!1,f;for(i==null&&(s=o(f=a())),c=0;c<=l;++c)!(c<l&&r(u=h[c],c,h))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+e(u,c,h),+t(u,c,h));if(f)return s=null,f+""||null}return n.x=function(h){return arguments.length?(e=typeof h=="function"?h:te(+h),n):e},n.y=function(h){return arguments.length?(t=typeof h=="function"?h:te(+h),n):t},n.defined=function(h){return arguments.length?(r=typeof h=="function"?h:te(!!h),n):r},n.curve=function(h){return arguments.length?(o=h,i!=null&&(s=o(i)),n):o},n.context=function(h){return arguments.length?(h==null?i=s=null:s=o(i=h),n):i},n}function $T(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function OT(e){return e}function xA(){var e=OT,t=$T,r=null,i=te(0),o=te(us),s=te(0);function a(n){var h,c=(n=ff(n)).length,l,u,d=0,f=new Array(c),m=new Array(c),y=+i.apply(this,arguments),C=Math.min(us,Math.max(-us,o.apply(this,arguments)-y)),x,k=Math.min(Math.abs(C)/c,s.apply(this,arguments)),S=k*(C<0?-1:1),_;for(h=0;h<c;++h)(_=m[f[h]=h]=+e(n[h],h,n))>0&&(d+=_);for(t!=null?f.sort(function(v,L){return t(m[v],m[L])}):r!=null&&f.sort(function(v,L){return r(n[v],n[L])}),h=0,u=d?(C-c*S)/d:0;h<c;++h,y=x)l=f[h],_=m[l],x=y+(_>0?_*u:0)+S,m[l]={data:n[l],index:h,value:_,startAngle:y,endAngle:x,padAngle:k};return m}return a.value=function(n){return arguments.length?(e=typeof n=="function"?n:te(+n),a):e},a.sortValues=function(n){return arguments.length?(t=n,r=null,a):t},a.sort=function(n){return arguments.length?(r=n,t=null,a):r},a.startAngle=function(n){return arguments.length?(i=typeof n=="function"?n:te(+n),a):i},a.endAngle=function(n){return arguments.length?(o=typeof n=="function"?n:te(+n),a):o},a.padAngle=function(n){return arguments.length?(s=typeof n=="function"?n:te(+n),a):s},a}class gf{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function mf(e){return new gf(e,!0)}function yf(e){return new gf(e,!1)}function Pr(){}function vs(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Gs(e){this._context=e}Gs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $n(e){return new Gs(e)}function Cf(e){this._context=e}Cf.prototype={areaStart:Pr,areaEnd:Pr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function DT(e){return new Cf(e)}function xf(e){this._context=e}xf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IT(e){return new xf(e)}function bf(e,t){this._basis=new Gs(e),this._beta=t}bf.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],o=t[0],s=e[r]-i,a=t[r]-o,n=-1,h;++n<=r;)h=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+h*s),this._beta*t[n]+(1-this._beta)*(o+h*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var PT=(function e(t){function r(i){return t===1?new Gs(i):new bf(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Bs(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function xl(e,t){this._context=e,this._k=(1-t)/6}xl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Bs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var kf=(function e(t){function r(i){return new xl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function bl(e,t){this._context=e,this._k=(1-t)/6}bl.prototype={areaStart:Pr,areaEnd:Pr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var RT=(function e(t){function r(i){return new bl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function kl(e,t){this._context=e,this._k=(1-t)/6}kl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var NT=(function e(t){function r(i){return new kl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Tl(e,t,r){var i=e._x1,o=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Ce){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,h=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/h,o=(o*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/h}if(e._l23_a>Ce){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/l,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/l}e._context.bezierCurveTo(i,o,s,a,e._x2,e._y2)}function Tf(e,t){this._context=e,this._alpha=t}Tf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Tl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Sf=(function e(t){function r(i){return t?new Tf(i,t):new xl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function wf(e,t){this._context=e,this._alpha=t}wf.prototype={areaStart:Pr,areaEnd:Pr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Tl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var qT=(function e(t){function r(i){return t?new wf(i,t):new bl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function _f(e,t){this._context=e,this._alpha=t}_f.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var zT=(function e(t){function r(i){return t?new _f(i,t):new kl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function vf(e){this._context=e}vf.prototype={areaStart:Pr,areaEnd:Pr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function WT(e){return new vf(e)}function Ec(e){return e<0?-1:1}function Mc(e,t,r){var i=e._x1-e._x0,o=t-e._x1,s=(e._y1-e._y0)/(i||o<0&&-0),a=(r-e._y1)/(o||i<0&&-0),n=(s*o+a*i)/(i+o);return(Ec(s)+Ec(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(n))||0}function $c(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ia(e,t,r){var i=e._x0,o=e._y0,s=e._x1,a=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,o+n*t,s-n,a-n*r,s,a)}function Ls(e){this._context=e}Ls.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ia(this,this._t0,$c(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ia(this,$c(this,r=Mc(this,e,t)),r);break;default:Ia(this,this._t0,r=Mc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Bf(e){this._context=new Lf(e)}(Bf.prototype=Object.create(Ls.prototype)).point=function(e,t){Ls.prototype.point.call(this,t,e)};function Lf(e){this._context=e}Lf.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,o,s){this._context.bezierCurveTo(t,e,i,r,s,o)}};function Ff(e){return new Ls(e)}function Af(e){return new Bf(e)}function Ef(e){this._context=e}Ef.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Oc(e),o=Oc(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],o[0][s],i[1][s],o[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Oc(e){var t,r=e.length-1,i,o=new Array(r),s=new Array(r),a=new Array(r);for(o[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=o[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(o[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/s[t];for(s[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-o[t+1];return[o,s]}function Mf(e){return new Ef(e)}function Xs(e,t){this._context=e,this._t=t}Xs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function $f(e){return new Xs(e,.5)}function Of(e){return new Xs(e,0)}function Df(e){return new Xs(e,1)}var HT=p(e=>{const{securityLevel:t}=It();let r=Et("body");if(t==="sandbox"){const s=Et(`#i${e}`).node()?.contentDocument??document;r=Et(s.body)}return r.select(`#${e}`)},"selectSvgElement"),YT=p(e=>{const{handDrawnSeed:t}=It();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),UT=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Gi=p(e=>{const t=jT([...e.cssCompiledStyles||[],...e.cssStyles||[],...UT(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),jT=p(e=>{const t=new Map;return e.forEach(r=>{const[i,o]=r.split(":");t.set(i.trim(),o?.trim())}),t},"styles2Map"),If=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),pt=p(e=>{const{stylesArray:t}=Gi(e),r=[],i=[],o=[],s=[];return t.forEach(a=>{const n=a[0];If(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&o.push(a.join(":")+" !important"),n==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:s}},"styles2String"),ct=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=It(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:a}=Gi(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||o,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:GT(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),GT=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const XT=Object.freeze({left:0,top:0,width:16,height:16}),Fs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Pf=Object.freeze({...XT,...Fs}),VT=Object.freeze({...Pf,body:"",hidden:!1}),ZT=Object.freeze({width:null,height:null}),KT=Object.freeze({...ZT,...Fs}),QT=(e,t,r,i="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const n=o.pop(),h=o.pop(),c={provider:o.length>0?o[0]:i,prefix:h,name:n};return Pa(c)?c:null}const s=o[0],a=s.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Pa(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return Pa(n,r)?n:null}return null},Pa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function JT(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Dc(e,t){const r=JT(e,t);for(const i in VT)i in Fs?i in e&&!(i in r)&&(r[i]=Fs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function tS(e,t){const r=e.icons,i=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(r[a])return o[a]=[];if(!(a in o)){o[a]=null;const n=i[a]&&i[a].parent,h=n&&s(n);h&&(o[a]=[n].concat(h))}return o[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),o}function Ic(e,t,r){const i=e.icons,o=e.aliases||Object.create(null);let s={};function a(n){s=Dc(i[n]||o[n],s)}return a(t),r.forEach(a),Dc(e,s)}function eS(e,t){if(e.icons[t])return Ic(e,t,[]);const r=tS(e,[t])[t];return r?Ic(e,t,r):null}const rS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,iS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Pc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(rS);if(i===null||!i.length)return e;const o=[];let s=i.shift(),a=iS.test(s);for(;;){if(a){const n=parseFloat(s);isNaN(n)?o.push(s):o.push(Math.ceil(n*t*r)/r)}else o.push(s);if(s=i.shift(),s===void 0)return o.join("");a=!a}}function oS(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const o=e.indexOf(">",i),s=e.indexOf("</"+t);if(o===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;r+=e.slice(o+1,s).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function sS(e,t){return e?"<defs>"+e+"</defs>"+t:t}function aS(e,t,r){const i=oS(e);return sS(i.defs,t+i.content+r)}const nS=e=>e==="unset"||e==="undefined"||e==="none";function lS(e,t){const r={...Pf,...e},i={...KT,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,k=y.vFlip;let S=y.rotate;x?k?S+=2:(C.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),C.push("scale(-1 1)"),o.top=o.left=0):k&&(C.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),C.push("scale(1 -1)"),o.top=o.left=0);let _;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:_=o.height/2+o.top,C.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:C.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:_=o.width/2+o.left,C.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")")}S%2===1&&(o.left!==o.top&&(_=o.left,o.left=o.top,o.top=_),o.width!==o.height&&(_=o.width,o.width=o.height,o.height=_)),C.length&&(s=aS(s,'<g transform="'+C.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,h=o.width,c=o.height;let l,u;a===null?(u=n===null?"1em":n==="auto"?c:n,l=Pc(u,h/c)):(l=a==="auto"?h:a,u=n===null?Pc(l,c/h):n==="auto"?c:n);const d={},f=(y,C)=>{nS(C)||(d[y]=C.toString())};f("width",l),f("height",u);const m=[o.left,o.top,h,c];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:s}}const hS=/\sid="(\S+)"/g,Rc=new Map;function cS(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Rc.get(e)||0;return Rc.set(e,t+1),t?`${e}${t}`:e}function uS(e){const t=[];let r;for(;r=hS.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const s=cS(o),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function dS(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var fS={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},On=new Map,Rf=new Map,pS=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(z.debug("Registering icon pack:",t.name),"loader"in t)Rf.set(t.name,t.loader);else if("icons"in t)On.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Nf=p(async(e,t)=>{const r=QT(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let o=On.get(i);if(!o){const a=Rf.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await a(),prefix:i},On.set(i,o)}catch(n){throw z.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=eS(o,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),gS=p(async e=>{try{return await Nf(e),!0}catch{return!1}},"isIconAvailable"),zo=p(async(e,t,r)=>{let i;try{i=await Nf(e,t?.fallbackPrefix)}catch(a){z.error(a),i=fS}const o=lS(i,t),s=dS(uS(o.body),{...o.attributes,...r});return Ne(s,Vt())},"getIconSVG"),Jo={},ae={},Nc;function mS(){return Nc||(Nc=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.BLANK_URL=ae.relativeFirstCharacters=ae.whitespaceEscapeCharsRegex=ae.urlSchemeRegex=ae.ctrlCharactersRegex=ae.htmlCtrlEntityRegex=ae.htmlEntitiesRegex=ae.invalidProtocolRegex=void 0,ae.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,ae.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,ae.htmlCtrlEntityRegex=/&(newline|tab);/gi,ae.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,ae.urlSchemeRegex=/^.+(:|&colon;)/gim,ae.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,ae.relativeFirstCharacters=[".","/"],ae.BLANK_URL="about:blank"),ae}var qc;function yS(){if(qc)return Jo;qc=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.sanitizeUrl=s;var e=mS();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(h,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var n,h=o(a.trim());do h=r(h).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),h=o(h),n=h.match(e.ctrlCharactersRegex)||h.match(e.htmlEntitiesRegex)||h.match(e.htmlCtrlEntityRegex)||h.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=h;if(!c)return e.BLANK_URL;if(t(c))return c;var l=c.trimStart(),u=l.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=l.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var m=new URL(f);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return f}return Jo}var CS=yS(),xS="​",bS={curveBasis:$n,curveBasisClosed:DT,curveBasisOpen:IT,curveBumpX:mf,curveBumpY:yf,curveBundle:PT,curveCardinalClosed:RT,curveCardinalOpen:NT,curveCardinal:kf,curveCatmullRomClosed:qT,curveCatmullRomOpen:zT,curveCatmullRom:Sf,curveLinear:_o,curveLinearClosed:WT,curveMonotoneX:Ff,curveMonotoneY:Af,curveNatural:Mf,curveStep:$f,curveStepAfter:Df,curveStepBefore:Of},kS=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,TS=p(function(e,t){const r=qf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);xs(a),i=ne(i,[...a])}else i=r.args;if(!i)return;let o=dl(e,t);const s="config";return i[s]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[s],delete i[s]),i},"detectInit"),qf=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${kS.source})(?=[}][%]{2}).*
129
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const o=[];for(;(i=wo.exec(e))!==null;)if(i.index===wo.lastIndex&&wo.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:s,args:a})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return z.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),SS=p(function(e){return e.replace(wo,"")},"removeDirectives"),wS=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Sl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return bS[r]??t}p(Sl,"interpolateToCurve");function zf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?CS.sanitizeUrl(r):r}p(zf,"formatUrl");var _S=p((e,...t)=>{const r=e.split("."),i=r.length-1,o=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){z.error(`Function name: ${e} not found in window`);return}s[o](...t)},"runFunc");function wl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(wl,"distance");function Wf(e){let t,r=0;e.forEach(o=>{r+=wl(o,t),t=o});const i=r/2;return _l(e,i)}p(Wf,"traverseEdge");function Hf(e){return e.length===1?e[0]:Wf(e)}p(Hf,"calcLabelPosition");var zc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),_l=p((e,t)=>{let r,i=t;for(const o of e){if(r){const s=wl(o,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:zc((1-a)*r.x+a*o.x,5),y:zc((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),vS=p((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const o=_l(t,25),s=e?10:5,a=Math.atan2(t[0].y-o.y,t[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(a)*s+(t[0].x+o.x)/2,n.y=-Math.cos(a)*s+(t[0].y+o.y)/2,n},"calcCardinalityPosition");function Yf(e,t,r){const i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const o=25+e,s=_l(i,o),a=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),h={x:0,y:0};return t==="start_left"?(h.x=Math.sin(n+Math.PI)*a+(i[0].x+s.x)/2,h.y=-Math.cos(n+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(h.x=Math.sin(n-Math.PI)*a+(i[0].x+s.x)/2-5,h.y=-Math.cos(n-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(h.x=Math.sin(n)*a+(i[0].x+s.x)/2-5,h.y=-Math.cos(n)*a+(i[0].y+s.y)/2-5):(h.x=Math.sin(n)*a+(i[0].x+s.x)/2,h.y=-Math.cos(n)*a+(i[0].y+s.y)/2),h}p(Yf,"calcTerminalLabelPosition");function Uf(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Uf,"getStylesFromArray");var Wc=0,BS=p(()=>(Wc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Wc),"generateId");function jf(e){let t="";const r="0123456789abcdef",i=r.length;for(let o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(jf,"makeRandomHex");var LS=p(e=>jf(e.length),"random"),FS=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),AS=p(function(e,t){const r=t.text.replace(qo.lineBreakRegex," "),[,i]=Vs(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",i),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const s=o.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),o},"drawSimpleText"),ES=Po((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),qo.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),o=[];let s="";return i.forEach((a,n)=>{const h=br(`${a} `,r),c=br(s,r);if(h>t){const{hyphenatedStrings:d,remainingWord:f}=MS(a,t,"-",r);o.push(s,...d),s=f}else c+h>=t?(o.push(s),s=a):s=[s,a].filter(Boolean).join(" ");n+1===i.length&&o.push(s)}),o.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),MS=Po((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...e],s=[];let a="";return o.forEach((n,h)=>{const c=`${a}${n}`;if(br(c,i)>=t){const u=h+1,d=o.length===u,f=`${c}${r}`;s.push(d?c:f),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Gf(e,t){return vl(e,t).height}p(Gf,"calculateTextHeight");function br(e,t){return vl(e,t).width}p(br,"calculateTextWidth");var vl=Po((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=t;if(!e)return{width:0,height:0};const[,s]=Vs(r),a=["sans-serif",i],n=e.split(qo.lineBreakRegex),h=[],c=Et("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const l=c.append("svg");for(const d of a){let f=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const C=FS();C.text=y||xS;const x=AS(l,C).style("font-size",s).style("font-weight",o).style("font-family",d),k=(x._groups||x)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),f=Math.round(k.height),m.height+=f,m.lineHeight=Math.round(Math.max(m.lineHeight,f))}h.push(m)}l.remove();const u=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ri,$S=(Ri=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Ri,"InitIDGenerator"),Ri),ts,OS=p(function(e){return ts=ts||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ts.innerHTML=e,unescape(ts.textContent)},"entityDecode");function Bl(e){return"str"in e}p(Bl,"isDetailedError");var DS=p((e,t,r,i)=>{if(!i)return;const o=e.node()?.getBBox();o&&e.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Vs=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Ll(e,t){return sC({},e,t)}p(Ll,"cleanAndMerge");var be={assignWithDepth:ne,wrapLabel:ES,calculateTextHeight:Gf,calculateTextWidth:br,calculateTextDimensions:vl,cleanAndMerge:Ll,detectInit:TS,detectDirective:qf,isSubstringInArray:wS,interpolateToCurve:Sl,calcLabelPosition:Hf,calcCardinalityPosition:vS,calcTerminalLabelPosition:Yf,formatUrl:zf,getStylesFromArray:Uf,generateId:BS,random:LS,runFunc:_S,entityDecode:OS,insertTitle:DS,isLabelCoordinateInPath:Xf,parseFontSize:Vs,InitIDGenerator:$S},IS=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Rr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),bA=p((e,t,{counter:r=0,prefix:i,suffix:o},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${o?`_${o}`:""}`,"getEdgeId");function oe(e){return e??null}p(oe,"handleUndefinedAttr");function Xf(e,t){const r=Math.round(e.x),i=Math.round(e.y),o=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return o.includes(r.toString())||o.includes(i.toString())}p(Xf,"isLabelCoordinateInPath");var ds={exports:{}},Hc=ds.exports,Yc;function PS(){return Yc||(Yc=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(l){return setTimeout(l,16)};function o(){var l=this;l.reads=[],l.writes=[],l.raf=i.bind(t)}o.prototype={constructor:o,runTasks:function(l){for(var u;u=l.shift();)u()},measure:function(l,u){var d=u?l.bind(u):l;return this.reads.push(d),s(this),d},mutate:function(l,u){var d=u?l.bind(u):l;return this.writes.push(d),s(this),d},clear:function(l){return n(this.reads,l)||n(this.writes,l)},extend:function(l){if(typeof l!="object")throw new Error("expected object");var u=Object.create(this);return h(u,l),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function s(l){l.scheduled||(l.scheduled=!0,l.raf(a.bind(null,l)))}function a(l){var u=l.writes,d=l.reads,f;try{r("flushing reads",d.length),l.runTasks(d),r("flushing writes",u.length),l.runTasks(u)}catch(m){f=m}if(l.scheduled=!1,(d.length||u.length)&&s(l),f)if(r("task errored",f.message),l.catch)l.catch(f);else throw f}function n(l,u){var d=l.indexOf(u);return!!~d&&!!l.splice(d,1)}function h(l,u){for(var d in u)u.hasOwnProperty(d)&&(l[d]=u[d])}var c=t.fastdom=t.fastdom||new o;e.exports=c})(typeof window<"u"?window:typeof Hc<"u"?Hc:globalThis)})(ds)),ds.exports}var RS=PS();const NS=el(RS);var Ra={exports:{}},Uc;function qS(){return Uc||(Uc=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,o){return r(this,"mutate",i,o)},measure:function(i,o){return r(this,"measure",i,o)},clear:function(i){var o=this._tasks,s=o.get(i);this.fastdom.clear(s),o.delete(i)}};function r(i,o,s,a){var n=i._tasks,h=i.fastdom,c,l=new Promise(function(u,d){c=h[o](function(){n.delete(l);try{u(a?s.call(a):s())}catch(f){d(f)}},a)});return n.set(l,c),l}e.exports=t})()})(Ra)),Ra.exports}var zS=qS();const WS=el(zS);function Fl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ai=Fl();function Vf(e){ai=e}var vo={exec:()=>null};function Wt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(o,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(we.caret,"$1"),r=r.replace(o,a),i},getRegex:()=>new RegExp(r,t)};return i}var HS=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),we={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},YS=/^(?:[ \t]*(?:\n|$))+/,US=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jS=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,GS=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Al=/(?:[*+-]|\d{1,9}[.)])/,Zf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kf=Wt(Zf).replace(/bull/g,Al).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),XS=Wt(Zf).replace(/bull/g,Al).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),El=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,VS=/^[^\n]+/,Ml=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ZS=Wt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ml).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),KS=Wt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Al).getRegex(),Zs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$l=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,QS=Wt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",$l).replace("tag",Zs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qf=Wt(El).replace("hr",Wo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Zs).getRegex(),JS=Wt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qf).getRegex(),Ol={blockquote:JS,code:US,def:ZS,fences:jS,heading:GS,hr:Wo,html:QS,lheading:Kf,list:KS,newline:YS,paragraph:Qf,table:vo,text:VS},jc=Wt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Zs).getRegex(),tw={...Ol,lheading:XS,table:jc,paragraph:Wt(El).replace("hr",Wo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",jc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Zs).getRegex()},ew={...Ol,html:Wt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$l).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Wt(El).replace("hr",Wo).replace("heading",` *#{1,6} *[^
130
+ ]`).replace("lheading",Kf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Jf=/^( {2,}|\\)\n(?!\s*$)/,ow=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ks=/[\p{P}\p{S}]/u,Dl=/[\s\p{P}\p{S}]/u,tp=/[^\s\p{P}\p{S}]/u,sw=Wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Dl).getRegex(),ep=/(?!~)[\p{P}\p{S}]/u,aw=/(?!~)[\s\p{P}\p{S}]/u,nw=/(?:[^\s\p{P}\p{S}]|~)/u,lw=Wt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",HS?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,hw=Wt(rp,"u").replace(/punct/g,Ks).getRegex(),cw=Wt(rp,"u").replace(/punct/g,ep).getRegex(),ip="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",uw=Wt(ip,"gu").replace(/notPunctSpace/g,tp).replace(/punctSpace/g,Dl).replace(/punct/g,Ks).getRegex(),dw=Wt(ip,"gu").replace(/notPunctSpace/g,nw).replace(/punctSpace/g,aw).replace(/punct/g,ep).getRegex(),fw=Wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tp).replace(/punctSpace/g,Dl).replace(/punct/g,Ks).getRegex(),pw=Wt(/\\(punct)/,"gu").replace(/punct/g,Ks).getRegex(),gw=Wt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mw=Wt($l).replace("(?:-->|$)","-->").getRegex(),yw=Wt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),As=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Cw=Wt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",As).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),op=Wt(/^!?\[(label)\]\[(ref)\]/).replace("label",As).replace("ref",Ml).getRegex(),sp=Wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ml).getRegex(),xw=Wt("reflink|nolink(?!\\()","g").replace("reflink",op).replace("nolink",sp).getRegex(),Gc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Il={_backpedal:vo,anyPunctuation:pw,autolink:gw,blockSkip:lw,br:Jf,code:iw,del:vo,emStrongLDelim:hw,emStrongRDelimAst:uw,emStrongRDelimUnd:fw,escape:rw,link:Cw,nolink:sp,punctuation:sw,reflink:op,reflinkSearch:xw,tag:yw,text:ow,url:vo},bw={...Il,link:Wt(/^!?\[(label)\]\((.*?)\)/).replace("label",As).getRegex(),reflink:Wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",As).getRegex()},Dn={...Il,emStrongRDelimAst:dw,emStrongLDelim:cw,url:Wt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Gc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Wt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Gc).getRegex()},kw={...Dn,br:Wt(Jf).replace("{2,}","*").getRegex(),text:Wt(Dn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},es={normal:Ol,gfm:tw,pedantic:ew},ao={normal:Il,gfm:Dn,breaks:kw,pedantic:bw},Tw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xc=e=>Tw[e];function Je(e,t){if(t){if(we.escapeTest.test(e))return e.replace(we.escapeReplace,Xc)}else if(we.escapeTestNoEncode.test(e))return e.replace(we.escapeReplaceNoEncode,Xc);return e}function Vc(e){try{e=encodeURI(e).replace(we.percentDecode,"%")}catch{return null}return e}function Zc(e,t){let r=e.replace(we.findPipe,(s,a,n)=>{let h=!1,c=a;for(;--c>=0&&n[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(we.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(we.slashPipe,"|");return i}function no(e,t,r){let i=e.length;if(i===0)return"";let o=0;for(;o<i&&e.charAt(i-o-1)===t;)o++;return e.slice(0,i-o)}function Sw(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Kc(e,t,r,i,o){let s=t.href,a=t.title||null,n=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,h}function ww(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(`
131
+ `).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[n]=a;return n.length>=o.length?s.slice(o.length):s}).join(`
132
+ `)}var Es=class{options;rules;lexer;constructor(t){this.options=t||ai}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:no(i,`
133
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],o=ww(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let o=no(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:no(r[0],`
134
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=no(r[0],`
135
+ `).split(`
136
+ `),o="",s="",a=[];for(;i.length>0;){let n=!1,h=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))h.push(i[c]),n=!0;else if(!n)h.push(i[c]);else break;i=i.slice(c);let l=h.join(`
137
+ `),u=l.replace(this.rules.other.blockquoteSetextReplace,`
138
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
139
+ ${l}`:l,s=s?`${s}
140
+ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=d,i.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let m=f,y=m.raw+`
141
+ `+i.join(`
142
+ `),C=this.blockquote(y);a[a.length-1]=C,o=o.substring(0,o.length-m.raw.length)+C.raw,s=s.substring(0,s.length-m.text.length)+C.text;break}else if(f?.type==="list"){let m=f,y=m.raw+`
143
+ `+i.join(`
144
+ `),C=this.list(y);a[a.length-1]=C,o=o.substring(0,o.length-f.raw.length)+C.raw,s=s.substring(0,s.length-m.raw.length)+C.raw,i=y.substring(a.at(-1).raw.length).split(`
145
+ `);continue}}return{type:"blockquote",raw:o,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,l="",u="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let d=r[2].split(`
146
+ `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),f=t.split(`
147
+ `,1)[0],m=!d.trim(),y=0;if(this.options.pedantic?(y=2,u=d.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=d.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(f)&&(l+=f+`
148
+ `,t=t.substring(f.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),v=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let F=t.split(`
149
+ `,1)[0],E;if(f=F,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),E=f):E=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||v.test(f)||L.test(f)||k.test(f)||S.test(f))break;if(E.search(this.rules.other.nonSpaceChar)>=y||!f.trim())u+=`
150
+ `+E.slice(y);else{if(m||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(d)||v.test(d)||S.test(d))break;u+=`
151
+ `+f}!m&&!f.trim()&&(m=!0),l+=F+`
152
+ `,t=t.substring(F.length+1),d=E.slice(y)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(u),C&&(x=C[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:l,task:!!C,checked:x,loose:!1,text:u,tokens:[]}),s.raw+=l}let h=s.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let l=s.items[c].tokens.filter(d=>d.type==="space"),u=l.length>0&&l.some(d=>this.rules.other.anyLine.test(d.raw));s.loose=u}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:o,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Zc(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
153
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let n of o)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of s)a.rows.push(Zc(n,a.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
154
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=no(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=Sw(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),Kc(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return Kc(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...o[0]].length-1,a,n,h=s,c=0,l=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,r=r.slice(-1*t.length+s);(o=l.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(n=[...a].length,o[3]||o[4]){h+=n;continue}else if((o[5]||o[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(h-=n,h>0)continue;n=Math.min(n,n+h+c);let u=[...o[0]][0].length,d=t.slice(0,s+o.index+u+n);if(Math.min(s,n)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=r[1],o="mailto:"+i):(i=r[1],o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ye=class In{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ai,this.options.tokenizer=this.options.tokenizer||new Es,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:we,block:es.normal,inline:ao.normal};this.options.pedantic?(r.block=es.pedantic,r.inline=ao.pedantic):this.options.gfm&&(r.block=es.gfm,this.options.breaks?r.inline=ao.breaks:r.inline=ao.gfm),this.tokenizer.rules=r}static get rules(){return{block:es,inline:ao}}static lex(t,r){return new In(r).lex(t)}static lexInline(t,r){return new In(r).inlineTokens(t)}lex(t){t=t.replace(we.carriageReturn,`
155
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(we.tabCharGlobal," ").replace(we.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(a=>(o=a.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
156
+ `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
157
+ `)?"":`
158
+ `)+o.raw,a.text+=`
159
+ `+o.text,this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
160
+ `)?"":`
161
+ `)+o.raw,a.text+=`
162
+ `+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),h;this.options.extensions.startBlock.forEach(c=>{h=c.call({lexer:this},n),typeof h=="number"&&h>=0&&(a=Math.min(a,h))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
163
+ `)?"":`
164
+ `)+o.raw,a.text+=`
165
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),i=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
166
+ `)?"":`
167
+ `)+o.raw,a.text+=`
168
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,o=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=o[2]?o[2].length:0,i=i.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let h;if(this.options.extensions?.inline?.some(l=>(h=l.call({lexer:this},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let l=r.at(-1);h.type==="text"&&l?.type==="text"?(l.raw+=h.raw,l.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(t,i,n)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let c=t;if(this.options.extensions?.startInline){let l=1/0,u=t.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(c=t.substring(0,l+1))}if(h=this.tokenizer.inlineText(c)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(n=h.raw.slice(-1)),a=!0;let l=r.at(-1);l?.type==="text"?(l.raw+=h.raw,l.text+=h.text):r.push(h);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return r}},Ms=class{options;parser;constructor(t){this.options=t||ai}space(t){return""}code({text:t,lang:r,escaped:i}){let o=(r||"").match(we.notSpaceStart)?.[0],s=t.replace(we.endingNewline,"")+`
169
+ `;return o?'<pre><code class="language-'+Je(o)+'">'+(i?s:Je(s,!0))+`</code></pre>
170
+ `:"<pre><code>"+(i?s:Je(s,!0))+`</code></pre>
171
+ `}blockquote({tokens:t}){return`<blockquote>
172
+ ${this.parser.parse(t)}</blockquote>
173
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
174
+ `}hr(t){return`<hr>
175
+ `}list(t){let r=t.ordered,i=t.start,o="";for(let n=0;n<t.items.length;n++){let h=t.items[n];o+=this.listitem(h)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
176
+ `+o+"</"+s+`>
177
+ `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Je(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
178
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
179
+ `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let o="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
180
+ <thead>
181
+ `+r+`</thead>
182
+ `+o+`</table>
183
+ `}tablerow({text:t}){return`<tr>
184
+ ${t}</tr>
185
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
186
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Je(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let o=this.parser.parseInline(i),s=Vc(t);if(s===null)return o;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+Je(r)+'"'),a+=">"+o+"</a>",a}image({href:t,title:r,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));let s=Vc(t);if(s===null)return Je(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Je(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Je(t.text)}},Pl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ue=class Pn{options;renderer;textRenderer;constructor(t){this.options=t||ai,this.options.renderer=this.options.renderer||new Ms,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pl}static parse(t,r){return new Pn(r).parse(t)}static parseInline(t,r){return new Pn(r).parseInline(t)}parse(t,r=!0){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=s,h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=h||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,h=this.renderer.text(n);for(;o+1<t.length&&t[o+1].type==="text";)n=t[++o],h+=`
187
+ `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let a=s;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},mo=class{options;block;constructor(t){this.options=t||ai}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ye.lex:Ye.lexInline}provideParser(){return this.block?Ue.parse:Ue.parseInline}},_w=class{defaults=Fl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ue;Renderer=Ms;TextRenderer=Pl;Lexer=Ye;Tokenizer=Es;Hooks=mo;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of s.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let n=s[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...n){let h=s.renderer.apply(this,n);return h===!1&&(h=a.apply(this,n)),h}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),o.extensions=r),i.renderer){let s=this.defaults.renderer||new Ms(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,h=i.renderer[n],c=s[n];s[n]=(...l)=>{let u=h.apply(s,l);return u===!1&&(u=c.apply(s,l)),u||""}}o.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Es(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,h=i.tokenizer[n],c=s[n];s[n]=(...l)=>{let u=h.apply(s,l);return u===!1&&(u=c.apply(s,l)),u}}o.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new mo;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,h=i.hooks[n],c=s[n];mo.passThroughHooks.has(a)?s[n]=l=>{if(this.defaults.async&&mo.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await h.call(s,l);return c.call(s,d)})();let u=h.call(s,l);return c.call(s,u)}:s[n]=(...l)=>{if(this.defaults.async)return(async()=>{let d=await h.apply(s,l);return d===!1&&(d=await c.apply(s,l)),d})();let u=h.apply(s,l);return u===!1&&(u=c.apply(s,l)),u}}o.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;o.walkTokens=function(n){let h=[];return h.push(a.call(this,n)),s&&(h=h.concat(s.call(this,n))),h}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ye.lex(t,r??this.defaults)}parser(t,r){return Ue.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let o={...i},s={...this.defaults,...o},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&o.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,h=await(s.hooks?await s.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(n,s),c=s.hooks?await s.hooks.processAllTokens(h):h;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let l=await(s.hooks?await s.hooks.provideParser():t?Ue.parse:Ue.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(l):l})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let h=(s.hooks?s.hooks.provideParser():t?Ue.parse:Ue.parseInline)(n,s);return s.hooks&&(h=s.hooks.postprocess(h)),h}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
188
+ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Je(i.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(i);throw i}}},ei=new _w;function Ut(e,t){return ei.parse(e,t)}Ut.options=Ut.setOptions=function(e){return ei.setOptions(e),Ut.defaults=ei.defaults,Vf(Ut.defaults),Ut};Ut.getDefaults=Fl;Ut.defaults=ai;Ut.use=function(...e){return ei.use(...e),Ut.defaults=ei.defaults,Vf(Ut.defaults),Ut};Ut.walkTokens=function(e,t){return ei.walkTokens(e,t)};Ut.parseInline=ei.parseInline;Ut.Parser=Ue;Ut.parser=Ue.parse;Ut.Renderer=Ms;Ut.TextRenderer=Pl;Ut.Lexer=Ye;Ut.lexer=Ye.lex;Ut.Tokenizer=Es;Ut.Hooks=mo;Ut.parse=Ut;Ut.options;Ut.setOptions;Ut.use;Ut.walkTokens;Ut.parseInline;Ue.parse;Ye.lex;function ap(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(n,h){var c=h.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(l){var u,d;return(d=(u=l.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):n},[]);if(o.length){var s=new RegExp(`
189
+ [ ]{`.concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(n){return n.replace(s,`
190
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,h){var c=a.match(/(?:^|\n)( *)$/),l=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
191
+ `)&&(u=String(n).split(`
192
+ `).map(function(d,f){return f===0?d:"".concat(l).concat(d)}).join(`
193
+ `)),a+=u+i[h+1]}),a}var Rn=typeof performance<"u"&&typeof performance.now=="function",fi=p(()=>Rn?performance.now():0,"now"),Na="🧜 ",vw="Mermaid render",Bw="Mermaid",Lw={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Ni;Ni=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=fi();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(fi()-i)}}async tick(t,r){if(!this.enabled)return r();const i=fi();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(fi()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??t?.name;return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:fi(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Rn&&typeof performance.mark=="function")try{performance.mark(`${Na}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=fi();if(t.duration=r-t.start,Rn&&typeof performance.measure=="function")try{performance.measure(`${Na}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:vw,trackGroup:Bw,color:Lw[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,o=r&&r!==t.name?`${t.name} [${r}]`:t.name,s=["ms % phase"],a=p((h,c)=>{const l=" ".repeat(c),u=h.duration.toFixed(1).padStart(8),d=i>0?`${(h.duration/i*100).toFixed(0).padStart(3)}%`:" -";s.push(`${u} ${d} ${l}${h.name}`);for(const f of h.children)a(f,c+1);if(h.children.length>0){const f=h.children.reduce((y,C)=>y+C.duration,0),m=h.duration-f;if(m>.5){const y=m.toFixed(1).padStart(8);s.push(`${y} ${l} (self)`)}}},"walk");a(t,0);const n=Object.keys(this.buckets);if(n.length>0){s.push("—— buckets (summed) ——");for(const h of n)s.push(`${this.buckets[h].toFixed(1).padStart(8)} ${h}`)}console.log(`${Na}mermaid render profile · ${o}
194
+ ${s.join(`
195
+ `)}`)}},p(Ni,"Profiler");globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var Fw=NS.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(WS),ri=Fw;function np(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
196
+ `).replace(/\n{2,}/g,`
197
+ `);return ap(i)}p(np,"preprocessMarkdown");function lp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(lp,"nonMarkdownToLines");function hp(e,t={}){const r=np(e,t),i=Ut.lexer(r),o=[[]];let s=0;function a(n,h="normal"){n.type==="text"?n.text.split(`
198
+ `).forEach((l,u)=>{u!==0&&(s++,o.push([])),l.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&o[s].push({content:d,type:h})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&o[s].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(h=>{a(h)}):n.type==="html"?o[s].push({content:n.text,type:"normal"}):o[s].push({content:n.raw,type:"normal"})}),o}p(hp,"markdownToLines");function cp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(cp,"nonMarkdownToHTML");function up(e,{markdownAutoWrap:t}={}){const r=Ut.lexer(e);function i(o){return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${o.tokens?.map(i).join("")}</strong>`:o.type==="em"?`<em>${o.tokens?.map(i).join("")}</em>`:o.type==="paragraph"?`<p>${o.tokens?.map(i).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(z.warn(`Unsupported markdown: ${o.type}`),o.raw)}return p(i,"output"),r.map(i).join("")}p(up,"markdownToHTML");function dp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(dp,"splitTextToChars");function fp(e,t){const r=dp(t.content);return Rl(e,[],r,t.type)}p(fp,"splitWordToFitWidth");function Rl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[o,...s]=r,a=[...t,o];return e([{content:a.join(""),type:i}])?Rl(e,a,s,i):(t.length===0&&o&&(t.push(o),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Rl,"splitWordToFitWidthRecursion");function pp(e,t){if(e.some(({content:r})=>r.includes(`
199
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return $s(e,t)}p(pp,"splitLineToFitWidth");function $s(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let o="";e[0].content===" "&&(o=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(o!==""&&a.push({content:o,type:"normal"}),a.push(s),t(a))return $s(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,h]=fp(t,s);r.push([n]),h.content&&e.unshift(h)}return $s(e,t,r)}p($s,"splitLineToFitWidthRecursion");function Nn(e,t){t&&e.attr("style",t)}p(Nn,"applyStyle");var Qc=16384;async function gp(e,t,r,i,o=!1,s=Vt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,Qc)}px`),a.attr("height",`${Math.min(10*r,Qc)}px`);const n=a.append("xhtml:div"),h=Eo(t.label)?await Vd(t.label.replace(qo.lineBreakRegex,`
200
+ `),s):Ne(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",l=n.append("span");return l.html(h),Nn(l,t.labelStyle),l.attr("class",`${c} ${i}`),Nn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg"),(await ri.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),a.node()}p(gp,"addHtmlSpan");function Qs(e,t,r,i=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}p(Qs,"createTspan");function mp(e,t,r){const i=e.append("text"),o=Qs(i,1,t);Js(o,r);const s=o.node().getComputedTextLength();return i.remove(),s}p(mp,"computeWidthOfText");function Aw(e,t,r){const i=e.append("text"),o=Qs(i,1,t);Js(o,[{content:r,type:"normal"}]);const s=o.node()?.getBoundingClientRect();return s&&i.remove(),s}p(Aw,"computeDimensionOfText");function yp(e,t,r,i=!1,o=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),h=a.append("text").attr("y","-10.1");o&&h.attr("text-anchor","middle");let c=0;for(const l of r){const u=p(f=>mp(a,1.1,f)<=e,"checkWidth"),d=u(l)?[l]:pp(l,u);for(const f of d){const m=Qs(h,c,1.1,o);Js(m,f),c++}}if(i){const l=h.node().getBBox(),u=2;return n.attr("x",l.x-u).attr("y",l.y-u).attr("width",l.width+2*u).attr("height",l.height+2*u),a.node()}else return h.node()}p(yp,"createFormattedText");function qn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(qn,"decodeHTMLEntities");function Js(e,t){e.text(""),t.forEach((r,i)=>{const o=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?o.text(qn(r.content)):o.text(" "+qn(r.content))})}p(Js,"updateTextContentAndStyles");async function Cp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,s,a)=>(r.push((async()=>{const n=`${s}:${a}`;return await gS(n)?await zo(n,void 0,{class:"label-icon"}):`<i class='${Ne(o,t).replace(":"," ")}'></i>`})()),o));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Cp,"replaceIconSubstring");var Xe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:s=!0,markdown:a=!0,isNode:n=!0,width:h=200,addSvgBackground:c=!1}={},l)=>{if(z.debug("XYZ createText",t,r,i,o,s,n,"addSvgBackground: ",c),s){const u=a?up(t,l):cp(t),d=await Cp(Rr(u),l),f=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Eo(t)?f:d,labelStyle:r.replace("fill:","color:")};return await gp(e,m,h,o,c,l)}else{const u=Rr(t.replace(/<br\s*\/?>/g,"<br/>")),d=a?hp(u.replace("<br>","<br/>"),l):lp(u),f=yp(h,e,d,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Et(f).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Et(f).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Et(f).select("text").attr("style",y)}return i?Et(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Et(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText");function qa(e,t,r){if(e&&e.length){const[i,o]=t,s=Math.PI/180*r,a=Math.cos(s),n=Math.sin(s);for(const h of e){const[c,l]=h;h[0]=(c-i)*a-(l-o)*n+i,h[1]=(c-i)*n+(l-o)*a+o}}}function Ew(e,t){return e[0]===t[0]&&e[1]===t[1]}function Mw(e,t,r,i=1){const o=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(o)for(const c of a)qa(c,n,o);const h=(function(c,l,u){const d=[];for(const k of c){const S=[...k];Ew(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&d.push(S)}const f=[];l=Math.max(l,.1);const m=[];for(const k of d)for(let S=0;S<k.length-1;S++){const _=k[S],v=k[S+1];if(_[1]!==v[1]){const L=Math.min(_[1],v[1]);m.push({ymin:L,ymax:Math.max(_[1],v[1]),x:L===_[1]?_[0]:v[0],islope:(v[0]-_[0])/(v[1]-_[1])})}}if(m.sort(((k,S)=>k.ymin<S.ymin?-1:k.ymin>S.ymin?1:k.x<S.x?-1:k.x>S.x?1:k.ymax===S.ymax?0:(k.ymax-S.ymax)/Math.abs(k.ymax-S.ymax))),!m.length)return f;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let S=0;S<m.length&&!(m[S].ymin>C);S++)k=S;m.splice(0,k+1).forEach((S=>{y.push({s:C,edge:S})}))}if(y=y.filter((k=>!(k.edge.ymax<=C))),y.sort(((k,S)=>k.edge.x===S.edge.x?0:(k.edge.x-S.edge.x)/Math.abs(k.edge.x-S.edge.x))),(u!==1||x%l==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const S=k+1;if(S>=y.length)break;const _=y[k].edge,v=y[S].edge;f.push([[Math.round(_.x),C],[Math.round(v.x),C]])}C+=u,y.forEach((k=>{k.edge.x=k.edge.x+u*k.edge.islope})),x++}return f})(a,s,i);if(o){for(const c of a)qa(c,n,-o);(function(c,l,u){const d=[];c.forEach((f=>d.push(...f))),qa(d,l,u)})(h,n,-o)}return h}function Ho(e,t){var r;const i=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=o),Mw(e,o,i,s||1)}class Nl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ho(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const o of t)i.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],r));return i}}function ta(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class $w extends Nl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const o=Ho(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(s),h=.5*i*Math.sin(s);for(const[c,l]of o)ta([c,l])&&a.push([[c[0]-n,c[1]+h],[...l]],[[c[0]+n,c[1]-h],[...l]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class Ow extends Nl{fillPolygons(t,r){const i=this._fillPolygons(t,r),o=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,o);return i.ops=i.ops.concat(s.ops),i}}class Dw{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ho(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let o=r.hachureGap;o<0&&(o=4*r.strokeWidth),o=Math.max(o,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=o/4;for(const n of t){const h=ta(n),c=h/o,l=Math.ceil(c)-1,u=h-l*o,d=(n[0][0]+n[1][0])/2-o/4,f=Math.min(n[0][1],n[1][1]);for(let m=0;m<l;m++){const y=f+u+m*o,C=d-a+2*Math.random()*a,x=y-a+2*Math.random()*a,k=this.helper.ellipse(C,x,s,s,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class Iw{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ho(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,o=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const n=ta(a),h=Math.floor(n/(i+o)),c=(n+o-h*(i+o))/2;let l=a[0],u=a[1];l[0]>u[0]&&(l=a[1],u=a[0]);const d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f<h;f++){const m=f*(i+o),y=m+i,C=[l[0]+m*Math.cos(d)+c*Math.cos(d),l[1]+m*Math.sin(d)+c*Math.sin(d)],x=[l[0]+y*Math.cos(d)+c*Math.cos(d),l[1]+y*Math.sin(d)+c*Math.sin(d)];s.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),s}}class Pw{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,o=r.zigzagOffset<0?i:r.zigzagOffset,s=Ho(t,r=Object.assign({},r,{hachureGap:i+o}));return{type:"fillSketch",ops:this.zigzagLines(s,o,r)}}zigzagLines(t,r,i){const o=[];return t.forEach((s=>{const a=ta(s),n=Math.round(a/(2*r));let h=s[0],c=s[1];h[0]>c[0]&&(h=s[1],c=s[0]);const l=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let u=0;u<n;u++){const d=2*u*r,f=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[h[0]+d*Math.cos(l),h[1]+d*Math.sin(l)],C=[h[0]+f*Math.cos(l),h[1]+f*Math.sin(l)],x=[y[0]+m*Math.cos(l+Math.PI/4),y[1]+m*Math.sin(l+Math.PI/4)];o.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}})),o}}const Fe={};class Rw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Nw=0,za=1,Jc=2,rs={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Wa(e,t){return e.type===t}function ql(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Nw,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:za,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Jc,text:""},n})(e);let i="BOD",o=0,s=r[o];for(;!Wa(s,Jc);){let a=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return ql("M0,0"+e);o++,a=rs[s.text],i=s.text}else Wa(s,za)?a=rs[i]:(o++,a=rs[s.text],i=s.text);if(!(o+a<r.length))throw new Error("Path data ended short");for(let h=o;h<o+a;h++){const c=r[h];if(!Wa(c,za))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof rs[i]!="number")throw new Error("Bad segment: "+i);{const h={key:i,data:n};t.push(h),o+=a,s=r[o],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function xp(e){let t=0,r=0,i=0,o=0;const s=[];for(const{key:a,data:n}of e)switch(a){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,o]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,o=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const h=n.map(((c,l)=>l%2?c+r:c+t));s.push({key:"C",data:h}),t=h[4],r=h[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const h=n.map(((c,l)=>l%2?c+r:c+t));s.push({key:"Q",data:h}),t=h[2],r=h[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const h=n.map(((c,l)=>l%2?c+r:c+t));s.push({key:"S",data:h}),t=h[2],r=h[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=o}return s}function bp(e){const t=[];let r="",i=0,o=0,s=0,a=0,n=0,h=0;for(const{key:c,data:l}of e){switch(c){case"M":t.push({key:"M",data:[...l]}),[i,o]=l,[s,a]=l;break;case"C":t.push({key:"C",data:[...l]}),i=l[4],o=l[5],n=l[2],h=l[3];break;case"L":t.push({key:"L",data:[...l]}),[i,o]=l;break;case"H":i=l[0],t.push({key:"L",data:[i,o]});break;case"V":o=l[0],t.push({key:"L",data:[i,o]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-n),d=o+(o-h)):(u=i,d=o),t.push({key:"C",data:[u,d,...l]}),n=l[0],h=l[1],i=l[2],o=l[3];break}case"T":{const[u,d]=l;let f=0,m=0;r==="Q"||r==="T"?(f=i+(i-n),m=o+(o-h)):(f=i,m=o);const y=i+2*(f-i)/3,C=o+2*(m-o)/3,x=u+2*(f-u)/3,k=d+2*(m-d)/3;t.push({key:"C",data:[y,C,x,k,u,d]}),n=f,h=m,i=u,o=d;break}case"Q":{const[u,d,f,m]=l,y=i+2*(u-i)/3,C=o+2*(d-o)/3,x=f+2*(u-f)/3,k=m+2*(d-m)/3;t.push({key:"C",data:[y,C,x,k,f,m]}),n=u,h=d,i=f,o=m;break}case"A":{const u=Math.abs(l[0]),d=Math.abs(l[1]),f=l[2],m=l[3],y=l[4],C=l[5],x=l[6];u===0||d===0?(t.push({key:"C",data:[i,o,C,x,C,x]}),i=C,o=x):(i!==C||o!==x)&&(kp(i,o,C,x,u,d,f,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=C,o=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,o=a}r=c}return t}function lo(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function kp(e,t,r,i,o,s,a,n,h,c){const l=(u=a,Math.PI*u/180);var u;let d=[],f=0,m=0,y=0,C=0;if(c)[f,m,y,C]=c;else{[e,t]=lo(e,t,-l),[r,i]=lo(r,i,-l);const I=(e-r)/2,A=(t-i)/2;let P=I*I/(o*o)+A*A/(s*s);P>1&&(P=Math.sqrt(P),o*=P,s*=P);const B=o*o,q=s*s,R=B*q-B*A*A-q*I*I,st=B*A*A+q*I*I,tt=(n===h?-1:1)*Math.sqrt(Math.abs(R/st));y=tt*o*A/s+(e+r)/2,C=tt*-s*I/o+(t+i)/2,f=Math.asin(parseFloat(((t-C)/s).toFixed(9))),m=Math.asin(parseFloat(((i-C)/s).toFixed(9))),e<y&&(f=Math.PI-f),r<y&&(m=Math.PI-m),f<0&&(f=2*Math.PI+f),m<0&&(m=2*Math.PI+m),h&&f>m&&(f-=2*Math.PI),!h&&m>f&&(m-=2*Math.PI)}let x=m-f;if(Math.abs(x)>120*Math.PI/180){const I=m,A=r,P=i;m=h&&m>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=kp(r=y+o*Math.cos(m),i=C+s*Math.sin(m),A,P,o,s,a,0,h,[m,I,y,C])}x=m-f;const k=Math.cos(f),S=Math.sin(f),_=Math.cos(m),v=Math.sin(m),L=Math.tan(x/4),F=4/3*o*L,E=4/3*s*L,G=[e,t],W=[e+F*S,t-E*k],D=[r+F*v,i-E*_],J=[r,i];if(W[0]=2*G[0]-W[0],W[1]=2*G[1]-W[1],c)return[W,D,J].concat(d);{d=[W,D,J].concat(d);const I=[];for(let A=0;A<d.length;A+=3){const P=lo(d[A][0],d[A][1],l),B=lo(d[A+1][0],d[A+1][1],l),q=lo(d[A+2][0],d[A+2][1],l);I.push([P[0],P[1],B[0],B[1],q[0],q[1]])}return I}}const qw={randOffset:function(e,t){return Bt(e,t)},randOffsetWithRange:function(e,t,r){return Os(e,t,r)},ellipse:function(e,t,r,i,o){const s=Sp(r,i,o);return zn(e,t,o,s).opset},doubleLineOps:function(e,t,r,i,o){return Nr(e,t,r,i,o,!0)}};function Tp(e,t,r,i,o){return{type:"path",ops:Nr(e,t,r,i,o)}}function fs(e,t,r){const i=(e||[]).length;if(i>2){const o=[];for(let s=0;s<i-1;s++)o.push(...Nr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&o.push(...Nr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:o}}return i===2?Tp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function zw(e,t,r,i,o){return(function(s,a){return fs(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],o)}function tu(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=is(r[0],1*(1+.2*t.roughness),t),o=t.disableMultiStroke?[]:is(r[0],1.5*(1+.22*t.roughness),iu(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const n=is(a,1*(1+.2*t.roughness),t),h=t.disableMultiStroke?[]:is(a,1.5*(1+.22*t.roughness),iu(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of h)c.op!=="move"&&o.push(c)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function Sp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/o;let a=Math.abs(e/2),n=Math.abs(t/2);const h=1-r.curveFitting;return a+=Bt(a*h,r),n+=Bt(n*h,r),{increment:s,rx:a,ry:n}}function zn(e,t,r,i){const[o,s]=ou(i.increment,e,t,i.rx,i.ry,1,i.increment*Os(.1,Os(.4,1,r),r),r);let a=Ds(o,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=ou(i.increment,e,t,i.rx,i.ry,1.5,0,r),h=Ds(n,null,r);a=a.concat(h)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function eu(e,t,r,i,o,s,a,n,h){const c=e,l=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=Bt(.01*u,h),d+=Bt(.01*d,h);let f=o,m=s;for(;f<0;)f+=2*Math.PI,m+=2*Math.PI;m-f>2*Math.PI&&(f=0,m=2*Math.PI);const y=2*Math.PI/h.curveStepCount,C=Math.min(y/2,(m-f)/2),x=su(C,c,l,u,d,f,m,1,h);if(!h.disableMultiStroke){const k=su(C,c,l,u,d,f,m,1.5,h);x.push(...k)}return a&&(n?x.push(...Nr(c,l,c+u*Math.cos(f),l+d*Math.sin(f),h),...Nr(c,l,c+u*Math.cos(m),l+d*Math.sin(m),h)):x.push({op:"lineTo",data:[c,l]},{op:"lineTo",data:[c+u*Math.cos(f),l+d*Math.sin(f)]})),{type:"path",ops:x}}function ru(e,t){const r=bp(xp(ql(e))),i=[];let o=[0,0],s=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":s=[n[0],n[1]],o=[n[0],n[1]];break;case"L":i.push(...Nr(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[h,c,l,u,d,f]=n;i.push(...Ww(h,c,l,u,d,f,s,t)),s=[d,f];break}case"Z":i.push(...Nr(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]]}return{type:"path",ops:i}}function Ha(e,t){const r=[];for(const i of e)if(i.length){const o=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+Bt(o,t),i[0][1]+Bt(o,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+Bt(o,t),i[a][1]+Bt(o,t)]})}}return{type:"fillPath",ops:r}}function pi(e,t){return(function(r,i){let o=r.fillStyle||"hachure";if(!Fe[o])switch(o){case"zigzag":Fe[o]||(Fe[o]=new $w(i));break;case"cross-hatch":Fe[o]||(Fe[o]=new Ow(i));break;case"dots":Fe[o]||(Fe[o]=new Dw(i));break;case"dashed":Fe[o]||(Fe[o]=new Iw(i));break;case"zigzag-line":Fe[o]||(Fe[o]=new Pw(i));break;default:o="hachure",Fe[o]||(Fe[o]=new Nl(i))}return Fe[o]})(t,qw).fillPolygons(e,t)}function iu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function wp(e){return e.randomizer||(e.randomizer=new Rw(e.seed||0)),e.randomizer.next()}function Os(e,t,r,i=1){return r.roughness*i*(wp(r)*(t-e)+e)}function Bt(e,t,r=1){return Os(-e,e,t,r)}function Nr(e,t,r,i,o,s=!1){const a=s?o.disableMultiStrokeFill:o.disableMultiStroke,n=Wn(e,t,r,i,o,!0,!1);if(a)return n;const h=Wn(e,t,r,i,o,!0,!0);return n.concat(h)}function Wn(e,t,r,i,o,s,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),h=Math.sqrt(n);let c=1;c=h<200?1:h>500?.4:-.0016668*h+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>n&&(l=h/10);const u=l/2,d=.2+.2*wp(o);let f=o.bowing*o.maxRandomnessOffset*(i-t)/200,m=o.bowing*o.maxRandomnessOffset*(e-r)/200;f=Bt(f,o,c),m=Bt(m,o,c);const y=[],C=()=>Bt(u,o,c),x=()=>Bt(l,o,c),k=o.preserveVertices;return a?y.push({op:"move",data:[e+(k?0:C()),t+(k?0:C())]}):y.push({op:"move",data:[e+(k?0:Bt(l,o,c)),t+(k?0:Bt(l,o,c))]}),a?y.push({op:"bcurveTo",data:[f+e+(r-e)*d+C(),m+t+(i-t)*d+C(),f+e+2*(r-e)*d+C(),m+t+2*(i-t)*d+C(),r+(k?0:C()),i+(k?0:C())]}):y.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),m+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),m+t+2*(i-t)*d+x(),r+(k?0:x()),i+(k?0:x())]}),y}function is(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Bt(t,r),e[0][1]+Bt(t,r)]),i.push([e[0][0]+Bt(t,r),e[0][1]+Bt(t,r)]);for(let o=1;o<e.length;o++)i.push([e[o][0]+Bt(t,r),e[o][1]+Bt(t,r)]),o===e.length-1&&i.push([e[o][0]+Bt(t,r),e[o][1]+Bt(t,r)]);return Ds(i,null,r)}function Ds(e,t,r){const i=e.length,o=[];if(i>3){const s=[],a=1-r.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const h=e[n];s[0]=[h[0],h[1]],s[1]=[h[0]+(a*e[n+1][0]-a*e[n-1][0])/6,h[1]+(a*e[n+1][1]-a*e[n-1][1])/6],s[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],o.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&o.push(...Wn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return o}function ou(e,t,r,i,o,s,a,n){const h=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+o*Math.sin(-e)]);for(let l=0;l<=2*Math.PI;l+=e){const u=[t+i*Math.cos(l),r+o*Math.sin(l)];h.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+o*Math.sin(0)]),c.push([t+i*Math.cos(e),r+o*Math.sin(e)])}else{const l=Bt(.5,n)-Math.PI/2;c.push([Bt(s,n)+t+.9*i*Math.cos(l-e),Bt(s,n)+r+.9*o*Math.sin(l-e)]);const u=2*Math.PI+l-.01;for(let d=l;d<u;d+=e){const f=[Bt(s,n)+t+i*Math.cos(d),Bt(s,n)+r+o*Math.sin(d)];h.push(f),c.push(f)}c.push([Bt(s,n)+t+i*Math.cos(l+2*Math.PI+.5*a),Bt(s,n)+r+o*Math.sin(l+2*Math.PI+.5*a)]),c.push([Bt(s,n)+t+.98*i*Math.cos(l+a),Bt(s,n)+r+.98*o*Math.sin(l+a)]),c.push([Bt(s,n)+t+.9*i*Math.cos(l+.5*a),Bt(s,n)+r+.9*o*Math.sin(l+.5*a)])}return[c,h]}function su(e,t,r,i,o,s,a,n,h){const c=s+Bt(.1,h),l=[];l.push([Bt(n,h)+t+.9*i*Math.cos(c-e),Bt(n,h)+r+.9*o*Math.sin(c-e)]);for(let u=c;u<=a;u+=e)l.push([Bt(n,h)+t+i*Math.cos(u),Bt(n,h)+r+o*Math.sin(u)]);return l.push([t+i*Math.cos(a),r+o*Math.sin(a)]),l.push([t+i*Math.cos(a),r+o*Math.sin(a)]),Ds(l,null,h)}function Ww(e,t,r,i,o,s,a,n){const h=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let l=[0,0];const u=n.disableMultiStroke?1:2,d=n.preserveVertices;for(let f=0;f<u;f++)f===0?h.push({op:"move",data:[a[0],a[1]]}):h.push({op:"move",data:[a[0]+(d?0:Bt(c[0],n)),a[1]+(d?0:Bt(c[0],n))]}),l=d?[o,s]:[o+Bt(c[f],n),s+Bt(c[f],n)],h.push({op:"bcurveTo",data:[e+Bt(c[f],n),t+Bt(c[f],n),r+Bt(c[f],n),i+Bt(c[f],n),l[0],l[1]]});return h}function ho(e){return[...e]}function au(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(ho(e[0]),ho(e[1]),ho(e[2]),ho(e[2]));else{const o=[];o.push(e[0],e[0]);for(let n=1;n<e.length;n++)o.push(e[n]),n===e.length-1&&o.push(e[n]);const s=[],a=1-t;i.push(ho(o[0]));for(let n=1;n+2<o.length;n++){const h=o[n];s[0]=[h[0],h[1]],s[1]=[h[0]+(a*o[n+1][0]-a*o[n-1][0])/6,h[1]+(a*o[n+1][1]-a*o[n-1][1])/6],s[2]=[o[n+1][0]+(a*o[n][0]-a*o[n+2][0])/6,o[n+1][1]+(a*o[n][1]-a*o[n+2][1])/6],s[3]=[o[n+1][0],o[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function ps(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Hw(e,t,r){const i=ps(t,r);if(i===0)return ps(e,t);let o=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return o=Math.max(0,Math.min(1,o)),ps(e,Xr(t,r,o))}function Xr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Hn(e,t,r,i){const o=i||[];if((function(n,h){const c=n[h+0],l=n[h+1],u=n[h+2],d=n[h+3];let f=3*l[0]-2*c[0]-d[0];f*=f;let m=3*l[1]-2*c[1]-d[1];m*=m;let y=3*u[0]-2*d[0]-c[0];y*=y;let C=3*u[1]-2*d[1]-c[1];return C*=C,f<y&&(f=y),m<C&&(m=C),f+m})(e,t)<r){const n=e[t+0];o.length?(s=o[o.length-1],a=n,Math.sqrt(ps(s,a))>1&&o.push(n)):o.push(n),o.push(e[t+3])}else{const h=e[t+0],c=e[t+1],l=e[t+2],u=e[t+3],d=Xr(h,c,.5),f=Xr(c,l,.5),m=Xr(l,u,.5),y=Xr(d,f,.5),C=Xr(f,m,.5),x=Xr(y,C,.5);Hn([h,d,y,x],0,r,o),Hn([x,C,m,u],0,r,o)}var s,a;return o}function Yw(e,t){return Is(e,0,e.length,t)}function Is(e,t,r,i,o){const s=o||[],a=e[t],n=e[r-1];let h=0,c=1;for(let l=t+1;l<r-1;++l){const u=Hw(e[l],a,n);u>h&&(h=u,c=l)}return Math.sqrt(h)>i?(Is(e,t,c+1,i,s),Is(e,c,r,i,s)):(s.length||s.push(a),s.push(n)),s}function Ya(e,t=.15,r){const i=[],o=(e.length-1)/3;for(let s=0;s<o;s++)Hn(e,3*s,t,i);return r&&r>0?Is(i,0,i.length,r):i}const $e="none";class Ps{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,o,s){const a=this._o(s);return this._d("line",[Tp(t,r,i,o,a)],a)}rectangle(t,r,i,o,s){const a=this._o(s),n=[],h=zw(t,r,i,o,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+o],[t,r+o]];a.fillStyle==="solid"?n.push(Ha([c],a)):n.push(pi([c],a))}return a.stroke!==$e&&n.push(h),this._d("rectangle",n,a)}ellipse(t,r,i,o,s){const a=this._o(s),n=[],h=Sp(i,o,a),c=zn(t,r,a,h);if(a.fill)if(a.fillStyle==="solid"){const l=zn(t,r,a,h).opset;l.type="fillPath",n.push(l)}else n.push(pi([c.estimatedPoints],a));return a.stroke!==$e&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,o){const s=this.ellipse(t,r,i,i,o);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[fs(t,!1,i)],i)}arc(t,r,i,o,s,a,n=!1,h){const c=this._o(h),l=[],u=eu(t,r,i,o,s,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=eu(t,r,i,o,s,a,!0,!1,d);f.type="fillPath",l.push(f)}else l.push((function(d,f,m,y,C,x,k){const S=d,_=f;let v=Math.abs(m/2),L=Math.abs(y/2);v+=Bt(.01*v,k),L+=Bt(.01*L,k);let F=C,E=x;for(;F<0;)F+=2*Math.PI,E+=2*Math.PI;E-F>2*Math.PI&&(F=0,E=2*Math.PI);const G=(E-F)/k.curveStepCount,W=[];for(let D=F;D<=E;D+=G)W.push([S+v*Math.cos(D),_+L*Math.sin(D)]);return W.push([S+v*Math.cos(E),_+L*Math.sin(E)]),W.push([S,_]),pi([W],k)})(t,r,i,o,s,a,c));return c.stroke!==$e&&l.push(u),this._d("arc",l,c)}curve(t,r){const i=this._o(r),o=[],s=tu(t,i);if(i.fill&&i.fill!==$e)if(i.fillStyle==="solid"){const a=tu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const h=typeof n[0][0]=="number"?[n]:n;for(const c of h)c.length<3?a.push(...c):c.length===3?a.push(...Ya(au([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Ya(au(c),10,(1+i.roughness)/2))}a.length&&o.push(pi([a],i))}return i.stroke!==$e&&o.push(s),this._d("curve",o,i)}polygon(t,r){const i=this._o(r),o=[],s=fs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?o.push(Ha([t],i)):o.push(pi([t],i))),i.stroke!==$e&&o.push(s),this._d("polygon",o,i)}path(t,r){const i=this._o(r),o=[];if(!t)return this._d("path",o,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==$e,a=i.stroke!==$e,n=!!(i.simplification&&i.simplification<1),h=(function(l,u,d){const f=bp(xp(ql(l))),m=[];let y=[],C=[0,0],x=[];const k=()=>{x.length>=4&&y.push(...Ya(x,u)),x=[]},S=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:v,data:L}of f)switch(v){case"M":S(),C=[L[0],L[1]],y.push(C);break;case"L":k(),y.push([L[0],L[1]]);break;case"C":if(!x.length){const F=y.length?y[y.length-1]:C;x.push([F[0],F[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":k(),y.push([C[0],C[1]])}if(S(),!d)return m;const _=[];for(const v of m){const L=Yw(v,d);L.length&&_.push(L)}return _})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=ru(t,i);if(s)if(i.fillStyle==="solid")if(h.length===1){const l=ru(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else o.push(Ha(h,i));else o.push(pi(h,i));return a&&(n?h.forEach((l=>{o.push(fs(l,!1,i))})):o.push(c)),this._d("path",o,i)}opsToPath(t,r){let i="";for(const o of t.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,o=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:$e};break;case"fillPath":a={d:this.opsToPath(s),stroke:$e,strokeWidth:0,fill:i.fill||$e};break;case"fillSketch":a=this.fillSketch(s,i)}a&&o.push(a)}return o}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||$e,strokeWidth:i,fill:$e}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class Uw{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ps(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":o.save(),o.strokeStyle=i.stroke==="none"?"transparent":i.stroke,o.lineWidth=i.strokeWidth,i.strokeLineDash&&o.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(o.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(o,a,s),o.restore();break;case"fillPath":{o.save(),o.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,a,s,n),o.restore();break}case"fillSketch":this.fillSketch(o,a,i)}}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=o,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,o="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a),a}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a),a}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a),a}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,o,s,a,n=!1,h){const c=this.gen.arc(t,r,i,o,s,a,n,h);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const os="http://www.w3.org/2000/svg";class jw{constructor(t,r){this.svg=t,this.gen=new Ps(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,s=o.createElementNS(os,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let h=null;switch(n.type){case"path":h=o.createElementNS(os,"path"),h.setAttribute("d",this.opsToPath(n,a)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=o.createElementNS(os,"path"),h.setAttribute("d",this.opsToPath(n,a)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(o,n,i)}h&&s.appendChild(h)}return s}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const s=t.createElementNS(os,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",o+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a)}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a)}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a)}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,o,s,a,n=!1,h){const c=this.gen.arc(t,r,i,o,s,a,n,h);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var ut={canvas:(e,t)=>new Uw(e,t),svg:(e,t)=>new jw(e,t),generator:e=>new Ps(e),newSeed:()=>Ps.newSeed()},Gw=1,Xw=3;async function zl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!Wl(e);await Promise.all([...t].map(i=>new Promise(o=>{function s(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=It().fontSize?It().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[h=Pd.fontSize]=Vs(a),c=h*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";o(i)}p(s,"setupImage"),setTimeout(()=>{i.complete&&s()}),i.addEventListener("error",s),i.addEventListener("load",s)})))}p(zl,"configureLabelImages");function Wl(e){return e.nodeType===Xw?e.textContent?.trim()!=="":e.nodeType!==Gw||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Wl)}p(Wl,"hasTextBesidesImages");var nu=3,Vw=32,Zw=p(async(e,t,r)=>{const i=It(),o=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),s=o.insert("g").attr("class","label").attr("style",oe(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(x=>({text:x,cssClass:"c4-descr"}))].filter(x=>x.text),h=t.width?Math.max(t.width-2*(t.padding??0),Vw):It().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?h:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async x=>{const k=s.append("g").attr("class",x.cssClass),S=await Xe(k,Ne(Rr(x.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return Et(S).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Et(S).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:k,box:k.node().getBBox()}})),d=Math.max(...u.map(({box:x})=>x.width),0);let f=0;for(const{el:x,box:k}of u)x.attr("transform",`translate(${d/2-k.x-k.width/2}, ${f-k.y})`),f+=k.height+nu;const m=u.length>0?f-nu:0;s.insert("rect",":first-child"),s.attr("transform",`translate(${-d/2}, ${-m/2})`);const y=s.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:o,bbox:y,halfPadding:C,label:s}},"c4LabelHelper"),Ct=p(async(e,t,r)=>{if(t.stereotype!==void 0)return Zw(e,t,r);let i;const o=t.useHtmlLabels||nr(It()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",oe(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const h=!!t.icon||!!t.img,c=t.labelType==="markdown",l=await Xe(a,Ne(Rr(n),It()),{useHtmlLabels:o,width:t.width||t.wrappingWidth||It().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:h,markdown:c},It()),u=(t?.padding??0)/2;let d;if(o){const f=l.children[0],m=Et(l);await zl(f),d=await ri.measure(()=>f.getBoundingClientRect()),m.attr("width",d.width),m.attr("height",d.height)}else d=await ri.measure(()=>l.getBBox());return o?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:u,label:a}},"labelHelper"),Ua=p(async(e,t,r)=>{const i=r.useHtmlLabels??ke(It()),o=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Xe(o,Ne(Rr(t),It()),{useHtmlLabels:i,width:r.width||It()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(ke(It())){const h=s.children[0],c=Et(s);n=await ri.measure(()=>h.getBoundingClientRect()),c.attr("width",n.width),c.attr("height",n.height)}else n=await ri.measure(()=>s.getBBox());return i?o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):o.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:o}},"insertLabel"),ft=p((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),xt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Nt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Nt,"createPathFromPoints");function qr(e,t,r,i,o,s){const a=[],h=r-e,c=i-t,l=h/s,u=2*Math.PI/l,d=t+c/2;for(let f=0;f<=50;f++){const m=f/50,y=e+m*h,C=d+o*Math.sin(u*(y-e));a.push({x:y,y:C})}return a}p(qr,"generateFullSineWavePoints");function ir(e,t,r,i,o,s){const a=[],n=o*Math.PI/180,l=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(ir,"generateCirclePoints");function Yn(e){const t=Array.from(e.childNodes).filter(h=>h.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(h=>h.getAttribute("d")).filter(h=>h!==null).join(" ");r.setAttribute("d",i);const o=t.find(h=>h.getAttribute("fill")!=="none"),s=t.find(h=>h.getAttribute("stroke")!=="none"),a=p((h,c)=>h?.getAttribute(c)??void 0,"getAttr");if(o){const h={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(h).forEach(([c,l])=>{l&&r.setAttribute(c,l)})}if(s){const h={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(h).forEach(([c,l])=>{l&&r.setAttribute(c,l)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(Yn,"mergePaths");var Kw=p((e,t)=>{var r=e.x,i=e.y,o=t.x-r,s=t.y-i,a=e.width/2,n=e.height/2,h,c;return Math.abs(s)*a>Math.abs(o)*n?(s<0&&(n=-n),h=s===0?0:n*o/s,c=n):(o<0&&(a=-a),h=a,c=o===0?0:a*s/o),{x:r+h,y:i+c}},"intersectRect"),ni=Kw,We=p((e,t,r,i,o)=>["M",e+o,t,"H",e+r-o,"A",o,o,0,0,1,e+r,t+o,"V",t+i-o,"A",o,o,0,0,1,e+r-o,t+i,"H",e+o,"A",o,o,0,0,1,e,t+i-o,"V",t+o,"A",o,o,0,0,1,e+o,t,"Z"].join(" "),"createRoundedRectPathD"),Qw=p(async(e,t,r,i=!1,o=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=It(),n=ke(a);return await Xe(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Or=Qw;function _p(e,t){return e.intersect(t)}p(_p,"intersectNode");var Jw=_p;function vp(e,t,r,i){var o=e.x,s=e.y,a=o-i.x,n=s-i.y,h=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/h);i.x<o&&(c=-c);var l=Math.abs(t*r*n/h);return i.y<s&&(l=-l),{x:o+c,y:s+l}}p(vp,"intersectEllipse");var Bp=vp;function Lp(e,t,r){return Bp(e,t,t,r)}p(Lp,"intersectCircle");var t_=Lp;function Fp(e,t,r,i){{const o=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,n=o*r.x+s*r.y+a,h=o*i.x+s*i.y+a,c=1e-6;if(n!==0&&h!==0&&Un(n,h))return;const l=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=l*e.x+u*e.y+d,m=l*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(m)<c&&Un(f,m))return;const y=o*u-l*s;if(y===0)return;const C=Math.abs(y/2);let x=s*d-u*a;const k=x<0?(x-C)/y:(x+C)/y;x=l*a-o*d;const S=x<0?(x-C)/y:(x+C)/y;return{x:k,y:S}}}p(Fp,"intersectLine");function Un(e,t){return e*t>0}p(Un,"sameSign");var e_=Fp;function Ap(e,t,r){let i=e.x,o=e.y,s=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(l){a=Math.min(a,l.x),n=Math.min(n,l.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let h=i-e.width/2-a,c=o-e.height/2-n;for(let l=0;l<t.length;l++){let u=t[l],d=t[l<t.length-1?l+1:0],f=e_(e,r,{x:h+u.x,y:c+u.y},{x:h+d.x,y:c+d.y});f&&s.push(f)}return s.length?(s.length>1&&s.sort(function(l,u){let d=l.x-r.x,f=l.y-r.y,m=Math.sqrt(d*d+f*f),y=u.x-r.x,C=u.y-r.y,x=Math.sqrt(y*y+C*C);return m<x?-1:m===x?0:1}),s[0]):e}p(Ap,"intersectPolygon");var r_=Ap,lt={node:Jw,circle:t_,ellipse:Bp,polygon:r_,rect:ni};function Ep(e,t){const{labelStyles:r}=pt(t);t.labelStyle=r;const i=xt(t);let o=i;i||(o="anchor");const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,h=ut.svg(s),c=ct(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const l=h.circle(0,0,a*2,c),u=s.insert(()=>l,":first-child");return u.attr("class","anchor").attr("style",oe(n)),ft(t,u),t.intersect=function(d){return z.info("Circle intersect",t,a,d),lt.circle(t,a,d)},s}p(Ep,"anchor");function jn(e,t,r,i,o,s,a){const h=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/o,m=d/s,y=Math.sqrt(f**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-y**2),x=h+C*s*Math.sin(l)*(a?-1:1),k=c-C*o*Math.cos(l)*(a?-1:1),S=Math.atan2((t-k)/s,(e-x)/o);let v=Math.atan2((i-k)/s,(r-x)/o)-S;a&&v<0&&(v+=2*Math.PI),!a&&v>0&&(v-=2*Math.PI);const L=[];for(let F=0;F<20;F++){const E=F/19,G=S+E*v,W=x+o*Math.cos(G),D=k+s*Math.sin(G);L.push({x:W,y:D})}return L}p(jn,"generateArcPoints");function Mp(e,t,r){const[i,o]=[t,r].sort((s,a)=>a-s);return o*(1-Math.sqrt(1-(e/i/2)**2))}p(Mp,"calculateArcSagitta");async function $p(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=p(G=>G+a,"calcTotalHeight"),h=p(G=>{const W=G/2;return[W/(2.5+G/50),W]},"calcEllipseRadius"),{shapeSvg:c,bbox:l}=await Ct(e,t,xt(t)),u=n(t?.height?t?.height:l.height),[d,f]=h(u),m=Mp(u,d,f),C=(t?.width?t?.width:l.width)+s*2+m-m,x=u,{cssStyles:k}=t,S=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...jn(-C/2,-x/2,-C/2,x/2,d,f,!1),{x:C/2,y:x/2},...jn(C/2,x/2,C/2,-x/2,d,f,!0)],_=ut.svg(c),v=ct(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=Nt(S),F=_.path(L,v),E=c.insert(()=>F,":first-child");return E.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${d/2}, 0)`),ft(t,E),t.intersect=function(G){return lt.polygon(t,S,G)},c}p($p,"bowTieRect");async function Op(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await Ct(e,t,xt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=Math.max(a.width+c*2,t.width??0,80),u=Math.max(Math.min(l*.08,12),5),d=Math.max(a.height+c*2+u,t.height??0),f=-d/2+u,m=d/2,y=l*.72,C=[`M${-l/2},${f}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${l/2},${f}`,`A${l/2},${u} 0 0 0 ${-l/2},${f}`,"Z"].join(" "),{cssStyles:x}=t,k=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const E=ut.svg(s).path(C,ct(t,{}));k.node()?.appendChild(E),x&&k.attr("style",x)}else k.append("path").attr("d",C).attr("style",o);k.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",l/2).attr("ry",u).attr("style",`fill:none;stroke:${h};stroke-width:1px`),ft(t,k);const S=f+(m-f)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`);const _=12,v=p((F,E,G)=>Array.from({length:_+1},(W,D)=>{const J=Math.PI-D*Math.PI/_;return{x:F*Math.cos(J),y:E+G*u*Math.sin(J)}}),"arc"),L=[...v(l/2,f,-1),...v(y/2,m,1).reverse()];return t.intersect=function(F){return lt.polygon(t,L,F)},s}p(Op,"bucket");var lu=20,hu=8,i_=80,ja=8;async function Dp(e,t){const{themeVariables:r}=It(),i=r.clusterBkg,o=r.clusterBorder,{nodeStyles:s}=pt(t),{shapeSvg:a,bbox:n}=await Ct(e,t,xt(t)),h=t.padding??8,c=n.height,l=Math.max(n.width+h*2,i_,t?.width??0),u=Math.max(c+hu+lu+h*2,t?.height??0),d=-l/2,f=-u/2,m=-28/2,y=a.select(".label");y&&(t.useHtmlLabels??ke(It())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let C;if(t.look==="handDrawn"){const v=ut.svg(a),L=ct(t,{fill:i,stroke:o,fillStyle:"solid"}),F=v.path(We(d,f,l,u,ja),L);C=a.insert(()=>F,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",oe(t.cssStyles))}else C=a.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",s).attr("rx",ja).attr("ry",ja).attr("x",d).attr("y",f).attr("width",l).attr("height",u).attr("fill",i).attr("stroke",o);const x=f+h+c+hu;a.append("line").attr("class","collapsed-separator").attr("x1",d+8).attr("y1",x).attr("x2",d+l-8).attr("y2",x).attr("stroke",o).attr("stroke-dasharray","3, 3");const k=x+lu/2,S=2.5,_=10;for(let v=-1;v<=1;v++)a.append("circle").attr("class","collapsed-indicator").attr("cx",v*_).attr("cy",k).attr("r",S).attr("fill",o);return ft(t,C),t.calcIntersect=function(v,L){return lt.rect(v,L)},t.intersect=function(v){return lt.rect(t,v)},a}p(Dp,"collapsedGroup");function lr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(lr,"insertPolygonShape");var o_=["right","left","up","down"],Hl="point",s_=p(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),a_=p(e=>o_.filter(t=>e.has(t)).join("|")||Hl,"getDirectionKey"),cu={"right|left|up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":p(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[Hl]:()=>[{x:0,y:0}]},n_=p((e,t,r,i)=>{const o=s_(e),s=(r.padding??0)/2,a=t.height+4*s,n=a/2,h=i??t.width+2*n+2*s,c=a_(o);return(cu[c]??cu[Hl])({height:a,midpoint:n,padding:s,width:h})},"getArrowPoints");async function Ip(e,t){const r=t,{shapeSvg:i,bbox:o}=await Ct(e,r,xt(r)),s=r.padding??0,a=o.height+2*s,n=a/2,h=o.width+2*n+s,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>h?c:h,d=n_(r.directions??[],o,r,u),f=lr(i,u,a,d);return f.attr("style",r.style??null),ft(r,f),r.intersect=function(m){return lt.polygon(r,d,m)},i}p(Ip,"block_arrow");async function Pp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await Ct(e,t,xt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=18,u=12,d=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+l,t.height??0),m=-f/2,{cssStyles:y}=t,C=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=ut.svg(s).path(We(-d/2,m,d,f,u),ct(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-d/2).attr("y",m).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",o);C.append("line").attr("x1",-d/2).attr("y1",m+l).attr("x2",d/2).attr("y2",m+l).attr("style",`stroke:${h};stroke-width:1px`);for(let k=0;k<3;k++)C.append("circle").attr("cx",-d/2+12+k*9).attr("cy",m+l/2).attr("r",2.5).attr("style",`fill:${h};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",m+4).attr("width",Math.max(d-56,10)).attr("height",l-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),ft(t,C);const x=m+l+(f-l)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return lt.rect(t,k)},s}p(Pp,"browser");var ss=12;async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?28:o,a=t.look==="neo"?24:o,{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=(t?.width??h.width)+(t.look==="neo"?s*2:s+ss),l=(t?.height??h.height)+(t.look==="neo"?a*2:a),u=0,d=c,f=-l,m=0,y=[{x:u+ss,y:f},{x:d,y:f},{x:d,y:m},{x:u,y:m},{x:u,y:f+ss},{x:u+ss,y:f}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=ut.svg(n),S=ct(t,{}),_=Nt(y),v=k.path(_,S);C=n.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${l/2})`),x&&C.attr("style",x)}else C=lr(n,c,l,y);return i&&C.attr("style",i),ft(t,C),t.intersect=function(k){return lt.polygon(t,y,k)},n}p(Rp,"card");function Np(e,t){const{nodeStyles:r}=pt(t);t.label="";const i=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=ut.svg(i),h=ct(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=Nt(a),l=n.path(c,h),u=i.insert(()=>l,":first-child");return o&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",o),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return lt.polygon(t,a,d)},i}p(Np,"choice");async function Yl(e,t,r){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:n}=await Ct(e,t,xt(t)),h=16,c=r?.padding??n,l=t.look==="neo"?a.width/2+h*2:a.width/2+c;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=ut.svg(s),m=ct(t,{}),y=f.circle(0,0,l*2,m);u=s.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",oe(d))}else u=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",l).attr("cx",0).attr("cy",0);return ft(t,u),t.calcIntersect=function(f,m){const y=f.width/2;return lt.circle(f,y,m)},t.intersect=function(f){return z.info("Circle intersect",t,l,f),lt.circle(t,l,f)},s}p(Yl,"circle");async function qp(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:s,halfPadding:a}=await Ct(e,r,i),n=o.insert("rect",":first-child"),h=r.padding??0,c=r.positioned?r.width??0:s.width+h,l=r.positioned?r.height??0:s.height+h,u=r.positioned?-c/2:-s.width/2-a,d=r.positioned?-l/2:-s.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",d).attr("width",c).attr("height",l),ft(r,n),r.intersect=function(f){return lt.rect(r,f)},o}p(qp,"composite");async function zp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await Ct(e,t,xt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=20,u=12,d=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+l,t.height??0),m=-f/2,{cssStyles:y}=t,C=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=ut.svg(s).path(We(-d/2,m,d,f,u),ct(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-d/2).attr("y",m).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",o);C.append("text").attr("x",-d/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),ft(t,C);const x=m+l+(f-l)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return lt.rect(t,k)},s}p(zp,"consoleWindow");function Wp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,o={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
201
+ M ${o.x},${o.y} L ${a.x},${a.y}`}p(Wp,"createLine");function Hp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r,t.label="";const o=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:a}=t,n=ut.svg(o),h=ct(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=n.circle(0,0,s*2,h),l=Wp(s),u=n.path(l,h),d=o.insert(()=>c,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),ft(t,d),t.intersect=function(f){return z.info("crossedCircle intersect",t,{radius:s,point:f}),lt.circle(t,s,f)},o}p(Hp,"crossedCircle");function gr(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,l=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(gr,"generateCirclePoints");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=s.width+n,l=s.height+h,u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...gr(c/2,-l/2,u,30,-90,0),{x:-c/2-u,y:u},...gr(c/2+u*2,-u,u,20,-180,-270),...gr(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-l/2},...gr(c/2,l/2,u,20,0,90)],m=[{x:c/2,y:-l/2-u},{x:-c/2,y:-l/2-u},...gr(c/2,-l/2,u,20,-90,0),{x:-c/2-u,y:-u},...gr(c/2+c*.1,-u,u,20,-180,-270),...gr(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:l/2},...gr(c/2,l/2,u,20,0,90),{x:-c/2,y:l/2+u},{x:c/2,y:l/2+u}],y=ut.svg(o),C=ct(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Nt(f).replace("Z",""),S=y.path(k,C),_=Nt(m),v=y.path(_,{...C}),L=o.insert("g",":first-child");return L.insert(()=>v,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${u}, 0)`),a.attr("transform",`translate(${-c/2+u-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ft(t,L),t.intersect=function(F){return lt.polygon(t,m,F)},o}p(Yp,"curlyBraceLeft");function mr(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,l=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:f,y:m})}return a}p(mr,"generateCirclePoints");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),l=s.height+(t.look==="neo"?h*2:h),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...mr(c/2,-l/2,u,20,-90,0),{x:c/2+u,y:-u},...mr(c/2+u*2,-u,u,20,-180,-270),...mr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:l/2},...mr(c/2,l/2,u,20,0,90)],m=[{x:-c/2,y:-l/2-u},{x:c/2,y:-l/2-u},...mr(c/2,-l/2,u,20,-90,0),{x:c/2+u,y:-u},...mr(c/2+u*2,-u,u,20,-180,-270),...mr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:l/2},...mr(c/2,l/2,u,20,0,90),{x:c/2,y:l/2+u},{x:-c/2,y:l/2+u}],y=ut.svg(o),C=ct(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Nt(f).replace("Z",""),S=y.path(k,C),_=Nt(m),v=y.path(_,{...C}),L=o.insert("g",":first-child");return L.insert(()=>v,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-u}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ft(t,L),t.intersect=function(F){return lt.polygon(t,m,F)},o}p(Up,"curlyBraceRight");function fe(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,l=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(fe,"generateCirclePoints");async function jp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),l=s.height+(t.look==="neo"?h*2:h),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...fe(c/2,-l/2,u,30,-90,0),{x:-c/2-u,y:u},...fe(c/2+u*2,-u,u,20,-180,-270),...fe(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-l/2},...fe(c/2,l/2,u,20,0,90)],m=[...fe(-c/2+u+u/2,-l/2,u,20,-90,-180),{x:c/2-u/2,y:u},...fe(-c/2-u/2,-u,u,20,0,90),...fe(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...fe(-c/2+u+u/2,l/2,u,30,-180,-270)],y=[{x:c/2,y:-l/2-u},{x:-c/2,y:-l/2-u},...fe(c/2,-l/2,u,20,-90,0),{x:-c/2-u,y:-u},...fe(c/2+u*2,-u,u,20,-180,-270),...fe(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:l/2},...fe(c/2,l/2,u,20,0,90),{x:-c/2,y:l/2+u},{x:c/2-u-u/2,y:l/2+u},...fe(-c/2+u+u/2,-l/2,u,20,-90,-180),{x:c/2-u/2,y:u},...fe(-c/2-u/2,-u,u,20,0,90),...fe(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...fe(-c/2+u+u/2,l/2,u,30,-180,-270)],C=ut.svg(o),x=ct(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=Nt(f).replace("Z",""),_=C.path(S,x),L=Nt(m).replace("Z",""),F=C.path(L,x),E=Nt(y),G=C.path(E,{...x}),W=o.insert("g",":first-child");return W.insert(()=>G,":first-child").attr("stroke-opacity",0),W.insert(()=>_,":first-child"),W.insert(()=>F,":first-child"),W.attr("class","text"),d&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(${u-u/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ft(t,W),t.intersect=function(D){return lt.polygon(t,y,D)},o}p(jp,"curlyBraces");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=20,h=5,{shapeSvg:c,bbox:l}=await Ct(e,t,xt(t)),u=Math.max(n,(l.width+s*2)*1.25,t?.width??0),d=Math.max(h,l.height+a*2,t?.height??0),f=d/2,{cssStyles:m}=t,y=ut.svg(c),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=u,k=d,S=x-f,_=k/4,v=[{x:S,y:0},{x:_,y:0},{x:0,y:k/2},{x:_,y:k},{x:S,y:k},...ir(-S,-k/2,f,50,270,90)],L=Nt(v),F=y.path(L,C),E=c.insert(()=>F,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",i),E.attr("transform",`translate(${-u/2}, ${-d/2})`),ft(t,E),t.intersect=function(G){return lt.polygon(t,v,G)},c}p(Gp,"curvedTrapezoid");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.padding??20,h=Math.max(s.width+n*2,t.width??0,100),c=Math.min(Math.max(h*.23,16),56),l=c*.27,u=Math.max(s.height+n*2,t.height?t.height-(2*c-l):0),d=Math.min(h*.177,u*.45),f=u+2*c-l,m=-f/2,y=m+2*c-l,C=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const E=ut.svg(o),G=ct(t,{}),W=E.path(We(-h/2,y,h,u,d),G),D=E.circle(0,m+c,c*2,G);C.insert(()=>D,":first-child"),C.insert(()=>W,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-h/2).attr("y",y).attr("width",h).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);ft(t,C);const k=y+u/2;a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${k-s.height/2-(s.y-(s.top??0))})`);const S=m+c,_=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,F=[...ir(0,-S,c,24,180+_,-_),...ir(-(-h/2+d),-(y+d),d,12,90,0),...ir(-(-h/2+d),-(f/2-d),d,12,360,270),...ir(-(h/2-d),-(f/2-d),d,12,270,180),...ir(-(h/2-d),-(y+d),d,12,180,90)];return t.intersect=function(E){return lt.polygon(t,F,E)},o}p(Xp,"person");var l_=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),h_=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),c_=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),uu=8,du=8;async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?24:o,a=t.look==="neo"?24:o,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<du&&(t.width=du)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-s-k*3,t.height<uu&&(t.height=uu)}const{shapeSvg:h,bbox:c,label:l}=await Ct(e,t,xt(t)),u=Math.max(t.width??0,c.width)+a,d=u/2,f=d/(2.5+u/50),m=Math.max(t.height??0,c.height)+s+f;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=ut.svg(h),k=h_(0,0,u,m,d,f),S=c_(0,f,u,m,d,f),_=ct(t,{}),v=x.path(k,_),L=x.path(S,ct(t,{fill:"none"}));y=h.insert(()=>L,":first-child"),y=h.insert(()=>v,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=l_(0,0,u,m,d,f);y=h.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",oe(C)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-u/2}, ${-(m/2+f)})`),ft(t,y),l.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const k=lt.rect(t,x),S=k.x-(t.x??0);if(d!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-f)){let _=f*f*(1-S*S/(d*d));_>0&&(_=Math.sqrt(_)),_=f-_,x.y-(t.y??0)>0&&(_=-_),k.y+=_}return k},h}p(Vp,"cylinder");async function Xi(e,t,r){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await Ct(e,t,xt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),h=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,l=-h/2;let u,{rx:d,ry:f}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const y=ut.svg(s),C=ct(t,{}),x=d||f?y.path(We(c,l,n,h,d||0),C):y.rectangle(c,l,n,h,C);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",oe(m))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",o).attr("rx",oe(d)).attr("ry",oe(f)).attr("x",c).attr("y",l).attr("width",n).attr("height",h);return ft(t,u,t.look==="handDrawn"?void 0:{width:n,height:h}),t.calcIntersect=function(y,C){return lt.rect(y,C)},t.intersect=function(y){return lt.rect(t,y)},s}p(Xi,"drawRect");async function Zp(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:s,width:a,height:n}=t,h={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:o??s??0},c=await Xi(e,t,h);if(t.look==="handDrawn"){const f=ut.svg(c),m=ct(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>f.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),c.insert(()=>f.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),y.remove(),c}const l=c.select(".basic.label-container"),u=(Number(l.attr("width"))||a)??0,d=(Number(l.attr("height"))||n)??0;return u>0&&d>0&&l.attr("stroke-dasharray",`${u} ${d}`),c}p(Zp,"datastore");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:h}=await Ct(e,t,xt(t)),c=n.width+o,l=n.height+s,u=l*.2,d=-c/2,f=-l/2-u/2,{cssStyles:m}=t,y=ut.svg(a),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:d,y:f+u},{x:-d,y:f+u},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+u}],k=y.polygon(x.map(_=>[_.x,_.y]),C),S=a.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),h.attr("transform",`translate(${d+(t.padding??0)/2-(n.x-(n.left??0))}, ${f+u+(t.padding??0)/2-(n.y-(n.top??0))})`),ft(t,S),t.intersect=function(_){return lt.rect(t,_)},a}p(Kp,"dividedRectangle");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t),o=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=(t?.width?t?.width/2:h.width/2)+(a??0),l=c-o;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=ut.svg(n),m=ct(t,{roughness:.2,strokeWidth:2.5}),y=ct(t,{roughness:.2,strokeWidth:1.5}),C=f.circle(0,0,c*2,m),x=f.circle(0,0,l*2,y);u=n.insert("g",":first-child"),u.attr("class",oe(t.cssClasses)).attr("style",oe(d)),u.node()?.appendChild(C),u.node()?.appendChild(x)}else{u=n.insert("g",":first-child");const f=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return ft(t,u),t.intersect=function(f){return z.info("DoubleCircle intersect",t,c,f),lt.circle(t,c,f)},n}p(Qp,"doublecircle");function Jp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,h=ut.svg(s),{nodeBorder:c}=r,l=ct(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const u=h.circle(0,0,a*2,l),d=s.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),ft(t,d),t.intersect=function(f){return z.info("filledCircle intersect",t,{radius:a,point:f}),lt.circle(t,a,f)},s}p(Jp,"filledCircle");var fu=10,pu=10;async function tg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.height=t?.height??0,t.height<fu&&(t.height=fu),t.width=(t?.width??0)-s-s/2,t.width<pu&&(t.width=pu));const{shapeSvg:a,bbox:n,label:h}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:n.width)+(s??0),l=t?.height?t?.height:c+n.height,u=l,d=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=t,m=ut.svg(a),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Nt(d),x=m.path(C,y),k=a.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=l,ft(t,k),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return z.info("Triangle intersect",t,d,S),lt.polygon(t,d,S)},a}p(tg,"flippedTriangle");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.padding??12,h=Math.max(s.width+n*2,t.width??0,90),c=s.height+n*2,l=Math.max(Math.min(c*.16,14),8),u=Math.max(c+l,t.height??0),d=u-l,f=Math.max(h*.38,28),m=-u/2,y=[{x:-h/2,y:m},{x:-h/2+f,y:m},{x:-h/2+f,y:m+l},{x:h/2,y:m+l},{x:h/2,y:u/2},{x:-h/2,y:u/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(_=>`L${_.x},${_.y}`),"Z"].join(" "),{cssStyles:x}=t;let k;if(t.look==="handDrawn"){const v=ut.svg(o).path(C,ct(t,{}));k=o.insert(()=>v,":first-child").attr("class","basic label-container"),x&&k.attr("style",x)}else k=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?ft(t,k):ft(t,k,{width:h,height:u});const S=m+l+d/2;return a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`),t.intersect=function(_){return lt.polygon(t,y,_)},o}p(eg,"folder");function rg(e,t,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:s}=pt(t);t.label="";const a=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let h=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(h=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const l=-1*h/2,u=-1*c/2,d=ut.svg(a),f=ct(t,{stroke:o.lineColor,fill:o.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=d.rectangle(l,u,h,c,f),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),ft(t,y);const C=i?.padding??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return lt.rect(t,x)},a}p(rg,"forkJoin");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=15,s=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<s&&(t.height=s),t.width=(t?.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:c}=await Ct(e,t,xt(t)),l=(t?.width?t?.width:Math.max(o,c.width))+a*2,u=(t?.height?t?.height:Math.max(s,c.height))+n*2,d=u/2,{cssStyles:f}=t,m=ut.svg(h),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...ir(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],x=Nt(C),k=m.path(x,y),S=h.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),ft(t,S),t.intersect=function(_){return z.info("Pill intersect",t,{radius:d,point:_}),lt.polygon(t,C,_)},h}p(ig,"halfRoundedRectangle");var u_=p((e,t,r,i,o)=>[`M${e+o},${t}`,`L${e+r-o},${t}`,`L${e+r},${t-i/2}`,`L${e+r-o},${t-i}`,`L${e+o},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function og(e,t){const{labelStyles:r,nodeStyles:i}=pt(t),o=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,n=32,h=t.look==="neo"?a:s,c=t.look==="neo"?n:s;if(t.width||t.height){const S=(t.height??0)/o;t.width=(t?.width??0)-2*S-c,t.height=(t.height??0)-h}const{shapeSvg:l,bbox:u}=await Ct(e,t,xt(t)),d=(t?.height?t?.height:u.height)+h,f=d/o,m=(t?.width?t?.width:u.width)+2*f+c,y=[{x:f,y:0},{x:m-f,y:0},{x:m,y:-d/2},{x:m-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=ut.svg(l),S=ct(t,{}),_=u_(0,0,m,d,f),v=k.path(_,S);C=l.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),x&&C.attr("style",x)}else C=lr(l,m,d,y);return i&&C.attr("style",i),t.width=m,t.height=d,ft(t,C),t.intersect=function(k){return lt.polygon(t,y,k)},l}p(og,"hexagon");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.label="",t.labelStyle=r;const{shapeSvg:o}=await Ct(e,t,xt(t)),s=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,h=ut.svg(o),c=ct(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],u=Nt(l),d=h.path(u,c),f=o.insert(()=>d,":first-child");return f.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-s/2}, ${-a/2})`),ft(t,f),t.intersect=function(m){return z.info("Pill intersect",t,{points:l}),lt.polygon(t,l,m)},o}p(sg,"hourglass");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=pt(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),h=i?.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:c,bbox:l,label:u}=await Ct(e,t,"icon-shape default"),d=t.pos==="t",f=n,m=n,{nodeBorder:y}=r,{stylesMap:C}=Gi(t),x=-m/2,k=-f/2,S=t.label?8:0,_=ut.svg(c),v=ct(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=_.rectangle(x,k,m,f,v),F=Math.max(m,l.width),E=f+l.height+S,G=_.rectangle(-F/2,-E/2,F,E,{...v,fill:"transparent",stroke:"none"}),W=c.insert(()=>L,":first-child"),D=c.insert(()=>G);if(t.icon){const J=c.append("g");J.html(`<g>${await zo(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const I=J.node().getBBox(),A=I.width,P=I.height,B=I.x,q=I.y;J.attr("transform",`translate(${-A/2-B},${d?l.height/2+S/2-P/2-q:-l.height/2-S/2-P/2-q})`),J.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${d?-E/2:E/2-l.height})`),W.attr("transform",`translate(0,${d?l.height/2+S/2:-l.height/2-S/2})`),ft(t,D),t.intersect=function(J){if(z.info("iconSquare intersect",t,J),!t.label)return lt.rect(t,J);const I=t.x??0,A=t.y??0,P=t.height??0;let B=[];return d?B=[{x:I-l.width/2,y:A-P/2},{x:I+l.width/2,y:A-P/2},{x:I+l.width/2,y:A-P/2+l.height+S},{x:I+m/2,y:A-P/2+l.height+S},{x:I+m/2,y:A+P/2},{x:I-m/2,y:A+P/2},{x:I-m/2,y:A-P/2+l.height+S},{x:I-l.width/2,y:A-P/2+l.height+S}]:B=[{x:I-m/2,y:A-P/2},{x:I+m/2,y:A-P/2},{x:I+m/2,y:A-P/2+f},{x:I+l.width/2,y:A-P/2+f},{x:I+l.width/2/2,y:A+P/2},{x:I-l.width/2,y:A+P/2},{x:I-l.width/2,y:A-P/2+f},{x:I-m/2,y:A-P/2+f}],lt.polygon(t,B,J)},c}p(ag,"icon");async function ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=pt(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),h=i?.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:c,bbox:l,label:u}=await Ct(e,t,"icon-shape default"),d=20,f=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=Gi(t),k=ut.svg(c),S=ct(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=x.get("fill");S.stroke=_??C;const v=c.append("g");t.icon&&v.html(`<g>${await zo(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=v.node().getBBox(),F=L.width,E=L.height,G=L.x,W=L.y,D=Math.max(F,E)*Math.SQRT2+d*2,J=k.circle(0,0,D,S),I=Math.max(D,l.width),A=D+l.height+f,P=k.rectangle(-I/2,-A/2,I,A,{...S,fill:"transparent",stroke:"none"}),B=c.insert(()=>J,":first-child"),q=c.insert(()=>P);return v.attr("transform",`translate(${-F/2-G},${m?l.height/2+f/2-E/2-W:-l.height/2-f/2-E/2-W})`),v.attr("style",`color: ${x.get("stroke")??y};`),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${m?-A/2:A/2-l.height})`),B.attr("transform",`translate(0,${m?l.height/2+f/2:-l.height/2-f/2})`),ft(t,q),t.intersect=function(R){return z.info("iconSquare intersect",t,R),lt.rect(t,R)},c}p(ng,"iconCircle");async function lg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=pt(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),h=i?.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:c,bbox:l,halfPadding:u,label:d}=await Ct(e,t,"icon-shape default"),f=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=Gi(t),S=-y/2,_=-m/2,v=t.label?8:0,L=ut.svg(c),F=ct(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const E=k.get("fill");F.stroke=E??x;const G=L.path(We(S,_,y,m,5),F),W=Math.max(y,l.width),D=m+l.height+v,J=L.rectangle(-W/2,-D/2,W,D,{...F,fill:"transparent",stroke:"none"}),I=c.insert(()=>G,":first-child").attr("class","icon-shape2"),A=c.insert(()=>J);if(t.icon){const P=c.append("g");P.html(`<g>${await zo(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=P.node().getBBox(),q=B.width,R=B.height,st=B.x,tt=B.y;P.attr("transform",`translate(${-q/2-st},${f?l.height/2+v/2-R/2-tt:-l.height/2-v/2-R/2-tt})`),P.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-D/2:D/2-l.height})`),I.attr("transform",`translate(0,${f?l.height/2+v/2:-l.height/2-v/2})`),ft(t,A),t.intersect=function(P){if(z.info("iconSquare intersect",t,P),!t.label)return lt.rect(t,P);const B=t.x??0,q=t.y??0,R=t.height??0;let st=[];return f?st=[{x:B-l.width/2,y:q-R/2},{x:B+l.width/2,y:q-R/2},{x:B+l.width/2,y:q-R/2+l.height+v},{x:B+y/2,y:q-R/2+l.height+v},{x:B+y/2,y:q+R/2},{x:B-y/2,y:q+R/2},{x:B-y/2,y:q-R/2+l.height+v},{x:B-l.width/2,y:q-R/2+l.height+v}]:st=[{x:B-y/2,y:q-R/2},{x:B+y/2,y:q-R/2},{x:B+y/2,y:q-R/2+m},{x:B+l.width/2,y:q-R/2+m},{x:B+l.width/2/2,y:q+R/2},{x:B-l.width/2,y:q+R/2},{x:B-l.width/2,y:q-R/2+m},{x:B-y/2,y:q-R/2+m}],lt.polygon(t,st,P)},c}p(lg,"iconRounded");async function hg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=pt(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),h=i?.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:c,bbox:l,halfPadding:u,label:d}=await Ct(e,t,"icon-shape default"),f=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=Gi(t),S=-y/2,_=-m/2,v=t.label?8:0,L=ut.svg(c),F=ct(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const E=k.get("fill");F.stroke=E??x;const G=L.path(We(S,_,y,m,.1),F),W=Math.max(y,l.width),D=m+l.height+v,J=L.rectangle(-W/2,-D/2,W,D,{...F,fill:"transparent",stroke:"none"}),I=c.insert(()=>G,":first-child"),A=c.insert(()=>J);if(t.icon){const P=c.append("g");P.html(`<g>${await zo(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=P.node().getBBox(),q=B.width,R=B.height,st=B.x,tt=B.y;P.attr("transform",`translate(${-q/2-st},${f?l.height/2+v/2-R/2-tt:-l.height/2-v/2-R/2-tt})`),P.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-D/2:D/2-l.height})`),I.attr("transform",`translate(0,${f?l.height/2+v/2:-l.height/2-v/2})`),ft(t,A),t.intersect=function(P){if(z.info("iconSquare intersect",t,P),!t.label)return lt.rect(t,P);const B=t.x??0,q=t.y??0,R=t.height??0;let st=[];return f?st=[{x:B-l.width/2,y:q-R/2},{x:B+l.width/2,y:q-R/2},{x:B+l.width/2,y:q-R/2+l.height+v},{x:B+y/2,y:q-R/2+l.height+v},{x:B+y/2,y:q+R/2},{x:B-y/2,y:q+R/2},{x:B-y/2,y:q-R/2+l.height+v},{x:B-l.width/2,y:q-R/2+l.height+v}]:st=[{x:B-y/2,y:q-R/2},{x:B+y/2,y:q-R/2},{x:B+y/2,y:q-R/2+m},{x:B+l.width/2,y:q-R/2+m},{x:B+l.width/2/2,y:q+R/2},{x:B-l.width/2,y:q+R/2},{x:B-l.width/2,y:q-R/2+m},{x:B-y/2,y:q-R/2+m}],lt.polygon(t,st,P)},c}p(hg,"iconSquare");async function cg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/s;const{labelStyles:a}=pt(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const h=Math.max(t.label?n??0:0,t?.assetWidth??o),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:h,l=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:d,label:f}=await Ct(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,C=-l/2,x=t.label?8:0,k=ut.svg(u),S=ct(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=k.rectangle(y,C,c,l,S),v=Math.max(c,d.width),L=l+d.height+x,F=k.rectangle(-v/2,-L/2,v,L,{...S,fill:"none",stroke:"none"}),E=u.insert(()=>_,":first-child"),G=u.insert(()=>F);if(t.img){const W=u.append("image");W.attr("href",t.img),W.attr("width",c),W.attr("height",l),W.attr("preserveAspectRatio","none"),W.attr("transform",`translate(${-c/2},${m?L/2-l:-L/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-l/2-d.height/2-x/2:l/2-d.height/2+x/2})`),E.attr("transform",`translate(0,${m?d.height/2+x/2:-d.height/2-x/2})`),ft(t,G),t.intersect=function(W){if(z.info("iconSquare intersect",t,W),!t.label)return lt.rect(t,W);const D=t.x??0,J=t.y??0,I=t.height??0;let A=[];return m?A=[{x:D-d.width/2,y:J-I/2},{x:D+d.width/2,y:J-I/2},{x:D+d.width/2,y:J-I/2+d.height+x},{x:D+c/2,y:J-I/2+d.height+x},{x:D+c/2,y:J+I/2},{x:D-c/2,y:J+I/2},{x:D-c/2,y:J-I/2+d.height+x},{x:D-d.width/2,y:J-I/2+d.height+x}]:A=[{x:D-c/2,y:J-I/2},{x:D+c/2,y:J-I/2},{x:D+c/2,y:J-I/2+l},{x:D+d.width/2,y:J-I/2+l},{x:D+d.width/2/2,y:J+I/2},{x:D-d.width/2,y:J+I/2},{x:D-d.width/2,y:J-I/2+l},{x:D-c/2,y:J-I/2+l}],lt.polygon(t,A,W)},u}p(cg,"imageSquare");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=Math.max(h.height+s*2,t.height??0),l=Math.max(h.width+a*2,(t.width??0)-c),u=[{x:0,y:0},{x:l,y:0},{x:l+3*c/6,y:-c},{x:-3*c/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(n),y=ct(t,{}),C=Nt(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&d.attr("style",f)}else d=lr(n,l,c,u);return i&&d.attr("style",i),t.width=l,t.height=c,ft(t,d),t.intersect=function(m){return lt.polygon(t,u,m)},n}p(ug,"inv_trapezoid");async function dg(e,t){const{shapeSvg:r,bbox:i,label:o}=await Ct(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ft(t,s),t.intersect=function(h){return lt.rect(t,h)},r}p(dg,"labelRect");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=Math.max(h.height+s,t.height??0),l=Math.max(h.width+a,(t.width??0)-c),u=[{x:0,y:0},{x:l+3*c/6,y:0},{x:l,y:-c},{x:-(3*c)/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(n),y=ct(t,{}),C=Nt(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&d.attr("style",f)}else d=lr(n,l,c,u);return i&&d.attr("style",i),t.width=l,t.height=c,ft(t,d),t.intersect=function(m){return lt.polygon(t,u,m)},n}p(fg,"lean_left");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=Math.max(h.height+s,t.height??0),l=Math.max(h.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:l,y:0},{x:l+3*c/6,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(n),y=ct(t,{}),C=Nt(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&d.attr("style",f)}else d=lr(n,l,c,u);return i&&d.attr("style",i),t.width=l,t.height=c,ft(t,d),t.intersect=function(m){return lt.polygon(t,u,m)},n}p(pg,"lean_right");function gg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.label="",t.labelStyle=r;const o=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),h=7,c=[{x:a,y:0},{x:0,y:n+h/2},{x:a-2*h,y:n+h/2},{x:0,y:2*n},{x:a,y:n-h/2},{x:2*h,y:n-h/2}],l=ut.svg(o),u=ct(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Nt(c),f=l.path(d,u),m=o.insert(()=>f,":first-child");return m.attr("class","outer-path"),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),ft(t,m),t.intersect=function(y){return z.info("lightningBolt intersect",t,y),lt.polygon(t,c,y)},o}p(gg,"lightningBolt");var d_=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),f_=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),p_=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),gu=10,mu=10;async function mg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?24:o;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-s,t.width<mu&&(t.width=mu);const S=x/2/(2.5+x/50);t.height=(t.height??0)-a-S*3,t.height<gu&&(t.height=gu)}const{shapeSvg:n,bbox:h,label:c}=await Ct(e,t,xt(t)),l=(t?.width?t?.width:h.width)+s*2,u=l/2,d=u/(2.5+l/50),f=(t?.height?t?.height:h.height)+d+a*2,m=f*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=ut.svg(n),k=f_(0,0,l,f,u,d,m),S=p_(0,d,l,f,u,d),_=ct(t,{}),v=x.path(k,_),L=x.path(S,_);n.insert(()=>L,":first-child").attr("class","line"),y=n.insert(()=>v,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=d_(0,0,l,f,u,d,m);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",oe(C)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-l/2}, ${-(f/2+d)})`),ft(t,y),c.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+d-(h.y-(h.top??0))})`),t.intersect=function(x){const k=lt.rect(t,x),S=k.x-(t.x??0);if(u!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-d)){let _=d*d*(1-S*S/(u*u));_>0&&(_=Math.sqrt(_)),_=d-_,x.y-(t.y??0)>0&&(_=-_),k.y+=_}return k},n}p(mg,"linedCylinder");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:h,label:c}=await Ct(e,t,xt(t)),l=(t?.width?t?.width:h.width)+(s??0)*2,u=(t?.height?t?.height:h.height)+(a??0)*2,d=t.look==="neo"?u/4:u/8,f=u+d,{cssStyles:m}=t,y=ut.svg(n),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-l/2-l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:f/2},...qr(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,d,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],k=y.polygon(x.map(_=>[_.x,_.y]),C),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(h.x-(h.left??0))},${-u/2+(t.padding??0)-d/2-(h.y-(h.top??0))})`),ft(t,S),t.intersect=function(_){return lt.polygon(t,x,_)},n}p(yg,"linedWaveEdgedRect");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:h,bbox:c,label:l}=await Ct(e,t,xt(t)),u=(t?.width?t?.width:c.width)+s*2+2*n,d=(t?.height?t?.height:c.height)+a*2+2*n,f=u-2*n,m=d-2*n,y=-f/2,C=-m/2,{cssStyles:x}=t,k=ut.svg(h),S=ct(t,{}),_=[{x:y-n,y:C+n},{x:y-n,y:C+m+n},{x:y+f-n,y:C+m+n},{x:y+f-n,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C+m-n},{x:y+f+n,y:C+m-n},{x:y+f+n,y:C-n},{x:y+n,y:C-n},{x:y+n,y:C},{x:y,y:C},{x:y,y:C+n}],v=[{x:y,y:C+n},{x:y+f-n,y:C+n},{x:y+f-n,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=Nt(_);let F=k.path(L,S);const E=Nt(v);let G=k.path(E,S);t.look!=="handDrawn"&&(F=Yn(F),G=Yn(G));const W=h.insert("g",":first-child");return W.insert(()=>F),W.insert(()=>G),W.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),ft(t,W),t.intersect=function(D){return lt.polygon(t,_,D)},h}p(Cg,"multiRect");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.padding??0,h=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let l=!0;(t.width||t.height)&&(l=!1,t.width=(t?.width??0)-h*2,t.height=(t?.height??0)-c*3);const u=Math.max(s.width,t?.width??0)+h*2,d=Math.max(s.height,t?.height??0)+c*3,f=t.look==="neo"?d/4:d/8,m=d+(l?f/2:-f/2),y=-u/2,C=-m/2,x=10,{cssStyles:k}=t,S=qr(y-x,C+m+x,y+u-x,C+m+x,f,.8),_=S?.[S.length-1],v=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...S,{x:y+u-x,y:_.y-x},{x:y+u,y:_.y-x},{x:y+u,y:_.y-2*x},{x:y+u+x,y:_.y-2*x},{x:y+u+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],L=[{x:y,y:C+x},{x:y+u-x,y:C+x},{x:y+u-x,y:_.y-x},{x:y+u,y:_.y-x},{x:y+u,y:C},{x:y,y:C}],F=ut.svg(o),E=ct(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const G=Nt(v),W=F.path(G,E),D=Nt(L),J=F.path(D,E),I=o.insert(()=>W,":first-child");return I.insert(()=>J),I.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-f/2})`),a.attr("transform",`translate(${-(s.width/2)-x-(s.x-(s.left??0))}, ${-(s.height/2)+x-f/2-(s.y-(s.top??0))})`),ft(t,I),t.intersect=function(A){return lt.polygon(t,v,A)},o}p(xg,"multiWaveEdgedRectangle");async function bg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i,t.useHtmlLabels||ke(Vt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:h}=await Ct(e,t,xt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-l/2,{cssStyles:f}=t,m=ut.svg(a),y=ct(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(u,d,c,l,y),x=a.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),o&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",o),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ft(t,x),t.intersect=function(k){return lt.rect(t,k)},a}p(bg,"note");var g_=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await Ct(e,t,xt(t)),a=s.width+(t.padding??0),n=s.height+(t.padding??0),h=a+n,c=.5,l=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=ut.svg(o),m=ct(t,{}),y=g_(0,0,h),C=f.path(y,m);u=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2+c}, ${h/2})`),d&&u.attr("style",d)}else u=lr(o,h,h,l),u.attr("transform",`translate(${-h/2+c}, ${h/2})`);return i&&u.attr("style",i),ft(t,u),t.calcIntersect=function(f,m){const y=f.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=lt.polygon(f,C,m);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},o}p(kg,"question");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?21:o??0,a=t.look==="neo"?12:o??0,{shapeSvg:n,bbox:h,label:c}=await Ct(e,t,xt(t)),l=h.width+(t.look==="neo"?s*2:s),u=Math.max(h.height+(t.look==="neo"?a*2:a),t.height??0),d=u/4,m=-Math.max(l,(t.width??0)-d)/2,y=-u/2,C=y/2,x=[{x:m+C,y},{x:m,y:0},{x:m+C,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,S=ut.svg(n),_=ct(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=Nt(x),L=S.path(v,_),F=n.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ft(t,F),t.intersect=function(E){return lt.polygon(t,x,E)},n}p(Tg,"rect_left_inv_arrow");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;let o;t.cssClasses?o="node "+t.cssClasses:o="node default";const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),h=t.description,c=t.label,l=await Or(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(ke(It())){const E=l.children[0],G=Et(l);u=E.getBoundingClientRect(),G.attr("width",u.width),G.attr("height",u.height)}z.info("Text 2",h);const d=h||[],f=l.getBBox(),m=await Or(n,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),y=m.children[0],C=Et(m);u=y.getBoundingClientRect(),C.attr("width",u.width),C.attr("height",u.height);const x=(t.padding||0)/2;Et(m).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),Et(l).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const k=u.width+(t.padding||0),S=u.height+(t.padding||0),_=-u.width/2-x,v=-u.height/2-x;let L,F;if(t.look==="handDrawn"){const E=ut.svg(s),G=ct(t,{}),W=E.path(We(_,v,k,S,t.rx||0),G),D=E.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,G);F=s.insert(()=>(z.debug("Rough node insert CXC",W),D),":first-child"),L=s.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child")}else L=a.insert("rect",":first-child"),F=a.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),F.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return ft(t,L),t.intersect=function(E){return lt.rect(t,E)},s}p(Sg,"rectWithTitle");async function wg(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,o={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Xi(e,t,o)}p(wg,"roundedRect");var Yr=8;async function _g(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:h}=await Ct(e,t,xt(t)),c=(t?.width??n.width)+o*2+(t.look==="neo"?Yr:Yr*2),l=(t?.height??n.height)+s*2,u=c-Yr,d=l,f=Yr-c/2,m=-l/2,{cssStyles:y}=t,C=ut.svg(a),x=ct(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=[{x:f,y:m},{x:f+u,y:m},{x:f+u,y:m+d},{x:f-Yr,y:m+d},{x:f-Yr,y:m},{x:f,y:m},{x:f,y:m+d}],S=C.polygon(k.map(v=>[v.x,v.y]),x),_=a.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path").attr("style",oe(y)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),h.attr("transform",`translate(${Yr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ft(t,_),t.intersect=function(v){return lt.rect(t,v)},a}p(_g,"shadedProcess");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:h,label:c}=await Ct(e,t,xt(t)),l=(t?.width?t?.width:h.width)+s*2,u=((t?.height?t?.height:h.height)+a*2)*1.5,d=l,f=u/1.5,m=-d/2,y=-f/2,{cssStyles:C}=t,x=ut.svg(n),k=ct(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+f},{x:m+d,y:y+f},{x:m+d,y:y-f/2}],_=Nt(S),v=x.path(_,k),L=n.insert(()=>v,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))}, ${-f/4+(t.padding??0)-(h.y-(h.top??0))})`),ft(t,L),t.intersect=function(F){return lt.polygon(t,S,F)},n}p(vg,"slopedRect");async function Bg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,o=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:o};return Xi(e,t,s)}p(Bg,"squareRect");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?20:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=h.height+(t.look==="neo"?a*2:a),l=h.width+c/4+(t.look==="neo"?s*2:s),u=c/2,{cssStyles:d}=t,f=ut.svg(n),m=ct(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...ir(-l/2+u,0,u,50,90,270),{x:l/2-u,y:c/2},...ir(l/2-u,0,u,50,270,450)],C=Nt(y),x=f.path(C,m),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),ft(t,k),t.intersect=function(S){return lt.polygon(t,y,S)},n}p(Lg,"stadium");async function Fg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Xi(e,t,r)}p(Fg,"state");function Ag(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:n,nodeBorder:h,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const l=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=ut.svg(l),d=ct(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=u.circle(0,0,t.width,{...d,stroke:a,strokeWidth:2}),m=n??h,y=(t.width??0)*5/14,C=u.circle(0,0,y,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=l.insert(()=>f,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),s&&x.selectAll("path").attr("style",s),o&&x.selectAll("path").attr("style",o),t.width<25&&c&&t.look!=="handDrawn"){const k=e.node()?.ownerSVGElement?.id??"",S=k?`${k}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${S})`)}return ft(t,x),t.intersect=function(k){return lt.circle(t,(t.width??0)/2,k)},l}p(Ag,"stateEnd");function Eg(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const h=ut.svg(s).circle(0,0,t.width,YT(i));a=s.insert(()=>h),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&o&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",h=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${h})`)}return ft(t,a),t.intersect=function(n){return lt.circle(t,(t.width??7)/2,n)},s}p(Eg,"stateStart");var gi=8;async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t?.padding??8,s=t.look==="neo"?28:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=Math.max(h.width+2*gi+s,t.width??0),l=Math.max(h.height+a,t.height??0),u=c-2*gi,d=l,f=-c/2,m=-l/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if(t.look==="handDrawn"){const C=ut.svg(n),x=ct(t,{}),k=C.rectangle(f,m,u+16,d,x),S=C.line(f+gi,m,f+gi,m+d,x),_=C.line(f+gi+u,m,f+gi+u,m+d,x);n.insert(()=>S,":first-child"),n.insert(()=>_,":first-child");const v=n.insert(()=>k,":first-child"),{cssStyles:L}=t;v.attr("class","basic label-container").attr("style",oe(L)),ft(t,v)}else{const C=lr(n,u,d,y);i&&C.attr("style",i),ft(t,C)}return t.intersect=function(C){return lt.polygon(t,y,C)},n}p(Mg,"subroutine");var Ga=.2;async function $g(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-s*2-Ga*(t.height+a*2),10));const{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=(t?.height?t?.height:h.height)+a*2,l=Ga*c,u=Ga*c,f=(t?.width?t?.width:h.width)+s*2+l-l,m=c,y=-f/2,C=-m/2,{cssStyles:x}=t,k=ut.svg(n),S=ct(t,{}),_=[{x:y-l/2,y:C},{x:y+f+l/2,y:C},{x:y+f+l/2,y:C+m},{x:y-l/2,y:C+m}],v=[{x:y+f-l/2,y:C+m},{x:y+f+l/2,y:C+m},{x:y+f+l/2,y:C+m-u}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=Nt(_),F=k.path(L,S),E=Nt(v),G=k.path(E,{...S,fillStyle:"solid"}),W=n.insert(()=>G,":first-child");return W.insert(()=>F,":first-child"),W.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),ft(t,W),t.intersect=function(D){return lt.polygon(t,_,D)},n}p($g,"taggedRect");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),h=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=h/8,l=.2*n,u=.2*h,d=h+c,{cssStyles:f}=t,m=ut.svg(o),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:d/2},...qr(-n/2-n/2*.1,d/2,n/2+n/2*.1,d/2,c,.8),{x:n/2+n/2*.1,y:-d/2},{x:-n/2-n/2*.1,y:-d/2}],x=-n/2+n/2*.1,k=-d/2-u*.4,S=[{x:x+n-l,y:(k+h)*1.3},{x:x+n,y:k+h-u},{x:x+n,y:(k+h)*.9},...qr(x+n,(k+h)*1.25,x+n-l,(k+h)*1.3,-h*.02,.5)],_=Nt(C),v=m.path(_,y),L=Nt(S),F=m.path(L,{...y,fillStyle:"solid"}),E=o.insert(()=>F,":first-child");return E.insert(()=>v,":first-child"),E.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-h/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),ft(t,E),t.intersect=function(G){return lt.polygon(t,C,G)},o}p(Og,"taggedWaveEdgedRectangle");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await Ct(e,t,xt(t)),a=Math.max(s.width+(t.padding??0),t?.width||0),n=Math.max(s.height+(t.padding??0),t?.height||0),h=-a/2,c=-n/2,l=o.insert("rect",":first-child");return l.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",a).attr("height",n),ft(t,l),t.intersect=function(u){return lt.rect(t,u)},o}p(Dg,"text");var m_=p((e,t,r,i,o,s)=>`M${e},${t}
202
+ a${o},${s} 0,0,1 0,${-i}
203
+ l${r},0
204
+ a${o},${s} 0,0,1 0,${i}
205
+ M${r},${-i}
206
+ a${o},${s} 0,0,0 0,${i}
207
+ l${-r},0`,"createCylinderPathD"),y_=p((e,t,r,i,o,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${o},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),C_=p((e,t,r,i,o,s)=>[`M${e+r/2},${-i/2}`,`a${o},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),yu=5,Cu=10;async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?12:o/2,a=t.height??0;if(t.height&&(t.height=t.height-s,t.height<yu&&(t.height=yu)),t.width){const x=a/2/(2.5+a/50);t.width=t.width-s-x*3,t.width<Cu&&(t.width=Cu)}const{shapeSvg:n,bbox:h,label:c}=await Ct(e,t,xt(t)),l=Math.max(t.height??0,h.height)+s,u=l/2,d=u/(2.5+l/50),f=Math.max(t.width??0,h.width)+d+s,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=ut.svg(n),x=y_(0,0,f,l,d,u),k=C_(0,0,f,l,d,u),S=C.path(x,ct(t,{})),_=C.path(k,ct(t,{fill:"none"}));y=n.insert(()=>_,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=m_(0,0,f,l,d,u);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",oe(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",d),y.attr("transform",`translate(${-f/2}, ${l/2} )`),c.attr("transform",`translate(${-(h.width/2)-d-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ft(t,y),t.intersect=function(C){const x=lt.rect(t,C),k=x.y-(t.y??0);if(u!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let S=d*d*(1-k*k/(u*u));S!=0&&(S=Math.sqrt(Math.abs(S))),S=d-S,C.x-(t.x??0)>0&&(S=-S),x.x+=S}return x},n}p(Ig,"tiltedCylinder");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=(t.look==="neo",o),a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=Math.max(h.height+s,t.height??0),l=Math.max(h.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:l+3*c/6,y:0},{x:l,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(n),y=ct(t,{}),C=Nt(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&d.attr("style",f)}else d=lr(n,l,c,u);return i&&d.attr("style",i),t.width=l,t.height=c,ft(t,d),t.intersect=function(m){return lt.polygon(t,u,m)},n}p(Pg,"trapezoid");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=15,h=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<h&&(t.height=h),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:l}=await Ct(e,t,xt(t)),u=(t?.width?t?.width:l.width)+s*2,d=(t?.height?t?.height:l.height)+a*2,{cssStyles:f}=t,m=ut.svg(c),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-u/2*.8,y:-d/2},{x:u/2*.8,y:-d/2},{x:u/2,y:-d/2*.6},{x:u/2,y:d/2},{x:-u/2,y:d/2},{x:-u/2,y:-d/2*.6}],x=Nt(C),k=m.path(x,y),S=c.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),ft(t,S),t.intersect=function(_){return lt.polygon(t,C,_)},c}p(Rg,"trapezoidalPentagon");var xu=10,bu=10;async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<bu&&(t.width=bu),t.height=t?.height??0,t.height<xu&&(t.height=xu));const{shapeSvg:a,bbox:n,label:h}=await Ct(e,t,xt(t)),c=nr(It().flowchart?.htmlLabels),l=(t?.width?t?.width:n.width)+s,u=t?.height?t?.height:l+n.height,d=u,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:m}=t,y=ut.svg(a),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Nt(f),k=y.path(x,C),S=a.insert(()=>k,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=l,t.height=u,ft(t,S),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(_){return z.info("Triangle intersect",t,f,_),lt.polygon(t,f,_)},a}p(Ng,"triangle");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:h,bbox:c,label:l}=await Ct(e,t,xt(t)),u=(t?.width?t?.width:c.width)+(s??0)*2,d=(t?.height?t?.height:c.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,m=d+(n?f:-f),{cssStyles:y}=t,x=14-u,k=x>0?x/2:0,S=ut.svg(h),_=ct(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=[{x:-u/2-k,y:m/2},...qr(-u/2-k,m/2,u/2+k,m/2,f,.8),{x:u/2+k,y:-m/2},{x:-u/2-k,y:-m/2}],L=Nt(v),F=S.path(L,_),E=h.insert(()=>F,":first-child");return E.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-f/2})`),l.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f-(c.y-(c.top??0))})`),ft(t,E),t.intersect=function(G){return lt.polygon(t,v,G)},h}p(qg,"waveEdgedRectangle");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?20:o;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-_*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:h}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:h.width)+s*2,l=(t?.height?t?.height:h.height)+a,u=l/8,d=l+u*2,{cssStyles:f}=t,m=ut.svg(n),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2,y:d/2},...qr(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...qr(c/2,-d/2,-c/2,-d/2,u,-1)],x=Nt(C),k=m.path(x,y),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),ft(t,S),t.intersect=function(_){return lt.polygon(t,C,_)},n}p(zg,"waveRectangle");var Kt=10;async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-Kt,10),t.height=Math.max((t?.height??0)-s*2-Kt,10));const{shapeSvg:a,bbox:n,label:h}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:n.width)+o*2+Kt,l=(t?.height?t?.height:n.height)+s*2+Kt,u=c-Kt,d=l-Kt,f=-u/2,m=-d/2,{cssStyles:y}=t,C=ut.svg(a),x=ct(t,{}),k=[{x:f-Kt,y:m-Kt},{x:f-Kt,y:m+d},{x:f+u,y:m+d},{x:f+u,y:m-Kt}],S=`M${f-Kt},${m-Kt} L${f+u},${m-Kt} L${f+u},${m+d} L${f-Kt},${m+d} L${f-Kt},${m-Kt}
208
+ M${f-Kt},${m} L${f+u},${m}
209
+ M${f},${m-Kt} L${f},${m+d}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const _=C.path(S,x),v=a.insert(()=>_,":first-child");return v.attr("transform",`translate(${Kt/2}, ${Kt/2})`),v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(n.width/2)+Kt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Kt/2-(n.y-(n.top??0))})`),ft(t,v),t.intersect=function(L){return lt.polygon(t,k,L)},a}p(Wg,"windowPane");var ku=new Set(["redux-color","redux-dark-color"]),x_=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ul(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:o}=Vt(),{rowEven:s,rowOdd:a,nodeBorder:n,borderColorArray:h}=o;if(t.look==="handDrawn"){const{themeVariables:nt}=Vt(),{background:St}=nt,Ot={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${St}`]};await Ul(e,Ot)}const c=Vt();t.useHtmlLabels=c.htmlLabels;let l=c.er?.diagramPadding??10,u=c.er?.entityPadding??6;const{cssStyles:d}=t,{labelStyles:f,nodeStyles:m}=pt(t);if(r.attributes.length===0&&t.label){const nt={rx:0,ry:0,labelPaddingX:l,labelPaddingY:l*1.5};br(t.label,c)+nt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const St=await Xi(e,t,nt);if(i!=null&&ku.has(i)){const Ot=r.colorIndex??0;St.attr("data-color-id",`color-${Ot%h.length}`)}if(!nr(c.htmlLabels)){const Ot=St.select("text"),_t=Ot.node()?.getBBox();Ot.attr("transform",`translate(${-_t.width/2}, 0)`)}return St}c.htmlLabels||(l*=1.25,u*=1.25);let y=xt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await Ci(C,t.label??"",c,0,0,["name"],f);x.height+=u;let k=0;const S=[],_=[];let v=0,L=0,F=0,E=0,G=!0,W=!0;for(const nt of r.attributes){const St=await Ci(C,nt.type,c,0,k,["attribute-type"],f);v=Math.max(v,St.width+l);const Ot=await Ci(C,nt.name,c,0,k,["attribute-name"],f);L=Math.max(L,Ot.width+l);const _t=await Ci(C,nt.keys.join(),c,0,k,["attribute-keys"],f);F=Math.max(F,_t.width+l);const Pt=await Ci(C,nt.comment,c,0,k,["attribute-comment"],f);E=Math.max(E,Pt.width+l);const qt=Math.max(St.height,Ot.height,_t.height,Pt.height)+u;_.push({yOffset:k,rowHeight:qt}),k+=qt}let D=4;F<=l&&(G=!1,F=0,D--),E<=l&&(W=!1,E=0,D--);const J=C.node().getBBox();if(x.width+l*2-(v+L+F+E)>0){const nt=x.width+l*2-(v+L+F+E);v+=nt/D,L+=nt/D,F>0&&(F+=nt/D),E>0&&(E+=nt/D)}const I=v+L+F+E,A=ut.svg(C),P=ct(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let B=0;_.length>0&&(B=_.reduce((nt,St)=>nt+(St?.rowHeight??0),0));const q=Math.max(J.width+l*2,t?.width||0,I),R=Math.max((B??0)+x.height,t?.height||0),st=-q/2,tt=-R/2;if(C.selectAll("g:not(:first-child)").each((nt,St,Ot)=>{const _t=Et(Ot[St]),Pt=_t.attr("transform");let qt=0,he=0;if(Pt){const De=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Pt);De&&(qt=parseFloat(De[1]),he=parseFloat(De[2]),_t.attr("class").includes("attribute-name")?qt+=v:_t.attr("class").includes("attribute-keys")?qt+=v+L:_t.attr("class").includes("attribute-comment")&&(qt+=v+L+F))}_t.attr("transform",`translate(${st+l/2+qt}, ${he+tt+x.height+u/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(tt+u/2)+")"),i!=null&&ku.has(i)){const nt=r.colorIndex??0;C.attr("data-color-id",`color-${nt%h.length}`)}const gt=A.rectangle(st,tt,q,R,P),Tt=C.insert(()=>gt,":first-child").attr("class","outer-path").attr("style",d.join(""));S.push(0);for(const[nt,St]of _.entries()){const _t=(nt+1)%2===0&&St.yOffset!==0,Pt=A.rectangle(st,x.height+tt+St?.yOffset,q,St?.rowHeight,{...P,fill:_t?s:a,stroke:n});C.insert(()=>Pt,"g.label").attr("style",d.join("")).attr("class",`row-rect-${_t?"even":"odd"}`)}const wt=1e-4;let vt=xi(st,x.height+tt,q+st,x.height+tt,wt),bt=A.polygon(vt.map(nt=>[nt.x,nt.y]),P);if(C.insert(()=>bt).attr("class","divider"),vt=xi(v+st,x.height+tt,v+st,R+tt,wt),bt=A.polygon(vt.map(nt=>[nt.x,nt.y]),P),C.insert(()=>bt).attr("class","divider"),G){const nt=v+L+st;vt=xi(nt,x.height+tt,nt,R+tt,wt),bt=A.polygon(vt.map(St=>[St.x,St.y]),P),C.insert(()=>bt).attr("class","divider")}if(W){const nt=v+L+F+st;vt=xi(nt,x.height+tt,nt,R+tt,wt),bt=A.polygon(vt.map(St=>[St.x,St.y]),P),C.insert(()=>bt).attr("class","divider")}for(const nt of S){const St=x.height+tt+nt;vt=xi(st,St,q+st,St,wt),bt=A.polygon(vt.map(Ot=>[Ot.x,Ot.y]),P),C.insert(()=>bt).attr("class","divider")}if(ft(t,Tt),m&&t.look!=="handDrawn")if(i!=null&&x_.has(i))C.selectAll("path").attr("style",m);else{const St=m.split(";")?.filter(Ot=>Ot.includes("stroke"))?.map(Ot=>`${Ot}`).join("; ");C.selectAll("path").attr("style",St??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(nt){return lt.rect(t,nt)},C}p(Ul,"erBox");async function Ci(e,t,r,i=0,o=0,s=[],a=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",a);t!==wc(t)&&(t=wc(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const h=n.node().appendChild(await Xe(n,t,{width:br(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let l=h.children[0];for(l.textContent=l.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");l.childNodes[0];)l=l.childNodes[0],l.textContent=l.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=h.getBBox();if(nr(r.htmlLabels)){const l=h.children[0];l.style.textAlign="start";const u=Et(h);c=l.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Ci,"addText");function xi(e,t,r,i,o){return e===r?[{x:e-o/2,y:t},{x:e+o/2,y:t},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:e,y:t-o/2},{x:e,y:t+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}p(xi,"lineToPolygon");async function Hg(e,t,r,i,o=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",xt(t)).attr("id",t.domId||t.id);let n=null,h=null,c=null,l=null,u=0,d=0,f=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await yo(n,{text:`«${k}»`},0),u=n.node().getBBox().height}h=a.insert("g").attr("class","label-group text"),await yo(h,t,0,["font-weight: bolder"]);const m=h.node().getBBox();d=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const S=await yo(c,k,y,[k.parseClassifier()]);y+=S+s}f=c.node().getBBox().height,f<=0&&(f=o/2),l=a.insert("g").attr("class","methods-group text");let C=0;for(const k of t.methods){const S=await yo(l,k,C,[k.parseClassifier()]);C+=S+s}let x=a.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return h.attr("transform",`translate(${-m.width/2}, ${u})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${u+d+o*2})`),x=a.node().getBBox(),l.attr("transform",`translate(0, ${u+d+(f?f+o*4:o*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}p(Hg,"textHelper");async function yo(e,t,r,i=[]){const o=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Vt();let a="useHtmlLabels"in t?t.useHtmlLabels:nr(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Eo(n)&&(a=!0);const h=await Xe(o,yl(Rr(n)),{width:br(n,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,l=1;if(a){const u=h.children[0],d=Et(h);l=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(l+=u.innerHTML.split("<mrow>").length-1),await zl(u),c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Et(h).selectAll("tspan").attr("font-weight",""),l=h.children.length;const u=h.children[0];(h.textContent===""||h.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=h.getBBox()}return o.attr("transform","translate(0,"+(-c.height/(2*l)+r)+")"),c.height}p(yo,"addText");async function Yg(e,t){const r=It(),{themeVariables:i}=r,{useGradient:o}=i,s=r.class.padding??12,a=s,n=t.useHtmlLabels??nr(r.htmlLabels)??!0,h=t;h.annotations=h.annotations??[],h.members=h.members??[],h.methods=h.methods??[];const{shapeSvg:c,bbox:l}=await Hg(e,t,r,n,a),{labelStyles:u,nodeStyles:d}=pt(t);t.labelStyle=u,t.cssStyles=h.styles||"";const f=h.styles?.join(";")||d||"";t.cssStyles||(t.cssStyles=f.replaceAll("!important","").split(";"));const m=h.members.length===0&&h.methods.length===0&&!r.class?.hideEmptyMembersBox,y=ut.svg(c),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,l.width);let k=Math.max(t.height??0,l.height);const S=(t.height??0)>l.height;h.members.length===0&&h.methods.length===0?k+=a:h.members.length>0&&h.methods.length===0&&(k+=a*2);const _=-x/2,v=-k/2;let L=m?s*2:h.members.length===0&&h.methods.length===0?-s:0;S&&(L=s*2);const F=y.rectangle(_-s,v-s-(m?s:h.members.length===0&&h.methods.length===0?-s/2:0),x+2*s,k+2*s+L,C),E=c.insert(()=>F,":first-child");E.attr("class","basic label-container outer-path");const G=E.node().getBBox(),W=c.select(".annotation-group").node().getBBox().height-(m?s/2:0)||0,D=c.select(".label-group").node().getBBox().height-(m?s/2:0)||0,J=c.select(".members-group").node().getBBox().height-(m?s/2:0)||0,I=(W+D+v+s-(v-s-(m?s:h.members.length===0&&h.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each((A,P,B)=>{const q=Et(B[P]),R=q.attr("transform");let st=0;if(R){const wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);wt&&(st=parseFloat(wt[2]))}let tt=st+v+s-(m?s:h.members.length===0&&h.methods.length===0?-s/2:0);if(q.attr("class").includes("methods-group")){const Tt=Math.max(J,a/2);S?tt=Math.max(I,W+D+Tt+v+a*2+s)+a*2:tt=W+D+Tt+v+a*4+s}h.members.length===0&&h.methods.length===0&&r.class?.hideEmptyMembersBox&&(h.annotations.length>0?tt=st-a:tt=st),n||(tt-=4);let gt=_;(q.attr("class").includes("label-group")||q.attr("class").includes("annotation-group"))&&(gt=-q.node()?.getBBox().width/2||0,c.selectAll("text").each(function(Tt,wt,vt){window.getComputedStyle(vt[wt]).textAnchor==="middle"&&(gt=0)})),q.attr("transform",`translate(${gt}, ${tt})`)}),h.members.length>0||h.methods.length>0||m){const A=W+D+v+s,P=y.line(G.x,A,G.x+G.width,A+.001,C);c.insert(()=>P).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",f)}if(m||h.members.length>0||h.methods.length>0){const A=W+D+J+v+a*2+s,P=y.line(G.x,S?Math.max(I,A):A,G.x+G.width,(S?Math.max(I,A):A)+.001,C);c.insert(()=>P).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",f)}if(h.look!=="handDrawn"&&c.selectAll("path").attr("style",f),E.select(":nth-child(2)").attr("style",f),c.selectAll(".divider").select("path").attr("style",f),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",f),!n){const A=RegExp(/color\s*:\s*([^;]*)/),P=A.exec(f);if(P){const B=P[0].replace("color","fill");c.selectAll("tspan").attr("style",B)}else if(u){const B=A.exec(u);if(B){const q=B[0].replace("color","fill");c.selectAll("tspan").attr("style",q)}}}return ft(t,E),t.intersect=function(A){return lt.rect(t,A)},c}p(Yg,"classBox");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t,s=t,a=20,n=20,h="verifyMethod"in t,c=xt(t),l=It(),{themeVariables:u}=l,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,m=l.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;h?C=await tr(y,`&lt;&lt;${o.type}&gt;&gt;`,0,t.labelStyle):C=await tr(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const k=await tr(y,o.name,x,t.labelStyle+"; font-weight: bold;");if(x+=k+n,h){const D=await tr(y,`${o.requirementId?`ID: ${o.requirementId}`:""}`,x,t.labelStyle,m);x+=D;const J=await tr(y,`${o.text?`Text: ${o.text}`:""}`,x,t.labelStyle,m);x+=J;const I=await tr(y,`${o.risk?`Risk: ${o.risk}`:""}`,x,t.labelStyle,m);x+=I,await tr(y,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const D=await tr(y,`${s.type?`Type: ${s.type}`:""}`,x,t.labelStyle,m);x+=D,await tr(y,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,x,t.labelStyle,m)}const S=(y.node()?.getBBox().width??200)+a,_=(y.node()?.getBBox().height??200)+a,v=-S/2,L=-_/2,F=ut.svg(y),E=ct(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const G=F.rectangle(v,L,S,_,E),W=y.insert(()=>G,":first-child");if(W.attr("class","basic label-container outer-path").attr("style",i),d?.length){const D=t.colorIndex??0;y.attr("data-color-id",`color-${D%d.length}`)}if(y.selectAll(".label").each((D,J,I)=>{const A=Et(I[J]),P=A.attr("transform");let B=0,q=0;if(P){const gt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);gt&&(B=parseFloat(gt[1]),q=parseFloat(gt[2]))}const R=q-_/2;let st=v+a/2;(J===0||J===1)&&(st=B),A.attr("transform",`translate(${st}, ${R+a})`)}),x>C+k+n){const D=L+C+k+n;let J;if(t.look==="neo"){const P=[[v,D],[v+S,D],[v+S,D+.001],[v,D+.001]];J=F.polygon(P,E)}else J=F.line(v,D,v+S,D,E);y.insert(()=>J).attr("class","divider")}return ft(t,W),t.intersect=function(D){return lt.rect(t,D)},i&&t.look!=="handDrawn"&&(f||d?.length)&&y.selectAll("path").attr("style",i),y}p(Ug,"requirementBox");async function tr(e,t,r,i="",o="center"){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=It(),n=a.htmlLabels??!0,h=await Xe(s,yl(Rr(t)),{width:br(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const l=h.children[0],u=Et(h);o==="start"&&Et(l).style("text-align","left"),c=l.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const l=h.children[0];for(const u of l.children)i&&u.setAttribute("style",i);if(o==="start"){l.setAttribute("text-anchor","start");for(const u of l.children)u.setAttribute("text-anchor","start")}c=h.getBBox(),c.height+=6}return s.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(tr,"addText");var b_=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function jg(e,t,{config:r}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:h,label:c}=await Ct(e,t,xt(t)),l=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;d?{label:m,bbox:y}=await Ua(d,"ticket"in t&&t.ticket||"",f):{label:m,bbox:y}=await Ua(n,"ticket"in t&&t.ticket||"",f);const{label:C,bbox:x}=await Ua(n,"assigned"in t&&t.assigned||"",f);t.width=a;const k=10,S=t?.width||0,_=Math.max(y.height,x.height)/2,v=Math.max(h.height+k*2,t?.height||0)+_,L=-S/2,F=-v/2;c.attr("transform","translate("+(l-S/2)+", "+(-_-h.height/2)+")"),m.attr("transform","translate("+(l-S/2)+", "+(-_+h.height/2)+")"),C.attr("transform","translate("+(l+S/2-x.width-2*s)+", "+(-_+h.height/2)+")");let E;const{rx:G,ry:W}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const J=ut.svg(n),I=ct(t,{}),A=G||W?J.path(We(L,F,S,v,G||0),I):J.rectangle(L,F,S,v,I);E=n.insert(()=>A,":first-child"),E.attr("class","basic label-container").attr("style",D||null)}else{E=n.insert("rect",":first-child"),E.attr("class","basic label-container __APA__").attr("style",o).attr("rx",G??5).attr("ry",W??5).attr("x",L).attr("y",F).attr("width",S).attr("height",v);const J="priority"in t&&t.priority;if(J){const I=n.append("line"),A=L+2,P=F+Math.floor((G??0)/2),B=F+v-Math.floor((G??0)/2);I.attr("x1",A).attr("y1",P).attr("x2",A).attr("y2",B).attr("stroke-width","4").attr("stroke",b_(J))}}return ft(t,E),t.height=v,t.intersect=function(J){return lt.rect(t,J)},n}p(jg,"kanbanItem");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await Ct(e,t,xt(t)),h=s.width+10*a,c=s.height+8*a,l=.15*h,{cssStyles:u}=t,d=s.width+20,f=s.height+20,m=Math.max(h,d),y=Math.max(c,f);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let C;const x=`M0 0
210
+ a${l},${l} 1 0,0 ${m*.25},${-1*y*.1}
211
+ a${l},${l} 1 0,0 ${m*.25},0
212
+ a${l},${l} 1 0,0 ${m*.25},0
213
+ a${l},${l} 1 0,0 ${m*.25},${y*.1}
214
+
215
+ a${l},${l} 1 0,0 ${m*.15},${y*.33}
216
+ a${l*.8},${l*.8} 1 0,0 0,${y*.34}
217
+ a${l},${l} 1 0,0 ${-1*m*.15},${y*.33}
218
+
219
+ a${l},${l} 1 0,0 ${-1*m*.25},${y*.15}
220
+ a${l},${l} 1 0,0 ${-1*m*.25},0
221
+ a${l},${l} 1 0,0 ${-1*m*.25},0
222
+ a${l},${l} 1 0,0 ${-1*m*.25},${-1*y*.15}
223
+
224
+ a${l},${l} 1 0,0 ${-1*m*.1},${-1*y*.33}
225
+ a${l*.8},${l*.8} 1 0,0 0,${-1*y*.34}
226
+ a${l},${l} 1 0,0 ${m*.1},${-1*y*.33}
227
+ H0 V0 Z`;if(t.look==="handDrawn"){const k=ut.svg(o),S=ct(t,{}),_=k.path(x,S);C=o.insert(()=>_,":first-child"),C.attr("class","basic label-container").attr("style",oe(u))}else C=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-m/2}, ${-y/2})`),ft(t,C),t.calcIntersect=function(k,S){return lt.rect(k,S)},t.intersect=function(k){return z.info("Bang intersect",t,k),lt.rect(t,k)},o}p(Gg,"bang");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await Ct(e,t,xt(t)),h=s.width+2*a,c=s.height+2*a,l=.15*h,u=.25*h,d=.35*h,f=.2*h,{cssStyles:m}=t;let y;const C=`M0 0
228
+ a${l},${l} 0 0,1 ${h*.25},${-1*h*.1}
229
+ a${d},${d} 1 0,1 ${h*.4},${-1*h*.1}
230
+ a${u},${u} 1 0,1 ${h*.35},${h*.2}
231
+
232
+ a${l},${l} 1 0,1 ${h*.15},${c*.35}
233
+ a${f},${f} 1 0,1 ${-1*h*.15},${c*.65}
234
+
235
+ a${u},${l} 1 0,1 ${-1*h*.25},${h*.15}
236
+ a${d},${d} 1 0,1 ${-1*h*.5},0
237
+ a${l},${l} 1 0,1 ${-1*h*.25},${-1*h*.15}
238
+
239
+ a${l},${l} 1 0,1 ${-1*h*.1},${-1*c*.35}
240
+ a${f},${f} 1 0,1 ${h*.1},${-1*c*.65}
241
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=ut.svg(o),k=ct(t,{}),S=x.path(C,k);y=o.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",oe(m))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),y.attr("transform",`translate(${-h/2}, ${-c/2})`),ft(t,y),t.calcIntersect=function(x,k){return lt.rect(x,k)},t.intersect=function(x){return z.info("Cloud intersect",t,x),lt.rect(t,x)},o}p(Xg,"cloud");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await Ct(e,t,xt(t)),h=s.width+8*a,c=s.height+2*a,l=5,u=t.look==="neo"?`
242
+ M${-h/2} ${c/2-l}
243
+ v${-c+2*l}
244
+ q0,-${l} ${l},-${l}
245
+ h${h-2*l}
246
+ q${l},0 ${l},${l}
247
+ v${c-l}
248
+ H${-h/2}
249
+ Z
250
+ `:`
251
+ M${-h/2} ${c/2-l}
252
+ v${-c+2*l}
253
+ q0,-${l} ${l},-${l}
254
+ h${h-2*l}
255
+ q${l},0 ${l},${l}
256
+ v${c-2*l}
257
+ q0,${l} ${-l},${l}
258
+ h${-(h-2*l)}
259
+ q${-l},0 ${-l},${-l}
260
+ Z
261
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return o.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),o.append(()=>n.node()),ft(t,d),t.calcIntersect=function(f,m){return lt.rect(f,m)},t.intersect=function(f){return lt.rect(t,f)},o}p(Vg,"defaultMindmapNode");async function Zg(e,t){const r={padding:t.padding??0};return Yl(e,t,r)}p(Zg,"mindmapCircle");var k_=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Bg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:wg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Lg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Mg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Vp},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Zp},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:eg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Op},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:zp},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Pp},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Xp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Yl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Gg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Xg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:kg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:og},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:pg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:fg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Pg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:ug},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Qp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Dg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Rp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:_g},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Eg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ag},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:rg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:sg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Yp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Up},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:jp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:gg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ig},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ig},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:mg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Gp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Kp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Ng},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Wg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Jp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Rg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:vg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:xg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Cg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:$p},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Hp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Og},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:$g},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:zg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Tg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:yg}],T_=p(()=>{const t=[...Object.entries({state:Fg,choice:Np,note:bg,composite:qp,rectWithTitle:Sg,labelRect:dg,block_arrow:Ip,collapsedGroup:Dp,iconSquare:hg,iconCircle:ng,icon:ag,iconRounded:lg,imageSquare:cg,anchor:Ep,kanbanItem:jg,mindmapCircle:Zg,defaultMindmapNode:Vg,classBox:Yg,erBox:Ul,requirementBox:Ug}),...k_.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(o=>[o,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Kg=T_();function S_(e){return e in Kg}p(S_,"isValidShape");var ea=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),ra=new Map;async function jl(e,t,r){let i,o;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Kg[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),o=await s(i,t,r)}else o=await s(e,t,r),i=o;return i.attr("data-look",oe(t.look)),t.tooltip&&o.attr("title",t.tooltip),ra.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(jl,"insertNode");var vA=p((e,t)=>{ra.set(t.id,e)},"setNodeElem"),w_=p(()=>{ra.clear()},"clear"),Tu=p(e=>{const t=ra.get(e.id);z.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),__=p(async(e,t)=>{const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,n=a,{labelStyles:h,nodeStyles:c,borderStyles:l,backgroundStyles:u}=pt(t),d=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),f=nr(r.flowchart.htmlLabels),m=t.direction==="LR",y=d.insert("g").attr("class","cluster-label swimlane-label"),C=await Xe(y,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let x=C.getBBox();if(f){const I=C.children[0],A=Et(C);x=I.getBoundingClientRect(),A.attr("width",x.width),A.attr("height",x.height)}const k=t.padding??0,S=t.width<=x.width+k?x.width+k:t.width;t.width<=x.width+k?t.diff=(S-t.width)/2-k:t.diff=-k;const _=t.height,v=t.y-_/2,L=t.y+_/2,F=t.x-S/2,E=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:v+_/3,G=m?4:0,W=x.height+2*G;let D,J;if(m){const I=Math.max(W,x.height+2*G),A=F+I,P=Math.max(0,S-I);if(t.look==="handDrawn"){const R=ut.svg(d),st=ct(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:o}),tt=ct(t,{roughness:.7,fill:"none",stroke:n,seed:o}),gt=R.rectangle(F,v,I,_,st);D=d.insert(()=>gt,":first-child");const Tt=R.rectangle(A,v,P,_,tt);J=d.insert(()=>Tt,":first-child"),D.select("path:nth-child(2)").attr("style",l.join(";")),D.select("path").attr("style",u.join(";").replace("fill","stroke"))}else D=d.insert("rect",":first-child"),J=d.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",v).attr("width",I).attr("height",_).attr("fill",s).attr("stroke",n),J.attr("class","swimlane-body").attr("style",c).attr("x",A).attr("y",v).attr("width",P).attr("height",_).attr("fill","none").attr("stroke",n);const B=F+I/2,q=t.y;y.attr("transform",`translate(${B}, ${q}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const I=Math.max(0,E-v),A=Math.min(W,I),P=v+A,B=Math.max(0,L-P),q=t.x-S/2;if(t.look==="handDrawn"){const tt=ut.svg(d),gt=ct(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:o}),Tt=ct(t,{roughness:.7,fill:"none",stroke:n,seed:o}),wt=tt.rectangle(q,v,S,A,gt);D=d.insert(()=>wt,":first-child");const vt=tt.rectangle(q,P,S,B,Tt);J=d.insert(()=>vt,":first-child"),D.select("path:nth-child(2)").attr("style",l.join(";")),D.select("path").attr("style",u.join(";").replace("fill","stroke"))}else D=d.insert("rect",":first-child"),J=d.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",c).attr("x",q).attr("y",v).attr("width",S).attr("height",A).attr("fill",s).attr("stroke",n),J.attr("class","swimlane-body").attr("style",c).attr("x",q).attr("y",P).attr("width",S).attr("height",B).attr("fill","none").attr("stroke",n);const R=t.x-x.width/2,st=v+(A-x.height)/2;y.attr("transform",`translate(${R}, ${st})`)}if(z.trace("Swimlane data ",t,JSON.stringify(t)),h){const I=y.select("span");I&&I.attr("style",h)}return t.offsetX=0,t.width=S,t.height=_,t.offsetY=x.height-k/2,t.intersect=function(I){return ni(t,I)},{cluster:d,labelBBox:x}},"swimlane"),Qg=p(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:h,borderStyles:c,backgroundStyles:l}=pt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=ke(r),f=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Xe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):m=await Or(f,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(ke(r)){const F=m.children[0],E=Et(m);y=F.getBoundingClientRect(),E.attr("width",y.width),E.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,S=t.y-x/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const F=ut.svg(u),E=ct(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:o}),G=F.path(We(k,S,C,x,0),E);_=u.insert(()=>(z.debug("Rough node insert CXC",G),G),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",l.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:v}=ea(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const F=f.select("span");F&&F.attr("style",n)}const L=_.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(F){return ni(t,F)},{cluster:u,labelBBox:y}},"rect"),v_=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),o=0*t.padding,s=o/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+o).attr("height",t.height+o).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return ni(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),B_=p(async(e,t)=>{const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:n,nodeBorder:h}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),l=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=await Or(u,t.label,t.labelStyle,void 0,!0);let m=f.getBBox();if(ke(r)){const G=f.children[0],W=Et(f);m=G.getBoundingClientRect(),W.attr("width",m.width),W.attr("height",m.height)}const y=0*t.padding,C=y/2,x=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,S=t.height+y-m.height-6,_=t.x-x/2,v=t.y-k/2;t.width=x;const L=t.y-t.height/2-C+m.height+2;let F;if(t.look==="handDrawn"){const G=t.cssClasses.includes("statediagram-cluster-alt"),W=ut.svg(c),D=t.rx||t.ry?W.path(We(_,v,x,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:h,seed:o}):W.rectangle(_,v,x,k,{seed:o});F=c.insert(()=>D,":first-child");const J=W.rectangle(_,L,x,S,{fill:G?s:a,fillStyle:G?"hachure":"solid",stroke:h,seed:o});F=c.insert(()=>D,":first-child"),d=c.insert(()=>J)}else F=l.insert("rect",":first-child"),F.attr("class","outer").attr("x",_).attr("y",v).attr("width",x).attr("height",k).attr("data-look",t.look),d.attr("class","inner").attr("x",_).attr("y",L).attr("width",x).attr("height",S);u.attr("transform",`translate(${t.x-m.width/2}, ${v+1-(ke(r)?0:3)})`);const E=F.node().getBBox();return t.height=E.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(G){return ni(t,G)},{cluster:c,labelBBox:m}},"roundedWithTitle"),L_=p(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:h,borderStyles:c,backgroundStyles:l}=pt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=ke(r),f=u.insert("g").attr("class","cluster-label "),m=await Xe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let y=m.getBBox();if(ke(r)){const F=m.children[0],E=Et(m);y=F.getBoundingClientRect(),E.attr("width",y.width),E.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,S=t.y-x/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const F=ut.svg(u),E=ct(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:o}),G=F.path(We(k,S,C,x,t.rx),E);_=u.insert(()=>(z.debug("Rough node insert CXC",G),G),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",l.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:v}=ea(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const F=f.select("span");F&&F.attr("style",n)}const L=_.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(F){return ni(t,F)},{cluster:u,labelBBox:y}},"kanbanSection"),F_=p((e,t)=>{const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),h=0*t.padding,c=t.width+h;t.diff=-t.padding;const l=t.height+h,u=t.x-c/2,d=t.y-l/2;t.width=c;let f;if(t.look==="handDrawn"){const C=ut.svg(a).rectangle(u,d,c,l,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:o});f=a.insert(()=>C,":first-child")}else{f=n.insert("rect",":first-child");let y="outer";t.look,y="divider",f.attr("class",y).attr("x",u).attr("y",d).attr("width",c).attr("height",l).attr("data-look",t.look)}const m=f.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return ni(t,y)},{cluster:a,labelBBox:{}}},"divider"),A_=Qg,E_={rect:Qg,squareRect:A_,roundedWithTitle:B_,noteGroup:v_,divider:F_,kanbanSection:L_,swimlane:__},Jg=new Map,tm=p(async(e,t)=>{const r=t.shape||"rect",i=await E_[r](e,t);return Jg.set(t.id,i),i},"insertCluster"),M_=p(()=>{Jg=new Map},"clear"),co=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),xe={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Su={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Co(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Xt(e),t=Xt(t);const[r,i]=[e.x,e.y],[o,s]=[t.x,t.y],a=o-r,n=s-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}p(Co,"calculateDeltaAndAngle");var Xt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),$_=p(e=>({x:p(function(t,r,i){let o=0;const s=Xt(i[0]).x<Xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(xe,e.arrowTypeStart)){const{angle:f,deltaX:m}=Co(i[0],i[1]);o=xe[e.arrowTypeStart]*Math.cos(f)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(xe,e.arrowTypeEnd)){const{angle:f,deltaX:m}=Co(i[i.length-1],i[i.length-2]);o=xe[e.arrowTypeEnd]*Math.cos(f)*(m>=0?1:-1)}const a=Math.abs(Xt(t).x-Xt(i[i.length-1]).x),n=Math.abs(Xt(t).y-Xt(i[i.length-1]).y),h=Math.abs(Xt(t).x-Xt(i[0]).x),c=Math.abs(Xt(t).y-Xt(i[0]).y),l=xe[e.arrowTypeStart],u=xe[e.arrowTypeEnd],d=1;if(a<u&&a>0&&n<u){let f=u+d-a;f*=s==="right"?-1:1,o-=f}if(h<l&&h>0&&c<l){let f=l+d-h;f*=s==="right"?-1:1,o+=f}return Xt(t).x+o},"x"),y:p(function(t,r,i){let o=0;const s=Xt(i[0]).y<Xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(xe,e.arrowTypeStart)){const{angle:f,deltaY:m}=Co(i[0],i[1]);o=xe[e.arrowTypeStart]*Math.abs(Math.sin(f))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(xe,e.arrowTypeEnd)){const{angle:f,deltaY:m}=Co(i[i.length-1],i[i.length-2]);o=xe[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(m>=0?1:-1)}const a=Math.abs(Xt(t).y-Xt(i[i.length-1]).y),n=Math.abs(Xt(t).x-Xt(i[i.length-1]).x),h=Math.abs(Xt(t).y-Xt(i[0]).y),c=Math.abs(Xt(t).x-Xt(i[0]).x),l=xe[e.arrowTypeStart],u=xe[e.arrowTypeEnd],d=1;if(a<u&&a>0&&n<u){let f=u+d-a;f*=s==="up"?-1:1,o-=f}if(h<l&&h>0&&c<l){let f=l+d-h;f*=s==="up"?-1:1,o+=f}return Xt(t).y+o},"y")}),"getLineFunctionsWithOffset"),O_=p((e,t,r,i,o,s=!1,a)=>{t.arrowTypeStart&&wu(e,"start",t.arrowTypeStart,r,i,o,s,a),t.arrowTypeEnd&&wu(e,"end",t.arrowTypeEnd,r,i,o,s,a)},"addEdgeMarkers"),D_={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},I_=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],wu=p((e,t,r,i,o,s,a=!1,n)=>{if(!r||r==="none")return;const h=D_[r],c=h&&I_.includes(h.type);if(!h){z.warn(`Unknown arrow type: ${r}`);return}const l=h.type,f=`${o}_${s}-${l}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${f}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(f);if(C){const x=C.cloneNode(!0);x.id=y,x.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),h.fill&&S.setAttribute("fill",n)}),C.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),P_=p(e=>typeof e=="string"?e:It()?.flowchart?.curve,"resolveEdgeCurveType"),Yi=new Map,Jt=new Map,R_=p(()=>{Yi.clear(),Jt.clear()},"clear"),em=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),uo=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Gl=p(async(e,t)=>{const r=It();let i=ke(r);const{labelStyles:o}=pt(t);t.labelStyle=o;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Xe(e,t.label,{style:uo(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),z.info("abc82",t,t.labelType);let l,u;if(i){const f=c.children[0],m=Et(c);l=await ri.measure(()=>f.getBoundingClientRect()),u=l,m.attr("width",l.width),m.attr("height",l.height)}else{const f=Et(c).select("text").node();await ri.measure(()=>{l=c.getBBox(),f&&typeof f.getBBox=="function"?u=f.getBBox():u=l})}a.attr("transform",co(u,i)),Yi.set(t.id,s),t.width=l.width,t.height=l.height;let d;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Or(m,t.startLabelLeft,uo(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=Et(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",co(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).startLeft=f,xo(d,t.startLabelLeft)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Or(m,t.startLabelRight,uo(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=Et(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",co(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).startRight=f,xo(d,t.startLabelRight)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Or(f,t.endLabelLeft,uo(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=Et(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",co(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).endLeft=f,xo(d,t.endLabelLeft)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Or(f,t.endLabelRight,uo(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=Et(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",co(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).endRight=f,xo(d,t.endLabelRight)}return c},"insertEdgeLabel");function xo(e,t){ke(It())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(xo,"setTerminalWidth");var N_=p((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,Yi.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=It(),{subGraphTitleTotalMargin:o}=ea(i);if(e.label){const s=Yi.get(e.id);let a=e.x,n=e.y;if(r){const h=be.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",a,",",n,") to (",h.x,",",h.y,") abc88"),t.updatedPath&&(a=h.x,n=h.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e.startLabelLeft){const s=Jt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const h=be.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=h.x,n=h.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Jt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const h=be.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=h.x,n=h.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Jt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const h=be.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=h.x,n=h.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Jt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const h=be.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=h.x,n=h.y}s.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),q_=p((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,o=Math.abs(i.x-r.x),s=Math.abs(i.y-r.y);return o<.001||s<.001?t:s>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),z_=p((e,t)=>{const r=e.x,i=e.y,o=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return o>=a||s>=n},"outsideNode"),W_=p((e,t,r)=>{z.debug(`intersection calc abc89:
262
+ outsidePoint: ${JSON.stringify(t)}
263
+ insidePoint : ${JSON.stringify(r)}
264
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,s=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-s:a+s;const h=e.height/2,c=Math.abs(t.y-r.y),l=Math.abs(t.x-r.x);if(Math.abs(o-t.y)*a>Math.abs(i-t.x)*h){let u=r.y<t.y?t.y-h-o:o-h-t.y;n=l*u/c;const d={x:r.x<t.x?r.x+n:r.x-l+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(d.x=t.x,d.y=t.y),l===0&&(d.x=t.x),c===0&&(d.y=t.y),z.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${l}, r ${n}`,d),d}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let u=c*n/l,d=r.x<t.x?r.x+l-n:r.x-l+n,f=r.y<t.y?r.y+u:r.y-u;return z.debug(`sides calc abc89, Q ${c}, q ${u}, R ${l}, r ${n}`,{_x:d,_y:f}),n===0&&(d=t.x,f=t.y),l===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),_u=p((e,t)=>{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],o=!1;return e.forEach(s=>{if(z.info("abc88 checking point",s,t),!z_(t,s)&&!o){const a=W_(t,i,s);z.debug("abc88 inside",s,i,a),z.debug("abc88 intersection",a,t);let n=!1;r.forEach(h=>{n=n||h.x===a.x&&h.y===a.y}),r.some(h=>h.x===a.x&&h.y===a.y)?z.warn("abc88 no intersect",a,r):r.push(a),o=!0}else z.warn("abc88 outside",s,i),i=s,o||r.push(s)}),z.debug("returning points",r),r},"cutPathAtIntersect");function rm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const o=e[i-1],s=e[i],a=e[i+1];(o.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===a.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(rm,"extractCornerPoints");var vu=p(function(e,t,r){const i=t.x-e.x,o=t.y-e.y,s=Math.sqrt(i*i+o*o),a=r/s;return{x:t.x-a*i,y:t.y-a*o}},"findAdjacentPoint"),H_=p(function(e){const{cornerPointPositions:t}=rm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const o=e[i-1],s=e[i+1],a=e[i],n=vu(o,a,5),h=vu(s,a,5),c=h.x-n.x,l=h.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let d={x:a.x,y:a.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){z.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const f=5;a.x===n.x?d={x:c<0?n.x-f+u:n.x+f-u,y:l<0?n.y-u:n.y+u}:d={x:c<0?n.x-u:n.x+u,y:l<0?n.y-f+u:n.y+f-u}}else z.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));r.push(d,h)}else r.push(e[i]);return r},"fixCorners"),Y_=p((e,t,r)=>{const i=e-t-r,o=2,s=2,a=o+s,n=Math.floor(i/a),h=Number.isFinite(n)?Math.max(0,n):0,c=Array(h).fill(`${o} ${s}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),im=p(function(e,t,r,i,o,s,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:h,layout:c}=It();let l=t.points,u=!1;const d=o;var f=s;const m=[];for(const R in t.cssCompiledStyles)If(R)||m.push(t.cssCompiledStyles[R]);if(c==="swimlane"){if(f.intersect&&d.intersect&&Array.isArray(l)&&l.length>=2)if(l.length===2)l=[d.intersect(l[0]),f.intersect(l[1])];else{const R=l.slice(1,-1),st=R[0],tt=R[R.length-1],gt=.5,Tt=Math.abs(l[l.length-1].x-tt.x)<gt&&Math.abs(l[l.length-1].y-tt.y)<gt,wt=d.intersect(st),vt=Tt?tt:f.intersect(tt),bt=Math.abs(vt.x-tt.x)<gt&&Math.abs(vt.y-tt.y)<gt,St=Math.abs(wt.x-st.x)<gt&&Math.abs(wt.y-st.y)<gt?[]:[wt],Ot=bt?[]:[vt];l=[...St,...R,...Ot]}l=q_(t,l)}else f.intersect&&d.intersect&&!n&&(l=l.slice(1,t.points.length-1),l.unshift(d.intersect(l[0])),l.push(f.intersect(l[l.length-1])));const y=btoa(JSON.stringify(l));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),l=_u(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=_u(l.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let C=l.filter(R=>!Number.isNaN(R.y));const x=P_(t.curve);x!=="rounded"&&(C=H_(C));let k=_o;switch(x){case"linear":k=_o;break;case"basis":k=$n;break;case"cardinal":k=kf;break;case"bumpX":k=mf;break;case"bumpY":k=yf;break;case"catmullRom":k=Sf;break;case"monotoneX":k=Ff;break;case"monotoneY":k=Af;break;case"natural":k=Mf;break;case"step":k=$f;break;case"stepAfter":k=Df;break;case"stepBefore":k=Of;break;case"rounded":k=_o;break;default:k=$n}const{x:S,y:_}=$_(t),v=MT().x(S).y(_).curve(k);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let F,E=x==="rounded"?om(sm(C,t),5):v(C);const G=Array.isArray(t.style)?t.style:[t.style];let W=G.find(R=>R?.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let J=!1;if(t.look==="handDrawn"){const R=ut.svg(e);Object.assign([],C);const st=R.path(E,{roughness:.3,seed:h});L+=" transition",F=Et(st).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",G?G.reduce((gt,Tt)=>gt+";"+Tt,""):"");let tt=F.attr("d");F.attr("d",tt),e.node().appendChild(F.node())}else{const R=m.join(";"),st=G?G.reduce((bt,nt)=>bt+nt+";",""):"",tt=(R?R+";"+st+";":st)+";"+(G?G.reduce((bt,nt)=>bt+";"+nt,""):"");F=e.append("path").attr("d",E).attr("id",`${a}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",tt),W=tt.match(/stroke:([^;]+)/)?.[1],J=t.animate===!0||!!t.animation||R.includes("animation");const gt=F.node(),Tt=typeof gt.getTotalLength=="function"?gt.getTotalLength():0,wt=Su[t.arrowTypeStart]||0,vt=Su[t.arrowTypeEnd]||0;if(t.look==="neo"&&!J){const nt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Y_(Tt,wt,vt):`0 ${wt} ${Tt-wt-vt} ${vt}`}; stroke-dashoffset: 0;`;F.attr("style",nt+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",y),F.attr("data-look",oe(t.look)),t.showPoints&&C.forEach(R=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",R.x).attr("cy",R.y)});let I="";(It().flowchart.arrowMarkerAbsolute||It().state.arrowMarkerAbsolute)&&(I=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,I=I.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);const A=!J&&t?.look==="neo";O_(F,t,I,a,i,A,W);const P=Math.floor(l.length/2),B=l[P];be.isLabelCoordinateInPath(B,F.attr("d"))||(u=!0);let q={};return u&&(q.updatedPath=l),q.originalPath=t.points,q},"insertEdge");function om(e,t){if(e.length<2)return"";let r="";const i=e.length,o=1e-5;for(let s=0;s<i;s++){const a=e[s],n=e[s-1],h=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,l=a.y-n.y,u=h.x-a.x,d=h.y-a.y,f=Math.hypot(c,l),m=Math.hypot(u,d);if(f<o||m<o){r+=`L${a.x},${a.y}`;continue}const y=c/f,C=l/f,x=u/m,k=d/m,S=y*x+C*k,_=Math.max(-1,Math.min(1,S)),v=Math.acos(_);if(v<o||Math.abs(Math.PI-v)<o){r+=`L${a.x},${a.y}`;continue}const L=Math.min(t/Math.sin(v/2),f/2,m/2),F=a.x-y*L,E=a.y-C*L,G=a.x+x*L,W=a.y+k*L;r+=`L${F},${E}`,r+=`Q${a.x},${a.y} ${G},${W}`}}return r}p(om,"generateRoundedPath");function Gn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Gn,"calculateDeltaAndAngle");function sm(e,t){const r=e.map(o=>({...o}));if(e.length>=2&&xe[t.arrowTypeStart]){const o=xe[t.arrowTypeStart],s=e[0],a=e[1],{angle:n}=Gn(s,a),h=o*Math.cos(n),c=o*Math.sin(n);r[0].x=s.x+h,r[0].y=s.y+c}const i=e.length;if(i>=2&&xe[t.arrowTypeEnd]){const o=xe[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:n}=Gn(a,s),h=o*Math.cos(n),c=o*Math.sin(n);r[i-1].x=s.x-h,r[i-1].y=s.y-c}return r}p(sm,"applyMarkerOffsetsToPoints");var U_=p((e,t,r,i)=>{t.forEach(o=>{pv[o](e,r,i)})},"insertMarkers"),j_=p((e,t,r)=>{z.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),G_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),X_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),V_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Z_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),K_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Q_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),J_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),tv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),ev=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{transitionColor:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),rv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),iv=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),ov=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),sv=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),av=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),nv=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const h=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),lv=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),hv=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const h=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),cv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
265
+ L20,10
266
+ M20,10
267
+ L0,20`)},"requirement_arrow"),uv=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
268
+ L20,10
269
+ M20,10
270
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),dv=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),fv=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),pv={extension:j_,composition:G_,aggregation:X_,dependency:V_,lollipop:Z_,point:K_,circle:Q_,cross:J_,barb:tv,barbNeo:ev,only_one:rv,zero_or_one:iv,one_or_more:ov,zero_or_more:sv,only_one_neo:av,zero_or_one_neo:nv,one_or_more_neo:lv,zero_or_more_neo:hv,requirement_arrow:cv,requirement_contains:dv,requirement_arrow_neo:uv,requirement_contains_neo:fv},am=U_,gv="\0",Ur="\0",Bu="";class ia{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=fo(void 0),this._defaultEdgeLabelFn=fo(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ur]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return ys(t)||(t=fo(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return rr(this._nodes)}sources(){var t=this;return Zo(this.nodes(),function(r){return sc(t._in[r])})}sinks(){var t=this;return Zo(this.nodes(),function(r){return sc(t._out[r])})}setNodes(t,r){var i=arguments,o=this;return Wr(t,function(s){i.length>1?o.setNode(s,r):o.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Ur,this._children[t]={},this._children[Ur][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Wr(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),Wr(rr(this._in[t]),r),delete this._in[t],delete this._preds[t],Wr(rr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(mi(r))r=Ur;else{r+="";for(var i=r;!mi(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Ur)return r}}children(t){if(mi(t)&&(t=Ur),this._isCompound){var r=this._children[t];if(r)return rr(r)}else{if(t===Ur)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return rr(r)}successors(t){var r=this._sucs[t];if(r)return rr(r)}neighbors(t){var r=this.predecessors(t);if(r)return Pb(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;Wr(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),Wr(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var o={};function s(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(o[a]=n,n):n in o?o[n]:s(n)}return this._isCompound&&Wr(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return ys(t)||(t=fo(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return _a(this._edgeObjs)}setPath(t,r){var i=this,o=arguments;return Mb(t,function(s,a){return o.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var t,r,i,o,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(o=arguments[1],s=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(o=arguments[2],s=!0)),t=""+t,r=""+r,mi(i)||(i=""+i);var n=bo(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return s&&(this._edgeLabels[n]=o),this;if(!mi(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=s?o:this._defaultEdgeLabelFn(t,r,i);var h=mv(this._isDirected,t,r,i);return t=h.v,r=h.w,Object.freeze(h),this._edgeObjs[n]=h,Lu(this._preds[r],t),Lu(this._sucs[t],r),this._in[r][n]=h,this._out[t][n]=h,this._edgeCount++,this}edge(t,r,i){var o=arguments.length===1?Xa(this._isDirected,arguments[0]):bo(this._isDirected,t,r,i);return this._edgeLabels[o]}hasEdge(t,r,i){var o=arguments.length===1?Xa(this._isDirected,arguments[0]):bo(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,r,i){var o=arguments.length===1?Xa(this._isDirected,arguments[0]):bo(this._isDirected,t,r,i),s=this._edgeObjs[o];return s&&(t=s.v,r=s.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Fu(this._preds[r],t),Fu(this._sucs[t],r),delete this._in[r][o],delete this._out[t][o],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var o=_a(i);return r?Zo(o,function(s){return s.v===r}):o}}outEdges(t,r){var i=this._out[t];if(i){var o=_a(i);return r?Zo(o,function(s){return s.w===r}):o}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}ia.prototype._nodeCount=0;ia.prototype._edgeCount=0;function Lu(e,t){e[t]?e[t]++:e[t]=1}function Fu(e,t){--e[t]||delete e[t]}function bo(e,t,r,i){var o=""+t,s=""+r;if(!e&&o>s){var a=o;o=s,s=a}return o+Bu+s+Bu+(mi(i)?gv:i)}function mv(e,t,r,i){var o=""+t,s=""+r;if(!e&&o>s){var a=o;o=s,s=a}var n={v:o,w:s};return i&&(n.name=i),n}function Xa(e,t){return bo(e,t.v,t.w,t.name)}function nm(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),o=r.insert("g").attr("class",t),s=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:o,edgeLabels:s,nodes:a,rootGroups:r}}p(nm,"createLayoutElementGroups");async function lm(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await Ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}p(lm,"measureGroupLabel");async function hm(e,t,r){const i=await jl(e,t,r),o=i.node()?.getBBox()??{width:0,height:0};return t.width=o.width,t.height=o.height,i}p(hm,"insertMeasuredNode");async function cm(e,t){const r=new ia({multigraph:!0,compound:!0}),i=[...t.edges],o=It(),s=nm(e),{edgeLabels:a,nodes:n}=s,h=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async l=>{if(l.isGroup)c&&await lm(n,l),r.setNode(l.id,{...l});else{if(c){const u=await hm(n,l,{config:o,dir:l.dir});h.set(l.id,u)}r.setNode(l.id,{...l})}}));for(const l of i)c&&em(l)&&await Gl(a,l),r.setEdge(l.start,l.end,{...l},l.id),t.edges.some(d=>d.id===l.id)||t.edges.push(l);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:l}=await $t(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-INFHLROL-D7cx9va2.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3]),import.meta.url);l(e,t)}return{graph:r,groups:s,nodeElements:h}}p(cm,"createGraphWithElements");var Rt=new Map,Zr=new Map,um=new Map,yv=p(()=>{Zr.clear(),um.clear(),Rt.clear()},"clear"),$o=p((e,t)=>{const r=Zr.get(t)||[];return z.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Cv=p((e,t)=>{const r=Zr.get(t)||[];return z.info("Descendants of ",t," is ",r),z.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||$o(e.v,t)||$o(e.w,t)||r.includes(e.w):(z.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),dm=p((e,t,r,i)=>{z.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const o=t.children(e)||[];e!==i&&o.push(e),z.debug("Copying (nodes) clusterId",e,"nodes",o),o.forEach(s=>{if(t.children(s).length>0)dm(s,t,r,i);else{const a=t.node(s);z.info("cp ",s," to ",i," with parent ",e),r.setNode(s,a),i!==t.parent(s)&&(z.debug("Setting parent",s,t.parent(s)),r.setParent(s,t.parent(s))),e!==i&&s!==e?(z.debug("Setting parent",s,e),r.setParent(s,e)):(z.info("In copy ",e,"root",i,"data",t.node(e),i),z.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==i,"node!==clusterId",s!==e));const n=t.edges(s);z.debug("Copying Edges",n),n.forEach(h=>{z.info("Edge",h);const c=t.edge(h.v,h.w,h.name);z.info("Edge data",c,i);try{Cv(h,i)?(z.info("Copying as ",h.v,h.w,c,h.name),r.setEdge(h.v,h.w,c,h.name),z.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):z.info("Skipping copy of edge ",h.v,"-->",h.w," rootId: ",i," clusterId:",e)}catch(l){z.error(l)}})}z.debug("Removing node",s),t.removeNode(s)})},"copy"),fm=p((e,t)=>{const r=t.children(e);let i=[...r];for(const o of r)um.set(o,e),i=[...i,...fm(o,t)];return i},"extractDescendants"),xv=p((e,t,r)=>{const i=e.edges().filter(h=>h.v===t||h.w===t),o=e.edges().filter(h=>h.v===r||h.w===r),s=i.map(h=>({v:h.v===t?r:h.v,w:h.w===t?t:h.w})),a=o.map(h=>({v:h.v,w:h.w}));return s.filter(h=>a.some(c=>h.v===c.v&&h.w===c.w))},"findCommonEdges"),Rs=p((e,t,r)=>{const i=t.children(e);if(z.trace("Searching children of id ",e,i),i.length<1)return e;let o;for(const s of i){const a=Rs(s,t,r),n=xv(t,r,a);if(a)if(n.length>0)o=a;else return a}return o},"findNonClusterChild"),Au=p(e=>!Rt.has(e)||!Rt.get(e).externalConnections?e:Rt.has(e)?Rt.get(e).id:e,"getAnchorId"),BA=p((e,t)=>{if(!e||t>10){z.debug("Opting out, no graph ");return}else z.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(z.debug("Cluster identified",r," Replacement id in edges: ",Rs(r,e,r)),Zr.set(r,fm(r,e)),Rt.set(r,{id:Rs(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),o=e.edges();i.length>0?(z.debug("Cluster identified",r,Zr),o.forEach(s=>{const a=$o(s.v,r),n=$o(s.w,r);a^n&&(z.debug("Edge: ",s," leaves cluster ",r),z.debug("Descendants of XXX ",r,": ",Zr.get(r)),Rt.get(r).externalConnections=!0)})):z.debug("Not a cluster ",r,Zr)});for(let r of Rt.keys()){const i=Rt.get(r).id,o=e.parent(i);o!==r&&Rt.has(o)&&!Rt.get(o).externalConnections&&(Rt.get(r).id=o);const s=e.edges().some(a=>a.v===r);if(i&&Rt.get(r)?.externalConnections&&s&&mm(e,i,r)){const a=bv(e,r,e.parent(i));a&&(Rt.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);z.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),z.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let o=r.v,s=r.w;if(z.debug("Fix XXX",Rt,"ids:",r.v,r.w,"Translating: ",Rt.get(r.v)," --- ",Rt.get(r.w)),Rt.get(r.v)||Rt.get(r.w)){if(z.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),o=Au(r.v),s=Au(r.w),e.removeEdge(r.v,r.w,r.name),o!==r.v){const a=e.parent(o);Rt.get(a).externalConnections=!0,i.fromCluster=r.v}if(s!==r.w){const a=e.parent(s);Rt.get(a).externalConnections=!0,i.toCluster=r.w}z.debug("Fix Replacing with XXX",o,s,r.name),e.setEdge(o,s,i,r.name)}}),pm(e,0),z.trace(Rt)},"adjustClustersAndEdges"),pm=p((e,t)=>{if(t>10){z.error("Bailing out");return}let r=e.nodes(),i=!1;for(const o of r){const s=e.children(o);i=i||s.length>0}if(!i){z.debug("Done, no node has children",e.nodes());return}z.debug("Nodes = ",r,t);for(const o of r)if(z.debug("Extracting node",o,Rt,Rt.has(o)&&!Rt.get(o).externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!Rt.has(o))z.debug("Not a cluster",o,t);else if(!Rt.get(o).externalConnections&&e.children(o)&&e.children(o).length>0){z.debug("Cluster without external connections, without a parent and with children",o,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Rt.get(o)?.clusterData?.dir&&(a=Rt.get(o).clusterData.dir,z.debug("Fixing dir",Rt.get(o).clusterData.dir,a));const n=new ia({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});dm(o,e,n,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:Rt.get(o).clusterData,label:Rt.get(o).label,graph:n})}else z.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!Rt.get(o).externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),z.debug(Rt);r=e.nodes(),z.debug("New list of nodes",r);for(const o of r){const s=e.node(o);z.debug(" Now next level",o,s),s?.clusterNode&&pm(s.graph,t+1)}},"extractor"),gm=p((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const o=e.children(i),s=gm(e,o);r=[...r,...s]}),r},"sorter"),LA=p(e=>gm(e,e.children()),"sortNodesByHierarchy"),mm=p((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const o=Rt.get(i);if(o&&!o.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),bv=p((e,t,r)=>{const i=e.children(t)??[];for(const o of i){if(o===r||$o(o,r))continue;const s=Rs(o,e,t);if(s&&!mm(e,s,t))return s}return null},"findSafeAnchorNode");function ym({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:o,paintOptions:s}){const a=t??Vl;return p(async function(h,c,l,u){const d=c.select("g");(l?.insertMarkers??am)(d,h.markers,h.type,h.diagramId),Xl();const f={element:d,helpers:l,options:u};f.preparedLayout=await e?.(h,f);const m=await a(h,f),y=await r(h,f),C={...f,measure:m};i?await i(h,C,y):await Zl(h,C,s),await o?.(h,C,y)},"render")}p(ym,"createCommonLayoutRenderer");function Xl(){w_(),R_(),M_(),yv()}p(Xl,"clearLayoutRenderState");async function Vl(e,{element:t}){return await cm(t,e)}p(Vl,"defaultMeasureLayout");async function Zl(e,t,r={}){const{measure:i}=t,{groups:o}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await Cm(o,a,t,r);const s=bm(e.nodes);for(const a of e.edges)km(a,r)||await Tm(o,a,s,e,r,t)}p(Zl,"paintLayoutData");async function Cm(e,t,r,i){t.clusterNode?Tu(t):xm(t,r,i)?await tm(e.clusters,t):Tu(t)}p(Cm,"paintLayoutNode");function xm(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}p(xm,"shouldPaintAsCluster");function bm(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}p(bm,"buildNodeLookup");function km(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}p(km,"shouldSkipPaintEdge");async function Tm(e,t,r,i,o,s){const a=im(e.edgePaths,{...t},o.clusterDb??new Map,i.type,Xn(t.start,t,r,s,o),Xn(t.end,t,r,s,o),i.diagramId,Sm(t,o));em(t)&&(Yi.has(t.id)||await Gl(e.edgeLabels,t),wm(t,a))}p(Tm,"paintLayoutEdge");function Xn(e,t,r,i,o){return o.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}p(Xn,"getRenderedNode");function Sm(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}p(Sm,"shouldSkipIntersect");function wm(e,t){const r=t?.updatedPath??t?.originalPath,i=Vt(),{subGraphTitleTotalMargin:o}=ea({flowchart:i.flowchart??{}});if(e.label){const s=Yi.get(e.id);let a=e.x,n=e.y;if(r){const h=be.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",a,",",n,") to (",h.x,",",h.y,") abc88"),t?.updatedPath&&(a=h.x,n=h.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e?.startLabelLeft){const s=Jt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const h=be.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=h.x,n=h.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Jt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const h=be.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=h.x,n=h.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Jt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const h=be.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=h.x,n=h.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Jt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const h=be.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=h.x,n=h.y}s.attr("transform",`translate(${a}, ${n})`)}}p(wm,"positionRenderedEdgeLabel");function _m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(_m,"getDefaultExportFromCjs");var me={},as={},Mr={},Eu;function Vi(){if(Eu)return Mr;Eu=1;function e(a){return typeof a>"u"||a===null}p(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}p(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}p(r,"toArray");function i(a,n){if(n){const h=Object.keys(n);for(let c=0,l=h.length;c<l;c+=1){const u=h[c];a[u]=n[u]}}return a}p(i,"extend");function o(a,n){let h="";for(let c=0;c<n;c+=1)h+=a;return h}p(o,"repeat");function s(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return p(s,"isNegativeZero"),Mr.isNothing=e,Mr.isObject=t,Mr.toArray=r,Mr.repeat=o,Mr.isNegativeZero=s,Mr.extend=i,Mr}p(Vi,"requireCommon");var Va,Mu;function Zi(){if(Mu)return Va;Mu=1;function e(r,i){let o="";const s=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(o+='in "'+r.mark.name+'" '),o+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(o+=`
271
+
272
+ `+r.mark.snippet),s+" "+o):s}p(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),Va=t,Va}p(Zi,"requireException");var Za,$u;function vm(){if($u)return Za;$u=1;const e=Vi();function t(o,s,a,n,h){let c="",l="";const u=Math.floor(h/2)-1;return n-s>u&&(c=" ... ",s=n-u+c.length),a-n>u&&(l=" ...",a=n+u-l.length),{str:c+o.slice(s,a).replace(/\t/g,"→")+l,pos:n-s+c.length}}p(t,"getLine");function r(o,s){return e.repeat(" ",s-o.length)+o}p(r,"padStart");function i(o,s){if(s=Object.create(s||null),!o.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],h=[];let c,l=-1;for(;c=a.exec(o.buffer);)h.push(c.index),n.push(c.index+c[0].length),o.position<=c.index&&l<0&&(l=n.length-2);l<0&&(l=n.length-1);let u="";const d=Math.min(o.line+s.linesAfter,h.length).toString().length,f=s.maxLength-(s.indent+d+3);for(let y=1;y<=s.linesBefore&&!(l-y<0);y++){const C=t(o.buffer,n[l-y],h[l-y],o.position-(n[l]-n[l-y]),f);u=e.repeat(" ",s.indent)+r((o.line-y+1).toString(),d)+" | "+C.str+`
273
+ `+u}const m=t(o.buffer,n[l],h[l],o.position,f);u+=e.repeat(" ",s.indent)+r((o.line+1).toString(),d)+" | "+m.str+`
274
+ `,u+=e.repeat("-",s.indent+d+3+m.pos)+`^
275
+ `;for(let y=1;y<=s.linesAfter&&!(l+y>=h.length);y++){const C=t(o.buffer,n[l+y],h[l+y],o.position-(n[l]-n[l+y]),f);u+=e.repeat(" ",s.indent)+r((o.line+y+1).toString(),d)+" | "+C.str+`
276
+ `}return u.replace(/\n$/,"")}return p(i,"makeSnippet"),Za=i,Za}p(vm,"requireSnippet");var Ka,Ou;function Te(){if(Ou)return Ka;Ou=1;const e=Zi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(s){const a={};return s!==null&&Object.keys(s).forEach(function(n){s[n].forEach(function(h){a[String(h)]=n})}),a}p(i,"compileStyleAliases");function o(s,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+s+'" YAML type.')}),this.options=a,this.tag=s,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return p(o,"Type2"),Ka=o,Ka}p(Te,"requireType");var Qa,Du;function Kl(){if(Du)return Qa;Du=1;const e=Zi(),t=Te();function r(s,a){const n=[];return s[a].forEach(function(h){let c=n.length;n.forEach(function(l,u){l.tag===h.tag&&l.kind===h.kind&&l.multi===h.multi&&(c=u)}),n[c]=h}),n}p(r,"compileList");function i(){const s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(s.multi[n.kind].push(n),s.multi.fallback.push(n)):s[n.kind][n.tag]=s.fallback[n.tag]=n}p(a,"collectType");for(let n=0,h=arguments.length;n<h;n+=1)arguments[n].forEach(a);return s}p(i,"compileMap");function o(s){return this.extend(s)}return p(o,"Schema2"),o.prototype.extend=p(function(a){let n=[],h=[];if(a instanceof t)h.push(a);else if(Array.isArray(a))h=h.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(h=h.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),h.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(o.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(h),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),Qa=o,Qa}p(Kl,"requireSchema");var Ja,Iu;function Ql(){if(Iu)return Ja;Iu=1;const e=Te();return Ja=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),Ja}p(Ql,"requireStr");var tn,Pu;function Jl(){if(Pu)return tn;Pu=1;const e=Te();return tn=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),tn}p(Jl,"requireSeq");var en,Ru;function th(){if(Ru)return en;Ru=1;const e=Te();return en=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),en}p(th,"requireMap");var rn,Nu;function eh(){if(Nu)return rn;Nu=1;const e=Kl();return rn=new e({explicit:[Ql(),Jl(),th()]}),rn}p(eh,"requireFailsafe");var on,qu;function rh(){if(qu)return on;qu=1;const e=Te();function t(o){if(o===null)return!0;const s=o.length;return s===1&&o==="~"||s===4&&(o==="null"||o==="Null"||o==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(o){return o===null}return p(i,"isNull"),on=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),on}p(rh,"require_null");var sn,zu;function ih(){if(zu)return sn;zu=1;const e=Te();function t(o){if(o===null)return!1;const s=o.length;return s===4&&(o==="true"||o==="True"||o==="TRUE")||s===5&&(o==="false"||o==="False"||o==="FALSE")}p(t,"resolveYamlBoolean");function r(o){return o==="true"||o==="True"||o==="TRUE"}p(r,"constructYamlBoolean");function i(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return p(i,"isBoolean"),sn=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(o){return o?"true":"false"},"lowercase"),uppercase:p(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),sn}p(ih,"requireBool");var an,Wu;function oh(){if(Wu)return an;Wu=1;const e=Vi(),t=Te();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}p(r,"isHexCode");function i(c){return c>=48&&c<=55}p(i,"isOctCode");function o(c){return c>=48&&c<=57}p(o,"isDecCode");function s(c){if(c===null)return!1;const l=c.length;let u=0,d=!1;if(!l)return!1;let f=c[u];if((f==="-"||f==="+")&&(f=c[++u]),f==="0"){if(u+1===l)return!0;if(f=c[++u],f==="b"){for(u++;u<l;u++){if(f=c[u],f!=="0"&&f!=="1")return!1;d=!0}return d&&isFinite(a(c))}if(f==="x"){for(u++;u<l;u++){if(!r(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(a(c))}if(f==="o"){for(u++;u<l;u++){if(!i(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(a(c))}}for(;u<l;u++){if(!o(c.charCodeAt(u)))return!1;d=!0}return d?isFinite(a(c)):!1}p(s,"resolveYamlInteger");function a(c){let l=c,u=1,d=l[0];if((d==="-"||d==="+")&&(d==="-"&&(u=-1),l=l.slice(1),d=l[0]),l==="0")return 0;if(d==="0"){if(l[1]==="b")return u*parseInt(l.slice(2),2);if(l[1]==="x")return u*parseInt(l.slice(2),16);if(l[1]==="o")return u*parseInt(l.slice(2),8)}return u*parseInt(l,10)}p(a,"parseYamlInteger");function n(c){return a(c)}p(n,"constructYamlInteger");function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return p(h,"isInteger"),an=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:n,predicate:h,represent:{binary:p(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:p(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:p(function(c){return c.toString(10)},"decimal"),hexadecimal:p(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),an}p(oh,"requireInt");var nn,Hu;function sh(){if(Hu)return nn;Hu=1;const e=Vi(),t=Te(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}p(o,"resolveYamlFloat");function s(c){let l=c.toLowerCase();const u=l[0]==="-"?-1:1;return"+-".indexOf(l[0])>=0&&(l=l.slice(1)),l===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:l===".nan"?NaN:u*parseFloat(l,10)}p(s,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,l){if(isNaN(c))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(l){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const u=c.toString(10);return a.test(u)?u.replace("e",".e"):u}p(n,"representYamlFloat");function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return p(h,"isFloat"),nn=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:s,predicate:h,represent:n,defaultStyle:"lowercase"}),nn}p(sh,"requireFloat");var ln,Yu;function ah(){return Yu||(Yu=1,ln=eh().extend({implicit:[rh(),ih(),oh(),sh()]})),ln}p(ah,"requireJson");var hn,Uu;function nh(){return Uu||(Uu=1,hn=ah()),hn}p(nh,"requireCore");var cn,ju;function lh(){if(ju)return cn;ju=1;const e=Te(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}p(i,"resolveYamlTimestamp");function o(a){let n=0,h=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const l=+c[1],u=+c[2]-1,d=+c[3];if(!c[4])return new Date(Date.UTC(l,u,d));const f=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const x=+c[10],k=+(c[11]||0);h=(x*60+k)*6e4,c[9]==="-"&&(h=-h)}const C=new Date(Date.UTC(l,u,d,f,m,y,n));return h&&C.setTime(C.getTime()-h),C}p(o,"constructYamlTimestamp");function s(a){return a.toISOString()}return p(s,"representYamlTimestamp"),cn=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:o,instanceOf:Date,represent:s}),cn}p(lh,"requireTimestamp");var un,Gu;function hh(){if(Gu)return un;Gu=1;const e=Te();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),un=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),un}p(hh,"requireMerge");var dn,Xu;function ch(){if(Xu)return dn;Xu=1;const e=Te(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
277
+ \r`;function r(a){if(a===null)return!1;let n=0;const h=a.length,c=t;for(let l=0;l<h;l++){const u=c.indexOf(a.charAt(l));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}p(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),h=n.length,c=t;let l=0;const u=[];for(let f=0;f<h;f++)f%4===0&&f&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|c.indexOf(n.charAt(f));const d=h%4*6;return d===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):d===18?(u.push(l>>10&255),u.push(l>>2&255)):d===12&&u.push(l>>4&255),new Uint8Array(u)}p(i,"constructYamlBinary");function o(a){let n="",h=0;const c=a.length,l=t;for(let d=0;d<c;d++)d%3===0&&d&&(n+=l[h>>18&63],n+=l[h>>12&63],n+=l[h>>6&63],n+=l[h&63]),h=(h<<8)+a[d];const u=c%3;return u===0?(n+=l[h>>18&63],n+=l[h>>12&63],n+=l[h>>6&63],n+=l[h&63]):u===2?(n+=l[h>>10&63],n+=l[h>>4&63],n+=l[h<<2&63],n+=l[64]):u===1&&(n+=l[h>>2&63],n+=l[h<<4&63],n+=l[64],n+=l[64]),n}p(o,"representYamlBinary");function s(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return p(s,"isBinary"),dn=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o}),dn}p(ch,"requireBinary");var fn,Vu;function uh(){if(Vu)return fn;Vu=1;const e=Te(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(s){if(s===null)return!0;const a=[],n=s;for(let h=0,c=n.length;h<c;h+=1){const l=n[h];let u=!1;if(r.call(l)!=="[object Object]")return!1;let d;for(d in l)if(t.call(l,d))if(!u)u=!0;else return!1;if(!u)return!1;if(a.indexOf(d)===-1)a.push(d);else return!1}return!0}p(i,"resolveYamlOmap");function o(s){return s!==null?s:[]}return p(o,"constructYamlOmap"),fn=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:o}),fn}p(uh,"requireOmap");var pn,Zu;function dh(){if(Zu)return pn;Zu=1;const e=Te(),t=Object.prototype.toString;function r(o){if(o===null)return!0;const s=o,a=new Array(s.length);for(let n=0,h=s.length;n<h;n+=1){const c=s[n];if(t.call(c)!=="[object Object]")return!1;const l=Object.keys(c);if(l.length!==1)return!1;a[n]=[l[0],c[l[0]]]}return!0}p(r,"resolveYamlPairs");function i(o){if(o===null)return[];const s=o,a=new Array(s.length);for(let n=0,h=s.length;n<h;n+=1){const c=s[n],l=Object.keys(c);a[n]=[l[0],c[l[0]]]}return a}return p(i,"constructYamlPairs"),pn=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),pn}p(dh,"requirePairs");var gn,Ku;function fh(){if(Ku)return gn;Ku=1;const e=Te(),t=Object.prototype.hasOwnProperty;function r(o){if(o===null)return!0;const s=o;for(const a in s)if(t.call(s,a)&&s[a]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(o){return o!==null?o:{}}return p(i,"constructYamlSet"),gn=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),gn}p(fh,"requireSet");var mn,Qu;function oa(){return Qu||(Qu=1,mn=nh().extend({implicit:[lh(),hh()],explicit:[ch(),uh(),dh(),fh()]})),mn}p(oa,"require_default");var Ju;function Bm(){if(Ju)return as;Ju=1;const e=Vi(),t=Zi(),r=vm(),i=oa(),o=Object.prototype.hasOwnProperty,s=1,a=2,n=3,h=4,c=1,l=2,u=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(g){return Object.prototype.toString.call(g)}p(x,"_class");function k(g){return g===10||g===13}p(k,"isEol");function S(g){return g===9||g===32}p(S,"isWhiteSpace");function _(g){return g===9||g===32||g===10||g===13}p(_,"isWsOrEol");function v(g){return g===44||g===91||g===93||g===123||g===125}p(v,"isFlowIndicator");function L(g){if(g>=48&&g<=57)return g-48;const O=g|32;return O>=97&&O<=102?O-97+10:-1}p(L,"fromHexCode");function F(g){return g===120?2:g===117?4:g===85?8:0}p(F,"escapedHexLen");function E(g){return g>=48&&g<=57?g-48:-1}p(E,"fromDecimalCode");function G(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
278
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}p(G,"simpleEscapeSequence");function W(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}p(W,"charFromCodepoint");function D(g,O,j){O==="__proto__"?Object.defineProperty(g,O,{configurable:!0,enumerable:!0,writable:!0,value:j}):g[O]=j}p(D,"setProperty");const J=new Array(256),I=new Array(256);for(let g=0;g<256;g++)J[g]=G(g)?1:0,I[g]=G(g);function A(g,O){this.input=g,this.filename=O.filename||null,this.schema=O.schema||i,this.onWarning=O.onWarning||null,this.legacy=O.legacy||!1,this.json=O.json||!1,this.listener=O.listener||null,this.maxDepth=typeof O.maxDepth=="number"?O.maxDepth:100,this.maxTotalMergeKeys=typeof O.maxTotalMergeKeys=="number"?O.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p(A,"State");function P(g,O){const j={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return j.snippet=r(j),new t(O,j)}p(P,"generateError");function B(g,O){throw P(g,O)}p(B,"throwError");function q(g,O){g.onWarning&&g.onWarning.call(null,P(g,O))}p(q,"throwWarning");function R(g,O,j){const V=g.anchorMapTransactions;if(V.length!==0){const U=V[V.length-1];o.call(U,O)||(U[O]={existed:o.call(g.anchorMap,O),value:g.anchorMap[O]})}g.anchorMap[O]=j}p(R,"storeAnchor");function st(g){g.anchorMapTransactions.push(Object.create(null))}p(st,"beginAnchorTransaction");function tt(g){const O=g.anchorMapTransactions.pop(),j=g.anchorMapTransactions;if(j.length===0)return;const V=j[j.length-1],U=Object.keys(O);for(let at=0,T=U.length;at<T;at+=1){const N=U[at];o.call(V,N)||(V[N]=O[N])}}p(tt,"commitAnchorTransaction");function gt(g){const O=g.anchorMapTransactions.pop(),j=Object.keys(O);for(let V=j.length-1;V>=0;V-=1){const U=O[j[V]];U.existed?g.anchorMap[j[V]]=U.value:delete g.anchorMap[j[V]]}}p(gt,"rollbackAnchorTransaction");function Tt(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}p(Tt,"snapshotState");function wt(g,O){g.position=O.position,g.line=O.line,g.lineStart=O.lineStart,g.lineIndent=O.lineIndent,g.firstTabInLine=O.firstTabInLine,g.tag=O.tag,g.anchor=O.anchor,g.kind=O.kind,g.result=O.result}p(wt,"restoreState");const vt={YAML:p(function(O,j,V){O.version!==null&&B(O,"duplication of %YAML directive"),V.length!==1&&B(O,"YAML directive accepts exactly one argument");const U=/^([0-9]+)\.([0-9]+)$/.exec(V[0]);U===null&&B(O,"ill-formed argument of the YAML directive");const at=parseInt(U[1],10),T=parseInt(U[2],10);at!==1&&B(O,"unacceptable YAML version of the document"),O.version=V[0],O.checkLineBreaks=T<2,T!==1&&T!==2&&q(O,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(O,j,V){let U;V.length!==2&&B(O,"TAG directive accepts exactly two arguments");const at=V[0];U=V[1],y.test(at)||B(O,"ill-formed tag handle (first argument) of the TAG directive"),o.call(O.tagMap,at)&&B(O,'there is a previously declared suffix for "'+at+'" tag handle'),C.test(U)||B(O,"ill-formed tag prefix (second argument) of the TAG directive");try{U=decodeURIComponent(U)}catch{B(O,"tag prefix is malformed: "+U)}O.tagMap[at]=U},"handleTagDirective")};function bt(g,O,j,V){if(O<j){const U=g.input.slice(O,j);if(V)for(let at=0,T=U.length;at<T;at+=1){const N=U.charCodeAt(at);N===9||N>=32&&N<=1114111||B(g,"expected valid JSON character")}else d.test(U)&&B(g,"the stream contains non-printable characters");g.result+=U}}p(bt,"captureSegment");function nt(g,O,j,V){e.isObject(j)||B(g,"cannot merge mappings; the provided source object is unacceptable");const U=Object.keys(j);for(let at=0,T=U.length;at<T;at+=1){const N=U[at];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&B(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),o.call(O,N)||(D(O,N,j[N]),V[N]=!0)}}p(nt,"mergeMappings");function St(g,O,j,V,U,at,T,N,et){if(Array.isArray(U)){U=Array.prototype.slice.call(U);for(let X=0,Z=U.length;X<Z;X+=1)Array.isArray(U[X])&&B(g,"nested arrays are not supported inside keys"),typeof U=="object"&&x(U[X])==="[object Object]"&&(U[X]="[object Object]")}if(typeof U=="object"&&x(U)==="[object Object]"&&(U="[object Object]"),U=String(U),O===null&&(O={}),V==="tag:yaml.org,2002:merge")if(Array.isArray(at))for(let X=0,Z=at.length;X<Z;X+=1)nt(g,O,at[X],j);else nt(g,O,at,j);else!g.json&&!o.call(j,U)&&o.call(O,U)&&(g.line=T||g.line,g.lineStart=N||g.lineStart,g.position=et||g.position,B(g,"duplicated mapping key")),D(O,U,at),delete j[U];return O}p(St,"storeMappingPair");function Ot(g){const O=g.input.charCodeAt(g.position);O===10?g.position++:O===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):B(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}p(Ot,"readLineBreak");function _t(g,O,j){let V=0,U=g.input.charCodeAt(g.position);for(;U!==0;){for(;S(U);)U===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),U=g.input.charCodeAt(++g.position);if(O&&U===35)do U=g.input.charCodeAt(++g.position);while(U!==10&&U!==13&&U!==0);if(k(U))for(Ot(g),U=g.input.charCodeAt(g.position),V++,g.lineIndent=0;U===32;)g.lineIndent++,U=g.input.charCodeAt(++g.position);else break}return j!==-1&&V!==0&&g.lineIndent<j&&q(g,"deficient indentation"),V}p(_t,"skipSeparationSpace");function Pt(g){let O=g.position,j=g.input.charCodeAt(O);return!!((j===45||j===46)&&j===g.input.charCodeAt(O+1)&&j===g.input.charCodeAt(O+2)&&(O+=3,j=g.input.charCodeAt(O),j===0||_(j)))}p(Pt,"testDocumentSeparator");function qt(g,O){O===1?g.result+=" ":O>1&&(g.result+=e.repeat(`
279
+ `,O-1))}p(qt,"writeFoldedLines");function he(g,O,j){let V,U,at,T,N,et;const X=g.kind,Z=g.result;let ot=g.input.charCodeAt(g.position);if(_(ot)||v(ot)||ot===35||ot===38||ot===42||ot===33||ot===124||ot===62||ot===39||ot===34||ot===37||ot===64||ot===96)return!1;if(ot===63||ot===45){const rt=g.input.charCodeAt(g.position+1);if(_(rt)||j&&v(rt))return!1}for(g.kind="scalar",g.result="",V=U=g.position,at=!1;ot!==0;){if(ot===58){const rt=g.input.charCodeAt(g.position+1);if(_(rt)||j&&v(rt))break}else if(ot===35){const rt=g.input.charCodeAt(g.position-1);if(_(rt))break}else{if(g.position===g.lineStart&&Pt(g)||j&&v(ot))break;if(k(ot))if(T=g.line,N=g.lineStart,et=g.lineIndent,_t(g,!1,-1),g.lineIndent>=O){at=!0,ot=g.input.charCodeAt(g.position);continue}else{g.position=U,g.line=T,g.lineStart=N,g.lineIndent=et;break}}at&&(bt(g,V,U,!1),qt(g,g.line-T),V=U=g.position,at=!1),S(ot)||(U=g.position+1),ot=g.input.charCodeAt(++g.position)}return bt(g,V,U,!1),g.result?!0:(g.kind=X,g.result=Z,!1)}p(he,"readPlainScalar");function _e(g,O){let j,V,U=g.input.charCodeAt(g.position);if(U!==39)return!1;for(g.kind="scalar",g.result="",g.position++,j=V=g.position;(U=g.input.charCodeAt(g.position))!==0;)if(U===39)if(bt(g,j,g.position,!0),U=g.input.charCodeAt(++g.position),U===39)j=g.position,g.position++,V=g.position;else return!0;else k(U)?(bt(g,j,V,!0),qt(g,_t(g,!1,O)),j=V=g.position):g.position===g.lineStart&&Pt(g)?B(g,"unexpected end of the document within a single quoted scalar"):(g.position++,S(U)||(V=g.position));B(g,"unexpected end of the stream within a single quoted scalar")}p(_e,"readSingleQuotedScalar");function De(g,O){let j,V,U,at=g.input.charCodeAt(g.position);if(at!==34)return!1;for(g.kind="scalar",g.result="",g.position++,j=V=g.position;(at=g.input.charCodeAt(g.position))!==0;){if(at===34)return bt(g,j,g.position,!0),g.position++,!0;if(at===92){if(bt(g,j,g.position,!0),at=g.input.charCodeAt(++g.position),k(at))_t(g,!1,O);else if(at<256&&J[at])g.result+=I[at],g.position++;else if((U=F(at))>0){let T=U,N=0;for(;T>0;T--)at=g.input.charCodeAt(++g.position),(U=L(at))>=0?N=(N<<4)+U:B(g,"expected hexadecimal character");g.result+=W(N),g.position++}else B(g,"unknown escape sequence");j=V=g.position}else k(at)?(bt(g,j,V,!0),qt(g,_t(g,!1,O)),j=V=g.position):g.position===g.lineStart&&Pt(g)?B(g,"unexpected end of the document within a double quoted scalar"):(g.position++,S(at)||(V=g.position))}B(g,"unexpected end of the stream within a double quoted scalar")}p(De,"readDoubleQuotedScalar");function wr(g,O){let j=!0,V,U,at;const T=g.tag;let N;const et=g.anchor;let X,Z,ot,rt;const dt=Object.create(null);let ht,mt,yt,Mt=g.input.charCodeAt(g.position);if(Mt===91)X=93,rt=!1,N=[];else if(Mt===123)X=125,rt=!0,N={};else return!1;for(g.anchor!==null&&R(g,g.anchor,N),Mt=g.input.charCodeAt(++g.position);Mt!==0;){if(_t(g,!0,O),Mt=g.input.charCodeAt(g.position),Mt===X)return g.position++,g.tag=T,g.anchor=et,g.kind=rt?"mapping":"sequence",g.result=N,!0;if(j?Mt===44&&B(g,"expected the node content, but found ','"):B(g,"missed comma between flow collection entries"),mt=ht=yt=null,Z=ot=!1,Mt===63){const jt=g.input.charCodeAt(g.position+1);_(jt)&&(Z=ot=!0,g.position++,_t(g,!0,O))}V=g.line,U=g.lineStart,at=g.position,ee(g,O,s,!1,!0),mt=g.tag,ht=g.result,_t(g,!0,O),Mt=g.input.charCodeAt(g.position),(ot||g.line===V)&&Mt===58&&(Z=!0,Mt=g.input.charCodeAt(++g.position),_t(g,!0,O),ee(g,O,s,!1,!0),yt=g.result),rt?St(g,N,dt,mt,ht,yt,V,U,at):Z?N.push(St(g,null,dt,mt,ht,yt,V,U,at)):N.push(ht),_t(g,!0,O),Mt=g.input.charCodeAt(g.position),Mt===44?(j=!0,Mt=g.input.charCodeAt(++g.position)):j=!1}B(g,"unexpected end of the stream within a flow collection")}p(wr,"readFlowCollection");function Yt(g,O){let j,V=c,U=!1,at=!1,T=O,N=0,et=!1,X,Z=g.input.charCodeAt(g.position);if(Z===124)j=!1;else if(Z===62)j=!0;else return!1;for(g.kind="scalar",g.result="";Z!==0;)if(Z=g.input.charCodeAt(++g.position),Z===43||Z===45)c===V?V=Z===43?u:l:B(g,"repeat of a chomping mode identifier");else if((X=E(Z))>=0)X===0?B(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):at?B(g,"repeat of an indentation width identifier"):(T=O+X-1,at=!0);else break;if(S(Z)){do Z=g.input.charCodeAt(++g.position);while(S(Z));if(Z===35)do Z=g.input.charCodeAt(++g.position);while(!k(Z)&&Z!==0)}for(;Z!==0;){for(Ot(g),g.lineIndent=0,Z=g.input.charCodeAt(g.position);(!at||g.lineIndent<T)&&Z===32;)g.lineIndent++,Z=g.input.charCodeAt(++g.position);if(!at&&g.lineIndent>T&&(T=g.lineIndent),k(Z)){N++;continue}if(!at&&T===0&&B(g,"missing indentation for block scalar"),g.lineIndent<T){V===u?g.result+=e.repeat(`
280
+ `,U?1+N:N):V===c&&U&&(g.result+=`
281
+ `);break}j?S(Z)?(et=!0,g.result+=e.repeat(`
282
+ `,U?1+N:N)):et?(et=!1,g.result+=e.repeat(`
283
+ `,N+1)):N===0?U&&(g.result+=" "):g.result+=e.repeat(`
284
+ `,N):g.result+=e.repeat(`
285
+ `,U?1+N:N),U=!0,at=!0,N=0;const ot=g.position;for(;!k(Z)&&Z!==0;)Z=g.input.charCodeAt(++g.position);bt(g,ot,g.position,!1)}return!0}p(Yt,"readBlockScalar");function ve(g,O){const j=g.tag,V=g.anchor,U=[];let at=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&R(g,g.anchor,U);let T=g.input.charCodeAt(g.position);for(;T!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,B(g,"tab characters must not be used in indentation")),T===45);){const N=g.input.charCodeAt(g.position+1);if(!_(N))break;if(at=!0,g.position++,_t(g,!0,-1)&&g.lineIndent<=O){U.push(null),T=g.input.charCodeAt(g.position);continue}const et=g.line;if(ee(g,O,n,!1,!0),U.push(g.result),_t(g,!0,-1),T=g.input.charCodeAt(g.position),(g.line===et||g.lineIndent>O)&&T!==0)B(g,"bad indentation of a sequence entry");else if(g.lineIndent<O)break}return at?(g.tag=j,g.anchor=V,g.kind="sequence",g.result=U,!0):!1}p(ve,"readBlockSequence");function Ht(g,O,j){let V,U,at,T;const N=g.tag,et=g.anchor,X={},Z=Object.create(null);let ot=null,rt=null,dt=null,ht=!1,mt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&R(g,g.anchor,X);let yt=g.input.charCodeAt(g.position);for(;yt!==0;){!ht&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,B(g,"tab characters must not be used in indentation"));const Mt=g.input.charCodeAt(g.position+1),jt=g.line;if((yt===63||yt===58)&&_(Mt))yt===63?(ht&&(St(g,X,Z,ot,rt,null,U,at,T),ot=rt=dt=null),mt=!0,ht=!0,V=!0):ht?(ht=!1,V=!0):B(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,yt=Mt;else{if(U=g.line,at=g.lineStart,T=g.position,!ee(g,j,a,!1,!0))break;if(g.line===jt){for(yt=g.input.charCodeAt(g.position);S(yt);)yt=g.input.charCodeAt(++g.position);if(yt===58)yt=g.input.charCodeAt(++g.position),_(yt)||B(g,"a whitespace character is expected after the key-value separator within a block mapping"),ht&&(St(g,X,Z,ot,rt,null,U,at,T),ot=rt=dt=null),mt=!0,ht=!1,V=!1,ot=g.tag,rt=g.result;else if(mt)B(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=N,g.anchor=et,!0}else if(mt)B(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=N,g.anchor=et,!0}if((g.line===jt||g.lineIndent>O)&&(ht&&(U=g.line,at=g.lineStart,T=g.position),ee(g,O,h,!0,V)&&(ht?rt=g.result:dt=g.result),ht||(St(g,X,Z,ot,rt,dt,U,at,T),ot=rt=dt=null),_t(g,!0,-1),yt=g.input.charCodeAt(g.position)),(g.line===jt||g.lineIndent>O)&&yt!==0)B(g,"bad indentation of a mapping entry");else if(g.lineIndent<O)break}return ht&&St(g,X,Z,ot,rt,null,U,at,T),mt&&(g.tag=N,g.anchor=et,g.kind="mapping",g.result=X),mt}p(Ht,"readBlockMapping");function hr(g){let O=!1,j=!1,V,U,at=g.input.charCodeAt(g.position);if(at!==33)return!1;g.tag!==null&&B(g,"duplication of a tag property"),at=g.input.charCodeAt(++g.position),at===60?(O=!0,at=g.input.charCodeAt(++g.position)):at===33?(j=!0,V="!!",at=g.input.charCodeAt(++g.position)):V="!";let T=g.position;if(O){do at=g.input.charCodeAt(++g.position);while(at!==0&&at!==62);g.position<g.length?(U=g.input.slice(T,g.position),at=g.input.charCodeAt(++g.position)):B(g,"unexpected end of the stream within a verbatim tag")}else{for(;at!==0&&!_(at);)at===33&&(j?B(g,"tag suffix cannot contain exclamation marks"):(V=g.input.slice(T-1,g.position+1),y.test(V)||B(g,"named tag handle cannot contain such characters"),j=!0,T=g.position+1)),at=g.input.charCodeAt(++g.position);U=g.input.slice(T,g.position),m.test(U)&&B(g,"tag suffix cannot contain flow indicator characters")}U&&!C.test(U)&&B(g,"tag name cannot contain such characters: "+U);try{U=decodeURIComponent(U)}catch{B(g,"tag name is malformed: "+U)}return O?g.tag=U:o.call(g.tagMap,V)?g.tag=g.tagMap[V]+U:V==="!"?g.tag="!"+U:V==="!!"?g.tag="tag:yaml.org,2002:"+U:B(g,'undeclared tag handle "'+V+'"'),!0}p(hr,"readTagProperty");function ce(g){let O=g.input.charCodeAt(g.position);if(O!==38)return!1;g.anchor!==null&&B(g,"duplication of an anchor property"),O=g.input.charCodeAt(++g.position);const j=g.position;for(;O!==0&&!_(O)&&!v(O);)O=g.input.charCodeAt(++g.position);return g.position===j&&B(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(j,g.position),!0}p(ce,"readAnchorProperty");function Ie(g){let O=g.input.charCodeAt(g.position);if(O!==42)return!1;O=g.input.charCodeAt(++g.position);const j=g.position;for(;O!==0&&!_(O)&&!v(O);)O=g.input.charCodeAt(++g.position);g.position===j&&B(g,"name of an alias node must contain at least one character");const V=g.input.slice(j,g.position);return o.call(g.anchorMap,V)||B(g,'unidentified alias "'+V+'"'),g.result=g.anchorMap[V],_t(g,!0,-1),!0}p(Ie,"readAlias");function _r(g,O,j,V){const U=Tt(g);return st(g),wt(g,O),g.tag=null,g.anchor=null,g.kind=null,g.result=null,Ht(g,j,V)&&g.kind==="mapping"?(tt(g),!0):(gt(g),wt(g,U),!1)}p(_r,"tryReadBlockMappingFromProperty");function ee(g,O,j,V,U){let at,T,N=1,et=!1,X=!1,Z=null,ot,rt,dt;g.depth>=g.maxDepth&&B(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const ht=at=T=h===j||n===j;if(V&&_t(g,!0,-1)&&(et=!0,g.lineIndent>O?N=1:g.lineIndent===O?N=0:g.lineIndent<O&&(N=-1)),N===1)for(;;){const mt=g.input.charCodeAt(g.position),yt=Tt(g);if(et&&(mt===33&&g.tag!==null||mt===38&&g.anchor!==null)||!hr(g)&&!ce(g))break;Z===null&&(Z=yt),_t(g,!0,-1)?(et=!0,T=ht,g.lineIndent>O?N=1:g.lineIndent===O?N=0:g.lineIndent<O&&(N=-1)):T=!1}if(T&&(T=et||U),N===1||h===j)if(s===j||a===j?rt=O:rt=O+1,dt=g.position-g.lineStart,N===1)if(T&&(ve(g,dt)||Ht(g,dt,rt))||wr(g,rt))X=!0;else{const mt=g.input.charCodeAt(g.position);Z!==null&&ht&&!T&&mt!==124&&mt!==62&&_r(g,Z,Z.position-Z.lineStart,rt)||at&&Yt(g,rt)||_e(g,rt)||De(g,rt)?X=!0:Ie(g)?(X=!0,(g.tag!==null||g.anchor!==null)&&B(g,"alias node should not have any properties")):he(g,rt,s===j)&&(X=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&R(g,g.anchor,g.result)}else N===0&&(X=T&&ve(g,dt));if(g.tag===null)g.anchor!==null&&R(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&B(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let mt=0,yt=g.implicitTypes.length;mt<yt;mt+=1)if(ot=g.implicitTypes[mt],ot.resolve(g.result)){g.result=ot.construct(g.result),g.tag=ot.tag,g.anchor!==null&&R(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(o.call(g.typeMap[g.kind||"fallback"],g.tag))ot=g.typeMap[g.kind||"fallback"][g.tag];else{ot=null;const mt=g.typeMap.multi[g.kind||"fallback"];for(let yt=0,Mt=mt.length;yt<Mt;yt+=1)if(g.tag.slice(0,mt[yt].tag.length)===mt[yt].tag){ot=mt[yt];break}}ot||B(g,"unknown tag !<"+g.tag+">"),g.result!==null&&ot.kind!==g.kind&&B(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+ot.kind+'", not "'+g.kind+'"'),ot.resolve(g.result,g.tag)?(g.result=ot.construct(g.result,g.tag),g.anchor!==null&&R(g,g.anchor,g.result)):B(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||X}p(ee,"composeNode");function vr(g){const O=g.position;let j=!1,V;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(V=g.input.charCodeAt(g.position))!==0&&(_t(g,!0,-1),V=g.input.charCodeAt(g.position),!(g.lineIndent>0||V!==37));){j=!0,V=g.input.charCodeAt(++g.position);let U=g.position;for(;V!==0&&!_(V);)V=g.input.charCodeAt(++g.position);const at=g.input.slice(U,g.position),T=[];for(at.length<1&&B(g,"directive name must not be less than one character in length");V!==0;){for(;S(V);)V=g.input.charCodeAt(++g.position);if(V===35){do V=g.input.charCodeAt(++g.position);while(V!==0&&!k(V));break}if(k(V))break;for(U=g.position;V!==0&&!_(V);)V=g.input.charCodeAt(++g.position);T.push(g.input.slice(U,g.position))}V!==0&&Ot(g),o.call(vt,at)?vt[at](g,at,T):q(g,'unknown document directive "'+at+'"')}if(_t(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,_t(g,!0,-1)):j&&B(g,"directives end mark is expected"),ee(g,g.lineIndent-1,h,!1,!0),_t(g,!0,-1),g.checkLineBreaks&&f.test(g.input.slice(O,g.position))&&q(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&Pt(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,_t(g,!0,-1));return}g.position<g.length-1&&B(g,"end of the stream or a document separator is expected")}p(vr,"readDocument");function Ve(g,O){g=String(g),O=O||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
286
+ `),g.charCodeAt(0)===65279&&(g=g.slice(1)));const j=new A(g,O),V=g.indexOf("\0");for(V!==-1&&(j.position=V,B(j,"null byte is not allowed in input")),j.input+="\0";j.input.charCodeAt(j.position)===32;)j.lineIndent+=1,j.position+=1;for(;j.position<j.length-1;)vr(j);return j.documents}p(Ve,"loadDocuments");function cr(g,O,j){O!==null&&typeof O=="object"&&typeof j>"u"&&(j=O,O=null);const V=Ve(g,j);if(typeof O!="function")return V;for(let U=0,at=V.length;U<at;U+=1)O(V[U])}p(cr,"loadAll2");function ur(g,O){const j=Ve(g,O);if(j.length!==0){if(j.length===1)return j[0];throw new t("expected a single document in the stream, but found more")}}return p(ur,"load2"),as.loadAll=cr,as.load=ur,as}p(Bm,"requireLoader");var yn={},td;function Lm(){if(td)return yn;td=1;const e=Vi(),t=Zi(),r=oa(),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,s=65279,a=9,n=10,h=13,c=32,l=33,u=34,d=35,f=37,m=38,y=39,C=42,x=44,k=45,S=58,_=61,v=62,L=63,F=64,E=91,G=93,W=96,D=123,J=124,I=125,A={};A[0]="\\0",A[7]="\\a",A[8]="\\b",A[9]="\\t",A[10]="\\n",A[11]="\\v",A[12]="\\f",A[13]="\\r",A[27]="\\e",A[34]='\\"',A[92]="\\\\",A[133]="\\N",A[160]="\\_",A[8232]="\\L",A[8233]="\\P";const P=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],B=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function q(T,N){if(N===null)return{};const et={},X=Object.keys(N);for(let Z=0,ot=X.length;Z<ot;Z+=1){let rt=X[Z],dt=String(N[rt]);rt.slice(0,2)==="!!"&&(rt="tag:yaml.org,2002:"+rt.slice(2));const ht=T.compiledTypeMap.fallback[rt];ht&&o.call(ht.styleAliases,dt)&&(dt=ht.styleAliases[dt]),et[rt]=dt}return et}p(q,"compileStyleMap");function R(T){let N,et;const X=T.toString(16).toUpperCase();if(T<=255)N="x",et=2;else if(T<=65535)N="u",et=4;else if(T<=4294967295)N="U",et=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+N+e.repeat("0",et-X.length)+X}p(R,"encodeHex");const st=1,tt=2;function gt(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=q(this.schema,T.styles||null),this.sortKeys=T.sortKeys||!1,this.lineWidth=T.lineWidth||80,this.noRefs=T.noRefs||!1,this.noCompatMode=T.noCompatMode||!1,this.condenseFlow=T.condenseFlow||!1,this.quotingType=T.quotingType==='"'?tt:st,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(gt,"State");function Tt(T,N){const et=e.repeat(" ",N);let X=0,Z="";const ot=T.length;for(;X<ot;){let rt;const dt=T.indexOf(`
287
+ `,X);dt===-1?(rt=T.slice(X),X=ot):(rt=T.slice(X,dt+1),X=dt+1),rt.length&&rt!==`
288
+ `&&(Z+=et),Z+=rt}return Z}p(Tt,"indentString");function wt(T,N){return`
289
+ `+e.repeat(" ",T.indent*N)}p(wt,"generateNextLine");function vt(T,N){for(let et=0,X=T.implicitTypes.length;et<X;et+=1)if(T.implicitTypes[et].resolve(N))return!0;return!1}p(vt,"testImplicitResolving");function bt(T){return T===c||T===a}p(bt,"isWhitespace");function nt(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==s||T>=65536&&T<=1114111}p(nt,"isPrintable");function St(T){return nt(T)&&T!==s&&T!==h&&T!==n}p(St,"isNsCharOrWhitespace");function Ot(T,N,et){const X=St(T),Z=X&&!bt(T);return(et?X:X&&T!==x&&T!==E&&T!==G&&T!==D&&T!==I)&&T!==d&&!(N===S&&!Z)||St(N)&&!bt(N)&&T===d||N===S&&Z}p(Ot,"isPlainSafe");function _t(T){return nt(T)&&T!==s&&!bt(T)&&T!==k&&T!==L&&T!==S&&T!==x&&T!==E&&T!==G&&T!==D&&T!==I&&T!==d&&T!==m&&T!==C&&T!==l&&T!==J&&T!==_&&T!==v&&T!==y&&T!==u&&T!==f&&T!==F&&T!==W}p(_t,"isPlainSafeFirst");function Pt(T){return!bt(T)&&T!==S}p(Pt,"isPlainSafeLast");function qt(T,N){const et=T.charCodeAt(N);let X;return et>=55296&&et<=56319&&N+1<T.length&&(X=T.charCodeAt(N+1),X>=56320&&X<=57343)?(et-55296)*1024+X-56320+65536:et}p(qt,"codePointAt");function he(T){return/^\n* /.test(T)}p(he,"needIndentIndicator");const _e=1,De=2,wr=3,Yt=4,ve=5;function Ht(T,N,et,X,Z,ot,rt,dt){let ht,mt=0,yt=null,Mt=!1,jt=!1;const Qi=X!==-1;let Br=-1,Lr=_t(qt(T,0))&&Pt(qt(T,T.length-1));if(N||rt)for(ht=0;ht<T.length;mt>=65536?ht+=2:ht++){if(mt=qt(T,ht),!nt(mt))return ve;Lr=Lr&&Ot(mt,yt,dt),yt=mt}else{for(ht=0;ht<T.length;mt>=65536?ht+=2:ht++){if(mt=qt(T,ht),mt===n)Mt=!0,Qi&&(jt=jt||ht-Br-1>X&&T[Br+1]!==" ",Br=ht);else if(!nt(mt))return ve;Lr=Lr&&Ot(mt,yt,dt),yt=mt}jt=jt||Qi&&ht-Br-1>X&&T[Br+1]!==" "}return!Mt&&!jt?Lr&&!rt&&!Z(T)?_e:ot===tt?ve:De:et>9&&he(T)?ve:rt?ot===tt?ve:De:jt?Yt:wr}p(Ht,"chooseScalarStyle");function hr(T,N,et,X,Z){T.dump=(function(){if(N.length===0)return T.quotingType===tt?'""':"''";if(!T.noCompatMode&&(P.indexOf(N)!==-1||B.test(N)))return T.quotingType===tt?'"'+N+'"':"'"+N+"'";const ot=T.indent*Math.max(1,et),rt=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-ot),dt=X||T.flowLevel>-1&&et>=T.flowLevel;function ht(mt){return vt(T,mt)}switch(p(ht,"testAmbiguity"),Ht(N,dt,T.indent,rt,ht,T.quotingType,T.forceQuotes&&!X,Z)){case _e:return N;case De:return"'"+N.replace(/'/g,"''")+"'";case wr:return"|"+ce(N,T.indent)+Ie(Tt(N,ot));case Yt:return">"+ce(N,T.indent)+Ie(Tt(_r(N,rt),ot));case ve:return'"'+vr(N)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(hr,"writeScalar");function ce(T,N){const et=he(T)?String(N):"",X=T[T.length-1]===`
290
+ `,ot=X&&(T[T.length-2]===`
291
+ `||T===`
292
+ `)?"+":X?"":"-";return et+ot+`
293
+ `}p(ce,"blockHeader");function Ie(T){return T[T.length-1]===`
294
+ `?T.slice(0,-1):T}p(Ie,"dropEndingNewline");function _r(T,N){const et=/(\n+)([^\n]*)/g;let X=(function(){let dt=T.indexOf(`
295
+ `);return dt=dt!==-1?dt:T.length,et.lastIndex=dt,ee(T.slice(0,dt),N)})(),Z=T[0]===`
296
+ `||T[0]===" ",ot,rt;for(;rt=et.exec(T);){const dt=rt[1],ht=rt[2];ot=ht[0]===" ",X+=dt+(!Z&&!ot&&ht!==""?`
297
+ `:"")+ee(ht,N),Z=ot}return X}p(_r,"foldString");function ee(T,N){if(T===""||T[0]===" ")return T;const et=/ [^ ]/g;let X,Z=0,ot,rt=0,dt=0,ht="";for(;X=et.exec(T);)dt=X.index,dt-Z>N&&(ot=rt>Z?rt:dt,ht+=`
298
+ `+T.slice(Z,ot),Z=ot+1),rt=dt;return ht+=`
299
+ `,T.length-Z>N&&rt>Z?ht+=T.slice(Z,rt)+`
300
+ `+T.slice(rt+1):ht+=T.slice(Z),ht.slice(1)}p(ee,"foldLine");function vr(T){let N="",et=0;for(let X=0;X<T.length;et>=65536?X+=2:X++){et=qt(T,X);const Z=A[et];!Z&&nt(et)?(N+=T[X],et>=65536&&(N+=T[X+1])):N+=Z||R(et)}return N}p(vr,"escapeString");function Ve(T,N,et){let X="";const Z=T.tag;for(let ot=0,rt=et.length;ot<rt;ot+=1){let dt=et[ot];T.replacer&&(dt=T.replacer.call(et,String(ot),dt)),(j(T,N,dt,!1,!1)||typeof dt>"u"&&j(T,N,null,!1,!1))&&(X!==""&&(X+=","+(T.condenseFlow?"":" ")),X+=T.dump)}T.tag=Z,T.dump="["+X+"]"}p(Ve,"writeFlowSequence");function cr(T,N,et,X){let Z="";const ot=T.tag;for(let rt=0,dt=et.length;rt<dt;rt+=1){let ht=et[rt];T.replacer&&(ht=T.replacer.call(et,String(rt),ht)),(j(T,N+1,ht,!0,!0,!1,!0)||typeof ht>"u"&&j(T,N+1,null,!0,!0,!1,!0))&&((!X||Z!=="")&&(Z+=wt(T,N)),T.dump&&n===T.dump.charCodeAt(0)?Z+="-":Z+="- ",Z+=T.dump)}T.tag=ot,T.dump=Z||"[]"}p(cr,"writeBlockSequence");function ur(T,N,et){let X="";const Z=T.tag,ot=Object.keys(et);for(let rt=0,dt=ot.length;rt<dt;rt+=1){let ht="";X!==""&&(ht+=", "),T.condenseFlow&&(ht+='"');const mt=ot[rt];let yt=et[mt];T.replacer&&(yt=T.replacer.call(et,mt,yt)),j(T,N,mt,!1,!1)&&(T.dump.length>1024&&(ht+="? "),ht+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),j(T,N,yt,!1,!1)&&(ht+=T.dump,X+=ht))}T.tag=Z,T.dump="{"+X+"}"}p(ur,"writeFlowMapping");function g(T,N,et,X){let Z="";const ot=T.tag,rt=Object.keys(et);if(T.sortKeys===!0)rt.sort();else if(typeof T.sortKeys=="function")rt.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let dt=0,ht=rt.length;dt<ht;dt+=1){let mt="";(!X||Z!=="")&&(mt+=wt(T,N));const yt=rt[dt];let Mt=et[yt];if(T.replacer&&(Mt=T.replacer.call(et,yt,Mt)),!j(T,N+1,yt,!0,!0,!0))continue;const jt=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;jt&&(T.dump&&n===T.dump.charCodeAt(0)?mt+="?":mt+="? "),mt+=T.dump,jt&&(mt+=wt(T,N)),j(T,N+1,Mt,!0,jt)&&(T.dump&&n===T.dump.charCodeAt(0)?mt+=":":mt+=": ",mt+=T.dump,Z+=mt)}T.tag=ot,T.dump=Z||"{}"}p(g,"writeBlockMapping");function O(T,N,et){const X=et?T.explicitTypes:T.implicitTypes;for(let Z=0,ot=X.length;Z<ot;Z+=1){const rt=X[Z];if((rt.instanceOf||rt.predicate)&&(!rt.instanceOf||typeof N=="object"&&N instanceof rt.instanceOf)&&(!rt.predicate||rt.predicate(N))){if(et?rt.multi&&rt.representName?T.tag=rt.representName(N):T.tag=rt.tag:T.tag="?",rt.represent){const dt=T.styleMap[rt.tag]||rt.defaultStyle;let ht;if(i.call(rt.represent)==="[object Function]")ht=rt.represent(N,dt);else if(o.call(rt.represent,dt))ht=rt.represent[dt](N,dt);else throw new t("!<"+rt.tag+'> tag resolver accepts not "'+dt+'" style');T.dump=ht}return!0}}return!1}p(O,"detectType");function j(T,N,et,X,Z,ot,rt){T.tag=null,T.dump=et,O(T,et,!1)||O(T,et,!0);const dt=i.call(T.dump),ht=X;X&&(X=T.flowLevel<0||T.flowLevel>N);const mt=dt==="[object Object]"||dt==="[object Array]";let yt,Mt;if(mt&&(yt=T.duplicates.indexOf(et),Mt=yt!==-1),(T.tag!==null&&T.tag!=="?"||Mt||T.indent!==2&&N>0)&&(Z=!1),Mt&&T.usedDuplicates[yt])T.dump="*ref_"+yt;else{if(mt&&Mt&&!T.usedDuplicates[yt]&&(T.usedDuplicates[yt]=!0),dt==="[object Object]")X&&Object.keys(T.dump).length!==0?(g(T,N,T.dump,Z),Mt&&(T.dump="&ref_"+yt+T.dump)):(ur(T,N,T.dump),Mt&&(T.dump="&ref_"+yt+" "+T.dump));else if(dt==="[object Array]")X&&T.dump.length!==0?(T.noArrayIndent&&!rt&&N>0?cr(T,N-1,T.dump,Z):cr(T,N,T.dump,Z),Mt&&(T.dump="&ref_"+yt+T.dump)):(Ve(T,N,T.dump),Mt&&(T.dump="&ref_"+yt+" "+T.dump));else if(dt==="[object String]")T.tag!=="?"&&hr(T,T.dump,N,ot,ht);else{if(dt==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+dt)}if(T.tag!==null&&T.tag!=="?"){let jt=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?jt="!"+jt:jt.slice(0,18)==="tag:yaml.org,2002:"?jt="!!"+jt.slice(18):jt="!<"+jt+">",T.dump=jt+" "+T.dump}}return!0}p(j,"writeNode");function V(T,N){const et=[],X=[];U(T,et,X);const Z=X.length;for(let ot=0;ot<Z;ot+=1)N.duplicates.push(et[X[ot]]);N.usedDuplicates=new Array(Z)}p(V,"getDuplicateReferences");function U(T,N,et){if(T!==null&&typeof T=="object"){const X=N.indexOf(T);if(X!==-1)et.indexOf(X)===-1&&et.push(X);else if(N.push(T),Array.isArray(T))for(let Z=0,ot=T.length;Z<ot;Z+=1)U(T[Z],N,et);else{const Z=Object.keys(T);for(let ot=0,rt=Z.length;ot<rt;ot+=1)U(T[Z[ot]],N,et)}}}p(U,"inspectNode");function at(T,N){N=N||{};const et=new gt(N);et.noRefs||V(T,et);let X=T;return et.replacer&&(X=et.replacer.call({"":X},"",X)),j(et,0,X,!0,!0)?et.dump+`
301
+ `:""}return p(at,"dump2"),yn.dump=at,yn}p(Lm,"requireDumper");var ed;function Fm(){if(ed)return me;ed=1;const e=Bm(),t=Lm();function r(i,o){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return p(r,"renamed"),me.Type=Te(),me.Schema=Kl(),me.FAILSAFE_SCHEMA=eh(),me.JSON_SCHEMA=ah(),me.CORE_SCHEMA=nh(),me.DEFAULT_SCHEMA=oa(),me.load=e.load,me.loadAll=e.loadAll,me.dump=t.dump,me.YAMLException=Zi(),me.types={binary:ch(),float:sh(),map:th(),null:rh(),pairs:dh(),set:fh(),timestamp:lh(),bool:ih(),int:oh(),merge:hh(),omap:uh(),seq:Jl(),str:Ql()},me.safeLoad=r("safeLoad","load"),me.safeLoadAll=r("safeLoadAll","loadAll"),me.safeDump=r("safeDump","dump"),me}p(Fm,"requireJsYaml");var kv=Fm(),Tv=_m(kv),{Type:FA,Schema:AA,FAILSAFE_SCHEMA:EA,JSON_SCHEMA:Sv,CORE_SCHEMA:MA,DEFAULT_SCHEMA:$A,load:wv,loadAll:OA,dump:DA,YAMLException:IA,types:PA,safeLoad:RA,safeLoadAll:NA,safeDump:qA}=Tv,_v={common:qo,getConfig:Vt,insertCluster:tm,insertEdge:im,insertEdgeLabel:Gl,insertMarkers:am,insertNode:jl,interpolateToCurve:Sl,labelHelper:Ct,log:z,positionEdgeLabel:N_},Oo={},Am=p(e=>{for(const t of e)Oo[t.name]=t},"registerLayoutLoaders"),vv=p(()=>{Am([{name:"dagre",loader:p(async()=>await $t(()=>import("./dagre-GXQ25YYZ-BuKFYbmi.js"),__vite__mapDeps([4,5,3,6,1,2]),import.meta.url),"loader")},{name:"swimlane",loader:p(async()=>await $t(()=>import("./swimlanes-42K2YHIH-DEqEyhLN.js"),__vite__mapDeps([7,1,2,3]),import.meta.url),"loader")},{name:"cose-bilkent",loader:p(async()=>await $t(()=>import("./cose-bilkent-JH36ORCC-Be1z_i9Q.js"),__vite__mapDeps([8,9,1,2,3]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");vv();var zA=p(async(e,t)=>{if(!(e.layoutAlgorithm in Oo))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const l of e.nodes){const u=l.domId||l.id;l.domId=`${e.diagramId}-${u}`}const r=Oo[e.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:s}=e.config,{useGradient:a,gradientStart:n,gradientStop:h}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),a){const l=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");l.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),l.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)}return i.render(e,t,_v,{algorithm:r.algorithm})},"render"),WA=p((e="",{fallback:t="dagre"}={})=>{if(e in Oo)return e;if(t in Oo)return z.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ph="comm",Em="rule",Mm="decl",Bv="@media",Lv="@import",Fv="@supports",Av="@namespace",Vn="@keyframes",$m="@layer",Ev="@scope",Mv=Math.abs,Bo=String.fromCharCode;function Om(e){return e.trim()}function Zn(e,t,r){return e.replace(t,r)}function wi(e,t){return e.charCodeAt(t)|0}function Ui(e,t,r){return e.slice(t,r)}function er(e){return e.length}function Dm(e){return e.length}function ns(e,t){return t.push(e),e}var sa=1,ji=1,Im=0,ze=0,ie=0,Ki="";function gh(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:sa,column:ji,length:a,return:"",siblings:n}}function $v(){return ie}function Ov(){return ie=ze>0?wi(Ki,--ze):0,ji--,ie===10&&(ji=1,sa--),ie}function je(){return ie=ze<Im?wi(Ki,ze++):0,ji++,ie===10&&(ji=1,sa++),ie}function Dr(){return wi(Ki,ze)}function gs(){return ze}function aa(e,t){return Ui(Ki,e,t)}function Do(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Dv(e){return sa=ji=1,Im=er(Ki=e),ze=0,[]}function Iv(e){return Ki="",e}function Cn(e){return Om(aa(ze-1,Kn(e===91?e+2:e===40?e+1:e)))}function Pv(e){for(;(ie=Dr())&&ie<33;)je();return Do(e)>2||Do(ie)>3?"":" "}function Rv(e,t){for(;--t&&je()&&!(ie<48||ie>102||ie>57&&ie<65||ie>70&&ie<97););return aa(e,gs()+(t<6&&Dr()==32&&je()==32))}function Kn(e){for(;je();)switch(ie){case e:return ze;case 34:case 39:e!==34&&e!==39&&Kn(ie);break;case 40:e===41&&Kn(e);break;case 92:je();break}return ze}function Nv(e,t){for(;je()&&e+ie!==57;)if(e+ie===84&&Dr()===47)break;return"/*"+aa(t,ze-1)+"*"+Bo(e===47?e:je())}function qv(e){for(;!Do(Dr());)je();return aa(e,ze)}function zv(e){return Iv(ms("",null,null,null,[""],e=Dv(e),0,[0],e))}function ms(e,t,r,i,o,s,a,n,h){for(var c=0,l=0,u=a,d=0,f=0,m=0,y=1,C=1,x=1,k=0,S=0,_="",v=o,L=s,F=i,E=_;C;)switch(m=S,S=je()){case 40:m!=108&&wi(E,u-1)==58?(k++,E+="("):E+=Cn(S);break;case 41:k--,E+=")";break;case 34:case 39:case 91:E+=Cn(S);break;case 9:case 10:case 13:case 32:if(k>0){E+=Bo(S);break}E+=Pv(m);break;case 92:E+=Rv(gs()-1,7);continue;case 47:switch(Dr()){case 42:case 47:ns(Wv(Nv(je(),gs()),t,r,h),h),(Do(m||1)==5||Do(Dr()||1)==5)&&er(E)&&Ui(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*y:n[c++]=er(E)*x;case 125*y:case 59:case 0:if(k>0&&S){E+=Bo(S);break}switch(S){case 0:case 125:C=0;case 59+l:x==-1&&(E=Zn(E,/\f/g,"")),f>0&&(er(E)-u||y===0)&&ns(f>32?id(E+";",i,r,u-1,h):id(Zn(E," ","")+";",i,r,u-2,h),h);break;case 59:E+=";";default:if(ns(F=rd(E,t,r,c,l,o,n,_,v=[],L=[],u,s),s),S===123)if(l===0)ms(E,t,F,F,v,s,u,n,L);else{switch(d){case 99:if(wi(E,3)===110)break;case 108:if(wi(E,2)===97)break;default:l=0;case 100:case 109:case 115:}l?ms(e,F,F,i&&ns(rd(e,F,F,0,0,o,n,_,o,v=[],u,L),L),o,L,u,n,i?v:L):ms(E,F,F,F,[""],L,0,n,L)}}c=l=f=0,y=x=1,_=E="",u=a;break;case 58:u=1+er(E),f=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&Ov()==125)continue}switch(E+=Bo(S),S*y){case 38:x=l>0?1:(E+="\f",-1);break;case 44:if(k>0)break;n[c++]=(er(E)-1)*x,x=1;break;case 64:Dr()===45&&(E+=Cn(je())),d=Dr(),l=u=er(_=E+=qv(gs())),S++;break;case 45:m===45&&er(E)==2&&(y=0)}}return s}function rd(e,t,r,i,o,s,a,n,h,c,l,u){for(var d=o-1,f=o===0?s:[""],m=Dm(f),y=0,C=0,x=0;y<i;++y)for(var k=0,S=Ui(e,d+1,d=Mv(C=a[y])),_=e;k<m;++k)(_=Om(C>0?f[k]+" "+S:Zn(S,/&\f/g,f[k])))&&(h[x++]=_);return gh(e,t,r,o===0?Em:n,h,c,l,u)}function Wv(e,t,r,i){return gh(e,t,r,ph,Bo($v()),Ui(e,2,-2),0,i)}function id(e,t,r,i,o){return gh(e,t,r,Mm,Ui(e,0,i),Ui(e,i+1,-1),i,o)}function Qn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Hv(e,t,r,i){switch(e.type){case $m:if(e.children.length)break;case Lv:case Av:case Mm:return e.return=e.return||e.value;case ph:return"";case Vn:return e.return=e.value+"{"+Qn(e.children,i)+"}";case Em:if(!er(e.value=e.props.join(",")))return""}return er(r=Qn(e.children,i))?e.return=e.value+"{"+r+"}":""}function Yv(e){var t=Dm(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var Pm="c4",Uv=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),jv=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-Bsn2OlKb.js");return{diagram:t}},__vite__mapDeps([10,11,1,2,3]),import.meta.url);return{id:Pm,diagram:e}},"loader"),Gv={id:Pm,detector:Uv,loader:jv},Xv=Gv,Rm="flowchart",Vv=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Zv=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DgdTOUM1.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]),import.meta.url);return{id:Rm,diagram:e}},"loader"),Kv={id:Rm,detector:Vv,loader:Zv},Qv=Kv,Nm="flowchart-v2",Jv=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),tB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DgdTOUM1.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]),import.meta.url);return{id:Nm,diagram:e}},"loader"),eB={id:Nm,detector:Jv,loader:tB},rB=eB,qm="swimlane",iB=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-Dh-s4bKd.js");return{diagram:t}},__vite__mapDeps([17,12,13,14,15,11,16,1,2,3]),import.meta.url);return{id:qm,diagram:e}},"loader"),sB={id:qm,detector:iB,loader:oB},aB=sB,zm="er",nB=p(e=>/^\s*erDiagram/.test(e),"detector"),lB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-CCvI6JHH.js");return{diagram:t}},__vite__mapDeps([18,14,15,16,1,2,3]),import.meta.url);return{id:zm,diagram:e}},"loader"),hB={id:zm,detector:nB,loader:lB},cB=hB,Wm="gitGraph",uB=p(e=>/^\s*gitGraph/.test(e),"detector"),dB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-CQklLXfY.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,1,2,3]),import.meta.url);return{id:Wm,diagram:e}},"loader"),fB={id:Wm,detector:uB,loader:dB},pB=fB,Hm="gantt",gB=p(e=>/^\s*gantt/.test(e),"detector"),mB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-BZ5DzFSb.js");return{diagram:t}},__vite__mapDeps([23,1,2,24,3]),import.meta.url);return{id:Hm,diagram:e}},"loader"),yB={id:Hm,detector:gB,loader:mB},CB=yB,Ym="info",xB=p(e=>/^\s*info/.test(e),"detector"),bB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-inaVWWG7.js");return{diagram:t}},__vite__mapDeps([25,22,1,2,3]),import.meta.url);return{id:Ym,diagram:e}},"loader"),kB={id:Ym,detector:xB,loader:bB},Um="pie",TB=p(e=>/^\s*pie/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-CQTyXz50.js");return{diagram:t}},__vite__mapDeps([26,21,22,1,2,24,3]),import.meta.url);return{id:Um,diagram:e}},"loader"),wB={id:Um,detector:TB,loader:SB},jm="quadrantChart",_B=p(e=>/^\s*quadrantChart/.test(e),"detector"),vB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-Cqjg5HSm.js");return{diagram:t}},__vite__mapDeps([27,24,1,2,3]),import.meta.url);return{id:jm,diagram:e}},"loader"),BB={id:jm,detector:_B,loader:vB},LB=BB,Gm="xychart",FB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),AB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-DBXGC8lX.js");return{diagram:t}},__vite__mapDeps([28,24,1,2,3]),import.meta.url);return{id:Gm,diagram:e}},"loader"),EB={id:Gm,detector:FB,loader:AB},MB=EB,Xm="requirement",$B=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),OB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-CWcLe5E-.js");return{diagram:t}},__vite__mapDeps([29,14,15,1,2,3]),import.meta.url);return{id:Xm,diagram:e}},"loader"),DB={id:Xm,detector:$B,loader:OB},IB=DB,Vm="sequence",PB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),RB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-DM48lXLE.js");return{diagram:t}},__vite__mapDeps([30,20,11,1,2,3]),import.meta.url);return{id:Vm,diagram:e}},"loader"),NB={id:Vm,detector:PB,loader:RB},qB=NB,Zm="class",zB=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),WB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-DgvmCbKR.js");return{diagram:t}},__vite__mapDeps([31,32,13,14,15,11,1,2,3]),import.meta.url);return{id:Zm,diagram:e}},"loader"),HB={id:Zm,detector:zB,loader:WB},YB=HB,Km="classDiagram",UB=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),jB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-DgvmCbKR.js");return{diagram:t}},__vite__mapDeps([33,32,13,14,15,11,1,2,3]),import.meta.url);return{id:Km,diagram:e}},"loader"),GB={id:Km,detector:UB,loader:jB},XB=GB,Qm="state",VB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-CUReM6ha.js");return{diagram:t}},__vite__mapDeps([34,35,14,15,11,5,3,6,1,2]),import.meta.url);return{id:Qm,diagram:e}},"loader"),KB={id:Qm,detector:VB,loader:ZB},QB=KB,Jm="stateDiagram",JB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),tL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-UNjCyT1j.js");return{diagram:t}},__vite__mapDeps([36,35,14,15,11,1,2,3]),import.meta.url);return{id:Jm,diagram:e}},"loader"),eL={id:Jm,detector:JB,loader:tL},rL=eL,ty="journey",iL=p(e=>/^\s*journey/.test(e),"detector"),oL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-YhsaQCHu.js");return{diagram:t}},__vite__mapDeps([37,13,11,1,2,3]),import.meta.url);return{id:ty,diagram:e}},"loader"),sL={id:ty,detector:iL,loader:oL},aL=sL,nL=p((e,t,r)=>{z.debug(`rendering svg for syntax error
302
+ `);const i=HT(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Zd(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),ey={draw:nL},lL=ey,hL={db:{},renderer:ey,parser:{parse:p(()=>{},"parse")}},cL=hL,ry="flowchart-elk",uL=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),dL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DgdTOUM1.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]),import.meta.url);return{id:ry,diagram:e}},"loader"),fL={id:ry,detector:uL,loader:dL},pL=fL,iy="timeline",gL=p(e=>/^\s*timeline/.test(e),"detector"),mL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-_OQxzNu9.js");return{diagram:t}},__vite__mapDeps([38,1,2,3]),import.meta.url);return{id:iy,diagram:e}},"loader"),yL={id:iy,detector:gL,loader:mL},CL=yL,oy="mindmap",xL=p(e=>/^\s*mindmap/.test(e),"detector"),bL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-DavgP5bX.js");return{diagram:t}},__vite__mapDeps([39,14,15,1,2,3]),import.meta.url);return{id:oy,diagram:e}},"loader"),kL={id:oy,detector:xL,loader:bL},TL=kL,sy="kanban",SL=p(e=>/^\s*kanban/.test(e),"detector"),wL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-SFHx0aHd.js");return{diagram:t}},__vite__mapDeps([40,13,1,2,3]),import.meta.url);return{id:sy,diagram:e}},"loader"),_L={id:sy,detector:SL,loader:wL},vL=_L,ay="sankey",BL=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),LL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-BzTZcPVf.js");return{diagram:t}},__vite__mapDeps([41,24,1,2,3]),import.meta.url);return{id:ay,diagram:e}},"loader"),FL={id:ay,detector:BL,loader:LL},AL=FL,ny="packet",EL=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),ML=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-DeY6yMBN.js");return{diagram:t}},__vite__mapDeps([42,21,22,1,2,3]),import.meta.url);return{id:ny,diagram:e}},"loader"),$L={id:ny,detector:EL,loader:ML},ly="radar",OL=p(e=>/^\s*radar-beta/.test(e),"detector"),DL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-CRFVfrL1.js");return{diagram:t}},__vite__mapDeps([43,21,22,1,2,3]),import.meta.url);return{id:ly,diagram:e}},"loader"),IL={id:ly,detector:OL,loader:DL},hy="block",PL=p(e=>/^\s*block(-beta)?/.test(e),"detector"),RL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-8_cCt-vW.js");return{diagram:t}},__vite__mapDeps([44,13,1,2,16,3]),import.meta.url);return{id:hy,diagram:e}},"loader"),NL={id:hy,detector:PL,loader:RL},qL=NL,cy="treeView",zL=p(e=>/^\s*treeView-beta/.test(e),"detector"),WL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-znl5Fq0J.js");return{diagram:t}},__vite__mapDeps([45,20,21,22,1,2,3]),import.meta.url);return{id:cy,diagram:e}},"loader"),HL={id:cy,detector:zL,loader:WL},YL=HL,uy="architecture",UL=p(e=>/^\s*architecture/.test(e),"detector"),jL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-DcRt--3g.js");return{diagram:t}},__vite__mapDeps([46,21,22,1,2,9,3]),import.meta.url);return{id:uy,diagram:e}},"loader"),GL={id:uy,detector:UL,loader:jL},XL=GL,dy="eventmodeling",VL=p(e=>/^\s*eventmodeling/.test(e),"detector"),ZL=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-CIVgZDJa.js");return{diagram:t}},__vite__mapDeps([47,21,22,1,2,3]),import.meta.url);return{id:dy,diagram:e}},"loader"),KL={id:dy,detector:VL,loader:ZL},QL=KL,fy="ishikawa",JL=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),tF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-R9uOXdb9.js");return{diagram:t}},__vite__mapDeps([48,1,2,3]),import.meta.url);return{id:fy,diagram:e}},"loader"),eF={id:fy,detector:JL,loader:tF},py="venn",rF=p(e=>/^\s*venn-beta/.test(e),"detector"),iF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-wUfSnIxp.js");return{diagram:t}},__vite__mapDeps([49,1,2,3]),import.meta.url);return{id:py,diagram:e}},"loader"),oF={id:py,detector:rF,loader:iF},sF=oF,gy="treemap",aF=p(e=>/^\s*treemap/.test(e),"detector"),nF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-DIQB8SES.js");return{diagram:t}},__vite__mapDeps([50,21,15,22,1,2,24,3]),import.meta.url);return{id:gy,diagram:e}},"loader"),lF={id:gy,detector:aF,loader:nF},my="wardley",hF=p(e=>/^\s*wardley-beta/i.test(e),"detector"),cF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-BPcd3HO7.js");return{diagram:t}},__vite__mapDeps([51,21,22,1,2,3]),import.meta.url);return{id:my,diagram:e}},"loader"),uF={id:my,detector:hF,loader:cF},dF=uF,yy="cynefin",fF=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),pF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-ql71XTsQ.js");return{diagram:t}},__vite__mapDeps([52,21,22,1,2,3]),import.meta.url);return{id:yy,diagram:e}},"loader"),gF={id:yy,detector:fF,loader:pF},Cy="railroad",mF=p(e=>/^\s*railroad-beta/i.test(e),"detector"),yF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-DzL2XDLc.js");return{diagram:t}},__vite__mapDeps([53,54,21,22,1,2,3]),import.meta.url);return{id:Cy,diagram:e}},"loader"),CF={id:Cy,detector:mF,loader:yF},xy="railroadEbnf",xF=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),bF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-Im7jHJ-6.js");return{diagram:t}},__vite__mapDeps([55,54,21,22,1,2,3]),import.meta.url);return{id:xy,diagram:e}},"loader"),kF={id:xy,detector:xF,loader:bF},by="railroadAbnf",TF=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),SF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-BbJTXfTE.js");return{diagram:t}},__vite__mapDeps([56,54,21,22,1,2,3]),import.meta.url);return{id:by,diagram:e}},"loader"),wF={id:by,detector:TF,loader:SF},ky="railroadPeg",_F=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),vF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-yFW3IMW-.js");return{diagram:t}},__vite__mapDeps([57,54,21,22,1,2,3]),import.meta.url);return{id:ky,diagram:e}},"loader"),BF={id:ky,detector:_F,loader:vF},od=!1,na=p(()=>{od||(od=!0,Ss("error",cL,e=>e.toLowerCase().trim()==="error"),Ss("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),vn(pL,TL,XL),vn(Xv,vL,XB,YB,cB,CB,kB,wB,IB,qB,aB,rB,Qv,CL,pB,rL,QB,aL,LB,AL,$L,MB,qL,QL,YL,IL,eF,lF,CF,kF,wF,BF,sF,dF,gF))},"addDiagrams"),LF=p(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ti).map(async([r,{detector:i,loader:o}])=>{if(o)try{An(r)}catch{try{const{diagram:s,id:a}=await o();Ss(a,s,i)}catch(s){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ti[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),FF="graphics-document document";function Ty(e,t){e.attr("role",FF),t!==""&&e.attr("aria-roledescription",t)}p(Ty,"setA11yDiagramInfo");function Sy(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(Sy,"addSVGa11yTitleDescription");var Kr,Jn=(Kr=class{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static async fromText(t,r={}){const i=Vt(),o=dl(t,i);t=IS(t)+`
303
+ `;try{An(o)}catch{const c=s1(o);if(!c)throw new Yd(`Diagram ${o} not found.`);const{id:l,diagram:u}=await c();Ss(l,u)}const{db:s,parser:a,renderer:n,init:h}=An(o);return a.parser&&(a.parser.yy=s),s.clear?.(),h?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new Kr(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Kr,"Diagram"),Kr),sd=[],AF=p(()=>{sd.forEach(e=>{e()}),sd=[]},"attachFunctions"),EF=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function wy(e){const t=e.match(Hd);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
304
+ `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
305
+ `):t[2];let o=wv(i,{schema:Sv})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const s={};return o.displayMode&&(s.displayMode=o.displayMode.toString()),o.title&&(s.title=o.title.toString()),o.config&&(s.config=o.config),{text:e.slice(t[0].length),metadata:s}}p(wy,"extractFrontMatter");var MF=p(e=>e.replace(/\r\n?/g,`
306
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),$F=p(e=>{const{text:t,metadata:r}=wy(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),OF=p(e=>{const t=be.detectInit(e)??{},r=be.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:SS(e),directive:t}},"processDirectives");function mh(e){const t=MF(e),r=$F(t),i=OF(r.text),o=Ll(r.config,i.directive);return e=EF(i.text),{code:e,title:r.title,config:o}}p(mh,"preprocessDiagram");function _y(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(_y,"toBase64");var DF=5e4,IF="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",PF="sandbox",RF="loose",NF="http://www.w3.org/2000/svg",qF="http://www.w3.org/1999/xlink",zF="http://www.w3.org/1999/xhtml",WF="100%",HF="100%",YF="border:0;margin:0;",UF="margin:0",jF="allow-top-navigation-by-user-activation allow-popups",GF='The "iframe" tag is not supported by your browser.',XF=["foreignobject"],VF=["dominant-baseline"];function yh(e){const t=mh(e);return ks(),e1(t.config??{}),t}p(yh,"processAndSetConfigs");async function vy(e,t){na();try{const{code:r,config:i}=yh(e);return{diagramType:(await Ly(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(vy,"parse");var ad=p((e,t,r=[])=>{const i=Rd(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),ZF=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ke(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(h=>{Dh(h.styles)||n.forEach(c=>{r.insertRule(ad(h.id,c,h.styles),r.cssRules.length)}),Dh(h.textStyles)||r.insertRule(ad(h.id,"tspan",(h?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=Fn(o)+`
307
+ `}else i+=`${e.themeCSS}
308
+ `;return i+Fn(r)},"createCssStyles"),KF=p((e,t)=>Qn(zv(`${e}{${t}}`),Yv([p(function(i,o,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Vn)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[Bv,Fv,$m,Ev,"@container","@starting-style"],Vn].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=ph))},"addNamespace"),Hv])),"compileCSS"),QF=p((e,t,r,i)=>{const o=ZF(e,r),s=S1(t,o,{...e.themeVariables,theme:e.theme,look:e.look},i);return KF(i,s)},"createUserStyles"),JF=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Rr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),tA=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":HF,i=_y(`<body style="${UF}">${e}</body>`);return`<iframe style="width:${WF};height:${r};${YF}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${jF}">
309
+ ${GF}
310
+ </iframe>`},"putIntoIFrame"),nd=p((e,t,r,i,o)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",NF);return o&&a.attr("xmlns:xlink",o),a.append("g"),e},"appendDivSvgG");function tl(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(tl,"sandboxedIframe");var eA=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),rA=p(async function(e,t,r){na();const i=yh(t);t=i.code;const o=Vt();z.debug(o),t.length>(o?.maxTextSize??DF)&&(t=IF);const s=`#${e}`,a="i"+e,n="#"+a,h="d"+e,c="#"+h,l=p(()=>{const A=Et(d?n:c).node();A&&"remove"in A&&A.remove()},"removeTempElements");let u=Et(document.body);const d=o.securityLevel===PF,f=o.securityLevel===RF,m=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const I=tl(Et(r),a);u=Et(I.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Et(r);nd(u,e,h,`font-family: ${m}`,qF)}else{if(eA(document,e,h,a),d){const I=tl(Et(document.body),a);u=Et(I.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Et("body");nd(u,e,h)}let y,C;try{y=await Jn.fromText(t,{title:i.title})}catch(I){if(o.suppressErrorRendering)throw l(),I;y=await Jn.fromText("error"),C=I}const x=u.select(c).node(),k=y.type,S=x.firstChild,_=S.firstChild,v=y.renderer.getClasses?.(t,y),L=QF(o,k,v,s),F=document.createElement("style");F.innerHTML=L,S.insertBefore(F,_);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(I){throw o.suppressErrorRendering?l():lL.draw(t,e,"11.17.2"),I}const E=u.select(`${c} svg`),G=y.db.getAccTitle?.(),W=y.db.getAccDescription?.();Fy(k,E,G,W);const J=p(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",zF);let I=u.select(c).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),I=JF(I,d,nr(o.arrowMarkerAbsolute)),d){const A=u.select(c+" svg").node();I=tA(I,A)}else f||(I=Wi.sanitize(I,{ADD_TAGS:XF,ADD_ATTR:VF,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return AF(),I},"serializeSvg")();if(C)throw C;return l(),{diagramType:k,svg:J,bindFunctions:y.db.bindFunctions}},"render");function By(e={}){const t=ne({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Jk(t),t?.theme&&t.theme in xr?t.themeVariables=xr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=xr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Qk(t):Nd();ul(r.logLevel),na()}p(By,"initialize");var Ly=p((e,t={})=>{const{code:r}=mh(e);return Jn.fromText(r,t)},"getDiagramFromText");function Fy(e,t,r,i){Ty(t,e),Sy(t,r,i,t.attr("id"))}p(Fy,"addA11yInfo");var ii=Object.freeze({render:rA,parse:vy,getDiagramFromText:Ly,initialize:By,getConfig:Vt,setConfig:qd,getSiteConfig:Nd,updateSiteConfig:t1,reset:p(()=>{ks()},"reset"),globalReset:p(()=>{ks(Hi)},"globalReset"),defaultConfig:Hi});ul(Vt().logLevel);ks(Vt());var iA=p((e,t,r)=>{z.warn(e),Bl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Ay=p(async function(e={querySelector:".mermaid"}){try{await oA(e)}catch(t){if(Bl(t)&&z.error(t.str),kr.parseError&&kr.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),oA=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ii.getConfig();z.debug(`${e?"":"No "}Callback function found`);let o;if(r)o=r;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");z.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(z.debug("Start On Load: "+i?.startOnLoad),ii.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new be.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const h of Array.from(o)){if(z.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=h.innerHTML,a=ap(be.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const l=be.detectInit(a);l&&z.debug("Detected early reinit: ",l);try{const{svg:u,bindFunctions:d}=await Oy(c,a,h);h.innerHTML=u,e&&await e(c),d&&d(h)}catch(u){iA(u,n,kr.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Ey=p(function(e){ii.initialize(e)},"initialize"),sA=p(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&Ey(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Ay(i)},"init"),aA=p(async(e,{lazyLoad:t=!0}={})=>{na(),vn(...e),t===!1&&await LF()},"registerExternalDiagrams"),My=p(function(){if(kr.startOnLoad){const{startOnLoad:e}=ii.getConfig();e&&kr.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",My,!1);var nA=p(function(e){kr.parseError=e},"setParseErrorHandler"),Ns=[],xn=!1,$y=p(async()=>{if(!xn){for(xn=!0;Ns.length>0;){const e=Ns.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}xn=!1}},"executeQueue"),lA=p(async(e,t)=>new Promise((r,i)=>{const o=p(()=>new Promise((s,a)=>{ii.parse(e,t).then(n=>{s(n),r(n)},n=>{z.error("Error parsing",n),kr.parseError?.(n),a(n),i(n)})}),"performCall");Ns.push(o),$y().catch(i)}),"parse"),Oy=p((e,t,r)=>new Promise((i,o)=>{const s=p(()=>new Promise((a,n)=>{ii.render(e,t,r).then(h=>{a(h),i(h)},h=>{z.error("Error parsing",h),kr.parseError?.(h),n(h),o(h)})}),"performCall");Ns.push(s),$y().catch(o)}),"render"),hA=p(()=>Object.keys(ti).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),kr={startOnLoad:!0,mermaidAPI:ii,parse:lA,render:Oy,init:sA,run:Ay,registerExternalDiagrams:aA,registerLayoutLoaders:Am,initialize:Ey,parseError:void 0,contentLoaded:My,setParseErrorHandler:nA,detectType:dl,registerIconPacks:pS,getRegisteredDiagramsMetadata:hA},cA=kr;const HA=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:Xl,createCommonLayoutRenderer:ym,default:cA,defaultMeasureLayout:Vl,paintLayoutData:Zl},Symbol.toStringTag,{value:"Module"}));export{BS as $,Ll as A,Pd as B,LS as C,HT as D,Vs as E,CA as F,xA as G,Mk as H,Aw as I,MT as J,mA as K,CS as L,wv as M,Sv as N,Eo as O,gA as P,d1 as Q,Vd as R,No as S,or as T,At as U,Wi as V,wc as W,ia as X,$n as Y,xS as Z,p as _,v1 as a,$C as a$,Ge as a0,H as a1,Y as a2,b1 as a3,Kd as a4,tm as a5,jl as a6,Tu as a7,zo as a8,pS as a9,Nh as aA,ud as aB,zs as aC,cd as aD,zC as aE,dd as aF,v0 as aG,dx as aH,EC as aI,qC as aJ,B0 as aK,tc as aL,yr as aM,T0 as aN,Yh as aO,Cs as aP,Cr as aQ,MC as aR,Me as aS,Xh as aT,sl as aU,Sb as aV,Ws as aW,ys as aX,bb as aY,_d as aZ,rr as a_,vl as aa,ut as ab,LA as ac,BA as ad,ym as ae,Rt as af,nm as ag,ft as ah,vA as ai,Rs as aj,hm as ak,ea as al,Gl as am,im as an,N_ as ao,xe as ap,pt as aq,If as ar,am as as,Uf as at,Ld as au,pA as av,Xe as aw,fS as ax,Wb as ay,yA as az,_1 as b,cl as b0,ld as b1,wb as b2,kb as b3,ub as b4,qs as b5,yd as b6,Us as b7,Cd as b8,db as b9,hx as ba,Wr as bb,fo as bc,mi as bd,Zo as be,_a as bf,Mb as bg,S_ as bh,HA as bi,It as c,Zd as d,ne as e,br as f,L1 as g,Kg as h,Ne as i,Et as j,qo as k,z as l,Gf as m,F1 as n,A1 as o,w1 as p,bA as q,Ir as r,B1 as s,Rb as t,WA as u,zA as v,ES as w,be as x,Vt as y,M1 as z};