@befe/vault-system 0.0.0-stage → 0.1.8

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 (99) hide show
  1. package/INSTALL.md +76 -0
  2. package/SKILL.md +302 -0
  3. package/bin/_vault-inner-cli.ts +444 -0
  4. package/cli-module.template.json +9 -0
  5. package/package.json +43 -4
  6. package/src/core/api-version.ts +16 -0
  7. package/src/core/change-collector.ts +115 -0
  8. package/src/core/comment-template.ts +210 -0
  9. package/src/core/comments.ts +303 -0
  10. package/src/core/config.ts +96 -0
  11. package/src/core/ctag-shape.ts +22 -0
  12. package/src/core/ctag.ts +84 -0
  13. package/src/core/format.ts +110 -0
  14. package/src/core/genkey.ts +143 -0
  15. package/src/core/ignore.ts +76 -0
  16. package/src/core/migrate-legacy-cache.ts +59 -0
  17. package/src/core/moved.ts +51 -0
  18. package/src/core/mutate.ts +401 -0
  19. package/src/core/open-order.ts +20 -0
  20. package/src/core/points-search.ts +131 -0
  21. package/src/core/query.ts +221 -0
  22. package/src/core/rebuilder.ts +66 -0
  23. package/src/core/scan.ts +294 -0
  24. package/src/core/service-manager.ts +427 -0
  25. package/src/core/vault-metadata.ts +119 -0
  26. package/src/core/workspace.ts +96 -0
  27. package/src/core/wskey.ts +47 -0
  28. package/src/server/app.ts +712 -0
  29. package/src/server/index.ts +97 -0
  30. package/src/server/scan-worker.ts +10 -0
  31. package/src/server/state.ts +160 -0
  32. package/src/server/watcher.ts +130 -0
  33. package/templates/vault-index-template.md +22 -0
  34. package/web/dist/assets/abnfDiagram-WEYOIA3C-Clrrz6aO.js +1 -0
  35. package/web/dist/assets/arc-BTwSwHaO.js +1 -0
  36. package/web/dist/assets/architectureDiagram-ZHVYKT53-Cc2t0GuJ.js +36 -0
  37. package/web/dist/assets/blockDiagram-RJAE7QA3-CNbK1ZgZ.js +140 -0
  38. package/web/dist/assets/c4Diagram-XDPPPE54-Cyf0T8lC.js +38 -0
  39. package/web/dist/assets/channel-DUo0Wm1H.js +1 -0
  40. package/web/dist/assets/chunk-2E7WHVMD-cO1HGtgb.js +88 -0
  41. package/web/dist/assets/chunk-2Q5K7J3B-heFuFebF.js +1 -0
  42. package/web/dist/assets/chunk-4EMNKR2T-BtTSTbx1.js +1 -0
  43. package/web/dist/assets/chunk-55XCU76K-CsuzGVuA.js +1 -0
  44. package/web/dist/assets/chunk-5VM5RSS4-CHkUK7Na.js +15 -0
  45. package/web/dist/assets/chunk-JWPE2WC7-BcdRnDBp.js +1 -0
  46. package/web/dist/assets/chunk-VQ5W62QI-Dm-aVCex.js +1 -0
  47. package/web/dist/assets/chunk-XXDRQBXY-DvFdV7cE.js +1 -0
  48. package/web/dist/assets/chunk-ZCHMQSOR-_GMZJOh2.js +2 -0
  49. package/web/dist/assets/classDiagram-v2-4MYWR3UA-Dyu-f5sY.js +217 -0
  50. package/web/dist/assets/cose-bilkent-JH36ORCC-Dc00FcYn.js +1 -0
  51. package/web/dist/assets/cynefin-EF2NZ3EQ-CGRcYY9z.js +141 -0
  52. package/web/dist/assets/cynefinDiagram-WF24UDRP-CaQ8qEG7.js +62 -0
  53. package/web/dist/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
  54. package/web/dist/assets/dagre-NK4GIZVX-BJ3S0JEO.js +4 -0
  55. package/web/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  56. package/web/dist/assets/diagram-CBK3MWTC-DFwGBHGn.js +24 -0
  57. package/web/dist/assets/diagram-I5XIIV2D-pcKmZ9Kk.js +24 -0
  58. package/web/dist/assets/diagram-ODIL2UCW-D6oJ8t6N.js +30 -0
  59. package/web/dist/assets/diagram-PFBEJUXE-ypywCTOp.js +3 -0
  60. package/web/dist/assets/diagram-RJA3I4VV-BorkY5MS.js +41 -0
  61. package/web/dist/assets/diagram-TYUNFSNR-T7Bwi21B.js +200 -0
  62. package/web/dist/assets/ebnfDiagram-V4P3TTPT-CW3R519W.js +1 -0
  63. package/web/dist/assets/elk-QONTBCTQ-BdiasG_x.js +27 -0
  64. package/web/dist/assets/erDiagram-KYQIGQAA-CH9y_Q7o.js +99 -0
  65. package/web/dist/assets/flowDiagram-IUGLLWBU-6vX12g0V.js +213 -0
  66. package/web/dist/assets/ganttDiagram-R7GPNTJY-Ca9Z5SFi.js +292 -0
  67. package/web/dist/assets/gitGraphDiagram-PDYL7XHY-DtD9IOhj.js +106 -0
  68. package/web/dist/assets/graph-Bn3Yngep.js +1 -0
  69. package/web/dist/assets/index-MjsRRm95.css +1 -0
  70. package/web/dist/assets/index-eTYW5dTL.js +72 -0
  71. package/web/dist/assets/infoDiagram-MVDRKAX5-BttRtmtq.js +2 -0
  72. package/web/dist/assets/init-Gi6I4Gst.js +1 -0
  73. package/web/dist/assets/ishikawaDiagram-HPEHV2GE-BuGLCWo1.js +70 -0
  74. package/web/dist/assets/journeyDiagram-BOSHW7O7-DLtiEu9c.js +139 -0
  75. package/web/dist/assets/kanban-definition-FNSA4HC5-CQGtMsyR.js +89 -0
  76. package/web/dist/assets/katex-Be3d8Y4U.js +257 -0
  77. package/web/dist/assets/linear-BO_V_WOi.js +1 -0
  78. package/web/dist/assets/mermaid.core-BrDOEsu6.js +314 -0
  79. package/web/dist/assets/mindmap-definition-6OY57UG3-_GFTucKM.js +98 -0
  80. package/web/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  81. package/web/dist/assets/pegDiagram-ECIUJNBX-DfYCgLb5.js +1 -0
  82. package/web/dist/assets/pieDiagram-GNMPY74T-BB9oPfj7.js +39 -0
  83. package/web/dist/assets/quadrantDiagram-D57K4MC3-GT0rwvgr.js +7 -0
  84. package/web/dist/assets/railroadDiagram-Y72NRBL7-DzFREWND.js +1 -0
  85. package/web/dist/assets/requirementDiagram-EQYSW5RA-Co1D_k0J.js +84 -0
  86. package/web/dist/assets/sankeyDiagram-SY24JHO5-BSVsJWqK.js +40 -0
  87. package/web/dist/assets/sequenceDiagram-BLEHNHQU-20qZx9Pi.js +169 -0
  88. package/web/dist/assets/sizeCapture-INFHLROL-BnQdq-uZ.js +1 -0
  89. package/web/dist/assets/stateDiagram-v2-A6IESKWZ-BE5XhAjE.js +291 -0
  90. package/web/dist/assets/swimlanes-B3ENRKFQ-icvIkwDn.js +1 -0
  91. package/web/dist/assets/swimlanesDiagram-AYQRV4AK-lOuiHvx1.js +8 -0
  92. package/web/dist/assets/timeline-definition-JXYKGLGB-96dGf2vq.js +120 -0
  93. package/web/dist/assets/usecaseDiagram-WPOLBNNX-CFXSct0C.js +370 -0
  94. package/web/dist/assets/vennDiagram-Q3Y3IDCW-D_03GSvC.js +34 -0
  95. package/web/dist/assets/wardleyDiagram-IVAIDKWA-vOd1Jr4V.js +78 -0
  96. package/web/dist/assets/xychartDiagram-4URNHDU4-hGZ69wh6.js +7 -0
  97. package/web/dist/favicon.ico +0 -0
  98. package/web/dist/index.html +15 -0
  99. package/README.md +0 -3
@@ -0,0 +1,314 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/elk-QONTBCTQ-BdiasG_x.js","assets/chunk-4EMNKR2T-BtTSTbx1.js","assets/chunk-ZCHMQSOR-_GMZJOh2.js","assets/index-eTYW5dTL.js","assets/index-MjsRRm95.css","assets/graph-Bn3Yngep.js","assets/dagre-NK4GIZVX-BJ3S0JEO.js","assets/swimlanes-B3ENRKFQ-icvIkwDn.js","assets/cose-bilkent-JH36ORCC-Dc00FcYn.js","assets/cytoscape.esm-Ix0LnXOy.js","assets/c4Diagram-XDPPPE54-Cyf0T8lC.js","assets/chunk-55XCU76K-CsuzGVuA.js","assets/flowDiagram-IUGLLWBU-6vX12g0V.js","assets/chunk-5VM5RSS4-CHkUK7Na.js","assets/chunk-XXDRQBXY-DvFdV7cE.js","assets/chunk-VQ5W62QI-Dm-aVCex.js","assets/channel-DUo0Wm1H.js","assets/diagram-TYUNFSNR-T7Bwi21B.js","assets/swimlanesDiagram-AYQRV4AK-lOuiHvx1.js","assets/erDiagram-KYQIGQAA-CH9y_Q7o.js","assets/gitGraphDiagram-PDYL7XHY-DtD9IOhj.js","assets/chunk-2Q5K7J3B-heFuFebF.js","assets/chunk-JWPE2WC7-BcdRnDBp.js","assets/cynefin-EF2NZ3EQ-CGRcYY9z.js","assets/ganttDiagram-R7GPNTJY-Ca9Z5SFi.js","assets/linear-BO_V_WOi.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-MVDRKAX5-BttRtmtq.js","assets/pieDiagram-GNMPY74T-BB9oPfj7.js","assets/arc-BTwSwHaO.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-D57K4MC3-GT0rwvgr.js","assets/xychartDiagram-4URNHDU4-hGZ69wh6.js","assets/requirementDiagram-EQYSW5RA-Co1D_k0J.js","assets/sequenceDiagram-BLEHNHQU-20qZx9Pi.js","assets/classDiagram-v2-4MYWR3UA-Dyu-f5sY.js","assets/stateDiagram-v2-A6IESKWZ-BE5XhAjE.js","assets/journeyDiagram-BOSHW7O7-DLtiEu9c.js","assets/timeline-definition-JXYKGLGB-96dGf2vq.js","assets/mindmap-definition-6OY57UG3-_GFTucKM.js","assets/kanban-definition-FNSA4HC5-CQGtMsyR.js","assets/sankeyDiagram-SY24JHO5-BSVsJWqK.js","assets/diagram-I5XIIV2D-pcKmZ9Kk.js","assets/diagram-RJA3I4VV-BorkY5MS.js","assets/blockDiagram-RJAE7QA3-CNbK1ZgZ.js","assets/diagram-ODIL2UCW-D6oJ8t6N.js","assets/architectureDiagram-ZHVYKT53-Cc2t0GuJ.js","assets/diagram-PFBEJUXE-ypywCTOp.js","assets/ishikawaDiagram-HPEHV2GE-BuGLCWo1.js","assets/vennDiagram-Q3Y3IDCW-D_03GSvC.js","assets/diagram-CBK3MWTC-DFwGBHGn.js","assets/usecaseDiagram-WPOLBNNX-CFXSct0C.js","assets/wardleyDiagram-IVAIDKWA-vOd1Jr4V.js","assets/cynefinDiagram-WF24UDRP-CaQ8qEG7.js","assets/railroadDiagram-Y72NRBL7-DzFREWND.js","assets/chunk-2E7WHVMD-cO1HGtgb.js","assets/ebnfDiagram-V4P3TTPT-CW3R519W.js","assets/abnfDiagram-WEYOIA3C-Clrrz6aO.js","assets/pegDiagram-ECIUJNBX-DfYCgLb5.js"])))=>i.map(i=>d[i]);
2
+ var t0=Object.defineProperty;var e0=(e,t,r)=>t in e?t0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Zt=(e,t,r)=>e0(e,typeof t!="symbol"?t+"":t,r);import{g as r0,_ as Wt}from"./index-eTYW5dTL.js";var Cd=Object.defineProperty,p=(e,t)=>Cd(e,"name",{value:t,configurable:!0}),i0=(e,t)=>{for(var r in t)Cd(e,r,{get:t[r],enumerable:!0})},ca={exports:{}},s0=ca.exports,Xh;function a0(){return Xh||(Xh=1,(function(e,t){(function(r,i){e.exports=i()})(s0,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",n="second",o="minute",c="hour",h="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,b={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(E){var M=["th","st","nd","rd"],v=E%100;return"["+E+(M[(v-20)%10]||M[v]||M[0])+"]"}},k=function(E,M,v){var R=String(E);return!R||R.length>=M?E:""+Array(M+1-R.length).join(v)+E},T={s:k,z:function(E){var M=-E.utcOffset(),v=Math.abs(M),R=Math.floor(v/60),O=v%60;return(M<=0?"+":"-")+k(R,2,"0")+":"+k(O,2,"0")},m:function E(M,v){if(M.date()<v.date())return-E(v,M);var R=12*(v.year()-M.year())+(v.month()-M.month()),O=M.clone().add(R,u),X=v-O<0,Z=M.clone().add(R+(X?-1:1),u);return+(-(R+(v-O)/(X?O-Z:Z-O))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:u,y:f,w:l,d:h,D:m,h:c,m:o,s:n,ms:a,Q:d}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},B="en",L={};L[B]=b;var A="$isDayjsObject",F=function(E){return E instanceof rt||!(!E||!E[A])},z=function E(M,v,R){var O;if(!M)return B;if(typeof M=="string"){var X=M.toLowerCase();L[X]&&(O=X),v&&(L[X]=v,O=X);var Z=M.split("-");if(!O&&Z.length>1)return E(Z[0])}else{var lt=M.name;L[lt]=M,O=lt}return!R&&O&&(B=O),O||!R&&B},q=function(E,M){if(F(E))return E.clone();var v=typeof M=="object"?M:{};return v.date=E,v.args=arguments,new rt(v)},D=T;D.l=z,D.i=F,D.w=function(E,M){return q(E,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var rt=(function(){function E(v){this.$L=z(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[A]=!0}var M=E.prototype;return M.parse=function(v){this.$d=(function(R){var O=R.date,X=R.utc;if(O===null)return new Date(NaN);if(D.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var Z=O.match(C);if(Z){var lt=Z[2]-1||0,ht=(Z[7]||"0").substring(0,3);return X?new Date(Date.UTC(Z[1],lt,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ht)):new Date(Z[1],lt,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ht)}}return new Date(O)})(v),this.init()},M.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},M.$utils=function(){return D},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(v,R){var O=q(v);return this.startOf(R)<=O&&O<=this.endOf(R)},M.isAfter=function(v,R){return q(v)<this.startOf(R)},M.isBefore=function(v,R){return this.endOf(R)<q(v)},M.$g=function(v,R,O){return D.u(v)?this[R]:this.set(O,v)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(v,R){var O=this,X=!!D.u(R)||R,Z=D.p(v),lt=function(_t,ct){var Ct=D.w(O.$u?Date.UTC(O.$y,ct,_t):new Date(O.$y,ct,_t),O);return X?Ct:Ct.endOf(h)},ht=function(_t,ct){return D.w(O.toDate()[_t].apply(O.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(ct)),O)},dt=this.$W,bt=this.$M,St=this.$D,yt="set"+(this.$u?"UTC":"");switch(Z){case f:return X?lt(1,0):lt(31,11);case u:return X?lt(1,bt):lt(0,bt+1);case l:var At=this.$locale().weekStart||0,Dt=(dt<At?dt+7:dt)-At;return lt(X?St-Dt:St+(6-Dt),bt);case h:case m:return ht(yt+"Hours",0);case c:return ht(yt+"Minutes",1);case o:return ht(yt+"Seconds",2);case n:return ht(yt+"Milliseconds",3);default:return this.clone()}},M.endOf=function(v){return this.startOf(v,!1)},M.$set=function(v,R){var O,X=D.p(v),Z="set"+(this.$u?"UTC":""),lt=(O={},O[h]=Z+"Date",O[m]=Z+"Date",O[u]=Z+"Month",O[f]=Z+"FullYear",O[c]=Z+"Hours",O[o]=Z+"Minutes",O[n]=Z+"Seconds",O[a]=Z+"Milliseconds",O)[X],ht=X===h?this.$D+(R-this.$W):R;if(X===u||X===f){var dt=this.clone().set(m,1);dt.$d[lt](ht),dt.init(),this.$d=dt.set(m,Math.min(this.$D,dt.daysInMonth())).$d}else lt&&this.$d[lt](ht);return this.init(),this},M.set=function(v,R){return this.clone().$set(v,R)},M.get=function(v){return this[D.p(v)]()},M.add=function(v,R){var O,X=this;v=Number(v);var Z=D.p(R),lt=function(bt){var St=q(X);return D.w(St.date(St.date()+Math.round(bt*v)),X)};if(Z===u)return this.set(u,this.$M+v);if(Z===f)return this.set(f,this.$y+v);if(Z===h)return lt(1);if(Z===l)return lt(7);var ht=(O={},O[o]=i,O[c]=s,O[n]=r,O)[Z]||1,dt=this.$d.getTime()+v*ht;return D.w(dt,this)},M.subtract=function(v,R){return this.add(-1*v,R)},M.format=function(v){var R=this,O=this.$locale();if(!this.isValid())return O.invalidDate||y;var X=v||"YYYY-MM-DDTHH:mm:ssZ",Z=D.z(this),lt=this.$H,ht=this.$m,dt=this.$M,bt=O.weekdays,St=O.months,yt=O.meridiem,At=function(ct,Ct,Et,Nt){return ct&&(ct[Ct]||ct(R,X))||Et[Ct].slice(0,Nt)},Dt=function(ct){return D.s(lt%12||12,ct,"0")},_t=yt||function(ct,Ct,Et){var Nt=ct<12?"AM":"PM";return Et?Nt.toLowerCase():Nt};return X.replace(x,(function(ct,Ct){return Ct||(function(Et){switch(Et){case"YY":return String(R.$y).slice(-2);case"YYYY":return D.s(R.$y,4,"0");case"M":return dt+1;case"MM":return D.s(dt+1,2,"0");case"MMM":return At(O.monthsShort,dt,St,3);case"MMMM":return At(St,dt);case"D":return R.$D;case"DD":return D.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return At(O.weekdaysMin,R.$W,bt,2);case"ddd":return At(O.weekdaysShort,R.$W,bt,3);case"dddd":return bt[R.$W];case"H":return String(lt);case"HH":return D.s(lt,2,"0");case"h":return Dt(1);case"hh":return Dt(2);case"a":return _t(lt,ht,!0);case"A":return _t(lt,ht,!1);case"m":return String(ht);case"mm":return D.s(ht,2,"0");case"s":return String(R.$s);case"ss":return D.s(R.$s,2,"0");case"SSS":return D.s(R.$ms,3,"0");case"Z":return Z}return null})(ct)||Z.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(v,R,O){var X,Z=this,lt=D.p(R),ht=q(v),dt=(ht.utcOffset()-this.utcOffset())*i,bt=this-ht,St=function(){return D.m(Z,ht)};switch(lt){case f:X=St()/12;break;case u:X=St();break;case d:X=St()/3;break;case l:X=(bt-dt)/6048e5;break;case h:X=(bt-dt)/864e5;break;case c:X=bt/s;break;case o:X=bt/i;break;case n:X=bt/r;break;default:X=bt}return O?X:D.a(X)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return L[this.$L]},M.locale=function(v,R){if(!v)return this.$L;var O=this.clone(),X=z(v,R,!0);return X&&(O.$L=X),O},M.clone=function(){return D.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},E})(),W=rt.prototype;return q.prototype=W,[["$ms",a],["$s",n],["$m",o],["$H",c],["$W",h],["$M",u],["$y",f],["$D",m]].forEach((function(E){W[E[1]]=function(M){return this.$g(M,E[0],E[1])}})),q.extend=function(E,M){return E.$i||(E(M,rt,q),E.$i=!0),q},q.locale=z,q.isDayjs=F,q.unix=function(E){return q(1e3*E)},q.en=L[B],q.Ls=L,q.p={},q}))})(ca)),ca.exports}var o0=a0();const n0=r0(o0);var gr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},J={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},gl=p(function(e="fatal"){let t=gr.fatal;typeof e=="string"?e.toLowerCase()in gr&&(t=gr[e]):typeof e=="number"&&(t=e),J.trace=()=>{},J.debug=()=>{},J.info=()=>{},J.warn=()=>{},J.error=()=>{},J.fatal=()=>{},t<=gr.fatal&&(J.fatal=console.error?console.error.bind(console,Re("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Re("FATAL"))),t<=gr.error&&(J.error=console.error?console.error.bind(console,Re("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Re("ERROR"))),t<=gr.warn&&(J.warn=console.warn?console.warn.bind(console,Re("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Re("WARN"))),t<=gr.info&&(J.info=console.info?console.info.bind(console,Re("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Re("INFO"))),t<=gr.debug&&(J.debug=console.debug?console.debug.bind(console,Re("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Re("DEBUG"))),t<=gr.trace&&(J.trace=console.debug?console.debug.bind(console,Re("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Re("TRACE")))},"setLogLevel"),Re=p(e=>`%c${n0().format("ss.SSS")} : ${e} : `,"format");const ua={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 s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return ua.hue2rgb(a,s,e+1/3)*255;case"g":return ua.hue2rgb(a,s,e)*255;case"b":return ua.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),n=(s+a)/2;if(i==="l")return n*100;if(s===a)return 0;const o=s-a,c=n>.5?o/(2-s-a):o/(s+a);if(i==="s")return c*100;switch(s){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},l0={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},h0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},It={channel:ua,lang:l0,unit:h0},Ir={};for(let e=0;e<=255;e++)Ir[e]=It.unit.dec2hex(e);const xe={ALL:0,RGB:1,HSL:2};let c0=class{constructor(){this.type=xe.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=xe.ALL}is(t){return this.type===t}};class u0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new c0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=xe.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=It.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=It.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=It.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=It.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=It.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=It.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(xe.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(xe.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(xe.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(xe.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(xe.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(xe.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(xe.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(xe.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(xe.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(xe.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(xe.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(xe.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ka=new u0({r:0,g:0,b:0,a:0},"transparent"),bi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(bi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,n=s>4,o=n?1:17,c=n?8:4,h=a?0:-1,l=n?255:15;return Ka.set({r:(i>>c*(h+3)&l)*o,g:(i>>c*(h+2)&l)*o,b:(i>>c*(h+1)&l)*o,a:a?(i&l)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ir[Math.round(t)]}${Ir[Math.round(r)]}${Ir[Math.round(i)]}${Ir[Math.round(s*255)]}`:`#${Ir[Math.round(t)]}${Ir[Math.round(r)]}${Ir[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 It.channel.clamp.h(parseFloat(r)*.9);case"rad":return It.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return It.channel.clamp.h(parseFloat(r)*360)}}return It.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,s,a,n,o]=r;return Ka.set({h:Vr._hue2deg(i),s:It.channel.clamp.s(parseFloat(s)),l:It.channel.clamp.l(parseFloat(a)),a:n?It.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${It.lang.round(t)}, ${It.lang.round(r)}%, ${It.lang.round(i)}%, ${s})`:`hsl(${It.lang.round(t)}, ${It.lang.round(r)}%, ${It.lang.round(i)}%)`}},ks={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=ks.colors[e];if(t)return bi.parse(t)},stringify:e=>{const t=bi.stringify(e);for(const r in ks.colors)if(ks.colors[r]===t)return r}},ds={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(ds.re);if(!r)return;const[,i,s,a,n,o,c,h,l]=r;return Ka.set({r:It.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:It.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:It.channel.clamp.b(c?parseFloat(o)*2.55:parseFloat(o)),a:h?It.channel.clamp.a(l?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${It.lang.round(t)}, ${It.lang.round(r)}, ${It.lang.round(i)}, ${It.lang.round(s)})`:`rgb(${It.lang.round(t)}, ${It.lang.round(r)}, ${It.lang.round(i)})`}},or={format:{keyword:ks,hex:bi,rgb:ds,rgba:ds,hsl:Vr,hsla:Vr},parse:e=>{if(typeof e!="string")return e;const t=bi.parse(e)||ds.parse(e)||Vr.parse(e)||ks.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(xe.HSL)||e.data.r===void 0?Vr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ds.stringify(e):bi.stringify(e)},bd=(e,t)=>{const r=or.parse(e);for(const i in t)r[i]=It.channel.clamp[i](t[i]);return or.stringify(r)},Rr=(e,t,r=0,i=1)=>{if(typeof e!="number")return bd(e,{a:t});const s=Ka.set({r:It.channel.clamp.r(e),g:It.channel.clamp.g(t),b:It.channel.clamp.b(r),a:It.channel.clamp.a(i)});return or.stringify(s)},d0=e=>{const{r:t,g:r,b:i}=or.parse(e),s=.2126*It.channel.toLinear(t)+.7152*It.channel.toLinear(r)+.0722*It.channel.toLinear(i);return It.lang.round(s)},f0=e=>d0(e)>=.5,Ae=e=>!f0(e),kd=(e,t,r)=>{const i=or.parse(e),s=i[t],a=It.channel.clamp[t](s+r);return s!==a&&(i[t]=a),or.stringify(i)},Y=(e,t)=>kd(e,"l",t),U=(e,t)=>kd(e,"l",-t),w=(e,t)=>{const r=or.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return bd(e,i)},p0=(e,t,r=50)=>{const{r:i,g:s,b:a,a:n}=or.parse(e),{r:o,g:c,b:h,a:l}=or.parse(t),u=r/100,d=u*2-1,f=n-l,y=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,C=1-y,x=i*y+o*C,b=s*y+c*C,k=a*y+h*C,T=n*u+l*(1-u);return Rr(x,b,k,T)},I=(e,t=100)=>{const r=or.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,p0(r,e,t)};/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function Vh(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 g0(e){if(Array.isArray(e))return e}function m0(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,n,o=[],c=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);c=!0);}catch(l){h=!0,s=l}finally{try{if(!c&&r.return!=null&&(n=r.return(),Object(n)!==n))return}finally{if(h)throw s}}return o}}function y0(){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.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function x0(e,t){return g0(e)||m0(e,t)||C0(e,t)||y0()}function C0(e,t){if(e){if(typeof e=="string")return Vh(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)?Vh(e,t):void 0}}const wd=Object.entries,Zh=Object.setPrototypeOf,b0=Object.isFrozen,Sd=Object.getPrototypeOf,Td=Object.getOwnPropertyDescriptor;let ce=Object.freeze,me=Object.seal,mi=Object.create,_d=typeof Reflect<"u"&&Reflect,Ln=_d.apply,Fn=_d.construct;ce||(ce=function(t){return t});me||(me=function(t){return t});Ln||(Ln=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Fn||(Fn=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const mr=Jt(Array.prototype.forEach),k0=Jt(Array.prototype.lastIndexOf),Kh=Jt(Array.prototype.pop),ts=Jt(Array.prototype.push),w0=Jt(Array.prototype.slice),S0=Jt(Array.prototype.splice),ki=Array.isArray,Ao=Bd(Set),Eo=Jt(Set.prototype.add),es=Jt(Set.prototype.has),jr=Jt(String.prototype.toLowerCase),Mo=Jt(String.prototype.toString),Qh=Jt(String.prototype.match),rs=Jt(String.prototype.replace),Jh=Jt(String.prototype.indexOf),T0=Jt(String.prototype.trim),_0=Jt(Number.prototype.toString),B0=Jt(Boolean.prototype.toString),tc=typeof BigInt>"u"?null:Jt(BigInt.prototype.toString),ec=typeof Symbol>"u"?null:Jt(Symbol.prototype.toString),Le=Jt(Object.prototype.hasOwnProperty),is=Jt(Object.prototype.toString),fe=Jt(RegExp.prototype.test),yr=Bd(TypeError);function Jt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return Ln(e,t,i)}}function Bd(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Fn(e,r)}}function Ut(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jr;if(Zh&&Zh(e,null),!ki(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(b0(t)||(t[i]=a),s=a)}e[s]=!0}return e}function v0(e){for(let t=0;t<e.length;t++)Le(e,t)||(e[t]=null);return e}function Me(e){const t=mi(null);for(const i of wd(e)){var r=x0(i,2);const s=r[0],a=r[1];Le(e,s)&&(ki(a)?t[s]=v0(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Me(a):t[s]=a)}return t}function L0(e){switch(typeof e){case"string":return e;case"number":return _0(e);case"boolean":return B0(e);case"bigint":return tc?tc(e):"0";case"symbol":return ec?ec(e):"Symbol()";case"undefined":return is(e);case"function":case"object":{if(e===null)return is(e);const t=e,r=qe(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:is(i)}return is(e)}default:return is(e)}}function qe(e,t){for(;e!==null;){const i=Td(e,t);if(i){if(i.get)return Jt(i.get);if(typeof i.value=="function")return Jt(i.value)}e=Sd(e)}function r(){return null}return r}function F0(e,t){for(;e!==null;){const r=Td(e,t);if(r)return r.get?Jt(r.get):null;e=Sd(e)}return null}function A0(e){try{return fe(e,""),!0}catch{return!1}}const rc=ce(["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"]),$o=ce(["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"]),Oo=ce(["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"]),E0=ce(["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"]),Io=ce(["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"]),M0=ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ic=ce(["#text"]),sc=ce(["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"]),Do=ce(["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"]),ac=ce(["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"]),Vs=ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$0=me(/{{[\w\W]*|^[\w\W]*}}/g),O0=me(/<%[\w\W]*|^[\w\W]*%>/g),I0=me(/\${[\w\W]*/g),D0=me(/^data-[\-\w.\u00B7-\uFFFF]+$/),P0=me(/^aria-[\-\w]+$/),oc=me(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),R0=me(/^(?:\w+script|data):/i),q0=me(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),N0=me(/^html$/i),W0=me(/^[a-z][.\w]*(-[.\w]+)+$/i),Po=me(/<[/\w!]/g),nc=me(/<[/\w]/g),z0=me(/<\/no(script|embed|frames)/i),lc=me(/\/>/i),se={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},H0=ce(Ut({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),Y0=function(){return typeof window>"u"?null:window},U0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},hc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},$r=function(t,r,i,s){return Le(t,r)&&ki(t[r])?Ut(s.base?Me(s.base):{},t[r],s.transform):i},Ro=function(t,r,i){const s=Le(t,r)?t[r]:void 0;return s&&typeof s=="object"?Me(s):i()};function vd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y0();const t=at=>vd(at);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==se.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,n=e.Node,o=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,l=e.trustedTypes,u=o.prototype,d=qe(u,"cloneNode"),f=qe(u,"remove"),m=qe(u,"removeAttributeNode"),y=qe(u,"nextSibling"),C=qe(u,"childNodes"),x=qe(u,"parentNode"),b=qe(u,"shadowRoot"),k=qe(u,"attributes"),T=n&&n.prototype?qe(n.prototype,"nodeType"):null,B=n&&n.prototype?qe(n.prototype,"nodeName"):null,L=n&&n.prototype?qe(n.prototype,"ownerDocument"):null,A=function(_){return T?T(_):_.nodeType},F=function(_){return B?B(_):_.nodeName},z=F0(u,"namespaceURI"),q=function(_){return z?z(_):_.namespaceURI};if(typeof a=="function"){const at=r.createElement("template");at.content&&at.content.ownerDocument&&(r=at.content.ownerDocument)}let D,rt="",W,E=!1,M=0;const v=function(){if(M>0)throw yr('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.')},R=function(_){v(),M++;try{return D.createHTML(_)}finally{M--}},O=function(_){v(),M++;try{return D.createScriptURL(_)}finally{M--}},X=function(){return E||(W=U0(l,s),E=!0),W},Z=r,lt=Z.implementation,ht=Z.createNodeIterator,dt=Z.createDocumentFragment,bt=Z.getElementsByTagName,St=i.importNode;let yt=hc();t.isSupported=typeof wd=="function"&&typeof x=="function"&&lt&&lt.createHTMLDocument!==void 0;const At=$0,Dt=O0,_t=I0,ct=D0,Ct=P0,Et=R0,Nt=q0,Gt=W0;let H=oc,kt=null;const ke=Ut({},[...rc,...$o,...Oo,...Io,...ic]);let Ht=null;const dr=Ut({},[...sc,...Do,...ac,...Vs]);let de=Object.seal(mi(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}})),Pe=null,vr=null;const ie=Object.seal(mi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Lr=!0,Qe=!0,fr=!1,pr=!0,g=!1,P=!0,G=!1,K=!1,j=null,nt=null,S=!1,N=!1,it=!1,V=!1,Q=!0,ot=!1;const st="user-content-";let wt=!0,gt=!1,Tt=null,Lt={},qt=null;const Vt=Ut({},["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 Zi=null;const Fr=Ut({},["audio","video","img","source","image","track"]);let Ar=null;const Eh=Ut({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ys="http://www.w3.org/1998/Math/MathML",Us="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let oi=Je,mo=!1,yo=null;const Oy=Ut({},[Ys,Us,Je],Mo),Mh=ce(["mi","mo","mn","ms","mtext"]);let xo=Ut({},Mh);const $h=ce(["annotation-xml"]);let Co=Ut({},$h);const Iy=Ut({},["title","style","font","a","script"]);let Ki=null;const Dy=["application/xhtml+xml","text/html"],Py="text/html";let ee=null,ni=null;const Ry=r.createElement("form"),Oh=function(_){return _ instanceof RegExp||_ instanceof Function},bo=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ni&&ni===_)return;(!_||typeof _!="object")&&(_={}),_=Me(_),Ki=Dy.indexOf(_.PARSER_MEDIA_TYPE)===-1?Py:_.PARSER_MEDIA_TYPE,ee=Ki==="application/xhtml+xml"?Mo:jr,kt=$r(_,"ALLOWED_TAGS",ke,{transform:ee}),Ht=$r(_,"ALLOWED_ATTR",dr,{transform:ee}),yo=$r(_,"ALLOWED_NAMESPACES",Oy,{transform:Mo}),Ar=$r(_,"ADD_URI_SAFE_ATTR",Eh,{transform:ee,base:Eh}),Zi=$r(_,"ADD_DATA_URI_TAGS",Fr,{transform:ee,base:Fr}),qt=$r(_,"FORBID_CONTENTS",Vt,{transform:ee}),Pe=$r(_,"FORBID_TAGS",Me({}),{transform:ee}),vr=$r(_,"FORBID_ATTR",Me({}),{transform:ee}),Lt=Le(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?Me(_.USE_PROFILES):_.USE_PROFILES:!1,Lr=_.ALLOW_ARIA_ATTR!==!1,Qe=_.ALLOW_DATA_ATTR!==!1,fr=_.ALLOW_UNKNOWN_PROTOCOLS||!1,pr=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,g=_.SAFE_FOR_TEMPLATES||!1,P=_.SAFE_FOR_XML!==!1,G=_.WHOLE_DOCUMENT||!1,N=_.RETURN_DOM||!1,it=_.RETURN_DOM_FRAGMENT||!1,V=_.RETURN_TRUSTED_TYPE||!1,S=_.FORCE_BODY||!1,Q=_.SANITIZE_DOM!==!1,ot=_.SANITIZE_NAMED_PROPS||!1,wt=_.KEEP_CONTENT!==!1,gt=_.IN_PLACE||!1,H=A0(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:oc,oi=typeof _.NAMESPACE=="string"?_.NAMESPACE:Je,xo=Ro(_,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ut({},Mh)),Co=Ro(_,"HTML_INTEGRATION_POINTS",()=>Ut({},$h));const $=Ro(_,"CUSTOM_ELEMENT_HANDLING",()=>mi(null));if(de=mi(null),Le($,"tagNameCheck")&&Oh($.tagNameCheck)&&(de.tagNameCheck=$.tagNameCheck),Le($,"attributeNameCheck")&&Oh($.attributeNameCheck)&&(de.attributeNameCheck=$.attributeNameCheck),Le($,"allowCustomizedBuiltInElements")&&typeof $.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=$.allowCustomizedBuiltInElements),me(de),g&&(Qe=!1),it&&(N=!0),Lt&&(kt=Ut({},ic),Ht=mi(null),Lt.html===!0&&(Ut(kt,rc),Ut(Ht,sc)),Lt.svg===!0&&(Ut(kt,$o),Ut(Ht,Do),Ut(Ht,Vs)),Lt.svgFilters===!0&&(Ut(kt,Oo),Ut(Ht,Do),Ut(Ht,Vs)),Lt.mathMl===!0&&(Ut(kt,Io),Ut(Ht,ac),Ut(Ht,Vs))),ie.tagCheck=null,ie.attributeCheck=null,Le(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?ie.tagCheck=_.ADD_TAGS:ki(_.ADD_TAGS)&&(kt===ke&&(kt=Me(kt)),Ut(kt,_.ADD_TAGS,ee))),Le(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?ie.attributeCheck=_.ADD_ATTR:ki(_.ADD_ATTR)&&(Ht===dr&&(Ht=Me(Ht)),Ut(Ht,_.ADD_ATTR,ee))),Le(_,"ADD_FORBID_CONTENTS")&&ki(_.ADD_FORBID_CONTENTS)&&(qt===Vt&&(qt=Me(qt)),Ut(qt,_.ADD_FORBID_CONTENTS,ee)),wt&&(kt["#text"]=!0),G&&Ut(kt,["html","head","body"]),kt.table&&(Ut(kt,["tbody"]),delete Pe.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const tt=D;D=_.TRUSTED_TYPES_POLICY;try{rt=R("")}catch(et){throw D=tt,et}}else _.TRUSTED_TYPES_POLICY===null?(D=void 0,rt=""):(D===void 0&&(D=X()),D&&typeof rt=="string"&&(rt=R("")));ce&&ce(_),ni=_},Ih=Ut({},[...$o,...Oo,...E0]),Dh=Ut({},[...Io,...M0]),qy=function(_,$,tt){return $.namespaceURI===Je?_==="svg":$.namespaceURI===Ys?_==="svg"&&(tt==="annotation-xml"||xo[tt]):!!Ih[_]},Ny=function(_,$,tt){return $.namespaceURI===Je?_==="math":$.namespaceURI===Us?_==="math"&&Co[tt]:!!Dh[_]},Wy=function(_,$,tt){return $.namespaceURI===Us&&!Co[tt]||$.namespaceURI===Ys&&!xo[tt]?!1:!Dh[_]&&(Iy[_]||!Ih[_])},zy=function(_){const $=q(_),tt=jr(F(_)),et=x(_);let Ft,Ot;return et&&A(et)===se.element?(Ft={namespaceURI:q(et)},Ot=jr(F(et))):(Ft={namespaceURI:oi},Ot="template"),yo[$]?$===Us?qy(tt,Ft,Ot):$===Ys?Ny(tt,Ft,Ot):$===Je?Wy(tt,Ft,Ot):!!(Ki==="application/xhtml+xml"&&yo[$]):!1},Er=function(_){ts(t.removed,{element:_});try{x(_).removeChild(_)}catch{if(f(_),!x(_))throw yr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ph=function(_,$,tt){try{m(_,$)}catch{try{_.removeAttribute(tt)}catch{}}},ko=function(_){So(_);const $=C(_);$&&mr(w0($),et=>{try{f(et)}catch{}});const tt=A(_)===se.element?k(_):null;if(tt)for(let et=tt.length-1;et>=0;--et){const Ft=tt[et],Ot=Ft&&Ft.name;typeof Ot=="string"&&Ph(_,Ft,Ot)}},li=function(_,$,tt){if(!tt)try{tt=$.getAttributeNode(_)}catch{tt=null}ts(t.removed,{attribute:tt||null,from:$});try{tt?m($,tt):$.removeAttribute(_)}catch{try{$.removeAttribute(_)}catch{}}if(_==="is")if(N||it)try{Er($)}catch{}else try{$.setAttribute(_,"")}catch{}},Rh=function(_){const $=k(_);if($)for(let tt=$.length-1;tt>=0;--tt){const et=$[tt],Ft=et&&et.name;typeof Ft!="string"||Ht[ee(Ft)]||Ph(_,et,Ft)}},wo=function(_,$){let tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const et=[_];for(;et.length>0;){const Ft=et.pop();if($(Ft)===!1)continue;if(tt&&A(Ft)===se.element){const zt=b(Ft);Mr(zt)&&et.push(zt)}const Ot=C(Ft);if(Ot)for(let zt=Ot.length-1;zt>=0;--zt)et.push(Ot[zt])}},So=function(_){wo(_,$=>{A($)===se.element&&Rh($)})},To=function(_){const $=[];return wo(_,tt=>{$.push(tt)},!0),$},Hy=function(_,$){const tt=Ao();mr(To(_),et=>{A(et)===se.element&&Eo(tt,et)}),mr($,et=>{A(et)===se.element&&!es(tt,et)&&Rh(et)})},qh=function(_,$){let tt=!1;return mr(t.removed,et=>{et.element&&(tt=tt||et.element===_,So(et.element))}),Hy(_,$),tt},Yy=8,Uy=function(_,$){const tt=Tt;let et=null;const Ft=()=>(et||(et=Ao(),mr($,Ot=>{Eo(et,Ot)})),et);for(let Ot=0;;Ot++){const zt=To(_),le=[_];let tr=!1;if(mr(zt,we=>{A(we)===se.documentFragment?ts(le,we):!tr&&!es(tt,we)&&(tr=es(Ft(),we))}),!tr)return;if(Ot>=Yy)throw yr("the tree kept changing during in-place sanitization; refusing to return it");mr(le,(we,_e)=>{jy(we,_e>0,_,Ft())})}},jy=function(_,$,tt,et){const Ft=_o(_);let Ot;for(;Ot=Ft.nextNode();)!es(et,Ot)||es(Tt,Ot)||($&&Ye(yt.uponSanitizeShadowNode,Ot,null),vo(Ot,tt),Lo(Ot,tt),Mr(Ot.content)&&Ji(Ot.content))},Gy=function(_){Tt&&Eo(Tt,_)},Nh=function(_,$){return P?_==="patchsrc"?!0:_==="for"&&$!=="label"&&$!=="output":!1},Xy=function(_){P&&wo(_,$=>{const tt=A($);if(tt===se.processingInstruction||tt===se.comment&&fe(nc,$.data)){try{f($)}catch{}return!1}if(tt===se.element){const et=$,Ft=ee(F($));try{et.hasAttribute&&et.hasAttribute("patchsrc")&&et.removeAttribute("patchsrc"),et.hasAttribute&&et.hasAttribute("for")&&Nh("for",Ft)&&et.removeAttribute("for")}catch{}}return!0})},Wh=function(_){let $=null,tt=null;if(S)_="<remove></remove>"+_;else{const Ot=Qh(_,/^[\r\n\t ]+/);tt=Ot&&Ot[0]}Ki==="application/xhtml+xml"&&oi===Je&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const et=D?R(_):_;if(oi===Je)try{$=new h().parseFromString(et,Ki)}catch{}if(!$||!$.documentElement){$=lt.createDocument(oi,"template",null);try{$.documentElement.innerHTML=mo?rt:et}catch{}}const Ft=$.body||$.documentElement;return _&&tt&&Ft.insertBefore(r.createTextNode(tt),Ft.childNodes[0]||null),oi===Je?bt.call($,G?"html":"body")[0]:G?$.documentElement:Ft},_o=function(_){const $=L?L(_):_.ownerDocument;return ht.call($||_,_,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},js=function(_){return _=rs(_,At," "),_=rs(_,Dt," "),_=rs(_,_t," "),_},Bo=function(_){var $;zh(_);const tt=($=_.querySelectorAll)===null||$===void 0?void 0:$.call(_,"template");tt&&mr(tt,et=>{Mr(et.content)&&Bo(et.content)})},zh=function(_){_.normalize();const $=L?L(_):_.ownerDocument,tt=ht.call($||_,_,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let et=tt.nextNode();for(;et;)et.data=js(et.data),et=tt.nextNode()},Gs=function(_){const $=B?B(_):null;return typeof $!="string"||ee($)!=="form"?!1:typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||_.attributes!==k(_)||typeof _.removeAttribute!="function"||typeof _.removeAttributeNode!="function"||typeof _.getAttributeNode!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function"||_.nodeType!==T(_)||_.childNodes!==C(_)},Mr=function(_){if(!T||typeof _!="object"||_===null)return!1;try{return T(_)===se.documentFragment}catch{return!1}},Qi=function(_){if(!T||typeof _!="object"||_===null)return!1;try{return typeof T(_)=="number"}catch{return!1}};function Ye(at,_,$){at.length!==0&&mr(at,tt=>{tt.call(t,_,$,ni)})}const Vy=function(_,$){return!!(P&&_.hasChildNodes()&&!Qi(_.firstElementChild)&&fe(Po,_.textContent)&&fe(Po,_.innerHTML)||P&&H0[$]&&A(_)===se.element&&q(_)===Je&&(Qi(_.firstElementChild)||typeof _.textContent=="string"&&fe(Po,_.textContent))||_.nodeType===se.processingInstruction||P&&_.nodeType===se.comment&&fe(nc,_.data))},Xs=function(_,$){if(_ instanceof RegExp)return fe(_,$);if(_ instanceof Function){for(var tt=arguments.length,et=new Array(tt>2?tt-2:0),Ft=2;Ft<tt;Ft++)et[Ft-2]=arguments[Ft];return!!_($,...et)}return!1},Zy=function(_,$,tt){if(!Pe[$]&&Uh($)&&Xs(de.tagNameCheck,$))return!1;if(wt&&!qt[$]&&!qt[jr($)]){const et=x(_),Ft=C(_);if(Ft&&et){const Ot=Ft.length;for(let zt=Ot-1;zt>=0;--zt){const le=_===tt?d(Ft[zt],!0):Ft[zt];et.insertBefore(le,y(_))}}}return Er(_),!0},Hh=function(_,$,tt,et){return _.length===0?$:$===tt||$===et?Me($):$},hi=function(_,$){return _===$||x(_)!==null?!1:(gt&&So(_),!0)},vo=function(_,$){if(Gy(_),Ye(yt.beforeSanitizeElements,_,null),hi(_,$))return!0;if(Gs(_))return Er(_),!0;const tt=ee(F(_));if(kt=Hh(yt.uponSanitizeElement,kt,ke,j),Ye(yt.uponSanitizeElement,_,{tagName:tt,allowedTags:kt}),hi(_,$))return!0;if(Vy(_,tt))return Er(_),!0;if(Pe[tt]||!(ie.tagCheck instanceof Function&&ie.tagCheck(tt))&&!kt[tt]){const et=Zy(_,tt,$);return et===!1&&(Ye(yt.afterSanitizeElements,_,null),hi(_,$))?!0:et}if(A(_)===se.element&&!zy(_)||(tt==="noscript"||tt==="noembed"||tt==="noframes")&&fe(z0,_.innerHTML))return Er(_),!0;if(g&&_.nodeType===se.text){const et=js(_.textContent);_.textContent!==et&&(ts(t.removed,{element:_.cloneNode()}),_.textContent=et)}return Ye(yt.afterSanitizeElements,_,null),hi(_,$)},Yh=function(_,$,tt){if(vr[$]||Nh($,_)||Q&&($==="id"||$==="name")&&(tt in r||tt in Ry))return!1;const et=Ht[$]||ie.attributeCheck instanceof Function&&ie.attributeCheck($,_);return Qe&&fe(ct,$)||Lr&&fe(Ct,$)?!0:et?Ar[$]||fe(H,rs(tt,Nt,""))||($==="src"||$==="xlink:href"||$==="href")&&_!=="script"&&Jh(tt,"data:")===0&&Zi[_]||fr&&!fe(Et,rs(tt,Nt,""))?!0:!tt:Uh(_)&&Xs(de.tagNameCheck,_)&&Xs(de.attributeNameCheck,$,_)||$==="is"&&de.allowCustomizedBuiltInElements&&Xs(de.tagNameCheck,tt)},Ky=Ut({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Uh=function(_){return!Ky[jr(_)]&&fe(Gt,_)},Qy=function(_,$,tt,et){if(D&&typeof l=="object"&&typeof l.getAttributeType=="function"&&!tt)switch(l.getAttributeType(_,$)){case"TrustedHTML":return R(et);case"TrustedScriptURL":return O(et)}return et},Jy=function(_,$,tt,et){try{return tt?_.setAttributeNS(tt,$,et):_.setAttribute($,et),Gs(_)?(Er(_),!1):!0}catch{return li($,_),!1}},jh=function(_,$){return P&&fe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,$)?!0:jr(_)==="attributename"&&Qh($,"href")!==null},Lo=function(_,$){if(Ye(yt.beforeSanitizeAttributes,_,null),hi(_,$))return;const tt=_.attributes;if(!tt||Gs(_))return;Ht=Hh(yt.uponSanitizeAttribute,Ht,dr,nt);const et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ht,forceKeepAttr:void 0};let Ft=tt.length;const Ot=ee(_.nodeName);for(;Ft--;){const zt=tt[Ft],le=zt.name,tr=zt.namespaceURI,we=zt.value,_e=ee(le),ci=we;let Be=le==="value"?ci:T0(ci),Gh=!1;if(et.attrName=_e,et.attrValue=Be,et.keepAttr=!0,et.forceKeepAttr=void 0,Ye(yt.uponSanitizeAttribute,_,et),Be=et.attrValue,ot&&(_e==="id"||_e==="name")&&Jh(Be,st)!==0&&(li(le,_,zt),Be=st+Be,Gh=!0),jh(le,Be)){li(le,_,zt);continue}if(!et.forceKeepAttr){if(!et.keepAttr){li(le,_,zt);continue}if(!pr&&fe(lc,Be)){li(le,_,zt);continue}if(g&&(Be=js(Be)),!Yh(Ot,_e,Be)){li(le,_,zt);continue}Be=Qy(Ot,_e,tr,Be),Be!==ci&&Jy(_,le,tr,Be)&&Gh&&Kh(t.removed)}}Ye(yt.afterSanitizeAttributes,_,null),hi(_,$)},Ji=function(_){let $=null;const tt=_o(_);for(Ye(yt.beforeSanitizeShadowDOM,_,null);$=tt.nextNode();)if(Ye(yt.uponSanitizeShadowNode,$,null),vo($,_),Lo($,_),Mr($.content)&&Ji($.content),A($)===se.element){const et=b($);Mr(et)&&(Fo(et),Ji(et))}g&&zh(_),Ye(yt.afterSanitizeShadowDOM,_,null)},Fo=function(_){const $=[{node:_,shadow:null}];for(;$.length>0;){const tt=$.pop();if(tt.shadow){Ji(tt.shadow);continue}const et=tt.node,Ft=A(et)===se.element,Ot=C(et);if(Ot)for(let zt=Ot.length-1;zt>=0;--zt)$.push({node:Ot[zt],shadow:null});if(Ft){const zt=B?B(et):null;if(typeof zt=="string"&&ee(zt)==="template"){const le=et.content;Mr(le)&&$.push({node:le,shadow:null})}}if(Ft){const zt=b(et);Mr(zt)&&$.push({node:null,shadow:zt},{node:zt,shadow:null})}}};return t.sanitize=function(at){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,tt=null,et=null,Ft=null;if(mo=!at,mo&&(at="<!-->"),typeof at!="string"&&!Qi(at)&&(at=L0(at),typeof at!="string"))throw yr("dirty is not a string, aborting");if(!t.isSupported)return at;K?(kt=j,Ht=nt):bo(_),(yt.uponSanitizeElement.length>0||yt.uponSanitizeAttribute.length>0)&&(kt=Me(kt)),yt.uponSanitizeAttribute.length>0&&(Ht=Me(Ht)),t.removed=[];const Ot=gt&&typeof at!="string"&&Qi(at);let zt=[];const le=Tt;if(Ot){Xy(at);const _e=F(at);if(typeof _e=="string"){const ci=ee(_e);if(!kt[ci]||Pe[ci])throw ko(at),yr("root node is forbidden and cannot be sanitized in-place")}if(Gs(at))throw ko(at),yr("root node is clobbered and cannot be sanitized in-place");zt=To(at),Tt=Ao()}else if(Qi(at))$=Wh("<!---->"),tt=$.ownerDocument.importNode(at,!0),tt.nodeType===se.element&&tt.nodeName==="BODY"||tt.nodeName==="HTML"?$=tt:$.appendChild(tt),Fo($);else{if(!N&&!g&&!G&&at.indexOf("<")===-1)return D&&V?R(at):at;if($=Wh(at),!$)return N?null:V?rt:""}$&&S&&Er($.firstChild);const tr=Ot?at:$;try{Ot&&Fo(at);const _e=_o(tr);for(;et=_e.nextNode();)vo(et,tr),Lo(et,tr),Mr(et.content)&&Ji(et.content);Ot&&Uy(at,zt)}catch(_e){throw Ot&&(ko(at),qh(at,zt)),_e}finally{Tt=le}if(Ot){if(qh(at,zt))throw yr("a node selected for removal could not be safely returned; refusing to sanitize in place");return g&&Bo(at),at}if(N){if(g&&Bo($),it)for(Ft=dt.call($.ownerDocument);$.firstChild;)Ft.appendChild($.firstChild);else Ft=$;return(Ht.shadowroot||Ht.shadowrootmode)&&(Ft=St.call(i,Ft,!0)),Ft}let we=G?$.outerHTML:$.innerHTML;return G&&kt["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&fe(N0,$.ownerDocument.doctype.name)&&(we="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
4
+ `+we),g&&(we=js(we)),D&&V?R(we):we},t.setConfig=function(){let at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bo(at),K=!0,j=kt,nt=Ht},t.clearConfig=function(){ni=null,K=!1,j=null,nt=null,D=W,rt=""},t.isValidAttribute=function(at,_,$){ni||bo({});const tt=ee(at),et=ee(_);return typeof $=="string"&&(jh(_,$)||!pr&&fe(lc,$))?!1:Yh(tt,et,$)},t.addHook=function(at,_){typeof _=="function"&&Le(yt,at)&&ts(yt[at],_)},t.removeHook=function(at,_){if(Le(yt,at)){if(_!==void 0){const $=k0(yt[at],_);return $===-1?void 0:S0(yt[at],$,1)[0]}return Kh(yt[at])}},t.removeHooks=function(at){Le(yt,at)&&(yt[at]=[])},t.removeAllHooks=function(){yt=hc()},t}var qi=vd(),ws=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Sa=/\s/,j0=p(e=>{let t="",r=0,i=0;for(;i<e.length;){const s=e.indexOf("%%",i);if(s===-1)break;const a=e.indexOf(`
5
+ `,s);if(a===-1)break;let n=s;for(;n>r&&Sa.test(e[n-1]);)n--;t+=e.slice(r,n)+`
6
+ `,r=a+1,i=r}return t+e.slice(r)},"stripAnyComments"),da=p(e=>e===`
7
+ `||e==="\r","isLineBreak"),G0=p((e,t)=>{let r=-1;for(let i=t;i<e.length&&Sa.test(e[i]);i++)da(e[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),Ld=p(e=>{let t=0;for(;t<e.length&&Sa.test(e[t])&&!da(e[t]);)t++;const r=e.slice(0,t);if(!e.startsWith("---",t))return;const i=[];for(let l=t+3;l<e.length&&Sa.test(e[l]);l++)da(e[l])&&i.push(l);if(i.length===0)return;const s=`${r}---`,a=p(l=>da(e[l])&&e.startsWith(s,l+1)?G0(e,l+1+s.length):-1,"closingEnd"),n=i[0]+1;let o=-1;for(let l=n;l<e.length;l++)a(l)!==-1&&(o=l);if(o===-1)return;let c=i[0];for(const l of i)l<o&&(c=l);const h=c+1;for(let l=h;l<=o;l++){const u=a(l);if(u!==-1)return{indent:r,body:e.slice(h,l),length:u+1}}},"matchFrontMatter"),Ti,Fd=(Ti=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Ti,"UnknownDiagramError"),Ti),ti={},Qa=p(function(e,t){const r=Ld(e);e=j0((r?e.slice(r.length):e).replace(ws,""));for(const[i,{detector:s}]of Object.entries(ti))if(s(e,t))return i;throw new Fd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),An=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ad(t,r,i)},"registerLazyLoadedDiagrams"),Ad=p((e,t,r)=>{ti[e]&&J.warn(`Detector with key ${e} already exists. Overwriting.`),ti[e]={detector:t,loader:r},J.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),X0=p(e=>ti[e].loader,"getDiagramLoader"),En=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>En(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),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 s=e;Object.entries(t).forEach(([a,n])=>{if(typeof n=="object"){if(n===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(n)?[]:{}),typeof s[a]=="object"&&(s[a]=En(s[a],n,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=n:Object.defineProperty(e,a,{value:n,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),oe=En,nr="#ffffff",lr="#f2f2f2",$t=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),cc=p(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Ze=p((e,t)=>cc(e)&&cc(t)?{...e,...t}:t,"applyOverride"),_i,V0=(_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(){var r,i,s,a,n,o,c,h,l,u,d,f,m,y,C,x,b,k,T,B,L,A,F,z,q,D,rt,W,E,M,v,R,O,X,Z,lt,ht,dt,bt,St,yt,At,Dt,_t,ct,Ct,Et,Nt,Gt,H;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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?U(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(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||Y(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||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScale"+kt]=U(this["cScale"+kt],75);else for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScale"+kt]=U(this["cScale"+kt],25);for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScaleInv"+kt]=this["cScaleInv"+kt]||I(this["cScale"+kt]);for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this.darkMode?this["cScalePeer"+kt]=this["cScalePeer"+kt]||Y(this["cScale"+kt],10):this["cScalePeer"+kt]=this["cScalePeer"+kt]||U(this["cScale"+kt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScaleLabel"+kt]=this["cScaleLabel"+kt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let kt=0;kt<5;kt++)this["surface"+kt]=this["surface"+kt]||w(this.mainBkg,{h:180,s:-15,l:t*(5+kt*3)}),this["surfacePeer"+kt]=this["surfacePeer"+kt]||w(this.mainBkg,{h:180,s:-15,l:t*(8+kt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((n=this.cynefin)==null?void 0:n.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((c=this.cynefin)==null?void 0:c.arrowColor)||this.lineColor,arrowWidth:((h=this.cynefin)==null?void 0:h.arrowWidth)||2,complexBg:((l=this.cynefin)==null?void 0:l.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((T=this.radar)==null?void 0:T.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((z=this.radar)==null?void 0:z.legendBoxSize)||12,legendFontSize:((q=this.radar)==null?void 0:q.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((D=this.wardley)==null?void 0:D.backgroundColor)||this.background,axisColor:((rt=this.wardley)==null?void 0:rt.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((E=this.wardley)==null?void 0:E.gridColor)||this.gridColor,componentFill:((M=this.wardley)==null?void 0:M.componentFill)||this.background,componentStroke:((v=this.wardley)==null?void 0:v.componentStroke)||this.lineColor,componentLabelColor:((R=this.wardley)==null?void 0:R.componentLabelColor)||this.primaryTextColor,linkStroke:((O=this.wardley)==null?void 0:O.linkStroke)||this.lineColor,evolutionStroke:((X=this.wardley)==null?void 0:X.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Z=this.wardley)==null?void 0:Z.annotationStroke)||this.lineColor,annotationTextColor:((lt=this.wardley)==null?void 0:lt.annotationTextColor)||this.primaryTextColor,annotationFill:((ht=this.wardley)==null?void 0:ht.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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((dt=this.xyChart)==null?void 0:dt.backgroundColor)||this.background,titleColor:((bt=this.xyChart)==null?void 0:bt.titleColor)||this.primaryTextColor,dataLabelColor:((St=this.xyChart)==null?void 0:St.dataLabelColor)||this.primaryTextColor,legendTextColor:((yt=this.xyChart)==null?void 0:yt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Dt=this.xyChart)==null?void 0:Dt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_t=this.xyChart)==null?void 0:_t.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((ct=this.xyChart)==null?void 0:ct.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Ct=this.xyChart)==null?void 0:Ct.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Gt=this.xyChart)==null?void 0:Gt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((H=this.xyChart)==null?void 0:H.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?U(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr,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]=Ze(this[i],t[i])}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},p(_i,"Theme"),_i),Z0=p(e=>{const t=new V0;return t.calculate(e),t},"getThemeVariables"),Bi,K0=(Bi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=I(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(I("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Rr(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=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=Rr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Rr(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||Y(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(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(){var t,r,i,s,a,n,o,c,h,l,u,d,f,m,y,C,x,b,k,T,B,L,A,F,z,q,D,rt,W,E,M,v,R,O,X,Z,lt,ht,dt,bt,St,yt,At,Dt,_t,ct,Ct,Et,Nt,Gt;this.secondBkg=Y(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=Y(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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=Y(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=I(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||I(this["cScale"+H]);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScalePeer"+H]=this["cScalePeer"+H]||Y(this["cScale"+H],10);for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||w(this.mainBkg,{h:30,s:-30,l:-(-10+H*4)}),this["surfacePeer"+H]=this["surfacePeer"+H]||w(this.mainBkg,{h:30,s:-30,l:-(-7+H*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["pie"+H]=this["cScale"+H];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 H=0;H<8;H++)this["venn"+(H+1)]=this["venn"+(H+1)]??Y(this["cScale"+H],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#1B5E20",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#F57F17",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((z=this.xyChart)==null?void 0:z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((q=this.xyChart)==null?void 0:q.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((D=this.xyChart)==null?void 0:D.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((rt=this.xyChart)==null?void 0:rt.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:((W=this.radar)==null?void 0:W.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((O=this.radar)==null?void 0:O.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((X=this.radar)==null?void 0:X.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((lt=this.radar)==null?void 0:lt.legendBoxSize)||12,legendFontSize:((ht=this.radar)==null?void 0:ht.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((dt=this.wardley)==null?void 0:dt.backgroundColor)||this.background,axisColor:((bt=this.wardley)==null?void 0:bt.axisColor)||this.lineColor,axisTextColor:((St=this.wardley)==null?void 0:St.axisTextColor)||this.primaryTextColor,gridColor:((yt=this.wardley)==null?void 0:yt.gridColor)||this.gridColor,componentFill:((At=this.wardley)==null?void 0:At.componentFill)||this.mainBkg,componentStroke:((Dt=this.wardley)==null?void 0:Dt.componentStroke)||this.lineColor,componentLabelColor:((_t=this.wardley)==null?void 0:_t.componentLabelColor)||this.primaryTextColor,linkStroke:((ct=this.wardley)==null?void 0:ct.linkStroke)||this.lineColor,evolutionStroke:((Ct=this.wardley)==null?void 0:Ct.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Nt=this.wardley)==null?void 0:Nt.annotationTextColor)||this.primaryTextColor,annotationFill:((Gt=this.wardley)==null?void 0:Gt.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?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Y(this.secondaryColor,20),this.git1=Y(this.pie2||this.secondaryColor,20),this.git2=Y(this.pie3||this.tertiaryColor,20),this.git3=Y(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=Y(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=Y(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=Y(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=Y(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(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||Y("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||Y("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||Y("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||Y("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||Y(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||Y(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Y(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Y(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]=Ze(this[i],t[i])})}},p(Bi,"Theme"),Bi),Q0=p(e=>{const t=new K0;return t.calculate(e),t},"getThemeVariables"),vi,J0=(vi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=$t(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=Rr(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(){var t,r,i,s,a,n,o,c,h,l,u,d,f,m,y,C,x,b,k,T,B,L,A,F,z,q,D,rt,W,E,M,v,R,O,X,Z,lt,ht,dt,bt,St,yt,At,Dt,_t,ct,Ct,Et,Nt,Gt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScale"+H]=U(this["cScale"+H],10),this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],25);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||w(this["cScale"+H],{h:180});for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||w(this.mainBkg,{h:30,l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||w(this.mainBkg,{h:30,l:-(7+H*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||I(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||I(this.labelTextColor);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||Y(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Y(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((D=this.wardley)==null?void 0:D.axisColor)||this.lineColor,axisTextColor:((rt=this.wardley)==null?void 0:rt.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((O=this.wardley)==null?void 0:O.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((X=this.wardley)==null?void 0:X.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((lt=this.wardley)==null?void 0:lt.annotationFill)||this.background},this.xyChart={backgroundColor:((ht=this.xyChart)==null?void 0:ht.backgroundColor)||this.background,titleColor:((dt=this.xyChart)==null?void 0:dt.titleColor)||this.primaryTextColor,dataLabelColor:((bt=this.xyChart)==null?void 0:bt.dataLabelColor)||this.primaryTextColor,legendTextColor:((St=this.xyChart)==null?void 0:St.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((At=this.xyChart)==null?void 0:At.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Dt=this.xyChart)==null?void 0:Dt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_t=this.xyChart)==null?void 0:_t.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Gt=this.xyChart)==null?void 0:Gt.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(I(this.git0),25),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p(vi,"Theme"),vi),tx=p(e=>{const t=new J0;return t.calculate(e),t},"getThemeVariables"),Li,ex=(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=Y("#cde498",10),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.primaryColor),this.lineColor=I(this.background),this.textColor=I(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(){var t,r,i,s,a,n,o,c,h,l,u,d,f,m,y,C,x,b,k,T,B,L,A,F,z,q,D,rt,W,E,M,v,R,O,X,Z,lt,ht,dt,bt,St,yt,At,Dt,_t,ct,Ct,Et,Nt,Gt;this.actorBorder=U(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScale"+H]=U(this["cScale"+H],10),this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],25);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||w(this["cScale"+H],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||w(this.mainBkg,{h:30,s:-30,l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||w(this.mainBkg,{h:30,s:-30,l:-(8+H*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#C8E6C9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF9C4",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((D=this.wardley)==null?void 0:D.axisColor)||this.lineColor,axisTextColor:((rt=this.wardley)==null?void 0:rt.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((O=this.wardley)==null?void 0:O.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((X=this.wardley)==null?void 0:X.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((lt=this.wardley)==null?void 0:lt.annotationFill)||this.background},this.xyChart={backgroundColor:((ht=this.xyChart)==null?void 0:ht.backgroundColor)||this.background,titleColor:((dt=this.xyChart)==null?void 0:dt.titleColor)||this.primaryTextColor,dataLabelColor:((bt=this.xyChart)==null?void 0:bt.dataLabelColor)||this.primaryTextColor,legendTextColor:((St=this.xyChart)==null?void 0:St.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((At=this.xyChart)==null?void 0:At.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Dt=this.xyChart)==null?void 0:Dt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_t=this.xyChart)==null?void 0:_t.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Gt=this.xyChart)==null?void 0:Gt.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p(Li,"Theme"),Li),rx=p(e=>{const t=new ex;return t.calculate(e),t},"getThemeVariables"),Fi,ix=(Fi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Y(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(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||Y(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(){var t,r,i,s,a,n,o,c,h,l,u,d,f,m,y,C,x,b,k,T,B,L,A,F,z,q,D,rt,W,E,M,v,R,O,X,Z,lt,ht,dt,bt,St,yt,At,Dt,_t,ct,Ct,Et,Nt,Gt;this.secondBkg=Y(this.contrast,55),this.border2=this.contrast,this.actorBorder=Y(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 H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||I(this["cScale"+H]);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this.darkMode?this["cScalePeer"+H]=this["cScalePeer"+H]||Y(this["cScale"+H],10):this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||w(this.mainBkg,{l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||w(this.mainBkg,{l:-(8+H*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=Y(this.contrast,30),this.sectionBkgColor2=Y(this.contrast,30),this.taskBorderColor=U(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=Y(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["pie"+H]=this["cScale"+H];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 H=0;H<8;H++)this["venn"+(H+1)]=this["venn"+(H+1)]??this["cScale"+H];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((z=this.xyChart)==null?void 0:z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((q=this.xyChart)==null?void 0:q.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((D=this.xyChart)==null?void 0:D.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((rt=this.xyChart)==null?void 0:rt.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((W=this.radar)==null?void 0:W.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((O=this.radar)==null?void 0:O.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((X=this.radar)==null?void 0:X.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((lt=this.radar)==null?void 0:lt.legendBoxSize)||12,legendFontSize:((ht=this.radar)==null?void 0:ht.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((dt=this.wardley)==null?void 0:dt.backgroundColor)||this.background,axisColor:((bt=this.wardley)==null?void 0:bt.axisColor)||this.lineColor,axisTextColor:((St=this.wardley)==null?void 0:St.axisTextColor)||this.primaryTextColor,gridColor:((yt=this.wardley)==null?void 0:yt.gridColor)||this.gridColor,componentFill:((At=this.wardley)==null?void 0:At.componentFill)||this.background,componentStroke:((Dt=this.wardley)==null?void 0:Dt.componentStroke)||this.lineColor,componentLabelColor:((_t=this.wardley)==null?void 0:_t.componentLabelColor)||this.primaryTextColor,linkStroke:((ct=this.wardley)==null?void 0:ct.linkStroke)||this.lineColor,evolutionStroke:((Ct=this.wardley)==null?void 0:Ct.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Nt=this.wardley)==null?void 0:Nt.annotationTextColor)||this.primaryTextColor,annotationFill:((Gt=this.wardley)==null?void 0:Gt.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=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p(Fi,"Theme"),Fi),sx=p(e=>{const t=new ix;return t.calculate(e),t},"getThemeVariables"),Ai,ax=(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=$t(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(){var a,n,o,c,h,l,u,d,f,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(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||Y(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||w(t,{h:30}),this.cScale4=this.cScale4||w(t,{h:60}),this.cScale5=this.cScale5||w(t,{h:90}),this.cScale6=this.cScale6||w(t,{h:120}),this.cScale7=this.cScale7||w(t,{h:150}),this.cScale8=this.cScale8||w(t,{h:210,l:150}),this.cScale9=this.cScale9||w(t,{h:270}),this.cScale10=this.cScale10||w(t,{h:300}),this.cScale11=this.cScale11||w(t,{h:330}),this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=U(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=U(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||I(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||Y(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?U(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p(Ai,"Theme"),Ai),ox=p(e=>{const t=new ax;return t.calculate(e),t},"getThemeVariables"),Ei,nx=(Ei=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=I(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(I("#323D47"),10),this.border1="#ccc",this.border2=Rr(255,255,255,.25),this.arrowheadColor=I(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(){var r,i,s,a,n,o,c,h,l,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(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||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||I(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?U(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=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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p(Ei,"Theme"),Ei),lx=p(e=>{const t=new nx;return t.calculate(e),t},"getThemeVariables"),Mi,hx=(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=$t("#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(){var a,n,o,c,h,l,u,d,f,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(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||Y(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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=this.mainBkg;if(this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=U(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=U(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||I(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||Y(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?U(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p(Mi,"Theme"),Mi),cx=p(e=>{const t=new hx;return t.calculate(e),t},"getThemeVariables"),$i,ux=($i=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=I(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(I("#323D47"),10),this.border1="#ccc",this.border2=Rr(255,255,255,.25),this.arrowheadColor=I(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(){var r,i,s,a,n,o,c,h,l,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(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||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||I(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?U(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p($i,"Theme"),$i),dx=p(e=>{const t=new ux;return t.calculate(e),t},"getThemeVariables"),Oi,fx=(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=$t("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){var a,n,o,c,h,l,u,d,f,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});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||Y(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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||I(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||Y(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor;for(let x=0;x<8;x++)this["fillType"+x]=this["fillType"+x]||this.bkgColorArray[x];for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["pie"+(x+1)]=this["pie"+(x+1)]||this["cScale"+x];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 x=0;x<8;x++)this["venn"+(x+1)]=this["venn"+(x+1)]??this.borderColorArray[x%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?U(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p(Oi,"Theme"),Oi),px=p(e=>{const t=new fx;return t.calculate(e),t},"getThemeVariables"),Ii,gx=(Ii=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=I(this.background),this.secondaryBorderColor=$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=$t(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(I("#323D47"),10),this.border1="#ccc",this.border2=Rr(255,255,255,.25),this.arrowheadColor=I(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){var i,s,a,n,o,c,h,l,u,d,f,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||$t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||$t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||$t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||$t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||I(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||Y(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||U(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=U(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||w(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||w(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((y,C)=>{this["fillType"+C]=this["fillType"+C]||y});for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["pie"+(y+1)]=this["pie"+(y+1)]||this["cScale"+y];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 y=0;y<8;y++)this["venn"+(y+1)]=this["venn"+(y+1)]??this.borderColorArray[y%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((s=this.xyChart)==null?void 0:s.titleColor)||this.primaryTextColor,legendTextColor:((a=this.xyChart)==null?void 0:a.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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?U(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(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.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||nr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lr}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]=Ze(this[i],t[i])})}},p(Ii,"Theme"),Ii),mx=p(e=>{const t=new gx;return t.calculate(e),t},"getThemeVariables"),wr={base:{getThemeVariables:Z0},dark:{getThemeVariables:Q0},default:{getThemeVariables:tx},forest:{getThemeVariables:rx},neutral:{getThemeVariables:sx},neo:{getThemeVariables:ox},"neo-dark":{getThemeVariables:lx},redux:{getThemeVariables:cx},"redux-dark":{getThemeVariables:dx},"redux-color":{getThemeVariables:px},"redux-dark-color":{getThemeVariables:mx}},re={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",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,colorBy:"branch",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,bitOrder:"ascending",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},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:"elk",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},md,yd,xd,Ed={...re,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:wr.default.getThemeVariables(),sequence:{...re.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:{theme:(md=re.class)==null?void 0:md.theme,look:(yd=re.class)==null?void 0:yd.look,layout:(xd=re.class)==null?void 0:xd.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...re.gantt,tickInterval:void 0,useWidth:void 0},c4:{...re.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...re.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:{...re.pie,useWidth:984},xyChart:{...re.xyChart,useWidth:void 0},requirement:{...re.requirement,useWidth:void 0},packet:{...re.packet},eventmodeling:{...re.eventmodeling},treeView:{...re.treeView,useWidth:void 0},radar:{...re.radar},usecase:{...re.usecase},railroad:{...re.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:{...re.ishikawa},sankey:{...re.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:{...re.venn},cynefin:{...re.cynefin}},Md=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Md(e[i],"")]:[...r,t+i],[]),"keyify"),yx=new Set(Md(Ed,"")),ml=Ed,xx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},Cx=p(e=>xx[e]??e,"getDiagramConfigKey"),bx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},kx=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))&&(J.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ta=p(e=>{if(J.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ta(t));return}for(const t of Object.keys(e)){if(J.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!yx.has(t)||e[t]==null){J.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=bx[t];i?kx(e[t],i):(J.debug("sanitizing object",t),Ta(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(J.debug("sanitizing css option",t),e[t]=$d(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}J.debug("After sanitization",e)}},"sanitizeDirective"),$d=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"),qr=Object.freeze(ml),wx=["theme","look","layout"],Sx=new Set(["classic","handDrawn","neo"]),Tx=p((e,t)=>e==="theme"?t==="null"||Object.hasOwn(wr,t):e!=="look"||Sx.has(t),"isUsableAppearance"),_x=p((e,t,r)=>{if(!e)return;const i=e[t];return[i==null?void 0:i[r],e[r]].find(s=>s!==void 0&&Tx(r,s))},"readAppearance"),hr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Se=oe({},qr),_a,Ba={},Sr=[],Ss=oe({},qr),Ts,Bx=p((e,t)=>{if(!Ts)return;const r=[t,...[...Sr].reverse(),Ba,qr],i=e[Ts];for(const s of wx)for(const a of r){const n=_x(a,Ts,s);if(n!==void 0){e[s]=n,(i==null?void 0:i[s])!==void 0&&(i[s]=n);break}}},"resolveAppearance"),Yi=p((e,t)=>{let r=oe({},e),i={};for(const a of t)Dd(a),i=oe(i,a);if(r=oe(r,i),Bx(r,i),(!!i.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(wr,r.theme)){const a=oe({},_a),n=oe(a.themeVariables||{},i.themeVariables);r.themeVariables=wr[r.theme].getThemeVariables(n)}return Ss=r,Mx(Ss),Ss},"updateCurrentConfig"),yl=p(e=>{Ts=e===void 0?void 0:Cx(e),Yi(Se,Sr)},"setDiagramConfigScope"),vx=p(e=>(Se=oe({},qr),Se=oe(Se,e),Ba=oe({},e),e.theme&&Object.hasOwn(wr,e.theme)&&(Se.themeVariables=wr[e.theme].getThemeVariables(e.themeVariables)),Yi(Se,Sr),Se),"setSiteConfig"),Lx=p(e=>{_a=oe({},e)},"saveConfigFromInitialize"),Fx=p(e=>(Se=oe(Se,e),Ba=oe(Ba,e),Yi(Se,Sr),Se),"updateSiteConfig"),Od=p(()=>oe({},Se),"getSiteConfig"),Id=p(e=>(Yi(Ss,[e]),Qt()),"setConfig"),Qt=p(()=>oe({},Ss),"getConfig"),Dd=p(e=>{e&&(["secure",...Se.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(J.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"&&Dd(e[t])}))},"sanitize"),Ax=p(e=>{var t;Ta(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Sr.push(e),Yi(Se,Sr)},"addDirective"),va=p((e=Se)=>{Sr=[],Ts=void 0,Yi(e,Sr)},"reset"),Ex={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."},uc={},Pd=p(e=>{uc[e]||(J.warn(Ex[e]),uc[e]=!0)},"issueWarning"),Mx=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Pd("LAZY_LOAD_DEPRECATED")},"checkConfig"),iF=p(()=>{let e={};_a&&(e=oe(e,_a));for(const t of Sr)e=oe(e,t);return e},"getUserDefinedConfig"),ue=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Pd("FLOWCHART_HTML_LABELS_DEPRECATED"),hr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Is=/<\/?br\s*\/?>/gi,$x=new RegExp(Is.source,"i"),Ox=p(e=>e?Nd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ix=(()=>{let e=!1;return()=>{e||(Rd(),e=!0)}})();function Rd(){const e="data-temp-href-target";qi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),qi.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(Rd,"setupDompurifyHooks");var qd=p(e=>(Ix(),qi.sanitize(e)),"removeScript"),dc=p((e,t)=>{if(ue(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=qd(e):r!=="loose"&&(e=Nd(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=qx(e))}return e},"sanitizeMore"),We=p((e,t)=>e&&(t.dompurifyConfig?e=qi.sanitize(dc(e,t),t.dompurifyConfig).toString():e=qi.sanitize(dc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Dx=p((e,t)=>typeof e=="string"?We(e,t):e.flat().map(r=>We(r,t)),"sanitizeTextOrArray"),Px=p(e=>$x.test(e),"hasBreaks"),Rx=p(e=>e.split(Is),"splitBreaks"),qx=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Nd=p(e=>e.replace(Is,"#br#"),"breakToPlaceholder"),Nx=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"),Wx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),zx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),fc=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],n=t[i+1];Hx(a,n)&&(s=a+","+n,i++,r.pop())}r.push(Yx(s))}return r.join("")},"parseGenericTypes"),Mn=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Hx=p((e,t)=>{const r=Mn(e,"~"),i=Mn(t,"~");return r===1&&i===1},"shouldCombineSets"),Yx=p(e=>{const t=Mn(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),pc=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),$n=/\$\$(.*?)\$\$/g,Ls=p(e=>{var t;return(((t=e.match($n))==null?void 0:t.length)??0)>0},"hasKatex"),sF=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Wd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),Ux=p(async(e,t)=>{if(!Ls(e))return e;if(!(pc()||t.legacyMathML||t.forceLegacyMathML))return e.replace($n,"MathML is unsupported in this environment.");{const{default:r}=await Wt(async()=>{const{default:s}=await import("./katex-Be3d8Y4U.js");return{default:s}},[]),i=t.forceLegacyMathML||!pc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Is).map(s=>Ls(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace($n,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Wd=p(async(e,t)=>We(await Ux(e,t),t),"renderKatexSanitized"),Ds={getRows:Ox,sanitizeText:We,sanitizeTextOrArray:Dx,hasBreaks:Px,splitBreaks:Rx,lineBreakRegex:Is,removeScript:qd,getUrl:Nx,evaluate:hr,getMax:Wx,getMin:zx},jx=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Gx=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 s=Gx(t,r,i);jx(e,s)},"configureSvgSize"),Xx=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,n=s.height;J.info(`SVG bounds: ${a}x${n}`,s);let o=0,c=0;J.info(`Graph bounds: ${o}x${c}`,e),o=a+r*2,c=n+r*2,J.info(`Calculated bounds: ${o}x${c}`),zd(t,c,o,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),fa={};function On(e){return[...e.cssRules].map(t=>t.cssText).join(`
8
+ `)}p(On,"cssStyleSheetToString");var Vx=p((e,t,r,i)=>{let s="";return e in fa&&fa[e]?s=fa[e]({...r,svgId:i}):J.warn(`No theme found for ${e}`),`& {
9
+ font-family: ${r.fontFamily};
10
+ font-size: ${r.fontSize};
11
+ fill: ${r.textColor}
12
+ }
13
+ @keyframes edge-animation-frame {
14
+ from {
15
+ stroke-dashoffset: 0;
16
+ }
17
+ }
18
+ @keyframes dash {
19
+ to {
20
+ stroke-dashoffset: 0;
21
+ }
22
+ }
23
+ & .edge-animation-slow {
24
+ stroke-dasharray: 9,5 !important;
25
+ stroke-dashoffset: 900;
26
+ animation: dash 50s linear infinite;
27
+ stroke-linecap: round;
28
+ }
29
+ & .edge-animation-fast {
30
+ stroke-dasharray: 9,5 !important;
31
+ stroke-dashoffset: 900;
32
+ animation: dash 20s linear infinite;
33
+ stroke-linecap: round;
34
+ }
35
+ /* Classes common for multiple diagrams */
36
+
37
+ & .error-icon {
38
+ fill: ${r.errorBkgColor};
39
+ }
40
+ & .error-text {
41
+ fill: ${r.errorTextColor};
42
+ stroke: ${r.errorTextColor};
43
+ }
44
+
45
+ & .edge-thickness-normal {
46
+ stroke-width: ${r.strokeWidth??1}px;
47
+ }
48
+ & .edge-thickness-thick {
49
+ stroke-width: 3.5px
50
+ }
51
+ & .edge-pattern-solid {
52
+ stroke-dasharray: 0;
53
+ }
54
+ & .edge-thickness-invisible {
55
+ stroke-width: 0;
56
+ fill: none;
57
+ }
58
+ & .edge-pattern-dashed{
59
+ stroke-dasharray: 3;
60
+ }
61
+ .edge-pattern-dotted {
62
+ stroke-dasharray: 2;
63
+ }
64
+
65
+ & .marker {
66
+ fill: ${r.lineColor};
67
+ stroke: ${r.lineColor};
68
+ }
69
+ & .marker.cross {
70
+ stroke: ${r.lineColor};
71
+ }
72
+
73
+ & svg {
74
+ font-family: ${r.fontFamily};
75
+ font-size: ${r.fontSize};
76
+ }
77
+ & p {
78
+ margin: 0
79
+ }
80
+
81
+ ${s}
82
+ .node .neo-node {
83
+ stroke: ${r.nodeBorder};
84
+ }
85
+
86
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
87
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
88
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
89
+ }
90
+ [data-look="neo"].swimlane.cluster rect {
91
+ filter: none;
92
+ }
93
+
94
+
95
+ [data-look="neo"].node path {
96
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
97
+ stroke-width: ${r.strokeWidth??1}px;
98
+ }
99
+
100
+ [data-look="neo"].node .outer-path {
101
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
102
+ }
103
+
104
+ [data-look="neo"].node .neo-line path {
105
+ stroke: ${r.nodeBorder};
106
+ filter: none;
107
+ }
108
+
109
+ [data-look="neo"].node circle{
110
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
111
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
112
+ }
113
+
114
+ [data-look="neo"].node circle .state-start{
115
+ fill: #000000;
116
+ }
117
+
118
+ [data-look="neo"].icon-shape .icon {
119
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
120
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
121
+ }
122
+
123
+ [data-look="neo"].icon-shape .icon-neo path {
124
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
125
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
126
+ }
127
+
128
+ ${t}
129
+ `},"getStyles"),Zx=p((e,t)=>{t!==void 0&&(fa[e]=t)},"addStylesForDiagram"),Kx=Vx,Hd={};i0(Hd,{clear:()=>Qx,getAccDescription:()=>rC,getAccTitle:()=>tC,getDiagramTitle:()=>sC,setAccDescription:()=>eC,setAccTitle:()=>Jx,setDiagramTitle:()=>iC});var xl="",Cl="",bl="",kl=p(e=>We(e,Qt()),"sanitizeText"),Qx=p(()=>{xl="",bl="",Cl=""},"clear"),Jx=p(e=>{xl=kl(e).replace(/^\s+/g,"")},"setAccTitle"),tC=p(()=>xl,"getAccTitle"),eC=p(e=>{bl=kl(e).replace(/\n\s+/g,`
130
+ `)},"setAccDescription"),rC=p(()=>bl,"getAccDescription"),iC=p(e=>{Cl=kl(e)},"setDiagramTitle"),sC=p(()=>Cl,"getDiagramTitle"),gc=J,aC=gl,Rt=Qt,aF=Id,oF=qr,wl=p(e=>We(e,Rt()),"sanitizeText"),oC=Xx,nC=p(()=>Hd,"getCommonDb"),La={},Fa=p((e,t,r)=>{var i;La[e]&&gc.warn(`Diagram with id ${e} already registered. Overwriting.`),La[e]=t,r&&Ad(e,r),Zx(e,t.styles),(i=t.injectUtils)==null||i.call(t,gc,aC,Rt,wl,oC,nC(),()=>{})},"registerDiagram"),In=p(e=>{if(e in La)return La[e];throw new lC(e)},"getDiagram"),Di,lC=(Di=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Di,"DiagramNotFoundError"),Di),hC={value:()=>{}};function Yd(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new pa(r)}function pa(e){this._=e}function cC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}pa.prototype=Yd.prototype={constructor:pa,on:function(e,t){var r=this._,i=cC(e+"",r),s,a=-1,n=i.length;if(arguments.length<2){for(;++a<n;)if((s=(e=i[a]).type)&&(s=uC(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<n;)if(s=(e=i[a]).type)r[s]=mc(r[s],e.name,t);else if(t==null)for(s in r)r[s]=mc(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new pa(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function uC(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function mc(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=hC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Dn="http://www.w3.org/1999/xhtml";const yc={svg:"http://www.w3.org/2000/svg",xhtml:Dn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ja(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),yc.hasOwnProperty(t)?{space:yc[t],local:e}:e}function dC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Dn&&t.documentElement.namespaceURI===Dn?t.createElement(e):t.createElementNS(r,e)}}function fC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ud(e){var t=Ja(e);return(t.local?fC:dC)(t)}function pC(){}function Sl(e){return e==null?pC:function(){return this.querySelector(e)}}function gC(e){typeof e!="function"&&(e=Sl(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=new Array(n),c,h,l=0;l<n;++l)(c=a[l])&&(h=e.call(c,c.__data__,l,a))&&("__data__"in c&&(h.__data__=c.__data__),o[l]=h);return new Oe(i,this._parents)}function mC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yC(){return[]}function jd(e){return e==null?yC:function(){return this.querySelectorAll(e)}}function xC(e){return function(){return mC(e.apply(this,arguments))}}function CC(e){typeof e=="function"?e=xC(e):e=jd(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var n=t[a],o=n.length,c,h=0;h<o;++h)(c=n[h])&&(i.push(e.call(c,c.__data__,h,n)),s.push(c));return new Oe(i,s)}function Gd(e){return function(){return this.matches(e)}}function Xd(e){return function(t){return t.matches(e)}}var bC=Array.prototype.find;function kC(e){return function(){return bC.call(this.children,e)}}function wC(){return this.firstElementChild}function SC(e){return this.select(e==null?wC:kC(typeof e=="function"?e:Xd(e)))}var TC=Array.prototype.filter;function _C(){return Array.from(this.children)}function BC(e){return function(){return TC.call(this.children,e)}}function vC(e){return this.selectAll(e==null?_C:BC(typeof e=="function"?e:Xd(e)))}function LC(e){typeof e!="function"&&(e=Gd(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],c,h=0;h<n;++h)(c=a[h])&&e.call(c,c.__data__,h,a)&&o.push(c);return new Oe(i,this._parents)}function Vd(e){return new Array(e.length)}function FC(){return new Oe(this._enter||this._groups.map(Vd),this._parents)}function Aa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Aa.prototype={constructor:Aa,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 AC(e){return function(){return e}}function EC(e,t,r,i,s,a){for(var n=0,o,c=t.length,h=a.length;n<h;++n)(o=t[n])?(o.__data__=a[n],i[n]=o):r[n]=new Aa(e,a[n]);for(;n<c;++n)(o=t[n])&&(s[n]=o)}function MC(e,t,r,i,s,a,n){var o,c,h=new Map,l=t.length,u=a.length,d=new Array(l),f;for(o=0;o<l;++o)(c=t[o])&&(d[o]=f=n.call(c,c.__data__,o,t)+"",h.has(f)?s[o]=c:h.set(f,c));for(o=0;o<u;++o)f=n.call(e,a[o],o,a)+"",(c=h.get(f))?(i[o]=c,c.__data__=a[o],h.delete(f)):r[o]=new Aa(e,a[o]);for(o=0;o<l;++o)(c=t[o])&&h.get(d[o])===c&&(s[o]=c)}function $C(e){return e.__data__}function OC(e,t){if(!arguments.length)return Array.from(this,$C);var r=t?MC:EC,i=this._parents,s=this._groups;typeof e!="function"&&(e=AC(e));for(var a=s.length,n=new Array(a),o=new Array(a),c=new Array(a),h=0;h<a;++h){var l=i[h],u=s[h],d=u.length,f=IC(e.call(l,l&&l.__data__,h,i)),m=f.length,y=o[h]=new Array(m),C=n[h]=new Array(m),x=c[h]=new Array(d);r(l,u,y,C,x,f,t);for(var b=0,k=0,T,B;b<m;++b)if(T=y[b]){for(b>=k&&(k=b+1);!(B=C[k])&&++k<m;);T._next=B||null}}return n=new Oe(n,i),n._enter=o,n._exit=c,n}function IC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function DC(){return new Oe(this._exit||this._groups.map(Vd),this._parents)}function PC(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function RC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,n=Math.min(s,a),o=new Array(s),c=0;c<n;++c)for(var h=r[c],l=i[c],u=h.length,d=o[c]=new Array(u),f,m=0;m<u;++m)(f=h[m]||l[m])&&(d[m]=f);for(;c<s;++c)o[c]=r[c];return new Oe(o,this._parents)}function qC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],n;--s>=0;)(n=i[s])&&(a&&n.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(n,a),a=n);return this}function NC(e){e||(e=WC);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var n=r[a],o=n.length,c=s[a]=new Array(o),h,l=0;l<o;++l)(h=n[l])&&(c[l]=h);c.sort(t)}return new Oe(s,this._parents).order()}function WC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function zC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function HC(){return Array.from(this)}function YC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var n=i[s];if(n)return n}return null}function UC(){let e=0;for(const t of this)++e;return e}function jC(){return!this.node()}function GC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,n=s.length,o;a<n;++a)(o=s[a])&&e.call(o,o.__data__,a,s);return this}function XC(e){return function(){this.removeAttribute(e)}}function VC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ZC(e,t){return function(){this.setAttribute(e,t)}}function KC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function QC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function JC(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 tb(e,t){var r=Ja(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?VC:XC:typeof t=="function"?r.local?JC:QC:r.local?KC:ZC)(r,t))}function Zd(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function eb(e){return function(){this.style.removeProperty(e)}}function rb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function ib(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function sb(e,t,r){return arguments.length>1?this.each((t==null?eb:typeof t=="function"?ib:rb)(e,t,r??"")):Ni(this.node(),e)}function Ni(e,t){return e.style.getPropertyValue(t)||Zd(e).getComputedStyle(e,null).getPropertyValue(t)}function ab(e){return function(){delete this[e]}}function ob(e,t){return function(){this[e]=t}}function nb(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function lb(e,t){return arguments.length>1?this.each((t==null?ab:typeof t=="function"?nb:ob)(e,t)):this.node()[e]}function Kd(e){return e.trim().split(/^|\s+/)}function Tl(e){return e.classList||new Qd(e)}function Qd(e){this._node=e,this._names=Kd(e.getAttribute("class")||"")}Qd.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 Jd(e,t){for(var r=Tl(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function tf(e,t){for(var r=Tl(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function hb(e){return function(){Jd(this,e)}}function cb(e){return function(){tf(this,e)}}function ub(e,t){return function(){(t.apply(this,arguments)?Jd:tf)(this,e)}}function db(e,t){var r=Kd(e+"");if(arguments.length<2){for(var i=Tl(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?ub:t?hb:cb)(r,t))}function fb(){this.textContent=""}function pb(e){return function(){this.textContent=e}}function gb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function mb(e){return arguments.length?this.each(e==null?fb:(typeof e=="function"?gb:pb)(e)):this.node().textContent}function yb(){this.innerHTML=""}function xb(e){return function(){this.innerHTML=e}}function Cb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function bb(e){return arguments.length?this.each(e==null?yb:(typeof e=="function"?Cb:xb)(e)):this.node().innerHTML}function kb(){this.nextSibling&&this.parentNode.appendChild(this)}function wb(){return this.each(kb)}function Sb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tb(){return this.each(Sb)}function _b(e){var t=typeof e=="function"?e:Ud(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Bb(){return null}function vb(e,t){var r=typeof e=="function"?e:Ud(e),i=t==null?Bb:typeof t=="function"?t:Sl(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Lb(){var e=this.parentNode;e&&e.removeChild(this)}function Fb(){return this.each(Lb)}function Ab(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Eb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Mb(e){return this.select(e?Eb:Ab)}function $b(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ob(e){return function(t){e.call(this,t,this.__data__)}}function Ib(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 Db(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function Pb(e,t,r){return function(){var i=this.__on,s,a=Ob(t);if(i){for(var n=0,o=i.length;n<o;++n)if((s=i[n]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function Rb(e,t,r){var i=Ib(e+""),s,a=i.length,n;if(arguments.length<2){var o=this.node().__on;if(o){for(var c=0,h=o.length,l;c<h;++c)for(s=0,l=o[c];s<a;++s)if((n=i[s]).type===l.type&&n.name===l.name)return l.value}return}for(o=t?Pb:Db,s=0;s<a;++s)this.each(o(i[s],t,r));return this}function ef(e,t,r){var i=Zd(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function qb(e,t){return function(){return ef(this,e,t)}}function Nb(e,t){return function(){return ef(this,e,t.apply(this,arguments))}}function Wb(e,t){return this.each((typeof t=="function"?Nb:qb)(e,t))}function*zb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,n;s<a;++s)(n=i[s])&&(yield n)}var rf=[null];function Oe(e,t){this._groups=e,this._parents=t}function Ps(){return new Oe([[document.documentElement]],rf)}function Hb(){return this}Oe.prototype=Ps.prototype={constructor:Oe,select:gC,selectAll:CC,selectChild:SC,selectChildren:vC,filter:LC,data:OC,enter:FC,exit:DC,join:PC,merge:RC,selection:Hb,order:qC,sort:NC,call:zC,nodes:HC,node:YC,size:UC,empty:jC,each:GC,attr:tb,style:sb,property:lb,classed:db,text:mb,html:bb,raise:wb,lower:Tb,append:_b,insert:vb,remove:Fb,clone:Mb,datum:$b,on:Rb,dispatch:Wb,[Symbol.iterator]:zb};function Pt(e){return typeof e=="string"?new Oe([[document.querySelector(e)]],[document.documentElement]):new Oe([[e]],rf)}function _l(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function sf(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Rs(){}var Fs=.7,Ea=1/Fs,wi="\\s*([+-]?\\d+)\\s*",As="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ar="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yb=/^#([0-9a-f]{3,8})$/,Ub=new RegExp(`^rgb\\(${wi},${wi},${wi}\\)$`),jb=new RegExp(`^rgb\\(${ar},${ar},${ar}\\)$`),Gb=new RegExp(`^rgba\\(${wi},${wi},${wi},${As}\\)$`),Xb=new RegExp(`^rgba\\(${ar},${ar},${ar},${As}\\)$`),Vb=new RegExp(`^hsl\\(${As},${ar},${ar}\\)$`),Zb=new RegExp(`^hsla\\(${As},${ar},${ar},${As}\\)$`),xc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_l(Rs,Es,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cc,formatHex:Cc,formatHex8:Kb,formatHsl:Qb,formatRgb:bc,toString:bc});function Cc(){return this.rgb().formatHex()}function Kb(){return this.rgb().formatHex8()}function Qb(){return af(this).formatHsl()}function bc(){return this.rgb().formatRgb()}function Es(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Yb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?kc(t):r===3?new Fe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Zs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Zs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ub.exec(e))?new Fe(t[1],t[2],t[3],1):(t=jb.exec(e))?new Fe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gb.exec(e))?Zs(t[1],t[2],t[3],t[4]):(t=Xb.exec(e))?Zs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Vb.exec(e))?Tc(t[1],t[2]/100,t[3]/100,1):(t=Zb.exec(e))?Tc(t[1],t[2]/100,t[3]/100,t[4]):xc.hasOwnProperty(e)?kc(xc[e]):e==="transparent"?new Fe(NaN,NaN,NaN,0):null}function kc(e){return new Fe(e>>16&255,e>>8&255,e&255,1)}function Zs(e,t,r,i){return i<=0&&(e=t=r=NaN),new Fe(e,t,r,i)}function Jb(e){return e instanceof Rs||(e=Es(e)),e?(e=e.rgb(),new Fe(e.r,e.g,e.b,e.opacity)):new Fe}function Pn(e,t,r,i){return arguments.length===1?Jb(e):new Fe(e,t,r,i??1)}function Fe(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}_l(Fe,Pn,sf(Rs,{brighter(e){return e=e==null?Ea:Math.pow(Ea,e),new Fe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Fs:Math.pow(Fs,e),new Fe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fe(Kr(this.r),Kr(this.g),Kr(this.b),Ma(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wc,formatHex:wc,formatHex8:tk,formatRgb:Sc,toString:Sc}));function wc(){return`#${Zr(this.r)}${Zr(this.g)}${Zr(this.b)}`}function tk(){return`#${Zr(this.r)}${Zr(this.g)}${Zr(this.b)}${Zr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Sc(){const e=Ma(this.opacity);return`${e===1?"rgb(":"rgba("}${Kr(this.r)}, ${Kr(this.g)}, ${Kr(this.b)}${e===1?")":`, ${e})`}`}function Ma(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zr(e){return e=Kr(e),(e<16?"0":"")+e.toString(16)}function Tc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Xe(e,t,r,i)}function af(e){if(e instanceof Xe)return new Xe(e.h,e.s,e.l,e.opacity);if(e instanceof Rs||(e=Es(e)),!e)return new Xe;if(e instanceof Xe)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),n=NaN,o=a-s,c=(a+s)/2;return o?(t===a?n=(r-i)/o+(r<i)*6:r===a?n=(i-t)/o+2:n=(t-r)/o+4,o/=c<.5?a+s:2-a-s,n*=60):o=c>0&&c<1?0:n,new Xe(n,o,c,e.opacity)}function ek(e,t,r,i){return arguments.length===1?af(e):new Xe(e,t,r,i??1)}function Xe(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}_l(Xe,ek,sf(Rs,{brighter(e){return e=e==null?Ea:Math.pow(Ea,e),new Xe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Fs:Math.pow(Fs,e),new Xe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new Fe(qo(e>=240?e-240:e+120,s,i),qo(e,s,i),qo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Xe(_c(this.h),Ks(this.s),Ks(this.l),Ma(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ma(this.opacity);return`${e===1?"hsl(":"hsla("}${_c(this.h)}, ${Ks(this.s)*100}%, ${Ks(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _c(e){return e=(e||0)%360,e<0?e+360:e}function Ks(e){return Math.max(0,Math.min(1,e||0))}function qo(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Bl=e=>()=>e;function of(e,t){return function(r){return e+r*t}}function rk(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function nF(e,t){var r=t-e;return r?of(e,r>180||r<-180?r-360*Math.round(r/360):r):Bl(isNaN(e)?t:e)}function ik(e){return(e=+e)==1?nf:function(t,r){return r-t?rk(t,r,e):Bl(isNaN(t)?r:t)}}function nf(e,t){var r=t-e;return r?of(e,r):Bl(isNaN(e)?t:e)}const Bc=(function e(t){var r=ik(t);function i(s,a){var n=r((s=Pn(s)).r,(a=Pn(a)).r),o=r(s.g,a.g),c=r(s.b,a.b),h=nf(s.opacity,a.opacity);return function(l){return s.r=n(l),s.g=o(l),s.b=c(l),s.opacity=h(l),s+""}}return i.gamma=e,i})(1);function Dr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Rn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,No=new RegExp(Rn.source,"g");function sk(e){return function(){return e}}function ak(e){return function(t){return e(t)+""}}function ok(e,t){var r=Rn.lastIndex=No.lastIndex=0,i,s,a,n=-1,o=[],c=[];for(e=e+"",t=t+"";(i=Rn.exec(e))&&(s=No.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),o[n]?o[n]+=a:o[++n]=a),(i=i[0])===(s=s[0])?o[n]?o[n]+=s:o[++n]=s:(o[++n]=null,c.push({i:n,x:Dr(i,s)})),r=No.lastIndex;return r<t.length&&(a=t.slice(r),o[n]?o[n]+=a:o[++n]=a),o.length<2?c[0]?ak(c[0].x):sk(t):(t=c.length,function(h){for(var l=0,u;l<t;++l)o[(u=c[l]).i]=u.x(h);return o.join("")})}var vc=180/Math.PI,qn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lf(e,t,r,i,s,a){var n,o,c;return(n=Math.sqrt(e*e+t*t))&&(e/=n,t/=n),(c=e*r+t*i)&&(r-=e*c,i-=t*c),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,c/=o),e*i<t*r&&(e=-e,t=-t,c=-c,n=-n),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*vc,skewX:Math.atan(c)*vc,scaleX:n,scaleY:o}}var Qs;function nk(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qn:lf(t.a,t.b,t.c,t.d,t.e,t.f)}function lk(e){return e==null||(Qs||(Qs=document.createElementNS("http://www.w3.org/2000/svg","g")),Qs.setAttribute("transform",e),!(e=Qs.transform.baseVal.consolidate()))?qn:(e=e.matrix,lf(e.a,e.b,e.c,e.d,e.e,e.f))}function hf(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,l,u,d,f,m){if(h!==u||l!==d){var y=f.push("translate(",null,t,null,r);m.push({i:y-4,x:Dr(h,u)},{i:y-2,x:Dr(l,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function n(h,l,u,d){h!==l?(h-l>180?l+=360:l-h>180&&(h+=360),d.push({i:u.push(s(u)+"rotate(",null,i)-2,x:Dr(h,l)})):l&&u.push(s(u)+"rotate("+l+i)}function o(h,l,u,d){h!==l?d.push({i:u.push(s(u)+"skewX(",null,i)-2,x:Dr(h,l)}):l&&u.push(s(u)+"skewX("+l+i)}function c(h,l,u,d,f,m){if(h!==u||l!==d){var y=f.push(s(f)+"scale(",null,",",null,")");m.push({i:y-4,x:Dr(h,u)},{i:y-2,x:Dr(l,d)})}else(u!==1||d!==1)&&f.push(s(f)+"scale("+u+","+d+")")}return function(h,l){var u=[],d=[];return h=e(h),l=e(l),a(h.translateX,h.translateY,l.translateX,l.translateY,u,d),n(h.rotate,l.rotate,u,d),o(h.skewX,l.skewX,u,d),c(h.scaleX,h.scaleY,l.scaleX,l.scaleY,u,d),h=l=null,function(f){for(var m=-1,y=d.length,C;++m<y;)u[(C=d[m]).i]=C.x(f);return u.join("")}}}var hk=hf(nk,"px, ","px)","deg)"),ck=hf(lk,", ",")",")"),Wi=0,fs=0,ss=0,cf=1e3,$a,ps,Oa=0,ei=0,to=0,Ms=typeof performance=="object"&&performance.now?performance:Date,uf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function vl(){return ei||(uf(uk),ei=Ms.now()+to)}function uk(){ei=0}function Ia(){this._call=this._time=this._next=null}Ia.prototype=df.prototype={constructor:Ia,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?vl():+r)+(t==null?0:+t),!this._next&&ps!==this&&(ps?ps._next=this:$a=this,ps=this),this._call=e,this._time=r,Nn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nn())}};function df(e,t,r){var i=new Ia;return i.restart(e,t,r),i}function dk(){vl(),++Wi;for(var e=$a,t;e;)(t=ei-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Wi}function Lc(){ei=(Oa=Ms.now())+to,Wi=fs=0;try{dk()}finally{Wi=0,pk(),ei=0}}function fk(){var e=Ms.now(),t=e-Oa;t>cf&&(to-=t,Oa=e)}function pk(){for(var e,t=$a,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:$a=r);ps=e,Nn(i)}function Nn(e){if(!Wi){fs&&(fs=clearTimeout(fs));var t=e-ei;t>24?(e<1/0&&(fs=setTimeout(Lc,e-Ms.now()-to)),ss&&(ss=clearInterval(ss))):(ss||(Oa=Ms.now(),ss=setInterval(fk,cf)),Wi=1,uf(Lc))}}function Fc(e,t,r){var i=new Ia;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var gk=Yd("start","end","cancel","interrupt"),mk=[],ff=0,Ac=1,Wn=2,ga=3,Ec=4,zn=5,ma=6;function eo(e,t,r,i,s,a){var n=e.__transition;if(!n)e.__transition={};else if(r in n)return;yk(e,r,{name:t,index:i,group:s,on:gk,tween:mk,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ff})}function Ll(e,t){var r=Ke(e,t);if(r.state>ff)throw new Error("too late; already scheduled");return r}function cr(e,t){var r=Ke(e,t);if(r.state>ga)throw new Error("too late; already running");return r}function Ke(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function yk(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=df(a,0,r.time);function a(h){r.state=Ac,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var l,u,d,f;if(r.state!==Ac)return c();for(l in i)if(f=i[l],f.name===r.name){if(f.state===ga)return Fc(n);f.state===Ec?(f.state=ma,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[l]):+l<t&&(f.state=ma,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[l])}if(Fc(function(){r.state===ga&&(r.state=Ec,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=Wn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Wn){for(r.state=ga,s=new Array(d=r.tween.length),l=0,u=-1;l<d;++l)(f=r.tween[l].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=f);s.length=u+1}}function o(h){for(var l=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(c),r.state=zn,1),u=-1,d=s.length;++u<d;)s[u].call(e,l);r.state===zn&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=ma,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function xk(e,t){var r=e.__transition,i,s,a=!0,n;if(r){t=t==null?null:t+"";for(n in r){if((i=r[n]).name!==t){a=!1;continue}s=i.state>Wn&&i.state<zn,i.state=ma,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[n]}a&&delete e.__transition}}function Ck(e){return this.each(function(){xk(this,e)})}function bk(e,t){var r,i;return function(){var s=cr(this,e),a=s.tween;if(a!==r){i=r=a;for(var n=0,o=i.length;n<o;++n)if(i[n].name===t){i=i.slice(),i.splice(n,1);break}}s.tween=i}}function kk(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=cr(this,e),n=a.tween;if(n!==i){s=(i=n).slice();for(var o={name:t,value:r},c=0,h=s.length;c<h;++c)if(s[c].name===t){s[c]=o;break}c===h&&s.push(o)}a.tween=s}}function wk(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Ke(this.node(),r).tween,s=0,a=i.length,n;s<a;++s)if((n=i[s]).name===e)return n.value;return null}return this.each((t==null?bk:kk)(r,e,t))}function Fl(e,t,r){var i=e._id;return e.each(function(){var s=cr(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Ke(s,i).value[t]}}function pf(e,t){var r;return(typeof t=="number"?Dr:t instanceof Es?Bc:(r=Es(t))?(t=r,Bc):ok)(e,t)}function Sk(e){return function(){this.removeAttribute(e)}}function Tk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _k(e,t,r){var i,s=r+"",a;return function(){var n=this.getAttribute(e);return n===s?null:n===i?a:a=t(i=n,r)}}function Bk(e,t,r){var i,s=r+"",a;return function(){var n=this.getAttributeNS(e.space,e.local);return n===s?null:n===i?a:a=t(i=n,r)}}function vk(e,t,r){var i,s,a;return function(){var n,o=r(this),c;return o==null?void this.removeAttribute(e):(n=this.getAttribute(e),c=o+"",n===c?null:n===i&&c===s?a:(s=c,a=t(i=n,o)))}}function Lk(e,t,r){var i,s,a;return function(){var n,o=r(this),c;return o==null?void this.removeAttributeNS(e.space,e.local):(n=this.getAttributeNS(e.space,e.local),c=o+"",n===c?null:n===i&&c===s?a:(s=c,a=t(i=n,o)))}}function Fk(e,t){var r=Ja(e),i=r==="transform"?ck:pf;return this.attrTween(e,typeof t=="function"?(r.local?Lk:vk)(r,i,Fl(this,"attr."+e,t)):t==null?(r.local?Tk:Sk)(r):(r.local?Bk:_k)(r,i,t))}function Ak(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Ek(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Mk(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ek(e,a)),r}return s._value=t,s}function $k(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ak(e,a)),r}return s._value=t,s}function Ok(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ja(e);return this.tween(r,(i.local?Mk:$k)(i,t))}function Ik(e,t){return function(){Ll(this,e).delay=+t.apply(this,arguments)}}function Dk(e,t){return t=+t,function(){Ll(this,e).delay=t}}function Pk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ik:Dk)(t,e)):Ke(this.node(),t).delay}function Rk(e,t){return function(){cr(this,e).duration=+t.apply(this,arguments)}}function qk(e,t){return t=+t,function(){cr(this,e).duration=t}}function Nk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Rk:qk)(t,e)):Ke(this.node(),t).duration}function Wk(e,t){if(typeof t!="function")throw new Error;return function(){cr(this,e).ease=t}}function zk(e){var t=this._id;return arguments.length?this.each(Wk(t,e)):Ke(this.node(),t).ease}function Hk(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;cr(this,e).ease=r}}function Yk(e){if(typeof e!="function")throw new Error;return this.each(Hk(this._id,e))}function Uk(e){typeof e!="function"&&(e=Gd(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],c,h=0;h<n;++h)(c=a[h])&&e.call(c,c.__data__,h,a)&&o.push(c);return new Tr(i,this._parents,this._name,this._id)}function jk(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),n=new Array(i),o=0;o<a;++o)for(var c=t[o],h=r[o],l=c.length,u=n[o]=new Array(l),d,f=0;f<l;++f)(d=c[f]||h[f])&&(u[f]=d);for(;o<i;++o)n[o]=t[o];return new Tr(n,this._parents,this._name,this._id)}function Gk(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Xk(e,t,r){var i,s,a=Gk(t)?Ll:cr;return function(){var n=a(this,e),o=n.on;o!==i&&(s=(i=o).copy()).on(t,r),n.on=s}}function Vk(e,t){var r=this._id;return arguments.length<2?Ke(this.node(),r).on.on(e):this.each(Xk(r,e,t))}function Zk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Kk(){return this.on("end.remove",Zk(this._id))}function Qk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Sl(e));for(var i=this._groups,s=i.length,a=new Array(s),n=0;n<s;++n)for(var o=i[n],c=o.length,h=a[n]=new Array(c),l,u,d=0;d<c;++d)(l=o[d])&&(u=e.call(l,l.__data__,d,o))&&("__data__"in l&&(u.__data__=l.__data__),h[d]=u,eo(h[d],t,r,d,h,Ke(l,r)));return new Tr(a,this._parents,t,r)}function Jk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=jd(e));for(var i=this._groups,s=i.length,a=[],n=[],o=0;o<s;++o)for(var c=i[o],h=c.length,l,u=0;u<h;++u)if(l=c[u]){for(var d=e.call(l,l.__data__,u,c),f,m=Ke(l,r),y=0,C=d.length;y<C;++y)(f=d[y])&&eo(f,t,r,y,d,m);a.push(d),n.push(l)}return new Tr(a,n,t,r)}var t1=Ps.prototype.constructor;function e1(){return new t1(this._groups,this._parents)}function r1(e,t){var r,i,s;return function(){var a=Ni(this,e),n=(this.style.removeProperty(e),Ni(this,e));return a===n?null:a===r&&n===i?s:s=t(r=a,i=n)}}function gf(e){return function(){this.style.removeProperty(e)}}function i1(e,t,r){var i,s=r+"",a;return function(){var n=Ni(this,e);return n===s?null:n===i?a:a=t(i=n,r)}}function s1(e,t,r){var i,s,a;return function(){var n=Ni(this,e),o=r(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(e),Ni(this,e))),n===c?null:n===i&&c===s?a:(s=c,a=t(i=n,o))}}function a1(e,t){var r,i,s,a="style."+t,n="end."+a,o;return function(){var c=cr(this,e),h=c.on,l=c.value[a]==null?o||(o=gf(t)):void 0;(h!==r||s!==l)&&(i=(r=h).copy()).on(n,s=l),c.on=i}}function o1(e,t,r){var i=(e+="")=="transform"?hk:pf;return t==null?this.styleTween(e,r1(e,i)).on("end.style."+e,gf(e)):typeof t=="function"?this.styleTween(e,s1(e,i,Fl(this,"style."+e,t))).each(a1(this._id,e)):this.styleTween(e,i1(e,i,t),r).on("end.style."+e,null)}function n1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function l1(e,t,r){var i,s;function a(){var n=t.apply(this,arguments);return n!==s&&(i=(s=n)&&n1(e,n,r)),i}return a._value=t,a}function h1(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,l1(e,t,r??""))}function c1(e){return function(){this.textContent=e}}function u1(e){return function(){var t=e(this);this.textContent=t??""}}function d1(e){return this.tween("text",typeof e=="function"?u1(Fl(this,"text",e)):c1(e==null?"":e+""))}function f1(e){return function(t){this.textContent=e.call(this,t)}}function p1(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&f1(s)),t}return i._value=e,i}function g1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,p1(e))}function m1(){for(var e=this._name,t=this._id,r=mf(),i=this._groups,s=i.length,a=0;a<s;++a)for(var n=i[a],o=n.length,c,h=0;h<o;++h)if(c=n[h]){var l=Ke(c,t);eo(c,e,r,h,n,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Tr(i,this._parents,e,r)}function y1(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,n){var o={value:n},c={value:function(){--s===0&&a()}};r.each(function(){var h=cr(this,i),l=h.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(c)),h.on=t}),s===0&&a()})}var x1=0;function Tr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function mf(){return++x1}var xr=Ps.prototype;Tr.prototype={constructor:Tr,select:Qk,selectAll:Jk,selectChild:xr.selectChild,selectChildren:xr.selectChildren,filter:Uk,merge:jk,selection:e1,transition:m1,call:xr.call,nodes:xr.nodes,node:xr.node,size:xr.size,empty:xr.empty,each:xr.each,on:Vk,attr:Fk,attrTween:Ok,style:o1,styleTween:h1,text:d1,textTween:g1,remove:Kk,tween:wk,delay:Pk,duration:Nk,ease:zk,easeVarying:Yk,end:y1,[Symbol.iterator]:xr[Symbol.iterator]};function C1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var b1={time:null,delay:0,duration:250,ease:C1};function k1(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function w1(e){var t,r;e instanceof Tr?(t=e._id,e=e._name):(t=mf(),(r=b1).time=vl(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var n=i[a],o=n.length,c,h=0;h<o;++h)(c=n[h])&&eo(c,e,t,h,n,r||k1(c,t));return new Tr(i,this._parents,e,t)}Ps.prototype.interrupt=Ck;Ps.prototype.transition=w1;const Hn=Math.PI,Yn=2*Hn,Gr=1e-6,S1=Yn-Gr;function yf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function T1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return yf;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class _1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?yf:T1(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,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,n){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+n}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let n=this._x1,o=this._y1,c=i-t,h=s-r,l=n-t,u=o-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*c-h*l)>Gr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-n,m=s-o,y=c*c+h*h,C=f*f+m*m,x=Math.sqrt(y),b=Math.sqrt(d),k=a*Math.tan((Hn-Math.acos((y+d-C)/(2*x*b)))/2),T=k/b,B=k/x;Math.abs(T-1)>Gr&&this._append`L${t+T*l},${r+T*u}`,this._append`A${a},${a},0,0,${+(u*f>l*m)},${this._x1=t+B*c},${this._y1=r+B*h}`}}arc(t,r,i,s,a,n){if(t=+t,r=+r,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(s),c=i*Math.sin(s),h=t+o,l=r+c,u=1^n,d=n?s-a:a-s;this._x1===null?this._append`M${h},${l}`:(Math.abs(this._x1-h)>Gr||Math.abs(this._y1-l)>Gr)&&this._append`L${h},${l}`,i&&(d<0&&(d=d%Yn+Yn),d>S1?this._append`A${i},${i},0,1,${u},${t-o},${r-c}A${i},${i},0,1,${u},${this._x1=h},${this._y1=l}`:d>Gr&&this._append`A${i},${i},0,${+(d>=Hn)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function ui(e){return function(){return e}}const lF=Math.abs,hF=Math.atan2,cF=Math.cos,uF=Math.max,dF=Math.min,fF=Math.sin,pF=Math.sqrt,Mc=1e-12,Al=Math.PI,$c=Al/2,gF=2*Al;function mF(e){return e>1?0:e<-1?Al:Math.acos(e)}function yF(e){return e>=1?$c:e<=-1?-$c:Math.asin(e)}function B1(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 _1(t)}function v1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xf(e){this._context=e}xf.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 _s(e){return new xf(e)}function L1(e){return e[0]}function F1(e){return e[1]}function A1(e,t){var r=ui(!0),i=null,s=_s,a=null,n=B1(o);e=typeof e=="function"?e:e===void 0?L1:ui(e),t=typeof t=="function"?t:t===void 0?F1:ui(t);function o(c){var h,l=(c=v1(c)).length,u,d=!1,f;for(i==null&&(a=s(f=n())),h=0;h<=l;++h)!(h<l&&r(u=c[h],h,c))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,h,c),+t(u,h,c));if(f)return a=null,f+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:ui(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:ui(+c),o):t},o.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ui(!!c),o):r},o.curve=function(c){return arguments.length?(s=c,i!=null&&(a=s(i)),o):s},o.context=function(c){return arguments.length?(c==null?i=a=null:a=s(i=c),o):i},o}class Cf{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 bf(e){return new Cf(e,!0)}function kf(e){return new Cf(e,!1)}function Nr(){}function Da(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 ro(e){this._context=e}ro.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:Da(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:Da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Un(e){return new ro(e)}function wf(e){this._context=e}wf.prototype={areaStart:Nr,areaEnd:Nr,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:Da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function E1(e){return new wf(e)}function Sf(e){this._context=e}Sf.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:Da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function M1(e){return new Sf(e)}function Tf(e,t){this._basis=new ro(e),this._beta=t}Tf.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],s=t[0],a=e[r]-i,n=t[r]-s,o=-1,c;++o<=r;)c=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+c*a),this._beta*t[o]+(1-this._beta)*(s+c*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const $1=(function e(t){function r(i){return t===1?new ro(i):new Tf(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Pa(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 El(e,t){this._context=e,this._k=(1-t)/6}El.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:Pa(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:Pa(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}};const _f=(function e(t){function r(i){return new El(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ml(e,t){this._context=e,this._k=(1-t)/6}Ml.prototype={areaStart:Nr,areaEnd:Nr,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:Pa(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}};const O1=(function e(t){function r(i){return new Ml(i,t)}return r.tension=function(i){return e(+i)},r})(0);function $l(e,t){this._context=e,this._k=(1-t)/6}$l.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:Pa(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}};const I1=(function e(t){function r(i){return new $l(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ol(e,t,r){var i=e._x1,s=e._y1,a=e._x2,n=e._y2;if(e._l01_a>Mc){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,s=(s*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Mc){var h=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);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/l,n=(n*h+e._y1*e._l23_2a-r*e._l12_2a)/l}e._context.bezierCurveTo(i,s,a,n,e._x2,e._y2)}function Bf(e,t){this._context=e,this._alpha=t}Bf.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:Ol(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}};const vf=(function e(t){function r(i){return t?new Bf(i,t):new El(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Lf(e,t){this._context=e,this._alpha=t}Lf.prototype={areaStart:Nr,areaEnd:Nr,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:Ol(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}};const D1=(function e(t){function r(i){return t?new Lf(i,t):new Ml(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ff(e,t){this._context=e,this._alpha=t}Ff.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:Ol(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}};const P1=(function e(t){function r(i){return t?new Ff(i,t):new $l(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Af(e){this._context=e}Af.prototype={areaStart:Nr,areaEnd:Nr,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 R1(e){return new Af(e)}function Oc(e){return e<0?-1:1}function Ic(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),n=(r-e._y1)/(s||i<0&&-0),o=(a*s+n*i)/(i+s);return(Oc(a)+Oc(n))*Math.min(Math.abs(a),Math.abs(n),.5*Math.abs(o))||0}function Dc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Wo(e,t,r){var i=e._x0,s=e._y0,a=e._x1,n=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,s+o*t,a-o,n-o*r,a,n)}function Ra(e){this._context=e}Ra.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:Wo(this,this._t0,Dc(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,Wo(this,Dc(this,r=Ic(this,e,t)),r);break;default:Wo(this,this._t0,r=Ic(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ef(e){this._context=new Mf(e)}(Ef.prototype=Object.create(Ra.prototype)).point=function(e,t){Ra.prototype.point.call(this,t,e)};function Mf(e){this._context=e}Mf.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,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function $f(e){return new Ra(e)}function Of(e){return new Ef(e)}function If(e){this._context=e}If.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=Pc(e),s=Pc(t),a=0,n=1;n<r;++a,++n)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[n],t[n]);(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 Pc(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),n=new Array(r);for(s[0]=0,a[0]=2,n[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,n[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,n[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,n[t]-=i*n[t-1];for(s[r-1]=n[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(n[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function Df(e){return new If(e)}function io(e,t){this._context=e,this._t=t}io.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 Pf(e){return new io(e,.5)}function Rf(e){return new io(e,0)}function qf(e){return new io(e,1)}function gs(e,t,r){this.k=e,this.x=t,this.y=r}gs.prototype={constructor:gs,scale:function(e){return e===1?this:new gs(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new gs(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};gs.prototype;var q1=p(e=>{var s;const{securityLevel:t}=Rt();let r=Pt("body");if(t==="sandbox"){const n=((s=Pt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Pt(n.body)}return r.select(`#${e}`)},"selectSvgElement");function Nf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(Nf,"getDefaultExportFromCjs");var ye={},Js={},Or={},Rc;function Ui(){if(Rc)return Or;Rc=1;function e(n){return typeof n>"u"||n===null}p(e,"isNothing");function t(n){return typeof n=="object"&&n!==null}p(t,"isObject");function r(n){return Array.isArray(n)?n:e(n)?[]:[n]}p(r,"toArray");function i(n,o){if(o){const c=Object.keys(o);for(let h=0,l=c.length;h<l;h+=1){const u=c[h];n[u]=o[u]}}return n}p(i,"extend");function s(n,o){let c="";for(let h=0;h<o;h+=1)c+=n;return c}p(s,"repeat");function a(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}return p(a,"isNegativeZero"),Or.isNothing=e,Or.isObject=t,Or.toArray=r,Or.repeat=s,Or.isNegativeZero=a,Or.extend=i,Or}p(Ui,"requireCommon");var zo,qc;function ji(){if(qc)return zo;qc=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
131
+
132
+ `+r.mark.snippet),a+" "+s):a}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"),zo=t,zo}p(ji,"requireException");var Ho,Nc;function Wf(){if(Nc)return Ho;Nc=1;const e=Ui();function t(s,a,n,o,c){let h="",l="";const u=Math.floor(c/2)-1;return o-a>u&&(h=" ... ",a=o-u+h.length),n-o>u&&(l=" ...",n=o+u-l.length),{str:h+s.slice(a,n).replace(/\t/g,"→")+l,pos:o-a+h.length}}p(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}p(r,"padStart");function i(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const n=/\r?\n|\r|\0/g,o=[0],c=[];let h,l=-1;for(;h=n.exec(s.buffer);)c.push(h.index),o.push(h.index+h[0].length),s.position<=h.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u="";const d=Math.min(s.line+a.linesAfter,c.length).toString().length,f=a.maxLength-(a.indent+d+3);for(let y=1;y<=a.linesBefore&&!(l-y<0);y++){const C=t(s.buffer,o[l-y],c[l-y],s.position-(o[l]-o[l-y]),f);u=e.repeat(" ",a.indent)+r((s.line-y+1).toString(),d)+" | "+C.str+`
133
+ `+u}const m=t(s.buffer,o[l],c[l],s.position,f);u+=e.repeat(" ",a.indent)+r((s.line+1).toString(),d)+" | "+m.str+`
134
+ `,u+=e.repeat("-",a.indent+d+3+m.pos)+`^
135
+ `;for(let y=1;y<=a.linesAfter&&!(l+y>=c.length);y++){const C=t(s.buffer,o[l+y],c[l+y],s.position-(o[l]-o[l+y]),f);u+=e.repeat(" ",a.indent)+r((s.line+y+1).toString(),d)+" | "+C.str+`
136
+ `}return u.replace(/\n$/,"")}return p(i,"makeSnippet"),Ho=i,Ho}p(Wf,"requireSnippet");var Yo,Wc;function be(){if(Wc)return Yo;Wc=1;const e=ji(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const n={};return a!==null&&Object.keys(a).forEach(function(o){a[o].forEach(function(c){n[String(c)]=o})}),n}p(i,"compileStyleAliases");function s(a,n){if(n=n||{},Object.keys(n).forEach(function(o){if(t.indexOf(o)===-1)throw new e('Unknown option "'+o+'" is met in definition of "'+a+'" YAML type.')}),this.options=n,this.tag=a,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(o){return o},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=i(n.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return p(s,"Type2"),Yo=s,Yo}p(be,"requireType");var Uo,zc;function Il(){if(zc)return Uo;zc=1;const e=ji(),t=be();function r(a,n){const o=[];return a[n].forEach(function(c){let h=o.length;o.forEach(function(l,u){l.tag===c.tag&&l.kind===c.kind&&l.multi===c.multi&&(h=u)}),o[h]=c}),o}p(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(o){o.multi?(a.multi[o.kind].push(o),a.multi.fallback.push(o)):a[o.kind][o.tag]=a.fallback[o.tag]=o}p(n,"collectType");for(let o=0,c=arguments.length;o<c;o+=1)arguments[o].forEach(n);return a}p(i,"compileMap");function s(a){return this.extend(a)}return p(s,"Schema2"),s.prototype.extend=p(function(n){let o=[],c=[];if(n instanceof t)c.push(n);else if(Array.isArray(n))c=c.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(o=o.concat(n.implicit)),n.explicit&&(c=c.concat(n.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.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.")}),c.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 h=Object.create(s.prototype);return h.implicit=(this.implicit||[]).concat(o),h.explicit=(this.explicit||[]).concat(c),h.compiledImplicit=r(h,"implicit"),h.compiledExplicit=r(h,"explicit"),h.compiledTypeMap=i(h.compiledImplicit,h.compiledExplicit),h},"extend"),Uo=s,Uo}p(Il,"requireSchema");var jo,Hc;function Dl(){if(Hc)return jo;Hc=1;const e=be();return jo=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),jo}p(Dl,"requireStr");var Go,Yc;function Pl(){if(Yc)return Go;Yc=1;const e=be();return Go=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),Go}p(Pl,"requireSeq");var Xo,Uc;function Rl(){if(Uc)return Xo;Uc=1;const e=be();return Xo=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),Xo}p(Rl,"requireMap");var Vo,jc;function ql(){if(jc)return Vo;jc=1;const e=Il();return Vo=new e({explicit:[Dl(),Pl(),Rl()]}),Vo}p(ql,"requireFailsafe");var Zo,Gc;function Nl(){if(Gc)return Zo;Gc=1;const e=be();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(s){return s===null}return p(i,"isNull"),Zo=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"}),Zo}p(Nl,"require_null");var Ko,Xc;function Wl(){if(Xc)return Ko;Xc=1;const e=be();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}p(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}p(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return p(i,"isBoolean"),Ko=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(s){return s?"true":"false"},"lowercase"),uppercase:p(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Ko}p(Wl,"requireBool");var Qo,Vc;function zl(){if(Vc)return Qo;Vc=1;const e=Ui(),t=be();function r(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}p(r,"isHexCode");function i(h){return h>=48&&h<=55}p(i,"isOctCode");function s(h){return h>=48&&h<=57}p(s,"isDecCode");function a(h){if(h===null)return!1;const l=h.length;let u=0,d=!1;if(!l)return!1;let f=h[u];if((f==="-"||f==="+")&&(f=h[++u]),f==="0"){if(u+1===l)return!0;if(f=h[++u],f==="b"){for(u++;u<l;u++){if(f=h[u],f!=="0"&&f!=="1")return!1;d=!0}return d&&isFinite(n(h))}if(f==="x"){for(u++;u<l;u++){if(!r(h.charCodeAt(u)))return!1;d=!0}return d&&isFinite(n(h))}if(f==="o"){for(u++;u<l;u++){if(!i(h.charCodeAt(u)))return!1;d=!0}return d&&isFinite(n(h))}}for(;u<l;u++){if(!s(h.charCodeAt(u)))return!1;d=!0}return d?isFinite(n(h)):!1}p(a,"resolveYamlInteger");function n(h){let l=h,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(n,"parseYamlInteger");function o(h){return n(h)}p(o,"constructYamlInteger");function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&h%1===0&&!e.isNegativeZero(h)}return p(c,"isInteger"),Qo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:o,predicate:c,represent:{binary:p(function(h){return h>=0?"0b"+h.toString(2):"-0b"+h.toString(2).slice(1)},"binary"),octal:p(function(h){return h>=0?"0o"+h.toString(8):"-0o"+h.toString(8).slice(1)},"octal"),decimal:p(function(h){return h.toString(10)},"decimal"),hexadecimal:p(function(h){return h>=0?"0x"+h.toString(16).toUpperCase():"-0x"+h.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Qo}p(zl,"requireInt");var Jo,Zc;function Hl(){if(Zc)return Jo;Zc=1;const e=Ui(),t=be(),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 s(h){return h===null||!r.test(h)?!1:isFinite(parseFloat(h,10))?!0:i.test(h)}p(s,"resolveYamlFloat");function a(h){let l=h.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(a,"constructYamlFloat");const n=/^[-+]?[0-9]+e/;function o(h,l){if(isNaN(h))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===h)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===h)switch(l){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(h))return"-0.0";const u=h.toString(10);return n.test(u)?u.replace("e",".e"):u}p(o,"representYamlFloat");function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&(h%1!==0||e.isNegativeZero(h))}return p(c,"isFloat"),Jo=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:c,represent:o,defaultStyle:"lowercase"}),Jo}p(Hl,"requireFloat");var tn,Kc;function Yl(){return Kc||(Kc=1,tn=ql().extend({implicit:[Nl(),Wl(),zl(),Hl()]})),tn}p(Yl,"requireJson");var en,Qc;function Ul(){return Qc||(Qc=1,en=Yl()),en}p(Ul,"requireCore");var rn,Jc;function jl(){if(Jc)return rn;Jc=1;const e=be(),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(n){return n===null?!1:t.exec(n)!==null||r.exec(n)!==null}p(i,"resolveYamlTimestamp");function s(n){let o=0,c=null,h=t.exec(n);if(h===null&&(h=r.exec(n)),h===null)throw new Error("Date resolve error");const l=+h[1],u=+h[2]-1,d=+h[3];if(!h[4])return new Date(Date.UTC(l,u,d));const f=+h[4],m=+h[5],y=+h[6];if(h[7]){for(o=h[7].slice(0,3);o.length<3;)o+="0";o=+o}if(h[9]){const x=+h[10],b=+(h[11]||0);c=(x*60+b)*6e4,h[9]==="-"&&(c=-c)}const C=new Date(Date.UTC(l,u,d,f,m,y,o));return c&&C.setTime(C.getTime()-c),C}p(s,"constructYamlTimestamp");function a(n){return n.toISOString()}return p(a,"representYamlTimestamp"),rn=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),rn}p(jl,"requireTimestamp");var sn,tu;function Gl(){if(tu)return sn;tu=1;const e=be();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),sn=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),sn}p(Gl,"requireMerge");var an,eu;function Xl(){if(eu)return an;eu=1;const e=be(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
137
+ \r`;function r(n){if(n===null)return!1;let o=0;const c=n.length,h=t;for(let l=0;l<c;l++){const u=h.indexOf(n.charAt(l));if(!(u>64)){if(u<0)return!1;o+=6}}return o%8===0}p(r,"resolveYamlBinary");function i(n){const o=n.replace(/[\r\n=]/g,""),c=o.length,h=t;let l=0;const u=[];for(let f=0;f<c;f++)f%4===0&&f&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|h.indexOf(o.charAt(f));const d=c%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 s(n){let o="",c=0;const h=n.length,l=t;for(let d=0;d<h;d++)d%3===0&&d&&(o+=l[c>>18&63],o+=l[c>>12&63],o+=l[c>>6&63],o+=l[c&63]),c=(c<<8)+n[d];const u=h%3;return u===0?(o+=l[c>>18&63],o+=l[c>>12&63],o+=l[c>>6&63],o+=l[c&63]):u===2?(o+=l[c>>10&63],o+=l[c>>4&63],o+=l[c<<2&63],o+=l[64]):u===1&&(o+=l[c>>2&63],o+=l[c<<4&63],o+=l[64],o+=l[64]),o}p(s,"representYamlBinary");function a(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}return p(a,"isBinary"),an=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),an}p(Xl,"requireBinary");var on,ru;function Vl(){if(ru)return on;ru=1;const e=be(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const n=[],o=a;for(let c=0,h=o.length;c<h;c+=1){const l=o[c];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(n.indexOf(d)===-1)n.push(d);else return!1}return!0}p(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return p(s,"constructYamlOmap"),on=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),on}p(Vl,"requireOmap");var nn,iu;function Zl(){if(iu)return nn;iu=1;const e=be(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,n=new Array(a.length);for(let o=0,c=a.length;o<c;o+=1){const h=a[o];if(t.call(h)!=="[object Object]")return!1;const l=Object.keys(h);if(l.length!==1)return!1;n[o]=[l[0],h[l[0]]]}return!0}p(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,n=new Array(a.length);for(let o=0,c=a.length;o<c;o+=1){const h=a[o],l=Object.keys(h);n[o]=[l[0],h[l[0]]]}return n}return p(i,"constructYamlPairs"),nn=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),nn}p(Zl,"requirePairs");var ln,su;function Kl(){if(su)return ln;su=1;const e=be(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const n in a)if(t.call(a,n)&&a[n]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return p(i,"constructYamlSet"),ln=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),ln}p(Kl,"requireSet");var hn,au;function so(){return au||(au=1,hn=Ul().extend({implicit:[jl(),Gl()],explicit:[Xl(),Vl(),Zl(),Kl()]})),hn}p(so,"require_default");var ou;function zf(){if(ou)return Js;ou=1;const e=Ui(),t=ji(),r=Wf(),i=so(),s=Object.prototype.hasOwnProperty,a=1,n=2,o=3,c=4,h=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 b(g){return g===10||g===13}p(b,"isEol");function k(g){return g===9||g===32}p(k,"isWhiteSpace");function T(g){return g===9||g===32||g===10||g===13}p(T,"isWsOrEol");function B(g){return g===44||g===91||g===93||g===123||g===125}p(B,"isFlowIndicator");function L(g){if(g>=48&&g<=57)return g-48;const P=g|32;return P>=97&&P<=102?P-97+10:-1}p(L,"fromHexCode");function A(g){return g===120?2:g===117?4:g===85?8:0}p(A,"escapedHexLen");function F(g){return g>=48&&g<=57?g-48:-1}p(F,"fromDecimalCode");function z(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
138
+ `;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(z,"simpleEscapeSequence");function q(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}p(q,"charFromCodepoint");function D(g,P,G){P==="__proto__"?Object.defineProperty(g,P,{configurable:!0,enumerable:!0,writable:!0,value:G}):g[P]=G}p(D,"setProperty");const rt=new Array(256),W=new Array(256);for(let g=0;g<256;g++)rt[g]=z(g)?1:0,W[g]=z(g);function E(g,P){this.input=g,this.filename=P.filename||null,this.schema=P.schema||i,this.onWarning=P.onWarning||null,this.legacy=P.legacy||!1,this.json=P.json||!1,this.listener=P.listener||null,this.maxDepth=typeof P.maxDepth=="number"?P.maxDepth:100,this.maxTotalMergeKeys=typeof P.maxTotalMergeKeys=="number"?P.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(E,"State");function M(g,P){const G={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return G.snippet=r(G),new t(P,G)}p(M,"generateError");function v(g,P){throw M(g,P)}p(v,"throwError");function R(g,P){g.onWarning&&g.onWarning.call(null,M(g,P))}p(R,"throwWarning");function O(g,P,G){const K=g.anchorMapTransactions;if(K.length!==0){const j=K[K.length-1];s.call(j,P)||(j[P]={existed:s.call(g.anchorMap,P),value:g.anchorMap[P]})}g.anchorMap[P]=G}p(O,"storeAnchor");function X(g){g.anchorMapTransactions.push(Object.create(null))}p(X,"beginAnchorTransaction");function Z(g){const P=g.anchorMapTransactions.pop(),G=g.anchorMapTransactions;if(G.length===0)return;const K=G[G.length-1],j=Object.keys(P);for(let nt=0,S=j.length;nt<S;nt+=1){const N=j[nt];s.call(K,N)||(K[N]=P[N])}}p(Z,"commitAnchorTransaction");function lt(g){const P=g.anchorMapTransactions.pop(),G=Object.keys(P);for(let K=G.length-1;K>=0;K-=1){const j=P[G[K]];j.existed?g.anchorMap[G[K]]=j.value:delete g.anchorMap[G[K]]}}p(lt,"rollbackAnchorTransaction");function ht(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(ht,"snapshotState");function dt(g,P){g.position=P.position,g.line=P.line,g.lineStart=P.lineStart,g.lineIndent=P.lineIndent,g.firstTabInLine=P.firstTabInLine,g.tag=P.tag,g.anchor=P.anchor,g.kind=P.kind,g.result=P.result}p(dt,"restoreState");const bt={YAML:p(function(P,G,K){P.version!==null&&v(P,"duplication of %YAML directive"),K.length!==1&&v(P,"YAML directive accepts exactly one argument");const j=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);j===null&&v(P,"ill-formed argument of the YAML directive");const nt=parseInt(j[1],10),S=parseInt(j[2],10);nt!==1&&v(P,"unacceptable YAML version of the document"),P.version=K[0],P.checkLineBreaks=S<2,S!==1&&S!==2&&R(P,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(P,G,K){let j;K.length!==2&&v(P,"TAG directive accepts exactly two arguments");const nt=K[0];j=K[1],y.test(nt)||v(P,"ill-formed tag handle (first argument) of the TAG directive"),s.call(P.tagMap,nt)&&v(P,'there is a previously declared suffix for "'+nt+'" tag handle'),C.test(j)||v(P,"ill-formed tag prefix (second argument) of the TAG directive");try{j=decodeURIComponent(j)}catch{v(P,"tag prefix is malformed: "+j)}P.tagMap[nt]=j},"handleTagDirective")};function St(g,P,G,K){if(P<G){const j=g.input.slice(P,G);if(K)for(let nt=0,S=j.length;nt<S;nt+=1){const N=j.charCodeAt(nt);N===9||N>=32&&N<=1114111||v(g,"expected valid JSON character")}else d.test(j)&&v(g,"the stream contains non-printable characters");g.result+=j}}p(St,"captureSegment");function yt(g,P,G,K){e.isObject(G)||v(g,"cannot merge mappings; the provided source object is unacceptable");const j=Object.keys(G);for(let nt=0,S=j.length;nt<S;nt+=1){const N=j[nt];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&v(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),s.call(P,N)||(D(P,N,G[N]),K[N]=!0)}}p(yt,"mergeMappings");function At(g,P,G,K,j,nt,S,N,it){if(Array.isArray(j)){j=Array.prototype.slice.call(j);for(let V=0,Q=j.length;V<Q;V+=1)Array.isArray(j[V])&&v(g,"nested arrays are not supported inside keys"),typeof j=="object"&&x(j[V])==="[object Object]"&&(j[V]="[object Object]")}if(typeof j=="object"&&x(j)==="[object Object]"&&(j="[object Object]"),j=String(j),P===null&&(P={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(nt))for(let V=0,Q=nt.length;V<Q;V+=1)yt(g,P,nt[V],G);else yt(g,P,nt,G);else!g.json&&!s.call(G,j)&&s.call(P,j)&&(g.line=S||g.line,g.lineStart=N||g.lineStart,g.position=it||g.position,v(g,"duplicated mapping key")),D(P,j,nt),delete G[j];return P}p(At,"storeMappingPair");function Dt(g){const P=g.input.charCodeAt(g.position);P===10?g.position++:P===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):v(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}p(Dt,"readLineBreak");function _t(g,P,G){let K=0,j=g.input.charCodeAt(g.position);for(;j!==0;){for(;k(j);)j===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),j=g.input.charCodeAt(++g.position);if(P&&j===35)do j=g.input.charCodeAt(++g.position);while(j!==10&&j!==13&&j!==0);if(b(j))for(Dt(g),j=g.input.charCodeAt(g.position),K++,g.lineIndent=0;j===32;)g.lineIndent++,j=g.input.charCodeAt(++g.position);else break}return G!==-1&&K!==0&&g.lineIndent<G&&R(g,"deficient indentation"),K}p(_t,"skipSeparationSpace");function ct(g){let P=g.position,G=g.input.charCodeAt(P);return!!((G===45||G===46)&&G===g.input.charCodeAt(P+1)&&G===g.input.charCodeAt(P+2)&&(P+=3,G=g.input.charCodeAt(P),G===0||T(G)))}p(ct,"testDocumentSeparator");function Ct(g,P){P===1?g.result+=" ":P>1&&(g.result+=e.repeat(`
139
+ `,P-1))}p(Ct,"writeFoldedLines");function Et(g,P,G){let K,j,nt,S,N,it;const V=g.kind,Q=g.result;let ot=g.input.charCodeAt(g.position);if(T(ot)||B(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 st=g.input.charCodeAt(g.position+1);if(T(st)||G&&B(st))return!1}for(g.kind="scalar",g.result="",K=j=g.position,nt=!1;ot!==0;){if(ot===58){const st=g.input.charCodeAt(g.position+1);if(T(st)||G&&B(st))break}else if(ot===35){const st=g.input.charCodeAt(g.position-1);if(T(st))break}else{if(g.position===g.lineStart&&ct(g)||G&&B(ot))break;if(b(ot))if(S=g.line,N=g.lineStart,it=g.lineIndent,_t(g,!1,-1),g.lineIndent>=P){nt=!0,ot=g.input.charCodeAt(g.position);continue}else{g.position=j,g.line=S,g.lineStart=N,g.lineIndent=it;break}}nt&&(St(g,K,j,!1),Ct(g,g.line-S),K=j=g.position,nt=!1),k(ot)||(j=g.position+1),ot=g.input.charCodeAt(++g.position)}return St(g,K,j,!1),g.result?!0:(g.kind=V,g.result=Q,!1)}p(Et,"readPlainScalar");function Nt(g,P){let G,K,j=g.input.charCodeAt(g.position);if(j!==39)return!1;for(g.kind="scalar",g.result="",g.position++,G=K=g.position;(j=g.input.charCodeAt(g.position))!==0;)if(j===39)if(St(g,G,g.position,!0),j=g.input.charCodeAt(++g.position),j===39)G=g.position,g.position++,K=g.position;else return!0;else b(j)?(St(g,G,K,!0),Ct(g,_t(g,!1,P)),G=K=g.position):g.position===g.lineStart&&ct(g)?v(g,"unexpected end of the document within a single quoted scalar"):(g.position++,k(j)||(K=g.position));v(g,"unexpected end of the stream within a single quoted scalar")}p(Nt,"readSingleQuotedScalar");function Gt(g,P){let G,K,j,nt=g.input.charCodeAt(g.position);if(nt!==34)return!1;for(g.kind="scalar",g.result="",g.position++,G=K=g.position;(nt=g.input.charCodeAt(g.position))!==0;){if(nt===34)return St(g,G,g.position,!0),g.position++,!0;if(nt===92){if(St(g,G,g.position,!0),nt=g.input.charCodeAt(++g.position),b(nt))_t(g,!1,P);else if(nt<256&&rt[nt])g.result+=W[nt],g.position++;else if((j=A(nt))>0){let S=j,N=0;for(;S>0;S--)nt=g.input.charCodeAt(++g.position),(j=L(nt))>=0?N=(N<<4)+j:v(g,"expected hexadecimal character");g.result+=q(N),g.position++}else v(g,"unknown escape sequence");G=K=g.position}else b(nt)?(St(g,G,K,!0),Ct(g,_t(g,!1,P)),G=K=g.position):g.position===g.lineStart&&ct(g)?v(g,"unexpected end of the document within a double quoted scalar"):(g.position++,k(nt)||(K=g.position))}v(g,"unexpected end of the stream within a double quoted scalar")}p(Gt,"readDoubleQuotedScalar");function H(g,P){let G=!0,K,j,nt;const S=g.tag;let N;const it=g.anchor;let V,Q,ot,st;const wt=Object.create(null);let gt,Tt,Lt,qt=g.input.charCodeAt(g.position);if(qt===91)V=93,st=!1,N=[];else if(qt===123)V=125,st=!0,N={};else return!1;for(g.anchor!==null&&O(g,g.anchor,N),qt=g.input.charCodeAt(++g.position);qt!==0;){if(_t(g,!0,P),qt=g.input.charCodeAt(g.position),qt===V)return g.position++,g.tag=S,g.anchor=it,g.kind=st?"mapping":"sequence",g.result=N,!0;if(G?qt===44&&v(g,"expected the node content, but found ','"):v(g,"missed comma between flow collection entries"),Tt=gt=Lt=null,Q=ot=!1,qt===63){const Vt=g.input.charCodeAt(g.position+1);T(Vt)&&(Q=ot=!0,g.position++,_t(g,!0,P))}K=g.line,j=g.lineStart,nt=g.position,ie(g,P,a,!1,!0),Tt=g.tag,gt=g.result,_t(g,!0,P),qt=g.input.charCodeAt(g.position),(ot||g.line===K)&&qt===58&&(Q=!0,qt=g.input.charCodeAt(++g.position),_t(g,!0,P),ie(g,P,a,!1,!0),Lt=g.result),st?At(g,N,wt,Tt,gt,Lt,K,j,nt):Q?N.push(At(g,null,wt,Tt,gt,Lt,K,j,nt)):N.push(gt),_t(g,!0,P),qt=g.input.charCodeAt(g.position),qt===44?(G=!0,qt=g.input.charCodeAt(++g.position)):G=!1}v(g,"unexpected end of the stream within a flow collection")}p(H,"readFlowCollection");function kt(g,P){let G,K=h,j=!1,nt=!1,S=P,N=0,it=!1,V,Q=g.input.charCodeAt(g.position);if(Q===124)G=!1;else if(Q===62)G=!0;else return!1;for(g.kind="scalar",g.result="";Q!==0;)if(Q=g.input.charCodeAt(++g.position),Q===43||Q===45)h===K?K=Q===43?u:l:v(g,"repeat of a chomping mode identifier");else if((V=F(Q))>=0)V===0?v(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):nt?v(g,"repeat of an indentation width identifier"):(S=P+V-1,nt=!0);else break;if(k(Q)){do Q=g.input.charCodeAt(++g.position);while(k(Q));if(Q===35)do Q=g.input.charCodeAt(++g.position);while(!b(Q)&&Q!==0)}for(;Q!==0;){for(Dt(g),g.lineIndent=0,Q=g.input.charCodeAt(g.position);(!nt||g.lineIndent<S)&&Q===32;)g.lineIndent++,Q=g.input.charCodeAt(++g.position);if(!nt&&g.lineIndent>S&&(S=g.lineIndent),b(Q)){N++;continue}if(!nt&&S===0&&v(g,"missing indentation for block scalar"),g.lineIndent<S){K===u?g.result+=e.repeat(`
140
+ `,j?1+N:N):K===h&&j&&(g.result+=`
141
+ `);break}G?k(Q)?(it=!0,g.result+=e.repeat(`
142
+ `,j?1+N:N)):it?(it=!1,g.result+=e.repeat(`
143
+ `,N+1)):N===0?j&&(g.result+=" "):g.result+=e.repeat(`
144
+ `,N):g.result+=e.repeat(`
145
+ `,j?1+N:N),j=!0,nt=!0,N=0;const ot=g.position;for(;!b(Q)&&Q!==0;)Q=g.input.charCodeAt(++g.position);St(g,ot,g.position,!1)}return!0}p(kt,"readBlockScalar");function ke(g,P){const G=g.tag,K=g.anchor,j=[];let nt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&O(g,g.anchor,j);let S=g.input.charCodeAt(g.position);for(;S!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation")),S===45);){const N=g.input.charCodeAt(g.position+1);if(!T(N))break;if(nt=!0,g.position++,_t(g,!0,-1)&&g.lineIndent<=P){j.push(null),S=g.input.charCodeAt(g.position);continue}const it=g.line;if(ie(g,P,o,!1,!0),j.push(g.result),_t(g,!0,-1),S=g.input.charCodeAt(g.position),(g.line===it||g.lineIndent>P)&&S!==0)v(g,"bad indentation of a sequence entry");else if(g.lineIndent<P)break}return nt?(g.tag=G,g.anchor=K,g.kind="sequence",g.result=j,!0):!1}p(ke,"readBlockSequence");function Ht(g,P,G){let K,j,nt,S;const N=g.tag,it=g.anchor,V={},Q=Object.create(null);let ot=null,st=null,wt=null,gt=!1,Tt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&O(g,g.anchor,V);let Lt=g.input.charCodeAt(g.position);for(;Lt!==0;){!gt&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation"));const qt=g.input.charCodeAt(g.position+1),Vt=g.line;if((Lt===63||Lt===58)&&T(qt))Lt===63?(gt&&(At(g,V,Q,ot,st,null,j,nt,S),ot=st=wt=null),Tt=!0,gt=!0,K=!0):gt?(gt=!1,K=!0):v(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,Lt=qt;else{if(j=g.line,nt=g.lineStart,S=g.position,!ie(g,G,n,!1,!0))break;if(g.line===Vt){for(Lt=g.input.charCodeAt(g.position);k(Lt);)Lt=g.input.charCodeAt(++g.position);if(Lt===58)Lt=g.input.charCodeAt(++g.position),T(Lt)||v(g,"a whitespace character is expected after the key-value separator within a block mapping"),gt&&(At(g,V,Q,ot,st,null,j,nt,S),ot=st=wt=null),Tt=!0,gt=!1,K=!1,ot=g.tag,st=g.result;else if(Tt)v(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=N,g.anchor=it,!0}else if(Tt)v(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=N,g.anchor=it,!0}if((g.line===Vt||g.lineIndent>P)&&(gt&&(j=g.line,nt=g.lineStart,S=g.position),ie(g,P,c,!0,K)&&(gt?st=g.result:wt=g.result),gt||(At(g,V,Q,ot,st,wt,j,nt,S),ot=st=wt=null),_t(g,!0,-1),Lt=g.input.charCodeAt(g.position)),(g.line===Vt||g.lineIndent>P)&&Lt!==0)v(g,"bad indentation of a mapping entry");else if(g.lineIndent<P)break}return gt&&At(g,V,Q,ot,st,null,j,nt,S),Tt&&(g.tag=N,g.anchor=it,g.kind="mapping",g.result=V),Tt}p(Ht,"readBlockMapping");function dr(g){let P=!1,G=!1,K,j,nt=g.input.charCodeAt(g.position);if(nt!==33)return!1;g.tag!==null&&v(g,"duplication of a tag property"),nt=g.input.charCodeAt(++g.position),nt===60?(P=!0,nt=g.input.charCodeAt(++g.position)):nt===33?(G=!0,K="!!",nt=g.input.charCodeAt(++g.position)):K="!";let S=g.position;if(P){do nt=g.input.charCodeAt(++g.position);while(nt!==0&&nt!==62);g.position<g.length?(j=g.input.slice(S,g.position),nt=g.input.charCodeAt(++g.position)):v(g,"unexpected end of the stream within a verbatim tag")}else{for(;nt!==0&&!T(nt);)nt===33&&(G?v(g,"tag suffix cannot contain exclamation marks"):(K=g.input.slice(S-1,g.position+1),y.test(K)||v(g,"named tag handle cannot contain such characters"),G=!0,S=g.position+1)),nt=g.input.charCodeAt(++g.position);j=g.input.slice(S,g.position),m.test(j)&&v(g,"tag suffix cannot contain flow indicator characters")}j&&!C.test(j)&&v(g,"tag name cannot contain such characters: "+j);try{j=decodeURIComponent(j)}catch{v(g,"tag name is malformed: "+j)}return P?g.tag=j:s.call(g.tagMap,K)?g.tag=g.tagMap[K]+j:K==="!"?g.tag="!"+j:K==="!!"?g.tag="tag:yaml.org,2002:"+j:v(g,'undeclared tag handle "'+K+'"'),!0}p(dr,"readTagProperty");function de(g){let P=g.input.charCodeAt(g.position);if(P!==38)return!1;g.anchor!==null&&v(g,"duplication of an anchor property"),P=g.input.charCodeAt(++g.position);const G=g.position;for(;P!==0&&!T(P)&&!B(P);)P=g.input.charCodeAt(++g.position);return g.position===G&&v(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(G,g.position),!0}p(de,"readAnchorProperty");function Pe(g){let P=g.input.charCodeAt(g.position);if(P!==42)return!1;P=g.input.charCodeAt(++g.position);const G=g.position;for(;P!==0&&!T(P)&&!B(P);)P=g.input.charCodeAt(++g.position);g.position===G&&v(g,"name of an alias node must contain at least one character");const K=g.input.slice(G,g.position);return s.call(g.anchorMap,K)||v(g,'unidentified alias "'+K+'"'),g.result=g.anchorMap[K],_t(g,!0,-1),!0}p(Pe,"readAlias");function vr(g,P,G,K){const j=ht(g);return X(g),dt(g,P),g.tag=null,g.anchor=null,g.kind=null,g.result=null,Ht(g,G,K)&&g.kind==="mapping"?(Z(g),!0):(lt(g),dt(g,j),!1)}p(vr,"tryReadBlockMappingFromProperty");function ie(g,P,G,K,j){let nt,S,N=1,it=!1,V=!1,Q=null,ot,st,wt;g.depth>=g.maxDepth&&v(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 gt=nt=S=c===G||o===G;if(K&&_t(g,!0,-1)&&(it=!0,g.lineIndent>P?N=1:g.lineIndent===P?N=0:g.lineIndent<P&&(N=-1)),N===1)for(;;){const Tt=g.input.charCodeAt(g.position),Lt=ht(g);if(it&&(Tt===33&&g.tag!==null||Tt===38&&g.anchor!==null)||!dr(g)&&!de(g))break;Q===null&&(Q=Lt),_t(g,!0,-1)?(it=!0,S=gt,g.lineIndent>P?N=1:g.lineIndent===P?N=0:g.lineIndent<P&&(N=-1)):S=!1}if(S&&(S=it||j),N===1||c===G)if(a===G||n===G?st=P:st=P+1,wt=g.position-g.lineStart,N===1)if(S&&(ke(g,wt)||Ht(g,wt,st))||H(g,st))V=!0;else{const Tt=g.input.charCodeAt(g.position);Q!==null&&gt&&!S&&Tt!==124&&Tt!==62&&vr(g,Q,Q.position-Q.lineStart,st)||nt&&kt(g,st)||Nt(g,st)||Gt(g,st)?V=!0:Pe(g)?(V=!0,(g.tag!==null||g.anchor!==null)&&v(g,"alias node should not have any properties")):Et(g,st,a===G)&&(V=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&O(g,g.anchor,g.result)}else N===0&&(V=S&&ke(g,wt));if(g.tag===null)g.anchor!==null&&O(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&v(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let Tt=0,Lt=g.implicitTypes.length;Tt<Lt;Tt+=1)if(ot=g.implicitTypes[Tt],ot.resolve(g.result)){g.result=ot.construct(g.result),g.tag=ot.tag,g.anchor!==null&&O(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))ot=g.typeMap[g.kind||"fallback"][g.tag];else{ot=null;const Tt=g.typeMap.multi[g.kind||"fallback"];for(let Lt=0,qt=Tt.length;Lt<qt;Lt+=1)if(g.tag.slice(0,Tt[Lt].tag.length)===Tt[Lt].tag){ot=Tt[Lt];break}}ot||v(g,"unknown tag !<"+g.tag+">"),g.result!==null&&ot.kind!==g.kind&&v(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&&O(g,g.anchor,g.result)):v(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||V}p(ie,"composeNode");function Lr(g){const P=g.position;let G=!1,K;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(K=g.input.charCodeAt(g.position))!==0&&(_t(g,!0,-1),K=g.input.charCodeAt(g.position),!(g.lineIndent>0||K!==37));){G=!0,K=g.input.charCodeAt(++g.position);let j=g.position;for(;K!==0&&!T(K);)K=g.input.charCodeAt(++g.position);const nt=g.input.slice(j,g.position),S=[];for(nt.length<1&&v(g,"directive name must not be less than one character in length");K!==0;){for(;k(K);)K=g.input.charCodeAt(++g.position);if(K===35){do K=g.input.charCodeAt(++g.position);while(K!==0&&!b(K));break}if(b(K))break;for(j=g.position;K!==0&&!T(K);)K=g.input.charCodeAt(++g.position);S.push(g.input.slice(j,g.position))}K!==0&&Dt(g),s.call(bt,nt)?bt[nt](g,nt,S):R(g,'unknown document directive "'+nt+'"')}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)):G&&v(g,"directives end mark is expected"),ie(g,g.lineIndent-1,c,!1,!0),_t(g,!0,-1),g.checkLineBreaks&&f.test(g.input.slice(P,g.position))&&R(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&ct(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,_t(g,!0,-1));return}g.position<g.length-1&&v(g,"end of the stream or a document separator is expected")}p(Lr,"readDocument");function Qe(g,P){g=String(g),P=P||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
146
+ `),g.charCodeAt(0)===65279&&(g=g.slice(1)));const G=new E(g,P),K=g.indexOf("\0");for(K!==-1&&(G.position=K,v(G,"null byte is not allowed in input")),G.input+="\0";G.input.charCodeAt(G.position)===32;)G.lineIndent+=1,G.position+=1;for(;G.position<G.length-1;)Lr(G);return G.documents}p(Qe,"loadDocuments");function fr(g,P,G){P!==null&&typeof P=="object"&&typeof G>"u"&&(G=P,P=null);const K=Qe(g,G);if(typeof P!="function")return K;for(let j=0,nt=K.length;j<nt;j+=1)P(K[j])}p(fr,"loadAll2");function pr(g,P){const G=Qe(g,P);if(G.length!==0){if(G.length===1)return G[0];throw new t("expected a single document in the stream, but found more")}}return p(pr,"load2"),Js.loadAll=fr,Js.load=pr,Js}p(zf,"requireLoader");var cn={},nu;function Hf(){if(nu)return cn;nu=1;const e=Ui(),t=ji(),r=so(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,n=9,o=10,c=13,h=32,l=33,u=34,d=35,f=37,m=38,y=39,C=42,x=44,b=45,k=58,T=61,B=62,L=63,A=64,F=91,z=93,q=96,D=123,rt=124,W=125,E={};E[0]="\\0",E[7]="\\a",E[8]="\\b",E[9]="\\t",E[10]="\\n",E[11]="\\v",E[12]="\\f",E[13]="\\r",E[27]="\\e",E[34]='\\"',E[92]="\\\\",E[133]="\\N",E[160]="\\_",E[8232]="\\L",E[8233]="\\P";const M=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(S,N){if(N===null)return{};const it={},V=Object.keys(N);for(let Q=0,ot=V.length;Q<ot;Q+=1){let st=V[Q],wt=String(N[st]);st.slice(0,2)==="!!"&&(st="tag:yaml.org,2002:"+st.slice(2));const gt=S.compiledTypeMap.fallback[st];gt&&s.call(gt.styleAliases,wt)&&(wt=gt.styleAliases[wt]),it[st]=wt}return it}p(R,"compileStyleMap");function O(S){let N,it;const V=S.toString(16).toUpperCase();if(S<=255)N="x",it=2;else if(S<=65535)N="u",it=4;else if(S<=4294967295)N="U",it=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+N+e.repeat("0",it-V.length)+V}p(O,"encodeHex");const X=1,Z=2;function lt(S){this.schema=S.schema||r,this.indent=Math.max(1,S.indent||2),this.noArrayIndent=S.noArrayIndent||!1,this.skipInvalid=S.skipInvalid||!1,this.flowLevel=e.isNothing(S.flowLevel)?-1:S.flowLevel,this.styleMap=R(this.schema,S.styles||null),this.sortKeys=S.sortKeys||!1,this.lineWidth=S.lineWidth||80,this.noRefs=S.noRefs||!1,this.noCompatMode=S.noCompatMode||!1,this.condenseFlow=S.condenseFlow||!1,this.quotingType=S.quotingType==='"'?Z:X,this.forceQuotes=S.forceQuotes||!1,this.replacer=typeof S.replacer=="function"?S.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(lt,"State");function ht(S,N){const it=e.repeat(" ",N);let V=0,Q="";const ot=S.length;for(;V<ot;){let st;const wt=S.indexOf(`
147
+ `,V);wt===-1?(st=S.slice(V),V=ot):(st=S.slice(V,wt+1),V=wt+1),st.length&&st!==`
148
+ `&&(Q+=it),Q+=st}return Q}p(ht,"indentString");function dt(S,N){return`
149
+ `+e.repeat(" ",S.indent*N)}p(dt,"generateNextLine");function bt(S,N){for(let it=0,V=S.implicitTypes.length;it<V;it+=1)if(S.implicitTypes[it].resolve(N))return!0;return!1}p(bt,"testImplicitResolving");function St(S){return S===h||S===n}p(St,"isWhitespace");function yt(S){return S>=32&&S<=126||S>=161&&S<=55295&&S!==8232&&S!==8233||S>=57344&&S<=65533&&S!==a||S>=65536&&S<=1114111}p(yt,"isPrintable");function At(S){return yt(S)&&S!==a&&S!==c&&S!==o}p(At,"isNsCharOrWhitespace");function Dt(S,N,it){const V=At(S),Q=V&&!St(S);return(it?V:V&&S!==x&&S!==F&&S!==z&&S!==D&&S!==W)&&S!==d&&!(N===k&&!Q)||At(N)&&!St(N)&&S===d||N===k&&Q}p(Dt,"isPlainSafe");function _t(S){return yt(S)&&S!==a&&!St(S)&&S!==b&&S!==L&&S!==k&&S!==x&&S!==F&&S!==z&&S!==D&&S!==W&&S!==d&&S!==m&&S!==C&&S!==l&&S!==rt&&S!==T&&S!==B&&S!==y&&S!==u&&S!==f&&S!==A&&S!==q}p(_t,"isPlainSafeFirst");function ct(S){return!St(S)&&S!==k}p(ct,"isPlainSafeLast");function Ct(S,N){const it=S.charCodeAt(N);let V;return it>=55296&&it<=56319&&N+1<S.length&&(V=S.charCodeAt(N+1),V>=56320&&V<=57343)?(it-55296)*1024+V-56320+65536:it}p(Ct,"codePointAt");function Et(S){return/^\n* /.test(S)}p(Et,"needIndentIndicator");const Nt=1,Gt=2,H=3,kt=4,ke=5;function Ht(S,N,it,V,Q,ot,st,wt){let gt,Tt=0,Lt=null,qt=!1,Vt=!1;const Zi=V!==-1;let Fr=-1,Ar=_t(Ct(S,0))&&ct(Ct(S,S.length-1));if(N||st)for(gt=0;gt<S.length;Tt>=65536?gt+=2:gt++){if(Tt=Ct(S,gt),!yt(Tt))return ke;Ar=Ar&&Dt(Tt,Lt,wt),Lt=Tt}else{for(gt=0;gt<S.length;Tt>=65536?gt+=2:gt++){if(Tt=Ct(S,gt),Tt===o)qt=!0,Zi&&(Vt=Vt||gt-Fr-1>V&&S[Fr+1]!==" ",Fr=gt);else if(!yt(Tt))return ke;Ar=Ar&&Dt(Tt,Lt,wt),Lt=Tt}Vt=Vt||Zi&&gt-Fr-1>V&&S[Fr+1]!==" "}return!qt&&!Vt?Ar&&!st&&!Q(S)?Nt:ot===Z?ke:Gt:it>9&&Et(S)?ke:st?ot===Z?ke:Gt:Vt?kt:H}p(Ht,"chooseScalarStyle");function dr(S,N,it,V,Q){S.dump=(function(){if(N.length===0)return S.quotingType===Z?'""':"''";if(!S.noCompatMode&&(M.indexOf(N)!==-1||v.test(N)))return S.quotingType===Z?'"'+N+'"':"'"+N+"'";const ot=S.indent*Math.max(1,it),st=S.lineWidth===-1?-1:Math.max(Math.min(S.lineWidth,40),S.lineWidth-ot),wt=V||S.flowLevel>-1&&it>=S.flowLevel;function gt(Tt){return bt(S,Tt)}switch(p(gt,"testAmbiguity"),Ht(N,wt,S.indent,st,gt,S.quotingType,S.forceQuotes&&!V,Q)){case Nt:return N;case Gt:return"'"+N.replace(/'/g,"''")+"'";case H:return"|"+de(N,S.indent)+Pe(ht(N,ot));case kt:return">"+de(N,S.indent)+Pe(ht(vr(N,st),ot));case ke:return'"'+Lr(N)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(dr,"writeScalar");function de(S,N){const it=Et(S)?String(N):"",V=S[S.length-1]===`
150
+ `,ot=V&&(S[S.length-2]===`
151
+ `||S===`
152
+ `)?"+":V?"":"-";return it+ot+`
153
+ `}p(de,"blockHeader");function Pe(S){return S[S.length-1]===`
154
+ `?S.slice(0,-1):S}p(Pe,"dropEndingNewline");function vr(S,N){const it=/(\n+)([^\n]*)/g;let V=(function(){let wt=S.indexOf(`
155
+ `);return wt=wt!==-1?wt:S.length,it.lastIndex=wt,ie(S.slice(0,wt),N)})(),Q=S[0]===`
156
+ `||S[0]===" ",ot,st;for(;st=it.exec(S);){const wt=st[1],gt=st[2];ot=gt[0]===" ",V+=wt+(!Q&&!ot&&gt!==""?`
157
+ `:"")+ie(gt,N),Q=ot}return V}p(vr,"foldString");function ie(S,N){if(S===""||S[0]===" ")return S;const it=/ [^ ]/g;let V,Q=0,ot,st=0,wt=0,gt="";for(;V=it.exec(S);)wt=V.index,wt-Q>N&&(ot=st>Q?st:wt,gt+=`
158
+ `+S.slice(Q,ot),Q=ot+1),st=wt;return gt+=`
159
+ `,S.length-Q>N&&st>Q?gt+=S.slice(Q,st)+`
160
+ `+S.slice(st+1):gt+=S.slice(Q),gt.slice(1)}p(ie,"foldLine");function Lr(S){let N="",it=0;for(let V=0;V<S.length;it>=65536?V+=2:V++){it=Ct(S,V);const Q=E[it];!Q&&yt(it)?(N+=S[V],it>=65536&&(N+=S[V+1])):N+=Q||O(it)}return N}p(Lr,"escapeString");function Qe(S,N,it){let V="";const Q=S.tag;for(let ot=0,st=it.length;ot<st;ot+=1){let wt=it[ot];S.replacer&&(wt=S.replacer.call(it,String(ot),wt)),(G(S,N,wt,!1,!1)||typeof wt>"u"&&G(S,N,null,!1,!1))&&(V!==""&&(V+=","+(S.condenseFlow?"":" ")),V+=S.dump)}S.tag=Q,S.dump="["+V+"]"}p(Qe,"writeFlowSequence");function fr(S,N,it,V){let Q="";const ot=S.tag;for(let st=0,wt=it.length;st<wt;st+=1){let gt=it[st];S.replacer&&(gt=S.replacer.call(it,String(st),gt)),(G(S,N+1,gt,!0,!0,!1,!0)||typeof gt>"u"&&G(S,N+1,null,!0,!0,!1,!0))&&((!V||Q!=="")&&(Q+=dt(S,N)),S.dump&&o===S.dump.charCodeAt(0)?Q+="-":Q+="- ",Q+=S.dump)}S.tag=ot,S.dump=Q||"[]"}p(fr,"writeBlockSequence");function pr(S,N,it){let V="";const Q=S.tag,ot=Object.keys(it);for(let st=0,wt=ot.length;st<wt;st+=1){let gt="";V!==""&&(gt+=", "),S.condenseFlow&&(gt+='"');const Tt=ot[st];let Lt=it[Tt];S.replacer&&(Lt=S.replacer.call(it,Tt,Lt)),G(S,N,Tt,!1,!1)&&(S.dump.length>1024&&(gt+="? "),gt+=S.dump+(S.condenseFlow?'"':"")+":"+(S.condenseFlow?"":" "),G(S,N,Lt,!1,!1)&&(gt+=S.dump,V+=gt))}S.tag=Q,S.dump="{"+V+"}"}p(pr,"writeFlowMapping");function g(S,N,it,V){let Q="";const ot=S.tag,st=Object.keys(it);if(S.sortKeys===!0)st.sort();else if(typeof S.sortKeys=="function")st.sort(S.sortKeys);else if(S.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let wt=0,gt=st.length;wt<gt;wt+=1){let Tt="";(!V||Q!=="")&&(Tt+=dt(S,N));const Lt=st[wt];let qt=it[Lt];if(S.replacer&&(qt=S.replacer.call(it,Lt,qt)),!G(S,N+1,Lt,!0,!0,!0))continue;const Vt=S.tag!==null&&S.tag!=="?"||S.dump&&S.dump.length>1024;Vt&&(S.dump&&o===S.dump.charCodeAt(0)?Tt+="?":Tt+="? "),Tt+=S.dump,Vt&&(Tt+=dt(S,N)),G(S,N+1,qt,!0,Vt)&&(S.dump&&o===S.dump.charCodeAt(0)?Tt+=":":Tt+=": ",Tt+=S.dump,Q+=Tt)}S.tag=ot,S.dump=Q||"{}"}p(g,"writeBlockMapping");function P(S,N,it){const V=it?S.explicitTypes:S.implicitTypes;for(let Q=0,ot=V.length;Q<ot;Q+=1){const st=V[Q];if((st.instanceOf||st.predicate)&&(!st.instanceOf||typeof N=="object"&&N instanceof st.instanceOf)&&(!st.predicate||st.predicate(N))){if(it?st.multi&&st.representName?S.tag=st.representName(N):S.tag=st.tag:S.tag="?",st.represent){const wt=S.styleMap[st.tag]||st.defaultStyle;let gt;if(i.call(st.represent)==="[object Function]")gt=st.represent(N,wt);else if(s.call(st.represent,wt))gt=st.represent[wt](N,wt);else throw new t("!<"+st.tag+'> tag resolver accepts not "'+wt+'" style');S.dump=gt}return!0}}return!1}p(P,"detectType");function G(S,N,it,V,Q,ot,st){S.tag=null,S.dump=it,P(S,it,!1)||P(S,it,!0);const wt=i.call(S.dump),gt=V;V&&(V=S.flowLevel<0||S.flowLevel>N);const Tt=wt==="[object Object]"||wt==="[object Array]";let Lt,qt;if(Tt&&(Lt=S.duplicates.indexOf(it),qt=Lt!==-1),(S.tag!==null&&S.tag!=="?"||qt||S.indent!==2&&N>0)&&(Q=!1),qt&&S.usedDuplicates[Lt])S.dump="*ref_"+Lt;else{if(Tt&&qt&&!S.usedDuplicates[Lt]&&(S.usedDuplicates[Lt]=!0),wt==="[object Object]")V&&Object.keys(S.dump).length!==0?(g(S,N,S.dump,Q),qt&&(S.dump="&ref_"+Lt+S.dump)):(pr(S,N,S.dump),qt&&(S.dump="&ref_"+Lt+" "+S.dump));else if(wt==="[object Array]")V&&S.dump.length!==0?(S.noArrayIndent&&!st&&N>0?fr(S,N-1,S.dump,Q):fr(S,N,S.dump,Q),qt&&(S.dump="&ref_"+Lt+S.dump)):(Qe(S,N,S.dump),qt&&(S.dump="&ref_"+Lt+" "+S.dump));else if(wt==="[object String]")S.tag!=="?"&&dr(S,S.dump,N,ot,gt);else{if(wt==="[object Undefined]")return!1;if(S.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+wt)}if(S.tag!==null&&S.tag!=="?"){let Vt=encodeURI(S.tag[0]==="!"?S.tag.slice(1):S.tag).replace(/!/g,"%21");S.tag[0]==="!"?Vt="!"+Vt:Vt.slice(0,18)==="tag:yaml.org,2002:"?Vt="!!"+Vt.slice(18):Vt="!<"+Vt+">",S.dump=Vt+" "+S.dump}}return!0}p(G,"writeNode");function K(S,N){const it=[],V=[];j(S,it,V);const Q=V.length;for(let ot=0;ot<Q;ot+=1)N.duplicates.push(it[V[ot]]);N.usedDuplicates=new Array(Q)}p(K,"getDuplicateReferences");function j(S,N,it){if(S!==null&&typeof S=="object"){const V=N.indexOf(S);if(V!==-1)it.indexOf(V)===-1&&it.push(V);else if(N.push(S),Array.isArray(S))for(let Q=0,ot=S.length;Q<ot;Q+=1)j(S[Q],N,it);else{const Q=Object.keys(S);for(let ot=0,st=Q.length;ot<st;ot+=1)j(S[Q[ot]],N,it)}}}p(j,"inspectNode");function nt(S,N){N=N||{};const it=new lt(N);it.noRefs||K(S,it);let V=S;return it.replacer&&(V=it.replacer.call({"":V},"",V)),G(it,0,V,!0,!0)?it.dump+`
161
+ `:""}return p(nt,"dump2"),cn.dump=nt,cn}p(Hf,"requireDumper");var lu;function Yf(){if(lu)return ye;lu=1;const e=zf(),t=Hf();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return p(r,"renamed"),ye.Type=be(),ye.Schema=Il(),ye.FAILSAFE_SCHEMA=ql(),ye.JSON_SCHEMA=Yl(),ye.CORE_SCHEMA=Ul(),ye.DEFAULT_SCHEMA=so(),ye.load=e.load,ye.loadAll=e.loadAll,ye.dump=t.dump,ye.YAMLException=ji(),ye.types={binary:Xl(),float:Hl(),map:Rl(),null:Nl(),pairs:Zl(),set:Kl(),timestamp:jl(),bool:Wl(),int:zl(),merge:Gl(),omap:Vl(),seq:Pl(),str:Dl()},ye.safeLoad=r("safeLoad","load"),ye.safeLoadAll=r("safeLoadAll","loadAll"),ye.safeDump=r("safeDump","dump"),ye}p(Yf,"requireJsYaml");var N1=Yf(),W1=Nf(N1),{Type:xF,Schema:CF,FAILSAFE_SCHEMA:bF,JSON_SCHEMA:z1,CORE_SCHEMA:kF,DEFAULT_SCHEMA:wF,load:H1,loadAll:SF,dump:TF,YAMLException:_F,types:BF,safeLoad:vF,safeLoadAll:LF,safeDump:FF}=W1,Y1=p((e,t)=>{const{theme:r,themeVariables:i}=t,{useGradient:s,gradientStart:a,gradientStop:n}=i??{},o=e.attr("id"),c=r!=null&&r.includes("dark")?"#FFFFFF":"#000000",h=p((u,d,f)=>e.append("defs").append("filter").attr("id",u).attr("height",d).attr("width",d).append("feDropShadow").attr("dx",f).attr("dy",f).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",c),"dropShadow");if(h(`${o}-drop-shadow`,"130%","4"),h(`${o}-drop-shadow-small`,"150%","2"),!s)return;const l=e.append("linearGradient").attr("id",`${o}-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",a).attr("stop-opacity",1),l.append("svg:stop").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",1)},"insertLookDefs"),U1=p(e=>{const{handDrawnSeed:t}=Rt();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),j1=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Yr=p(e=>{const t=G1([...e.cssCompiledStyles||[],...e.cssStyles||[],...j1(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),G1=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Uf=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"),mt=p(e=>{const{stylesArray:t}=Yr(e),r=[],i=[],s=[],a=[];return t.forEach(n=>{const o=n[0];Uf(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&s.push(n.join(":")+" !important"),o==="fill"&&a.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),ft=p((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=Rt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:n}=Yr(e);return Object.assign({roughness:.7,fill:n.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:n.get("stroke")||s,seed:i,strokeWidth:((c=n.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:X1(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),X1=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const V1=Object.freeze({left:0,top:0,width:16,height:16}),qa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),jf=Object.freeze({...V1,...qa}),Z1=Object.freeze({...jf,body:"",hidden:!1}),K1=Object.freeze({width:null,height:null}),Q1=Object.freeze({...K1,...qa}),J1=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const o=s.pop(),c=s.pop(),h={provider:s.length>0?s[0]:i,prefix:c,name:o};return un(h)?h:null}const a=s[0],n=a.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return un(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return un(o,r)?o:null}return null},un=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function t2(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 hu(e,t){const r=t2(e,t);for(const i in Z1)i in qa?i in e&&!(i in r)&&(r[i]=qa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function e2(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(n){if(r[n])return s[n]=[];if(!(n in s)){s[n]=null;const o=i[n]&&i[n].parent,c=o&&a(o);c&&(s[n]=[o].concat(c))}return s[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function cu(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function n(o){a=hu(i[o]||s[o],a)}return n(t),r.forEach(n),hu(e,a)}function r2(e,t){if(e.icons[t])return cu(e,t,[]);const r=e2(e,[t])[t];return r?cu(e,t,r):null}const i2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,s2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function uu(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(i2);if(i===null||!i.length)return e;const s=[];let a=i.shift(),n=s2.test(a);for(;;){if(n){const o=parseFloat(a);isNaN(o)?s.push(a):s.push(Math.ceil(o*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");n=!n}}function a2(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const n=e.indexOf(">",a);if(n===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function o2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function n2(e,t,r){const i=a2(e);return o2(i.defs,t+i.content+r)}const l2=e=>e==="unset"||e==="undefined"||e==="none";function h2(e,t){const r={...jf,...e},i={...Q1,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,b=y.vFlip;let k=y.rotate;x?b?k+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):b&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let T;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:T=s.height/2+s.top,C.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,C.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")")}k%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),C.length&&(a=n2(a,'<g transform="'+C.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,c=s.width,h=s.height;let l,u;n===null?(u=o===null?"1em":o==="auto"?h:o,l=uu(u,c/h)):(l=n==="auto"?c:n,u=o===null?uu(l,h/c):o==="auto"?h:o);const d={},f=(y,C)=>{l2(C)||(d[y]=C.toString())};f("width",l),f("height",u);const m=[s.left,s.top,c,h];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:a}}const c2=/\sid="(\S+)"/g,du=new Map;function u2(e){e=e.replace(/[0-9]+$/,"")||"a";const t=du.get(e)||0;return du.set(e,t+1),t?`${e}${t}`:e}function d2(e){const t=[];let r;for(;r=c2.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=u2(s),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function f2(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 p2={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},jn=new Map,Gf=new Map,g2=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(J.debug("Registering icon pack:",t.name),"loader"in t)Gf.set(t.name,t.loader);else if("icons"in t)jn.set(t.name,t.icons);else throw J.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Xf=p(async(e,t)=>{const r=J1(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 s=jn.get(i);if(!s){const n=Gf.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await n(),prefix:i},jn.set(i,s)}catch(o){throw J.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=r2(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),Vf=p(async e=>{try{return await Xf(e),!0}catch{return!1}},"isIconAvailable"),Gi=p(async(e,t,r)=>{let i;try{i=await Xf(e,t==null?void 0:t.fallbackPrefix)}catch(n){J.error(n),i=p2}const s=h2(i,t),a=f2(d2(s.body),{...s.attributes,...r});return We(a,Qt())},"getIconSVG"),ta={},he={},fu;function m2(){return fu||(fu=1,Object.defineProperty(he,"__esModule",{value:!0}),he.BLANK_URL=he.relativeFirstCharacters=he.whitespaceEscapeCharsRegex=he.urlSchemeRegex=he.ctrlCharactersRegex=he.htmlCtrlEntityRegex=he.htmlEntitiesRegex=he.invalidProtocolRegex=void 0,he.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,he.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,he.htmlCtrlEntityRegex=/&(newline|tab);/gi,he.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,he.urlSchemeRegex=/^.+(:|&colon;)/gim,he.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,he.relativeFirstCharacters=[".","/"],he.BLANK_URL="about:blank"),he}var pu;function y2(){if(pu)return ta;pu=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.sanitizeUrl=a;var e=m2();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var o=n.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(c,h){return String.fromCharCode(h)})}function i(n){return URL.canParse(n)}function s(n){try{return decodeURIComponent(n)}catch{return n}}function a(n){if(!n)return e.BLANK_URL;var o,c=s(n.trim());do c=r(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=s(c),o=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var h=c;if(!h)return e.BLANK_URL;if(t(h))return h;var l=h.trimStart(),u=l.match(e.urlSchemeRegex);if(!u)return h;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 ta}var x2=y2();function dn(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function C2(){}function Zf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ql(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const b2="[object RegExp]",Kf="[object String]",Qf="[object Number]",Jf="[object Boolean]",tp="[object Arguments]",k2="[object Symbol]",w2="[object Date]",S2="[object Map]",T2="[object Set]",_2="[object Array]",B2="[object ArrayBuffer]",v2="[object Object]",L2="[object DataView]",F2="[object Uint8Array]",A2="[object Uint8ClampedArray]",E2="[object Uint16Array]",M2="[object Uint32Array]",$2="[object Int8Array]",O2="[object Int16Array]",I2="[object Int32Array]",D2="[object Float32Array]",P2="[object Float64Array]",gu=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Jl(e){return typeof gu.Buffer<"u"&&gu.Buffer.isBuffer(e)}function R2(e){return Number.isSafeInteger(e)&&e>=0}function ep(e){return e!=null&&typeof e!="function"&&R2(e.length)}function q2(e){return e==="__proto__"}function th(e){return e==null||typeof e!="object"&&typeof e!="function"}function eh(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function N2(e,t){return Ci(e,void 0,e,new Map,t)}function Ci(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(th(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const n=new Array(e.length);i.set(e,n);for(let o=0;o<e.length;o++)n[o]=Ci(e[o],o,r,i,s);return Object.hasOwn(e,"index")&&(n.index=e.index),Object.hasOwn(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;i.set(e,n);for(const[o,c]of e)n.set(o,Ci(c,o,r,i,s));return n}if(e instanceof Set){const n=new Set;i.set(e,n);for(const o of e)n.add(Ci(o,void 0,r,i,s));return n}if(Jl(e))return e.subarray();if(eh(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,n);for(let o=0;o<e.length;o++)n[o]=Ci(e[o],o,r,i,s);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,n),Ue(n,e,r,i,s),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return i.set(e,n),Ue(n,e,r,i,s),n}if(typeof Blob<"u"&&e instanceof Blob){const n=new Blob([e],{type:e.type});return i.set(e,n),Ue(n,e,r,i,s),n}if(e instanceof Error){const n=structuredClone(e);return i.set(e,n),n.message=e.message,n.name=e.name,n.stack=e.stack,n.cause=e.cause,n.constructor=e.constructor,Ue(n,e,r,i,s),n}if(e instanceof Boolean){const n=new Boolean(e.valueOf());return i.set(e,n),Ue(n,e,r,i,s),n}if(e instanceof Number){const n=new Number(e.valueOf());return i.set(e,n),Ue(n,e,r,i,s),n}if(e instanceof String){const n=new String(e.valueOf());return i.set(e,n),Ue(n,e,r,i,s),n}if(typeof e=="object"&&W2(e)){const n=Object.create(Object.getPrototypeOf(e));return i.set(e,n),Ue(n,e,r,i,s),n}return e}function Ue(e,t,r=e,i,s){const a=[...Object.keys(t),...Zf(t)];for(let n=0;n<a.length;n++){const o=a[n],c=Object.getOwnPropertyDescriptor(e,o);(c==null||c.writable)&&(e[o]=Ci(t[o],o,r,i,s))}}function W2(e){switch(Ql(e)){case tp:case _2:case B2:case L2:case Jf:case w2:case D2:case P2:case $2:case O2:case I2:case S2:case Qf:case v2:case b2:case T2:case Kf:case k2:case F2:case A2:case E2:case M2:return!0;default:return!1}}function z2(e,t){return N2(e,(r,i,s,a)=>{if(typeof e=="object"){if(Ql(e)==="[object Object]"&&typeof e.constructor!="function"){const n={};return a.set(e,n),Ue(n,e,s,a),n}switch(Object.prototype.toString.call(e)){case Qf:case Kf:case Jf:{const n=new e.constructor(e==null?void 0:e.valueOf());return Ue(n,e),n}case tp:{const n={};return Ue(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}function mu(e){return z2(e)}function Gn(e){return e!==null&&typeof e=="object"&&Ql(e)==="[object Arguments]"}function Xn(e){return typeof e=="object"&&e!==null}function H2(e){return Xn(e)&&ep(e)}function ya(e){return eh(e)}function Y2(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function qs(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const n=e.apply(this,i);return r.cache=a.set(s,n)||a,n};return r.cache=new(qs.Cache||Map),r}qs.Cache=Map;function U2(e){if(th(e))return e;if(Array.isArray(e)||eh(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function j2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const n=r[a];s=xa(s,n,i,new Map)}return s}function xa(e,t,r,i){if(th(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return U2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)a in t||(t[a]=void 0)}const s=[...Object.keys(t),...Zf(t)];for(let a=0;a<s.length;a++){const n=s[a];if(q2(n))continue;let o=t[n],c=e[n];if(Gn(o)&&(o={...o}),Gn(c)&&(c={...c}),Jl(o)&&(o=mu(o)),Array.isArray(o))if(Array.isArray(c)){const l=[],u=Reflect.ownKeys(c);for(let d=0;d<u.length;d++){const f=u[d];l[f]=c[f]}c=l}else if(H2(c)){const l=[];for(let u=0;u<c.length;u++)l[u]=c[u];c=l}else c=[];const h=r(c,o,n,e,t,i);h!==void 0?e[n]=h:Array.isArray(o)||Xn(c)&&Xn(o)&&(dn(c)||dn(o)||ya(c)||ya(o))?e[n]=xa(c,o,r,i):c==null&&dn(o)?e[n]=xa({},o,r,i):c==null&&ya(o)?e[n]=mu(o):(c===void 0||o!==void 0)&&(e[n]=o)}return e}function G2(e,...t){return j2(e,...t,C2)}function yu(e){if(e==null)return!0;if(ep(e))return typeof e.splice!="function"&&typeof e!="string"&&!Jl(e)&&!ya(e)&&!Gn(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 Y2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var X2="​",V2={curveBasis:Un,curveBasisClosed:E1,curveBasisOpen:M1,curveBumpX:bf,curveBumpY:kf,curveBundle:$1,curveCardinalClosed:O1,curveCardinalOpen:I1,curveCardinal:_f,curveCatmullRomClosed:D1,curveCatmullRomOpen:P1,curveCatmullRom:vf,curveLinear:_s,curveLinearClosed:R1,curveMonotoneX:$f,curveMonotoneY:Of,curveNatural:Df,curveStep:Pf,curveStepAfter:qf,curveStepBefore:Rf},Z2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,K2=p(function(e,t){const r=rp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);Ta(n),i=oe(i,[...n])}else i=r.args;if(!i)return;let s=Qa(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),rp=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${Z2.source})(?=[}][%]{2}).*
162
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),J.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const n=[];for(;(a=ws.exec(e))!==null;)if(a.index===ws.lastIndex&&ws.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const o=a[1]?a[1]:a[2],c=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;n.push({type:o,args:c})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(s){return J.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Q2=p(function(e){return e.replace(ws,"")},"removeDirectives"),J2=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function rh(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return V2[r]??t}p(rh,"interpolateToCurve");function ip(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?x2.sanitizeUrl(r):r}p(ip,"formatUrl");var tw=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){J.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function ih(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(ih,"distance");function sp(e){let t,r=0;e.forEach(s=>{r+=ih(s,t),t=s});const i=r/2;return sh(e,i)}p(sp,"traverseEdge");function ap(e){return e.length===1?e[0]:sp(e)}p(ap,"calcLabelPosition");var xu=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),sh=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=ih(s,r);if(a===0)return r;if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:s.x,y:s.y};if(n>0&&n<1)return{x:xu((1-n)*r.x+n*s.x,5),y:xu((1-n)*r.y+n*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),ew=p((e,t,r)=>{J.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=sh(t,25),a=e?10:5,n=Math.atan2(t[0].y-s.y,t[0].x-s.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+s.x)/2,o.y=-Math.cos(n)*a+(t[0].y+s.y)/2,o},"calcCardinalityPosition");function op(e,t,r){const i=structuredClone(r);J.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=sh(i,s),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,c.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(c.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2,c.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2):(c.x=Math.sin(o)*n+(i[0].x+a.x)/2,c.y=-Math.cos(o)*n+(i[0].y+a.y)/2),c}p(op,"calcTerminalLabelPosition");function np(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(np,"getStylesFromArray");var Cu=0,rw=p(()=>(Cu++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Cu),"generateId");function lp(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(lp,"makeRandomHex");var iw=p(e=>lp(e.length),"random"),sw=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"),aw=p(function(e,t){const r=t.text.replace(Ds.lineBreakRegex," "),[,i]=ao(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),ow=qs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ds.hasBreaks(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((n,o)=>{const c=_r(`${n} `,r),h=_r(a,r);if(c>t){const{hyphenatedStrings:d,remainingWord:f}=nw(n,t,"-",r);s.push(a,...d),a=f}else h+c>=t?(s.push(a),a=n):a=[a,n].filter(Boolean).join(" ");o+1===i.length&&s.push(a)}),s.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),nw=qs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let n="";return s.forEach((o,c)=>{const h=`${n}${o}`;if(_r(h,i)>=t){const u=c+1,d=s.length===u,f=`${h}${r}`;a.push(d?h:f),n=""}else n=h}),{hyphenatedStrings:a,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function hp(e,t){return ah(e,t).height}p(hp,"calculateTextHeight");function _r(e,t){return ah(e,t).width}p(_r,"calculateTextWidth");var ah=qs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=ao(r),n=["sans-serif",i],o=e.split(Ds.lineBreakRegex),c=[],h=Pt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const l=h.append("svg");for(const d of n){let f=0;const m={width:0,height:0,lineHeight:0};for(const y of o){const C=sw();C.text=y||X2;const x=aw(l,C).style("font-size",a).style("font-weight",s).style("font-family",d),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),f=Math.round(b.height),m.height+=f,m.lineHeight=Math.round(Math.max(m.lineHeight,f))}c.push(m)}l.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Pi,lw=(Pi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Pi,"InitIDGenerator"),Pi),ea,hw=p(function(e){return ea=ea||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ea.innerHTML=e,unescape(ea.textContent)},"entityDecode");function oh(e){return"str"in e}p(oh,"isDetailedError");function cp(e){return e instanceof Error?e.message:String(e)}p(cp,"getErrorMessage");var cw=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),ao=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 nh(e,t){return G2({},e,t)}p(nh,"cleanAndMerge");var Ne={assignWithDepth:oe,wrapLabel:ow,calculateTextHeight:hp,calculateTextWidth:_r,calculateTextDimensions:ah,cleanAndMerge:nh,detectInit:K2,detectDirective:rp,isSubstringInArray:J2,interpolateToCurve:rh,calcLabelPosition:ap,calcCardinalityPosition:ew,calcTerminalLabelPosition:op,formatUrl:ip,getStylesFromArray:np,generateId:rw,random:iw,runFunc:tw,entityDecode:hw,insertTitle:cw,isLabelCoordinateInPath:up,parseFontSize:ao,InitIDGenerator:lw},uw=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"),Wr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),AF=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function ne(e){return e??null}p(ne,"handleUndefinedAttr");function up(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(up,"isLabelCoordinateInPath");function lh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ai=lh();function dp(e){ai=e}var Bs={exec:()=>null};function jt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let n=typeof a=="string"?a:a.source;return n=n.replace(Te.caret,"$1"),r=r.replace(s,n),i},getRegex:()=>new RegExp(r,t)};return i}var dw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Te={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")},fw=/^(?:[ \t]*(?:\n|$))+/,pw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ns=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,mw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hh=/(?:[*+-]|\d{1,9}[.)])/,fp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,pp=jt(fp).replace(/bull/g,hh).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(),yw=jt(fp).replace(/bull/g,hh).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(),ch=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xw=/^[^\n]+/,uh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Cw=jt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",uh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),bw=jt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hh).getRegex(),oo="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",dh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kw=jt("^ {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",dh).replace("tag",oo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gp=jt(ch).replace("hr",Ns).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",oo).getRegex(),ww=jt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gp).getRegex(),fh={blockquote:ww,code:pw,def:Cw,fences:gw,heading:mw,hr:Ns,html:kw,lheading:pp,list:bw,newline:fw,paragraph:gp,table:Bs,text:xw},bu=jt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ns).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",oo).getRegex(),Sw={...fh,lheading:yw,table:bu,paragraph:jt(ch).replace("hr",Ns).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bu).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",oo).getRegex()},Tw={...fh,html:jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",dh).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:Bs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:jt(ch).replace("hr",Ns).replace("heading",` *#{1,6} *[^
163
+ ]`).replace("lheading",pp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_w=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Bw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mp=/^( {2,}|\\)\n(?!\s*$)/,vw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,no=/[\p{P}\p{S}]/u,ph=/[\s\p{P}\p{S}]/u,yp=/[^\s\p{P}\p{S}]/u,Lw=jt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ph).getRegex(),xp=/(?!~)[\p{P}\p{S}]/u,Fw=/(?!~)[\s\p{P}\p{S}]/u,Aw=/(?:[^\s\p{P}\p{S}]|~)/u,Ew=jt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",dw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Cp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Mw=jt(Cp,"u").replace(/punct/g,no).getRegex(),$w=jt(Cp,"u").replace(/punct/g,xp).getRegex(),bp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ow=jt(bp,"gu").replace(/notPunctSpace/g,yp).replace(/punctSpace/g,ph).replace(/punct/g,no).getRegex(),Iw=jt(bp,"gu").replace(/notPunctSpace/g,Aw).replace(/punctSpace/g,Fw).replace(/punct/g,xp).getRegex(),Dw=jt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,yp).replace(/punctSpace/g,ph).replace(/punct/g,no).getRegex(),Pw=jt(/\\(punct)/,"gu").replace(/punct/g,no).getRegex(),Rw=jt(/^<(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(),qw=jt(dh).replace("(?:-->|$)","-->").getRegex(),Nw=jt("^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",qw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Na=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ww=jt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Na).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kp=jt(/^!?\[(label)\]\[(ref)\]/).replace("label",Na).replace("ref",uh).getRegex(),wp=jt(/^!?\[(ref)\](?:\[\])?/).replace("ref",uh).getRegex(),zw=jt("reflink|nolink(?!\\()","g").replace("reflink",kp).replace("nolink",wp).getRegex(),ku=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,gh={_backpedal:Bs,anyPunctuation:Pw,autolink:Rw,blockSkip:Ew,br:mp,code:Bw,del:Bs,emStrongLDelim:Mw,emStrongRDelimAst:Ow,emStrongRDelimUnd:Dw,escape:_w,link:Ww,nolink:wp,punctuation:Lw,reflink:kp,reflinkSearch:zw,tag:Nw,text:vw,url:Bs},Hw={...gh,link:jt(/^!?\[(label)\]\((.*?)\)/).replace("label",Na).getRegex(),reflink:jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Na).getRegex()},Vn={...gh,emStrongRDelimAst:Iw,emStrongLDelim:$w,url:jt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ku).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:jt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ku).getRegex()},Yw={...Vn,br:jt(mp).replace("{2,}","*").getRegex(),text:jt(Vn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ra={normal:fh,gfm:Sw,pedantic:Tw},as={normal:gh,gfm:Vn,breaks:Yw,pedantic:Hw},Uw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},wu=e=>Uw[e];function er(e,t){if(t){if(Te.escapeTest.test(e))return e.replace(Te.escapeReplace,wu)}else if(Te.escapeTestNoEncode.test(e))return e.replace(Te.escapeReplaceNoEncode,wu);return e}function Su(e){try{e=encodeURI(e).replace(Te.percentDecode,"%")}catch{return null}return e}function Tu(e,t){var a;let r=e.replace(Te.findPipe,(n,o,c)=>{let h=!1,l=o;for(;--l>=0&&c[l]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Te.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Te.slashPipe,"|");return i}function os(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function jw(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 _u(e,t,r,i,s){let a=t.href,n=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,c}function Gw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
164
+ `).map(a=>{let n=a.match(r.other.beginningSpace);if(n===null)return a;let[o]=n;return o.length>=s.length?a.slice(s.length):a}).join(`
165
+ `)}var Wa=class{constructor(t){Zt(this,"options");Zt(this,"rules");Zt(this,"lexer");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:os(i,`
166
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Gw(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:s}}}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 s=os(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.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:os(r[0],`
167
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=os(r[0],`
168
+ `).split(`
169
+ `),s="",a="",n=[];for(;i.length>0;){let o=!1,c=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))c.push(i[h]),o=!0;else if(!o)c.push(i[h]);else break;i=i.slice(h);let l=c.join(`
170
+ `),u=l.replace(this.rules.other.blockquoteSetextReplace,`
171
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
172
+ ${l}`:l,a=a?`${a}
173
+ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=d,i.length===0)break;let f=n.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let m=f,y=m.raw+`
174
+ `+i.join(`
175
+ `),C=this.blockquote(y);n[n.length-1]=C,s=s.substring(0,s.length-m.raw.length)+C.raw,a=a.substring(0,a.length-m.text.length)+C.text;break}else if((f==null?void 0:f.type)==="list"){let m=f,y=m.raw+`
176
+ `+i.join(`
177
+ `),C=this.list(y);n[n.length-1]=C,s=s.substring(0,s.length-f.raw.length)+C.raw,a=a.substring(0,a.length-m.raw.length)+C.raw,i=y.substring(n.at(-1).raw.length).split(`
178
+ `);continue}}return{type:"blockquote",raw:s,tokens:n,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let n=this.rules.other.listItemRegex(i),o=!1;for(;t;){let h=!1,l="",u="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let d=r[2].split(`
179
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
180
+ `,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+`
181
+ `,t=t.substring(f.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),B=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let A=t.split(`
182
+ `,1)[0],F;if(f=A,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),F=f):F=f.replace(this.rules.other.tabCharGlobal," "),T.test(f)||B.test(f)||L.test(f)||b.test(f)||k.test(f))break;if(F.search(this.rules.other.nonSpaceChar)>=y||!f.trim())u+=`
183
+ `+F.slice(y);else{if(m||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||B.test(d)||k.test(d))break;u+=`
184
+ `+f}!m&&!f.trim()&&(m=!0),l+=A+`
185
+ `,t=t.substring(A.length+1),d=F.slice(y)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!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,""))),a.items.push({type:"list_item",raw:l,task:!!C,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=l}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let l=a.items[h].tokens.filter(d=>d.type==="space"),u=l.length>0&&l.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}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," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=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:s,title:a}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Tu(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
186
+ `):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?n.align.push("right"):this.rules.other.tableAlignCenter.test(c)?n.align.push("center"):this.rules.other.tableAlignLeft.test(c)?n.align.push("left"):n.align.push(null);for(let c=0;c<i.length;c++)n.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:n.align[c]});for(let c of a)n.rows.push(Tu(c,n.header.length).map((h,l)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[l]})));return n}}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)===`
187
+ `?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 n=os(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=jw(r[2],"()");if(n===-2)return;if(n>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],a=n[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),_u(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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 s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return _u(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,n,o,c=a,h=0,l=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,r=r.slice(-1*t.length+a);(s=l.exec(r))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){c+=o;continue}else if((s[5]||s[6])&&a%3&&!((a+o)%3)){h+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c+h);let u=[...s[0]][0].length,d=t.slice(0,a+s.index+u+o);if(Math.min(a,o)%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," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(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,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}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}}}},je=class Zn{constructor(t){Zt(this,"tokens");Zt(this,"options");Zt(this,"state");Zt(this,"tokenizer");Zt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ai,this.options.tokenizer=this.options.tokenizer||new Wa,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:Te,block:ra.normal,inline:as.normal};this.options.pedantic?(r.block=ra.pedantic,r.inline=as.pedantic):this.options.gfm&&(r.block=ra.gfm,this.options.breaks?r.inline=as.breaks:r.inline=as.gfm),this.tokenizer.rules=r}static get rules(){return{block:ra,inline:as}}static lex(t,r){return new Zn(r).lex(t)}static lexInline(t,r){return new Zn(r).inlineTokens(t)}lex(t){t=t.replace(Te.carriageReturn,`
188
+ `),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){var s,a,n;for(this.options.pedantic&&(t=t.replace(Te.tabCharGlobal," ").replace(Te.spaceLine,""));t;){let o;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(o=h.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 h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
189
+ `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
190
+ `)?"":`
191
+ `)+o.raw,h.text+=`
192
+ `+o.text,this.inlineQueue.at(-1).src=h.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 h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
193
+ `)?"":`
194
+ `)+o.raw,h.text+=`
195
+ `+o.raw,this.inlineQueue.at(-1).src=h.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 c=t;if((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(d=>{u=d.call({lexer:this},l),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
196
+ `)?"":`
197
+ `)+o.raw,h.text+=`
198
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),i=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
199
+ `)?"":`
200
+ `)+o.raw,h.text+=`
201
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,h,l,u,d;let i=t,s=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)f.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let f;if((u=(l=this.options.extensions)==null?void 0:l.inline)!=null&&u.some(y=>(f=y.call({lexer:this},t,r))?(t=t.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let y=r.at(-1);f.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=f.raw,y.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(t,i,o)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),r.push(f);continue}let m=t;if((d=this.options.extensions)!=null&&d.startInline){let y=1/0,C=t.slice(1),x;this.options.extensions.startInline.forEach(b=>{x=b.call({lexer:this},C),typeof x=="number"&&x>=0&&(y=Math.min(y,x))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(f=this.tokenizer.inlineText(m)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(o=f.raw.slice(-1)),n=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=f.raw,y.text+=f.text):r.push(f);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},za=class{constructor(t){Zt(this,"options");Zt(this,"parser");this.options=t||ai}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let s=(n=(r||"").match(Te.notSpaceStart))==null?void 0:n[0],a=t.replace(Te.endingNewline,"")+`
202
+ `;return s?'<pre><code class="language-'+er(s)+'">'+(i?a:er(a,!0))+`</code></pre>
203
+ `:"<pre><code>"+(i?a:er(a,!0))+`</code></pre>
204
+ `}blockquote({tokens:t}){return`<blockquote>
205
+ ${this.parser.parse(t)}</blockquote>
206
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
207
+ `}hr(t){return`<hr>
208
+ `}list(t){let r=t.ordered,i=t.start,s="";for(let o=0;o<t.items.length;o++){let c=t.items[o];s+=this.listitem(c)}let a=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+a+n+`>
209
+ `+s+"</"+a+`>
210
+ `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+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=s+" "+er(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
211
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
212
+ `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let n=t.rows[a];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
213
+ <thead>
214
+ `+r+`</thead>
215
+ `+s+`</table>
216
+ `}tablerow({text:t}){return`<tr>
217
+ ${t}</tr>
218
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
219
+ `}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>${er(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 s=this.parser.parseInline(i),a=Su(t);if(a===null)return s;t=a;let n='<a href="'+t+'"';return r&&(n+=' title="'+er(r)+'"'),n+=">"+s+"</a>",n}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=Su(t);if(a===null)return er(i);t=a;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${er(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:er(t.text)}},mh=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""}},Ge=class Kn{constructor(t){Zt(this,"options");Zt(this,"renderer");Zt(this,"textRenderer");this.options=t||ai,this.options.renderer=this.options.renderer||new za,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new mh}static parse(t,r){return new Kn(r).parse(t)}static parseInline(t,r){return new Kn(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=o,l=this.options.extensions.renderers[h.type].call({parser:this},h);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=l||"";continue}}let c=o;switch(c.type){case"space":{i+=this.renderer.space(c);continue}case"hr":{i+=this.renderer.hr(c);continue}case"heading":{i+=this.renderer.heading(c);continue}case"code":{i+=this.renderer.code(c);continue}case"table":{i+=this.renderer.table(c);continue}case"blockquote":{i+=this.renderer.blockquote(c);continue}case"list":{i+=this.renderer.list(c);continue}case"html":{i+=this.renderer.html(c);continue}case"def":{i+=this.renderer.def(c);continue}case"paragraph":{i+=this.renderer.paragraph(c);continue}case"text":{let h=c,l=this.renderer.text(h);for(;n+1<t.length&&t[n+1].type==="text";)h=t[++n],l+=`
220
+ `+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=h||"";continue}}let c=o;switch(c.type){case"escape":{i+=r.text(c);break}case"html":{i+=r.html(c);break}case"link":{i+=r.link(c);break}case"image":{i+=r.image(c);break}case"strong":{i+=r.strong(c);break}case"em":{i+=r.em(c);break}case"codespan":{i+=r.codespan(c);break}case"br":{i+=r.br(c);break}case"del":{i+=r.del(c);break}case"text":{i+=r.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},ha,ms=(ha=class{constructor(t){Zt(this,"options");Zt(this,"block");this.options=t||ai}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?je.lex:je.lexInline}provideParser(){return this.block?Ge.parse:Ge.parseInline}},Zt(ha,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Zt(ha,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ha),Xw=class{constructor(...t){Zt(this,"defaults",lh());Zt(this,"options",this.setOptions);Zt(this,"parse",this.parseMarkdown(!0));Zt(this,"parseInline",this.parseMarkdown(!1));Zt(this,"Parser",Ge);Zt(this,"Renderer",za);Zt(this,"TextRenderer",mh);Zt(this,"Lexer",je);Zt(this,"Tokenizer",Wa);Zt(this,"Hooks",ms);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let o=n;for(let c of o.header)i=i.concat(this.walkTokens(c.tokens,r));for(let c of o.rows)for(let h of c)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let o=n;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=n;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(c=>{let h=o[c].flat(1/0);i=i.concat(this.walkTokens(h,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let n=r.renderers[a.name];n?r.renderers[a.name]=function(...o){let c=a.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[a.level];n?n.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new za(this.defaults);for(let n in i.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,c=i.renderer[o],h=a[o];a[o]=(...l)=>{let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Wa(this.defaults);for(let n in i.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,c=i.tokenizer[o],h=a[o];a[o]=(...l)=>{let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ms;for(let n in i.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,c=i.hooks[o],h=a[o];ms.passThroughHooks.has(n)?a[o]=l=>{if(this.defaults.async&&ms.passThroughHooksRespectAsync.has(n))return(async()=>{let d=await c.call(a,l);return h.call(a,d)})();let u=c.call(a,l);return h.call(a,u)}:a[o]=(...l)=>{if(this.defaults.async)return(async()=>{let d=await c.apply(a,l);return d===!1&&(d=await h.apply(a,l)),d})();let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(o){let c=[];return c.push(n.call(this,o)),a&&(c=c.concat(a.call(this,o))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return je.lex(t,r??this.defaults)}parser(t,r){return Ge.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},n=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return n(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 n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,c=await(a.hooks?await a.hooks.provideLexer():t?je.lex:je.lexInline)(o,a),h=a.hooks?await a.hooks.processAllTokens(c):c;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let l=await(a.hooks?await a.hooks.provideParser():t?Ge.parse:Ge.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(l):l})().catch(n);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?je.lex:je.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let c=(a.hooks?a.hooks.provideParser():t?Ge.parse:Ge.parseInline)(o,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(o){return n(o)}}}onError(t,r){return i=>{if(i.message+=`
221
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+er(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ri=new Xw;function Xt(e,t){return ri.parse(e,t)}Xt.options=Xt.setOptions=function(e){return ri.setOptions(e),Xt.defaults=ri.defaults,dp(Xt.defaults),Xt};Xt.getDefaults=lh;Xt.defaults=ai;Xt.use=function(...e){return ri.use(...e),Xt.defaults=ri.defaults,dp(Xt.defaults),Xt};Xt.walkTokens=function(e,t){return ri.walkTokens(e,t)};Xt.parseInline=ri.parseInline;Xt.Parser=Ge;Xt.parser=Ge.parse;Xt.Renderer=za;Xt.TextRenderer=mh;Xt.Lexer=je;Xt.lexer=je.lex;Xt.Tokenizer=Wa;Xt.Hooks=ms;Xt.parse=Xt;Xt.options;Xt.setOptions;Xt.use;Xt.walkTokens;Xt.parseInline;Ge.parse;je.lex;function Sp(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 s=i.reduce(function(o,c){var h=c.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.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})):o},[]);if(s.length){var a=new RegExp(`
222
+ [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(o){return o.replace(a,`
223
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(o,c){var h=n.match(/(?:^|\n)( *)$/),l=h?h[1]:"",u=o;typeof o=="string"&&o.includes(`
224
+ `)&&(u=String(o).split(`
225
+ `).map(function(d,f){return f===0?d:"".concat(l).concat(d)}).join(`
226
+ `)),n+=u+i[c+1]}),n}var Qn=typeof performance<"u"&&typeof performance.now=="function",di=p(()=>Qn?performance.now():0,"now"),fn="🧜 ",Vw="Mermaid render",Zw="Mermaid",Kw={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Ri;Ri=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=di();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(di()-i)}}async tick(t,r){if(!this.enabled)return r();const i=di();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(di()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0: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:di(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Qn&&typeof performance.mark=="function")try{performance.mark(`${fn}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=di();if(t.duration=r-t.start,Qn&&typeof performance.measure=="function")try{performance.measure(`${fn}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:Vw,trackGroup:Zw,color:Kw[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(){var t;return((t=this.records.at(-1))==null?void 0:t.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,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,a=["ms % phase"],n=p((c,h)=>{const l=" ".repeat(h),u=c.duration.toFixed(1).padStart(8),d=i>0?`${(c.duration/i*100).toFixed(0).padStart(3)}%`:" -";a.push(`${u} ${d} ${l}${c.name}`);for(const f of c.children)n(f,h+1);if(c.children.length>0){const f=c.children.reduce((y,C)=>y+C.duration,0),m=c.duration-f;if(m>.5){const y=m.toFixed(1).padStart(8);a.push(`${y} ${l} (self)`)}}},"walk");n(t,0);const o=Object.keys(this.buckets);if(o.length>0){a.push("—— buckets (summed) ——");for(const c of o)a.push(`${this.buckets[c].toFixed(1).padStart(8)} ${c}`)}console.log(`${fn}mermaid render profile · ${s}
227
+ ${a.join(`
228
+ `)}`)}},p(Ri,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});function Tp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
229
+ `).replace(/\n{2,}/g,`
230
+ `);return Sp(i)}p(Tp,"preprocessMarkdown");function _p(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(_p,"nonMarkdownToLines");function Bp(e,t={}){const r=Tp(e,t),i=Xt.lexer(r),s=[[]];let a=0;function n(o,c="normal"){o.type==="text"?o.text.split(`
231
+ `).forEach((l,u)=>{u!==0&&(a++,s.push([])),l.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&s[a].push({content:d,type:c})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{n(h,o.type)}):o.type==="html"&&s[a].push({content:o.text,type:"normal"})}return p(n,"processNode"),i.forEach(o=>{var c;o.type==="paragraph"?(c=o.tokens)==null||c.forEach(h=>{n(h)}):o.type==="html"?s[a].push({content:o.text,type:"normal"}):s[a].push({content:o.raw,type:"normal"})}),s}p(Bp,"markdownToLines");function vp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(vp,"nonMarkdownToHTML");function Lp(e,{markdownAutoWrap:t}={}){const r=Xt.lexer(e);function i(s){var a,n,o;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(n=s.tokens)==null?void 0:n.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(o=s.tokens)==null?void 0:o.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(J.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(Lp,"markdownToHTML");var Qw=(function(e){var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function i(){var h=this;h.reads=[],h.writes=[],h.raf=r.bind(e)}p(i,"FastDom"),i.prototype={constructor:i,runTasks:p(function(h){for(var l;l=h.shift();)l()},"runTasks"),measure:p(function(h,l){var u=l?h.bind(l):h;return this.reads.push(u),s(this),u},"measure"),mutate:p(function(h,l){var u=l?h.bind(l):h;return this.writes.push(u),s(this),u},"mutate"),clear:p(function(h){return n(this.reads,h)||n(this.writes,h)},"clear"),extend:p(function(h){if(typeof h!="object")throw new Error("expected object");var l=Object.create(this);return o(l,h),l.fastdom=this,l.initialize&&l.initialize(),l},"extend"),catch:null};function s(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}p(s,"scheduleFlush");function a(h){var l=h.writes,u=h.reads,d;try{t("flushing reads",u.length),h.runTasks(u),t("flushing writes",l.length),h.runTasks(l)}catch(f){d=f}if(h.scheduled=!1,(u.length||l.length)&&s(h),d)if(t("task errored",d.message),h.catch)h.catch(d);else throw d}p(a,"flush");function n(h,l){var u=h.indexOf(l);return!!~u&&!!h.splice(u,1)}p(n,"remove");function o(h,l){for(var u in l)l.hasOwnProperty(u)&&(h[u]=l[u])}p(o,"mixin");var c=e.fastdom=e.fastdom||new i;return c})(typeof window<"u"?window:globalThis),Fp={initialize:p(function(){this._tasks=new Map},"initialize"),mutate:p(function(e,t){return Jn(this,"mutate",e,t)},"mutate"),measure:p(function(e,t){return Jn(this,"measure",e,t)},"measure"),clear:p(function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)},"clear")};function Jn(e,t,r,i){var s=e._tasks,a=e.fastdom,n,o=new Promise(function(c,h){n=a[t](function(){s.delete(o);try{c(i?r.call(i):r())}catch(l){h(l)}},i)});return s.set(o,n),o}p(Jn,"create");var{initialize:DF,mutate:PF,measure:RF,clear:qF}=Fp,Jw=Fp,tS=Qw.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(Jw),ii=tS;function Ap(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Ap,"splitTextToChars");function Ep(e,t){const r=Ap(t.content);return yh(e,[],r,t.type)}p(Ep,"splitWordToFitWidth");function yh(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,n=[...t,s];return e([{content:n.join(""),type:i}])?yh(e,n,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(yh,"splitWordToFitWidthRecursion");function Mp(e,t){if(e.some(({content:r})=>r.includes(`
232
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ha(e,t)}p(Mp,"splitLineToFitWidth");function Ha(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},n=[...i];if(s!==""&&n.push({content:s,type:"normal"}),n.push(a),t(n))return Ha(e,t,r,n);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,c]=Ep(t,a);r.push([o]),c.content&&e.unshift(c)}return Ha(e,t,r)}p(Ha,"splitLineToFitWidthRecursion");function tl(e,t){t&&e.attr("style",t)}p(tl,"applyStyle");var Bu=16384;async function $p(e,t,r,i,s=!1,a=Qt(),n=0){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Bu)}px`),o.attr("height",`${Math.min(10*r,Bu)}px`);const c=o.append("xhtml:div"),h=Ls(t.label)?await Wd(t.label.replace(Ds.lineBreakRegex,`
233
+ `),a):We(t.label,a),l=t.isNode?"nodeLabel":"edgeLabel",u=c.append("span");u.html(h),tl(u,t.labelStyle),u.attr("class",`${l} ${i}`),tl(c,t.labelStyle),c.style("display","table-cell"),c.style("white-space","nowrap"),c.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(c.style("max-width",r+"px"),c.style("text-align","center")),c.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&c.attr("class","labelBkg");const d=await ii.measure(()=>c.node().getBoundingClientRect());return d.width===r?(c.style("display","table"),c.style("white-space","break-spaces"),c.style("width",r+"px")):d.width<n&&(c.style("display","table"),c.style("width",n+"px"),c.style("text-align","center")),o.node()}p($p,"addHtmlSpan");function lo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(lo,"createTspan");function Op(e,t,r){const i=e.append("text"),s=lo(i,1,t);ho(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(Op,"computeWidthOfText");function eS(e,t,r){var n;const i=e.append("text"),s=lo(i,1,t);ho(s,[{content:r,type:"normal"}]);const a=(n=s.node())==null?void 0:n.getBoundingClientRect();return a&&i.remove(),a}p(eS,"computeDimensionOfText");function Ip(e,t,r,i=!1,s=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),c=n.append("text").attr("y","-10.1");s&&c.attr("text-anchor","middle");let h=0;for(const l of r){const u=p(f=>Op(n,1.1,f)<=e,"checkWidth"),d=u(l)?[l]:Mp(l,u);for(const f of d){const m=lo(c,h,1.1,s);ho(m,f),h++}}if(i){const l=c.node().getBBox(),u=2;return o.attr("x",l.x-u).attr("y",l.y-u).attr("width",l.width+2*u).attr("height",l.height+2*u),n.node()}else return c.node()}p(Ip,"createFormattedText");function el(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(el,"decodeHTMLEntities");function ho(e,t){e.text(""),t.forEach((r,i)=>{const s=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?s.text(el(r.content)):s.text(" "+el(r.content))})}p(ho,"updateTextContentAndStyles");async function Dp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,n)=>(r.push((async()=>{const o=`${a}:${n}`;return await Vf(o)?await Gi(o,void 0,{class:"label-icon"}):`<i class='${We(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Dp,"replaceIconSubstring");var Ie=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:n=!0,isNode:o=!0,width:c=200,minWidth:h=0,addSvgBackground:l=!1}={},u)=>{if(J.debug("XYZ createText",t,r,i,s,a,o,"addSvgBackground: ",l),a){const d=n?Lp(t,u):vp(t),f=await Dp(Wr(d),u),m=t.replace(/\\\\/g,"\\"),y={isNode:o,label:Ls(t)?m:f,labelStyle:r.replace("fill:","color:")};return await $p(e,y,c,s,l,u,h)}else{const d=Wr(t.replace(/<br\s*\/?>/g,"<br/>")),f=n?Bp(d.replace("<br>","<br/>"),u):_p(d),m=Ip(c,e,f,t?l:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Pt(m).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Pt(m).select("rect").attr("style",y.replace(/background:/g,"fill:"));const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Pt(m).select("text").attr("style",C)}return i?Pt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Pt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText"),rS=new Set(["redux-color","redux-dark-color"]),iS=12,sS=64,xh=p(e=>Array.isArray(e)&&e.length>0,"hasPalette"),aS=p((e,t)=>e!=null&&rS.has(e)&&xh(t),"isColorTheme"),oS=/^[\w-]+$/,NF=p(e=>{const t=typeof e=="string"||typeof e=="number"?String(e):"";return oS.test(t)?t:"classic"},"safeLook"),Pp=p(e=>xh(e)?e.length:0,"paletteSlotCount"),WF=p((e,t)=>xh(t)?Pp(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=sS?e:iS,"colorSlotCount"),He=p((e,t,r,i)=>{if(t===void 0||!aS(r,i))return;const s=t%Pp(i);e.attr("data-color-id",`color-${s}`)},"stampColorSlot");function pn(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,n=Math.cos(a),o=Math.sin(a);for(const c of e){const[h,l]=c;c[0]=(h-i)*n-(l-s)*o+i,c[1]=(h-i)*o+(l-s)*n+s}}}function nS(e,t){return e[0]===t[0]&&e[1]===t[1]}function lS(e,t,r,i=1){const s=r,a=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(s)for(const h of n)pn(h,o,s);const c=(function(h,l,u){const d=[];for(const b of h){const k=[...b];nS(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&d.push(k)}const f=[];l=Math.max(l,.1);const m=[];for(const b of d)for(let k=0;k<b.length-1;k++){const T=b[k],B=b[k+1];if(T[1]!==B[1]){const L=Math.min(T[1],B[1]);m.push({ymin:L,ymax:Math.max(T[1],B[1]),x:L===T[1]?T[0]:B[0],islope:(B[0]-T[0])/(B[1]-T[1])})}}if(m.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!m.length)return f;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>C);k++)b=k;m.splice(0,b+1).forEach((k=>{y.push({s:C,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=C))),y.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||x%l==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const T=y[b].edge,B=y[k].edge;f.push([[Math.round(T.x),C],[Math.round(B.x),C]])}C+=u,y.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return f})(n,a,i);if(s){for(const h of n)pn(h,o,-s);(function(h,l,u){const d=[];h.forEach((f=>d.push(...f))),pn(d,l,u)})(c,o,-s)}return c}function Ws(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),lS(e,s,i,a||1)}class Ch{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ws(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function co(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 hS extends Ch{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ws(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(a),c=.5*i*Math.sin(a);for(const[h,l]of s)co([h,l])&&n.push([[h[0]-o,h[1]+c],[...l]],[[h[0]+o,h[1]-c],[...l]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class cS extends Ch{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class uS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ws(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const n=s/4;for(const o of t){const c=co(o),h=c/s,l=Math.ceil(h)-1,u=c-l*s,d=(o[0][0]+o[1][0])/2-s/4,f=Math.min(o[0][1],o[1][1]);for(let m=0;m<l;m++){const y=f+u+m*s,C=d-n+2*Math.random()*n,x=y-n+2*Math.random()*n,b=this.helper.ellipse(C,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class dS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ws(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,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((n=>{const o=co(n),c=Math.floor(o/(i+s)),h=(o+s-c*(i+s))/2;let l=n[0],u=n[1];l[0]>u[0]&&(l=n[1],u=n[0]);const d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f<c;f++){const m=f*(i+s),y=m+i,C=[l[0]+m*Math.cos(d)+h*Math.cos(d),l[1]+m*Math.sin(d)+h*Math.sin(d)],x=[l[0]+y*Math.cos(d)+h*Math.cos(d),l[1]+y*Math.sin(d)+h*Math.sin(d)];a.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),a}}class fS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Ws(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const n=co(a),o=Math.round(n/(2*r));let c=a[0],h=a[1];c[0]>h[0]&&(c=a[1],h=a[0]);const l=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let u=0;u<o;u++){const d=2*u*r,f=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[c[0]+d*Math.cos(l),c[1]+d*Math.sin(l)],C=[c[0]+f*Math.cos(l),c[1]+f*Math.sin(l)],x=[y[0]+m*Math.cos(l+Math.PI/4),y[1]+m*Math.sin(l+Math.PI/4)];s.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))}})),s}}const ve={};class pS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const gS=0,gn=1,vu=2,ia={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 mn(e,t){return e.type===t}function bh(e){const t=[],r=(function(n){const o=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:gS,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:gn,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:vu,text:""},o})(e);let i="BOD",s=0,a=r[s];for(;!mn(a,vu);){let n=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return bh("M0,0"+e);s++,n=ia[a.text],i=a.text}else mn(a,gn)?n=ia[i]:(s++,n=ia[a.text],i=a.text);if(!(s+n<r.length))throw new Error("Path data ended short");for(let c=s;c<s+n;c++){const h=r[c];if(!mn(h,gn))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof ia[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:o};t.push(c),s+=n,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Rp(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:n,data:o}of e)switch(n){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,s]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function qp(e){const t=[];let r="",i=0,s=0,a=0,n=0,o=0,c=0;for(const{key:h,data:l}of e){switch(h){case"M":t.push({key:"M",data:[...l]}),[i,s]=l,[a,n]=l;break;case"C":t.push({key:"C",data:[...l]}),i=l[4],s=l[5],o=l[2],c=l[3];break;case"L":t.push({key:"L",data:[...l]}),[i,s]=l;break;case"H":i=l[0],t.push({key:"L",data:[i,s]});break;case"V":s=l[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-o),d=s+(s-c)):(u=i,d=s),t.push({key:"C",data:[u,d,...l]}),o=l[0],c=l[1],i=l[2],s=l[3];break}case"T":{const[u,d]=l;let f=0,m=0;r==="Q"||r==="T"?(f=i+(i-o),m=s+(s-c)):(f=i,m=s);const y=i+2*(f-i)/3,C=s+2*(m-s)/3,x=u+2*(f-u)/3,b=d+2*(m-d)/3;t.push({key:"C",data:[y,C,x,b,u,d]}),o=f,c=m,i=u,s=d;break}case"Q":{const[u,d,f,m]=l,y=i+2*(u-i)/3,C=s+2*(d-s)/3,x=f+2*(u-f)/3,b=m+2*(d-m)/3;t.push({key:"C",data:[y,C,x,b,f,m]}),o=u,c=d,i=f,s=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,s,C,x,C,x]}),i=C,s=x):(i!==C||s!==x)&&(Np(i,s,C,x,u,d,f,m,y).forEach((function(b){t.push({key:"C",data:b})})),i=C,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=n}r=h}return t}function ns(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Np(e,t,r,i,s,a,n,o,c,h){const l=(u=n,Math.PI*u/180);var u;let d=[],f=0,m=0,y=0,C=0;if(h)[f,m,y,C]=h;else{[e,t]=ns(e,t,-l),[r,i]=ns(r,i,-l);const W=(e-r)/2,E=(t-i)/2;let M=W*W/(s*s)+E*E/(a*a);M>1&&(M=Math.sqrt(M),s*=M,a*=M);const v=s*s,R=a*a,O=v*R-v*E*E-R*W*W,X=v*E*E+R*W*W,Z=(o===c?-1:1)*Math.sqrt(Math.abs(O/X));y=Z*s*E/a+(e+r)/2,C=Z*-a*W/s+(t+i)/2,f=Math.asin(parseFloat(((t-C)/a).toFixed(9))),m=Math.asin(parseFloat(((i-C)/a).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),c&&f>m&&(f-=2*Math.PI),!c&&m>f&&(m-=2*Math.PI)}let x=m-f;if(Math.abs(x)>120*Math.PI/180){const W=m,E=r,M=i;m=c&&m>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Np(r=y+s*Math.cos(m),i=C+a*Math.sin(m),E,M,s,a,n,0,c,[m,W,y,C])}x=m-f;const b=Math.cos(f),k=Math.sin(f),T=Math.cos(m),B=Math.sin(m),L=Math.tan(x/4),A=4/3*s*L,F=4/3*a*L,z=[e,t],q=[e+A*k,t-F*b],D=[r+A*B,i-F*T],rt=[r,i];if(q[0]=2*z[0]-q[0],q[1]=2*z[1]-q[1],h)return[q,D,rt].concat(d);{d=[q,D,rt].concat(d);const W=[];for(let E=0;E<d.length;E+=3){const M=ns(d[E][0],d[E][1],l),v=ns(d[E+1][0],d[E+1][1],l),R=ns(d[E+2][0],d[E+2][1],l);W.push([M[0],M[1],v[0],v[1],R[0],R[1]])}return W}}const mS={randOffset:function(e,t){return Mt(e,t)},randOffsetWithRange:function(e,t,r){return Ya(e,t,r)},ellipse:function(e,t,r,i,s){const a=zp(r,i,s);return rl(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return zr(e,t,r,i,s,!0)}};function Wp(e,t,r,i,s){return{type:"path",ops:zr(e,t,r,i,s)}}function Ca(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...zr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...zr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Wp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function yS(e,t,r,i,s){return(function(a,n){return Ca(a,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Lu(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=sa(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:sa(r[0],1.5*(1+.22*t.roughness),Eu(t));for(let a=1;a<r.length;a++){const n=r[a];if(n.length){const o=sa(n,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:sa(n,1.5*(1+.22*t.roughness),Eu(t));for(const h of o)h.op!=="move"&&i.push(h);for(const h of c)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function zp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let n=Math.abs(e/2),o=Math.abs(t/2);const c=1-r.curveFitting;return n+=Mt(n*c,r),o+=Mt(o*c,r),{increment:a,rx:n,ry:o}}function rl(e,t,r,i){const[s,a]=Mu(i.increment,e,t,i.rx,i.ry,1,i.increment*Ya(.1,Ya(.4,1,r),r),r);let n=Ua(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=Mu(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=Ua(o,null,r);n=n.concat(c)}return{estimatedPoints:a,opset:{type:"path",ops:n}}}function Fu(e,t,r,i,s,a,n,o,c){const h=e,l=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=Mt(.01*u,c),d+=Mt(.01*d,c);let f=s,m=a;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/c.curveStepCount,C=Math.min(y/2,(m-f)/2),x=$u(C,h,l,u,d,f,m,1,c);if(!c.disableMultiStroke){const b=$u(C,h,l,u,d,f,m,1.5,c);x.push(...b)}return n&&(o?x.push(...zr(h,l,h+u*Math.cos(f),l+d*Math.sin(f),c),...zr(h,l,h+u*Math.cos(m),l+d*Math.sin(m),c)):x.push({op:"lineTo",data:[h,l]},{op:"lineTo",data:[h+u*Math.cos(f),l+d*Math.sin(f)]})),{type:"path",ops:x}}function Au(e,t){const r=qp(Rp(bh(e))),i=[];let s=[0,0],a=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":a=[o[0],o[1]],s=[o[0],o[1]];break;case"L":i.push(...zr(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[c,h,l,u,d,f]=o;i.push(...xS(c,h,l,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...zr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function yn(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Mt(s,t),i[0][1]+Mt(s,t)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Mt(s,t),i[n][1]+Mt(s,t)]})}}return{type:"fillPath",ops:r}}function fi(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ve[s])switch(s){case"zigzag":ve[s]||(ve[s]=new hS(i));break;case"cross-hatch":ve[s]||(ve[s]=new cS(i));break;case"dots":ve[s]||(ve[s]=new uS(i));break;case"dashed":ve[s]||(ve[s]=new dS(i));break;case"zigzag-line":ve[s]||(ve[s]=new fS(i));break;default:s="hachure",ve[s]||(ve[s]=new Ch(i))}return ve[s]})(t,mS).fillPolygons(e,t)}function Eu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Hp(e){return e.randomizer||(e.randomizer=new pS(e.seed||0)),e.randomizer.next()}function Ya(e,t,r,i=1){return r.roughness*i*(Hp(r)*(t-e)+e)}function Mt(e,t,r=1){return Ya(-e,e,t,r)}function zr(e,t,r,i,s,a=!1){const n=a?s.disableMultiStrokeFill:s.disableMultiStroke,o=il(e,t,r,i,s,!0,!1);if(n)return o;const c=il(e,t,r,i,s,!0,!0);return o.concat(c)}function il(e,t,r,i,s,a,n){const o=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(o);let h=1;h=c<200?1:c>500?.4:-.0016668*c+1.233334;let l=s.maxRandomnessOffset||0;l*l*100>o&&(l=c/10);const u=l/2,d=.2+.2*Hp(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=Mt(f,s,h),m=Mt(m,s,h);const y=[],C=()=>Mt(u,s,h),x=()=>Mt(l,s,h),b=s.preserveVertices;return n?y.push({op:"move",data:[e+(b?0:C()),t+(b?0:C())]}):y.push({op:"move",data:[e+(b?0:Mt(l,s,h)),t+(b?0:Mt(l,s,h))]}),n?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+(b?0:C()),i+(b?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+(b?0:x()),i+(b?0:x())]}),y}function sa(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]),i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]),s===e.length-1&&i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]);return Ua(i,null,r)}function Ua(e,t,r){const i=e.length,s=[];if(i>3){const a=[],n=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const c=e[o];a[0]=[c[0],c[1]],a[1]=[c[0]+(n*e[o+1][0]-n*e[o-1][0])/6,c[1]+(n*e[o+1][1]-n*e[o-1][1])/6],a[2]=[e[o+1][0]+(n*e[o][0]-n*e[o+2][0])/6,e[o+1][1]+(n*e[o][1]-n*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...il(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Mu(e,t,r,i,s,a,n,o){const c=[],h=[];if(o.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let l=0;l<=2*Math.PI;l+=e){const u=[t+i*Math.cos(l),r+s*Math.sin(l)];c.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const l=Mt(.5,o)-Math.PI/2;h.push([Mt(a,o)+t+.9*i*Math.cos(l-e),Mt(a,o)+r+.9*s*Math.sin(l-e)]);const u=2*Math.PI+l-.01;for(let d=l;d<u;d+=e){const f=[Mt(a,o)+t+i*Math.cos(d),Mt(a,o)+r+s*Math.sin(d)];c.push(f),h.push(f)}h.push([Mt(a,o)+t+i*Math.cos(l+2*Math.PI+.5*n),Mt(a,o)+r+s*Math.sin(l+2*Math.PI+.5*n)]),h.push([Mt(a,o)+t+.98*i*Math.cos(l+n),Mt(a,o)+r+.98*s*Math.sin(l+n)]),h.push([Mt(a,o)+t+.9*i*Math.cos(l+.5*n),Mt(a,o)+r+.9*s*Math.sin(l+.5*n)])}return[h,c]}function $u(e,t,r,i,s,a,n,o,c){const h=a+Mt(.1,c),l=[];l.push([Mt(o,c)+t+.9*i*Math.cos(h-e),Mt(o,c)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=n;u+=e)l.push([Mt(o,c)+t+i*Math.cos(u),Mt(o,c)+r+s*Math.sin(u)]);return l.push([t+i*Math.cos(n),r+s*Math.sin(n)]),l.push([t+i*Math.cos(n),r+s*Math.sin(n)]),Ua(l,null,c)}function xS(e,t,r,i,s,a,n,o){const c=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let l=[0,0];const u=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let f=0;f<u;f++)f===0?c.push({op:"move",data:[n[0],n[1]]}):c.push({op:"move",data:[n[0]+(d?0:Mt(h[0],o)),n[1]+(d?0:Mt(h[0],o))]}),l=d?[s,a]:[s+Mt(h[f],o),a+Mt(h[f],o)],c.push({op:"bcurveTo",data:[e+Mt(h[f],o),t+Mt(h[f],o),r+Mt(h[f],o),i+Mt(h[f],o),l[0],l[1]]});return c}function ls(e){return[...e]}function Ou(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(ls(e[0]),ls(e[1]),ls(e[2]),ls(e[2]));else{const s=[];s.push(e[0],e[0]);for(let o=1;o<e.length;o++)s.push(e[o]),o===e.length-1&&s.push(e[o]);const a=[],n=1-t;i.push(ls(s[0]));for(let o=1;o+2<s.length;o++){const c=s[o];a[0]=[c[0],c[1]],a[1]=[c[0]+(n*s[o+1][0]-n*s[o-1][0])/6,c[1]+(n*s[o+1][1]-n*s[o-1][1])/6],a[2]=[s[o+1][0]+(n*s[o][0]-n*s[o+2][0])/6,s[o+1][1]+(n*s[o][1]-n*s[o+2][1])/6],a[3]=[s[o+1][0],s[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function ba(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function CS(e,t,r){const i=ba(t,r);if(i===0)return ba(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),ba(e,Xr(t,r,s))}function Xr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function sl(e,t,r,i){const s=i||[];if((function(o,c){const h=o[c+0],l=o[c+1],u=o[c+2],d=o[c+3];let f=3*l[0]-2*h[0]-d[0];f*=f;let m=3*l[1]-2*h[1]-d[1];m*=m;let y=3*u[0]-2*d[0]-h[0];y*=y;let C=3*u[1]-2*d[1]-h[1];return C*=C,f<y&&(f=y),m<C&&(m=C),f+m})(e,t)<r){const o=e[t+0];s.length?(a=s[s.length-1],n=o,Math.sqrt(ba(a,n))>1&&s.push(o)):s.push(o),s.push(e[t+3])}else{const c=e[t+0],h=e[t+1],l=e[t+2],u=e[t+3],d=Xr(c,h,.5),f=Xr(h,l,.5),m=Xr(l,u,.5),y=Xr(d,f,.5),C=Xr(f,m,.5),x=Xr(y,C,.5);sl([c,d,y,x],0,r,s),sl([x,C,m,u],0,r,s)}var a,n;return s}function bS(e,t){return ja(e,0,e.length,t)}function ja(e,t,r,i,s){const a=s||[],n=e[t],o=e[r-1];let c=0,h=1;for(let l=t+1;l<r-1;++l){const u=CS(e[l],n,o);u>c&&(c=u,h=l)}return Math.sqrt(c)>i?(ja(e,t,h+1,i,a),ja(e,h,r,i,a)):(a.length||a.push(n),a.push(o)),a}function xn(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)sl(e,3*a,t,i);return r&&r>0?ja(i,0,i.length,r):i}const Ee="none";class Ga{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,s,a){const n=this._o(a);return this._d("line",[Wp(t,r,i,s,n)],n)}rectangle(t,r,i,s,a){const n=this._o(a),o=[],c=yS(t,r,i,s,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];n.fillStyle==="solid"?o.push(yn([h],n)):o.push(fi([h],n))}return n.stroke!==Ee&&o.push(c),this._d("rectangle",o,n)}ellipse(t,r,i,s,a){const n=this._o(a),o=[],c=zp(i,s,n),h=rl(t,r,n,c);if(n.fill)if(n.fillStyle==="solid"){const l=rl(t,r,n,c).opset;l.type="fillPath",o.push(l)}else o.push(fi([h.estimatedPoints],n));return n.stroke!==Ee&&o.push(h.opset),this._d("ellipse",o,n)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ca(t,!1,i)],i)}arc(t,r,i,s,a,n,o=!1,c){const h=this._o(c),l=[],u=Fu(t,r,i,s,a,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const d=Object.assign({},h);d.disableMultiStroke=!0;const f=Fu(t,r,i,s,a,n,!0,!1,d);f.type="fillPath",l.push(f)}else l.push((function(d,f,m,y,C,x,b){const k=d,T=f;let B=Math.abs(m/2),L=Math.abs(y/2);B+=Mt(.01*B,b),L+=Mt(.01*L,b);let A=C,F=x;for(;A<0;)A+=2*Math.PI,F+=2*Math.PI;F-A>2*Math.PI&&(A=0,F=2*Math.PI);const z=(F-A)/b.curveStepCount,q=[];for(let D=A;D<=F;D+=z)q.push([k+B*Math.cos(D),T+L*Math.sin(D)]);return q.push([k+B*Math.cos(F),T+L*Math.sin(F)]),q.push([k,T]),fi([q],b)})(t,r,i,s,a,n,h));return h.stroke!==Ee&&l.push(u),this._d("arc",l,h)}curve(t,r){const i=this._o(r),s=[],a=Lu(t,i);if(i.fill&&i.fill!==Ee)if(i.fillStyle==="solid"){const n=Lu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],o=t;if(o.length){const c=typeof o[0][0]=="number"?[o]:o;for(const h of c)h.length<3?n.push(...h):h.length===3?n.push(...xn(Ou([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...xn(Ou(h),10,(1+i.roughness)/2))}n.length&&s.push(fi([n],i))}return i.stroke!==Ee&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ca(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(yn([t],i)):s.push(fi([t],i))),i.stroke!==Ee&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Ee,n=i.stroke!==Ee,o=!!(i.simplification&&i.simplification<1),c=(function(l,u,d){const f=qp(Rp(bh(l))),m=[];let y=[],C=[0,0],x=[];const b=()=>{x.length>=4&&y.push(...xn(x,u)),x=[]},k=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:B,data:L}of f)switch(B){case"M":k(),C=[L[0],L[1]],y.push(C);break;case"L":b(),y.push([L[0],L[1]]);break;case"C":if(!x.length){const A=y.length?y[y.length-1]:C;x.push([A[0],A[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":b(),y.push([C[0],C[1]])}if(k(),!d)return m;const T=[];for(const B of m){const L=bS(B,d);L.length&&T.push(L)}return T})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=Au(t,i);if(a)if(i.fillStyle==="solid")if(c.length===1){const l=Au(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else s.push(yn(c,i));else s.push(fi(c,i));return n&&(o?c.forEach((l=>{s.push(Ca(l,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((n=>+n.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let n=null;switch(a.type){case"path":n={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ee};break;case"fillPath":n={d:this.opsToPath(a),stroke:Ee,strokeWidth:0,fill:i.fill||Ee};break;case"fillSketch":n=this.fillSketch(a,i)}n&&s.push(n)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ee,strokeWidth:i,fill:Ee}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class kS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ga(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,n,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,a,o),s.restore();break}case"fillSketch":this.fillSketch(s,n,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const n=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n),n}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n),n}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n),n}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}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,s,a,n,o=!1,c){const h=this.gen.arc(t,r,i,s,a,n,o,c);return this.draw(h),h}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 aa="http://www.w3.org/2000/svg";class wS{constructor(t,r){this.svg=t,this.gen=new Ga(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(aa,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let c=null;switch(o.type){case"path":c=s.createElementNS(aa,"path"),c.setAttribute("d",this.opsToPath(o,n)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=s.createElementNS(aa,"path"),c.setAttribute("d",this.opsToPath(o,n)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(s,o,i)}c&&a.appendChild(c)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(aa,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n)}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n)}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}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,s,a,n,o=!1,c){const h=this.gen.arc(t,r,i,s,a,n,o,c);return this.draw(h)}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 pt={canvas:(e,t)=>new kS(e,t),svg:(e,t)=>new wS(e,t),generator:e=>new Ga(e),newSeed:()=>Ga.newSeed()},SS=1,TS=3;async function kh(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!wh(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const n=Rt().fontSize?Rt().fontSize:window.getComputedStyle(document.body).fontSize,o=5,[c=ml.fontSize]=ao(n),h=c*o+"px";i.style.minWidth=h,i.style.maxWidth=h}else i.style.width="100%";s(i)}p(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}p(kh,"configureLabelImages");function wh(e){var r;return e.nodeType===TS?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==SS||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(wh)}p(wh,"hasTextBesidesImages");var Iu=3,_S=32,BS=p(async(e,t,r)=>{var x,b,k;const i=Rt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",ne(t.labelStyle)),o=[{text:typeof t.label=="string"?t.label:((x=t.label)==null?void 0:x[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(T=>({text:T,cssClass:"c4-descr"}))].filter(T=>T.text),c=t.width?Math.max(t.width-2*(t.padding??0),_S):((b=Rt().flowchart)==null?void 0:b.wrappingWidth)??200,l=((k=i.c4)==null?void 0:k.wrap)??!0?c:Number.POSITIVE_INFINITY,u=await Promise.all(o.map(async T=>{const B=a.append("g").attr("class",T.cssClass),L=await Ie(B,We(Wr(T.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return Pt(L).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Pt(L).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:B,box:B.node().getBBox()}})),d=Math.max(...u.map(({box:T})=>T.width),0);let f=0;for(const{el:T,box:B}of u)T.attr("transform",`translate(${d/2-B.x-B.width/2}, ${f-B.y})`),f+=B.height+Iu;const m=u.length>0?f-Iu:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-d/2}, ${-m/2})`);const y=a.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:C,label:a}},"c4LabelHelper"),Du=p((e,t)=>{const{x:r,y:i,width:s,height:a}=e;return s>=t?e:"left"in e?{x:r,y:i,width:t,height:a,top:i,left:r,bottom:i+a,right:r+t,toJSON:p(()=>({}),"toJSON")}:{x:r-(t-s)/2,y:i,width:t,height:a}},"withMinWidth"),vt=p(async(e,t,r,{ignoreMinWidth:i=!1}={})=>{var y,C;if(t.stereotype!==void 0)return BS(e,t,r);let s;const a=t.useHtmlLabels||hr((y=Rt())==null?void 0:y.htmlLabels);r?s=r:s="node default";const n=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=n.insert("g").attr("class","label").attr("style",ne(t.labelStyle));let c;t.label===void 0?c="":c=typeof t.label=="string"?t.label:t.label[0];const h=!!t.icon||!!t.img,l=t.labelType==="markdown",u=c&&!t.width&&!i?t.minWidth??0:0,d=await Ie(o,We(Wr(c),Rt()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||((C=Rt().flowchart)==null?void 0:C.wrappingWidth),minWidth:u,classes:l?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:h,markdown:l},Rt()),f=((t==null?void 0:t.padding)??0)/2;let m;if(a){const x=d.children[0],b=Pt(d);await kh(x),m=await ii.measure(()=>x.getBoundingClientRect()),m=Du(m,u),b.attr("width",m.width),b.attr("height",m.height)}else m=await ii.measure(()=>d.getBBox()),m=Du(m,u);return a?o.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):o.attr("transform","translate(0, "+-m.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:m,halfPadding:f,label:o}},"labelHelper"),Qr=p(async(e,t,r)=>{var c,h;const i=r.useHtmlLabels??ue(Rt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ie(s,We(Wr(t),Rt()),{useHtmlLabels:i,width:r.width||((h=(c=Rt())==null?void 0:c.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),n=r.padding/2;let o;if(ue(Rt())){const l=a.children[0],u=Pt(a);o=await ii.measure(()=>l.getBoundingClientRect()),u.attr("width",o.width),u.attr("height",o.height)}else o=await ii.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),xt=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"),Bt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Yt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Yt,"createPathFromPoints");function Hr(e,t,r,i,s,a){const n=[],c=r-e,h=i-t,l=c/a,u=2*Math.PI/l,d=t+h/2;for(let f=0;f<=50;f++){const m=f/50,y=e+m*c,C=d+s*Math.sin(u*(y-e));n.push({x:y,y:C})}return n}p(Hr,"generateFullSineWavePoints");function sr(e,t,r,i,s,a){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);n.push({x:-f,y:-m})}return n}p(sr,"generateCirclePoints");function al(e){const t=Array.from(e.childNodes).filter(c=>c.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(c=>c.getAttribute("d")).filter(c=>c!==null).join(" ");r.setAttribute("d",i);const s=t.find(c=>c.getAttribute("fill")!=="none"),a=t.find(c=>c.getAttribute("stroke")!=="none"),n=p((c,h)=>(c==null?void 0:c.getAttribute(h))??void 0,"getAttr");if(s){const c={fill:n(s,"fill"),"fill-opacity":n(s,"fill-opacity")??"1"};Object.entries(c).forEach(([h,l])=>{l&&r.setAttribute(h,l)})}if(a){const c={stroke:n(a,"stroke"),"stroke-width":n(a,"stroke-width")??"1","stroke-opacity":n(a,"stroke-opacity")??"1"};Object.entries(c).forEach(([h,l])=>{l&&r.setAttribute(h,l)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}p(al,"mergePaths");var vS=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,n=e.width/2,o=e.height/2,c,h;return Math.abs(a)*n>Math.abs(s)*o?(a<0&&(o=-o),c=a===0?0:o*s/a,h=o):(s<0&&(n=-n),c=n,h=s===0?0:n*a/s),{x:r+c,y:i+h}},"intersectRect"),Br=vS;function Yp(e,t){return e.intersect(t)}p(Yp,"intersectNode");var LS=Yp;function Up(e,t,r,i){var s=e.x,a=e.y,n=s-i.x,o=a-i.y,c=Math.sqrt(t*t*o*o+r*r*n*n),h=Math.abs(t*r*n/c);i.x<s&&(h=-h);var l=Math.abs(t*r*o/c);return i.y<a&&(l=-l),{x:s+h,y:a+l}}p(Up,"intersectEllipse");var jp=Up;function Gp(e,t,r){return jp(e,t,t,r)}p(Gp,"intersectCircle");var FS=Gp;function Xp(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,n=t.x*e.y-e.x*t.y,o=s*r.x+a*r.y+n,c=s*i.x+a*i.y+n,h=1e-6;if(o!==0&&c!==0&&ol(o,c))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)<h&&Math.abs(m)<h&&ol(f,m))return;const y=s*u-l*a;if(y===0)return;const C=(a*d-u*n)/y,x=(l*n-s*d)/y;return{x:C,y:x}}}p(Xp,"intersectLine");function ol(e,t){return e*t>0}p(ol,"sameSign");var AS=Xp;function Vp(e,t,r){let i=e.x,s=e.y,a=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(l){n=Math.min(n,l.x),o=Math.min(o,l.y)}):(n=Math.min(n,t.x),o=Math.min(o,t.y));let c=i-e.width/2-n,h=s-e.height/2-o;for(let l=0;l<t.length;l++){let u=t[l],d=t[l<t.length-1?l+1:0],f=AS(e,r,{x:c+u.x,y:h+u.y},{x:c+d.x,y:h+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.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}),a[0]):e}p(Vp,"intersectPolygon");var ES=Vp,ut={node:LS,circle:FS,ellipse:jp,polygon:ES,rect:Br},De=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),MS=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const n=Rt(),o=ue(n);return await Ie(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},n)},"createLabel"),kr=MS;function Zp(e,t){const{labelStyles:r}=mt(t);t.labelStyle=r;const i=Bt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,c=pt.svg(a),h=ft(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const l=c.circle(0,0,n*2,h),u=a.insert(()=>l,":first-child");return u.attr("class","anchor").attr("style",ne(o)),xt(t,u),t.intersect=function(d){return J.info("Circle intersect",t,n,d),ut.circle(t,n,d)},a}p(Zp,"anchor");function nl(e,t,r,i,s,a,n){const c=(e+r)/2,h=(t+i)/2,l=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/s,m=d/a,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=c+C*a*Math.sin(l)*(n?-1:1),b=h-C*s*Math.cos(l)*(n?-1:1),k=Math.atan2((t-b)/a,(e-x)/s);let B=Math.atan2((i-b)/a,(r-x)/s)-k;n&&B<0&&(B+=2*Math.PI),!n&&B>0&&(B-=2*Math.PI);const L=[];for(let A=0;A<20;A++){const F=A/19,z=k+F*B,q=x+s*Math.cos(z),D=b+a*Math.sin(z);L.push({x:q,y:D})}return L}p(nl,"generateArcPoints");function Kp(e,t,r){const[i,s]=[t,r].sort((a,n)=>n-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(Kp,"calculateArcSagitta");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=p(z=>z+n,"calcTotalHeight"),c=p(z=>{const q=z/2;return[q/(2.5+z/50),q]},"calcEllipseRadius"),{shapeSvg:h,bbox:l}=await vt(e,t,Bt(t)),u=o(t!=null&&t.height?t==null?void 0:t.height:l.height),[d,f]=c(u),m=Kp(u,d,f),C=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+m-m,x=u,{cssStyles:b}=t,k=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...nl(-C/2,-x/2,-C/2,x/2,d,f,!1),{x:C/2,y:x/2},...nl(C/2,x/2,C/2,-x/2,d,f,!0)],T=pt.svg(h),B=ft(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=Yt(k),A=T.path(L,B),F=h.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${d/2}, 0)`),xt(t,F),t.intersect=function(z){return ut.polygon(t,k,z)},h}p(Qp,"bowTieRect");async function Jp(e,t,{config:{themeVariables:r}}){var A;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await vt(e,t,Bt(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=Math.max(n.width+h*2,t.width??0,80),u=Math.max(Math.min(l*.08,12),5),d=Math.max(n.height+h*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,b=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const z=pt.svg(a).path(C,ft(t,{}));(A=b.node())==null||A.appendChild(z),x&&b.attr("style",x)}else b.append("path").attr("d",C).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",l/2).attr("ry",u).attr("style",`fill:none;stroke:${c};stroke-width:1px`),xt(t,b);const k=f+(m-f)/2;o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${k-n.height/2-(n.y-(n.top??0))})`);const T=12,B=p((F,z,q)=>Array.from({length:T+1},(D,rt)=>{const W=Math.PI-rt*Math.PI/T;return{x:F*Math.cos(W),y:z+q*u*Math.sin(W)}}),"arc"),L=[...B(l/2,f,-1),...B(y/2,m,1).reverse()];return t.intersect=function(F){return ut.polygon(t,L,F)},a}p(Jp,"bucket");var Pu=20,Ru=8,$S=80,OS=8;function tg(e){const{themeVariables:t}=Rt(),r=t.clusterBkg,i=t.clusterBorder;switch(e){case"flow":return{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"};default:return{rx:OS,fill:r,stroke:i,cssClass:"collapsed-group"}}}p(tg,"getCollapsedStyle");async function eg(e,t){var A;const r=tg((A=t.metadata)==null?void 0:A.containerType),{fill:i,stroke:s}=r,{nodeStyles:a}=mt(t),{shapeSvg:n,bbox:o}=await vt(e,t,Bt(t)),{theme:c,themeVariables:h}=Rt();He(n,t.colorIndex,c,h.borderColorArray);const l=t.padding??8,u=o.height,d=Math.max(o.width+l*2,$S,(t==null?void 0:t.width)??0),f=Math.max(u+Ru+Pu+l*2,(t==null?void 0:t.height)??0),m=-d/2,y=-f/2,C=-28/2,x=n.select(".label");x&&(t.useHtmlLabels??ue(Rt())?x.attr("transform",`translate(${-o.width/2}, ${-o.height/2+C})`):x.attr("transform",`translate(0, ${-o.height/2+C})`));let b;if(t.look==="handDrawn"){const F=pt.svg(n),z=ft(t,{fill:i,stroke:s,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...i==="none"?{fillWeight:0}:{fillStyle:"solid"}}),q=F.path(De(m,y,d,f,r.rx),z);b=n.insert(()=>q,":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",ne(t.cssStyles))}else b=n.insert("rect",":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",a).attr("rx",r.rx).attr("ry",r.rx).attr("x",m).attr("y",y).attr("width",d).attr("height",f).attr("fill",i).attr("stroke",s),r.strokeWidth!==void 0&&b.attr("stroke-width",r.strokeWidth+"px");const k=y+l+u+Ru;n.append("line").attr("class","collapsed-separator").attr("x1",m+8).attr("y1",k).attr("x2",m+d-8).attr("y2",k).attr("stroke",s).attr("stroke-dasharray","3, 3");const T=k+Pu/2,B=2.5,L=10;for(let F=-1;F<=1;F++)n.append("circle").attr("class","collapsed-indicator").attr("cx",F*L).attr("cy",T).attr("r",B).attr("fill",s);return xt(t,b),t.calcIntersect=function(F,z){return ut.rect(F,z)},t.intersect=function(F){return ut.rect(t,F)},n}p(eg,"collapsedGroup");function ur(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(ur,"insertPolygonShape");var IS=["right","left","up","down"],Sh="point",DS=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"),PS=p(e=>IS.filter(t=>e.has(t)).join("|")||Sh,"getDirectionKey"),qu={"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"),[Sh]:()=>[{x:0,y:0}]},RS=p((e,t,r,i)=>{const s=DS(e),a=(r.padding??0)/2,n=t.height+4*a,o=n/2,c=i??t.width+2*o+2*a,h=PS(s);return(qu[h]??qu[Sh])({height:n,midpoint:o,padding:a,width:c})},"getArrowPoints");async function rg(e,t){const r=t,{shapeSvg:i,bbox:s}=await vt(e,r,Bt(r)),a=r.padding??0,n=s.height+2*a,o=n/2,c=s.width+2*o+a,h=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&h>c?h:c,d=RS(r.directions??[],s,r,u),f=ur(i,u,n,d);return f.attr("style",r.style??null),xt(r,f),r.intersect=function(m){return ut.polygon(r,d,m)},i}p(rg,"block_arrow");async function ig(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await vt(e,t,Bt(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=18,u=12,d=Math.max(n.width+h*2,t.width??0,90),f=Math.max(n.height+h*2+l,t.height??0),m=-f/2,{cssStyles:y}=t,C=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=pt.svg(a).path(De(-d/2,m,d,f,u),ft(t,{}));(b=C.node())==null||b.appendChild(T),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",s);C.append("line").attr("x1",-d/2).attr("y1",m+l).attr("x2",d/2).attr("y2",m+l).attr("style",`stroke:${c};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:${c};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:${c};stroke-width:1px;opacity:0.6`),xt(t,C);const x=m+l+(f-l)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${x-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(k){return ut.rect(t,k)},a}p(ig,"browser");var oa=12;async function sg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),h=((t==null?void 0:t.width)??c.width)+(t.look==="neo"?a*2:a+oa),l=((t==null?void 0:t.height)??c.height)+(t.look==="neo"?n*2:n),u=0,d=h,f=-l,m=0,y=[{x:u+oa,y:f},{x:d,y:f},{x:d,y:m},{x:u,y:m},{x:u,y:f+oa},{x:u+oa,y:f}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=pt.svg(o),k=ft(t,{}),T=Yt(y),B=b.path(T,k);C=o.insert(()=>B,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),x&&C.attr("style",x)}else C=ur(o,h,l,y);return i&&C.attr("style",i),xt(t,C),t.intersect=function(b){return ut.polygon(t,y,b)},o}p(sg,"card");function ag(e,t){const{nodeStyles:r}=mt(t);t.label="";const i=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),n=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=pt.svg(i),c=ft(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=Yt(n),l=o.path(h,c),u=i.insert(()=>l,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return ut.polygon(t,n,d)},i}p(ag,"choice");async function Th(e,t,r){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,halfPadding:o}=await vt(e,t,Bt(t),{ignoreMinWidth:!0}),c=16,h=(r==null?void 0:r.padding)??o,l=Math.sqrt(n.width**2+n.height**2)/2,u=t.look==="neo"?l+c:l+h;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(a),y=ft(t,{}),C=m.circle(0,0,u*2,y);d=a.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",ne(f))}else d=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0);return xt(t,d),t.calcIntersect=function(m,y){const C=m.width/2;return ut.circle(m,C,y)},t.intersect=function(m){return J.info("Circle intersect",t,u,m),ut.circle(t,u,m)},a}p(Th,"circle");async function og(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:n}=await vt(e,r,i),o=s.insert("rect",":first-child"),c=r.padding??0,h=r.positioned?r.width??0:a.width+c,l=r.positioned?r.height??0:a.height+c,u=r.positioned?-h/2:-a.width/2-n,d=r.positioned?-l/2:-a.height/2-n;return o.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",h).attr("height",l),xt(r,o),r.intersect=function(f){return ut.rect(r,f)},s}p(og,"composite");async function ng(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await vt(e,t,Bt(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=20,u=12,d=Math.max(n.width+h*2,t.width??0,90),f=Math.max(n.height+h*2+l,t.height??0),m=-f/2,{cssStyles:y}=t,C=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=pt.svg(a).path(De(-d/2,m,d,f,u),ft(t,{}));(b=C.node())==null||b.appendChild(T),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",s);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:${c}`).text(">_"),xt(t,C);const x=m+l+(f-l)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${x-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(k){return ut.rect(t,k)},a}p(ng,"consoleWindow");function lg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,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},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
234
+ M ${s.x},${s.y} L ${n.x},${n.y}`}p(lg,"createLine");function hg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=pt.svg(s),c=ft(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=o.circle(0,0,a*2,c),l=lg(a),u=o.path(l,c),d=s.insert(()=>h,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),xt(t,d),t.intersect=function(f){return J.info("crossedCircle intersect",t,{radius:a,point:f}),ut.circle(t,a,f)},s}p(hg,"crossedCircle");function Cr(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);n.push({x:-f,y:-m})}return n}p(Cr,"generateCirclePoints");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,Bt(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+o,l=a.height+c,u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...Cr(h/2,-l/2,u,30,-90,0),{x:-h/2-u,y:u},...Cr(h/2+u*2,-u,u,20,-180,-270),...Cr(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-l/2},...Cr(h/2,l/2,u,20,0,90)],m=[{x:h/2,y:-l/2-u},{x:-h/2,y:-l/2-u},...Cr(h/2,-l/2,u,20,-90,0),{x:-h/2-u,y:-u},...Cr(h/2+h*.1,-u,u,20,-180,-270),...Cr(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:l/2},...Cr(h/2,l/2,u,20,0,90),{x:-h/2,y:l/2+u},{x:h/2,y:l/2+u}],y=pt.svg(s),C=ft(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=Yt(f).replace("Z",""),k=y.path(b,C),T=Yt(m),B=y.path(T,{...C}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":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)`),n.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),xt(t,L),t.intersect=function(A){return ut.polygon(t,m,A)},s}p(cg,"curlyBraceLeft");function br(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);n.push({x:f,y:m})}return n}p(br,"generateCirclePoints");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,Bt(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),l=a.height+(t.look==="neo"?c*2:c),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...br(h/2,-l/2,u,20,-90,0),{x:h/2+u,y:-u},...br(h/2+u*2,-u,u,20,-180,-270),...br(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:l/2},...br(h/2,l/2,u,20,0,90)],m=[{x:-h/2,y:-l/2-u},{x:h/2,y:-l/2-u},...br(h/2,-l/2,u,20,-90,0),{x:h/2+u,y:-u},...br(h/2+u*2,-u,u,20,-180,-270),...br(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:l/2},...br(h/2,l/2,u,20,0,90),{x:h/2,y:l/2+u},{x:-h/2,y:l/2+u}],y=pt.svg(s),C=ft(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=Yt(f).replace("Z",""),k=y.path(b,C),T=Yt(m),B=y.path(T,{...C}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":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)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),xt(t,L),t.intersect=function(A){return ut.polygon(t,m,A)},s}p(ug,"curlyBraceRight");function pe(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);n.push({x:-f,y:-m})}return n}p(pe,"generateCirclePoints");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,Bt(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),l=a.height+(t.look==="neo"?c*2:c),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...pe(h/2,-l/2,u,30,-90,0),{x:-h/2-u,y:u},...pe(h/2+u*2,-u,u,20,-180,-270),...pe(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-l/2},...pe(h/2,l/2,u,20,0,90)],m=[...pe(-h/2+u+u/2,-l/2,u,20,-90,-180),{x:h/2-u/2,y:u},...pe(-h/2-u/2,-u,u,20,0,90),...pe(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...pe(-h/2+u+u/2,l/2,u,30,-180,-270)],y=[{x:h/2,y:-l/2-u},{x:-h/2,y:-l/2-u},...pe(h/2,-l/2,u,20,-90,0),{x:-h/2-u,y:-u},...pe(h/2+u*2,-u,u,20,-180,-270),...pe(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:l/2},...pe(h/2,l/2,u,20,0,90),{x:-h/2,y:l/2+u},{x:h/2-u-u/2,y:l/2+u},...pe(-h/2+u+u/2,-l/2,u,20,-90,-180),{x:h/2-u/2,y:u},...pe(-h/2-u/2,-u,u,20,0,90),...pe(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...pe(-h/2+u+u/2,l/2,u,30,-180,-270)],C=pt.svg(s),x=ft(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=Yt(f).replace("Z",""),T=C.path(k,x),L=Yt(m).replace("Z",""),A=C.path(L,x),F=Yt(y),z=C.path(F,{...x}),q=s.insert("g",":first-child");return q.insert(()=>z,":first-child").attr("stroke-opacity",0),q.insert(()=>T,":first-child"),q.insert(()=>A,":first-child"),q.attr("class","text"),d&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),q.attr("transform",`translate(${u-u/4}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),xt(t,q),t.intersect=function(D){return ut.polygon(t,y,D)},s}p(dg,"curlyBraces");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=20,c=5,{shapeSvg:h,bbox:l}=await vt(e,t,Bt(t)),u=Math.max(c,l.height+n*2,(t==null?void 0:t.height)??0),d=u/2,f=d-Math.sqrt(Math.max(0,d**2-(l.height/2)**2)),m=Math.max(u/4,f),y=Math.max(o,l.width+a*2+m*2,(l.width+a*2)*1.25,(t==null?void 0:t.width)??0),{cssStyles:C}=t,x=pt.svg(h),b=ft(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=y,T=u,B=k-d,L=T/4,A=[{x:B,y:0},{x:L,y:0},{x:0,y:T/2},{x:L,y:T},{x:B,y:T},...sr(-B,-T/2,d,50,270,90)],F=Yt(A),z=x.path(F,b),q=h.insert(()=>z,":first-child");return q.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&q.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&q.selectChildren("path").attr("style",i),q.attr("transform",`translate(${-y/2}, ${-u/2})`),xt(t,q),t.intersect=function(D){return ut.polygon(t,A,D)},h}p(fg,"curvedTrapezoid");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,Bt(t)),o=t.padding??20,c=Math.max(a.width+o*2,t.width??0,100),h=Math.min(Math.max(c*.23,16),56),l=h*.27,u=Math.max(a.height+o*2,t.height?t.height-(2*h-l):0),d=Math.min(c*.177,u*.45),f=u+2*h-l,m=-f/2,y=m+2*h-l,C=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const F=pt.svg(s),z=ft(t,{}),q=F.path(De(-c/2,y,c,u,d),z),D=F.circle(0,m+h,h*2,z);C.insert(()=>D,":first-child"),C.insert(()=>q,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-c/2).attr("y",y).attr("width",c).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+h).attr("r",h).attr("style",i);xt(t,C);const b=y+u/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);const k=m+h,T=Math.asin(Math.min(1,(y-k)/h))*180/Math.PI,A=[...sr(0,-k,h,24,180+T,-T),...sr(-(-c/2+d),-(y+d),d,12,90,0),...sr(-(-c/2+d),-(f/2-d),d,12,360,270),...sr(-(c/2-d),-(f/2-d),d,12,270,180),...sr(-(c/2-d),-(y+d),d,12,180,90)];return t.intersect=function(F){return ut.polygon(t,A,F)},s}p(pg,"person");var qS=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),NS=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),WS=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Nu=8,Wu=8;async function gg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,n=t.look==="neo"?24:s,o=t.width??0;if(t.width&&(t.width=t.width-n,t.width<Wu&&(t.width=Wu)),t.height){const b=o/2/(2.5+o/50);t.height=t.height-a-b*3,t.height<Nu&&(t.height=Nu)}const{shapeSvg:c,bbox:h,label:l}=await vt(e,t,Bt(t)),u=Math.max(t.width??0,h.width)+n,d=u/2,f=d/(2.5+u/50),m=Math.max(t.height??0,h.height)+a+f;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=pt.svg(c),b=NS(0,0,u,m,d,f),k=WS(0,f,u,m,d,f),T=ft(t,{}),B=x.path(b,T),L=x.path(k,ft(t,{fill:"none"}));y=c.insert(()=>L,":first-child"),y=c.insert(()=>B,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=qS(0,0,u,m,d,f);y=c.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ne(C)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-u/2}, ${-(m/2+f)})`),xt(t,y),l.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(t.padding??0)/1.5-(h.y-(h.top??0))})`),t.intersect=function(x){const b=ut.rect(t,x),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-k*k/(d*d));T>0&&(T=Math.sqrt(T)),T=f-T,x.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},c}p(gg,"cylinder");async function Xi(e,t,r){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n}=await vt(e,t,Bt(t)),o=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-o/2,l=-c/2;let u,{rx:d,ry:f}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const y=pt.svg(a),C=ft(t,{}),x=d||f?y.path(De(h,l,o,c,d||0),C):y.rectangle(h,l,o,c,C);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",ne(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",ne(d)).attr("ry",ne(f)).attr("x",h).attr("y",l).attr("width",o).attr("height",c);return xt(t,u,t.look==="handDrawn"?void 0:{width:o,height:c}),t.calcIntersect=function(y,C){return ut.rect(y,C)},t.intersect=function(y){return ut.rect(t,y)},a}p(Xi,"drawRect");async function mg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:n,height:o}=t,c={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await Xi(e,t,c);if(t.look==="handDrawn"){const f=pt.svg(h),m=ft(t,{}),y=h.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return h;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return h;return h.insert(()=>f.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),h.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(),h}const l=h.select(".basic.label-container"),u=(Number(l.attr("width"))||n)??0,d=(Number(l.attr("height"))||o)??0;return u>0&&d>0&&l.attr("stroke-dasharray",`${u} ${d}`),h}p(mg,"datastore");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:c}=await vt(e,t,Bt(t)),h=o.width+s,l=o.height+a,u=l*.2,d=-h/2,f=-l/2-u/2,{cssStyles:m}=t,y=pt.svg(n),C=ft(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}],b=y.polygon(x.map(T=>[T.x,T.y]),C),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),c.attr("transform",`translate(${d+(t.padding??0)/2-(o.x-(o.left??0))}, ${f+u+(t.padding??0)/2-(o.y-(o.top??0))})`),xt(t,k),t.intersect=function(T){return ut.rect(t,T)},n}p(yg,"dividedRectangle");async function xg(e,t){var m,y;const{labelStyles:r,nodeStyles:i}=mt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,n=t.look==="neo"?16:a,{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t),{ignoreMinWidth:!0}),h=Math.sqrt(c.width**2+c.height**2)/2,l=(t!=null&&t.width?(t==null?void 0:t.width)/2:h)+(n??0),u=l+s;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const C=pt.svg(o),x=ft(t,{roughness:.2,strokeWidth:2.5}),b=ft(t,{roughness:.2,strokeWidth:1.5}),k=C.circle(0,0,u*2,x),T=C.circle(0,0,l*2,b);d=o.insert("g",":first-child"),d.attr("class",ne(t.cssClasses)).attr("style",ne(f)),(m=d.node())==null||m.appendChild(k),(y=d.node())==null||y.appendChild(T)}else{d=o.insert("g",":first-child");const C=d.insert("circle",":first-child"),x=d.insert("circle");d.attr("class","basic label-container").attr("style",i),C.attr("class","outer-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0),x.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return xt(t,d),t.intersect=function(C){return J.info("DoubleCircle intersect",t,u,C),ut.circle(t,u,C)},o}p(xg,"doublecircle");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n}=await vt(e,t,Bt(t)),{theme:o,themeVariables:c}=Rt();He(s,t.colorIndex,o,c.borderColorArray);const h=n??10,l=a.width/2+h*2,u=a.height/2+h*2;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(s),y=ft(t,{}),C=m.ellipse(0,0,l*2,u*2,y);d=s.insert(()=>C,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else d=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",l).attr("ry",u).attr("cx",0).attr("cy",0);return t.width=l*2,t.height=u*2,xt(t,d),t.calcIntersect=function(m,y){const C=m.width/2,x=m.height/2;return ut.ellipse(m,C,x,y)},t.intersect=function(m){return ut.ellipse(t,l,u,m)},s}p(Cg,"usecaseEllipse");function bg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=mt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,c=pt.svg(a),{nodeBorder:h}=r,l=ft(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const u=c.circle(0,0,n*2,l),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),xt(t,d),t.intersect=function(f){return J.info("filledCircle intersect",t,{radius:n,point:f}),ut.circle(t,n,f)},a}p(bg,"filledCircle");var zu=10,Hu=10;async function kg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<zu&&(t.height=zu),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Hu&&(t.width=Hu));const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,Bt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(a??0),l=t!=null&&t.height?t==null?void 0:t.height:h+o.height,u=l,d=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=t,m=pt.svg(n),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Yt(d),x=m.path(C,y),b=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=l,xt(t,b),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-l/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(k){return J.info("Triangle intersect",t,d,k),ut.polygon(t,d,k)},n}p(kg,"flippedTriangle");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,Bt(t)),o=t.padding??12,c=Math.max(a.width+o*2,t.width??0,90),h=a.height+o*2,l=Math.max(Math.min(h*.16,14),8),u=Math.max(h+l,t.height??0),d=u-l,f=Math.max(c*.38,28),m=-u/2,y=[{x:-c/2,y:m},{x:-c/2+f,y:m},{x:-c/2+f,y:m+l},{x:c/2,y:m+l},{x:c/2,y:u/2},{x:-c/2,y:u/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:x}=t;let b;if(t.look==="handDrawn"){const B=pt.svg(s).path(C,ft(t,{}));b=s.insert(()=>B,":first-child").attr("class","basic label-container"),x&&b.attr("style",x)}else b=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?xt(t,b):xt(t,b,{width:c,height:u});const k=m+l+d/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(T){return ut.polygon(t,y,T)},s}p(wg,"folder");function Sg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=mt(t);t.label="";const n=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);(r==="LR"||r==="RL")&&(c=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const l=-1*c/2,u=-1*h/2,d=pt.svg(n),f=ft(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=d.rectangle(l,u,c,h,f),y=n.insert(()=>m,":first-child");o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),xt(t,y);const C=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return ut.rect(t,x)},n}p(Sg,"forkJoin");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=15,a=10,n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<s&&(t.width=s));const{shapeSvg:c,bbox:h}=await vt(e,t,Bt(t)),l=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+o*2,u=l/2,d=u-Math.sqrt(Math.max(0,u**2-(h.height/2)**2)),f=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width)+d*2)+n*2,{cssStyles:m}=t,y=pt.svg(c),C=ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-f/2,y:-l/2},{x:f/2-u,y:-l/2},...sr(-f/2+u,0,u,50,90,270),{x:f/2-u,y:l/2},{x:-f/2,y:l/2}],b=Yt(x),k=y.path(b,C),T=c.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),xt(t,T),t.intersect=function(B){return J.info("Pill intersect",t,{radius:u,point:B}),ut.polygon(t,x,B)},c}p(Tg,"halfRoundedRectangle");var zS=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=mt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,n=70,o=32,c=t.look==="neo"?n:a,h=t.look==="neo"?o:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-c}const{shapeSvg:l,bbox:u}=await vt(e,t,Bt(t)),d=(t!=null&&t.height?t==null?void 0:t.height:u.height)+c,f=d/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*f+h,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 b=pt.svg(l),k=ft(t,{}),T=zS(0,0,m,d,f),B=b.path(T,k);C=l.insert(()=>B,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),x&&C.attr("style",x)}else C=ur(l,m,d,y);return i&&C.attr("style",i),t.width=m,t.height=d,xt(t,C),t.intersect=function(b){return ut.polygon(t,y,b)},l}p(_g,"hexagon");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await vt(e,t,Bt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,c=pt.svg(s),h=ft(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const l=[{x:0,y:0},{x:a,y:0},{x:0,y:n},{x:a,y:n}],u=Yt(l),d=c.path(u,h),f=s.insert(()=>d,":first-child");return f.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-n/2})`),xt(t,f),t.intersect=function(m){return J.info("Pill intersect",t,{points:l}),ut.polygon(t,l,m)},s}p(Bg,"hourglass");async function vg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,label:u}=await vt(e,t,"icon-shape default"),d=t.pos==="t",f=o,m=o,{nodeBorder:y}=r,{stylesMap:C}=Yr(t),x=-m/2,b=-f/2,k=t.label?8:0,T=pt.svg(h),B=ft(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=T.rectangle(x,b,m,f,B),A=Math.max(m,l.width),F=f+l.height+k,z=T.rectangle(-A/2,-F/2,A,F,{...B,fill:"transparent",stroke:"none"}),q=h.insert(()=>L,":first-child"),D=h.insert(()=>z);if(t.icon){const rt=h.append("g");rt.html(`<g>${await Gi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const W=rt.node().getBBox(),E=W.width,M=W.height,v=W.x,R=W.y;rt.attr("transform",`translate(${-E/2-v},${d?l.height/2+k/2-M/2-R:-l.height/2-k/2-M/2-R})`),rt.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${d?-F/2:F/2-l.height})`),q.attr("transform",`translate(0,${d?l.height/2+k/2:-l.height/2-k/2})`),xt(t,D),t.intersect=function(rt){if(J.info("iconSquare intersect",t,rt),!t.label)return ut.rect(t,rt);const W=t.x??0,E=t.y??0,M=t.height??0;let v=[];return d?v=[{x:W-l.width/2,y:E-M/2},{x:W+l.width/2,y:E-M/2},{x:W+l.width/2,y:E-M/2+l.height+k},{x:W+m/2,y:E-M/2+l.height+k},{x:W+m/2,y:E+M/2},{x:W-m/2,y:E+M/2},{x:W-m/2,y:E-M/2+l.height+k},{x:W-l.width/2,y:E-M/2+l.height+k}]:v=[{x:W-m/2,y:E-M/2},{x:W+m/2,y:E-M/2},{x:W+m/2,y:E-M/2+f},{x:W+l.width/2,y:E-M/2+f},{x:W+l.width/2/2,y:E+M/2},{x:W-l.width/2,y:E+M/2},{x:W-l.width/2,y:E-M/2+f},{x:W-m/2,y:E-M/2+f}],ut.polygon(t,v,rt)},h}p(vg,"icon");async function Lg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,label:u}=await vt(e,t,"icon-shape default"),d=20,f=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=Yr(t),b=pt.svg(h),k=ft(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=x.get("fill");k.stroke=T??C;const B=h.append("g");t.icon&&B.html(`<g>${await Gi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=B.node().getBBox(),A=L.width,F=L.height,z=L.x,q=L.y,D=Math.max(A,F)*Math.SQRT2+d*2,rt=b.circle(0,0,D,k),W=Math.max(D,l.width),E=D+l.height+f,M=b.rectangle(-W/2,-E/2,W,E,{...k,fill:"transparent",stroke:"none"}),v=h.insert(()=>rt,":first-child"),R=h.insert(()=>M);return B.attr("transform",`translate(${-A/2-z},${m?l.height/2+f/2-F/2-q:-l.height/2-f/2-F/2-q})`),B.attr("style",`color: ${x.get("stroke")??y};`),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${m?-E/2:E/2-l.height})`),v.attr("transform",`translate(0,${m?l.height/2+f/2:-l.height/2-f/2})`),xt(t,R),t.intersect=function(O){return J.info("iconSquare intersect",t,O),ut.rect(t,O)},h}p(Lg,"iconCircle");async function Fg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,halfPadding:u,label:d}=await vt(e,t,"icon-shape default"),f=t.pos==="t",m=o+u*2,y=o+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:b}=Yr(t),k=-y/2,T=-m/2,B=t.label?8:0,L=pt.svg(h),A=ft(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=b.get("fill");A.stroke=F??x;const z=L.path(De(k,T,y,m,5),A),q=Math.max(y,l.width),D=m+l.height+B,rt=L.rectangle(-q/2,-D/2,q,D,{...A,fill:"transparent",stroke:"none"}),W=h.insert(()=>z,":first-child").attr("class","icon-shape2"),E=h.insert(()=>rt);if(t.icon){const M=h.append("g");M.html(`<g>${await Gi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),R=v.width,O=v.height,X=v.x,Z=v.y;M.attr("transform",`translate(${-R/2-X},${f?l.height/2+B/2-O/2-Z:-l.height/2-B/2-O/2-Z})`),M.attr("style",`color: ${b.get("stroke")??C};`)}return d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-D/2:D/2-l.height})`),W.attr("transform",`translate(0,${f?l.height/2+B/2:-l.height/2-B/2})`),xt(t,E),t.intersect=function(M){if(J.info("iconSquare intersect",t,M),!t.label)return ut.rect(t,M);const v=t.x??0,R=t.y??0,O=t.height??0;let X=[];return f?X=[{x:v-l.width/2,y:R-O/2},{x:v+l.width/2,y:R-O/2},{x:v+l.width/2,y:R-O/2+l.height+B},{x:v+y/2,y:R-O/2+l.height+B},{x:v+y/2,y:R+O/2},{x:v-y/2,y:R+O/2},{x:v-y/2,y:R-O/2+l.height+B},{x:v-l.width/2,y:R-O/2+l.height+B}]:X=[{x:v-y/2,y:R-O/2},{x:v+y/2,y:R-O/2},{x:v+y/2,y:R-O/2+m},{x:v+l.width/2,y:R-O/2+m},{x:v+l.width/2/2,y:R+O/2},{x:v-l.width/2,y:R+O/2},{x:v-l.width/2,y:R-O/2+m},{x:v-y/2,y:R-O/2+m}],ut.polygon(t,X,M)},h}p(Fg,"iconRounded");async function Ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,halfPadding:u,label:d}=await vt(e,t,"icon-shape default"),f=t.pos==="t",m=o+u*2,y=o+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:b}=Yr(t),k=-y/2,T=-m/2,B=t.label?8:0,L=pt.svg(h),A=ft(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=b.get("fill");A.stroke=F??x;const z=L.path(De(k,T,y,m,.1),A),q=Math.max(y,l.width),D=m+l.height+B,rt=L.rectangle(-q/2,-D/2,q,D,{...A,fill:"transparent",stroke:"none"}),W=h.insert(()=>z,":first-child"),E=h.insert(()=>rt);if(t.icon){const M=h.append("g");M.html(`<g>${await Gi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),R=v.width,O=v.height,X=v.x,Z=v.y;M.attr("transform",`translate(${-R/2-X},${f?l.height/2+B/2-O/2-Z:-l.height/2-B/2-O/2-Z})`),M.attr("style",`color: ${b.get("stroke")??C};`)}return d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-D/2:D/2-l.height})`),W.attr("transform",`translate(0,${f?l.height/2+B/2:-l.height/2-B/2})`),xt(t,E),t.intersect=function(M){if(J.info("iconSquare intersect",t,M),!t.label)return ut.rect(t,M);const v=t.x??0,R=t.y??0,O=t.height??0;let X=[];return f?X=[{x:v-l.width/2,y:R-O/2},{x:v+l.width/2,y:R-O/2},{x:v+l.width/2,y:R-O/2+l.height+B},{x:v+y/2,y:R-O/2+l.height+B},{x:v+y/2,y:R+O/2},{x:v-y/2,y:R+O/2},{x:v-y/2,y:R-O/2+l.height+B},{x:v-l.width/2,y:R-O/2+l.height+B}]:X=[{x:v-y/2,y:R-O/2},{x:v+y/2,y:R-O/2},{x:v+y/2,y:R-O/2+m},{x:v+l.width/2,y:R-O/2+m},{x:v+l.width/2/2,y:R+O/2},{x:v-l.width/2,y:R+O/2},{x:v-l.width/2,y:R-O/2+m},{x:v-y/2,y:R-O/2+m}],ut.polygon(t,X,M)},h}p(Ag,"iconSquare");async function Eg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:n}=mt(t);t.labelStyle=n;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:c,l=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,o??0);const{shapeSvg:u,bbox:d,label:f}=await vt(e,t,"image-shape default"),m=t.pos==="t",y=-h/2,C=-l/2,x=t.label?8:0,b=pt.svg(u),k=ft(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=b.rectangle(y,C,h,l,k),B=Math.max(h,d.width),L=l+d.height+x,A=b.rectangle(-B/2,-L/2,B,L,{...k,fill:"none",stroke:"none"}),F=u.insert(()=>T,":first-child"),z=u.insert(()=>A);if(t.img){const q=u.append("image");q.attr("href",t.img),q.attr("width",h),q.attr("height",l),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-h/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})`),F.attr("transform",`translate(0,${m?d.height/2+x/2:-d.height/2-x/2})`),xt(t,z),t.intersect=function(q){if(J.info("iconSquare intersect",t,q),!t.label)return ut.rect(t,q);const D=t.x??0,rt=t.y??0,W=t.height??0;let E=[];return m?E=[{x:D-d.width/2,y:rt-W/2},{x:D+d.width/2,y:rt-W/2},{x:D+d.width/2,y:rt-W/2+d.height+x},{x:D+h/2,y:rt-W/2+d.height+x},{x:D+h/2,y:rt+W/2},{x:D-h/2,y:rt+W/2},{x:D-h/2,y:rt-W/2+d.height+x},{x:D-d.width/2,y:rt-W/2+d.height+x}]:E=[{x:D-h/2,y:rt-W/2},{x:D+h/2,y:rt-W/2},{x:D+h/2,y:rt-W/2+l},{x:D+d.width/2,y:rt-W/2+l},{x:D+d.width/2/2,y:rt+W/2},{x:D-d.width/2,y:rt+W/2},{x:D-d.width/2,y:rt-W/2+l},{x:D-h/2,y:rt-W/2+l}],ut.polygon(t,E,q)},u}p(Eg,"imageSquare");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),h=Math.max(c.height+a*2,t.height??0),l=Math.max(c.width+n*2,(t.width??0)-h),u=[{x:0,y:0},{x:l,y:0},{x:l+3*h/6,y:-h},{x:-3*h/6,y:-h}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=ft(t,{}),C=Yt(u),x=m.path(C,y);d=o.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),f&&d.attr("style",f)}else d=ur(o,l,h,u);return i&&d.attr("style",i),t.width=l,t.height=h,xt(t,d),t.intersect=function(m){return ut.polygon(t,u,m)},o}p(Mg,"inv_trapezoid");async function $g(e,t){const{shapeSvg:r,bbox:i,label:s}=await vt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),xt(t,a),t.intersect=function(c){return ut.rect(t,c)},r}p($g,"labelRect");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),u=[{x:0,y:0},{x:l+3*h/6,y:0},{x:l,y:-h},{x:-(3*h)/6,y:-h}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=ft(t,{}),C=Yt(u),x=m.path(C,y);d=o.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),f&&d.attr("style",f)}else d=ur(o,l,h,u);return i&&d.attr("style",i),t.width=l,t.height=h,xt(t,d),t.intersect=function(m){return ut.polygon(t,u,m)},o}p(Og,"lean_left");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),u=[{x:-3*h/6,y:0},{x:l,y:0},{x:l+3*h/6,y:-h},{x:0,y:-h}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=ft(t,{}),C=Yt(u),x=m.path(C,y);d=o.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),f&&d.attr("style",f)}else d=ur(o,l,h,u);return i&&d.attr("style",i),t.width=l,t.height=h,xt(t,d),t.intersect=function(m){return ut.polygon(t,u,m)},o}p(Ig,"lean_right");function Dg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Bt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),c=7,h=[{x:n,y:0},{x:0,y:o+c/2},{x:n-2*c,y:o+c/2},{x:0,y:2*o},{x:n,y:o-c/2},{x:2*c,y:o-c/2}],l=pt.svg(s),u=ft(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Yt(h),f=l.path(d,u),m=s.insert(()=>f,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${n/2},${-o})`),xt(t,m),t.intersect=function(y){return J.info("lightningBolt intersect",t,y),ut.polygon(t,h,y)},s}p(Dg,"lightningBolt");var HS=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),YS=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),US=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Yu=10,Uu=10;async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-a,t.width<Uu&&(t.width=Uu);const k=x/2/(2.5+x/50);t.height=(t.height??0)-n-k*3,t.height<Yu&&(t.height=Yu)}const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,Bt(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,u=l/2,d=u/(2.5+l/50),f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+d+n*2,m=f*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=pt.svg(o),b=YS(0,0,l,f,u,d,m),k=US(0,d,l,f,u,d),T=ft(t,{}),B=x.path(b,T),L=x.path(k,T);o.insert(()=>L,":first-child").attr("class","line"),y=o.insert(()=>B,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=HS(0,0,l,f,u,d,m);y=o.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ne(C)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-l/2}, ${-(f/2+d)})`),xt(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+d-(c.y-(c.top??0))})`),t.intersect=function(x){const b=ut.rect(t,x),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-d)){let T=d*d*(1-k*k/(u*u));T>0&&(T=Math.sqrt(T)),T=d-T,x.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},o}p(Pg,"linedCylinder");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,Bt(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(n??0)*2,d=t.look==="neo"?u/4:u/8,f=u+d,{cssStyles:m}=t,y=pt.svg(o),C=ft(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},...Hr(-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}],b=y.polygon(x.map(T=>[T.x,T.y]),C),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(c.x-(c.left??0))},${-u/2+(t.padding??0)-d-(c.y-(c.top??0))})`),xt(t,k),t.intersect=function(T){return ut.polygon(t,x,T)},o}p(Rg,"linedWaveEdgedRect");var jS=56,Cn=72,ju=8,Gu=2,GS=8,XS={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Xu=Math.PI/3,Vu=.6,bn=p((e,t)=>{const r=t*Vu,i=t*Math.sqrt(1-Vu**2),s=Math.cos(Xu),a=-Math.sin(Xu),n=r*-a,o=e+r*s,c=i*s,h=i*a;return`M ${n-c} ${o-h} L ${n+c} ${o+h}`},"businessMarkerPathForCircle"),VS={normal:bn(-24,12),hollow:bn(-23,9),awesome:bn(-21,13),icon:"M 12 -8 L 26 -26"},Zu=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel"),_h=p((e,t,r,i,s=!1)=>{if(t.look==="handDrawn"){const o=pt.svg(e).path(r,ft(t,s?{fill:"none"}:{}));return e.insert(()=>o,":first-child").attr("class",i)}const a=e.append("path").attr("class",i).attr("d",r);return s&&a.attr("fill","none"),a},"appendActorPath"),ZS=p((e,t,r,i,s,a,n=!1)=>{if(t.look==="handDrawn"){const h=pt.svg(e).circle(r,i,s*2,ft(t,n?{fill:"none"}:{}));return e.insert(()=>h,":first-child").attr("class",a)}const o=e.append("circle").attr("class",a).attr("cx",r).attr("cy",i).attr("r",s);return n&&o.attr("fill","none"),o},"appendActorCircle"),KS=p((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",VS[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function zs(e,t,r,i){const{labelStyles:s,nodeStyles:a}=mt(t);t.labelStyle=s;const n=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:o,bbox:c,label:h}=await vt(e,n,Bt(t,`usecase-actor-variant usecase-actor-${r}`)),l=t.accessibleName??t.label;l&&o.attr("role","img").attr("aria-label",l),h.attr("class","label actor-label usecase-actor-label");const{theme:u,themeVariables:d}=Rt();He(o,t.colorIndex,u,d.borderColorArray);let f,m;if(t.stereotype){const F=await Qr(o,`«${t.stereotype}»`,{labelStyle:s,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=F.label.attr("class","label usecase-stereotype"),m=F.bbox}const y=o.append("g").attr("class",`usecase-actor-glyph ${XS[r]}`).attr("style",a||null);await i(y,t),KS(y,t,r);const C=t.padding??GS,x=(m==null?void 0:m.height)??0,b=Cn+ju+c.height+(m?x+Gu:0),k=Math.max(jS,c.width,(m==null?void 0:m.width)??0)+C*2,T=b+C*2,B=-b/2;y.attr("transform",`translate(0,${B+Cn/2})`);let L=B+Cn+ju;f&&m&&(L+=x/2,Zu(f,m,L),L+=x/2+Gu),Zu(h,c,L+c.height/2);const A=o.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-k/2).attr("y",-T/2).attr("width",k).attr("height",T).attr("opacity",0).attr("aria-hidden","true");return xt(t,A),t.intersect=F=>ut.rect(t,F),o}p(zs,"renderUsecaseActor");var QS=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function qg(e,t){return zs(e,t,"normal",(r,i)=>{_h(r,i,QS,"usecase-actor-stick")})}p(qg,"usecaseActor");var JS=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Ng(e,t){return zs(e,t,"awesome",(r,i)=>{_h(r,i,JS,"usecase-actor-awesome-silhouette")})}p(Ng,"usecaseActorAwesome");var tT=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Wg(e,t){return zs(e,t,"hollow",(r,i)=>{ZS(r,i,0,-23,9,"usecase-actor-hollow-head",!0),_h(r,i,tT,"usecase-actor-hollow-body",!0)})}p(Wg,"usecaseActorHollow");var pi=52,Ku=42,Qu=-2,eT=p(async(e,t)=>{var h;const r=-pi/2,i=Qu-pi/2;if(t.look==="handDrawn"){const u=pt.svg(e).rectangle(r,i,pi,pi,ft(t,{}));e.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else e.append("rect").attr("class","usecase-actor-icon-frame").attr("x",r).attr("y",i).attr("width",pi).attr("height",pi).attr("rx",4).attr("ry",4);const s=t.icon??"",a=await Vf(s.includes(":")?s:`fa:${s}`),n=await Gi(s,{height:Ku,width:Ku,fallbackPrefix:"fa"}),o=e.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${n}</g>`),c=(h=o.node())==null?void 0:h.getBBox();c&&o.attr("transform",`translate(${-c.width/2-c.x},${Qu-c.height/2-c.y})`)},"drawIconActor");async function zg(e,t){return zs(e,t,"icon",eT)}p(zg,"usecaseActorIcon");var Ju=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel");async function Hg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const a=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:n,bbox:o,halfPadding:c,label:h}=await vt(e,a,Bt(t,"usecase-business-shape"));h.attr("class","label usecase-label");const{theme:l,themeVariables:u}=Rt();He(n,t.colorIndex,l,u.borderColorArray);let d,f;if(r.stereotype){const W=await Qr(n,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});d=W.label.attr("class","label usecase-stereotype"),f=W.bbox}const m=f?2:0,y=o.height+((f==null?void 0:f.height)??0)+m,C=Math.max(o.width,(f==null?void 0:f.width)??0),x=c??10,b=C/2+x*2,k=y/2+x*2,T=Math.min(Math.max(x/5,1),x/2),B=C/2+T,L=b-T,A=B/b,F=L/b,z=k*Math.sqrt(Math.max(0,1-A*A)),q=-k*Math.sqrt(Math.max(0,1-F*F));d&&f&&Ju(d,f,-y/2+f.height/2),Ju(h,o,y/2-o.height/2);let D;if(t.look==="handDrawn"){const E=pt.svg(n).ellipse(0,0,b*2,k*2,ft(t,{}));D=n.insert(()=>E,":first-child").attr("class","basic label-container usecase-business-ellipse")}else D=n.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",s).attr("rx",b).attr("ry",k).attr("cx",0).attr("cy",0);n.append("path").attr("class","usecase-business-marker").attr("d",`M ${B} ${z} L ${L} ${q}`).attr("fill","none").attr("style",s||null);const rt=r.accessibleName??r.label;return rt&&n.attr("role","img").attr("aria-label",rt),xt(t,D),t.calcIntersect=(W,E)=>ut.ellipse(W,W.width/2,W.height/2,E),t.intersect=W=>ut.ellipse(t,b,k,W),n}p(Hg,"usecaseBusiness");var kn=8,td=4,rT=1,wn=p((e,t,r,i)=>{const s=(t.x??0)-(t.left??0),a=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-s},${i-t.height/2-a})`)},"positionLabel"),iT=p(e=>{const t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:rT},"numericStrokeWidth");async function Yg(e,t){var W;const r=t,{labelStyles:i,nodeStyles:s}=mt(t),{stylesMap:a}=Yr(t);t.labelStyle=i;const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,Bt(t,"usecase-json-table"));n.attr("role","img"),r.accessibleName&&n.attr("aria-label",r.accessibleName),c.attr("class","label usecase-json-title");const h=n.append("g").attr("class","usecase-json-table-grid"),l=[];for(const E of r.jsonRows??[]){const M=await Qr(h,E.key,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),v=await Qr(h,E.value,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});l.push({key:{label:M.label.attr("class","label usecase-json-key"),bbox:M.bbox},value:{label:v.label.attr("class","label usecase-json-value"),bbox:v.bbox}})}const u=Math.max(0,...l.map(({key:E})=>E.bbox.width))+kn*2,d=Math.max(0,...l.map(({value:E})=>E.bbox.width))+kn*2,f=o.width+kn*2,m=Math.max(f,u+d),y=d+Math.max(0,m-u-d),C=o.height+td*2,x=l.map(({key:E,value:M})=>Math.max(E.bbox.height,M.bbox.height)+td*2),b=C+x.reduce((E,M)=>E+M,0),k=iT(a.get("stroke-width")),T=m+k*2,B=b+k*2,L=-m/2,A=-b/2,F=t.look==="handDrawn"?pt.svg(n):void 0,z=F?ft(t,{}):void 0,q=p((E,M,v,R,O,X)=>{if(F&&z){const Z=F.rectangle(v,R,O,X,z);return E.insert(()=>Z,":first-child").attr("class",M)}return E.insert("rect",":first-child").attr("class",M).attr("x",v).attr("y",R).attr("width",O).attr("height",X).attr("style",s)},"insertCell"),D=q(n,"label-container usecase-json-border",-T/2,-B/2,T,B);q(h,"usecase-json-cell usecase-json-title-cell",L,A,m,C),(W=h.node())==null||W.append(c.node()),wn(c,o,0,A+C/2);let rt=A+C;return l.forEach(({key:E,value:M},v)=>{var X;const R=x[v],O=h.append("g").attr("class","usecase-json-row").attr("data-row-index",v).attr("transform",`translate(0,${rt})`);q(O,"usecase-json-cell usecase-json-key-cell",L,0,u,R),q(O,"usecase-json-cell usecase-json-value-cell",L+u,0,y,R),(X=O.node())==null||X.append(E.label.node(),M.label.node()),wn(E.label,E.bbox,L+u/2,R/2),wn(M.label,M.bbox,L+u+y/2,R/2),rt+=R}),xt(t,D),t.intersect=E=>ut.rect(t,E),n}p(Yg,"usecaseJsonTable");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*o,10));const{shapeSvg:c,bbox:h,label:l}=await vt(e,t,Bt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*o,d=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,f=u-2*o,m=d-2*o,y=-f/2,C=-m/2,{cssStyles:x}=t,b=pt.svg(c),k=ft(t,{}),T=[{x:y-o,y:C+o},{x:y-o,y:C+m+o},{x:y+f-o,y:C+m+o},{x:y+f-o,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C+m-o},{x:y+f+o,y:C+m-o},{x:y+f+o,y:C-o},{x:y+o,y:C-o},{x:y+o,y:C},{x:y,y:C},{x:y,y:C+o}],B=[{x:y,y:C+o},{x:y+f-o,y:C+o},{x:y+f-o,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Yt(T);let A=b.path(L,k);const F=Yt(B);let z=b.path(F,k);t.look!=="handDrawn"&&(A=al(A),z=al(z));const q=c.insert("g",":first-child");return q.insert(()=>A),q.insert(()=>z),q.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(h.width/2)-o-(h.x-(h.left??0))}, ${-(h.height/2)+o-(h.y-(h.top??0))})`),xt(t,q),t.intersect=function(D){return ut.polygon(t,T,D)},c}p(Ug,"multiRect");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,Bt(t)),o=t.padding??0,c=t.look==="neo"?16:o,h=t.look==="neo"?12:o;let l=!0;(t.width||t.height)&&(l=!1,t.width=((t==null?void 0:t.width)??0)-c*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+c*2,d=Math.max(a.height,(t==null?void 0:t.height)??0)+h*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:b}=t,k=Hr(y-x,C+m+x,y+u-x,C+m+x,f,.8),T=k==null?void 0:k[k.length-1],B=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...k,{x:y+u-x,y:T.y-x},{x:y+u,y:T.y-x},{x:y+u,y:T.y-2*x},{x:y+u+x,y:T.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:T.y-x},{x:y+u,y:T.y-x},{x:y+u,y:C},{x:y,y:C}],A=pt.svg(s),F=ft(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const z=Yt(B),q=A.path(z,F),D=Yt(L),rt=A.path(D,F),W=s.insert(()=>q,":first-child");return W.insert(()=>rt),W.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-f/2})`),n.attr("transform",`translate(${-(a.width/2)-x-(a.x-(a.left??0))}, ${-(a.height/2)+x-f-(a.y-(a.top??0))})`),xt(t,W),t.intersect=function(E){return ut.polygon(t,B,E)},s}p(jg,"multiWaveEdgedRectangle");async function Gg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i,t.useHtmlLabels||ue(Qt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,Bt(t)),h=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,d=-l/2,{cssStyles:f}=t,m=pt.svg(n),y=ft(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(u,d,h,l,y),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),c.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),xt(t,x),t.intersect=function(b){return ut.rect(t,b)},n}p(Gg,"note");var sT=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 Xg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await vt(e,t,Bt(t)),n=a.width+(t.padding??0),o=a.height+(t.padding??0),c=n+o,h=.5,l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=pt.svg(s),m=ft(t,{}),y=sT(0,0,c),C=f.path(y,m);u=s.insert(()=>C,":first-child").attr("transform",`translate(${-c/2+h}, ${c/2})`),d&&u.attr("style",d)}else u=ur(s,c,c,l),u.attr("transform",`translate(${-c/2+h}, ${c/2})`);return i&&u.attr("style",i),xt(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}];return ut.polygon(f,C,m)},t.intersect=function(f){return this.calcIntersect(t,f)},s}p(Xg,"question");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,n=t.look==="neo"?12:s??0,{shapeSvg:o,bbox:c,label:h}=await vt(e,t,Bt(t)),l=c.width+(t.look==="neo"?a*2:a),u=Math.max(c.height+(t.look==="neo"?n*2:n),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:b}=t,k=pt.svg(o),T=ft(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=Yt(x),L=k.path(B,T),A=o.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-C/2},0)`),h.attr("transform",`translate(${-C/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),xt(t,A),t.intersect=function(F){return ut.polygon(t,x,F)},o}p(Vg,"rect_left_inv_arrow");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),c=t.description,h=t.label,l=await kr(o,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(ue(Rt())){const F=l.children[0],z=Pt(l);u=F.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}J.info("Text 2",c);const d=c||[],f=l.getBBox(),m=await kr(o,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),y=m.children[0],C=Pt(m);u=y.getBoundingClientRect(),C.attr("width",u.width),C.attr("height",u.height);const x=(t.padding||0)/2;Pt(m).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),Pt(l).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),T=-u.width/2-x,B=-u.height/2-x;let L,A;if(t.look==="handDrawn"){const F=pt.svg(a),z=ft(t,{}),q=F.path(De(T,B,b,k,t.rx||0),z),D=F.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,z);A=a.insert(()=>(J.debug("Rough node insert CXC",q),D),":first-child"),L=a.insert(()=>(J.debug("Rough node insert CXC",q),q),":first-child")}else L=n.insert("rect",":first-child"),A=n.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)),A.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 xt(t,L),t.intersect=function(F){return ut.rect(t,F)},a}p(Zg,"rectWithTitle");async function Kg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Xi(e,t,s)}p(Kg,"roundedRect");var Ur=8;async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:c}=await vt(e,t,Bt(t)),h=((t==null?void 0:t.width)??o.width)+s*2+(t.look==="neo"?Ur:Ur*2),l=((t==null?void 0:t.height)??o.height)+a*2,u=h-Ur,d=l,f=Ur-h/2,m=-l/2,{cssStyles:y}=t,C=pt.svg(n),x=ft(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:f,y:m},{x:f+u,y:m},{x:f+u,y:m+d},{x:f-Ur,y:m+d},{x:f-Ur,y:m},{x:f,y:m},{x:f,y:m+d}],k=C.polygon(b.map(B=>[B.x,B.y]),x),T=n.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path").attr("style",ne(y)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),c.attr("transform",`translate(${Ur/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),xt(t,T),t.intersect=function(B){return ut.rect(t,B)},n}p(Qg,"shadedProcess");async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,Bt(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2)*1.5,d=l,f=u/1.5,m=-d/2,y=-f/2,{cssStyles:C}=t,x=pt.svg(o),b=ft(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y},{x:m,y:y+f},{x:m+d,y:y+f},{x:m+d,y:y-f/2}],T=Yt(k),B=x.path(T,b),L=o.insert(()=>B,":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})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))}, ${-f/4+(t.padding??0)-(c.y-(c.top??0))})`),xt(t,L),t.intersect=function(A){return ut.polygon(t,k,A)},o}p(Jg,"slopedRect");async function tm(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s},n=await Xi(e,t,a);if(t.colorIndex!==void 0){const{theme:o,themeVariables:c}=Rt();He(n,t.colorIndex,o,c.borderColorArray)}return n}p(tm,"squareRect");var ll=50,aT=p((e,t,r)=>{const i=e.height+r,s=i*Math.cos(Math.PI/(2*(ll-1))),a=Math.sqrt(Math.max(0,s**2-e.height**2));return{w:Math.max(e.width+i/4+t,1.5*i+(i-s),e.width+t+i-a),h:i}},"stadiumDimensions");async function em(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?40:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),{w:h,h:l}=aT(c,a,n),u=l/2,{cssStyles:d}=t,f=pt.svg(o),m=ft(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+u,y:-l/2},{x:h/2-u,y:-l/2},...sr(-h/2+u,0,u,ll,90,270),{x:h/2-u,y:l/2},...sr(h/2-u,0,u,ll,270,450)],C=Yt(y),x=f.path(C,m),b=o.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),xt(t,b),t.intersect=function(k){return ut.polygon(t,y,k)},o}p(em,"stadium");async function rm(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Xi(e,t,r)}p(rm,"state");function im(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:n,stateBorder:o,nodeBorder:c,nodeShadow:h}=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=pt.svg(l),d=ft(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=u.circle(0,0,t.width,{...d,stroke:n,strokeWidth:2}),m=o??c,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"),a&&x.selectAll("path").attr("style",a),s&&x.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const T=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",B=T?`${T}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${B})`)}return xt(t,x),t.intersect=function(T){return ut.circle(t,(t.width??0)/2,T)},l}p(im,"stateEnd");function sm(e,t,{config:{themeVariables:r}}){var o,c;const{lineColor:i,nodeShadow:s}=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 a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const l=pt.svg(a).circle(0,0,t.width,U1(i));n=a.insert(()=>l),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((c=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:c.id)??"",l=h?`${h}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${l})`)}return xt(t,n),t.intersect=function(h){return ut.circle(t,(t.width??7)/2,h)},a}p(sm,"stateStart");var gi=8;async function am(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),h=Math.max(c.width+2*gi+a,t.width??0),l=Math.max(c.height+n,t.height??0),u=h-2*gi,d=l,f=-h/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=pt.svg(o),x=ft(t,{}),b=C.rectangle(f,m,u+16,d,x),k=C.line(f+gi,m,f+gi,m+d,x),T=C.line(f+gi+u,m,f+gi+u,m+d,x);o.insert(()=>k,":first-child"),o.insert(()=>T,":first-child");const B=o.insert(()=>b,":first-child"),{cssStyles:L}=t;B.attr("class","basic label-container").attr("style",ne(L)),xt(t,B)}else{const C=ur(o,u,d,y);i&&C.attr("style",i),xt(t,C)}return t.intersect=function(C){return ut.polygon(t,y,C)},o}p(am,"subroutine");var Sn=.2;async function om(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Sn*(t.height+n*2),10));const{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,l=Sn*h,u=Sn*h,f=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+l-l,m=h,y=-f/2,C=-m/2,{cssStyles:x}=t,b=pt.svg(o),k=ft(t,{}),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}],B=[{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"&&(k.roughness=0,k.fillStyle="solid");const L=Yt(T),A=b.path(L,k),F=Yt(B),z=b.path(F,{...k,fillStyle:"solid"}),q=o.insert(()=>z,":first-child");return q.insert(()=>A,":first-child"),q.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),xt(t,q),t.intersect=function(D){return ut.polygon(t,T,D)},o}p(om,"taggedRect");async function nm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,Bt(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/8,l=.2*o,u=.2*c,d=c+h,{cssStyles:f}=t,m=pt.svg(s),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-o/2-o/2*.1,y:d/2},...Hr(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,h,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],x=-o/2+o/2*.1,b=-d/2-u*.4,k=[{x:x+o-l,y:(b+c)*1.3},{x:x+o,y:b+c-u},{x:x+o,y:(b+c)*.9},...Hr(x+o,(b+c)*1.25,x+o-l,(b+c)*1.3,-c*.02,.5)],T=Yt(C),B=m.path(T,y),L=Yt(k),A=m.path(L,{...y,fillStyle:"solid"}),F=s.insert(()=>A,":first-child");return F.insert(()=>B,":first-child"),F.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),xt(t,F),t.intersect=function(z){return ut.polygon(t,C,z)},s}p(nm,"taggedWaveEdgedRectangle");async function lm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await vt(e,t,Bt(t)),n=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),c=-n/2,h=-o/2,l=s.insert("rect",":first-child");return l.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",n).attr("height",o),xt(t,l),t.intersect=function(u){return ut.rect(t,u)},s}p(lm,"text");var oT=p((e,t,r,i,s,a)=>`M${e},${t}
235
+ a${s},${a} 0,0,1 0,${-i}
236
+ l${r},0
237
+ a${s},${a} 0,0,1 0,${i}
238
+ M${r},${-i}
239
+ a${s},${a} 0,0,0 0,${i}
240
+ l${-r},0`,"createCylinderPathD"),nT=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),lT=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),ed=5,rd=10;async function hm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,n=t.height??0;if(t.height&&(t.height=t.height-a,t.height<ed&&(t.height=ed)),t.width){const x=n/2/(2.5+n/50);t.width=t.width-a-x*3,t.width<rd&&(t.width=rd)}const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,Bt(t)),l=Math.max(t.height??0,c.height)+a,u=l/2,d=u/(2.5+l/50),f=Math.max(t.width??0,c.width)+d+a,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=pt.svg(o),x=nT(0,0,f,l,d,u),b=lT(0,0,f,l,d,u),k=C.path(x,ft(t,{})),T=C.path(b,ft(t,{fill:"none"}));y=o.insert(()=>T,":first-child"),y=o.insert(()=>k,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=oT(0,0,f,l,d,u);y=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",ne(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} )`),h.attr("transform",`translate(${-(c.width/2)-d-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),xt(t,y),t.intersect=function(C){const x=ut.rect(t,C),b=x.y-(t.y??0);if(u!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let k=d*d*(1-b*b/(u*u));k!=0&&(k=Math.sqrt(Math.abs(k))),k=d-k,C.x-(t.x??0)>0&&(k=-k),x.x+=k}return x},o}p(hm,"tiltedCylinder");async function cm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),u=[{x:-3*h/6,y:0},{x:l+3*h/6,y:0},{x:l,y:-h},{x:0,y:-h}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=ft(t,{}),C=Yt(u),x=m.path(C,y);d=o.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),f&&d.attr("style",f)}else d=ur(o,l,h,u);return i&&d.attr("style",i),t.width=l,t.height=h,xt(t,d),t.intersect=function(m){return ut.polygon(t,u,m)},o}p(cm,"trapezoid");async function um(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=15,c=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<c&&(t.height=c),t.width=(t.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:l}=await vt(e,t,Bt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,{cssStyles:f}=t,m=pt.svg(h),y=ft(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=Yt(C),b=m.path(x,y),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),xt(t,k),t.intersect=function(T){return ut.polygon(t,C,T)},h}p(um,"trapezoidalPentagon");var id=10,sd=10;async function dm(e,t){var T;const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<sd&&(t.width=sd),t.height=(t==null?void 0:t.height)??0,t.height<id&&(t.height=id));const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,Bt(t)),h=hr((T=Rt().flowchart)==null?void 0:T.htmlLabels),l=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:l+o.height,d=u,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:m}=t,y=pt.svg(n),C=ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Yt(f),b=y.path(x,C),k=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=l,t.height=u,xt(t,k),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${u/2-(o.height+(t.padding??0)/(h?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(B){return J.info("Triangle intersect",t,f,B),ut.polygon(t,f,B)},n}p(dm,"triangle");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:c,bbox:h,label:l}=await vt(e,t,Bt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,f=t.look==="neo"?d/4:d/8,m=d+(o?f:-f),{cssStyles:y}=t,x=14-u,b=x>0?x/2:0,k=pt.svg(c),T=ft(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=[{x:-u/2-b,y:m/2},...Hr(-u/2-b,m/2,u/2+b,m/2,f,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],L=Yt(B),A=k.path(L,T),F=c.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-f/2})`),l.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-d/2+(t.padding??0)-f-(h.y-(h.top??0))})`),xt(t,F),t.intersect=function(z){return ut.polygon(t,B,z)},c}p(fm,"waveEdgedRectangle");async function pm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:o,bbox:c}=await vt(e,t,Bt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,l=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n,u=l/8,d=l+u*2,{cssStyles:f}=t,m=pt.svg(o),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2,y:d/2},...Hr(-h/2,d/2,h/2,d/2,u,1),{x:h/2,y:-d/2},...Hr(h/2,-d/2,-h/2,-d/2,u,-1)],x=Yt(C),b=m.path(x,y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),xt(t,k),t.intersect=function(T){return ut.polygon(t,C,T)},o}p(pm,"waveRectangle");var te=10;async function gm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-te,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-te,10));const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,Bt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s*2+te,l=(t!=null&&t.height?t==null?void 0:t.height:o.height)+a*2+te,u=h-te,d=l-te,f=-u/2,m=-d/2,{cssStyles:y}=t,C=pt.svg(n),x=ft(t,{}),b=[{x:f-te,y:m-te},{x:f-te,y:m+d},{x:f+u,y:m+d},{x:f+u,y:m-te}],k=`M${f-te},${m-te} L${f+u},${m-te} L${f+u},${m+d} L${f-te},${m+d} L${f-te},${m-te}
241
+ M${f-te},${m} L${f+u},${m}
242
+ M${f},${m-te} L${f},${m+d}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const T=C.path(k,x),B=n.insert(()=>T,":first-child");return B.attr("transform",`translate(${te/2}, ${te/2})`),B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(o.width/2)+te/2-(o.x-(o.left??0))}, ${-(o.height/2)+te/2-(o.y-(o.top??0))})`),xt(t,B),t.intersect=function(L){return ut.polygon(t,b,L)},n}p(gm,"windowPane");var ad=new Set(["redux-color","redux-dark-color"]),hT=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Bh(e,t){var yt,At,Dt,_t;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Qt(),{rowEven:a,rowOdd:n,nodeBorder:o,borderColorArray:c}=s;if(t.look==="handDrawn"){const{themeVariables:ct}=Qt(),{background:Ct}=ct,Et={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ct}`]};await Bh(e,Et)}const h=Qt();t.useHtmlLabels=h.htmlLabels;let l=((yt=h.er)==null?void 0:yt.diagramPadding)??10,u=((At=h.er)==null?void 0:At.entityPadding)??6;const{cssStyles:d}=t,{labelStyles:f,nodeStyles:m}=mt(t);if(r.attributes.length===0&&t.label){const ct={rx:0,ry:0,labelPaddingX:l,labelPaddingY:l*1.5};_r(t.label,h)+ct.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const Ct=await Xi(e,t,ct);if(i!=null&&ad.has(i)){const Et=r.colorIndex??0;Ct.attr("data-color-id",`color-${Et%c.length}`)}if(!hr(h.htmlLabels)){const Et=Ct.select("text"),Nt=(Dt=Et.node())==null?void 0:Dt.getBBox();Et.attr("transform",`translate(${-Nt.width/2}, 0)`)}return Ct}h.htmlLabels||(l*=1.25,u*=1.25);let y=Bt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await yi(C,t.label??"",h,0,0,["name"],f);x.height+=u;let b=0;const k=[],T=[];let B=0,L=0,A=0,F=0,z=!0,q=!0;for(const ct of r.attributes){const Ct=await yi(C,ct.type,h,0,b,["attribute-type"],f);B=Math.max(B,Ct.width+l);const Et=await yi(C,ct.name,h,0,b,["attribute-name"],f);L=Math.max(L,Et.width+l);const Nt=await yi(C,ct.keys.join(),h,0,b,["attribute-keys"],f);A=Math.max(A,Nt.width+l);const Gt=await yi(C,ct.comment,h,0,b,["attribute-comment"],f);F=Math.max(F,Gt.width+l);const H=Math.max(Ct.height,Et.height,Nt.height,Gt.height)+u;T.push({yOffset:b,rowHeight:H}),b+=H}let D=4;A<=l&&(z=!1,A=0,D--),F<=l&&(q=!1,F=0,D--);const rt=C.node().getBBox();if(x.width+l*2-(B+L+A+F)>0){const ct=x.width+l*2-(B+L+A+F);B+=ct/D,L+=ct/D,A>0&&(A+=ct/D),F>0&&(F+=ct/D)}const W=B+L+A+F,E=pt.svg(C),M=ft(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let v=0;T.length>0&&(v=T.reduce((ct,Ct)=>ct+((Ct==null?void 0:Ct.rowHeight)??0),0));const R=Math.max(rt.width+l*2,(t==null?void 0:t.width)||0,W),O=Math.max((v??0)+x.height,(t==null?void 0:t.height)||0),X=-R/2,Z=-O/2;if(C.selectAll("g:not(:first-child)").each((ct,Ct,Et)=>{const Nt=Pt(Et[Ct]),Gt=Nt.attr("transform");let H=0,kt=0;if(Gt){const Ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Gt);Ht&&(H=parseFloat(Ht[1]),kt=parseFloat(Ht[2]),Nt.attr("class").includes("attribute-name")?H+=B:Nt.attr("class").includes("attribute-keys")?H+=B+L:Nt.attr("class").includes("attribute-comment")&&(H+=B+L+A))}Nt.attr("transform",`translate(${X+l/2+H}, ${kt+Z+x.height+u/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(Z+u/2)+")"),i!=null&&ad.has(i)){const ct=r.colorIndex??0;C.attr("data-color-id",`color-${ct%c.length}`)}const lt=E.rectangle(X,Z,R,O,M),ht=C.insert(()=>lt,":first-child").attr("class","outer-path").attr("style",d.join(""));k.push(0);for(const[ct,Ct]of T.entries()){const Nt=(ct+1)%2===0&&Ct.yOffset!==0,Gt=E.rectangle(X,x.height+Z+(Ct==null?void 0:Ct.yOffset),R,Ct==null?void 0:Ct.rowHeight,{...M,fill:Nt?a:n,stroke:o});C.insert(()=>Gt,"g.label").attr("style",d.join("")).attr("class",`row-rect-${Nt?"even":"odd"}`)}const dt=1e-4;let bt=xi(X,x.height+Z,R+X,x.height+Z,dt),St=E.polygon(bt.map(ct=>[ct.x,ct.y]),M);if(C.insert(()=>St).attr("class","divider"),bt=xi(B+X,x.height+Z,B+X,O+Z,dt),St=E.polygon(bt.map(ct=>[ct.x,ct.y]),M),C.insert(()=>St).attr("class","divider"),z){const ct=B+L+X;bt=xi(ct,x.height+Z,ct,O+Z,dt),St=E.polygon(bt.map(Ct=>[Ct.x,Ct.y]),M),C.insert(()=>St).attr("class","divider")}if(q){const ct=B+L+A+X;bt=xi(ct,x.height+Z,ct,O+Z,dt),St=E.polygon(bt.map(Ct=>[Ct.x,Ct.y]),M),C.insert(()=>St).attr("class","divider")}for(const ct of k){const Ct=x.height+Z+ct;bt=xi(X,Ct,R+X,Ct,dt),St=E.polygon(bt.map(Et=>[Et.x,Et.y]),M),C.insert(()=>St).attr("class","divider")}if(xt(t,ht),m&&t.look!=="handDrawn")if(i!=null&&hT.has(i))C.selectAll("path").attr("style",m);else{const ct=m.split(";"),Ct=(_t=ct==null?void 0:ct.filter(Et=>Et.includes("stroke")))==null?void 0:_t.map(Et=>`${Et}`).join("; ");C.selectAll("path").attr("style",Ct??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(ct){return ut.rect(t,ct)},C}p(Bh,"erBox");async function yi(e,t,r,i=0,s=0,a=[],n=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",n);t!==fc(t)&&(t=fc(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const c=o.node().appendChild(await Ie(o,t,{width:_r(t,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let l=c.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 h=c.getBBox();if(hr(r.htmlLabels)){const l=c.children[0];l.style.textAlign="start";const u=Pt(c);h=l.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}p(yi,"addText");function xi(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(xi,"lineToPolygon");async function mm(e,t,r,i,s=r.class.padding??12){const a=i?0:3,n=e.insert("g").attr("class",Bt(t)).attr("id",t.domId||t.id);let o=null,c=null,h=null,l=null,u=0,d=0,f=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ys(o,{text:`«${b}»`},0),u=o.node().getBBox().height}c=n.insert("g").attr("class","label-group text"),await ys(c,t,0,["font-weight: bolder"]);const m=c.node().getBBox();d=m.height,h=n.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await ys(h,b,y,[b.parseClassifier()]);y+=k+a}f=h.node().getBBox().height,f<=0&&(f=s/2),l=n.insert("g").attr("class","methods-group text");let C=0;for(const b of t.methods){const k=await ys(l,b,C,[b.parseClassifier()]);C+=k+a}let x=n.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-m.width/2}, ${u})`),x=n.node().getBBox(),h.attr("transform",`translate(0, ${u+d+s*2})`),x=n.node().getBBox(),l.attr("transform",`translate(0, ${u+d+(f?f+s*4:s*2)})`),x=n.node().getBBox(),{shapeSvg:n,bbox:x}}p(mm,"textHelper");async function ys(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Qt();let n="useHtmlLabels"in t?t.useHtmlLabels:hr(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),Ls(o)&&(n=!0);const c=await Ie(s,wl(Wr(o)),{width:_r(o,a)+50,classes:"markdown-node-label",useHtmlLabels:n},a);let h,l=1;if(n){const u=c.children[0],d=Pt(c);l=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(l+=u.innerHTML.split("<mrow>").length-1),await kh(u),h=u.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}else{i.includes("font-weight: bolder")&&Pt(c).selectAll("tspan").attr("font-weight",""),l=c.children.length;const u=c.children[0];(c.textContent===""||c.textContent.includes("&gt"))&&(u.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=c.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*l)+r)+")"),h.height}p(ys,"addText");async function ym(e,t){var v,R;const r=Rt(),{theme:i,themeVariables:s}=r,{useGradient:a,borderColorArray:n}=s,o=r.class.padding??12,c=o,h=t.useHtmlLabels??hr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:d}=await mm(e,t,r,h,c);He(u,t.colorIndex,i,n);const{labelStyles:f,nodeStyles:m}=mt(t);t.labelStyle=f,t.cssStyles=l.styles||"";const y=((v=l.styles)==null?void 0:v.join(";"))||m||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const C=l.members.length===0&&l.methods.length===0&&!((R=r.class)!=null&&R.hideEmptyMembersBox),x=pt.svg(u),b=ft(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=Math.max(t.width??0,d.width);let T=Math.max(t.height??0,d.height);const B=(t.height??0)>d.height;l.members.length===0&&l.methods.length===0?T+=c:l.members.length>0&&l.methods.length===0&&(T+=c*2);const L=-k/2,A=-T/2;let F=C?o*2:l.members.length===0&&l.methods.length===0?-o:0;B&&(F=o*2);const z=x.rectangle(L-o,A-o-(C?o:l.members.length===0&&l.methods.length===0?-o/2:0),k+2*o,T+2*o+F,b),q=u.insert(()=>z,":first-child");q.attr("class","basic label-container outer-path");const D=q.node().getBBox(),rt=u.select(".annotation-group").node().getBBox().height-(C?o/2:0)||0,W=u.select(".label-group").node().getBBox().height-(C?o/2:0)||0,E=u.select(".members-group").node().getBBox().height-(C?o/2:0)||0,M=(rt+W+A+o-(A-o-(C?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(u.selectAll(".text").each((O,X,Z)=>{var yt,At;const lt=Pt(Z[X]),ht=lt.attr("transform");let dt=0;if(ht){const _t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ht);_t&&(dt=parseFloat(_t[2]))}let bt=dt+A+o-(C?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(lt.attr("class").includes("methods-group")){const Dt=Math.max(E,c/2);B?bt=Math.max(M,rt+W+Dt+A+c*2+o)+c*2:bt=rt+W+Dt+A+c*4+o}l.members.length===0&&l.methods.length===0&&((yt=r.class)!=null&&yt.hideEmptyMembersBox)&&(l.annotations.length>0?bt=dt-c:bt=dt),h||(bt-=4);let St=L;(lt.attr("class").includes("label-group")||lt.attr("class").includes("annotation-group"))&&(St=-((At=lt.node())==null?void 0:At.getBBox().width)/2||0,u.selectAll("text").each(function(Dt,_t,ct){window.getComputedStyle(ct[_t]).textAnchor==="middle"&&(St=0)})),lt.attr("transform",`translate(${St}, ${bt})`)}),l.members.length>0||l.methods.length>0||C){const O=rt+W+A+o,X=x.line(D.x,O,D.x+D.width,O+.001,b);u.insert(()=>X).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(C||l.members.length>0||l.methods.length>0){const O=rt+W+E+A+c*2+o,X=x.line(D.x,B?Math.max(M,O):O,D.x+D.width,(B?Math.max(M,O):O)+.001,b);u.insert(()=>X).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(l.look!=="handDrawn"&&u.selectAll("path").attr("style",y),q.select(":nth-child(2)").attr("style",y),u.selectAll(".divider").select("path").attr("style",y),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",y),!h){const O=RegExp(/color\s*:\s*([^;]*)/),X=O.exec(y);if(X){const Z=X[0].replace("color","fill");u.selectAll("tspan").attr("style",Z)}else if(f){const Z=O.exec(f);if(Z){const lt=Z[0].replace("color","fill");u.selectAll("tspan").attr("style",lt)}}}return xt(t,q),t.intersect=function(O){return ut.rect(t,O)},u}p(ym,"classBox");async function xm(e,t){var D,rt;const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t,a=t,n=20,o=20,c="verifyMethod"in t,h=Bt(t),l=Rt(),{themeVariables:u}=l,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,m=l.layout==="elk"?"start":"center",y=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let C;c?C=await rr(y,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):C=await rr(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const b=await rr(y,s.name,x,t.labelStyle+"; font-weight: bold;");if(x+=b+o,c){const W=await rr(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,x,t.labelStyle,m);x+=W;const E=await rr(y,`${s.text?`Text: ${s.text}`:""}`,x,t.labelStyle,m);x+=E;const M=await rr(y,`${s.risk?`Risk: ${s.risk}`:""}`,x,t.labelStyle,m);x+=M,await rr(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const W=await rr(y,`${a.type?`Type: ${a.type}`:""}`,x,t.labelStyle,m);x+=W,await rr(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,x,t.labelStyle,m)}const k=(((D=y.node())==null?void 0:D.getBBox().width)??200)+n,T=(((rt=y.node())==null?void 0:rt.getBBox().height)??200)+n,B=-k/2,L=-T/2,A=pt.svg(y),F=ft(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const z=A.rectangle(B,L,k,T,F),q=y.insert(()=>z,":first-child");if(q.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const W=t.colorIndex??0;y.attr("data-color-id",`color-${W%d.length}`)}if(y.selectAll(".label").each((W,E,M)=>{const v=Pt(M[E]),R=v.attr("transform");let O=0,X=0;if(R){const dt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);dt&&(O=parseFloat(dt[1]),X=parseFloat(dt[2]))}const Z=X-T/2;let lt=B+n/2;(E===0||E===1)&&(lt=O),v.attr("transform",`translate(${lt}, ${Z+n})`)}),x>C+b+o){const W=L+C+b+o;let E;if(t.look==="neo"){const R=[[B,W],[B+k,W],[B+k,W+.001],[B,W+.001]];E=A.polygon(R,F)}else E=A.line(B,W,B+k,W,F);y.insert(()=>E).attr("class","divider")}return xt(t,q),t.intersect=function(W){return ut.rect(t,W)},i&&t.look!=="handDrawn"&&(f||d!=null&&d.length)&&y.selectAll("path").attr("style",i),y}p(xm,"requirementBox");async function rr(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=Rt(),o=n.htmlLabels??!0,c=await Ie(a,wl(Wr(t)),{width:_r(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let h;if(o){const l=c.children[0],u=Pt(c);s==="start"&&Pt(l).style("text-align","left"),h=l.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}else{const l=c.children[0];for(const u of l.children)i&&u.setAttribute("style",i);if(s==="start"){l.setAttribute("text-anchor","start");for(const u of l.children)u.setAttribute("text-anchor","start")}h=c.getBBox(),h.height+=6}return a.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}p(rr,"addText");var cT=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 Cm(e,t,{config:r}){var rt,W;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i||"";const a=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,Bt(t)),l=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&((rt=r==null?void 0:r.kanban)!=null&&rt.ticketBaseUrl)&&(u=(W=r==null?void 0:r.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.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 Qr(d,"ticket"in t&&t.ticket||"",f):{label:m,bbox:y}=await Qr(o,"ticket"in t&&t.ticket||"",f);const{label:C,bbox:x}=await Qr(o,"assigned"in t&&t.assigned||"",f);t.width=n;const b=10,k=(t==null?void 0:t.width)||0,T=Math.max(y.height,x.height)/2,B=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+T,L=-k/2,A=-B/2;h.attr("transform","translate("+(l-k/2)+", "+(-T-c.height/2)+")"),m.attr("transform","translate("+(l-k/2)+", "+(-T+c.height/2)+")"),C.attr("transform","translate("+(l+k/2-x.width-2*a)+", "+(-T+c.height/2)+")");let F;const{rx:z,ry:q}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const E=pt.svg(o),M=ft(t,{}),v=z||q?E.path(De(L,A,k,B,z||0),M):E.rectangle(L,A,k,B,M);F=o.insert(()=>v,":first-child"),F.attr("class","basic label-container").attr("style",D||null)}else{F=o.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",q??5).attr("x",L).attr("y",A).attr("width",k).attr("height",B);const E="priority"in t&&t.priority;if(E){const M=o.append("line"),v=L+2,R=A+Math.floor((z??0)/2),O=A+B-Math.floor((z??0)/2);M.attr("x1",v).attr("y1",R).attr("x2",v).attr("y2",O).attr("stroke-width","4").attr("stroke",cT(E))}}return xt(t,F),t.height=B,t.intersect=function(E){return ut.rect(t,E)},o}p(Cm,"kanbanItem");async function bm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await vt(e,t,Bt(t)),c=a.width+10*n,h=a.height+8*n,l=.15*c,{cssStyles:u}=t,d=a.width+20,f=a.height+20,m=Math.max(c,d),y=Math.max(h,f);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let C;const x=`M0 0
243
+ a${l},${l} 1 0,0 ${m*.25},${-1*y*.1}
244
+ a${l},${l} 1 0,0 ${m*.25},0
245
+ a${l},${l} 1 0,0 ${m*.25},0
246
+ a${l},${l} 1 0,0 ${m*.25},${y*.1}
247
+
248
+ a${l},${l} 1 0,0 ${m*.15},${y*.33}
249
+ a${l*.8},${l*.8} 1 0,0 0,${y*.34}
250
+ a${l},${l} 1 0,0 ${-1*m*.15},${y*.33}
251
+
252
+ a${l},${l} 1 0,0 ${-1*m*.25},${y*.15}
253
+ a${l},${l} 1 0,0 ${-1*m*.25},0
254
+ a${l},${l} 1 0,0 ${-1*m*.25},0
255
+ a${l},${l} 1 0,0 ${-1*m*.25},${-1*y*.15}
256
+
257
+ a${l},${l} 1 0,0 ${-1*m*.1},${-1*y*.33}
258
+ a${l*.8},${l*.8} 1 0,0 0,${-1*y*.34}
259
+ a${l},${l} 1 0,0 ${m*.1},${-1*y*.33}
260
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=pt.svg(s),k=ft(t,{}),T=b.path(x,k);C=s.insert(()=>T,":first-child"),C.attr("class","basic label-container").attr("style",ne(u))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-m/2}, ${-y/2})`),xt(t,C),t.calcIntersect=function(b,k){return ut.rect(b,k)},t.intersect=function(b){return J.info("Bang intersect",t,b),ut.rect(t,b)},s}p(bm,"bang");async function km(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await vt(e,t,Bt(t)),c=a.width+2*n,h=a.height+2*n,l=.15*c,u=.25*c,d=.35*c,f=.2*c,{cssStyles:m}=t;let y;const C=`M0 0
261
+ a${l},${l} 0 0,1 ${c*.25},${-1*c*.1}
262
+ a${d},${d} 1 0,1 ${c*.4},${-1*c*.1}
263
+ a${u},${u} 1 0,1 ${c*.35},${c*.2}
264
+
265
+ a${l},${l} 1 0,1 ${c*.15},${h*.35}
266
+ a${f},${f} 1 0,1 ${-1*c*.15},${h*.65}
267
+
268
+ a${u},${l} 1 0,1 ${-1*c*.25},${c*.15}
269
+ a${d},${d} 1 0,1 ${-1*c*.5},0
270
+ a${l},${l} 1 0,1 ${-1*c*.25},${-1*c*.15}
271
+
272
+ a${l},${l} 1 0,1 ${-1*c*.1},${-1*h*.35}
273
+ a${f},${f} 1 0,1 ${c*.1},${-1*h*.65}
274
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=pt.svg(s),b=ft(t,{}),k=x.path(C,b);y=s.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",ne(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-c/2}, ${-h/2})`),xt(t,y),t.calcIntersect=function(x,b){return ut.rect(x,b)},t.intersect=function(x){return J.info("Cloud intersect",t,x),ut.rect(t,x)},s}p(km,"cloud");async function wm(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await vt(e,t,Bt(t)),c=a.width+8*n,h=a.height+2*n,l=5,u=t.look==="neo"?`
275
+ M${-c/2} ${h/2-l}
276
+ v${-h+2*l}
277
+ q0,-${l} ${l},-${l}
278
+ h${c-2*l}
279
+ q${l},0 ${l},${l}
280
+ v${h-l}
281
+ H${-c/2}
282
+ Z
283
+ `:`
284
+ M${-c/2} ${h/2-l}
285
+ v${-h+2*l}
286
+ q0,-${l} ${l},-${l}
287
+ h${c-2*l}
288
+ q${l},0 ${l},${l}
289
+ v${h-2*l}
290
+ q0,${l} ${-l},${l}
291
+ h${-(c-2*l)}
292
+ q${-l},0 ${-l},${-l}
293
+ Z
294
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>o.node()),xt(t,d),t.calcIntersect=function(f,m){return ut.rect(f,m)},t.intersect=function(f){return ut.rect(t,f)},s}p(wm,"defaultMindmapNode");async function Sm(e,t){const r={padding:t.padding??0};return Th(e,t,r)}p(Sm,"mindmapCircle");var uT=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Kg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:em},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:am},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:gg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:mg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:wg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Jp},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:ng},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ig},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:pg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Th},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:bm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:km},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Xg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:_g},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Ig},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Og},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:cm},{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:Mg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:lm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:sg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Qg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:sm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:im},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Sg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Bg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:cg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:ug},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:dg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Dg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:fm},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Tg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:hm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Pg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:fg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:yg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:dm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:gm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:bg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:um},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:kg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Jg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:jg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ug},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Qp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:hg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:nm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:om},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:pm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Vg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Rg}],dT=p(()=>{const t=[...Object.entries({state:rm,choice:ag,note:Gg,composite:og,rectWithTitle:Zg,labelRect:$g,block_arrow:rg,collapsedGroup:eg,iconSquare:Ag,iconCircle:Lg,icon:vg,iconRounded:Fg,imageSquare:Eg,anchor:Zp,kanbanItem:Cm,mindmapCircle:Sm,defaultMindmapNode:wm,classBox:ym,erBox:Bh,requirementBox:xm,usecaseActor:qg,usecaseActorHollow:Wg,usecaseActorAwesome:Ng,usecaseActorIcon:zg,usecaseBusiness:Hg,usecaseEllipse:Cg,usecaseJsonTable:Yg}),...uT.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Tm=dT();function fT(e){return e in Tm}p(fT,"isValidShape");var Hs=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),uo=new Map;async function _m(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Tm[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",ne(t.look)),t.tooltip&&s.attr("title",t.tooltip),uo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(_m,"insertNode");var zF=p((e,t)=>{uo.set(t.id,e)},"setNodeElem"),HF=p(()=>{uo.clear()},"clear"),YF=p(e=>{const t=uo.get(e.id);J.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"),pT=p(async(e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,h=o,{labelStyles:l,nodeStyles:u,borderStyles:d,backgroundStyles:f}=mt(t),m=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.domId??t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look);He(m,t.colorIndex,i,c);const y=hr(r.flowchart.htmlLabels),C=t.direction==="LR",x=m.insert("g").attr("class","cluster-label swimlane-label"),b=await Ie(x,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width});let k=b.getBBox();if(y){const M=b.children[0],v=Pt(b);k=M.getBoundingClientRect(),v.attr("width",k.width),v.attr("height",k.height)}const T=t.padding??0,B=t.width<=k.width+T?k.width+T:t.width;t.width<=k.width+T?t.diff=(B-t.width)/2-T:t.diff=-T;const L=t.height,A=t.y-L/2,F=t.y+L/2,z=t.x-B/2,q=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:A+L/3,D=C?4:0,rt=k.height+2*D;let W,E;if(C){const M=Math.max(rt,k.height+2*D),v=z+M,R=Math.max(0,B-M);if(t.look==="handDrawn"){const Z=pt.svg(m),lt=ft(t,{roughness:.7,fill:n,stroke:h,seed:a}),ht=ft(t,{roughness:.7,fill:"none",stroke:h,seed:a}),dt=Z.rectangle(z,A,M,L,lt);W=m.insert(()=>dt,":first-child").attr("class","swimlane-title");const bt=Z.rectangle(v,A,R,L,ht);E=m.insert(()=>bt,":first-child").attr("class","swimlane-body"),W.select("path:nth-child(2)").attr("style",d.join(";")),W.select("path").attr("style",f.join(";").replace("fill","stroke"))}else W=m.insert("rect",":first-child"),E=m.insert("rect",":first-child"),W.attr("class","swimlane-title").attr("style",u).attr("x",z).attr("y",A).attr("width",M).attr("height",L).attr("fill",n).attr("stroke",h),E.attr("class","swimlane-body").attr("style",u).attr("x",v).attr("y",A).attr("width",R).attr("height",L).attr("fill","none").attr("stroke",h);const O=z+M/2,X=t.y;x.attr("transform",`translate(${O}, ${X}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{const M=Math.max(0,q-A),v=Math.min(rt,M),R=A+v,O=Math.max(0,F-R),X=t.x-B/2;if(t.look==="handDrawn"){const ht=pt.svg(m),dt=ft(t,{roughness:.7,fill:n,stroke:h,fillWeight:3,seed:a}),bt=ft(t,{roughness:.7,fill:"none",stroke:h,seed:a}),St=ht.rectangle(X,A,B,v,dt);W=m.insert(()=>St,":first-child").attr("class","swimlane-title");const yt=ht.rectangle(X,R,B,O,bt);E=m.insert(()=>yt,":first-child").attr("class","swimlane-body"),W.select("path:nth-child(2)").attr("style",d.join(";")),W.select("path").attr("style",f.join(";").replace("fill","stroke"))}else W=m.insert("rect",":first-child"),E=m.insert("rect",":first-child"),W.attr("class","swimlane-title").attr("style",u).attr("x",X).attr("y",A).attr("width",B).attr("height",v).attr("fill",n).attr("stroke",h),E.attr("class","swimlane-body").attr("style",u).attr("x",X).attr("y",R).attr("width",B).attr("height",O).attr("fill","none").attr("stroke",h);const Z=t.x-k.width/2,lt=A+(v-k.height)/2;x.attr("transform",`translate(${Z}, ${lt})`)}if(J.trace("Swimlane data ",t,JSON.stringify(t)),l){const M=x.select("span");M&&M.attr("style",l)}return t.offsetX=0,t.width=B,t.height=L,t.offsetY=k.height-T/2,t.intersect=function(M){return Br(t,M)},{cluster:m,labelBBox:k}},"swimlane"),Bm=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,{labelStyles:h,nodeStyles:l,borderStyles:u,backgroundStyles:d}=mt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);He(f,t.colorIndex,i,c);const m=ue(r),y=f.insert("g").attr("class","cluster-label ");let C;t.labelType==="markdown"?C=await Ie(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}):C=await kr(y,t.label,t.labelStyle||"",!1,!0);let x=C.getBBox();if(ue(r)){const z=C.children[0],q=Pt(C);x=z.getBoundingClientRect(),q.attr("width",x.width),q.attr("height",x.height)}const b=t.width<=x.width+t.padding?x.width+t.padding:t.width;t.width<=x.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height,T=t.x-b/2,B=t.y-k/2;J.trace("Data ",t,JSON.stringify(t));let L;if(t.look==="handDrawn"){const z=pt.svg(f),q=ft(t,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),D=z.path(De(T,B,b,k,0),q);L=f.insert(()=>(J.debug("Rough node insert CXC",D),D),":first-child"),L.select("path:nth-child(2)").attr("style",u.join(";")),L.select("path").attr("style",d.join(";").replace("fill","stroke"))}else L=f.insert("rect",":first-child"),L.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",B).attr("width",b).attr("height",k);const{subGraphTitleTopMargin:A}=Hs(r);if(y.attr("transform",`translate(${t.x-x.width/2}, ${t.y-t.height/2+A})`),h){const z=y.select("span");z&&z.attr("style",h)}const F=L.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=x.height-t.padding/2,t.intersect=function(z){return Br(t,z)},{cluster:f,labelBBox:x}},"rect"),gT=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return Br(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),mT=p(async(e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:n,borderColorArray:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:l}=s,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);He(u,t.colorIndex,i,o);const d=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label");let m=u.append("rect");const y=await kr(f,t.label,t.labelStyle,void 0,!0);let C=y.getBBox();if(ue(r)){const D=y.children[0],rt=Pt(y);C=D.getBoundingClientRect(),rt.attr("width",C.width),rt.attr("height",C.height)}const x=0*t.padding,b=x/2,k=(t.width<=C.width+t.padding?C.width+t.padding:t.width)+x;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height+x,B=t.height+x-C.height-6,L=t.x-k/2,A=t.y-T/2;t.width=k;const F=t.y-t.height/2-b+C.height+2;let z;if(t.look==="handDrawn"){const D=t.cssClasses.includes("statediagram-cluster-alt"),rt=pt.svg(u),W=t.rx||t.ry?rt.path(De(L,A,k,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:l,seed:a}):rt.rectangle(L,A,k,T,{seed:a});z=u.insert(()=>W,":first-child");const E=rt.rectangle(L,F,k,B,{fill:D?n:c,fillStyle:D?"hachure":"solid",stroke:l,seed:a});z=u.insert(()=>W,":first-child"),m=u.insert(()=>E),z.attr("class","outer"),m.attr("class","inner")}else z=d.insert("rect",":first-child"),z.attr("class","outer").attr("x",L).attr("y",A).attr("width",k).attr("height",T).attr("data-look",t.look),m.attr("class","inner").attr("x",L).attr("y",F).attr("width",k).attr("height",B);f.attr("transform",`translate(${t.x-C.width/2}, ${A+1-(ue(r)?0:3)})`);const q=z.node().getBBox();return t.height=q.height,t.offsetX=0,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(D){return Br(t,D)},{cluster:u,labelBBox:C}},"roundedWithTitle"),yT=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Rt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:c,borderStyles:h,backgroundStyles:l}=mt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=ue(r),f=u.insert("g").attr("class","cluster-label "),m=await Ie(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let y=m.getBBox();if(ue(r)){const A=m.children[0],F=Pt(m);y=A.getBoundingClientRect(),F.attr("width",y.width),F.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,b=t.x-C/2,k=t.y-x/2;J.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const A=pt.svg(u),F=ft(t,{roughness:.7,fill:a,stroke:n,fillWeight:4,seed:s}),z=A.path(De(b,k,C,x,t.rx),F);T=u.insert(()=>(J.debug("Rough node insert CXC",z),z),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",l.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:B}=Hs(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),o){const A=f.select("span");A&&A.attr("style",o)}const L=T.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return Br(t,A)},{cluster:u,labelBBox:y}},"kanbanSection"),xT=p((e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:n,nodeBorder:o,borderColorArray:c}=s,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);He(h,t.colorIndex,i,c);const l=h.insert("g",":first-child"),u=0*t.padding,d=t.width+u;t.diff=-t.padding;const f=t.height+u,m=t.x-d/2,y=t.y-f/2;t.width=d;let C;if(t.look==="handDrawn"){const k=pt.svg(h).rectangle(m,y,d,f,{fill:n??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});C=h.insert(()=>k,":first-child").attr("class","divider")}else{C=l.insert("rect",":first-child");let b="outer";t.look,b="divider",C.attr("class",b).attr("x",m).attr("y",y).attr("width",d).attr("height",f).attr("data-look",t.look)}const x=C.node().getBBox();return t.height=x.height,t.offsetX=0,t.offsetY=0,t.intersect=function(b){return Br(t,b)},{cluster:h,labelBBox:{}}},"divider"),CT=p(async(e,t,r)=>{var B;J.info(`Creating ${r.cssClass} for `,t.id,t);const i=Rt(),{theme:s,themeVariables:a,handDrawnSeed:n}=i,{borderColorArray:o}=a,{labelStyles:c,borderStyles:h}=mt(t),l=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);He(l,t.colorIndex,s,o);const u=ue(i),d=l.insert("g").attr("class","cluster-label");let f={width:0,height:0};const m=(B=t.label)==null?void 0:B.trim();if(m){let L;if(t.labelType==="markdown"?L=await Ie(d,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width}):L=await kr(d,t.label,t.labelStyle||"",!1,!0),f=L.getBBox(),u){const A=L.children[0],F=Pt(L);f=A.getBoundingClientRect(),F.attr("width",f.width),F.attr("height",f.height)}}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,x=t.x-y/2,b=t.y-C/2;let k;if(t.look==="handDrawn"){const L=pt.svg(l),A=ft(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:n,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),F=L.path(De(x,b,y,C,r.rx),A);k=l.insert(()=>F,":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";"))}else k=l.insert("rect",":first-child"),k.attr("rx",r.rx).attr("ry",r.rx).attr("x",x).attr("y",b).attr("width",y).attr("height",C).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&k.attr("stroke-dasharray",r.strokeDash.join(", "));if(m){const{subGraphTitleTopMargin:L}=Hs(i);if(d.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+L})`),c){const A=d.select("span");A&&A.attr("style",c)}}const T=k.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=f.height-t.padding/2,t.intersect=function(L){return Br(t,L)},{cluster:l,labelBBox:f}},"createContainerGroup"),bT=p(async(e,t)=>{const{themeVariables:r}=Rt(),i=r.flowContainerStroke||r.secondaryBorderColor;return CT(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),kT=p((e,t)=>{const r=e.boundaryType||"rect",i=r==="package"?20:e.padding,s=r==="package"?t.height+10:0,a=Math.max(e.width,t.width+i),n=r==="package"?Math.max(e.height,s+e.padding*2):e.height,o=e.x-a/2,c=e.y-n/2;return{boundaryType:r,width:a,height:n,x:o,y:c,bodyY:c+s,bodyHeight:n-s,tabHeight:s,tabWidth:r==="package"?Math.min(a,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),wT=p(async(e,t)=>{var W;J.info("Creating usecase system boundary for ",t.id,t);const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,{labelStyles:h,nodeStyles:l}=mt(t),{stylesMap:u}=Yr(t),d=t.boundaryType||"rect",f=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${d} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",d).attr("data-look",t.look);He(f,t.colorIndex,i,c);const m=ue(r),y=f.insert("g").attr("class","cluster-label system-boundary-title"),C=await Ie(y,t.label,{style:h,useHtmlLabels:m,isNode:!0});let x=C.getBBox();if(m){const E=C.children[0],M=Pt(C);x=E.getBoundingClientRect(),M.attr("width",x.width),M.attr("height",x.height)}const b=kT(t,x),{width:k,height:T,x:B,y:L,bodyY:A,bodyHeight:F,tabHeight:z,tabWidth:q}=b;t.diff=t.width<=x.width+t.padding?(k-t.width)/2-t.padding:-t.padding;const D=ft(t,{fill:u.get("fill")||n,stroke:u.get("stroke")||o,strokeWidth:((W=u.get("stroke-width"))==null?void 0:W.replace("px",""))||1,seed:a});if(t.look==="handDrawn"){const E=pt.svg(f),M=E.rectangle(B,A,k,F,D);if(f.insert(()=>M,":first-child").attr("class","boundary-body label-container"),d==="package"){const v=E.rectangle(B,L,q,z,D);f.insert(()=>v,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else f.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",l).attr("x",B).attr("y",A).attr("width",k).attr("height",F),d==="package"&&f.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",l).attr("x",B).attr("y",L).attr("width",q).attr("height",z);const{subGraphTitleTopMargin:rt}=Hs(r);return d==="package"?y.attr("transform",`translate(${B+(q-x.width)/2}, ${L+(z-x.height)/2})`):y.attr("transform",`translate(${t.x-x.width/2}, ${L+rt})`),h&&(y.attr("style",h),y.select("span").attr("style",h)),t.offsetX=0,t.width=k,t.height=T,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(E){return Br(t,E)},{cluster:f,labelBBox:x}},"usecaseSystemBoundary"),ST=Bm,TT={rect:Bm,squareRect:ST,roundedWithTitle:mT,noteGroup:gT,divider:xT,kanbanSection:yT,flowGroup:bT,usecaseSystemBoundary:wT,swimlane:pT},_T=new Set(["noteGroup","divider"]),UF=p(e=>!_T.has(e??"rect"),"clusterPaintsTitle"),vm=new Map,BT=p(async(e,t)=>{const r=t.shape||"rect",i=await TT[r](e,t);return vm.set(t.id,i),i},"insertCluster"),jF=p(()=>{vm=new Map},"clear"),hs=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"),Ce={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},od={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function xs(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Kt(e),t=Kt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],n=s-r,o=a-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}p(xs,"calculateDeltaAndAngle");var Kt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),vT=p(e=>({x:p(function(t,r,i){let s=0;const a=Kt(i[0]).x<Kt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ce,e.arrowTypeStart)){const{angle:f,deltaX:m}=xs(i[0],i[1]);s=Ce[e.arrowTypeStart]*Math.cos(f)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ce,e.arrowTypeEnd)){const{angle:f,deltaX:m}=xs(i[i.length-1],i[i.length-2]);s=Ce[e.arrowTypeEnd]*Math.cos(f)*(m>=0?1:-1)}const n=Math.abs(Kt(t).x-Kt(i[i.length-1]).x),o=Math.abs(Kt(t).y-Kt(i[i.length-1]).y),c=Math.abs(Kt(t).x-Kt(i[0]).x),h=Math.abs(Kt(t).y-Kt(i[0]).y),l=Ce[e.arrowTypeStart],u=Ce[e.arrowTypeEnd],d=1;if(n<u&&n>0&&o<u){let f=u+d-n;f*=a==="right"?-1:1,s-=f}if(c<l&&c>0&&h<l){let f=l+d-c;f*=a==="right"?-1:1,s+=f}return Kt(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=Kt(i[0]).y<Kt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ce,e.arrowTypeStart)){const{angle:f,deltaY:m}=xs(i[0],i[1]);s=Ce[e.arrowTypeStart]*Math.abs(Math.sin(f))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ce,e.arrowTypeEnd)){const{angle:f,deltaY:m}=xs(i[i.length-1],i[i.length-2]);s=Ce[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(m>=0?1:-1)}const n=Math.abs(Kt(t).y-Kt(i[i.length-1]).y),o=Math.abs(Kt(t).x-Kt(i[i.length-1]).x),c=Math.abs(Kt(t).y-Kt(i[0]).y),h=Math.abs(Kt(t).x-Kt(i[0]).x),l=Ce[e.arrowTypeStart],u=Ce[e.arrowTypeEnd],d=1;if(n<u&&n>0&&o<u){let f=u+d-n;f*=a==="up"?-1:1,s-=f}if(c<l&&c>0&&h<l){let f=l+d-c;f*=a==="up"?-1:1,s+=f}return Kt(t).y+s},"y")}),"getLineFunctionsWithOffset"),LT=p((e,t,r,i,s,a=!1,n)=>{t.arrowTypeStart&&nd(e,"start",t.arrowTypeStart,r,i,s,a,n),t.arrowTypeEnd&&nd(e,"end",t.arrowTypeEnd,r,i,s,a,n)},"addEdgeMarkers"),FT={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},arrow_hierarchy:{type:"hierarchy",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}},AT=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],nd=p((e,t,r,i,s,a,n=!1,o)=>{var m;if(!r||r==="none")return;const c=FT[r],h=c&&AT.includes(c.type);if(!c){J.warn(`Unknown arrow type: ${r}`);return}const l=c.type,f=`${s}_${a}-${l}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const y=o.replace(/[^\dA-Za-z]/g,"_"),C=`${f}_${y}`;if(!document.getElementById(C)){const x=document.getElementById(f);if(x){const b=x.cloneNode(!0);b.id=C,b.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",o),c.fill&&T.setAttribute("fill",o)}),(m=x.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${C})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),ET=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=Rt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Xa=new Map,ge=new Map,GF=p(()=>{Xa.clear(),ge.clear()},"clear"),XF=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),cs=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),MT=p(async(e,t)=>{const r=Rt();let i=ue(r);const{labelStyles:s}=mt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",h=await Ie(e,t.label,{style:cs(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(h),J.info("abc82",t,t.labelType);let l,u;if(i){const f=h.children[0],m=Pt(h);l=await ii.measure(()=>f.getBoundingClientRect()),u=l,m.attr("width",l.width),m.attr("height",l.height)}else{const f=Pt(h).select("text").node();await ii.measure(()=>{l=h.getBBox(),f&&typeof f.getBBox=="function"?u=f.getBBox():u=l})}n.attr("transform",hs(u,i)),Xa.set(t.id,a),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 kr(m,t.startLabelLeft,cs(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],b=Pt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",hs(C,i)),ge.get(t.id)||ge.set(t.id,{}),ge.get(t.id).startLeft=f,bs(d,t.startLabelLeft,C),Cs(t,"startLeft",C)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await kr(m,t.startLabelRight,cs(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],b=Pt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",hs(C,i)),ge.get(t.id)||ge.set(t.id,{}),ge.get(t.id).startRight=f,bs(d,t.startLabelRight,C),Cs(t,"startRight",C)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await kr(m,t.endLabelLeft,cs(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],b=Pt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",hs(C,i)),ge.get(t.id)||ge.set(t.id,{}),ge.get(t.id).endLeft=f,bs(d,t.endLabelLeft,C),Cs(t,"endLeft",C)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await kr(m,t.endLabelRight,cs(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],b=Pt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",hs(C,i)),ge.get(t.id)||ge.set(t.id,{}),ge.get(t.id).endRight=f,bs(d,t.endLabelRight,C),Cs(t,"endRight",C)}return h},"insertEdgeLabel");function Cs(e,t,r){e.terminalLabelSizes??(e.terminalLabelSizes={}),e.terminalLabelSizes[t]={width:r.width,height:r.height}}p(Cs,"recordTerminalLabelSize");function bs(e,t,r){ue(Rt())&&e&&(e.style.width=Math.max(t.length*9,r.width)+"px",e.style.height=r.height+"px")}p(bs,"setTerminalWidth");var $T=p((e,t)=>{let r=e.x,i=e.y;if(t!=null&&t.updatedPath){const s=Ne.calcLabelPosition(t.updatedPath);if(t.originalPath){const a=Ne.calcLabelPosition(t.originalPath);r=e.x+(s.x-a.x),i=e.y+(s.y-a.y)}else r=s.x,i=s.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),OT=p((e,t)=>{J.debug("Moving label abc88 ",e.id,e.label,Xa.get(e.id),t);const r=Rt(),{subGraphTitleTotalMargin:i}=Hs(r);if(e.label){const a=Xa.get(e.id),{x:n,y:o}=$T(e,t);J.debug("Moving label "+e.label+" from (",e.x,",",e.y,") to (",n,",",o,") abc88"),a.attr("transform",`translate(${n}, ${o+i/2})`)}const s=t.updatedPath?t.updatedPath:t.originalPath;if(e.startLabelLeft){const a=ge.get(e.id).startLeft;let n=e.x,o=e.y;if(s){const c=Ne.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",s);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const a=ge.get(e.id).startRight;let n=e.x,o=e.y;if(s){const c=Ne.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",s);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const a=ge.get(e.id).endLeft;let n=e.x,o=e.y;if(s){const c=Ne.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",s);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const a=ge.get(e.id).endRight;let n=e.x,o=e.y;if(s){const c=Ne.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",s);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),IT=p((e,t)=>{var n;if(!(e!=null&&e.isLabelEdge)||!((n=e==null?void 0:e.id)!=null&&n.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),DT=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return s>=n||a>=o},"outsideNode"),PT=p((e,t,r)=>{J.debug(`intersection calc abc89:
295
+ outsidePoint: ${JSON.stringify(t)}
296
+ insidePoint : ${JSON.stringify(r)}
297
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),n=e.width/2;let o=r.x<t.x?n-a:n+a;const c=e.height/2,h=Math.abs(t.y-r.y),l=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*n>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-s:s-c-t.y;o=l*u/h;const d={x:r.x<t.x?r.x+o:r.x-l+o,y:r.y<t.y?r.y+h-u:r.y-h+u};return o===0&&(d.x=t.x,d.y=t.y),l===0&&(d.x=t.x),h===0&&(d.y=t.y),J.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${l}, r ${o}`,d),d}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let u=h*o/l,d=r.x<t.x?r.x+l-o:r.x-l+o,f=r.y<t.y?r.y+u:r.y-u;return J.debug(`sides calc abc89, Q ${h}, q ${u}, R ${l}, r ${o}`,{_x:d,_y:f}),o===0&&(d=t.x,f=t.y),l===0&&(d=t.x),h===0&&(f=t.y),{x:d,y:f}}},"intersection"),ld=p((e,t)=>{J.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(J.info("abc88 checking point",a,t),!DT(t,a)&&!s){const n=PT(t,i,a);J.debug("abc88 inside",a,i,n),J.debug("abc88 intersection",n,t);let o=!1;r.forEach(c=>{o=o||c.x===n.x&&c.y===n.y}),r.some(c=>c.x===n.x&&c.y===n.y)?J.warn("abc88 no intersect",n,r):r.push(n),s=!0}else J.warn("abc88 outside",a,i),i=a,s||r.push(a)}),J.debug("returning points",r),r},"cutPathAtIntersect");function Lm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],n=e[i+1];(s.x===a.x&&a.y===n.y&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===n.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Lm,"extractCornerPoints");var hd=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),n=r/a;return{x:t.x-n*i,y:t.y-n*s}},"findAdjacentPoint"),RT=p(function(e){const{cornerPointPositions:t}=Lm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],n=e[i],o=hd(s,n,5),c=hd(a,n,5),h=c.x-o.x,l=c.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let d={x:n.x,y:n.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){J.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const f=5;n.x===o.x?d={x:h<0?o.x-f+u:o.x+f-u,y:l<0?o.y-u:o.y+u}:d={x:h<0?o.x-u:o.x+u,y:l<0?o.y-f+u:o.y+f-u}}else J.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(d,c)}else r.push(e[i]);return r},"fixCorners"),qT=p((e,t,r)=>{const i=e-t-r,s=2,a=2,n=s+a,o=Math.floor(i/n),c=Number.isFinite(o)?Math.max(0,o):0,h=Array(c).fill(`${s} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),NT=p(function(e,t,r,i,s,a,n,o=!1,c=void 0){var Z;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:h,layout:l}=Rt(),u=c??l;let d=t.points,f=!1;const m=s;var y=a;const C=[];for(const lt in t.cssCompiledStyles)Uf(lt)||C.push(t.cssCompiledStyles[lt]);if(u==="swimlane"){if(!o&&y.intersect&&m.intersect&&Array.isArray(d)&&d.length>=2)if(d.length===2)d=[m.intersect(d[0]),y.intersect(d[1])];else{const lt=d.slice(1,-1),ht=lt[0],dt=lt[lt.length-1],bt=.5,St=Math.abs(d[d.length-1].x-dt.x)<bt&&Math.abs(d[d.length-1].y-dt.y)<bt,yt=m.intersect(ht),At=St?dt:y.intersect(dt),Dt=Math.abs(At.x-dt.x)<bt&&Math.abs(At.y-dt.y)<bt,ct=Math.abs(yt.x-ht.x)<bt&&Math.abs(yt.y-ht.y)<bt?[]:[yt],Ct=Dt?[]:[At];d=[...ct,...lt,...Ct]}d=IT(t,d)}else y.intersect&&m.intersect&&!o&&(d=d.slice(1,t.points.length-1),d.unshift(m.intersect(d[0])),d.push(y.intersect(d[d.length-1])));const x=btoa(JSON.stringify(d));t.toCluster&&(J.info("to cluster abc88",r.get(t.toCluster)),d=ld(t.points,r.get(t.toCluster).node),f=!0),t.fromCluster&&(J.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(d,null,2)),d=ld(d.reverse(),r.get(t.fromCluster).node).reverse(),f=!0);let b=d.filter(lt=>!Number.isNaN(lt.y));const k=ET(t.curve);k!=="rounded"&&(b=RT(b));let T=_s;switch(k){case"linear":T=_s;break;case"basis":T=Un;break;case"cardinal":T=_f;break;case"bumpX":T=bf;break;case"bumpY":T=kf;break;case"catmullRom":T=vf;break;case"monotoneX":T=$f;break;case"monotoneY":T=Of;break;case"natural":T=Df;break;case"step":T=Pf;break;case"stepAfter":T=qf;break;case"stepBefore":T=Rf;break;case"rounded":T=_s;break;default:T=Un}const{x:B,y:L}=vT(t),A=A1().x(B).y(L).curve(T);let F;switch(t.thickness){case"normal":F="edge-thickness-normal";break;case"thick":F="edge-thickness-thick";break;case"invisible":F="edge-thickness-invisible";break;default:F="edge-thickness-normal"}switch(t.pattern){case"solid":F+=" edge-pattern-solid";break;case"dotted":F+=" edge-pattern-dotted";break;case"dashed":F+=" edge-pattern-dashed";break;default:F+=" edge-pattern-solid"}let z,q=k==="rounded"?Fm(Am(b,t),5):A(b);const D=Array.isArray(t.style)?t.style:[t.style];let rt=D.find(lt=>lt==null?void 0:lt.startsWith("stroke:")),W="";t.animate&&(W="edge-animation-fast"),t.animation&&(W="edge-animation-"+t.animation);let E=!1;if(t.look==="handDrawn"){const lt=pt.svg(e);Object.assign([],b);const ht=lt.path(q,{roughness:.3,seed:h});F+=" transition",z=Pt(ht).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(W?" "+W:"")).attr("style",D?D.reduce((bt,St)=>bt+";"+St,""):"");let dt=z.attr("d");z.attr("d",dt),e.node().appendChild(z.node())}else{const lt=C.join(";"),ht=D?D.reduce((Dt,_t)=>Dt+_t+";",""):"",dt=(lt?lt+";"+ht+";":ht)+";"+(D?D.reduce((Dt,_t)=>Dt+";"+_t,""):"");z=e.append("path").attr("d",q).attr("id",`${n}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(W?" "+W:"")).attr("style",dt),rt=(Z=dt.match(/stroke:([^;]+)/))==null?void 0:Z[1],E=t.animate===!0||!!t.animation||lt.includes("animation");const bt=z.node(),St=typeof bt.getTotalLength=="function"?bt.getTotalLength():0,yt=od[t.arrowTypeStart]||0,At=od[t.arrowTypeEnd]||0;if(t.look==="neo"&&!E){const _t=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?qT(St,yt,At):`0 ${yt} ${St-yt-At} ${At}`}; stroke-dashoffset: 0;`;z.attr("style",_t+z.attr("style"))}}z.attr("data-edge",!0),z.attr("data-et","edge"),z.attr("data-id",t.id),z.attr("data-points",x),z.attr("data-look",ne(t.look)),t.showPoints&&b.forEach(lt=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",lt.x).attr("cy",lt.y)});let M="";(Rt().flowchart.arrowMarkerAbsolute||Rt().state.arrowMarkerAbsolute)&&(M=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,M=M.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),J.info("arrowTypeStart",t.arrowTypeStart),J.info("arrowTypeEnd",t.arrowTypeEnd);const v=!E&&(t==null?void 0:t.look)==="neo";LT(z,t,M,n,i,v,rt);const R=Math.floor(d.length/2),O=d[R];Ne.isLabelCoordinateInPath(O,z.attr("d"))||(f=!0);let X={};return f&&(X.updatedPath=d),X.originalPath=t.points,X},"insertEdge");function Fm(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const n=e[a],o=e[a-1],c=e[a+1];if(a===0)r+=`M${n.x},${n.y}`;else if(a===i-1)r+=`L${n.x},${n.y}`;else{const h=n.x-o.x,l=n.y-o.y,u=c.x-n.x,d=c.y-n.y,f=Math.hypot(h,l),m=Math.hypot(u,d);if(f<s||m<s){r+=`L${n.x},${n.y}`;continue}const y=h/f,C=l/f,x=u/m,b=d/m,k=y*x+C*b,T=Math.max(-1,Math.min(1,k)),B=Math.acos(T);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${n.x},${n.y}`;continue}const L=Math.min(t/Math.sin(B/2),f/2,m/2),A=n.x-y*L,F=n.y-C*L,z=n.x+x*L,q=n.y+b*L;r+=`L${A},${F}`,r+=`Q${n.x},${n.y} ${z},${q}`}}return r}p(Fm,"generateRoundedPath");function hl(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(hl,"calculateDeltaAndAngle");function Am(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Ce[t.arrowTypeStart]){const s=Ce[t.arrowTypeStart],a=e[0],n=e[1],{angle:o}=hl(a,n),c=s*Math.cos(o),h=s*Math.sin(o);r[0].x=a.x+c,r[0].y=a.y+h}const i=e.length;if(i>=2&&Ce[t.arrowTypeEnd]){const s=Ce[t.arrowTypeEnd],a=e[i-1],n=e[i-2],{angle:o}=hl(n,a),c=s*Math.cos(o),h=s*Math.sin(o);r[i-1].x=a.x-c,r[i-1].y=a.y-h}return r}p(Am,"applyMarkerOffsetsToPoints");var WT=p((e,t,r,i)=>{t.forEach(s=>{u_[s](e,r,i)})},"insertMarkers"),zT=p((e,t,r)=>{J.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"),HT=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"),YT=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"),UT=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"),jT=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"),GT=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"),XT=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"),VT=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"),ZT=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"),KT=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{transitionColor:a}=s;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",`${a}`)},"barbNeo"),QT=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"),JT=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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),t_=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"),e_=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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),r_=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"only_one_neo"),i_=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=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");o.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const c=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");c.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),c.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),s_=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"one_or_more_neo"),a_=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=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");o.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const c=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");c.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),c.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),o_=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
298
+ L20,10
299
+ M20,10
300
+ L0,20`)},"requirement_arrow"),n_=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
301
+ L20,10
302
+ M20,10
303
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),l_=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"),h_=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s,n=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");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),c_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),u_={extension:zT,composition:HT,aggregation:YT,dependency:UT,lollipop:jT,point:GT,circle:XT,cross:VT,barb:ZT,barbNeo:KT,hierarchy:c_,only_one:QT,zero_or_one:JT,one_or_more:t_,zero_or_more:e_,only_one_neo:r_,zero_or_one_neo:i_,one_or_more_neo:s_,zero_or_more_neo:a_,requirement_arrow:o_,requirement_contains:l_,requirement_arrow_neo:n_,requirement_contains_neo:h_},d_=WT,f_={common:Ds,getConfig:Qt,insertCluster:BT,insertEdge:NT,insertEdgeLabel:MT,insertMarkers:d_,insertNode:_m,interpolateToCurve:rh,labelHelper:vt,log:J,positionEdgeLabel:OT},p_=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],$s=Object.create(null),Em=p(e=>{for(const t of e)$s[t.name]=t},"registerLayoutLoaders"),g_=p(()=>{const e=p(async()=>await Wt(()=>import("./elk-QONTBCTQ-BdiasG_x.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...p_.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),m_=p(()=>{Em([{name:"dagre",loader:p(async()=>await Wt(()=>import("./dagre-NK4GIZVX-BJ3S0JEO.js"),__vite__mapDeps([6,2,3,4,5])),"loader")},{name:"swimlane",loader:p(async()=>await Wt(()=>import("./swimlanes-B3ENRKFQ-icvIkwDn.js"),__vite__mapDeps([7,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:p(async()=>await Wt(()=>import("./cose-bilkent-JH36ORCC-Dc00FcYn.js"),__vite__mapDeps([8,9,3,4])),"loader")},...g_()])},"registerDefaultLayoutLoaders");m_();var VF=p(async(e,t)=>{if(!Object.hasOwn($s,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const s of e.nodes){const a=s.domId||s.id;s.domId=`${e.diagramId}-${a}`}const r=$s[e.layoutAlgorithm],i=await r.loader();return Y1(t,e.config),i.render(e,t,f_,{algorithm:r.algorithm})},"render"),Tn="dagre",ZF=p((e="",{fallback:t=Tn}={})=>{if(Object.hasOwn($s,e))return e;for(const r of[t,Tn])if(Object.hasOwn($s,r))return J.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${Tn} is registered.`)},"getRegisteredLayoutAlgorithm"),vh="comm",Mm="rule",$m="decl",y_="@media",x_="@import",C_="@supports",b_="@namespace",cl="@keyframes",Om="@layer",k_="@scope",w_=Math.abs,vs=String.fromCharCode;function Im(e){return e.trim()}function ul(e,t,r){return e.replace(t,r)}function Si(e,t){return e.charCodeAt(t)|0}function zi(e,t,r){return e.slice(t,r)}function ir(e){return e.length}function Dm(e){return e.length}function na(e,t){return t.push(e),e}var fo=1,Hi=1,Pm=0,ze=0,ae=0,Vi="";function Lh(e,t,r,i,s,a,n,o){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:fo,column:Hi,length:n,return:"",siblings:o}}function S_(){return ae}function T_(){return ae=ze>0?Si(Vi,--ze):0,Hi--,ae===10&&(Hi=1,fo--),ae}function Ve(){return ae=ze<Pm?Si(Vi,ze++):0,Hi++,ae===10&&(Hi=1,fo++),ae}function Pr(){return Si(Vi,ze)}function ka(){return ze}function po(e,t){return zi(Vi,e,t)}function Os(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 __(e){return fo=Hi=1,Pm=ir(Vi=e),ze=0,[]}function B_(e){return Vi="",e}function _n(e){return Im(po(ze-1,dl(e===91?e+2:e===40?e+1:e)))}function v_(e){for(;(ae=Pr())&&ae<33;)Ve();return Os(e)>2||Os(ae)>3?"":" "}function L_(e,t){for(;--t&&Ve()&&!(ae<48||ae>102||ae>57&&ae<65||ae>70&&ae<97););return po(e,ka()+(t<6&&Pr()==32&&Ve()==32))}function dl(e){for(;Ve();)switch(ae){case e:return ze;case 34:case 39:e!==34&&e!==39&&dl(ae);break;case 40:e===41&&dl(e);break;case 92:Ve();break}return ze}function F_(e,t){for(;Ve()&&e+ae!==57;)if(e+ae===84&&Pr()===47)break;return"/*"+po(t,ze-1)+"*"+vs(e===47?e:Ve())}function A_(e){for(;!Os(Pr());)Ve();return po(e,ze)}function E_(e){return B_(wa("",null,null,null,[""],e=__(e),0,[0],e))}function wa(e,t,r,i,s,a,n,o,c){for(var h=0,l=0,u=n,d=0,f=0,m=0,y=1,C=1,x=1,b=0,k=0,T="",B=s,L=a,A=i,F=T;C;)switch(m=k,k=Ve()){case 40:m!=108&&Si(F,u-1)==58?(b++,F+="("):F+=_n(k);break;case 41:b--,F+=")";break;case 34:case 39:case 91:F+=_n(k);break;case 9:case 10:case 13:case 32:if(b>0){F+=vs(k);break}F+=v_(m);break;case 92:F+=L_(ka()-1,7);continue;case 47:switch(Pr()){case 42:case 47:na(M_(F_(Ve(),ka()),t,r,c),c),(Os(m||1)==5||Os(Pr()||1)==5)&&ir(F)&&zi(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:o[h++]=ir(F)*x;case 125*y:case 59:case 0:if(b>0&&k){F+=vs(k);break}switch(k){case 0:case 125:C=0;case 59+l:x==-1&&(F=ul(F,/\f/g,"")),f>0&&(ir(F)-u||y===0)&&na(f>32?ud(F+";",i,r,u-1,c):ud(ul(F," ","")+";",i,r,u-2,c),c);break;case 59:F+=";";default:if(na(A=cd(F,t,r,h,l,s,o,T,B=[],L=[],u,a),a),k===123)if(l===0)wa(F,t,A,A,B,a,u,o,L);else{switch(d){case 99:if(Si(F,3)===110)break;case 108:if(Si(F,2)===97)break;default:l=0;case 100:case 109:case 115:}l?wa(e,A,A,i&&na(cd(e,A,A,0,0,s,o,T,s,B=[],u,L),L),s,L,u,o,i?B:L):wa(F,A,A,A,[""],L,0,o,L)}}h=l=f=0,y=x=1,T=F="",u=n;break;case 58:u=1+ir(F),f=m;default:if(y<1){if(k==123)--y;else if(k==125&&y++==0&&T_()==125)continue}switch(F+=vs(k),k*y){case 38:x=l>0?1:(F+="\f",-1);break;case 44:if(b>0)break;o[h++]=(ir(F)-1)*x,x=1;break;case 64:Pr()===45&&(F+=_n(Ve())),d=Pr(),l=u=ir(T=F+=A_(ka())),k++;break;case 45:m===45&&ir(F)==2&&(y=0)}}return a}function cd(e,t,r,i,s,a,n,o,c,h,l,u){for(var d=s-1,f=s===0?a:[""],m=Dm(f),y=0,C=0,x=0;y<i;++y)for(var b=0,k=zi(e,d+1,d=w_(C=n[y])),T=e;b<m;++b)(T=Im(C>0?f[b]+" "+k:ul(k,/&\f/g,f[b])))&&(c[x++]=T);return Lh(e,t,r,s===0?Mm:o,c,h,l,u)}function M_(e,t,r,i){return Lh(e,t,r,vh,vs(S_()),zi(e,2,-2),0,i)}function ud(e,t,r,i,s){return Lh(e,t,r,$m,zi(e,0,i),zi(e,i+1,-1),i,s)}function fl(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function $_(e,t,r,i){switch(e.type){case Om:if(e.children.length)break;case x_:case b_:case $m:return e.return=e.return||e.value;case vh:return"";case cl:return e.return=e.value+"{"+fl(e.children,i)+"}";case Mm:if(!ir(e.value=e.props.join(",")))return""}return ir(r=fl(e.children,i))?e.return=e.value+"{"+r+"}":""}function O_(e){var t=Dm(e);return function(r,i,s,a){for(var n="",o=0;o<t;o++)n+=e[o](r,i,s,a)||"";return n}}var Rm="c4",I_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),D_=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./c4Diagram-XDPPPE54-Cyf0T8lC.js");return{diagram:t}},__vite__mapDeps([10,11,3,4]));return{id:Rm,diagram:e}},"loader"),P_={id:Rm,detector:I_,loader:D_},R_=P_,qm="flowchart-v2",q_=p(e=>/^\s*(graph|flowchart)/.test(e),"detector"),N_=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./flowDiagram-IUGLLWBU-6vX12g0V.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]));return{id:qm,diagram:e}},"loader"),W_={id:qm,detector:q_,loader:N_},z_=W_,Nm="agentflow",H_=p(e=>/^\s*agentflow-beta\b/.test(e),"detector"),Y_=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-TYUNFSNR-T7Bwi21B.js");return{diagram:t}},__vite__mapDeps([17,13,14,15,11,16,3,4]));return{id:Nm,diagram:e}},"loader"),U_={id:Nm,detector:H_,loader:Y_},j_=U_,Wm="swimlane",G_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),X_=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-AYQRV4AK-lOuiHvx1.js");return{diagram:t}},__vite__mapDeps([18,12,13,14,15,11,16,3,4]));return{id:Wm,diagram:e}},"loader"),V_={id:Wm,detector:G_,loader:X_},Z_=V_,zm="er",K_=p(e=>/^\s*erDiagram/.test(e),"detector"),Q_=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./erDiagram-KYQIGQAA-CH9y_Q7o.js");return{diagram:t}},__vite__mapDeps([19,14,15,16,3,4]));return{id:zm,diagram:e}},"loader"),J_={id:zm,detector:K_,loader:Q_},tB=J_,Hm="gitGraph",eB=p(e=>/^\s*gitGraph/.test(e),"detector"),rB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PDYL7XHY-DtD9IOhj.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,3,4]));return{id:Hm,diagram:e}},"loader"),iB={id:Hm,detector:eB,loader:rB},sB=iB,Ym="gantt",aB=p(e=>/^\s*gantt/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./ganttDiagram-R7GPNTJY-Ca9Z5SFi.js");return{diagram:t}},__vite__mapDeps([24,3,4,25,26,27]));return{id:Ym,diagram:e}},"loader"),nB={id:Ym,detector:aB,loader:oB},lB=nB,Um="info",hB=p(e=>/^\s*info/.test(e),"detector"),cB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./infoDiagram-MVDRKAX5-BttRtmtq.js");return{diagram:t}},__vite__mapDeps([28,23,3,4]));return{id:Um,diagram:e}},"loader"),uB={id:Um,detector:hB,loader:cB},jm="pie",dB=p(e=>/^\s*pie/.test(e),"detector"),fB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./pieDiagram-GNMPY74T-BB9oPfj7.js");return{diagram:t}},__vite__mapDeps([29,22,23,3,4,30,31,26]));return{id:jm,diagram:e}},"loader"),pB={id:jm,detector:dB,loader:fB},Gm="quadrantChart",gB=p(e=>/^\s*quadrantChart/.test(e),"detector"),mB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./quadrantDiagram-D57K4MC3-GT0rwvgr.js");return{diagram:t}},__vite__mapDeps([32,25,26,27,3,4]));return{id:Gm,diagram:e}},"loader"),yB={id:Gm,detector:gB,loader:mB},xB=yB,Xm="xychart",CB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),bB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./xychartDiagram-4URNHDU4-hGZ69wh6.js");return{diagram:t}},__vite__mapDeps([33,26,31,25,27,3,4]));return{id:Xm,diagram:e}},"loader"),kB={id:Xm,detector:CB,loader:bB},wB=kB,Vm="requirement",SB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),TB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./requirementDiagram-EQYSW5RA-Co1D_k0J.js");return{diagram:t}},__vite__mapDeps([34,14,15,3,4]));return{id:Vm,diagram:e}},"loader"),_B={id:Vm,detector:SB,loader:TB},BB=_B,Zm="sequence",vB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),LB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./sequenceDiagram-BLEHNHQU-20qZx9Pi.js");return{diagram:t}},__vite__mapDeps([35,21,11,3,4]));return{id:Zm,diagram:e}},"loader"),FB={id:Zm,detector:vB,loader:LB},AB=FB,Km="classDiagram",EB=p(e=>/^\s*classDiagram/.test(e),"detector"),MB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./classDiagram-v2-4MYWR3UA-Dyu-f5sY.js");return{diagram:t}},__vite__mapDeps([36,13,14,15,11,3,4]));return{id:Km,diagram:e}},"loader"),$B={id:Km,detector:EB,loader:MB},OB=$B,Qm="stateDiagram",IB=p(e=>/^\s*stateDiagram/.test(e),"detector"),DB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-A6IESKWZ-BE5XhAjE.js");return{diagram:t}},__vite__mapDeps([37,14,15,11,3,4]));return{id:Qm,diagram:e}},"loader"),PB={id:Qm,detector:IB,loader:DB},RB=PB,Jm="journey",qB=p(e=>/^\s*journey/.test(e),"detector"),NB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./journeyDiagram-BOSHW7O7-DLtiEu9c.js");return{diagram:t}},__vite__mapDeps([38,13,11,30,3,4]));return{id:Jm,diagram:e}},"loader"),WB={id:Jm,detector:qB,loader:NB},zB=WB,la=4,us=75,HB=p(e=>{const t=[];for(const s of e.split(/\s+/)){let a=[...s];for(;a.length>us;)t.push(a.slice(0,us).join("")),a=a.slice(us);a.length>0&&t.push(a.join(""))}const r=[];let i="";for(const s of t){const a=i?`${i} ${s}`:s;[...a].length>us?(r.push(i),i=s):i=a}if(i&&r.push(i),r.length>la){r.length=la;const s=r[la-1]??"";r[la-1]=`${[...s].slice(0,us-3).join("")}...`}return r},"wrapErrorMessage"),YB=p((e,t,r,i)=>{var c,h;J.debug(`rendering svg for syntax error
304
+ `);const s=q1(t),a=s.append("g"),n=HB(((h=i==null?void 0:(c=i.db).getErrorMessage)==null?void 0:h.call(c))??""),o=n.length>0?500+n.length*56:512;s.attr("viewBox",`0 0 2412 ${o}`),zd(s,100,o,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),n.forEach((l,u)=>{a.append("text").attr("class","error-text").attr("x",1440).attr("y",510+u*56).attr("font-size","42px").style("text-anchor","middle").text(l)})},"draw"),ty={draw:YB},UB=ty,Bn,jB={clear(){Bn=void 0},setErrorMessage(e){Bn=e},getErrorMessage(){return Bn}},GB={db:jB,renderer:ty,parser:{parse:p(()=>{},"parse")}},XB=GB,ey="flowchart-elk",VB=p((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),ZB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./flowDiagram-IUGLLWBU-6vX12g0V.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]));return{id:ey,diagram:e}},"loader"),KB={id:ey,detector:VB,loader:ZB},QB=KB,ry="timeline",JB=p(e=>/^\s*timeline/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./timeline-definition-JXYKGLGB-96dGf2vq.js");return{diagram:t}},__vite__mapDeps([39,30,3,4]));return{id:ry,diagram:e}},"loader"),ev={id:ry,detector:JB,loader:tv},rv=ev,iy="mindmap",iv=p(e=>/^\s*mindmap/.test(e),"detector"),sv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./mindmap-definition-6OY57UG3-_GFTucKM.js");return{diagram:t}},__vite__mapDeps([40,14,15,3,4]));return{id:iy,diagram:e}},"loader"),av={id:iy,detector:iv,loader:sv},ov=av,sy="kanban",nv=p(e=>/^\s*kanban/.test(e),"detector"),lv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./kanban-definition-FNSA4HC5-CQGtMsyR.js");return{diagram:t}},__vite__mapDeps([41,13,3,4]));return{id:sy,diagram:e}},"loader"),hv={id:sy,detector:nv,loader:lv},cv=hv,ay="sankey",uv=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./sankeyDiagram-SY24JHO5-BSVsJWqK.js");return{diagram:t}},__vite__mapDeps([42,31,26,3,4]));return{id:ay,diagram:e}},"loader"),fv={id:ay,detector:uv,loader:dv},pv=fv,oy="packet",gv=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),mv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-I5XIIV2D-pcKmZ9Kk.js");return{diagram:t}},__vite__mapDeps([43,22,23,3,4]));return{id:oy,diagram:e}},"loader"),yv={id:oy,detector:gv,loader:mv},ny="radar",xv=p(e=>/^\s*radar-beta/.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-RJA3I4VV-BorkY5MS.js");return{diagram:t}},__vite__mapDeps([44,22,23,3,4]));return{id:ny,diagram:e}},"loader"),bv={id:ny,detector:xv,loader:Cv},ly="block",kv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./blockDiagram-RJAE7QA3-CNbK1ZgZ.js");return{diagram:t}},__vite__mapDeps([45,13,5,16,3,4]));return{id:ly,diagram:e}},"loader"),Sv={id:ly,detector:kv,loader:wv},Tv=Sv,hy="treeView",_v=p(e=>/^\s*treeView-beta/.test(e),"detector"),Bv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-ODIL2UCW-D6oJ8t6N.js");return{diagram:t}},__vite__mapDeps([46,21,22,23,3,4]));return{id:hy,diagram:e}},"loader"),vv={id:hy,detector:_v,loader:Bv},Lv=vv,cy="architecture",Fv=p(e=>/^\s*architecture/.test(e),"detector"),Av=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZHVYKT53-Cc2t0GuJ.js");return{diagram:t}},__vite__mapDeps([47,22,23,3,4,9]));return{id:cy,diagram:e}},"loader"),Ev={id:cy,detector:Fv,loader:Av},Mv=Ev,uy="eventmodeling",$v=p(e=>/^\s*eventmodeling/.test(e),"detector"),Ov=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-PFBEJUXE-ypywCTOp.js");return{diagram:t}},__vite__mapDeps([48,22,23,3,4]));return{id:uy,diagram:e}},"loader"),Iv={id:uy,detector:$v,loader:Ov},Dv=Iv,dy="ishikawa",Pv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Rv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-HPEHV2GE-BuGLCWo1.js");return{diagram:t}},__vite__mapDeps([49,3,4]));return{id:dy,diagram:e}},"loader"),qv={id:dy,detector:Pv,loader:Rv},fy="venn",Nv=p(e=>/^\s*venn-beta/.test(e),"detector"),Wv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./vennDiagram-Q3Y3IDCW-D_03GSvC.js");return{diagram:t}},__vite__mapDeps([50,3,4]));return{id:fy,diagram:e}},"loader"),zv={id:fy,detector:Nv,loader:Wv},Hv=zv,py="treemap",Yv=p(e=>/^\s*treemap/.test(e),"detector"),Uv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-CBK3MWTC-DFwGBHGn.js");return{diagram:t}},__vite__mapDeps([51,22,15,23,3,4,27,31,26]));return{id:py,diagram:e}},"loader"),jv={id:py,detector:Yv,loader:Uv},gy="usecase",Gv=p(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),Xv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./usecaseDiagram-WPOLBNNX-CFXSct0C.js");return{diagram:t}},__vite__mapDeps([52,14,15,3,4]));return{id:gy,diagram:e}},"loader"),Vv={id:gy,detector:Gv,loader:Xv},my="wardley",Zv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Kv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./wardleyDiagram-IVAIDKWA-vOd1Jr4V.js");return{diagram:t}},__vite__mapDeps([53,22,23,3,4]));return{id:my,diagram:e}},"loader"),Qv={id:my,detector:Zv,loader:Kv},Jv=Qv,yy="cynefin",tL=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),eL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./cynefinDiagram-WF24UDRP-CaQ8qEG7.js");return{diagram:t}},__vite__mapDeps([54,22,23,3,4]));return{id:yy,diagram:e}},"loader"),rL={id:yy,detector:tL,loader:eL},xy="railroad",iL=p(e=>/^\s*railroad-beta/i.test(e),"detector"),sL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./railroadDiagram-Y72NRBL7-DzFREWND.js");return{diagram:t}},__vite__mapDeps([55,56,22,23,3,4]));return{id:xy,diagram:e}},"loader"),aL={id:xy,detector:iL,loader:sL},Cy="railroadEbnf",oL=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),nL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./ebnfDiagram-V4P3TTPT-CW3R519W.js");return{diagram:t}},__vite__mapDeps([57,56,22,23,3,4]));return{id:Cy,diagram:e}},"loader"),lL={id:Cy,detector:oL,loader:nL},by="railroadAbnf",hL=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),cL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./abnfDiagram-WEYOIA3C-Clrrz6aO.js");return{diagram:t}},__vite__mapDeps([58,56,22,23,3,4]));return{id:by,diagram:e}},"loader"),uL={id:by,detector:hL,loader:cL},ky="railroadPeg",dL=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),fL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./pegDiagram-ECIUJNBX-DfYCgLb5.js");return{diagram:t}},__vite__mapDeps([59,56,22,23,3,4]));return{id:ky,diagram:e}},"loader"),pL={id:ky,detector:dL,loader:fL},dd=!1,go=p(()=>{dd||(dd=!0,Fa("error",XB,e=>e.toLowerCase().trim()==="error"),Fa("---",{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("---")),An(QB,ov,Mv),An(j_,R_,cv,OB,tB,lB,uB,pB,BB,AB,Z_,z_,rv,sB,RB,zB,xB,pv,yv,wB,Tv,Dv,Lv,bv,qv,jv,aL,lL,uL,pL,Hv,Jv,rL,Vv))},"addDiagrams"),gL=p(async()=>{J.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ti).map(async([r,{detector:i,loader:s}])=>{if(s)try{In(r)}catch{try{const{diagram:a,id:n}=await s();Fa(n,a,i)}catch(a){throw J.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ti[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){J.error(`Failed to load ${t.length} external diagrams`);for(const r of t)J.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),mL="graphics-document document";function wy(e,t){e.attr("role",mL),t!==""&&e.attr("aria-roledescription",t)}p(wy,"setA11yDiagramInfo");function Sy(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(Sy,"addSVGa11yTitleDescription");var Jr,Va=(Jr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var d,f,m;const i=typeof t=="string"?{cleaned:t}:t,s=Qt(),a=Qa(i.cleaned,s);try{In(a)}catch{const y=X0(a);if(!y)throw new Fd(`Diagram ${a} not found.`);const{id:C,diagram:x}=await y();Fa(C,x)}const{db:n,parser:o,renderer:c,init:h}=In(a);o.parser&&(o.parser.yy=n),(d=n.clear)==null||d.call(n),h==null||h(s),r.title&&((f=n.setDiagramTitle)==null||f.call(n,r.title));let l=i.cleaned;if(n.preserveCommentsWhenParsing&&i.withComments){const y=s.maxTextSize??ml.maxTextSize;i.withComments.length>y?J.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${y}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):l=i.withComments}const u=uw(l)+`
305
+ `;return i.frontmatterLineOffset&&((m=n.setFrontmatterLineOffset)==null||m.call(n,i.frontmatterLineOffset)),await o.parse(u),new Jr(a,u,n,o,c)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Jr,"Diagram"),Jr),fd=[],yL=p(()=>{fd.forEach(e=>{e()}),fd=[]},"attachFunctions"),xL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ty(e){const t=Ld(e);if(!t)return{text:e,metadata:{}};const r=t.indent,i=r?t.body.split(`
306
+ `).map(n=>n.startsWith(r)?n.slice(r.length):n).join(`
307
+ `):t.body;let s=H1(i,{schema:z1})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t.length),metadata:a}}p(Ty,"extractFrontMatter");var CL=p(e=>e.replace(/\r\n?/g,`
308
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),bL=p(e=>{const{text:t,metadata:r}=Ty(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),kL=p(e=>{const t=Ne.detectInit(e)??{},r=Ne.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Q2(e),directive:t}},"processDirectives");function Fh(e){const t=e,r=CL(e),i=bL(r),s=kL(i.text),a=nh(i.config,s.directive),n=s.text,o=xL(n),c=r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:o,withComments:n,frontmatterLineOffset:c},title:i.title,config:a}}p(Fh,"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 wL=5e4,SL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",TL="sandbox",_L="loose",BL="http://www.w3.org/2000/svg",vL="http://www.w3.org/1999/xlink",LL="http://www.w3.org/1999/xhtml",FL="100%",AL="100%",EL="border:0;margin:0;",ML="margin:0",$L="allow-top-navigation-by-user-activation allow-popups",OL='The "iframe" tag is not supported by your browser.',IL=["foreignobject"],DL=["dominant-baseline"];function Ah(e){const t=Fh(e);va();let r;try{r=Qa(t.code.cleaned,Qt())}catch{r=void 0}return yl(r),Ax(t.config??{}),t}p(Ah,"processAndSetConfigs");async function By(e,t){go();try{const{code:r,config:i}=Ah(e);return{diagramType:(await Va.fromText(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}finally{yl(void 0)}}p(By,"parse");var pd=p((e,t,r=[])=>{const i=$d(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),PL=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 o=ue(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{yu(c.styles)||o.forEach(h=>{r.insertRule(pd(c.id,h,c.styles),r.cssRules.length)}),yu(c.textStyles)||r.insertRule(pd(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=On(s)+`
309
+ `}else i+=`${e.themeCSS}
310
+ `;return i+On(r)},"createCssStyles"),RL=p((e,t)=>fl(E_(`${e}{${t}}`),O_([p(function(i,s,a,n){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===cl)return;i.props=i.props.map(o=>o===e&&Array.isArray(i.children)&&i.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[y_,C_,Om,k_,"@container","@starting-style"],cl].includes(i.type)||(J.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=vh))},"addNamespace"),$_])),"compileCSS"),qL=p((e,t,r,i)=>{const s=PL(e,r),a=Kx(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return RL(i,a)},"createUserStyles"),NL=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=Wr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),WL=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":AL,i=_y(`<body style="${ML}">${e}</body>`);return`<iframe style="width:${FL};height:${r};${EL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${$L}">
311
+ ${OL}
312
+ </iframe>`},"putIntoIFrame"),gd=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",BL);return s&&n.attr("xmlns:xlink",s),n.append("g"),e},"appendDivSvgG");function pl(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(pl,"sandboxedIframe");var zL=p((e,t,r,i)=>{var s,a,n;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),HL=p(async function(e,t,r){var E,M,v,R,O,X,Z,lt;go();const i=Ah(t);let s=i.code;t=s.cleaned;const a=Qt();J.debug(a),t.length>((a==null?void 0:a.maxTextSize)??wL)&&(t=SL,s={raw:t,cleaned:t});const n=`#${e}`,o="i"+e,c="#"+o,h="d"+e,l="#"+h,u=p(()=>{const dt=Pt(f?c:l).node();dt&&"remove"in dt&&dt.remove()},"removeTempElements");let d=Pt(document.body);const f=a.securityLevel===TL,m=a.securityLevel===_L,y=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const ht=pl(Pt(r),o);d=Pt(ht.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Pt(r);gd(d,e,h,`font-family: ${y}`,vL)}else{if(zL(document,e,h,o),f){const ht=pl(Pt(document.body),o);d=Pt(ht.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Pt("body");gd(d,e,h)}let C,x;try{C=await Va.fromText(s,{title:i.title})}catch(ht){if(a.suppressErrorRendering)throw u(),ht;C=await Va.fromText("error"),x=ht,(M=(E=C.db).setErrorMessage)==null||M.call(E,cp(ht))}const b=d.select(l).node(),k=C.type,T=b.firstChild,B=T.firstChild,L=(R=(v=C.renderer).getClasses)==null?void 0:R.call(v,t,C),A=qL(a,k,L,n),F=document.createElement("style");F.innerHTML=A,T.insertBefore(F,B);try{await C.renderer.draw(t,e,"12.2.0",C)}catch(ht){throw a.suppressErrorRendering?u():UB.draw(t,e,"12.2.0"),ht}const z=d.select(`${l} svg`),q=(X=(O=C.db).getAccTitle)==null?void 0:X.call(O),D=(lt=(Z=C.db).getAccDescription)==null?void 0:lt.call(Z);Ly(k,z,q,D);const W=p(()=>{d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",LL);let ht=d.select(l).node().innerHTML;if(J.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),ht=NL(ht,f,hr(a.arrowMarkerAbsolute)),f){const dt=d.select(l+" svg").node();ht=WL(ht,dt)}else m||(ht=qi.sanitize(ht,{ADD_TAGS:IL,ADD_ATTR:DL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return yL(),ht},"serializeSvg")();if(x)throw x;return u(),{diagramType:k,svg:W,bindFunctions:C.db.bindFunctions}},"renderDiagram"),YL=p(async function(e,t,r){try{return await HL(e,t,r)}finally{yl(void 0)}},"render");function vy(e={}){var s;const t=oe({},e);t!=null&&t.fontFamily&&!((s=t.themeVariables)!=null&&s.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Lx(t);const r=qr.theme;t!=null&&t.theme&&Object.hasOwn(wr,t.theme)?t.themeVariables=wr[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=wr[r].getThemeVariables(t.themeVariables));const i=typeof t=="object"?vx(t):Od();gl(i.logLevel),go()}p(vy,"initialize");var UL=p((e,t={})=>{const{code:r}=Fh(e);return Va.fromText(r,t)},"getDiagramFromText");function Ly(e,t,r,i){wy(t,e),Sy(t,r,i,t.attr("id"))}p(Ly,"addA11yInfo");var si=Object.freeze({render:YL,parse:By,getDiagramFromText:UL,initialize:vy,getConfig:Qt,setConfig:Id,getSiteConfig:Od,updateSiteConfig:Fx,reset:p(()=>{va()},"reset"),globalReset:p(()=>{va(qr)},"globalReset"),defaultConfig:qr});gl(Qt().logLevel);va(Qt());var jL=p((e,t,r)=>{J.warn(e),oh(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"),Fy=p(async function(e={querySelector:".mermaid"}){try{await GL(e)}catch(t){if(oh(t)&&J.error(t.str),$e.parseError&&$e.parseError(t),!e.suppressErrors)throw J.error("Use the suppressErrors option to suppress these errors"),t}},"run"),GL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=si.getConfig();J.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");J.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(J.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),si.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Ne.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const c of Array.from(s)){if(J.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;n=c.innerHTML,n=Sp(Ne.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const l=Ne.detectInit(n);l&&J.debug("Detected early reinit: ",l);try{const{svg:u,bindFunctions:d}=await $y(h,n,c);c.innerHTML=u,e&&await e(h),d&&d(c)}catch(u){jL(u,o,$e.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Ay=p(function(e){si.initialize(e)},"initialize"),XL=p(async function(e,t,r){J.warn("mermaid.init is deprecated. Please use run instead."),e&&Ay(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Fy(i)},"init"),VL=p(async(e,{lazyLoad:t=!0}={})=>{go(),An(...e),t===!1&&await gL()},"registerExternalDiagrams"),Ey=p(function(){if($e.startOnLoad){const{startOnLoad:e}=si.getConfig();e&&$e.run().catch(t=>J.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Ey,!1);var ZL=p(function(e){$e.parseError=e},"setParseErrorHandler"),Za=[],vn=!1,My=p(async()=>{if(!vn){for(vn=!0;Za.length>0;){const e=Za.shift();if(e)try{await e()}catch(t){J.error("Error executing queue",t)}}vn=!1}},"executeQueue"),KL=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,n)=>{si.parse(e,t).then(o=>{a(o),r(o)},o=>{var c;J.error("Error parsing",o),(c=$e.parseError)==null||c.call($e,o),n(o),i(o)})}),"performCall");Za.push(s),My().catch(i)}),"parse"),$y=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((n,o)=>{si.render(e,t,r).then(c=>{n(c),i(c)},c=>{var h;J.error("Error parsing",c),(h=$e.parseError)==null||h.call($e,c),o(c),s(c)})}),"performCall");Za.push(a),My().catch(s)}),"render"),QL=p(()=>Object.keys(ti).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),$e={startOnLoad:!0,mermaidAPI:si,parse:KL,render:$y,init:XL,run:Fy,registerExternalDiagrams:VL,registerLayoutLoaders:Em,initialize:Ay,parseError:void 0,contentLoaded:Ey,setParseErrorHandler:ZL,detectType:Qa,registerIconPacks:g2,getRegisteredDiagramsMetadata:QL},JL=$e;/*! Check if previously processed *//*!
313
+ * Wait for document loaded before starting the execution
314
+ */const KF=Object.freeze(Object.defineProperty({__proto__:null,default:JL},Symbol.toStringTag,{value:"Module"}));export{rw as $,Qx as A,oF as B,aS as C,NF as D,xh as E,WF as F,Rr as G,rS as H,Pp as I,z1 as J,i0 as K,Qt as L,oC as M,nh as N,ml as O,iw as P,q1 as Q,tx as R,x2 as S,Ls as T,sF as U,ao as V,Nx as W,Wd as X,fc as Y,X2 as Z,p as _,tC as a,D2 as a$,Is as a0,Ae as a1,Y as a2,U as a3,Xx as a4,Hd as a5,B1 as a6,Al as a7,cF as a8,fF as a9,XF as aA,Xa as aB,MT as aC,Hs as aD,$T as aE,ge as aF,vt as aG,eS as aH,A1 as aI,th as aJ,Ql as aK,ya as aL,M2 as aM,E2 as aN,A2 as aO,F2 as aP,k2 as aQ,Kf as aR,T2 as aS,b2 as aT,v2 as aU,Qf as aV,S2 as aW,I2 as aX,O2 as aY,$2 as aZ,P2 as a_,ui as aa,$c as ab,Mc as ac,gF as ad,pF as ae,dF as af,lF as ag,hF as ah,uF as ai,yF as aj,mF as ak,BT as al,_m as am,YF as an,It as ao,or as ap,Gi as aq,g2 as ar,ah as as,pt as at,Ce as au,d_ as av,HF as aw,GF as ax,jF as ay,NT as az,Jx as b,w2 as b0,Jf as b1,L2 as b2,B2 as b3,_2 as b4,tp as b5,Y1 as b6,OT as b7,np as b8,He as b9,KF as bA,kd as ba,v1 as bb,iF as bc,_s as bd,UF as be,od as bf,Ie as bg,p2 as bh,Bl as bi,Dr as bj,Es as bk,Bc as bl,ok as bm,mt as bn,Uf as bo,Fe as bp,Jb as bq,_l as br,sf as bs,Rs as bt,nf as bu,nF as bv,n0 as bw,Bp as bx,xt as by,zF as bz,Rt as c,zd as d,oe as e,_r as f,rC as g,Tm as h,ut as i,We as j,Pt as k,J as l,Ds as m,hp as n,aF as o,ZF as p,iC as q,VF as r,eC as s,sC as t,Ne as u,H1 as v,ow as w,fT as x,AF as y,qi as z};