@justyork/repo-mind 0.3.0 → 0.4.0

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 (71) hide show
  1. package/package.json +9 -1
  2. package/ui/dist/assets/{arc-DhC0JPue.js → arc-C6B0IXf5.js} +1 -1
  3. package/ui/dist/assets/architectureDiagram-3BPJPVTR-BwcC0zwn.js +36 -0
  4. package/ui/dist/assets/{blockDiagram-GPEHLZMM-CgiNAArN.js → blockDiagram-GPEHLZMM-DIhdWMA6.js} +2 -2
  5. package/ui/dist/assets/{c4Diagram-AAUBKEIU-BIwHcwcH.js → c4Diagram-AAUBKEIU-DAe6bsUB.js} +2 -2
  6. package/ui/dist/assets/channel-C8Q7-wTd.js +1 -0
  7. package/ui/dist/assets/{chunk-2J33WTMH-DXRgHPpp.js → chunk-2J33WTMH-Cy3md3pb.js} +1 -1
  8. package/ui/dist/assets/{chunk-4BX2VUAB-BTb70kIb.js → chunk-4BX2VUAB-CzL8eUDD.js} +1 -1
  9. package/ui/dist/assets/{chunk-55IACEB6-BrAelyhX.js → chunk-55IACEB6-CbthXzDA.js} +1 -1
  10. package/ui/dist/assets/{chunk-727SXJPM-BlYnlPdj.js → chunk-727SXJPM-B7ZW-l9j.js} +1 -1
  11. package/ui/dist/assets/{chunk-AQP2D5EJ-DSPgdKZ8.js → chunk-AQP2D5EJ-Vaux-7Ld.js} +1 -1
  12. package/ui/dist/assets/{chunk-FMBD7UC4-BhH8ir2K.js → chunk-FMBD7UC4-C6P2YSWU.js} +1 -1
  13. package/ui/dist/assets/{chunk-ND2GUHAM-DCAuTSxB.js → chunk-ND2GUHAM-gSNqdDAn.js} +1 -1
  14. package/ui/dist/assets/{chunk-QZHKN3VN-DtYEkbYr.js → chunk-QZHKN3VN-DPPMoZqF.js} +1 -1
  15. package/ui/dist/assets/classDiagram-4FO5ZUOK-pYCdSDhT.js +1 -0
  16. package/ui/dist/assets/classDiagram-v2-Q7XG4LA2-pYCdSDhT.js +1 -0
  17. package/ui/dist/assets/cose-bilkent-S5V4N54A-Ca4nXCOA.js +1 -0
  18. package/ui/dist/assets/dagre-BM42HDAG-C-4Y4Jyn.js +4 -0
  19. package/ui/dist/assets/diagram-2AECGRRQ-CNv_WVZk.js +43 -0
  20. package/ui/dist/assets/diagram-5GNKFQAL-CNwYGvCw.js +10 -0
  21. package/ui/dist/assets/{diagram-KO2AKTUF-B-kUxuHX.js → diagram-KO2AKTUF-CEULTL49.js} +2 -2
  22. package/ui/dist/assets/diagram-LMA3HP47-sGQpPW5i.js +24 -0
  23. package/ui/dist/assets/diagram-OG6HWLK6-BBEtEBkh.js +24 -0
  24. package/ui/dist/assets/editor-BcAuZsp8.js +211 -0
  25. package/ui/dist/assets/{erDiagram-TEJ5UH35-BSWwMysi.js → erDiagram-TEJ5UH35-B4mEdVPJ.js} +2 -2
  26. package/ui/dist/assets/{flowDiagram-I6XJVG4X-D-q1cK69.js → flowDiagram-I6XJVG4X-7-OngwLn.js} +2 -2
  27. package/ui/dist/assets/ganttDiagram-6RSMTGT7-Bq3z_Nvr.js +292 -0
  28. package/ui/dist/assets/gitGraphDiagram-PVQCEYII-BjMdjnGR.js +106 -0
  29. package/ui/dist/assets/{graph-DwoitsWW.js → graph-CwHQTpjf.js} +1 -1
  30. package/ui/dist/assets/infoDiagram-5YYISTIA-ByORmROU.js +2 -0
  31. package/ui/dist/assets/{ishikawaDiagram-YF4QCWOH-CY-U_l7l.js → ishikawaDiagram-YF4QCWOH-B7yRHlcY.js} +6 -6
  32. package/ui/dist/assets/{journeyDiagram-JHISSGLW-jKj4lBEJ.js → journeyDiagram-JHISSGLW-J5mLr9YH.js} +2 -2
  33. package/ui/dist/assets/{kanban-definition-UN3LZRKU-PZ-5AYw2.js → kanban-definition-UN3LZRKU-B3GyGD8X.js} +2 -2
  34. package/ui/dist/assets/main-Du7fLv5Y.js +244 -0
  35. package/ui/dist/assets/mermaid.core-C57NVZG0.js +250 -0
  36. package/ui/dist/assets/{mindmap-definition-RKZ34NQL-CPY2Fdu_.js → mindmap-definition-RKZ34NQL-CkcXt9tU.js} +10 -10
  37. package/ui/dist/assets/{pieDiagram-4H26LBE5-C7GJ49et.js → pieDiagram-4H26LBE5-Y7B3kCyQ.js} +2 -2
  38. package/ui/dist/assets/{quadrantDiagram-W4KKPZXB-DQyQN5K7.js → quadrantDiagram-W4KKPZXB-CXKUOw1G.js} +2 -2
  39. package/ui/dist/assets/{requirementDiagram-4Y6WPE33-CDrkwz1t.js → requirementDiagram-4Y6WPE33-DBmmmiXs.js} +4 -4
  40. package/ui/dist/assets/{sankeyDiagram-5OEKKPKP-BrYb9Eql.js → sankeyDiagram-5OEKKPKP-BNADiaE4.js} +2 -2
  41. package/ui/dist/assets/{sequenceDiagram-3UESZ5HK-B8If_JZp.js → sequenceDiagram-3UESZ5HK-CctElOC5.js} +14 -14
  42. package/ui/dist/assets/stateDiagram-AJRCARHV-D40_7g7Y.js +1 -0
  43. package/ui/dist/assets/stateDiagram-v2-BHNVJYJU-DSc6L6rE.js +1 -0
  44. package/ui/dist/assets/theme-BJgORXba.css +1 -0
  45. package/ui/dist/assets/{theme-DV7vqTnV.js → theme-DxqwV6dp.js} +1 -1
  46. package/ui/dist/assets/{timeline-definition-PNZ67QCA-DhUg6aIV.js → timeline-definition-PNZ67QCA-DMVhUcek.js} +2 -2
  47. package/ui/dist/assets/{vennDiagram-CIIHVFJN-DpQVNNzF.js → vennDiagram-CIIHVFJN-Ci0RqPuV.js} +2 -2
  48. package/ui/dist/assets/visual-editor-UWcMGp6p.js +39 -0
  49. package/ui/dist/assets/{wardley-L42UT6IY-CyaxzHGP.js → wardley-L42UT6IY-Chn0BKir.js} +1 -1
  50. package/ui/dist/assets/{wardleyDiagram-YWT4CUSO-Bm0mA7wm.js → wardleyDiagram-YWT4CUSO-BLdXlrC5.js} +2 -2
  51. package/ui/dist/assets/{xychartDiagram-2RQKCTM6-OJbmgDx6.js → xychartDiagram-2RQKCTM6-C4gOVVe1.js} +2 -2
  52. package/ui/dist/graph.html +3 -3
  53. package/ui/dist/index.html +4 -3
  54. package/ui/dist/assets/architectureDiagram-3BPJPVTR-Cun_Ijrv.js +0 -36
  55. package/ui/dist/assets/channel-CNwAp9ic.js +0 -1
  56. package/ui/dist/assets/classDiagram-4FO5ZUOK-DnHeGLmR.js +0 -1
  57. package/ui/dist/assets/classDiagram-v2-Q7XG4LA2-DnHeGLmR.js +0 -1
  58. package/ui/dist/assets/cose-bilkent-S5V4N54A-CAM4jLYo.js +0 -1
  59. package/ui/dist/assets/dagre-BM42HDAG-CISbgani.js +0 -4
  60. package/ui/dist/assets/diagram-2AECGRRQ-BmXargwF.js +0 -43
  61. package/ui/dist/assets/diagram-5GNKFQAL-COlrLu0O.js +0 -10
  62. package/ui/dist/assets/diagram-LMA3HP47-C3AVVxcm.js +0 -24
  63. package/ui/dist/assets/diagram-OG6HWLK6-JHeftSsO.js +0 -24
  64. package/ui/dist/assets/ganttDiagram-6RSMTGT7-DrYn1H_t.js +0 -292
  65. package/ui/dist/assets/gitGraphDiagram-PVQCEYII-vJByl99X.js +0 -106
  66. package/ui/dist/assets/infoDiagram-5YYISTIA-D6zhGTMj.js +0 -2
  67. package/ui/dist/assets/main-BBzCq-49.js +0 -308
  68. package/ui/dist/assets/mermaid.core-Bddhr0ku.js +0 -309
  69. package/ui/dist/assets/stateDiagram-AJRCARHV-BbpTp9VX.js +0 -1
  70. package/ui/dist/assets/stateDiagram-v2-BHNVJYJU-BT4PvMFS.js +0 -1
  71. package/ui/dist/assets/theme-SpsWsRN5.css +0 -1
@@ -1,309 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-CISbgani.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/main-BBzCq-49.js","assets/theme-DV7vqTnV.js","assets/theme-SpsWsRN5.css","assets/transform-BwXaE9hv.js","assets/cose-bilkent-S5V4N54A-CAM4jLYo.js","assets/cytoscape.esm-DTSO7Bv0.js","assets/c4Diagram-AAUBKEIU-BIwHcwcH.js","assets/chunk-ND2GUHAM-DCAuTSxB.js","assets/flowDiagram-I6XJVG4X-D-q1cK69.js","assets/chunk-FMBD7UC4-BhH8ir2K.js","assets/chunk-55IACEB6-BrAelyhX.js","assets/chunk-2J33WTMH-DXRgHPpp.js","assets/channel-CNwAp9ic.js","assets/erDiagram-TEJ5UH35-BSWwMysi.js","assets/gitGraphDiagram-PVQCEYII-vJByl99X.js","assets/chunk-4BX2VUAB-BTb70kIb.js","assets/chunk-QZHKN3VN-DtYEkbYr.js","assets/wardley-L42UT6IY-CyaxzHGP.js","assets/ganttDiagram-6RSMTGT7-DrYn1H_t.js","assets/linear-COY9pyF4.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-D6zhGTMj.js","assets/pieDiagram-4H26LBE5-C7GJ49et.js","assets/arc-DhC0JPue.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-DQyQN5K7.js","assets/xychartDiagram-2RQKCTM6-OJbmgDx6.js","assets/requirementDiagram-4Y6WPE33-CDrkwz1t.js","assets/sequenceDiagram-3UESZ5HK-B8If_JZp.js","assets/classDiagram-4FO5ZUOK-DnHeGLmR.js","assets/chunk-727SXJPM-BlYnlPdj.js","assets/classDiagram-v2-Q7XG4LA2-DnHeGLmR.js","assets/stateDiagram-AJRCARHV-BbpTp9VX.js","assets/chunk-AQP2D5EJ-DSPgdKZ8.js","assets/stateDiagram-v2-BHNVJYJU-BT4PvMFS.js","assets/journeyDiagram-JHISSGLW-jKj4lBEJ.js","assets/timeline-definition-PNZ67QCA-DhUg6aIV.js","assets/mindmap-definition-RKZ34NQL-CPY2Fdu_.js","assets/kanban-definition-UN3LZRKU-PZ-5AYw2.js","assets/sankeyDiagram-5OEKKPKP-BrYb9Eql.js","assets/diagram-LMA3HP47-C3AVVxcm.js","assets/diagram-2AECGRRQ-BmXargwF.js","assets/blockDiagram-GPEHLZMM-CgiNAArN.js","assets/diagram-5GNKFQAL-COlrLu0O.js","assets/architectureDiagram-3BPJPVTR-Cun_Ijrv.js","assets/diagram-KO2AKTUF-B-kUxuHX.js","assets/ishikawaDiagram-YF4QCWOH-CY-U_l7l.js","assets/vennDiagram-CIIHVFJN-DpQVNNzF.js","assets/diagram-OG6HWLK6-JHeftSsO.js","assets/wardleyDiagram-YWT4CUSO-Bm0mA7wm.js"])))=>i.map(i=>d[i]);
2
- var If=Object.defineProperty;var Df=(e,t,r)=>t in e?If(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var wt=(e,t,r)=>Df(e,typeof t!="symbol"?t+"":t,r);import{_ as gt}from"./main-BBzCq-49.js";import{s as ht}from"./transform-BwXaE9hv.js";const ja=Math.PI,Ga=2*ja,cr=1e-6,Pf=Ga-cr;function wh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Rf(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return wh;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 qf{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?wh:Rf(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,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}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 o=this._x1,n=this._y1,l=i-t,h=s-r,c=o-t,d=n-r,p=c*c+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>cr)if(!(Math.abs(d*l-h*c)>cr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-o,y=s-n,f=l*l+h*h,m=u*u+y*y,C=Math.sqrt(f),b=Math.sqrt(p),k=a*Math.tan((ja-Math.acos((f+p-m)/(2*C*b)))/2),S=k/b,w=k/C;Math.abs(S-1)>cr&&this._append`L${t+S*c},${r+S*d}`,this._append`A${a},${a},0,0,${+(d*u>c*y)},${this._x1=t+w*l},${this._y1=r+w*h}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),h=t+n,c=r+l,d=1^o,p=o?s-a:a-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>cr||Math.abs(this._y1-c)>cr)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%Ga+Ga),p>Pf?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=h},${this._y1=c}`:p>cr&&this._append`A${i},${i},0,${+(p>=ja)},${d},${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 Lr(e){return function(){return e}}const nS=Math.abs,lS=Math.atan2,hS=Math.cos,cS=Math.max,dS=Math.min,uS=Math.sin,pS=Math.sqrt,il=1e-12,No=Math.PI,sl=No/2,gS=2*No;function fS(e){return e>1?0:e<-1?No:Math.acos(e)}function mS(e){return e>=1?sl:e<=-1?-sl:Math.asin(e)}function Nf(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 qf(t)}function zf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _h(e){this._context=e}_h.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 Li(e){return new _h(e)}function Wf(e){return e[0]}function Hf(e){return e[1]}function Yf(e,t){var r=Lr(!0),i=null,s=Li,a=null,o=Nf(n);e=typeof e=="function"?e:e===void 0?Wf:Lr(e),t=typeof t=="function"?t:t===void 0?Hf:Lr(t);function n(l){var h,c=(l=zf(l)).length,d,p=!1,u;for(i==null&&(a=s(u=o())),h=0;h<=c;++h)!(h<c&&r(d=l[h],h,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(d,h,l),+t(d,h,l));if(u)return a=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Lr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Lr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Lr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class Bh{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 vh(e){return new Bh(e,!0)}function Lh(e){return new Bh(e,!1)}function tr(){}function Ss(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 Xs(e){this._context=e}Xs.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:Ss(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:Ss(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xa(e){return new Xs(e)}function Fh(e){this._context=e}Fh.prototype={areaStart:tr,areaEnd:tr,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:Ss(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Uf(e){return new Fh(e)}function Ah(e){this._context=e}Ah.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:Ss(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jf(e){return new Ah(e)}function Eh(e,t){this._basis=new Xs(e),this._beta=t}Eh.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,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Gf=(function e(t){function r(i){return t===1?new Xs(i):new Eh(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ws(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 zo(e,t){this._context=e,this._k=(1-t)/6}zo.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:ws(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:ws(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 Mh=(function e(t){function r(i){return new zo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Wo(e,t){this._context=e,this._k=(1-t)/6}Wo.prototype={areaStart:tr,areaEnd:tr,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:ws(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 Xf=(function e(t){function r(i){return new Wo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ho(e,t){this._context=e,this._k=(1-t)/6}Ho.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:ws(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 Vf=(function e(t){function r(i){return new Ho(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Yo(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>il){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>il){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function $h(e,t){this._context=e,this._alpha=t}$h.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:Yo(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 Oh=(function e(t){function r(i){return t?new $h(i,t):new zo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ih(e,t){this._context=e,this._alpha=t}Ih.prototype={areaStart:tr,areaEnd:tr,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:Yo(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 Zf=(function e(t){function r(i){return t?new Ih(i,t):new Wo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Dh(e,t){this._context=e,this._alpha=t}Dh.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:Yo(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 Kf=(function e(t){function r(i){return t?new Dh(i,t):new Ho(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ph(e){this._context=e}Ph.prototype={areaStart:tr,areaEnd:tr,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 Qf(e){return new Ph(e)}function al(e){return e<0?-1:1}function ol(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(al(a)+al(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function nl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function La(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function _s(e){this._context=e}_s.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:La(this,this._t0,nl(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,La(this,nl(this,r=ol(this,e,t)),r);break;default:La(this,this._t0,r=ol(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Rh(e){this._context=new qh(e)}(Rh.prototype=Object.create(_s.prototype)).point=function(e,t){_s.prototype.point.call(this,t,e)};function qh(e){this._context=e}qh.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 Nh(e){return new _s(e)}function zh(e){return new Rh(e)}function Wh(e){this._context=e}Wh.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=ll(e),s=ll(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(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 ll(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[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 Hh(e){return new Wh(e)}function Vs(e,t){this._context=e,this._t=t}Vs.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 Yh(e){return new Vs(e,.5)}function Uh(e){return new Vs(e,0)}function jh(e){return new Vs(e,1)}function Jf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var us={exports:{}},tm=us.exports,hl;function em(){return hl||(hl=1,(function(e,t){(function(r,i){e.exports=i()})(tm,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="week",d="month",p="quarter",u="year",y="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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(P){var E=["th","st","nd","rd"],L=P%100;return"["+P+(E[(L-20)%10]||E[L]||E[0])+"]"}},k=function(P,E,L){var O=String(P);return!O||O.length>=E?P:""+Array(E+1-O.length).join(L)+P},S={s:k,z:function(P){var E=-P.utcOffset(),L=Math.abs(E),O=Math.floor(L/60),A=L%60;return(E<=0?"+":"-")+k(O,2,"0")+":"+k(A,2,"0")},m:function P(E,L){if(E.date()<L.date())return-P(L,E);var O=12*(L.year()-E.year())+(L.month()-E.month()),A=E.clone().add(O,d),_=L-A<0,N=E.clone().add(O+(_?-1:1),d);return+(-(O+(L-A)/(_?A-N:N-A))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:u,w:c,d:h,D:y,h:l,m:n,s:o,ms:a,Q:p}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},w="en",B={};B[w]=b;var M="$isDayjsObject",v=function(P){return P instanceof Y||!(!P||!P[M])},W=function P(E,L,O){var A;if(!E)return w;if(typeof E=="string"){var _=E.toLowerCase();B[_]&&(A=_),L&&(B[_]=L,A=_);var N=E.split("-");if(!A&&N.length>1)return P(N[0])}else{var V=E.name;B[V]=E,A=V}return!O&&A&&(w=A),A||!O&&w},D=function(P,E){if(v(P))return P.clone();var L=typeof E=="object"?E:{};return L.date=P,L.args=arguments,new Y(L)},I=S;I.l=W,I.i=v,I.w=function(P,E){return D(P,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Y=(function(){function P(L){this.$L=W(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[M]=!0}var E=P.prototype;return E.parse=function(L){this.$d=(function(O){var A=O.date,_=O.utc;if(A===null)return new Date(NaN);if(I.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var N=A.match(m);if(N){var V=N[2]-1||0,dt=(N[7]||"0").substring(0,3);return _?new Date(Date.UTC(N[1],V,N[3]||1,N[4]||0,N[5]||0,N[6]||0,dt)):new Date(N[1],V,N[3]||1,N[4]||0,N[5]||0,N[6]||0,dt)}}return new Date(A)})(L),this.init()},E.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},E.$utils=function(){return I},E.isValid=function(){return this.$d.toString()!==f},E.isSame=function(L,O){var A=D(L);return this.startOf(O)<=A&&A<=this.endOf(O)},E.isAfter=function(L,O){return D(L)<this.startOf(O)},E.isBefore=function(L,O){return this.endOf(O)<D(L)},E.$g=function(L,O,A){return I.u(L)?this[O]:this.set(A,L)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(L,O){var A=this,_=!!I.u(O)||O,N=I.p(L),V=function(le,et){var X=I.w(A.$u?Date.UTC(A.$y,et,le):new Date(A.$y,et,le),A);return _?X:X.endOf(h)},dt=function(le,et){return I.w(A.toDate()[le].apply(A.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(et)),A)},ft=this.$W,ut=this.$M,Ct=this.$D,vt="set"+(this.$u?"UTC":"");switch(N){case u:return _?V(1,0):V(31,11);case d:return _?V(1,ut):V(0,ut+1);case c:var Nt=this.$locale().weekStart||0,ae=(ft<Nt?ft+7:ft)-Nt;return V(_?Ct-ae:Ct+(6-ae),ut);case h:case y:return dt(vt+"Hours",0);case l:return dt(vt+"Minutes",1);case n:return dt(vt+"Seconds",2);case o:return dt(vt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(L){return this.startOf(L,!1)},E.$set=function(L,O){var A,_=I.p(L),N="set"+(this.$u?"UTC":""),V=(A={},A[h]=N+"Date",A[y]=N+"Date",A[d]=N+"Month",A[u]=N+"FullYear",A[l]=N+"Hours",A[n]=N+"Minutes",A[o]=N+"Seconds",A[a]=N+"Milliseconds",A)[_],dt=_===h?this.$D+(O-this.$W):O;if(_===d||_===u){var ft=this.clone().set(y,1);ft.$d[V](dt),ft.init(),this.$d=ft.set(y,Math.min(this.$D,ft.daysInMonth())).$d}else V&&this.$d[V](dt);return this.init(),this},E.set=function(L,O){return this.clone().$set(L,O)},E.get=function(L){return this[I.p(L)]()},E.add=function(L,O){var A,_=this;L=Number(L);var N=I.p(O),V=function(ut){var Ct=D(_);return I.w(Ct.date(Ct.date()+Math.round(ut*L)),_)};if(N===d)return this.set(d,this.$M+L);if(N===u)return this.set(u,this.$y+L);if(N===h)return V(1);if(N===c)return V(7);var dt=(A={},A[n]=i,A[l]=s,A[o]=r,A)[N]||1,ft=this.$d.getTime()+L*dt;return I.w(ft,this)},E.subtract=function(L,O){return this.add(-1*L,O)},E.format=function(L){var O=this,A=this.$locale();if(!this.isValid())return A.invalidDate||f;var _=L||"YYYY-MM-DDTHH:mm:ssZ",N=I.z(this),V=this.$H,dt=this.$m,ft=this.$M,ut=A.weekdays,Ct=A.months,vt=A.meridiem,Nt=function(et,X,St,lt){return et&&(et[X]||et(O,_))||St[X].slice(0,lt)},ae=function(et){return I.s(V%12||12,et,"0")},le=vt||function(et,X,St){var lt=et<12?"AM":"PM";return St?lt.toLowerCase():lt};return _.replace(C,(function(et,X){return X||(function(St){switch(St){case"YY":return String(O.$y).slice(-2);case"YYYY":return I.s(O.$y,4,"0");case"M":return ft+1;case"MM":return I.s(ft+1,2,"0");case"MMM":return Nt(A.monthsShort,ft,Ct,3);case"MMMM":return Nt(Ct,ft);case"D":return O.$D;case"DD":return I.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return Nt(A.weekdaysMin,O.$W,ut,2);case"ddd":return Nt(A.weekdaysShort,O.$W,ut,3);case"dddd":return ut[O.$W];case"H":return String(V);case"HH":return I.s(V,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return le(V,dt,!0);case"A":return le(V,dt,!1);case"m":return String(dt);case"mm":return I.s(dt,2,"0");case"s":return String(O.$s);case"ss":return I.s(O.$s,2,"0");case"SSS":return I.s(O.$ms,3,"0");case"Z":return N}return null})(et)||N.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(L,O,A){var _,N=this,V=I.p(O),dt=D(L),ft=(dt.utcOffset()-this.utcOffset())*i,ut=this-dt,Ct=function(){return I.m(N,dt)};switch(V){case u:_=Ct()/12;break;case d:_=Ct();break;case p:_=Ct()/3;break;case c:_=(ut-ft)/6048e5;break;case h:_=(ut-ft)/864e5;break;case l:_=ut/s;break;case n:_=ut/i;break;case o:_=ut/r;break;default:_=ut}return A?_:I.a(_)},E.daysInMonth=function(){return this.endOf(d).$D},E.$locale=function(){return B[this.$L]},E.locale=function(L,O){if(!L)return this.$L;var A=this.clone(),_=W(L,O,!0);return _&&(A.$L=_),A},E.clone=function(){return I.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},P})(),H=Y.prototype;return D.prototype=H,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",d],["$y",u],["$D",y]].forEach((function(P){H[P[1]]=function(E){return this.$g(E,P[0],P[1])}})),D.extend=function(P,E){return P.$i||(P(E,Y,D),P.$i=!0),D},D.locale=W,D.isDayjs=v,D.unix=function(P){return D(1e3*P)},D.en=B[w],D.Ls=B,D.p={},D}))})(us)),us.exports}var rm=em();const im=Jf(rm);var Gh=Object.defineProperty,g=(e,t)=>Gh(e,"name",{value:t,configurable:!0}),sm=(e,t)=>{for(var r in t)Gh(e,r,{get:t[r],enumerable:!0})},Ie={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Uo=g(function(e="fatal"){let t=Ie.fatal;typeof e=="string"?e.toLowerCase()in Ie&&(t=Ie[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=Ie.fatal&&(z.fatal=console.error?console.error.bind(console,de("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",de("FATAL"))),t<=Ie.error&&(z.error=console.error?console.error.bind(console,de("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",de("ERROR"))),t<=Ie.warn&&(z.warn=console.warn?console.warn.bind(console,de("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",de("WARN"))),t<=Ie.info&&(z.info=console.info?console.info.bind(console,de("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",de("INFO"))),t<=Ie.debug&&(z.debug=console.debug?console.debug.bind(console,de("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("DEBUG"))),t<=Ie.trace&&(z.trace=console.debug?console.debug.bind(console,de("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("TRACE")))},"setLogLevel"),de=g(e=>`%c${im().format("ss.SSS")} : ${e} : `,"format");const ps={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 ps.hue2rgb(a,s,e+1/3)*255;case"g":return ps.hue2rgb(a,s,e)*255;case"b":return ps.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),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},am={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},om={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:ps,lang:am,unit:om},Xe={};for(let e=0;e<=255;e++)Xe[e]=nt.unit.dec2hex(e);const jt={ALL:0,RGB:1,HSL:2};class nm{constructor(){this.type=jt.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=jt.ALL}is(t){return this.type===t}}class lm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new nm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=jt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(jt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(jt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(jt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(jt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(jt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(jt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Zs=new lm({r:0,g:0,b:0,a:0},"transparent"),Rr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Rr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return Zs.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}${Xe[Math.round(s*255)]}`:`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}`}},ur={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(ur.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ur.re);if(!r)return;const[,i,s,a,o,n]=r;return Zs.set({h:ur._hue2deg(i),s:nt.channel.clamp.s(parseFloat(s)),l:nt.channel.clamp.l(parseFloat(a)),a:o?nt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${s})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},Fi={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=Fi.colors[e];if(t)return Rr.parse(t)},stringify:e=>{const t=Rr.stringify(e);for(const r in Fi.colors)if(Fi.colors[r]===t)return r}},Ti={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(Ti.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return Zs.set({r:nt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:nt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?nt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(s)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},Ae={format:{keyword:Fi,hex:Rr,rgb:Ti,rgba:Ti,hsl:ur,hsla:ur},parse:e=>{if(typeof e!="string")return e;const t=Rr.parse(e)||Ti.parse(e)||ur.parse(e)||Fi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(jt.HSL)||e.data.r===void 0?ur.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ti.stringify(e):Rr.stringify(e)},Xh=(e,t)=>{const r=Ae.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return Ae.stringify(r)},Qe=(e,t,r=0,i=1)=>{if(typeof e!="number")return Xh(e,{a:t});const s=Zs.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return Ae.stringify(s)},hm=e=>{const{r:t,g:r,b:i}=Ae.parse(e),s=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(s)},cm=e=>hm(e)>=.5,ke=e=>!cm(e),Vh=(e,t,r)=>{const i=Ae.parse(e),s=i[t],a=nt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Ae.stringify(i)},R=(e,t)=>Vh(e,"l",t),q=(e,t)=>Vh(e,"l",-t),x=(e,t)=>{const r=Ae.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Xh(e,i)},dm=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Ae.parse(e),{r:n,g:l,b:h,a:c}=Ae.parse(t),d=r/100,p=d*2-1,u=o-c,f=((p*u===-1?p:(p+u)/(1+p*u))+1)/2,m=1-f,C=i*f+n*m,b=s*f+l*m,k=a*f+h*m,S=o*d+c*(1-d);return Qe(C,b,k,S)},F=(e,t=100)=>{const r=Ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,dm(r,e,t)};/*! @license DOMPurify 3.4.11 | (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.11/LICENSE */function cl(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 um(e){if(Array.isArray(e))return e}function pm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return n}}function gm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fm(e,t){return um(e)||pm(e,t)||mm(e,t)||gm()}function mm(e,t){if(e){if(typeof e=="string")return cl(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)?cl(e,t):void 0}}const Zh=Object.entries,dl=Object.setPrototypeOf,ym=Object.isFrozen,Cm=Object.getPrototypeOf,xm=Object.getOwnPropertyDescriptor;let Yt=Object.freeze,Ut=Object.seal,Mr=Object.create,Kh=typeof Reflect<"u"&&Reflect,Va=Kh.apply,Za=Kh.construct;Yt||(Yt=function(t){return t});Ut||(Ut=function(t){return t});Va||(Va=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)});Za||(Za=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 pi=$t(Array.prototype.forEach),bm=$t(Array.prototype.lastIndexOf),ul=$t(Array.prototype.pop),Fr=$t(Array.prototype.push),km=$t(Array.prototype.splice),Ve=Array.isArray,Si=$t(String.prototype.toLowerCase),Fa=$t(String.prototype.toString),pl=$t(String.prototype.match),gi=$t(String.prototype.replace),gl=$t(String.prototype.indexOf),Tm=$t(String.prototype.trim),Sm=$t(Number.prototype.toString),wm=$t(Boolean.prototype.toString),fl=typeof BigInt>"u"?null:$t(BigInt.prototype.toString),ml=typeof Symbol>"u"?null:$t(Symbol.prototype.toString),Rt=$t(Object.prototype.hasOwnProperty),fi=$t(Object.prototype.toString),zt=$t(RegExp.prototype.test),nr=_m(TypeError);function $t(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 Va(e,t,i)}}function _m(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Za(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Si;if(dl&&dl(e,null),!Ve(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(ym(t)||(t[i]=a),s=a)}e[s]=!0}return e}function Bm(e){for(let t=0;t<e.length;t++)Rt(e,t)||(e[t]=null);return e}function Qt(e){const t=Mr(null);for(const i of Zh(e)){var r=fm(i,2);const s=r[0],a=r[1];Rt(e,s)&&(Ve(a)?t[s]=Bm(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Qt(a):t[s]=a)}return t}function vm(e){switch(typeof e){case"string":return e;case"number":return Sm(e);case"boolean":return wm(e);case"bigint":return fl?fl(e):"0";case"symbol":return ml?ml(e):"Symbol()";case"undefined":return fi(e);case"function":case"object":{if(e===null)return fi(e);const t=e,r=Be(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:fi(i)}return fi(e)}default:return fi(e)}}function Be(e,t){for(;e!==null;){const i=xm(e,t);if(i){if(i.get)return $t(i.get);if(typeof i.value=="function")return $t(i.value)}e=Cm(e)}function r(){return null}return r}function Lm(e){try{return zt(e,""),!0}catch{return!1}}const yl=Yt(["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"]),Aa=Yt(["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"]),Ea=Yt(["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"]),Fm=Yt(["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"]),Ma=Yt(["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"]),Am=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Cl=Yt(["#text"]),xl=Yt(["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"]),$a=Yt(["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","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","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-rendering","textlength","type","u1","u2","unicode","values","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"]),bl=Yt(["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"]),rs=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Em=Ut(/{{[\w\W]*|^[\w\W]*}}/g),Mm=Ut(/<%[\w\W]*|^[\w\W]*%>/g),$m=Ut(/\${[\w\W]*/g),Om=Ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),Im=Ut(/^aria-[\-\w]+$/),kl=Ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dm=Ut(/^(?:\w+script|data):/i),Pm=Ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rm=Ut(/^html$/i),qm=Ut(/^[a-z][.\w]*(-[.\w]+)+$/i),Tl=Ut(/<[/\w!]/g),Nm=Ut(/<[/\w]/g),zm=Ut(/<\/no(script|embed|frames)/i),Wm=Ut(/\/>/i),_e={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hm=function(){return typeof window>"u"?null:window},Ym=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(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Sl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ge=function(t,r,i,s){return Rt(t,r)&&Ve(t[r])?mt(s.base?Qt(s.base):{},t[r],s.transform):i};function Qh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hm();const t=j=>Qh(j);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==_e.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,p=n.prototype,u=Be(p,"cloneNode"),y=Be(p,"remove"),f=Be(p,"nextSibling"),m=Be(p,"childNodes"),C=Be(p,"parentNode"),b=Be(p,"shadowRoot"),k=Be(p,"attributes"),S=o&&o.prototype?Be(o.prototype,"nodeType"):null,w=o&&o.prototype?Be(o.prototype,"nodeName"):null;if(typeof a=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let B,M="",v,W=!1,D=0;const I=function(){if(D>0)throw nr('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.')},Y=function(T){I(),D++;try{return B.createHTML(T)}finally{D--}},H=function(T){I(),D++;try{return B.createScriptURL(T)}finally{D--}},P=function(){return W||(v=Ym(d,s),W=!0),v},E=r,L=E.implementation,O=E.createNodeIterator,A=E.createDocumentFragment,_=E.getElementsByTagName,N=i.importNode;let V=Sl();t.isSupported=typeof Zh=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const dt=Em,ft=Mm,ut=$m,Ct=Om,vt=Im,Nt=Dm,ae=Pm,le=qm;let et=kl,X=null;const St=mt({},[...yl,...Aa,...Ea,...Ma,...Cl]);let lt=null;const Te=mt({},[...xl,...$a,...bl,...rs]);let kt=Object.seal(Mr(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}})),Ye=null,ca=null;const he=Object.seal(Mr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Dn=!0,da=!0,Pn=!1,Rn=!0,Ue=!1,ci=!0,ar=!1,ua=!1,pa=null,ga=null,fa=!1,Sr=!1,Vi=!1,Zi=!1,qn=!0,Nn=!1;const zn="user-content-";let ma=!0,ya=!1,wr={},Se=null;const Ca=mt({},["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 Wn=null;const Hn=mt({},["audio","video","img","source","image","track"]);let xa=null;const Yn=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ki="http://www.w3.org/1998/Math/MathML",Qi="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml";let _r=we,ba=!1,ka=null;const xf=mt({},[Ki,Qi,we],Fa),Un=Yt(["mi","mo","mn","ms","mtext"]);let Ta=mt({},Un);const jn=Yt(["annotation-xml"]);let Sa=mt({},jn);const bf=mt({},["title","style","font","a","script"]);let di=null;const kf=["application/xhtml+xml","text/html"],Tf="text/html";let Lt=null,Br=null;const Sf=r.createElement("form"),Gn=function(T){return T instanceof RegExp||T instanceof Function},wa=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Br&&Br===T)return;(!T||typeof T!="object")&&(T={}),T=Qt(T),di=kf.indexOf(T.PARSER_MEDIA_TYPE)===-1?Tf:T.PARSER_MEDIA_TYPE,Lt=di==="application/xhtml+xml"?Fa:Si,X=Ge(T,"ALLOWED_TAGS",St,{transform:Lt}),lt=Ge(T,"ALLOWED_ATTR",Te,{transform:Lt}),ka=Ge(T,"ALLOWED_NAMESPACES",xf,{transform:Fa}),xa=Ge(T,"ADD_URI_SAFE_ATTR",Yn,{transform:Lt,base:Yn}),Wn=Ge(T,"ADD_DATA_URI_TAGS",Hn,{transform:Lt,base:Hn}),Se=Ge(T,"FORBID_CONTENTS",Ca,{transform:Lt}),Ye=Ge(T,"FORBID_TAGS",Qt({}),{transform:Lt}),ca=Ge(T,"FORBID_ATTR",Qt({}),{transform:Lt}),wr=Rt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Qt(T.USE_PROFILES):T.USE_PROFILES:!1,Dn=T.ALLOW_ARIA_ATTR!==!1,da=T.ALLOW_DATA_ATTR!==!1,Pn=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Rn=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ue=T.SAFE_FOR_TEMPLATES||!1,ci=T.SAFE_FOR_XML!==!1,ar=T.WHOLE_DOCUMENT||!1,Sr=T.RETURN_DOM||!1,Vi=T.RETURN_DOM_FRAGMENT||!1,Zi=T.RETURN_TRUSTED_TYPE||!1,fa=T.FORCE_BODY||!1,qn=T.SANITIZE_DOM!==!1,Nn=T.SANITIZE_NAMED_PROPS||!1,ma=T.KEEP_CONTENT!==!1,ya=T.IN_PLACE||!1,et=Lm(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:kl,_r=typeof T.NAMESPACE=="string"?T.NAMESPACE:we,Ta=Rt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qt(T.MATHML_TEXT_INTEGRATION_POINTS):mt({},Un),Sa=Rt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Qt(T.HTML_INTEGRATION_POINTS):mt({},jn);const $=Rt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Qt(T.CUSTOM_ELEMENT_HANDLING):Mr(null);if(kt=Mr(null),Rt($,"tagNameCheck")&&Gn($.tagNameCheck)&&(kt.tagNameCheck=$.tagNameCheck),Rt($,"attributeNameCheck")&&Gn($.attributeNameCheck)&&(kt.attributeNameCheck=$.attributeNameCheck),Rt($,"allowCustomizedBuiltInElements")&&typeof $.allowCustomizedBuiltInElements=="boolean"&&(kt.allowCustomizedBuiltInElements=$.allowCustomizedBuiltInElements),Ut(kt),Ue&&(da=!1),Vi&&(Sr=!0),wr&&(X=mt({},Cl),lt=Mr(null),wr.html===!0&&(mt(X,yl),mt(lt,xl)),wr.svg===!0&&(mt(X,Aa),mt(lt,$a),mt(lt,rs)),wr.svgFilters===!0&&(mt(X,Ea),mt(lt,$a),mt(lt,rs)),wr.mathMl===!0&&(mt(X,Ma),mt(lt,bl),mt(lt,rs))),he.tagCheck=null,he.attributeCheck=null,Rt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?he.tagCheck=T.ADD_TAGS:Ve(T.ADD_TAGS)&&(X===St&&(X=Qt(X)),mt(X,T.ADD_TAGS,Lt))),Rt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?he.attributeCheck=T.ADD_ATTR:Ve(T.ADD_ATTR)&&(lt===Te&&(lt=Qt(lt)),mt(lt,T.ADD_ATTR,Lt))),Rt(T,"ADD_URI_SAFE_ATTR")&&Ve(T.ADD_URI_SAFE_ATTR)&&mt(xa,T.ADD_URI_SAFE_ATTR,Lt),Rt(T,"FORBID_CONTENTS")&&Ve(T.FORBID_CONTENTS)&&(Se===Ca&&(Se=Qt(Se)),mt(Se,T.FORBID_CONTENTS,Lt)),Rt(T,"ADD_FORBID_CONTENTS")&&Ve(T.ADD_FORBID_CONTENTS)&&(Se===Ca&&(Se=Qt(Se)),mt(Se,T.ADD_FORBID_CONTENTS,Lt)),ma&&(X["#text"]=!0),ar&&mt(X,["html","head","body"]),X.table&&(mt(X,["tbody"]),delete Ye.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=B;B=T.TRUSTED_TYPES_POLICY;try{M=Y("")}catch(tt){throw B=U,tt}}else T.TRUSTED_TYPES_POLICY===null?(B=void 0,M=""):(B===void 0&&(B=P()),B&&typeof M=="string"&&(M=Y("")));Yt&&Yt(T),Br=T},Xn=mt({},[...Aa,...Ea,...Fm]),Vn=mt({},[...Ma,...Am]),wf=function(T,$,U){return $.namespaceURI===we?T==="svg":$.namespaceURI===Ki?T==="svg"&&(U==="annotation-xml"||Ta[U]):!!Xn[T]},_f=function(T,$,U){return $.namespaceURI===we?T==="math":$.namespaceURI===Qi?T==="math"&&Sa[U]:!!Vn[T]},Bf=function(T,$,U){return $.namespaceURI===Qi&&!Sa[U]||$.namespaceURI===Ki&&!Ta[U]?!1:!Vn[T]&&(bf[T]||!Xn[T])},vf=function(T){let $=C(T);(!$||!$.tagName)&&($={namespaceURI:_r,tagName:"template"});const U=Si(T.tagName),tt=Si($.tagName);return ka[T.namespaceURI]?T.namespaceURI===Qi?wf(U,$,tt):T.namespaceURI===Ki?_f(U,$,tt):T.namespaceURI===we?Bf(U,$,tt):!!(di==="application/xhtml+xml"&&ka[T.namespaceURI]):!1},je=function(T){Fr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(y(T),!C(T))throw nr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Zn=function(T){const $=m(T);if($){const tt=[];pi($,ct=>{Fr(tt,ct)}),pi(tt,ct=>{try{y(ct)}catch{}})}const U=k(T);if(U)for(let tt=U.length-1;tt>=0;--tt){const ct=U[tt],yt=ct&&ct.name;if(typeof yt=="string")try{T.removeAttribute(yt)}catch{}}},or=function(T,$){try{Fr(t.removed,{attribute:$.getAttributeNode(T),from:$})}catch{Fr(t.removed,{attribute:null,from:$})}if($.removeAttribute(T),T==="is")if(Sr||Vi)try{je($)}catch{}else try{$.setAttribute(T,"")}catch{}},Lf=function(T){const $=k(T);if($)for(let U=$.length-1;U>=0;--U){const tt=$[U],ct=tt&&tt.name;if(!(typeof ct!="string"||lt[Lt(ct)]))try{T.removeAttribute(ct)}catch{}}},Ff=function(T){const $=[T];for(;$.length>0;){const U=$.pop();(S?S(U):U.nodeType)===_e.element&&Lf(U);const ct=m(U);if(ct)for(let yt=ct.length-1;yt>=0;--yt)$.push(ct[yt])}},Kn=function(T){let $=null,U=null;if(fa)T="<remove></remove>"+T;else{const yt=pl(T,/^[\r\n\t ]+/);U=yt&&yt[0]}di==="application/xhtml+xml"&&_r===we&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const tt=B?Y(T):T;if(_r===we)try{$=new c().parseFromString(tt,di)}catch{}if(!$||!$.documentElement){$=L.createDocument(_r,"template",null);try{$.documentElement.innerHTML=ba?M:tt}catch{}}const ct=$.body||$.documentElement;return T&&U&&ct.insertBefore(r.createTextNode(U),ct.childNodes[0]||null),_r===we?_.call($,ar?"html":"body")[0]:ar?$.documentElement:ct},Qn=function(T){return O.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ji=function(T){return T=gi(T,dt," "),T=gi(T,ft," "),T=gi(T,ut," "),T},_a=function(T){var $;T.normalize();const U=O.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let tt=U.nextNode();for(;tt;)tt.data=Ji(tt.data),tt=U.nextNode();const ct=($=T.querySelectorAll)===null||$===void 0?void 0:$.call(T,"template");ct&&pi(ct,yt=>{vr(yt.content)&&_a(yt.content)})},ts=function(T){const $=w?w(T):null;return typeof $!="string"||Lt($)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==S(T)||T.childNodes!==m(T)},vr=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return S(T)===_e.documentFragment}catch{return!1}},ui=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return typeof S(T)=="number"}catch{return!1}};function Oe(j,T,$){j.length!==0&&pi(j,U=>{U.call(t,T,$,Br)})}const Af=function(T,$){return!!(ci&&T.hasChildNodes()&&!ui(T.firstElementChild)&&zt(Tl,T.textContent)&&zt(Tl,T.innerHTML)||ci&&T.namespaceURI===we&&$==="style"&&ui(T.firstElementChild)||T.nodeType===_e.processingInstruction||ci&&T.nodeType===_e.comment&&zt(Nm,T.data))},Ef=function(T,$){if(!Ye[$]&&el($)&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,$)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck($)))return!1;if(ma&&!Se[$]){const U=C(T),tt=m(T);if(tt&&U){const ct=tt.length;for(let yt=ct-1;yt>=0;--yt){const Pt=ya?tt[yt]:u(tt[yt],!0);U.insertBefore(Pt,f(T))}}}return je(T),!0},Jn=function(T){if(Oe(V.beforeSanitizeElements,T,null),ts(T))return je(T),!0;const $=Lt(w?w(T):T.nodeName);if(Oe(V.uponSanitizeElement,T,{tagName:$,allowedTags:X}),Af(T,$))return je(T),!0;if(Ye[$]||!(he.tagCheck instanceof Function&&he.tagCheck($))&&!X[$])return Ef(T,$);if((S?S(T):T.nodeType)===_e.element&&!vf(T)||($==="noscript"||$==="noembed"||$==="noframes")&&zt(zm,T.innerHTML))return je(T),!0;if(Ue&&T.nodeType===_e.text){const tt=Ji(T.textContent);T.textContent!==tt&&(Fr(t.removed,{element:T.cloneNode()}),T.textContent=tt)}return Oe(V.afterSanitizeElements,T,null),!1},tl=function(T,$,U){if(ca[$]||qn&&($==="id"||$==="name")&&(U in r||U in Sf))return!1;const tt=lt[$]||he.attributeCheck instanceof Function&&he.attributeCheck($,T);if(!(da&&zt(Ct,$))){if(!(Dn&&zt(vt,$))){if(tt){if(!xa[$]){if(!zt(et,gi(U,ae,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&T!=="script"&&gl(U,"data:")===0&&Wn[T])){if(!(Pn&&!zt(Nt,gi(U,ae,"")))){if(U)return!1}}}}}else if(!(el(T)&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,T)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(T))&&(kt.attributeNameCheck instanceof RegExp&&zt(kt.attributeNameCheck,$)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck($,T))||$==="is"&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,U)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(U))))return!1}}return!0},Mf=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),el=function(T){return!Mf[Si(T)]&&zt(le,T)},$f=function(T,$,U,tt){if(B&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!U)switch(d.getAttributeType(T,$)){case"TrustedHTML":return Y(tt);case"TrustedScriptURL":return H(tt)}return tt},Of=function(T,$,U,tt){try{U?T.setAttributeNS(U,$,tt):T.setAttribute($,tt),ts(T)?je(T):ul(t.removed)}catch{or($,T)}},rl=function(T){Oe(V.beforeSanitizeAttributes,T,null);const $=T.attributes;if(!$||ts(T))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:lt,forceKeepAttr:void 0};let tt=$.length;const ct=Lt(T.nodeName);for(;tt--;){const yt=$[tt],Pt=yt.name,Et=yt.namespaceURI,ce=yt.value,pe=Lt(Pt),va=ce;let Zt=Pt==="value"?va:Tm(va);if(U.attrName=pe,U.attrValue=Zt,U.keepAttr=!0,U.forceKeepAttr=void 0,Oe(V.uponSanitizeAttribute,T,U),Zt=U.attrValue,Nn&&(pe==="id"||pe==="name")&&gl(Zt,zn)!==0&&(or(Pt,T),Zt=zn+Zt),ci&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){or(Pt,T);continue}if(pe==="attributename"&&pl(Zt,"href")){or(Pt,T);continue}if(!U.forceKeepAttr){if(!U.keepAttr){or(Pt,T);continue}if(!Rn&&zt(Wm,Zt)){or(Pt,T);continue}if(Ue&&(Zt=Ji(Zt)),!tl(ct,pe,Zt)){or(Pt,T);continue}Zt=$f(ct,pe,Et,Zt),Zt!==va&&Of(T,Pt,Et,Zt)}}Oe(V.afterSanitizeAttributes,T,null)},es=function(T){let $=null;const U=Qn(T);for(Oe(V.beforeSanitizeShadowDOM,T,null);$=U.nextNode();)if(Oe(V.uponSanitizeShadowNode,$,null),Jn($),rl($),vr($.content)&&es($.content),(S?S($):$.nodeType)===_e.element){const ct=b($);vr(ct)&&(Ba(ct),es(ct))}Oe(V.afterSanitizeShadowDOM,T,null)},Ba=function(T){const $=[{node:T,shadow:null}];for(;$.length>0;){const U=$.pop();if(U.shadow){es(U.shadow);continue}const tt=U.node,yt=(S?S(tt):tt.nodeType)===_e.element,Pt=m(tt);if(Pt)for(let Et=Pt.length-1;Et>=0;--Et)$.push({node:Pt[Et],shadow:null});if(yt){const Et=w?w(tt):null;if(typeof Et=="string"&&Lt(Et)==="template"){const ce=tt.content;vr(ce)&&$.push({node:ce,shadow:null})}}if(yt){const Et=b(tt);vr(Et)&&$.push({node:null,shadow:Et},{node:Et,shadow:null})}}};return t.sanitize=function(j){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,U=null,tt=null,ct=null;if(ba=!j,ba&&(j="<!-->"),typeof j!="string"&&!ui(j)&&(j=vm(j),typeof j!="string"))throw nr("dirty is not a string, aborting");if(!t.isSupported)return j;ua?(X=pa,lt=ga):wa(T),(V.uponSanitizeElement.length>0||V.uponSanitizeAttribute.length>0)&&(X=Qt(X)),V.uponSanitizeAttribute.length>0&&(lt=Qt(lt)),t.removed=[];const yt=ya&&typeof j!="string"&&ui(j);if(yt){const ce=w?w(j):j.nodeName;if(typeof ce=="string"){const pe=Lt(ce);if(!X[pe]||Ye[pe])throw nr("root node is forbidden and cannot be sanitized in-place")}if(ts(j))throw nr("root node is clobbered and cannot be sanitized in-place");try{Ba(j)}catch(pe){throw Zn(j),pe}}else if(ui(j))$=Kn("<!---->"),U=$.ownerDocument.importNode(j,!0),U.nodeType===_e.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?$=U:$.appendChild(U),Ba(U);else{if(!Sr&&!Ue&&!ar&&j.indexOf("<")===-1)return B&&Zi?Y(j):j;if($=Kn(j),!$)return Sr?null:Zi?M:""}$&&fa&&je($.firstChild);const Pt=Qn(yt?j:$);try{for(;tt=Pt.nextNode();)Jn(tt),rl(tt),vr(tt.content)&&es(tt.content)}catch(ce){throw yt&&Zn(j),ce}if(yt)return pi(t.removed,ce=>{ce.element&&Ff(ce.element)}),Ue&&_a(j),j;if(Sr){if(Ue&&_a($),Vi)for(ct=A.call($.ownerDocument);$.firstChild;)ct.appendChild($.firstChild);else ct=$;return(lt.shadowroot||lt.shadowrootmode)&&(ct=N.call(i,ct,!0)),ct}let Et=ar?$.outerHTML:$.innerHTML;return ar&&X["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&zt(Rm,$.ownerDocument.doctype.name)&&(Et="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
4
- `+Et),Ue&&(Et=Ji(Et)),B&&Zi?Y(Et):Et},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wa(j),ua=!0,pa=X,ga=lt},t.clearConfig=function(){Br=null,ua=!1,pa=null,ga=null,B=v,M=""},t.isValidAttribute=function(j,T,$){Br||wa({});const U=Lt(j),tt=Lt(T);return tl(U,tt,$)},t.addHook=function(j,T){typeof T=="function"&&Rt(V,j)&&Fr(V[j],T)},t.removeHook=function(j,T){if(Rt(V,j)){if(T!==void 0){const $=bm(V[j],T);return $===-1?void 0:km(V[j],$,1)[0]}return ul(V[j])}},t.removeHooks=function(j){Rt(V,j)&&(V[j]=[])},t.removeAllHooks=function(){V=Sl()},t}var ti=Qh(),Jh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ai=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Um=/\s*%%.*\n/gm,Nr,tc=(Nr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(Nr,"UnknownDiagramError"),Nr),mr={},jo=g(function(e,t){e=e.replace(Jh,"").replace(Ai,"").replace(Um,`
5
- `);for(const[r,{detector:i}]of Object.entries(mr))if(i(e,t))return r;throw new tc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ka=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)ec(t,r,i)},"registerLazyLoadedDiagrams"),ec=g((e,t,r)=>{mr[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),mr[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),jm=g(e=>mr[e].loader,"getDiagramLoader"),Qa=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Qa(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Qa(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),It=Qa,Me="#ffffff",$e="#f2f2f2",ot=g((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),zr,Gm=(zr=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,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,w,B,M,v,W,D,I,Y,H,P,E,L,O,A,_;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),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||R(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||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,10)):(this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=q(this["cScale"+N],75);else for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=q(this["cScale"+N],25);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||F(this["cScale"+N]);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this.darkMode?this["cScalePeer"+N]=this["cScalePeer"+N]||R(this["cScale"+N],10):this["cScalePeer"+N]=this["cScalePeer"+N]||q(this["cScale"+N],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||x(this.mainBkg,{h:180,s:-15,l:t*(5+N*3)}),this["surfacePeer"+N]=this["surfacePeer"+N]||x(this.mainBkg,{h:180,s:-15,l:t*(8+N*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((u=this.wardley)==null?void 0:u.axisColor)||this.lineColor,axisTextColor:((y=this.wardley)==null?void 0:y.axisTextColor)||this.primaryTextColor,gridColor:((f=this.wardley)==null?void 0:f.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((b=this.wardley)==null?void 0:b.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((S=this.wardley)==null?void 0:S.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((B=this.wardley)==null?void 0:B.annotationTextColor)||this.primaryTextColor,annotationFill:((M=this.wardley)==null?void 0:M.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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((v=this.xyChart)==null?void 0:v.backgroundColor)||this.background,titleColor:((W=this.xyChart)==null?void 0:W.titleColor)||this.primaryTextColor,dataLabelColor:((D=this.xyChart)==null?void 0:D.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((I=this.xyChart)==null?void 0:I.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((H=this.xyChart)==null?void 0:H.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((P=this.xyChart)==null?void 0:P.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((L=this.xyChart)==null?void 0:L.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((A=this.xyChart)==null?void 0:A.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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?q(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(zr,"Theme"),zr),Xm=g(e=>{const t=new Gm;return t.calculate(e),t},"getThemeVariables"),Wr,Vm=(Wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Qe(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=q("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=q(this.sectionBkgColor,10),this.taskBorderColor=Qe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Qe(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||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||q(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,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,w,B,M,v,W,D,I,Y,H,P,E,L,O,A;this.secondBkg=R(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=R(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=R(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=F(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],10);for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-10+_*4)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-7+_*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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 _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??R(this["cScale"+_],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((D=this.wardley)==null?void 0:D.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.componentFill)||this.mainBkg,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((O=this.wardley)==null?void 0:O.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.secondaryColor,20),this.git1=R(this.pie2||this.secondaryColor,20),this.git2=R(this.pie3||this.tertiaryColor,20),this.git3=R(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=R(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=R(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=R(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=R(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||R("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||R("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||R("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||R("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||R(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||R(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||R(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Wr,"Theme"),Wr),Zm=g(e=>{const t=new Vm;return t.calculate(e),t},"getThemeVariables"),Hr,Km=(Hr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(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=Qe(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,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,w,B,M,v,W,D,I,Y,H,P,E,L,O,A;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=q(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||q(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,l:-(7+_*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||F(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||F(this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||R(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||R(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((I=this.xyChart)==null?void 0:I.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((P=this.xyChart)==null?void 0:P.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||q(F(this.git0),25),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Hr,"Theme"),Hr),Qm=g(e=>{const t=new Km;return t.calculate(e),t},"getThemeVariables"),Yr,Jm=(Yr=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=R("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(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,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,w,B,M,v,W,D,I,Y,H,P,E,L,O,A;this.actorBorder=q(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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=q(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||q(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(8+_*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((I=this.xyChart)==null?void 0:I.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((P=this.xyChart)==null?void 0:P.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Yr,"Theme"),Yr),ty=g(e=>{const t=new Jm;return t.calculate(e),t},"getThemeVariables"),Ur,ey=(Ur=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=R(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(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||R(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,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,w,B,M,v,W,D,I,Y,H,P,E,L,O,A;this.secondBkg=R(this.contrast,55),this.border2=this.contrast,this.actorBorder=R(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||q(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{l:-(8+_*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=R(this.contrast,30),this.sectionBkgColor2=R(this.contrast,30),this.taskBorderColor=q(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=R(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=q(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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 _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??this["cScale"+_];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((D=this.wardley)==null?void 0:D.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.componentFill)||this.background,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((O=this.wardley)==null?void 0:O.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.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=q(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Ur,"Theme"),Ur),ry=g(e=>{const t=new ey;return t.calculate(e),t},"getThemeVariables"),jr,iy=(jr=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=ot(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,o,n,l,h,c,d,p,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||R(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||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||F(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.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||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?q(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(jr,"Theme"),jr),sy=g(e=>{const t=new iy;return t.calculate(e),t},"getThemeVariables"),Gr,ay=(Gr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=F(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,o,n,l,h,c,d,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||F(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?q(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=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Gr,"Theme"),Gr),oy=g(e=>{const t=new ay;return t.calculate(e),t},"getThemeVariables"),Xr,ny=(Xr=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=ot("#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,o,n,l,h,c,d,p,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||R(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 m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||F(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.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||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?q(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Xr,"Theme"),Xr),ly=g(e=>{const t=new ny;return t.calculate(e),t},"getThemeVariables"),Vr,hy=(Vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=F(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,o,n,l,h,c,d,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||F(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?q(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Vr,"Theme"),Vr),cy=g(e=>{const t=new hy;return t.calculate(e),t},"getThemeVariables"),Zr,dy=(Zr=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=ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,d,p,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||F(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(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 s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.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||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?q(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Zr,"Theme"),Zr),uy=g(e=>{const t=new dy;return t.calculate(e),t},"getThemeVariables"),Kr,py=(Kr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,d,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||F(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=q(this["cScale"+u],75);const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?q(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$e}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Kr,"Theme"),Kr),gy=g(e=>{const t=new py;return t.calculate(e),t},"getThemeVariables"),Re={base:{getThemeVariables:Xm},dark:{getThemeVariables:Zm},default:{getThemeVariables:Qm},forest:{getThemeVariables:ty},neutral:{getThemeVariables:ry},neo:{getThemeVariables:sy},"neo-dark":{getThemeVariables:oy},redux:{getThemeVariables:ly},"redux-dark":{getThemeVariables:cy},"redux-color":{getThemeVariables:uy},"redux-dark-color":{getThemeVariables:gy}},Kt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},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,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},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},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},rc={...Kt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Re.default.getThemeVariables(),sequence:{...Kt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Kt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Kt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Kt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Kt.pie,useWidth:984},xyChart:{...Kt.xyChart,useWidth:void 0},requirement:{...Kt.requirement,useWidth:void 0},packet:{...Kt.packet},eventmodeling:{...Kt.eventmodeling},treeView:{...Kt.treeView,useWidth:void 0},radar:{...Kt.radar},ishikawa:{...Kt.ishikawa},sankey:{...Kt.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:{...Kt.venn}},ic=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...ic(e[i],"")]:[...r,t+i],[]),"keyify"),fy=new Set(ic(rc,"")),sc=rc,Bs=g(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Bs(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!fy.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(z.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else z.debug("sanitizing object",t),Bs(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=ac(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]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),ac=g(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"),ei=Object.freeze(sc),ze=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=It({},ei),vs,yr=[],Ei=It({},ei),Ks=g((e,t)=>{let r=It({},e),i={};for(const s of t)lc(s),i=It(i,s);if(r=It(r,i),i.theme&&i.theme in Re){const s=It({},vs),a=It(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Re&&(r.themeVariables=Re[r.theme].getThemeVariables(a))}return Ei=r,cc(Ei),Ei},"updateCurrentConfig"),my=g(e=>(ie=It({},ei),ie=It(ie,e),e.theme&&Re[e.theme]&&(ie.themeVariables=Re[e.theme].getThemeVariables(e.themeVariables)),Ks(ie,yr),ie),"setSiteConfig"),yy=g(e=>{vs=It({},e)},"saveConfigFromInitialize"),Cy=g(e=>(ie=It(ie,e),Ks(ie,yr),ie),"updateSiteConfig"),oc=g(()=>It({},ie),"getSiteConfig"),nc=g(e=>(cc(e),It(Ei,e),Bt()),"setConfig"),Bt=g(()=>It({},Ei),"getConfig"),lc=g(e=>{e&&(["secure",...ie.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&lc(e[t])}))},"sanitize"),xy=g(e=>{var t;Bs(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),yr.push(e),Ks(ie,yr)},"addDirective"),Ls=g((e=ie)=>{yr=[],Ks(e,yr)},"reset"),by={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."},wl={},hc=g(e=>{wl[e]||(z.warn(by[e]),wl[e]=!0)},"issueWarning"),cc=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&hc("LAZY_LOAD_DEPRECATED")},"checkConfig"),yS=g(()=>{let e={};vs&&(e=It(e,vs));for(const t of yr)e=It(e,t);return e},"getUserDefinedConfig"),ee=g(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&hc("FLOWCHART_HTML_LABELS_DEPRECATED"),ze(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Wi=/<br\s*\/?>/gi,ky=g(e=>e?pc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ty=(()=>{let e=!1;return()=>{e||(dc(),e=!0)}})();function dc(){const e="data-temp-href-target";ti.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ti.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"))})}g(dc,"setupDompurifyHooks");var uc=g(e=>(Ty(),ti.sanitize(e)),"removeScript"),_l=g((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=uc(e):r!=="loose"&&(e=pc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=By(e))}return e},"sanitizeMore"),be=g((e,t)=>e&&(t.dompurifyConfig?e=ti.sanitize(_l(e,t),t.dompurifyConfig).toString():e=ti.sanitize(_l(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Sy=g((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),wy=g(e=>Wi.test(e),"hasBreaks"),_y=g(e=>e.split(Wi),"splitBreaks"),By=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),pc=g(e=>e.replace(Wi,"#br#"),"breakToPlaceholder"),vy=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Ly=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Fy=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Bl=g(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],o=t[i+1];Ay(a,o)&&(s=a+","+o,i++,r.pop())}r.push(Ey(s))}return r.join("")},"parseGenericTypes"),Ja=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Ay=g((e,t)=>{const r=Ja(e,"~"),i=Ja(t,"~");return r===1&&i===1},"shouldCombineSets"),Ey=g(e=>{const t=Ja(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"),vl=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),to=/\$\$(.*)\$\$/g,Oi=g(e=>{var t;return(((t=e.match(to))==null?void 0:t.length)??0)>0},"hasKatex"),CS=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await gc(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"),My=g(async(e,t)=>{if(!Oi(e))return e;if(!(vl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(to,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!vl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Wi).map(s=>Oi(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(to,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),gc=g(async(e,t)=>be(await My(e,t),t),"renderKatexSanitized"),Hi={getRows:ky,sanitizeText:be,sanitizeTextOrArray:Sy,hasBreaks:wy,splitBreaks:_y,lineBreakRegex:Wi,removeScript:uc,getUrl:vy,evaluate:ze,getMax:Ly,getMin:Fy},$y=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Oy=g(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"),fc=g(function(e,t,r,i){const s=Oy(t,r,i);$y(e,s)},"configureSvgSize"),Iy=g(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;z.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;z.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,z.info(`Calculated bounds: ${n}x${l}`),fc(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),gs={};function eo(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
- `)}g(eo,"cssStyleSheetToString");var Dy=g((e,t,r,i)=>{let s="";return e in gs&&gs[e]?s=gs[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),` & {
7
- font-family: ${r.fontFamily};
8
- font-size: ${r.fontSize};
9
- fill: ${r.textColor}
10
- }
11
- @keyframes edge-animation-frame {
12
- from {
13
- stroke-dashoffset: 0;
14
- }
15
- }
16
- @keyframes dash {
17
- to {
18
- stroke-dashoffset: 0;
19
- }
20
- }
21
- & .edge-animation-slow {
22
- stroke-dasharray: 9,5 !important;
23
- stroke-dashoffset: 900;
24
- animation: dash 50s linear infinite;
25
- stroke-linecap: round;
26
- }
27
- & .edge-animation-fast {
28
- stroke-dasharray: 9,5 !important;
29
- stroke-dashoffset: 900;
30
- animation: dash 20s linear infinite;
31
- stroke-linecap: round;
32
- }
33
- /* Classes common for multiple diagrams */
34
-
35
- & .error-icon {
36
- fill: ${r.errorBkgColor};
37
- }
38
- & .error-text {
39
- fill: ${r.errorTextColor};
40
- stroke: ${r.errorTextColor};
41
- }
42
-
43
- & .edge-thickness-normal {
44
- stroke-width: ${r.strokeWidth??1}px;
45
- }
46
- & .edge-thickness-thick {
47
- stroke-width: 3.5px
48
- }
49
- & .edge-pattern-solid {
50
- stroke-dasharray: 0;
51
- }
52
- & .edge-thickness-invisible {
53
- stroke-width: 0;
54
- fill: none;
55
- }
56
- & .edge-pattern-dashed{
57
- stroke-dasharray: 3;
58
- }
59
- .edge-pattern-dotted {
60
- stroke-dasharray: 2;
61
- }
62
-
63
- & .marker {
64
- fill: ${r.lineColor};
65
- stroke: ${r.lineColor};
66
- }
67
- & .marker.cross {
68
- stroke: ${r.lineColor};
69
- }
70
-
71
- & svg {
72
- font-family: ${r.fontFamily};
73
- font-size: ${r.fontSize};
74
- }
75
- & p {
76
- margin: 0
77
- }
78
-
79
- ${s}
80
- .node .neo-node {
81
- stroke: ${r.nodeBorder};
82
- }
83
-
84
- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
- }
88
-
89
-
90
- [data-look="neo"].node path {
91
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
92
- stroke-width: ${r.strokeWidth??1}px;
93
- }
94
-
95
- [data-look="neo"].node .outer-path {
96
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
97
- }
98
-
99
- [data-look="neo"].node .neo-line path {
100
- stroke: ${r.nodeBorder};
101
- filter: none;
102
- }
103
-
104
- [data-look="neo"].node circle{
105
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
106
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
107
- }
108
-
109
- [data-look="neo"].node circle .state-start{
110
- fill: #000000;
111
- }
112
-
113
- [data-look="neo"].icon-shape .icon {
114
- fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
115
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
116
- }
117
-
118
- [data-look="neo"].icon-shape .icon-neo path {
119
- stroke: ${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
- ${t}
124
- `},"getStyles"),Py=g((e,t)=>{t!==void 0&&(gs[e]=t)},"addStylesForDiagram"),Ry=Dy,mc={};sm(mc,{clear:()=>qy,getAccDescription:()=>Hy,getAccTitle:()=>zy,getDiagramTitle:()=>Uy,setAccDescription:()=>Wy,setAccTitle:()=>Ny,setDiagramTitle:()=>Yy});var Go="",Xo="",Vo="",Zo=g(e=>be(e,Bt()),"sanitizeText"),qy=g(()=>{Go="",Vo="",Xo=""},"clear"),Ny=g(e=>{Go=Zo(e).replace(/^\s+/g,"")},"setAccTitle"),zy=g(()=>Go,"getAccTitle"),Wy=g(e=>{Vo=Zo(e).replace(/\n\s+/g,`
125
- `)},"setAccDescription"),Hy=g(()=>Vo,"getAccDescription"),Yy=g(e=>{Xo=Zo(e)},"setDiagramTitle"),Uy=g(()=>Xo,"getDiagramTitle"),Ll=z,jy=Uo,xt=Bt,xS=nc,bS=ei,Ko=g(e=>be(e,xt()),"sanitizeText"),Gy=Iy,Xy=g(()=>mc,"getCommonDb"),Fs={},As=g((e,t,r)=>{var i;Fs[e]&&Ll.warn(`Diagram with id ${e} already registered. Overwriting.`),Fs[e]=t,r&&ec(e,r),Py(e,t.styles),(i=t.injectUtils)==null||i.call(t,Ll,jy,xt,Ko,Gy,Xy(),()=>{})},"registerDiagram"),ro=g(e=>{if(e in Fs)return Fs[e];throw new Vy(e)},"getDiagram"),Qr,Vy=(Qr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(Qr,"DiagramNotFoundError"),Qr),Zy=g(e=>{var s;const{securityLevel:t}=xt();let r=ht("body");if(t==="sandbox"){const o=((s=ht(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Qo(e){return typeof e>"u"||e===null}g(Qo,"isNothing");function yc(e){return typeof e=="object"&&e!==null}g(yc,"isObject");function Cc(e){return Array.isArray(e)?e:Qo(e)?[]:[e]}g(Cc,"toArray");function xc(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}g(xc,"extend");function bc(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(bc,"repeat");function kc(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(kc,"isNegativeZero");var Ky=Qo,Qy=yc,Jy=Cc,tC=bc,eC=kc,rC=xc,Dt={isNothing:Ky,isObject:Qy,toArray:Jy,repeat:tC,isNegativeZero:eC,extend:rC};function Jo(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
126
-
127
- `+e.mark.snippet),i+" "+r):i}g(Jo,"formatError");function ri(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Jo(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(ri,"YAMLException$1");ri.prototype=Object.create(Error.prototype);ri.prototype.constructor=ri;ri.prototype.toString=g(function(t){return this.name+": "+Jo(this,t)},"toString");var se=ri;function fs(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}g(fs,"getLine");function ms(e,t){return Dt.repeat(" ",t-e.length)+e}g(ms,"padStart");function Tc(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=fs(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),d),n=Dt.repeat(" ",t.indent)+ms((e.line-l+1).toString(),c)+" | "+h.str+`
128
- `+n;for(h=fs(e.buffer,i[o],s[o],e.position,d),n+=Dt.repeat(" ",t.indent)+ms((e.line+1).toString(),c)+" | "+h.str+`
129
- `,n+=Dt.repeat("-",t.indent+c+3+h.pos)+`^
130
- `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=fs(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),d),n+=Dt.repeat(" ",t.indent)+ms((e.line+l+1).toString(),c)+" | "+h.str+`
131
- `;return n.replace(/\n$/,"")}g(Tc,"makeSnippet");var iC=Tc,sC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],aC=["scalar","sequence","mapping"];function Sc(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(Sc,"compileStyleAliases");function wc(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(sC.indexOf(r)===-1)throw new se('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Sc(t.styleAliases||null),aC.indexOf(this.kind)===-1)throw new se('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(wc,"Type$1");var Xt=wc;function io(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}g(io,"compileList");function _c(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(_c,"compileMap");function Es(e){return this.extend(e)}g(Es,"Schema$1");Es.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Xt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new se("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Xt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new se("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new se("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Xt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Es.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=io(s,"implicit"),s.compiledExplicit=io(s,"explicit"),s.compiledTypeMap=_c(s.compiledImplicit,s.compiledExplicit),s},"extend");var oC=Es,nC=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),lC=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),hC=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),cC=new oC({explicit:[nC,lC,hC]});function Bc(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(Bc,"resolveYamlNull");function vc(){return null}g(vc,"constructYamlNull");function Lc(e){return e===null}g(Lc,"isNull");var dC=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Bc,construct:vc,predicate:Lc,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function Fc(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(Fc,"resolveYamlBoolean");function Ac(e){return e==="true"||e==="True"||e==="TRUE"}g(Ac,"constructYamlBoolean");function Ec(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(Ec,"isBoolean");var uC=new Xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Fc,construct:Ac,predicate:Ec,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Mc(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Mc,"isHexCode");function $c(e){return 48<=e&&e<=55}g($c,"isOctCode");function Oc(e){return 48<=e&&e<=57}g(Oc,"isDecCode");function Ic(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Mc(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!$c(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Oc(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}g(Ic,"resolveYamlInteger");function Dc(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g(Dc,"constructYamlInteger");function Pc(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Dt.isNegativeZero(e)}g(Pc,"isInteger");var pC=new Xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ic,construct:Dc,predicate:Pc,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),gC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Rc(e){return!(e===null||!gC.test(e)||e[e.length-1]==="_")}g(Rc,"resolveYamlFloat");function qc(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(qc,"constructYamlFloat");var fC=/^[-+]?[0-9]+e/;function Nc(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Dt.isNegativeZero(e))return"-0.0";return r=e.toString(10),fC.test(r)?r.replace("e",".e"):r}g(Nc,"representYamlFloat");function zc(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Dt.isNegativeZero(e))}g(zc,"isFloat");var mC=new Xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Rc,construct:qc,predicate:zc,represent:Nc,defaultStyle:"lowercase"}),Wc=cC.extend({implicit:[dC,uC,pC,mC]}),yC=Wc,Hc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yc=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 Uc(e){return e===null?!1:Hc.exec(e)!==null||Yc.exec(e)!==null}g(Uc,"resolveYamlTimestamp");function jc(e){var t,r,i,s,a,o,n,l=0,h=null,c,d,p;if(t=Hc.exec(e),t===null&&(t=Yc.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],d=+(t[11]||0),h=(c*60+d)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&p.setTime(p.getTime()-h),p}g(jc,"constructYamlTimestamp");function Gc(e){return e.toISOString()}g(Gc,"representYamlTimestamp");var CC=new Xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Uc,construct:jc,instanceOf:Date,represent:Gc});function Xc(e){return e==="<<"||e===null}g(Xc,"resolveYamlMerge");var xC=new Xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Xc}),tn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
- \r`;function Vc(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=tn;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(Vc,"resolveYamlBinary");function Zc(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=tn,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}g(Zc,"constructYamlBinary");function Kc(e){var t="",r=0,i,s,a=e.length,o=tn;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}g(Kc,"representYamlBinary");function Qc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(Qc,"isBinary");var bC=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Vc,construct:Zc,predicate:Qc,represent:Kc}),kC=Object.prototype.hasOwnProperty,TC=Object.prototype.toString;function Jc(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,TC.call(s)!=="[object Object]")return!1;for(a in s)if(kC.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}g(Jc,"resolveYamlOmap");function td(e){return e!==null?e:[]}g(td,"constructYamlOmap");var SC=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Jc,construct:td}),wC=Object.prototype.toString;function ed(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],wC.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}g(ed,"resolveYamlPairs");function rd(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}g(rd,"constructYamlPairs");var _C=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ed,construct:rd}),BC=Object.prototype.hasOwnProperty;function id(e){if(e===null)return!0;var t,r=e;for(t in r)if(BC.call(r,t)&&r[t]!==null)return!1;return!0}g(id,"resolveYamlSet");function sd(e){return e!==null?e:{}}g(sd,"constructYamlSet");var vC=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:id,construct:sd}),ad=yC.extend({implicit:[CC,xC],explicit:[bC,SC,_C,vC]}),er=Object.prototype.hasOwnProperty,Ms=1,od=2,nd=3,$s=4,Oa=1,LC=2,Fl=3,FC=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,AC=/[\x85\u2028\u2029]/,EC=/[,\[\]\{\}]/,ld=/^(?:!|!!|![a-z\-]+!)$/i,hd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function so(e){return Object.prototype.toString.call(e)}g(so,"_class");function Ce(e){return e===10||e===13}g(Ce,"is_EOL");function Je(e){return e===9||e===32}g(Je,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}g(Jt,"is_WS_OR_EOL");function pr(e){return e===44||e===91||e===93||e===123||e===125}g(pr,"is_FLOW_INDICATOR");function cd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(cd,"fromHexCode");function dd(e){return e===120?2:e===117?4:e===85?8:0}g(dd,"escapedHexLen");function ud(e){return 48<=e&&e<=57?e-48:-1}g(ud,"fromDecimalCode");function ao(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
133
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g(ao,"simpleEscapeSequence");function pd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(pd,"charFromCodepoint");function en(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(en,"setProperty");var gd=new Array(256),fd=new Array(256);for(lr=0;lr<256;lr++)gd[lr]=ao(lr)?1:0,fd[lr]=ao(lr);var lr;function md(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ad,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(md,"State$1");function rn(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=iC(r),new se(t,r)}g(rn,"generateError");function rt(e,t){throw rn(e,t)}g(rt,"throwError");function Ii(e,t){e.onWarning&&e.onWarning.call(null,rn(e,t))}g(Ii,"throwWarning");var Al={YAML:g(function(t,r,i){var s,a,o;t.version!==null&&rt(t,"duplication of %YAML directive"),i.length!==1&&rt(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&rt(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&rt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Ii(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var s,a;i.length!==2&&rt(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],ld.test(s)||rt(t,"ill-formed tag handle (first argument) of the TAG directive"),er.call(t.tagMap,s)&&rt(t,'there is a previously declared suffix for "'+s+'" tag handle'),hd.test(a)||rt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{rt(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function qe(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||rt(e,"expected valid JSON character");else FC.test(n)&&rt(e,"the stream contains non-printable characters");e.result+=n}}g(qe,"captureSegment");function oo(e,t,r,i){var s,a,o,n;for(Dt.isObject(r)||rt(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],er.call(t,a)||(en(t,a,r[a]),i[a]=!0)}g(oo,"mergeMappings");function gr(e,t,r,i,s,a,o,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&rt(e,"nested arrays are not supported inside keys"),typeof s=="object"&&so(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&so(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)oo(e,t,a[h],r);else oo(e,t,a,r);else!e.json&&!er.call(r,s)&&er.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,rt(e,"duplicated mapping key")),en(t,s,a),delete r[s];return t}g(gr,"storeMappingPair");function Qs(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):rt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(Qs,"readLineBreak");function At(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Je(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Ce(s))for(Qs(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Ii(e,"deficient indentation"),i}g(At,"skipSeparationSpace");function Yi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Jt(r)))}g(Yi,"testDocumentSeparator");function Js(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
134
- `,t-1))}g(Js,"writeFoldedLines");function yd(e,t,r){var i,s,a,o,n,l,h,c,d=e.kind,p=e.result,u;if(u=e.input.charCodeAt(e.position),Jt(u)||pr(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(s=e.input.charCodeAt(e.position+1),Jt(s)||r&&pr(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),Jt(s)||r&&pr(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&Yi(e)||r&&pr(u))break;if(Ce(u))if(l=e.line,h=e.lineStart,c=e.lineIndent,At(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(qe(e,a,o,!1),Js(e,e.line-l),a=o=e.position,n=!1),Je(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return qe(e,a,o,!1),e.result?!0:(e.kind=d,e.result=p,!1)}g(yd,"readPlainScalar");function Cd(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(qe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else Ce(r)?(qe(e,i,s,!0),Js(e,At(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Yi(e)?rt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);rt(e,"unexpected end of the stream within a single quoted scalar")}g(Cd,"readSingleQuotedScalar");function xd(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return qe(e,r,e.position,!0),e.position++,!0;if(n===92){if(qe(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Ce(n))At(e,!1,t);else if(n<256&&gd[n])e.result+=fd[n],e.position++;else if((o=dd(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=cd(n))>=0?a=(a<<4)+o:rt(e,"expected hexadecimal character");e.result+=pd(a),e.position++}else rt(e,"unknown escape sequence");r=i=e.position}else Ce(n)?(qe(e,r,i,!0),Js(e,At(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Yi(e)?rt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}rt(e,"unexpected end of the stream within a double quoted scalar")}g(xd,"readDoubleQuotedScalar");function bd(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,d,p,u,y=Object.create(null),f,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,u=!1,n=[];else if(b===123)c=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(At(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&rt(e,"expected the node content, but found ','"):rt(e,"missed comma between flow collection entries"),m=f=C=null,d=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Jt(h)&&(d=p=!0,e.position++,At(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,Cr(e,t,Ms,!1,!0),m=e.tag,f=e.result,At(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),At(e,!0,t),Cr(e,t,Ms,!1,!0),C=e.result),u?gr(e,n,y,m,f,C,i,s,a):d?n.push(gr(e,null,y,m,f,C,i,s,a)):n.push(f),At(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}rt(e,"unexpected end of the stream within a flow collection")}g(bd,"readFlowCollection");function kd(e,t){var r,i,s=Oa,a=!1,o=!1,n=t,l=0,h=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Oa===s?s=d===43?Fl:LC:rt(e,"repeat of a chomping mode identifier");else if((c=ud(d))>=0)c===0?rt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?rt(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(Je(d)){do d=e.input.charCodeAt(++e.position);while(Je(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ce(d)&&d!==0)}for(;d!==0;){for(Qs(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),Ce(d)){l++;continue}if(e.lineIndent<n){s===Fl?e.result+=Dt.repeat(`
135
- `,a?1+l:l):s===Oa&&a&&(e.result+=`
136
- `);break}for(i?Je(d)?(h=!0,e.result+=Dt.repeat(`
137
- `,a?1+l:l)):h?(h=!1,e.result+=Dt.repeat(`
138
- `,l+1)):l===0?a&&(e.result+=" "):e.result+=Dt.repeat(`
139
- `,l):e.result+=Dt.repeat(`
140
- `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!Ce(d)&&d!==0;)d=e.input.charCodeAt(++e.position);qe(e,r,e.position,!1)}return!0}g(kd,"readBlockScalar");function no(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rt(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Jt(o))));){if(n=!0,e.position++,At(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Cr(e,t,nd,!1,!0),a.push(e.result),At(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)rt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}g(no,"readBlockSequence");function Td(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,d={},p=Object.create(null),u=null,y=null,f=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Jt(i))b===63?(m&&(gr(e,d,p,u,y,null,o,n,l),u=y=f=null),C=!0,m=!0,s=!0):m?(m=!1,s=!0):rt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!Cr(e,r,od,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Je(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||rt(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(gr(e,d,p,u,y,null,o,n,l),u=y=f=null),C=!0,m=!1,s=!1,u=e.tag,y=e.result;else if(C)rt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)rt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===a||e.lineIndent>t)&&(m&&(o=e.line,n=e.lineStart,l=e.position),Cr(e,t,$s,!0,s)&&(m?y=e.result:f=e.result),m||(gr(e,d,p,u,y,f,o,n,l),u=y=f=null),At(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)rt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&gr(e,d,p,u,y,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=d),C}g(Td,"readBlockMapping");function Sd(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&rt(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):rt(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Jt(o);)o===33&&(i?rt(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),ld.test(s)||rt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),EC.test(a)&&rt(e,"tag suffix cannot contain flow indicator characters")}a&&!hd.test(a)&&rt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{rt(e,"tag name is malformed: "+a)}return r?e.tag=a:er.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:rt(e,'undeclared tag handle "'+s+'"'),!0}g(Sd,"readTagProperty");function wd(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&rt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!pr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&rt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(wd,"readAnchorProperty");function _d(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Jt(i)&&!pr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&rt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),er.call(e.anchorMap,r)||rt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],At(e,!0,-1),!0}g(_d,"readAlias");function Cr(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!1,d,p,u,y,f,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=$s===r||nd===r,i&&At(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Sd(e)||wd(e);)At(e,!0,-1)?(h=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||$s===r)&&(Ms===r||od===r?f=t:f=t+1,m=e.position-e.lineStart,l===1?n&&(no(e,m)||Td(e,m,f))||bd(e,f)?c=!0:(o&&kd(e,f)||Cd(e,f)||xd(e,f)?c=!0:_d(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&rt(e,"alias node should not have any properties")):yd(e,f,Ms===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&no(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&rt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,p=e.implicitTypes.length;d<p;d+=1)if(y=e.implicitTypes[d],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(er.call(e.typeMap[e.kind||"fallback"],e.tag))y=e.typeMap[e.kind||"fallback"][e.tag];else for(y=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,p=u.length;d<p;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){y=u[d];break}y||rt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&y.kind!==e.kind&&rt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):rt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}g(Cr,"composeNode");function Bd(e){var t=e.position,r,i,s,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(At(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Jt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&rt(e,"directive name must not be less than one character in length");o!==0;){for(;Je(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Ce(o));break}if(Ce(o))break;for(r=e.position;o!==0&&!Jt(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Qs(e),er.call(Al,i)?Al[i](e,i,s):Ii(e,'unknown document directive "'+i+'"')}if(At(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,At(e,!0,-1)):a&&rt(e,"directives end mark is expected"),Cr(e,e.lineIndent-1,$s,!1,!0),At(e,!0,-1),e.checkLineBreaks&&AC.test(e.input.slice(t,e.position))&&Ii(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Yi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,At(e,!0,-1));return}if(e.position<e.length-1)rt(e,"end of the stream or a document separator is expected");else return}g(Bd,"readDocument");function sn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
141
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new md(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,rt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Bd(r);return r.documents}g(sn,"loadDocuments");function MC(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=sn(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}g(MC,"loadAll$1");function vd(e,t){var r=sn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new se("expected a single document in the stream, but found more")}}g(vd,"load$1");var $C=vd,OC={load:$C},Ld=Object.prototype.toString,Fd=Object.prototype.hasOwnProperty,an=65279,IC=9,Di=10,DC=13,PC=32,RC=33,qC=34,lo=35,NC=37,zC=38,WC=39,HC=42,Ad=44,YC=45,Os=58,UC=61,jC=62,GC=63,XC=64,Ed=91,Md=93,VC=96,$d=123,ZC=124,Od=125,Vt={};Vt[0]="\\0";Vt[7]="\\a";Vt[8]="\\b";Vt[9]="\\t";Vt[10]="\\n";Vt[11]="\\v";Vt[12]="\\f";Vt[13]="\\r";Vt[27]="\\e";Vt[34]='\\"';Vt[92]="\\\\";Vt[133]="\\N";Vt[160]="\\_";Vt[8232]="\\L";Vt[8233]="\\P";var KC=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],QC=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Id(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Fd.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}g(Id,"compileStyleMap");function Dd(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new se("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Dt.repeat("0",i-t.length)+t}g(Dd,"encodeHex");var JC=1,Pi=2;function Pd(e){this.schema=e.schema||ad,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Dt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Id(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Pi:JC,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(Pd,"State");function ho(e,t){for(var r=Dt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
142
- `,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
143
- `&&(a+=r),a+=o;return a}g(ho,"indentString");function Is(e,t){return`
144
- `+Dt.repeat(" ",e.indent*t)}g(Is,"generateNextLine");function Rd(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}g(Rd,"testImplicitResolving");function Ri(e){return e===PC||e===IC}g(Ri,"isWhitespace");function ii(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==an||65536<=e&&e<=1114111}g(ii,"isPrintable");function co(e){return ii(e)&&e!==an&&e!==DC&&e!==Di}g(co,"isNsCharOrWhitespace");function uo(e,t,r){var i=co(e),s=i&&!Ri(e);return(r?i:i&&e!==Ad&&e!==Ed&&e!==Md&&e!==$d&&e!==Od)&&e!==lo&&!(t===Os&&!s)||co(t)&&!Ri(t)&&e===lo||t===Os&&s}g(uo,"isPlainSafe");function qd(e){return ii(e)&&e!==an&&!Ri(e)&&e!==YC&&e!==GC&&e!==Os&&e!==Ad&&e!==Ed&&e!==Md&&e!==$d&&e!==Od&&e!==lo&&e!==zC&&e!==HC&&e!==RC&&e!==ZC&&e!==UC&&e!==jC&&e!==WC&&e!==qC&&e!==NC&&e!==XC&&e!==VC}g(qd,"isPlainSafeFirst");function Nd(e){return!Ri(e)&&e!==Os}g(Nd,"isPlainSafeLast");function Dr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(Dr,"codePointAt");function on(e){var t=/^\n* /;return t.test(e)}g(on,"needIndentIndicator");var zd=1,po=2,Wd=3,Hd=4,$r=5;function Yd(e,t,r,i,s,a,o,n){var l,h=0,c=null,d=!1,p=!1,u=i!==-1,y=-1,f=qd(Dr(e,0))&&Nd(Dr(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Dr(e,l),!ii(h))return $r;f=f&&uo(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Dr(e,l),h===Di)d=!0,u&&(p=p||l-y-1>i&&e[y+1]!==" ",y=l);else if(!ii(h))return $r;f=f&&uo(h,c,n),c=h}p=p||u&&l-y-1>i&&e[y+1]!==" "}return!d&&!p?f&&!o&&!s(e)?zd:a===Pi?$r:po:r>9&&on(e)?$r:o?a===Pi?$r:po:p?Hd:Wd}g(Yd,"chooseScalarStyle");function Ud(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Pi?'""':"''";if(!e.noCompatMode&&(KC.indexOf(t)!==-1||QC.test(t)))return e.quotingType===Pi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Rd(e,h)}switch(g(l,"testAmbiguity"),Yd(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case zd:return t;case po:return"'"+t.replace(/'/g,"''")+"'";case Wd:return"|"+go(t,e.indent)+fo(ho(t,a));case Hd:return">"+go(t,e.indent)+fo(ho(jd(t,o),a));case $r:return'"'+Gd(t)+'"';default:throw new se("impossible error: invalid scalar style")}})()}g(Ud,"writeScalar");function go(e,t){var r=on(e)?String(t):"",i=e[e.length-1]===`
145
- `,s=i&&(e[e.length-2]===`
146
- `||e===`
147
- `),a=s?"+":i?"":"-";return r+a+`
148
- `}g(go,"blockHeader");function fo(e){return e[e.length-1]===`
149
- `?e.slice(0,-1):e}g(fo,"dropEndingNewline");function jd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
150
- `);return h=h!==-1?h:e.length,r.lastIndex=h,mo(e.slice(0,h),t)})(),s=e[0]===`
151
- `||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?`
152
- `:"")+mo(l,t),s=a}return i}g(jd,"foldString");function mo(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
153
- `+e.slice(s,a),s=a+1),o=n;return l+=`
154
- `,e.length-s>t&&o>s?l+=e.slice(s,o)+`
155
- `+e.slice(o+1):l+=e.slice(s),l.slice(1)}g(mo,"foldLine");function Gd(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Dr(e,s),i=Vt[r],!i&&ii(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Dd(r);return t}g(Gd,"escapeString");function Xd(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),(Ee(e,t,n,!1,!1)||typeof n>"u"&&Ee(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}g(Xd,"writeFlowSequence");function yo(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Ee(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ee(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=Is(e,t)),e.dump&&Di===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}g(yo,"writeBlockSequence");function Vd(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),Ee(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ee(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}g(Vd,"writeFlowMapping");function Zd(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,d,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new se("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=Is(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Ee(e,t+1,h,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Di===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=Is(e,t)),Ee(e,t+1,c,!0,d)&&(e.dump&&Di===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}g(Zd,"writeBlockMapping");function Co(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Ld.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Fd.call(n.represent,l))i=n.represent[l](t,l);else throw new se("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(Co,"detectType");function Ee(e,t,r,i,s,a,o){e.tag=null,e.dump=r,Co(e,r,!1)||Co(e,r,!0);var n=Ld.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",d,p;if(c&&(d=e.duplicates.indexOf(r),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(c&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Zd(e,t,e.dump,s),p&&(e.dump="&ref_"+d+e.dump)):(Vd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?yo(e,t-1,e.dump,s):yo(e,t,e.dump,s),p&&(e.dump="&ref_"+d+e.dump)):(Xd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Ud(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new se("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}g(Ee,"writeNode");function Kd(e,t){var r=[],i=[],s,a;for(Ds(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}g(Kd,"getDuplicateReferences");function Ds(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)Ds(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)Ds(e[i[s]],t,r)}g(Ds,"inspectNode");function t0(e,t){t=t||{};var r=new Pd(t);r.noRefs||Kd(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ee(r,0,i,!0,!0)?r.dump+`
156
- `:""}g(t0,"dump$1");function e0(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(e0,"renamed");var r0=Wc,i0=OC.load;/*! Bundled license information:
157
-
158
- js-yaml/dist/js-yaml.mjs:
159
- (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
160
- */var mi=g((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"),Gt={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},El={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function wi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}g(wi,"calculateDeltaAndAngle");var _t=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),s0=g(e=>({x:g(function(t,r,i){let s=0;const a=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaX:y}=wi(i[0],i[1]);s=Gt[e.arrowTypeStart]*Math.cos(u)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaX:y}=wi(i[i.length-1],i[i.length-2]);s=Gt[e.arrowTypeEnd]*Math.cos(u)*(y>=0?1:-1)}const o=Math.abs(_t(t).x-_t(i[i.length-1]).x),n=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),h=Math.abs(_t(t).y-_t(i[0]).y),c=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],p=1;if(o<d&&o>0&&n<d){let u=d+p-o;u*=a==="right"?-1:1,s-=u}if(l<c&&l>0&&h<c){let u=c+p-l;u*=a==="right"?-1:1,s+=u}return _t(t).x+s},"x"),y:g(function(t,r,i){let s=0;const a=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaY:y}=wi(i[0],i[1]);s=Gt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaY:y}=wi(i[i.length-1],i[i.length-2]);s=Gt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(y>=0?1:-1)}const o=Math.abs(_t(t).y-_t(i[i.length-1]).y),n=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),h=Math.abs(_t(t).x-_t(i[0]).x),c=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],p=1;if(o<d&&o>0&&n<d){let u=d+p-o;u*=a==="up"?-1:1,s-=u}if(l<c&&l>0&&h<c){let u=c+p-l;u*=a==="up"?-1:1,s+=u}return _t(t).y+s},"y")}),"getLineFunctionsWithOffset"),is={},Ot={},Ml;function a0(){return Ml||(Ml=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BLANK_URL=Ot.relativeFirstCharacters=Ot.whitespaceEscapeCharsRegex=Ot.urlSchemeRegex=Ot.ctrlCharactersRegex=Ot.htmlCtrlEntityRegex=Ot.htmlEntitiesRegex=Ot.invalidProtocolRegex=void 0,Ot.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ot.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ot.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ot.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ot.urlSchemeRegex=/^.+(:|&colon;)/gim,Ot.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ot.relativeFirstCharacters=[".","/"],Ot.BLANK_URL="about:blank"),Ot}var $l;function o0(){if($l)return is;$l=1,Object.defineProperty(is,"__esModule",{value:!0}),is.sanitizeUrl=a;var e=a0();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),d=c.match(e.urlSchemeRegex);if(!d)return h;var p=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var u=c.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return u;if(p==="http:"||p==="https:"){if(!i(u))return e.BLANK_URL;var y=new URL(u);return y.protocol=y.protocol.toLowerCase(),y.hostname=y.hostname.toLowerCase(),y.toString()}return u}return is}var n0=o0();function Ia(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 l0(){}function Qd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function nn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const h0="[object RegExp]",Jd="[object String]",tu="[object Number]",eu="[object Boolean]",ru="[object Arguments]",c0="[object Symbol]",d0="[object Date]",u0="[object Map]",p0="[object Set]",g0="[object Array]",f0="[object ArrayBuffer]",m0="[object Object]",y0="[object DataView]",C0="[object Uint8Array]",x0="[object Uint8ClampedArray]",b0="[object Uint16Array]",k0="[object Uint32Array]",T0="[object Int8Array]",S0="[object Int16Array]",w0="[object Int32Array]",_0="[object Float32Array]",B0="[object Float64Array]",Ol=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function ln(e){return typeof Ol.Buffer<"u"&&Ol.Buffer.isBuffer(e)}function v0(e){return Number.isSafeInteger(e)&&e>=0}function iu(e){return e!=null&&typeof e!="function"&&v0(e.length)}function L0(e){return e==="__proto__"}function hn(e){return e==null||typeof e!="object"&&typeof e!="function"}function cn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function F0(e,t){return Pr(e,void 0,e,new Map,t)}function Pr(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(hn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Pr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Pr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Pr(n,void 0,r,i,s));return o}if(ln(e))return e.subarray();if(cn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Pr(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),ge(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),ge(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,ge(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(typeof e=="object"&&A0(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),ge(o,e,r,i,s),o}return e}function ge(e,t,r=e,i,s){const a=[...Object.keys(t),...Qd(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Pr(t[n],n,r,i,s))}}function A0(e){switch(nn(e)){case ru:case g0:case f0:case y0:case eu:case d0:case _0:case B0:case T0:case S0:case w0:case u0:case tu:case m0:case h0:case p0:case Jd:case c0:case C0:case x0:case b0:case k0:return!0;default:return!1}}function E0(e,t){return F0(e,(r,i,s,a)=>{if(typeof e=="object"){if(nn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),ge(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case tu:case Jd:case eu:{const o=new e.constructor(e==null?void 0:e.valueOf());return ge(o,e),o}case ru:{const o={};return ge(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Il(e){return E0(e)}function xo(e){return e!==null&&typeof e=="object"&&nn(e)==="[object Arguments]"}function bo(e){return typeof e=="object"&&e!==null}function M0(e){return bo(e)&&iu(e)}function Ui(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 o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Ui.Cache||Map),r}Ui.Cache=Map;function ys(e){return cn(e)}function $0(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function O0(e){if(hn(e))return e;if(Array.isArray(e)||cn(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 I0(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 o=r[a];s=Cs(s,o,i,new Map)}return s}function Cs(e,t,r,i){if(hn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return O0(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...Qd(t)];for(let a=0;a<s.length;a++){const o=s[a];if(L0(o))continue;let n=t[o],l=e[o];if(xo(n)&&(n={...n}),xo(l)&&(l={...l}),ln(n)&&(n=Il(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],d=Reflect.ownKeys(l);for(let p=0;p<d.length;p++){const u=d[p];c[u]=l[u]}l=c}else if(M0(l)){const c=[];for(let d=0;d<l.length;d++)c[d]=l[d];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||bo(l)&&bo(n)&&(Ia(l)||Ia(n)||ys(l)||ys(n))?e[o]=Cs(l,n,r,i):l==null&&Ia(n)?e[o]=Cs({},n,r,i):l==null&&ys(n)?e[o]=Il(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function D0(e,...t){return I0(e,...t,l0)}function Dl(e){if(e==null)return!0;if(iu(e))return typeof e.splice!="function"&&typeof e!="string"&&!ln(e)&&!ys(e)&&!xo(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 $0(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var P0="​",R0={curveBasis:Xa,curveBasisClosed:Uf,curveBasisOpen:jf,curveBumpX:vh,curveBumpY:Lh,curveBundle:Gf,curveCardinalClosed:Xf,curveCardinalOpen:Vf,curveCardinal:Mh,curveCatmullRomClosed:Zf,curveCatmullRomOpen:Kf,curveCatmullRom:Oh,curveLinear:Li,curveLinearClosed:Qf,curveMonotoneX:Nh,curveMonotoneY:zh,curveNatural:Hh,curveStep:Yh,curveStepAfter:jh,curveStepBefore:Uh},q0=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,N0=g(function(e,t){const r=su(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Bs(o),i=It(i,[...o])}else i=r.args;if(!i)return;let s=jo(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),su=g(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${q0.source})(?=[}][%]{2}).*
161
- `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Ai.exec(e))!==null;)if(a.index===Ai.lastIndex&&Ai.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return z.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),z0=g(function(e){return e.replace(Ai,"")},"removeDirectives"),W0=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function dn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return R0[r]??t}g(dn,"interpolateToCurve");function au(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?n0.sanitizeUrl(r):r}g(au,"formatUrl");var H0=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){z.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function un(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(un,"distance");function ou(e){let t,r=0;e.forEach(s=>{r+=un(s,t),t=s});const i=r/2;return pn(e,i)}g(ou,"traverseEdge");function nu(e){return e.length===1?e[0]:ou(e)}g(nu,"calcLabelPosition");var Pl=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),pn=g((e,t)=>{let r,i=t;for(const s of e){if(r){const a=un(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:Pl((1-o)*r.x+o*s.x,5),y:Pl((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Y0=g((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=pn(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function lu(e,t,r){const i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=pn(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}g(lu,"calcTerminalLabelPosition");function hu(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}}g(hu,"getStylesFromArray");var Rl=0,U0=g(()=>(Rl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rl),"generateId");function cu(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}g(cu,"makeRandomHex");var j0=g(e=>cu(e.length),"random"),G0=g(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"),X0=g(function(e,t){const r=t.text.replace(Hi.lineBreakRegex," "),[,i]=ta(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"),V0=Ui((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Hi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ne(`${o} `,r),h=Ne(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:u}=Z0(o,t,"-",r);s.push(a,...p),a=u}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Z0=Ui((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(Ne(h,i)>=t){const d=l+1,p=s.length===d,u=`${h}${r}`;a.push(p?h:u),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function du(e,t){return gn(e,t).height}g(du,"calculateTextHeight");function Ne(e,t){return gn(e,t).width}g(Ne,"calculateTextWidth");var gn=Ui((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=ta(r),o=["sans-serif",i],n=e.split(Hi.lineBreakRegex),l=[],h=ht("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of o){let u=0;const y={width:0,height:0,lineHeight:0};for(const f of n){const m=G0();m.text=f||P0;const C=X0(c,m).style("font-size",a).style("font-weight",s).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,b.width)),u=Math.round(b.height),y.height+=u,y.lineHeight=Math.round(Math.max(y.lineHeight,u))}l.push(y)}c.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Jr,K0=(Jr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(Jr,"InitIDGenerator"),Jr),ss,Q0=g(function(e){return ss=ss||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ss.innerHTML=e,unescape(ss.textContent)},"entityDecode");function fn(e){return"str"in e}g(fn,"isDetailedError");var J0=g((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"),ta=g(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 mn(e,t){return D0({},e,t)}g(mn,"cleanAndMerge");var ye={assignWithDepth:It,wrapLabel:V0,calculateTextHeight:du,calculateTextWidth:Ne,calculateTextDimensions:gn,cleanAndMerge:mn,detectInit:N0,detectDirective:su,isSubstringInArray:W0,interpolateToCurve:dn,calcLabelPosition:nu,calcCardinalityPosition:Y0,calcTerminalLabelPosition:lu,formatUrl:au,getStylesFromArray:hu,generateId:U0,random:j0,runFunc:H0,entityDecode:Q0,insertTitle:J0,isLabelCoordinateInPath:uu,parseFontSize:ta,InitIDGenerator:K0},tx=g(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"),xr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),kS=g((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function qt(e){return e??null}g(qt,"handleUndefinedAttr");function uu(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())}g(uu,"isLabelCoordinateInPath");var yn=g(({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");async function pu(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=sc.fontSize]=ta(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}g(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}g(pu,"configureLabelImages");var ex=g(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),oi=g(e=>{const t=rx([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),rx=g(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"),gu=g(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"),Q=g(e=>{const{stylesArray:t}=oi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];gu(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),K=g((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=oi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:ix(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),ix=g(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 sx=Object.freeze({left:0,top:0,width:16,height:16}),Ps=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fu=Object.freeze({...sx,...Ps}),ax=Object.freeze({...fu,body:"",hidden:!1}),ox=Object.freeze({width:null,height:null}),nx=Object.freeze({...ox,...Ps}),lx=(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 n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return Da(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Da(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return Da(n,r)?n:null}return null},Da=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function hx(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 ql(e,t){const r=hx(e,t);for(const i in ax)i in Ps?i in e&&!(i in r)&&(r[i]=Ps[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function cx(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Nl(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=ql(i[n]||s[n],a)}return o(t),r.forEach(o),ql(e,a)}function dx(e,t){if(e.icons[t])return Nl(e,t,[]);const r=cx(e,[t])[t];return r?Nl(e,t,r):null}const ux=/(-?[0-9.]*[0-9]+[0-9.]*)/g,px=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function zl(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(ux);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=px.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function gx(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 o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function fx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function mx(e,t,r){const i=gx(e);return fx(i.defs,t+i.content+r)}const yx=e=>e==="unset"||e==="undefined"||e==="none";function Cx(e,t){const r={...fu,...e},i={...nx,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(f=>{const m=[],C=f.hFlip,b=f.vFlip;let k=f.rotate;C?b?k+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):b&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let S;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:S=s.height/2+s.top,m.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:S=s.width/2+s.left,m.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}k%2===1&&(s.left!==s.top&&(S=s.left,s.left=s.top,s.top=S),s.width!==s.height&&(S=s.width,s.width=s.height,s.height=S)),m.length&&(a=mx(a,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,d;o===null?(d=n===null?"1em":n==="auto"?h:n,c=zl(d,l/h)):(c=o==="auto"?l:o,d=n===null?zl(c,h/l):n==="auto"?h:n);const p={},u=(f,m)=>{yx(m)||(p[f]=m.toString())};u("width",c),u("height",d);const y=[s.left,s.top,l,h];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:a}}const xx=/\sid="(\S+)"/g,Wl=new Map;function bx(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Wl.get(e)||0;return Wl.set(e,t+1),t?`${e}${t}`:e}function kx(e){const t=[];let r;for(;r=xx.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=bx(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Tx(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>"}function Cn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Tr=Cn();function mu(e){Tr=e}var Mi={exec:()=>null};function bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(te.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var Sx=(()=>{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")},wx=/^(?:[ \t]*(?:\n|$))+/,_x=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Bx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ji=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xn=/(?:[*+-]|\d{1,9}[.)])/,yu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Cu=bt(yu).replace(/bull/g,xn).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(),Lx=bt(yu).replace(/bull/g,xn).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(),bn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Fx=/^[^\n]+/,kn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ax=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ex=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xn).getRegex(),ea="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",Tn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Mx=bt("^ {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",Tn).replace("tag",ea).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xu=bt(bn).replace("hr",ji).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",ea).getRegex(),$x=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xu).getRegex(),Sn={blockquote:$x,code:_x,def:Ax,fences:Bx,heading:vx,hr:ji,html:Mx,lheading:Cu,list:Ex,newline:wx,paragraph:xu,table:Mi,text:Fx},Hl=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ji).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",ea).getRegex(),Ox={...Sn,lheading:Lx,table:Hl,paragraph:bt(bn).replace("hr",ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hl).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",ea).getRegex()},Ix={...Sn,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Tn).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:Mi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(bn).replace("hr",ji).replace("heading",` *#{1,6} *[^
162
- ]`).replace("lheading",Cu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Dx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Px=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bu=/^( {2,}|\\)\n(?!\s*$)/,Rx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ra=/[\p{P}\p{S}]/u,wn=/[\s\p{P}\p{S}]/u,ku=/[^\s\p{P}\p{S}]/u,qx=bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wn).getRegex(),Tu=/(?!~)[\p{P}\p{S}]/u,Nx=/(?!~)[\s\p{P}\p{S}]/u,zx=/(?:[^\s\p{P}\p{S}]|~)/u,Wx=bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Sx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Su=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Hx=bt(Su,"u").replace(/punct/g,ra).getRegex(),Yx=bt(Su,"u").replace(/punct/g,Tu).getRegex(),wu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ux=bt(wu,"gu").replace(/notPunctSpace/g,ku).replace(/punctSpace/g,wn).replace(/punct/g,ra).getRegex(),jx=bt(wu,"gu").replace(/notPunctSpace/g,zx).replace(/punctSpace/g,Nx).replace(/punct/g,Tu).getRegex(),Gx=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ku).replace(/punctSpace/g,wn).replace(/punct/g,ra).getRegex(),Xx=bt(/\\(punct)/,"gu").replace(/punct/g,ra).getRegex(),Vx=bt(/^<(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(),Zx=bt(Tn).replace("(?:-->|$)","-->").getRegex(),Kx=bt("^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",Zx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Rs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Qx=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Rs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_u=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",Rs).replace("ref",kn).getRegex(),Bu=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",kn).getRegex(),Jx=bt("reflink|nolink(?!\\()","g").replace("reflink",_u).replace("nolink",Bu).getRegex(),Yl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_n={_backpedal:Mi,anyPunctuation:Xx,autolink:Vx,blockSkip:Wx,br:bu,code:Px,del:Mi,emStrongLDelim:Hx,emStrongRDelimAst:Ux,emStrongRDelimUnd:Gx,escape:Dx,link:Qx,nolink:Bu,punctuation:qx,reflink:_u,reflinkSearch:Jx,tag:Kx,text:Rx,url:Mi},tb={..._n,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",Rs).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Rs).getRegex()},ko={..._n,emStrongRDelimAst:jx,emStrongLDelim:Yx,url:bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Yl).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:bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Yl).getRegex()},eb={...ko,br:bt(bu).replace("{2,}","*").getRegex(),text:bt(ko.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},as={normal:Sn,gfm:Ox,pedantic:Ix},yi={normal:_n,gfm:ko,breaks:eb,pedantic:tb},rb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ul=e=>rb[e];function ve(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Ul)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Ul);return e}function jl(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function Gl(e,t){var a;let r=e.replace(te.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)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 Ci(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 ib(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 Xl(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function sb(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
163
- `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
164
- `)}var qs=class{constructor(t){wt(this,"options");wt(this,"rules");wt(this,"lexer");this.options=t||Tr}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:Ci(i,`
165
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=sb(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=Ci(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:Ci(r[0],`
166
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ci(r[0],`
167
- `).split(`
168
- `),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),n=!0;else if(!n)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
169
- `),d=c.replace(this.rules.other.blockquoteSetextReplace,`
170
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
171
- ${c}`:c,a=a?`${a}
172
- ${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=p,i.length===0)break;let u=o.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let y=u,f=y.raw+`
173
- `+i.join(`
174
- `),m=this.blockquote(f);o[o.length-1]=m,s=s.substring(0,s.length-y.raw.length)+m.raw,a=a.substring(0,a.length-y.text.length)+m.text;break}else if((u==null?void 0:u.type)==="list"){let y=u,f=y.raw+`
175
- `+i.join(`
176
- `),m=this.list(f);o[o.length-1]=m,s=s.substring(0,s.length-u.raw.length)+m.raw,a=a.substring(0,a.length-y.raw.length)+m.raw,i=f.substring(o.at(-1).raw.length).split(`
177
- `);continue}}return{type:"blockquote",raw:s,tokens:o,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 o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,c="",d="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let p=r[2].split(`
178
- `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
179
- `,1)[0],y=!p.trim(),f=0;if(this.options.pedantic?(f=2,d=p.trimStart()):y?f=r[1].length+1:(f=r[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,d=p.slice(f),f+=r[1].length),y&&this.rules.other.blankLine.test(u)&&(c+=u+`
180
- `,t=t.substring(u.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(f),k=this.rules.other.hrRegex(f),S=this.rules.other.fencesBeginRegex(f),w=this.rules.other.headingBeginRegex(f),B=this.rules.other.htmlBeginRegex(f);for(;t;){let M=t.split(`
181
- `,1)[0],v;if(u=M,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),v=u):v=u.replace(this.rules.other.tabCharGlobal," "),S.test(u)||w.test(u)||B.test(u)||b.test(u)||k.test(u))break;if(v.search(this.rules.other.nonSpaceChar)>=f||!u.trim())d+=`
182
- `+v.slice(f);else{if(y||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(p)||w.test(p)||k.test(p))break;d+=`
183
- `+u}!y&&!u.trim()&&(y=!0),c+=M+`
184
- `,t=t.substring(M.length+1),p=v.slice(f)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(d),m&&(C=m[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!m,checked:C,loose:!1,text:d,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.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 c=a.items[h].tokens.filter(p=>p.type==="space"),d=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=d}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 n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Gl(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
185
- `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(Gl(l,o.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[c]})));return o}}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)===`
186
- `?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 o=Ci(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=ib(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[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)),Xl(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 o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Xl(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,o,n,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let d=[...s[0]][0].length,p=t.slice(0,a+s.index+d+n);if(Math.min(a,n)%2){let y=p.slice(1,-1);return{type:"em",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}let u=p.slice(2,-2);return{type:"strong",raw:p,text:u,tokens:this.lexer.inlineTokens(u)}}}}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 o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==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}}}},fe=class To{constructor(t){wt(this,"tokens");wt(this,"options");wt(this,"state");wt(this,"tokenizer");wt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Tr,this.options.tokenizer=this.options.tokenizer||new qs,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:as.normal,inline:yi.normal};this.options.pedantic?(r.block=as.pedantic,r.inline=yi.pedantic):this.options.gfm&&(r.block=as.gfm,this.options.breaks?r.inline=yi.breaks:r.inline=yi.gfm),this.tokenizer.rules=r}static get rules(){return{block:as,inline:yi}}static lex(t,r){return new To(r).lex(t)}static lexInline(t,r){return new To(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
187
- `),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,o;for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
188
- `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.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(`
189
- `)?"":`
190
- `)+n.raw,h.text+=`
191
- `+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.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(`
192
- `)?"":`
193
- `)+n.raw,h.text+=`
194
- `+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},c),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
195
- `)?"":`
196
- `)+n.raw,h.text+=`
197
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
198
- `)?"":`
199
- `)+n.raw,h.text+=`
200
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);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 l,h,c,d,p;let i=t,s=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)u.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=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let u;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(f=>(u=f.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let f=r.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,i,n)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let y=t;if((p=this.options.extensions)!=null&&p.startInline){let f=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},m),typeof C=="number"&&C>=0&&(f=Math.min(f,C))}),f<1/0&&f>=0&&(y=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(y)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(n=u.raw.slice(-1)),o=!0;let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},Ns=class{constructor(t){wt(this,"options");wt(this,"parser");this.options=t||Tr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(te.notSpaceStart))==null?void 0:o[0],a=t.replace(te.endingNewline,"")+`
201
- `;return s?'<pre><code class="language-'+ve(s)+'">'+(i?a:ve(a,!0))+`</code></pre>
202
- `:"<pre><code>"+(i?a:ve(a,!0))+`</code></pre>
203
- `}blockquote({tokens:t}){return`<blockquote>
204
- ${this.parser.parse(t)}</blockquote>
205
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
206
- `}hr(t){return`<hr>
207
- `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
208
- `+s+"</"+a+`>
209
- `}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+" "+ve(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>
210
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
211
- `}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 o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
212
- <thead>
213
- `+r+`</thead>
214
- `+s+`</table>
215
- `}tablerow({text:t}){return`<tr>
216
- ${t}</tr>
217
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
218
- `}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>${ve(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=jl(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+ve(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=jl(t);if(a===null)return ve(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${ve(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ve(t.text)}},Bn=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""}},me=class So{constructor(t){wt(this,"options");wt(this,"renderer");wt(this,"textRenderer");this.options=t||Tr,this.options.renderer=this.options.renderer||new Ns,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bn}static parse(t,r){return new So(r).parse(t)}static parseInline(t,r){return new So(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=n,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;o+1<t.length&&t[o+1].type==="text";)h=t[++o],c+=`
219
- `+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.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 o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},ds,_i=(ds=class{constructor(t){wt(this,"options");wt(this,"block");this.options=t||Tr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?fe.lex:fe.lexInline}provideParser(){return this.block?me.parse:me.parseInline}},wt(ds,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),wt(ds,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ds),ab=class{constructor(...t){wt(this,"defaults",Cn());wt(this,"options",this.setOptions);wt(this,"parse",this.parseMarkdown(!0));wt(this,"parseInline",this.parseMarkdown(!1));wt(this,"Parser",me);wt(this,"Renderer",Ns);wt(this,"TextRenderer",Bn);wt(this,"Lexer",fe);wt(this,"Tokenizer",qs);wt(this,"Hooks",_i);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.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 o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}: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 o=r[a.level];o?o.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 Ns(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new qs(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new _i;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=a[n];_i.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&_i.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(a,c);return h.call(a,p)})();let d=l.call(a,c);return h.call(a,d)}:a[n]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,c);return p===!1&&(p=await h.apply(a,c)),p})();let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return fe.lex(t,r??this.defaults)}parser(t,r){return me.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(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 o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(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 n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?fe.lex:fe.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?me.parse:me.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?fe.lex:fe.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?me.parse:me.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
220
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+ve(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},br=new ab;function Tt(e,t){return br.parse(e,t)}Tt.options=Tt.setOptions=function(e){return br.setOptions(e),Tt.defaults=br.defaults,mu(Tt.defaults),Tt};Tt.getDefaults=Cn;Tt.defaults=Tr;Tt.use=function(...e){return br.use(...e),Tt.defaults=br.defaults,mu(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return br.walkTokens(e,t)};Tt.parseInline=br.parseInline;Tt.Parser=me;Tt.parser=me.parse;Tt.Renderer=Ns;Tt.TextRenderer=Bn;Tt.Lexer=fe;Tt.lexer=fe.lex;Tt.Tokenizer=qs;Tt.Hooks=_i;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;me.parse;fe.lex;function vu(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(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var d,p;return(p=(d=c.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var a=new RegExp(`
221
- [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(a,`
222
- `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var h=o.match(/(?:^|\n)( *)$/),c=h?h[1]:"",d=n;typeof n=="string"&&n.includes(`
223
- `)&&(d=String(n).split(`
224
- `).map(function(p,u){return u===0?p:"".concat(c).concat(p)}).join(`
225
- `)),o+=d+i[l+1]}),o}var ob={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},wo=new Map,Lu=new Map,nb=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(z.debug("Registering icon pack:",t.name),"loader"in t)Lu.set(t.name,t.loader);else if("icons"in t)wo.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Fu=g(async(e,t)=>{const r=lx(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=wo.get(i);if(!s){const o=Lu.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},wo.set(i,s)}catch(n){throw z.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=dx(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),lb=g(async e=>{try{return await Fu(e),!0}catch{return!1}},"isIconAvailable"),Gi=g(async(e,t,r)=>{let i;try{i=await Fu(e,t==null?void 0:t.fallbackPrefix)}catch(o){z.error(o),i=ob}const s=Cx(i,t),a=Tx(kx(s.body),{...s.attributes,...r});return be(a,Bt())},"getIconSVG");function Au(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
226
- `).replace(/\n{2,}/g,`
227
- `);return vu(i)}g(Au,"preprocessMarkdown");function Eu(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"})))??[]})}g(Eu,"nonMarkdownToLines");function Mu(e,t={}){const r=Au(e,t),i=Tt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
228
- `).forEach((c,d)=>{d!==0&&(a++,s.push([])),c.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&s[a].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return g(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}g(Mu,"markdownToLines");function $u(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g($u,"nonMarkdownToHTML");function Ou(e,{markdownAutoWrap:t}={}){const r=Tt.lexer(e);function i(s){var a,o,n;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>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(z.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(Ou,"markdownToHTML");function Iu(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(Iu,"splitTextToChars");function Du(e,t){const r=Iu(t.content);return vn(e,[],r,t.type)}g(Du,"splitWordToFitWidth");function vn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?vn(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(vn,"splitWordToFitWidthRecursion");function Pu(e,t){if(e.some(({content:r})=>r.includes(`
229
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return zs(e,t)}g(Pu,"splitLineToFitWidth");function zs(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"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return zs(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Du(t,a);r.push([n]),l.content&&e.unshift(l)}return zs(e,t,r)}g(zs,"splitLineToFitWidthRecursion");function _o(e,t){t&&e.attr("style",t)}g(_o,"applyStyle");var Vl=16384;async function Ru(e,t,r,i,s=!1,a=Bt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Vl)}px`),o.attr("height",`${Math.min(10*r,Vl)}px`);const n=o.append("xhtml:div"),l=Oi(t.label)?await gc(t.label.replace(Hi.lineBreakRegex,`
230
- `),a):be(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),_o(c,t.labelStyle),c.attr("class",`${h} ${i}`),_o(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),o.node()}g(Ru,"addHtmlSpan");function ia(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}g(ia,"createTspan");function qu(e,t,r){const i=e.append("text"),s=ia(i,1,t);sa(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}g(qu,"computeWidthOfText");function hb(e,t,r){var o;const i=e.append("text"),s=ia(i,1,t);sa(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}g(hb,"computeDimensionOfText");function Nu(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const d=g(u=>qu(o,1.1,u)<=e,"checkWidth"),p=d(c)?[c]:Pu(c,d);for(const u of p){const y=ia(l,h,1.1,s);sa(y,u),h++}}if(i){const c=l.node().getBBox(),d=2;return n.attr("x",c.x-d).attr("y",c.y-d).attr("width",c.width+2*d).attr("height",c.height+2*d),o.node()}else return l.node()}g(Nu,"createFormattedText");function Bo(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}})}g(Bo,"decodeHTMLEntities");function sa(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(Bo(r.content)):s.text(" "+Bo(r.content))})}g(sa,"updateTextContentAndStyles");async function zu(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await lb(n)?await Gi(n,void 0,{class:"label-icon"}):`<i class='${be(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(zu,"replaceIconSubstring");var We=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(z.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const d=o?Ou(t,c):$u(t),p=await zu(xr(d),c),u=t.replace(/\\\\/g,"\\"),y={isNode:n,label:Oi(t)?u:p,labelStyle:r.replace("fill:","color:")};return await Ru(e,y,l,s,h,c)}else{const d=xr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?Mu(d.replace("<br>","<br/>"),c):Eu(d),u=Nu(l,e,p,t?h:!1,!n);if(n){/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:");ht(u).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(u).select("rect").attr("style",y.replace(/background:/g,"fill:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(u).select("text").attr("style",f)}return i?ht(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ht(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Pa(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function cb(e,t){return e[0]===t[0]&&e[1]===t[1]}function db(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)Pa(h,n,s);const l=(function(h,c,d){const p=[];for(const b of h){const k=[...b];cb(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const u=[];c=Math.max(c,.1);const y=[];for(const b of p)for(let k=0;k<b.length-1;k++){const S=b[k],w=b[k+1];if(S[1]!==w[1]){const B=Math.min(S[1],w[1]);y.push({ymin:B,ymax:Math.max(S[1],w[1]),x:B===S[1]?S[0]:w[0],islope:(w[0]-S[0])/(w[1]-S[1])})}}if(y.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))),!y.length)return u;let f=[],m=y[0].ymin,C=0;for(;f.length||y.length;){if(y.length){let b=-1;for(let k=0;k<y.length&&!(y[k].ymin>m);k++)b=k;y.splice(0,b+1).forEach((k=>{f.push({s:m,edge:k})}))}if(f=f.filter((b=>!(b.edge.ymax<=m))),f.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||C%c==0)&&f.length>1)for(let b=0;b<f.length;b+=2){const k=b+1;if(k>=f.length)break;const S=f[b].edge,w=f[k].edge;u.push([[Math.round(S.x),m],[Math.round(w.x),m]])}m+=d,f.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return u})(o,a,i);if(s){for(const h of o)Pa(h,n,-s);(function(h,c,d){const p=[];h.forEach((u=>p.push(...u))),Pa(p,c,d)})(l,n,-s)}return l}function Xi(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),db(e,s,i,a||1)}class Ln{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Xi(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 aa(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 ub extends Ln{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Xi(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)aa([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class pb extends Ln{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 gb{constructor(t){this.helper=t}fillPolygons(t,r){const i=Xi(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 o=s/4;for(const n of t){const l=aa(n),h=l/s,c=Math.ceil(h)-1,d=l-c*s,p=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let y=0;y<c;y++){const f=u+d+y*s,m=p-o+2*Math.random()*o,C=f-o+2*Math.random()*o,b=this.helper.ellipse(m,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class fb{constructor(t){this.helper=t}fillPolygons(t,r){const i=Xi(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((o=>{const n=aa(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],d=o[1];c[0]>d[0]&&(c=o[1],d=o[0]);const p=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<l;u++){const y=u*(i+s),f=y+i,m=[c[0]+y*Math.cos(p)+h*Math.cos(p),c[1]+y*Math.sin(p)+h*Math.sin(p)],C=[c[0]+f*Math.cos(p)+h*Math.cos(p),c[1]+f*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}})),a}}class mb{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=Xi(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 o=aa(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<n;d++){const p=2*d*r,u=2*(d+1)*r,y=Math.sqrt(2*Math.pow(r,2)),f=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],m=[l[0]+u*Math.cos(c),l[1]+u*Math.sin(c)],C=[f[0]+y*Math.cos(c+Math.PI/4),f[1]+y*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(f[0],f[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}})),s}}const re={};class yb{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Cb=0,Ra=1,Zl=2,os={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 qa(e,t){return e.type===t}function Fn(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Cb,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ra,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Zl,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!qa(a,Zl);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return Fn("M0,0"+e);s++,o=os[a.text],i=a.text}else qa(a,Ra)?o=os[i]:(s++,o=os[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const h=r[l];if(!qa(h,Ra))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof os[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Wu(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[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 Hu(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=s+(s-l)):(d=i,p=s),t.push({key:"C",data:[d,p,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[d,p]=c;let u=0,y=0;r==="Q"||r==="T"?(u=i+(i-n),y=s+(s-l)):(u=i,y=s);const f=i+2*(u-i)/3,m=s+2*(y-s)/3,C=d+2*(u-d)/3,b=p+2*(y-p)/3;t.push({key:"C",data:[f,m,C,b,d,p]}),n=u,l=y,i=d,s=p;break}case"Q":{const[d,p,u,y]=c,f=i+2*(d-i)/3,m=s+2*(p-s)/3,C=u+2*(d-u)/3,b=y+2*(p-y)/3;t.push({key:"C",data:[f,m,C,b,u,y]}),n=d,l=p,i=u,s=y;break}case"A":{const d=Math.abs(c[0]),p=Math.abs(c[1]),u=c[2],y=c[3],f=c[4],m=c[5],C=c[6];d===0||p===0?(t.push({key:"C",data:[i,s,m,C,m,C]}),i=m,s=C):(i!==m||s!==C)&&(Yu(i,s,m,C,d,p,u,y,f).forEach((function(b){t.push({key:"C",data:b})})),i=m,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function xi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Yu(e,t,r,i,s,a,o,n,l,h){const c=(d=o,Math.PI*d/180);var d;let p=[],u=0,y=0,f=0,m=0;if(h)[u,y,f,m]=h;else{[e,t]=xi(e,t,-c),[r,i]=xi(r,i,-c);const H=(e-r)/2,P=(t-i)/2;let E=H*H/(s*s)+P*P/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const L=s*s,O=a*a,A=L*O-L*P*P-O*H*H,_=L*P*P+O*H*H,N=(n===l?-1:1)*Math.sqrt(Math.abs(A/_));f=N*s*P/a+(e+r)/2,m=N*-a*H/s+(t+i)/2,u=Math.asin(parseFloat(((t-m)/a).toFixed(9))),y=Math.asin(parseFloat(((i-m)/a).toFixed(9))),e<f&&(u=Math.PI-u),r<f&&(y=Math.PI-y),u<0&&(u=2*Math.PI+u),y<0&&(y=2*Math.PI+y),l&&u>y&&(u-=2*Math.PI),!l&&y>u&&(y-=2*Math.PI)}let C=y-u;if(Math.abs(C)>120*Math.PI/180){const H=y,P=r,E=i;y=l&&y>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,p=Yu(r=f+s*Math.cos(y),i=m+a*Math.sin(y),P,E,s,a,o,0,l,[y,H,f,m])}C=y-u;const b=Math.cos(u),k=Math.sin(u),S=Math.cos(y),w=Math.sin(y),B=Math.tan(C/4),M=4/3*s*B,v=4/3*a*B,W=[e,t],D=[e+M*k,t-v*b],I=[r+M*w,i-v*S],Y=[r,i];if(D[0]=2*W[0]-D[0],D[1]=2*W[1]-D[1],h)return[D,I,Y].concat(p);{p=[D,I,Y].concat(p);const H=[];for(let P=0;P<p.length;P+=3){const E=xi(p[P][0],p[P][1],c),L=xi(p[P+1][0],p[P+1][1],c),O=xi(p[P+2][0],p[P+2][1],c);H.push([E[0],E[1],L[0],L[1],O[0],O[1]])}return H}}const xb={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return Ws(e,t,r)},ellipse:function(e,t,r,i,s){const a=ju(r,i,s);return vo(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return rr(e,t,r,i,s,!0)}};function Uu(e,t,r,i,s){return{type:"path",ops:rr(e,t,r,i,s)}}function xs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...rr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...rr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Uu(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function bb(e,t,r,i,s){return(function(a,o){return xs(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Kl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ns(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:ns(r[0],1.5*(1+.22*t.roughness),th(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=ns(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ns(o,1.5*(1+.22*t.roughness),th(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function ju(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 o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=at(o*l,r),n+=at(n*l,r),{increment:a,rx:o,ry:n}}function vo(e,t,r,i){const[s,a]=eh(i.increment,e,t,i.rx,i.ry,1,i.increment*Ws(.1,Ws(.4,1,r),r),r);let o=Hs(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=eh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Hs(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Ql(e,t,r,i,s,a,o,n,l){const h=e,c=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=at(.01*d,l),p+=at(.01*p,l);let u=s,y=a;for(;u<0;)u+=2*Math.PI,y+=2*Math.PI;y-u>2*Math.PI&&(u=0,y=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(y-u)/2),C=rh(m,h,c,d,p,u,y,1,l);if(!l.disableMultiStroke){const b=rh(m,h,c,d,p,u,y,1.5,l);C.push(...b)}return o&&(n?C.push(...rr(h,c,h+d*Math.cos(u),c+p*Math.sin(u),l),...rr(h,c,h+d*Math.cos(y),c+p*Math.sin(y),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(u),c+p*Math.sin(u)]})),{type:"path",ops:C}}function Jl(e,t){const r=Hu(Wu(Fn(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...rr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,d,p,u]=n;i.push(...kb(l,h,c,d,p,u,a,t)),a=[p,u];break}case"Z":i.push(...rr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Na(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]+at(s,t),i[0][1]+at(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+at(s,t),i[o][1]+at(s,t)]})}}return{type:"fillPath",ops:r}}function Ar(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!re[s])switch(s){case"zigzag":re[s]||(re[s]=new ub(i));break;case"cross-hatch":re[s]||(re[s]=new pb(i));break;case"dots":re[s]||(re[s]=new gb(i));break;case"dashed":re[s]||(re[s]=new fb(i));break;case"zigzag-line":re[s]||(re[s]=new mb(i));break;default:s="hachure",re[s]||(re[s]=new Ln(i))}return re[s]})(t,xb).fillPolygons(e,t)}function th(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Gu(e){return e.randomizer||(e.randomizer=new yb(e.seed||0)),e.randomizer.next()}function Ws(e,t,r,i=1){return r.roughness*i*(Gu(r)*(t-e)+e)}function at(e,t,r=1){return Ws(-e,e,t,r)}function rr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=Lo(e,t,r,i,s,!0,!1);if(o)return n;const l=Lo(e,t,r,i,s,!0,!0);return n.concat(l)}function Lo(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const d=c/2,p=.2+.2*Gu(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,y=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=at(u,s,h),y=at(y,s,h);const f=[],m=()=>at(d,s,h),C=()=>at(c,s,h),b=s.preserveVertices;return o?f.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):f.push({op:"move",data:[e+(b?0:at(c,s,h)),t+(b?0:at(c,s,h))]}),o?f.push({op:"bcurveTo",data:[u+e+(r-e)*p+m(),y+t+(i-t)*p+m(),u+e+2*(r-e)*p+m(),y+t+2*(i-t)*p+m(),r+(b?0:m()),i+(b?0:m())]}):f.push({op:"bcurveTo",data:[u+e+(r-e)*p+C(),y+t+(i-t)*p+C(),u+e+2*(r-e)*p+C(),y+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),f}function ns(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]),s===e.length-1&&i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]);return Hs(i,null,r)}function Hs(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+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(...Lo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function eh(e,t,r,i,s,a,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const d=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(d),h.push(d)}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 c=at(.5,n)-Math.PI/2;h.push([at(a,n)+t+.9*i*Math.cos(c-e),at(a,n)+r+.9*s*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let p=c;p<d;p+=e){const u=[at(a,n)+t+i*Math.cos(p),at(a,n)+r+s*Math.sin(p)];l.push(u),h.push(u)}h.push([at(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),at(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([at(a,n)+t+.98*i*Math.cos(c+o),at(a,n)+r+.98*s*Math.sin(c+o)]),h.push([at(a,n)+t+.9*i*Math.cos(c+.5*o),at(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function rh(e,t,r,i,s,a,o,n,l){const h=a+at(.1,l),c=[];c.push([at(n,l)+t+.9*i*Math.cos(h-e),at(n,l)+r+.9*s*Math.sin(h-e)]);for(let d=h;d<=o;d+=e)c.push([at(n,l)+t+i*Math.cos(d),at(n,l)+r+s*Math.sin(d)]);return c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),Hs(c,null,l)}function kb(e,t,r,i,s,a,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:at(h[0],n)),o[1]+(p?0:at(h[0],n))]}),c=p?[s,a]:[s+at(h[u],n),a+at(h[u],n)],l.push({op:"bcurveTo",data:[e+at(h[u],n),t+at(h[u],n),r+at(h[u],n),i+at(h[u],n),c[0],c[1]]});return l}function bi(e){return[...e]}function ih(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(bi(e[0]),bi(e[1]),bi(e[2]),bi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(bi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function bs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Tb(e,t,r){const i=bs(t,r);if(i===0)return bs(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)),bs(e,dr(t,r,s))}function dr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Fo(e,t,r,i){const s=i||[];if((function(n,l){const h=n[l+0],c=n[l+1],d=n[l+2],p=n[l+3];let u=3*c[0]-2*h[0]-p[0];u*=u;let y=3*c[1]-2*h[1]-p[1];y*=y;let f=3*d[0]-2*p[0]-h[0];f*=f;let m=3*d[1]-2*p[1]-h[1];return m*=m,u<f&&(u=f),y<m&&(y=m),u+y})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(bs(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],d=e[t+3],p=dr(l,h,.5),u=dr(h,c,.5),y=dr(c,d,.5),f=dr(p,u,.5),m=dr(u,y,.5),C=dr(f,m,.5);Fo([l,p,f,C],0,r,s),Fo([C,m,y,d],0,r,s)}var a,o;return s}function Sb(e,t){return Ys(e,0,e.length,t)}function Ys(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const d=Tb(e[c],o,n);d>l&&(l=d,h=c)}return Math.sqrt(l)>i?(Ys(e,t,h+1,i,a),Ys(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function za(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Fo(e,3*a,t,i);return r&&r>0?Ys(i,0,i.length,r):i}const oe="none";class Us{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 o=this._o(a);return this._d("line",[Uu(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=bb(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Na([h],o)):n.push(Ar([h],o))}return o.stroke!==oe&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=ju(i,s,o),h=vo(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=vo(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Ar([h.estimatedPoints],o));return o.stroke!==oe&&n.push(h.opset),this._d("ellipse",n,o)}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",[xs(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],d=Ql(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const u=Ql(t,r,i,s,a,o,!0,!1,p);u.type="fillPath",c.push(u)}else c.push((function(p,u,y,f,m,C,b){const k=p,S=u;let w=Math.abs(y/2),B=Math.abs(f/2);w+=at(.01*w,b),B+=at(.01*B,b);let M=m,v=C;for(;M<0;)M+=2*Math.PI,v+=2*Math.PI;v-M>2*Math.PI&&(M=0,v=2*Math.PI);const W=(v-M)/b.curveStepCount,D=[];for(let I=M;I<=v;I+=W)D.push([k+w*Math.cos(I),S+B*Math.sin(I)]);return D.push([k+w*Math.cos(v),S+B*Math.sin(v)]),D.push([k,S]),Ar([D],b)})(t,r,i,s,a,o,h));return h.stroke!==oe&&c.push(d),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=Kl(t,i);if(i.fill&&i.fill!==oe)if(i.fillStyle==="solid"){const o=Kl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...za(ih([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...za(ih(h),10,(1+i.roughness)/2))}o.length&&s.push(Ar([o],i))}return i.stroke!==oe&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=xs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Na([t],i)):s.push(Ar([t],i))),i.stroke!==oe&&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!==oe,o=i.stroke!==oe,n=!!(i.simplification&&i.simplification<1),l=(function(c,d,p){const u=Hu(Wu(Fn(c))),y=[];let f=[],m=[0,0],C=[];const b=()=>{C.length>=4&&f.push(...za(C,d)),C=[]},k=()=>{b(),f.length&&(y.push(f),f=[])};for(const{key:w,data:B}of u)switch(w){case"M":k(),m=[B[0],B[1]],f.push(m);break;case"L":b(),f.push([B[0],B[1]]);break;case"C":if(!C.length){const M=f.length?f[f.length-1]:m;C.push([M[0],M[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),f.push([m[0],m[1]])}if(k(),!p)return y;const S=[];for(const w of y){const B=Sb(w,p);B.length&&S.push(B)}return S})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Jl(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=Jl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(Na(l,i));else s.push(Ar(l,i));return o&&(n?l.forEach((c=>{s.push(xs(c,!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((o=>+o.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 o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:oe};break;case"fillPath":o={d:this.opsToPath(a),stroke:oe,strokeWidth:0,fill:i.fill||oe};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||oe,strokeWidth:i,fill:oe}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class wb{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Us(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.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,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,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 o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[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 o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}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,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);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 ls="http://www.w3.org/2000/svg";class _b{constructor(t,r){this.svg=t,this.gen=new Us(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(ls,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(ls,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(ls,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(ls,"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 o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}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,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);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 Z={canvas:(e,t)=>new wb(e,t),svg:(e,t)=>new _b(e,t),generator:e=>new Us(e),newSeed:()=>Us.newSeed()},st=g(async(e,t,r)=>{var u,y;let i;const s=t.useHtmlLabels||ze((u=xt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",qt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await We(o,be(xr(n),xt()),{useHtmlLabels:s,width:t.width||((y=xt().flowchart)==null?void 0:y.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},xt());let d=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const f=c.children[0],m=ht(c);await pu(f,n),d=f.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height)}return s?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:p,label:o}},"labelHelper"),Wa=g(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??ee(xt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await We(s,be(xr(t),xt()),{useHtmlLabels:i,width:r.width||((h=(l=xt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(ee(xt())){const c=a.children[0],d=ht(a);o=c.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}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"),J=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(pt,"createPathFromPoints");function ir(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,d=2*Math.PI/c,p=t+h/2;for(let u=0;u<=50;u++){const y=u/50,f=e+y*l,m=p+s*Math.sin(d*(f-e));o.push({x:f,y:m})}return o}g(ir,"generateFullSineWavePoints");function qi(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),y=t+r*Math.sin(p);o.push({x:-u,y:-y})}return o}g(qi,"generateCirclePoints");function Ao(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=g((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g(Ao,"mergePaths");var Bb=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),ni=Bb,vb=g(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=xt(),n=ee(o);return await We(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Ze=vb,sr=g((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"),Xu=g(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Q(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),u=d.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await We(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):y=await Ze(u,t.label,t.labelStyle||"",!1,!0);let f=y.getBBox();if(ee(r)){const M=y.children[0],v=ht(y);f=M.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const M=Z.svg(d),v=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),W=M.path(sr(b,k,m,C,0),v);S=d.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:w}=yn(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`),n){const M=u.select("span");M&&M.attr("style",n)}const B=S.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return ni(t,M)},{cluster:d,labelBBox:f}},"rect"),Lb=g((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 o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return ni(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Fb=g(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const u=await Ze(d,t.label,t.labelStyle,void 0,!0);let y=u.getBBox();if(ee(r)){const W=u.children[0],D=ht(u);y=W.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}const f=0*t.padding,m=f/2,C=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+f;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+f,k=t.height+f-y.height-6,S=t.x-C/2,w=t.y-b/2;t.width=C;const B=t.y-t.height/2-m+y.height+2;let M;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),D=Z.svg(h),I=t.rx||t.ry?D.path(sr(S,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):D.rectangle(S,w,C,b,{seed:s});M=h.insert(()=>I,":first-child");const Y=D.rectangle(S,B,C,k,{fill:W?a:o,fillStyle:W?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>I,":first-child"),p=h.insert(()=>Y)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",S).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",S).attr("y",B).attr("width",C).attr("height",k);d.attr("transform",`translate(${t.x-y.width/2}, ${w+1-(ee(r)?0:3)})`);const v=M.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(W){return ni(t,W)},{cluster:h,labelBBox:y}},"roundedWithTitle"),Ab=g(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Q(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),u=d.insert("g").attr("class","cluster-label "),y=await We(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let f=y.getBBox();if(ee(r)){const M=y.children[0],v=ht(y);f=M.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const M=Z.svg(d),v=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),W=M.path(sr(b,k,m,C,t.rx),v);S=d.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:w}=yn(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`),n){const M=u.select("span");M&&M.attr("style",n)}const B=S.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return ni(t,M)},{cluster:d,labelBBox:f}},"kanbanSection"),Eb=g((e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,d=t.x-h/2,p=t.y-c/2;t.width=h;let u;if(t.look==="handDrawn"){const m=Z.svg(o).rectangle(d,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});u=o.insert(()=>m,":first-child")}else{u=n.insert("rect",":first-child");let f="outer";t.look,f="divider",u.attr("class",f).attr("x",d).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const y=u.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return ni(t,f)},{cluster:o,labelBBox:{}}},"divider"),Mb=Xu,$b={rect:Xu,squareRect:Mb,roundedWithTitle:Fb,noteGroup:Lb,divider:Eb,kanbanSection:Ab},Vu=new Map,Ob=g(async(e,t)=>{const r=t.shape||"rect",i=await $b[r](e,t);return Vu.set(t.id,i),i},"insertCluster"),vS=g(()=>{Vu=new Map},"clear");function Zu(e,t){return e.intersect(t)}g(Zu,"intersectNode");var Ib=Zu;function Ku(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}g(Ku,"intersectEllipse");var Qu=Ku;function Ju(e,t,r){return Qu(e,t,t,r)}g(Ju,"intersectCircle");var Db=Ju;function tp(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&l!==0&&Eo(n,l))return;const c=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,u=c*e.x+d*e.y+p,y=c*t.x+d*t.y+p;if(Math.abs(u)<h&&Math.abs(y)<h&&Eo(u,y))return;const f=s*d-c*a;if(f===0)return;const m=Math.abs(f/2);let C=a*p-d*o;const b=C<0?(C-m)/f:(C+m)/f;C=c*o-s*p;const k=C<0?(C-m)/f:(C+m)/f;return{x:b,y:k}}}g(tp,"intersectLine");function Eo(e,t){return e*t>0}g(Eo,"sameSign");var Pb=tp;function ep(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let d=t[c],p=t[c<t.length-1?c+1:0],u=Pb(e,r,{x:l+d.x,y:h+d.y},{x:l+p.x,y:h+p.y});u&&a.push(u)}return a.length?(a.length>1&&a.sort(function(c,d){let p=c.x-r.x,u=c.y-r.y,y=Math.sqrt(p*p+u*u),f=d.x-r.x,m=d.y-r.y,C=Math.sqrt(f*f+m*m);return y<C?-1:y===C?0:1}),a[0]):e}g(ep,"intersectPolygon");var Rb=ep,G={node:Ib,circle:Db,ellipse:Qu,polygon:Rb,rect:ni};function rp(e,t){const{labelStyles:r}=Q(t);t.labelStyle=r;const i=it(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=Z.svg(a),h=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),d=a.insert(()=>c,":first-child");return d.attr("class","anchor").attr("style",qt(n)),J(t,d),t.intersect=function(p){return z.info("Circle intersect",t,o,p),G.circle(t,o,p)},a}g(rp,"anchor");function Mo(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),d=(r-e)/2,p=(i-t)/2,u=d/s,y=p/a,f=Math.sqrt(u**2+y**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-f**2),C=l+m*a*Math.sin(c)*(o?-1:1),b=h-m*s*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let w=Math.atan2((i-b)/a,(r-C)/s)-k;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const B=[];for(let M=0;M<20;M++){const v=M/19,W=k+v*w,D=C+s*Math.cos(W),I=b+a*Math.sin(W);B.push({x:D,y:I})}return B}g(Mo,"generateArcPoints");function ip(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(ip,"calculateArcSagitta");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=g(W=>W+o,"calcTotalHeight"),l=g(W=>{const D=W/2;return[D/(2.5+W/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await st(e,t,it(t)),d=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,u]=l(d),y=ip(d,p,u),m=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+y-y,C=d,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...Mo(-m/2,-C/2,-m/2,C/2,p,u,!1),{x:m/2,y:C/2},...Mo(m/2,C/2,m/2,-C/2,p,u,!0)],S=Z.svg(h),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=pt(k),M=S.path(B,w),v=h.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),J(t,v),t.intersect=function(W){return G.polygon(t,k,W)},h}g(sp,"bowTieRect");function He(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+")")}g(He,"insertPolygonShape");var hs=12;async function ap(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+hs),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),d=0,p=h,u=-c,y=0,f=[{x:d+hs,y:u},{x:p,y:u},{x:p,y},{x:d,y},{x:d,y:u+hs},{x:d+hs,y:u}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(n),k=K(t,{}),S=pt(f),w=b.path(S,k);m=n.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&m.attr("style",C)}else m=He(n,h,c,f);return i&&m.attr("style",i),J(t,m),t.intersect=function(b){return G.polygon(t,f,b)},n}g(ap,"card");function op(e,t){const{nodeStyles:r}=Q(t);t.label="";const i=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=pt(o),c=n.path(h,l),d=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return G.polygon(t,o,p)},i}g(op,"choice");async function An(e,t,r){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await st(e,t,it(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=Z.svg(a),y=K(t,{}),f=u.circle(0,0,c*2,y);d=a.insert(()=>f,":first-child"),d.attr("class","basic label-container").attr("style",qt(p))}else d=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return J(t,d),t.calcIntersect=function(u,y){const f=u.width/2;return G.circle(u,f,y)},t.intersect=function(u){return z.info("Circle intersect",t,c,u),G.circle(t,c,u)},a}g(An,"circle");function np(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},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
231
- M ${s.x},${s.y} L ${o.x},${o.y}`}g(np,"createLine");function lp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=Z.svg(s),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=np(a),d=n.path(c,l),p=s.insert(()=>h,":first-child");return p.insert(()=>d),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),J(t,p),t.intersect=function(u){return z.info("crossedCircle intersect",t,{radius:a,point:u}),G.circle(t,a,u)},s}g(lp,"crossedCircle");function De(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),y=t+r*Math.sin(p);o.push({x:-u,y:-y})}return o}g(De,"generateCirclePoints");async function hp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+n,c=a.height+l,d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...De(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...De(h/2+d*2,-d,d,20,-180,-270),...De(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...De(h/2,c/2,d,20,0,90)],y=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...De(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...De(h/2+h*.1,-d,d,20,-180,-270),...De(h/2+h*.1,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...De(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=Z.svg(s),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=pt(u).replace("Z",""),k=f.path(b,m),S=pt(y),w=f.path(S,{...m}),B=s.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d}, 0)`),o.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,B),t.intersect=function(M){return G.polygon(t,y,M)},s}g(hp,"curlyBraceLeft");function Pe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),y=t+r*Math.sin(p);o.push({x:u,y})}return o}g(Pe,"generateCirclePoints");async function cp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...Pe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...Pe(h/2+d*2,-d,d,20,-180,-270),...Pe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...Pe(h/2,c/2,d,20,0,90)],y=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...Pe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...Pe(h/2+d*2,-d,d,20,-180,-270),...Pe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...Pe(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=Z.svg(s),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=pt(u).replace("Z",""),k=f.path(b,m),S=pt(y),w=f.path(S,{...m}),B=s.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-d}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,B),t.intersect=function(M){return G.polygon(t,y,M)},s}g(cp,"curlyBraceRight");function Wt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),y=t+r*Math.sin(p);o.push({x:-u,y:-y})}return o}g(Wt,"generateCirclePoints");async function dp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...Wt(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...Wt(h/2+d*2,-d,d,20,-180,-270),...Wt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...Wt(h/2,c/2,d,20,0,90)],y=[...Wt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...Wt(-h/2-d/2,-d,d,20,0,90),...Wt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...Wt(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...Wt(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...Wt(h/2+d*2,-d,d,20,-180,-270),...Wt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...Wt(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...Wt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...Wt(-h/2-d/2,-d,d,20,0,90),...Wt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...Wt(-h/2+d+d/2,c/2,d,30,-180,-270)],m=Z.svg(s),C=K(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=pt(u).replace("Z",""),S=m.path(k,C),B=pt(y).replace("Z",""),M=m.path(B,C),v=pt(f),W=m.path(v,{...C}),D=s.insert("g",":first-child");return D.insert(()=>W,":first-child").attr("stroke-opacity",0),D.insert(()=>S,":first-child"),D.insert(()=>M,":first-child"),D.attr("class","text"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${d-d/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,D),t.intersect=function(I){return G.polygon(t,f,I)},s}g(dp,"curlyBraces");async function up(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await st(e,t,it(t)),d=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),u=p/2,{cssStyles:y}=t,f=Z.svg(h),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=d,b=p,k=C-u,S=b/4,w=[{x:k,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:k,y:b},...qi(-k,-b/2,u,50,270,90)],B=pt(w),M=f.path(B,m),v=h.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-d/2}, ${-p/2})`),J(t,v),t.intersect=function(W){return G.polygon(t,w,W)},h}g(up,"curvedTrapezoid");var qb=g((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"),Nb=g((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"),zb=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),sh=8,ah=8;async function pp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-o,t.width<ah&&(t.width=ah);const b=m/2/(2.5+m/50);t.height=(t.height??0)-a-b*3,t.height<sh&&(t.height=sh)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t.width?t.width:l.width)+o,d=c/2,p=d/(2.5+c/50),u=(t.height?t.height:l.height)+a+p;let y;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=Z.svg(n),C=Nb(0,0,c,u,d,p),b=zb(0,p,c,u,d,p),k=K(t,{}),S=m.path(C,k),w=m.path(b,K(t,{fill:"none"}));y=n.insert(()=>w,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),f&&y.attr("style",f)}else{const m=qb(0,0,c,u,d,p);y=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",qt(f)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-c/2}, ${-(u/2+p)})`),J(t,y),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=G.rect(t,m),b=C.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=p-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}g(pp,"cylinder");async function li(e,t,r){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await st(e,t,it(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let d,{rx:p,ry:u}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,u=r.ry),t.look==="handDrawn"){const f=Z.svg(a),m=K(t,{}),C=p||u?f.path(sr(h,c,n,l,p||0),m):f.rectangle(h,c,n,l,m);d=a.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",qt(y))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",qt(p)).attr("ry",qt(u)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return J(t,d),t.calcIntersect=function(f,m){return G.rect(f,m)},t.intersect=function(f){return G.rect(t,f)},a}g(li,"drawRect");async function gp(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await li(e,t,l);if(t.look==="handDrawn"){const u=Z.svg(h),y=K(t,{}),f=h.select(".basic.label-container > path:nth-child(2)"),m=f.node();if(!m)return h;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return h;return h.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,y),".basic.label-container g.label"),h.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,y),".basic.label-container g.label"),f.remove(),h}const c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||o)??0,p=(Number(c.attr("height"))||n)??0;return d>0&&p>0&&c.attr("stroke-dasharray",`${d} ${p}`),h}g(gp,"datastore");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=n.width+s,c=n.height+a,d=c*.2,p=-h/2,u=-c/2-d/2,{cssStyles:y}=t,f=Z.svg(o),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:p,y:u+d},{x:-p,y:u+d},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+d}],b=f.polygon(C.map(S=>[S.x,S.y]),m),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),J(t,k),t.intersect=function(S){return G.rect(t,S)},o}g(fp,"dividedRectangle");async function mp(e,t){var u,y;const{labelStyles:r,nodeStyles:i}=Q(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const f=Z.svg(n),m=K(t,{roughness:.2,strokeWidth:2.5}),C=K(t,{roughness:.2,strokeWidth:1.5}),b=f.circle(0,0,h*2,m),k=f.circle(0,0,c*2,C);d=n.insert("g",":first-child"),d.attr("class",qt(t.cssClasses)).attr("style",qt(p)),(u=d.node())==null||u.appendChild(b),(y=d.node())==null||y.appendChild(k)}else{d=n.insert("g",":first-child");const f=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return J(t,d),t.intersect=function(f){return z.info("DoubleCircle intersect",t,h,f),G.circle(t,h,f)},n}g(mp,"doublecircle");function yp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Q(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=Z.svg(a),{nodeBorder:h}=r,c=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const d=l.circle(0,0,o*2,c),p=a.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),J(t,p),t.intersect=function(u){return z.info("filledCircle intersect",t,{radius:o,point:u}),G.circle(t,o,u)},a}g(yp,"filledCircle");var oh=10,nh=10;async function Cp(e,t){const{labelStyles:r,nodeStyles:i}=Q(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<oh&&(t.height=oh),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<nh&&(t.width=nh));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,d=c,p=[{x:0,y:-c},{x:d,y:-c},{x:d/2,y:0}],{cssStyles:u}=t,y=Z.svg(o),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=pt(p),C=y.path(m,f),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,J(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return z.info("Triangle intersect",t,p,k),G.polygon(t,p,k)},o}g(Cp,"flippedTriangle");function xp(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=Q(t);t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,d=-1*h/2,p=Z.svg(o),u=K(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const y=p.rectangle(c,d,l,h,u),f=o.insert(()=>y,":first-child");n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),J(t,f);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return G.rect(t,C)},o}g(xp,"forkJoin");async function bp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+o*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,p=d/2,{cssStyles:u}=t,y=Z.svg(l),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2,y:-d/2},{x:c/2-p,y:-d/2},...qi(-c/2+p,0,p,50,90,270),{x:c/2-p,y:d/2},{x:-c/2,y:d/2}],C=pt(m),b=y.path(C,f),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(S){return z.info("Pill intersect",t,{radius:p,point:S}),G.polygon(t,m,S)},l}g(bp,"halfRoundedRectangle");var Wb=g((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 kp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n: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)-l}const{shapeSvg:c,bbox:d}=await st(e,t,it(t)),p=(t!=null&&t.height?t==null?void 0:t.height:d.height)+l,u=p/s,y=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*u+h,f=[{x:u,y:0},{x:y-u,y:0},{x:y,y:-p/2},{x:y-u,y:-p},{x:u,y:-p},{x:0,y:-p/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(c),k=K(t,{}),S=Wb(0,0,y,p,u),w=b.path(S,k);m=c.insert(()=>w,":first-child").attr("transform",`translate(${-y/2}, ${p/2})`),C&&m.attr("style",C)}else m=He(c,y,p,f);return i&&m.attr("style",i),t.width=y,t.height=p,J(t,m),t.intersect=function(b){return G.polygon(t,f,b)},c}g(kp,"hexagon");async function Tp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await st(e,t,it(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=Z.svg(s),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],d=pt(c),p=l.path(d,h),u=s.insert(()=>p,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-a/2}, ${-o/2})`),J(t,u),t.intersect=function(y){return z.info("Pill intersect",t,{points:c}),G.polygon(t,c,y)},s}g(Tp,"hourglass");async function Sp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await st(e,t,"icon-shape default"),p=t.pos==="t",u=n,y=n,{nodeBorder:f}=r,{stylesMap:m}=oi(t),C=-y/2,b=-u/2,k=t.label?8:0,S=Z.svg(h),w=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=S.rectangle(C,b,y,u,w),M=Math.max(y,c.width),v=u+c.height+k,W=S.rectangle(-M/2,-v/2,M,v,{...w,fill:"transparent",stroke:"none"}),D=h.insert(()=>B,":first-child"),I=h.insert(()=>W);if(t.icon){const Y=h.append("g");Y.html(`<g>${await Gi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const H=Y.node().getBBox(),P=H.width,E=H.height,L=H.x,O=H.y;Y.attr("transform",`translate(${-P/2-L},${p?c.height/2+k/2-E/2-O:-c.height/2-k/2-E/2-O})`),Y.attr("style",`color: ${m.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-v/2:v/2-c.height})`),D.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),J(t,I),t.intersect=function(Y){if(z.info("iconSquare intersect",t,Y),!t.label)return G.rect(t,Y);const H=t.x??0,P=t.y??0,E=t.height??0;let L=[];return p?L=[{x:H-c.width/2,y:P-E/2},{x:H+c.width/2,y:P-E/2},{x:H+c.width/2,y:P-E/2+c.height+k},{x:H+y/2,y:P-E/2+c.height+k},{x:H+y/2,y:P+E/2},{x:H-y/2,y:P+E/2},{x:H-y/2,y:P-E/2+c.height+k},{x:H-c.width/2,y:P-E/2+c.height+k}]:L=[{x:H-y/2,y:P-E/2},{x:H+y/2,y:P-E/2},{x:H+y/2,y:P-E/2+u},{x:H+c.width/2,y:P-E/2+u},{x:H+c.width/2/2,y:P+E/2},{x:H-c.width/2,y:P+E/2},{x:H-c.width/2,y:P-E/2+u},{x:H-y/2,y:P-E/2+u}],G.polygon(t,L,Y)},h}g(Sp,"icon");async function wp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await st(e,t,"icon-shape default"),p=20,u=t.label?8:0,y=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:C}=oi(t),b=Z.svg(h),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=C.get("fill");k.stroke=S??m;const w=h.append("g");t.icon&&w.html(`<g>${await Gi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=w.node().getBBox(),M=B.width,v=B.height,W=B.x,D=B.y,I=Math.max(M,v)*Math.SQRT2+p*2,Y=b.circle(0,0,I,k),H=Math.max(I,c.width),P=I+c.height+u,E=b.rectangle(-H/2,-P/2,H,P,{...k,fill:"transparent",stroke:"none"}),L=h.insert(()=>Y,":first-child"),O=h.insert(()=>E);return w.attr("transform",`translate(${-M/2-W},${y?c.height/2+u/2-v/2-D:-c.height/2-u/2-v/2-D})`),w.attr("style",`color: ${C.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${y?-P/2:P/2-c.height})`),L.attr("transform",`translate(0,${y?c.height/2+u/2:-c.height/2-u/2})`),J(t,O),t.intersect=function(A){return z.info("iconSquare intersect",t,A),G.rect(t,A)},h}g(wp,"iconCircle");async function _p(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:p}=await st(e,t,"icon-shape default"),u=t.pos==="t",y=n+d*2,f=n+d*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=oi(t),k=-f/2,S=-y/2,w=t.label?8:0,B=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=b.get("fill");M.stroke=v??C;const W=B.path(sr(k,S,f,y,5),M),D=Math.max(f,c.width),I=y+c.height+w,Y=B.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child").attr("class","icon-shape2"),P=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await Gi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),O=L.width,A=L.height,_=L.x,N=L.y;E.attr("transform",`translate(${-O/2-_},${u?c.height/2+w/2-A/2-N:-c.height/2-w/2-A/2-N})`),E.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${u?c.height/2+w/2:-c.height/2-w/2})`),J(t,P),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return G.rect(t,E);const L=t.x??0,O=t.y??0,A=t.height??0;let _=[];return u?_=[{x:L-c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2+c.height+w},{x:L+f/2,y:O-A/2+c.height+w},{x:L+f/2,y:O+A/2},{x:L-f/2,y:O+A/2},{x:L-f/2,y:O-A/2+c.height+w},{x:L-c.width/2,y:O-A/2+c.height+w}]:_=[{x:L-f/2,y:O-A/2},{x:L+f/2,y:O-A/2},{x:L+f/2,y:O-A/2+y},{x:L+c.width/2,y:O-A/2+y},{x:L+c.width/2/2,y:O+A/2},{x:L-c.width/2,y:O+A/2},{x:L-c.width/2,y:O-A/2+y},{x:L-f/2,y:O-A/2+y}],G.polygon(t,_,E)},h}g(_p,"iconRounded");async function Bp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:p}=await st(e,t,"icon-shape default"),u=t.pos==="t",y=n+d*2,f=n+d*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=oi(t),k=-f/2,S=-y/2,w=t.label?8:0,B=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=b.get("fill");M.stroke=v??C;const W=B.path(sr(k,S,f,y,.1),M),D=Math.max(f,c.width),I=y+c.height+w,Y=B.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child"),P=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await Gi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),O=L.width,A=L.height,_=L.x,N=L.y;E.attr("transform",`translate(${-O/2-_},${u?c.height/2+w/2-A/2-N:-c.height/2-w/2-A/2-N})`),E.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${u?c.height/2+w/2:-c.height/2-w/2})`),J(t,P),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return G.rect(t,E);const L=t.x??0,O=t.y??0,A=t.height??0;let _=[];return u?_=[{x:L-c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2+c.height+w},{x:L+f/2,y:O-A/2+c.height+w},{x:L+f/2,y:O+A/2},{x:L-f/2,y:O+A/2},{x:L-f/2,y:O-A/2+c.height+w},{x:L-c.width/2,y:O-A/2+c.height+w}]:_=[{x:L-f/2,y:O-A/2},{x:L+f/2,y:O-A/2},{x:L+f/2,y:O-A/2+y},{x:L+c.width/2,y:O-A/2+y},{x:L+c.width/2/2,y:O+A/2},{x:L-c.width/2,y:O+A/2},{x:L-c.width/2,y:O-A/2+y},{x:L-f/2,y:O-A/2+y}],G.polygon(t,_,E)},h}g(Bp,"iconSquare");async function vp(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:o}=Q(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:d,bbox:p,label:u}=await st(e,t,"image-shape default"),y=t.pos==="t",f=-h/2,m=-c/2,C=t.label?8:0,b=Z.svg(d),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=b.rectangle(f,m,h,c,k),w=Math.max(h,p.width),B=c+p.height+C,M=b.rectangle(-w/2,-B/2,w,B,{...k,fill:"none",stroke:"none"}),v=d.insert(()=>S,":first-child"),W=d.insert(()=>M);if(t.img){const D=d.append("image");D.attr("href",t.img),D.attr("width",h),D.attr("height",c),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-h/2},${y?B/2-c:-B/2})`)}return u.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${y?p.height/2+C/2:-p.height/2-C/2})`),J(t,W),t.intersect=function(D){if(z.info("iconSquare intersect",t,D),!t.label)return G.rect(t,D);const I=t.x??0,Y=t.y??0,H=t.height??0;let P=[];return y?P=[{x:I-p.width/2,y:Y-H/2},{x:I+p.width/2,y:Y-H/2},{x:I+p.width/2,y:Y-H/2+p.height+C},{x:I+h/2,y:Y-H/2+p.height+C},{x:I+h/2,y:Y+H/2},{x:I-h/2,y:Y+H/2},{x:I-h/2,y:Y-H/2+p.height+C},{x:I-p.width/2,y:Y-H/2+p.height+C}]:P=[{x:I-h/2,y:Y-H/2},{x:I+h/2,y:Y-H/2},{x:I+h/2,y:Y-H/2+c},{x:I+p.width/2,y:Y-H/2+c},{x:I+p.width/2/2,y:Y+H/2},{x:I-p.width/2,y:Y+H/2},{x:I-p.width/2,y:Y-H/2+c},{x:I-h/2,y:Y-H/2+c}],G.polygon(t,P,D)},d}g(vp,"imageSquare");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(n),f=K(t,{}),m=pt(d),C=y.path(m,f);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=He(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,J(t,p),t.intersect=function(y){return G.polygon(t,d,y)},n}g(Lp,"inv_trapezoid");async function Fp(e,t){const{shapeSvg:r,bbox:i,label:s}=await st(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))})`),J(t,a),t.intersect=function(l){return G.rect(t,l)},r}g(Fp,"labelRect");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(n),f=K(t,{}),m=pt(d),C=y.path(m,f);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=He(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(y){return G.polygon(t,d,y)},n}g(Ap,"lean_left");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(n),f=K(t,{}),m=pt(d),C=y.path(m,f);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=He(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(y){return G.polygon(t,d,y)},n}g(Ep,"lean_right");function Mp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=Z.svg(s),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=pt(h),u=c.path(p,d),y=s.insert(()=>u,":first-child");return y.attr("class","outer-path"),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${o/2},${-n})`),J(t,y),t.intersect=function(f){return z.info("lightningBolt intersect",t,f),G.polygon(t,h,f)},s}g(Mp,"lightningBolt");var Hb=g((e,t,r,i,s,a,o)=>[`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+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Yb=g((e,t,r,i,s,a,o)=>[`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+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Ub=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),lh=10,hh=10;async function $p(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<hh&&(t.width=hh);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<lh&&(t.height=lh)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=c/2,p=d/(2.5+c/50),u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,y=u*.1;let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=Z.svg(n),b=Yb(0,0,c,u,d,p,y),k=Ub(0,p,c,u,d,p),S=K(t,{}),w=C.path(b,S),B=C.path(k,S);n.insert(()=>B,":first-child").attr("class","line"),f=n.insert(()=>w,":first-child"),f.attr("class","basic label-container"),m&&f.attr("style",m)}else{const C=Hb(0,0,c,u,d,p,y);f=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",qt(m)).attr("style",i)}return f.attr("label-offset-y",p),f.attr("transform",`translate(${-c/2}, ${-(u/2+p)})`),J(t,f),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=G.rect(t,C),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-p)){let S=p*p*(1-k*k/(d*d));S>0&&(S=Math.sqrt(S)),S=p-S,C.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},n}g($p,"linedCylinder");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?d/4:d/8,u=d+p,{cssStyles:y}=t,f=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:u/2},...ir(-c/2-c/2*.1,u/2,c/2+c/2*.1,u/2,p,.8),{x:c/2+c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:-u/2},{x:-c/2,y:-u/2},{x:-c/2,y:u/2*1.1},{x:-c/2,y:-u/2}],b=f.polygon(C.map(S=>[S.x,S.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),J(t,k),t.intersect=function(S){return G.polygon(t,C,S)},n}g(Op,"linedWaveEdgedRect");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await st(e,t,it(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,u=d-2*n,y=p-2*n,f=-u/2,m=-y/2,{cssStyles:C}=t,b=Z.svg(l),k=K(t,{}),S=[{x:f-n,y:m+n},{x:f-n,y:m+y+n},{x:f+u-n,y:m+y+n},{x:f+u-n,y:m+y},{x:f+u,y:m+y},{x:f+u,y:m+y-n},{x:f+u+n,y:m+y-n},{x:f+u+n,y:m-n},{x:f+n,y:m-n},{x:f+n,y:m},{x:f,y:m},{x:f,y:m+n}],w=[{x:f,y:m+n},{x:f+u-n,y:m+n},{x:f+u-n,y:m+y},{x:f+u,y:m+y},{x:f+u,y:m},{x:f,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(S);let M=b.path(B,k);const v=pt(w);let W=b.path(v,k);t.look!=="handDrawn"&&(M=Ao(M),W=Ao(W));const D=l.insert("g",":first-child");return D.insert(()=>M),D.insert(()=>W),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),J(t,D),t.intersect=function(I){return G.polygon(t,S,I)},l}g(Ip,"multiRect");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const d=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,u=t.look==="neo"?p/4:p/8,y=p+(c?u/2:-u/2),f=-d/2,m=-y/2,C=10,{cssStyles:b}=t,k=ir(f-C,m+y+C,f+d-C,m+y+C,u,.8),S=k==null?void 0:k[k.length-1],w=[{x:f-C,y:m+C},{x:f-C,y:m+y+C},...k,{x:f+d-C,y:S.y-C},{x:f+d,y:S.y-C},{x:f+d,y:S.y-2*C},{x:f+d+C,y:S.y-2*C},{x:f+d+C,y:m-C},{x:f+C,y:m-C},{x:f+C,y:m},{x:f,y:m},{x:f,y:m+C}],B=[{x:f,y:m+C},{x:f+d-C,y:m+C},{x:f+d-C,y:S.y-C},{x:f+d,y:S.y-C},{x:f+d,y:m},{x:f,y:m}],M=Z.svg(s),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const W=pt(w),D=M.path(W,v),I=pt(B),Y=M.path(I,v),H=s.insert(()=>D,":first-child");return H.insert(()=>Y),H.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",i),H.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-u/2-(a.y-(a.top??0))})`),J(t,H),t.intersect=function(P){return G.polygon(t,w,P)},s}g(Dp,"multiWaveEdgedRectangle");async function Pp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i,t.useHtmlLabels||ee(Bt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-h/2,p=-c/2,{cssStyles:u}=t,y=Z.svg(o),f=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=y.rectangle(d,p,h,c,f),C=o.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,C),t.intersect=function(b){return G.rect(t,b)},o}g(Pp,"note");var jb=g((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 Rp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,it(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=Z.svg(s),y=K(t,{}),f=jb(0,0,l),m=u.path(f,y);d=s.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&d.attr("style",p)}else d=He(s,l,l,c),d.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&d.attr("style",i),J(t,d),t.calcIntersect=function(u,y){const f=u.width,m=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}],C=G.polygon(u,m,y);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}g(Rp,"question");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),d=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-c/2,u=-d/2,y=u/2,f=[{x:p+y,y:u},{x:p,y:0},{x:p+y,y:-u},{x:-p,y:-u},{x:-p,y:u}],{cssStyles:m}=t,C=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(f),S=C.path(k,b),w=n.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-y/2},0)`),h.attr("transform",`translate(${-y/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),J(t,w),t.intersect=function(B){return G.polygon(t,f,B)},n}g(qp,"rect_left_inv_arrow");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=Q(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),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Ze(n,h,t.labelStyle,!0,!0);let d={width:0,height:0};if(ee(xt())){const v=c.children[0],W=ht(c);d=v.getBoundingClientRect(),W.attr("width",d.width),W.attr("height",d.height)}z.info("Text 2",l);const p=l||[],u=c.getBBox(),y=await Ze(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),f=y.children[0],m=ht(y);d=f.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height);const C=(t.padding||0)/2;ht(y).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),ht(c).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),S=-d.width/2-C,w=-d.height/2-C;let B,M;if(t.look==="handDrawn"){const v=Z.svg(a),W=K(t,{}),D=v.path(sr(S,w,b,k,t.rx||0),W),I=v.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,W);M=a.insert(()=>(z.debug("Rough node insert CXC",D),I),":first-child"),B=a.insert(()=>(z.debug("Rough node insert CXC",D),D),":first-child")}else B=o.insert("rect",":first-child"),M=o.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),M.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return J(t,B),t.intersect=function(v){return G.rect(t,v)},a}g(Np,"rectWithTitle");async function zp(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 li(e,t,s)}g(zp,"roundedRect");var hr=8;async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?hr:hr*2),c=((t==null?void 0:t.height)??n.height)+a*2,d=h-hr,p=c,u=hr-h/2,y=-c/2,{cssStyles:f}=t,m=Z.svg(o),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y},{x:u+d,y},{x:u+d,y:y+p},{x:u-hr,y:y+p},{x:u-hr,y},{x:u,y},{x:u,y:y+p}],k=m.polygon(b.map(w=>[w.x,w.y]),C),S=o.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path").attr("style",qt(f)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${hr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,S),t.intersect=function(w){return G.rect(t,w)},o}g(Wp,"shadedProcess");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=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-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(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)+o*2)*1.5,p=c,u=d/1.5,y=-p/2,f=-u/2,{cssStyles:m}=t,C=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:y,y:f},{x:y,y:f+u},{x:y+p,y:f+u},{x:y+p,y:f-u/2}],S=pt(k),w=C.path(S,b),B=n.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${u/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),J(t,B),t.intersect=function(M){return G.polygon(t,k,M)},n}g(Hp,"slopedRect");async function Yp(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};return li(e,t,a)}g(Yp,"squareRect");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),d=h/2,{cssStyles:p}=t,u=Z.svg(n),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...qi(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...qi(c/2-d,0,d,50,270,450)],m=pt(f),C=u.path(m,y),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),J(t,b),t.intersect=function(k){return G.polygon(t,f,k)},n}g(Up,"stadium");async function jp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return li(e,t,r)}g(jp,"state");function Gp(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,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 c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=Z.svg(c),p=K(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const u=d.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),y=n??l,f=(t.width??0)*5/14,m=d.circle(0,0,f,{...p,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>u,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const S=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=S?`${S}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return J(t,C),t.intersect=function(S){return G.circle(t,(t.width??0)/2,S)},c}g(Gp,"stateEnd");function Xp(e,t,{config:{themeVariables:r}}){var n,l;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 o;if(t.look==="handDrawn"){const c=Z.svg(a).circle(0,0,t.width,ex(i));o=a.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.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=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return J(t,o),t.intersect=function(h){return G.circle(t,(t.width??7)/2,h)},a}g(Xp,"stateStart");var Er=8;async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+2*Er+a,c=((t==null?void 0:t.height)??l.height)+o,d=h-2*Er,p=c,u=-h/2,y=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const m=Z.svg(n),C=K(t,{}),b=m.rectangle(u,y,d+16,p,C),k=m.line(u+Er,y,u+Er,y+p,C),S=m.line(u+Er+d,y,u+Er+d,y+p,C);n.insert(()=>k,":first-child"),n.insert(()=>S,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:B}=t;w.attr("class","basic label-container").attr("style",qt(B)),J(t,w)}else{const m=He(n,d,p,f);i&&m.attr("style",i),J(t,m)}return t.intersect=function(m){return G.polygon(t,f,m)},n}g(Vp,"subroutine");var Ha=.2;async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Ha*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=Ha*h,d=Ha*h,u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,y=h,f=-u/2,m=-y/2,{cssStyles:C}=t,b=Z.svg(n),k=K(t,{}),S=[{x:f-c/2,y:m},{x:f+u+c/2,y:m},{x:f+u+c/2,y:m+y},{x:f-c/2,y:m+y}],w=[{x:f+u-c/2,y:m+y},{x:f+u+c/2,y:m+y},{x:f+u+c/2,y:m+y-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(S),M=b.path(B,k),v=pt(w),W=b.path(v,{...k,fillStyle:"solid"}),D=n.insert(()=>W,":first-child");return D.insert(()=>M,":first-child"),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),J(t,D),t.intersect=function(I){return G.polygon(t,S,I)},n}g(Zp,"taggedRect");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,d=.2*l,p=l+h,{cssStyles:u}=t,y=Z.svg(s),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-n/2-n/2*.1,y:p/2},...ir(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-d*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...ir(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],S=pt(m),w=y.path(S,f),B=pt(k),M=y.path(B,{...f,fillStyle:"solid"}),v=s.insert(()=>M,":first-child");return v.insert(()=>w,":first-child"),v.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),J(t,v),t.intersect=function(W){return G.polygon(t,m,W)},s}g(Kp,"taggedWaveEdgedRectangle");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),J(t,c),t.intersect=function(d){return G.rect(t,d)},s}g(Qp,"text");var Gb=g((e,t,r,i,s,a)=>`M${e},${t}
232
- a${s},${a} 0,0,1 0,${-i}
233
- l${r},0
234
- a${s},${a} 0,0,1 0,${i}
235
- M${r},${-i}
236
- a${s},${a} 0,0,0 0,${i}
237
- l${-r},0`,"createCylinderPathD"),Xb=g((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"),Vb=g((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),ch=5,dh=10;async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const f=t.height??0;t.height=(t.height??0)-a,t.height<ch&&(t.height=ch);const C=f/2/(2.5+f/50);t.width=(t.width??0)-a-C*3,t.width<dh&&(t.width=dh)}const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=(t.height?t.height:n.height)+a,c=h/2,d=c/(2.5+h/50),p=(t.width?t.width:n.width)+d+a,{cssStyles:u}=t;let y;if(t.look==="handDrawn"){const f=Z.svg(o),m=Xb(0,0,p,h,d,c),C=Vb(0,0,p,h,d,c),b=f.path(m,K(t,{})),k=f.path(C,K(t,{fill:"none"}));y=o.insert(()=>k,":first-child"),y=o.insert(()=>b,":first-child"),y.attr("class","basic label-container"),u&&y.attr("style",u)}else{const f=Gb(0,0,p,h,d,c);y=o.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",qt(u)).attr("style",i),y.attr("class","basic label-container outer-path"),u&&y.selectAll("path").attr("style",u),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",d),y.attr("transform",`translate(${-p/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,y),t.intersect=function(f){const m=G.rect(t,f),C=m.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,f.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},o}g(Jp,"tiltedCylinder");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(n),f=K(t,{}),m=pt(d),C=y.path(m,f);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=He(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(y){return G.polygon(t,d,y)},n}g(tg,"trapezoid");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await st(e,t,it(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:u}=t,y=Z.svg(h),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-d/2*.8,y:-p/2},{x:d/2*.8,y:-p/2},{x:d/2,y:-p/2*.6},{x:d/2,y:p/2},{x:-d/2,y:p/2},{x:-d/2,y:-p/2*.6}],C=pt(m),b=y.path(C,f),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(S){return G.polygon(t,m,S)},h}g(eg,"trapezoidalPentagon");var uh=10,ph=10;async function rg(e,t){var S;const{labelStyles:r,nodeStyles:i}=Q(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<ph&&(t.width=ph),t.height=(t==null?void 0:t.height)??0,t.height<uh&&(t.height=uh));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=ze((S=xt().flowchart)==null?void 0:S.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,d=t!=null&&t.height?t==null?void 0:t.height:c+n.height,p=d,u=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-d}],{cssStyles:y}=t,f=Z.svg(o),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=pt(u),b=f.path(C,m),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=d,J(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return z.info("Triangle intersect",t,u,w),G.polygon(t,u,w)},o}g(rg,"triangle");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!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)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await st(e,t,it(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,u=t.look==="neo"?p/4:p/8,y=p+(n?u:-u),{cssStyles:f}=t,C=14-d,b=C>0?C/2:0,k=Z.svg(l),S=K(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=[{x:-d/2-b,y:y/2},...ir(-d/2-b,y/2,d/2+b,y/2,u,.8),{x:d/2+b,y:-y/2},{x:-d/2-b,y:-y/2}],B=pt(w),M=k.path(B,S),v=l.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-u-(h.y-(h.top??0))})`),J(t,v),t.intersect=function(W){return G.polygon(t,w,W)},l}g(ig,"waveEdgedRectangle");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=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 S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-S*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,d=c/8,p=c+d*2,{cssStyles:u}=t,y=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-h/2,y:p/2},...ir(-h/2,p/2,h/2,p/2,d,1),{x:h/2,y:-p/2},...ir(h/2,-p/2,-h/2,-p/2,d,-1)],C=pt(m),b=y.path(C,f),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),J(t,k),t.intersect=function(S){return G.polygon(t,m,S)},n}g(sg,"waveRectangle");var Ft=10;async function ag(e,t){const{labelStyles:r,nodeStyles:i}=Q(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-Ft,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Ft,10));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Ft,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Ft,d=h-Ft,p=c-Ft,u=-d/2,y=-p/2,{cssStyles:f}=t,m=Z.svg(o),C=K(t,{}),b=[{x:u-Ft,y:y-Ft},{x:u-Ft,y:y+p},{x:u+d,y:y+p},{x:u+d,y:y-Ft}],k=`M${u-Ft},${y-Ft} L${u+d},${y-Ft} L${u+d},${y+p} L${u-Ft},${y+p} L${u-Ft},${y-Ft}
238
- M${u-Ft},${y} L${u+d},${y}
239
- M${u},${y-Ft} L${u},${y+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=m.path(k,C),w=o.insert(()=>S,":first-child");return w.attr("transform",`translate(${Ft/2}, ${Ft/2})`),w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Ft/2-(n.x-(n.left??0))}, ${-(n.height/2)+Ft/2-(n.y-(n.top??0))})`),J(t,w),t.intersect=function(B){return G.polygon(t,b,B)},o}g(ag,"windowPane");var gh=new Set(["redux-color","redux-dark-color"]),Zb=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function En(e,t){var vt,Nt,ae,le;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Bt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:et}=Bt(),{background:X}=et,St={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${X}`]};await En(e,St)}const h=Bt();t.useHtmlLabels=h.htmlLabels;let c=((vt=h.er)==null?void 0:vt.diagramPadding)??10,d=((Nt=h.er)==null?void 0:Nt.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:u,nodeStyles:y}=Q(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ne(t.label,h)+et.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const X=await li(e,t,et);if(i!=null&&gh.has(i)){const St=r.colorIndex??0;X.attr("data-color-id",`color-${St%l.length}`)}if(!ze(h.htmlLabels)){const St=X.select("text"),lt=(ae=St.node())==null?void 0:ae.getBBox();St.attr("transform",`translate(${-lt.width/2}, 0)`)}return X}h.htmlLabels||(c*=1.25,d*=1.25);let f=it(t);f||(f="node default");const m=e.insert("g").attr("class",f).attr("id",t.domId||t.id),C=await Or(m,t.label??"",h,0,0,["name"],u);C.height+=d;let b=0;const k=[],S=[];let w=0,B=0,M=0,v=0,W=!0,D=!0;for(const et of r.attributes){const X=await Or(m,et.type,h,0,b,["attribute-type"],u);w=Math.max(w,X.width+c);const St=await Or(m,et.name,h,0,b,["attribute-name"],u);B=Math.max(B,St.width+c);const lt=await Or(m,et.keys.join(),h,0,b,["attribute-keys"],u);M=Math.max(M,lt.width+c);const Te=await Or(m,et.comment,h,0,b,["attribute-comment"],u);v=Math.max(v,Te.width+c);const kt=Math.max(X.height,St.height,lt.height,Te.height)+d;S.push({yOffset:b,rowHeight:kt}),b+=kt}let I=4;M<=c&&(W=!1,M=0,I--),v<=c&&(D=!1,v=0,I--);const Y=m.node().getBBox();if(C.width+c*2-(w+B+M+v)>0){const et=C.width+c*2-(w+B+M+v);w+=et/I,B+=et/I,M>0&&(M+=et/I),v>0&&(v+=et/I)}const H=w+B+M+v,P=Z.svg(m),E=K(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let L=0;S.length>0&&(L=S.reduce((et,X)=>et+((X==null?void 0:X.rowHeight)??0),0));const O=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,H),A=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),_=-O/2,N=-A/2;if(m.selectAll("g:not(:first-child)").each((et,X,St)=>{const lt=ht(St[X]),Te=lt.attr("transform");let kt=0,Ye=0;if(Te){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Te);he&&(kt=parseFloat(he[1]),Ye=parseFloat(he[2]),lt.attr("class").includes("attribute-name")?kt+=w:lt.attr("class").includes("attribute-keys")?kt+=w+B:lt.attr("class").includes("attribute-comment")&&(kt+=w+B+M))}lt.attr("transform",`translate(${_+c/2+kt}, ${Ye+N+C.height+d/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(N+d/2)+")"),i!=null&&gh.has(i)){const et=r.colorIndex??0;m.attr("data-color-id",`color-${et%l.length}`)}const V=P.rectangle(_,N,O,A,E),dt=m.insert(()=>V,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[et,X]of S.entries()){const lt=(et+1)%2===0&&X.yOffset!==0,Te=P.rectangle(_,C.height+N+(X==null?void 0:X.yOffset),O,X==null?void 0:X.rowHeight,{...E,fill:lt?a:o,stroke:n});m.insert(()=>Te,"g.label").attr("style",p.join("")).attr("class",`row-rect-${lt?"even":"odd"}`)}const ft=1e-4;let ut=Ir(_,C.height+N,O+_,C.height+N,ft),Ct=P.polygon(ut.map(et=>[et.x,et.y]),E);if(m.insert(()=>Ct).attr("class","divider"),ut=Ir(w+_,C.height+N,w+_,A+N,ft),Ct=P.polygon(ut.map(et=>[et.x,et.y]),E),m.insert(()=>Ct).attr("class","divider"),W){const et=w+B+_;ut=Ir(et,C.height+N,et,A+N,ft),Ct=P.polygon(ut.map(X=>[X.x,X.y]),E),m.insert(()=>Ct).attr("class","divider")}if(D){const et=w+B+M+_;ut=Ir(et,C.height+N,et,A+N,ft),Ct=P.polygon(ut.map(X=>[X.x,X.y]),E),m.insert(()=>Ct).attr("class","divider")}for(const et of k){const X=C.height+N+et;ut=Ir(_,X,O+_,X,ft),Ct=P.polygon(ut.map(St=>[St.x,St.y]),E),m.insert(()=>Ct).attr("class","divider")}if(J(t,dt),y&&t.look!=="handDrawn")if(i!=null&&Zb.has(i))m.selectAll("path").attr("style",y);else{const et=y.split(";"),X=(le=et==null?void 0:et.filter(St=>St.includes("stroke")))==null?void 0:le.map(St=>`${St}`).join("; ");m.selectAll("path").attr("style",X??""),m.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(et){return G.rect(t,et)},m}g(En,"erBox");async function Or(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Bl(t)&&(t=Bl(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await We(n,t,{width:Ne(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let h=l.getBBox();if(ze(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const d=ht(l);h=c.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}g(Or,"addText");function Ir(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}]}g(Ir,"lineToPolygon");async function og(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",it(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,d=0,p=0,u=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Bi(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Bi(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();p=y.height,h=o.insert("g").attr("class","members-group text");let f=0;for(const b of t.members){const k=await Bi(h,b,f,[b.parseClassifier()]);f+=k+a}u=h.node().getBBox().height,u<=0&&(u=s/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await Bi(c,b,m,[b.parseClassifier()]);m+=k+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${d})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${d+p+s*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${d+p+(u?u+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}g(og,"textHelper");async function Bi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Bt();let o="useHtmlLabels"in t?t.useHtmlLabels:ze(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Oi(n)&&(o=!0);const l=await We(s,Ko(xr(n)),{width:Ne(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const d=l.children[0],p=ht(l);c=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(c+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const y=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(f=>new Promise(m=>{function C(){var b;if(f.style.display="flex",f.style.flexDirection="column",y){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";f.style.minWidth=w,f.style.maxWidth=w}else f.style.width="100%";m(f)}g(C,"setupImage"),setTimeout(()=>{f.complete&&C()}),f.addEventListener("error",C),f.addEventListener("load",C)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}g(Bi,"addText");async function ng(e,t){var P,E;const r=xt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??ze(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await og(e,t,r,n,o),{labelStyles:d,nodeStyles:p}=Q(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=((P=l.styles)==null?void 0:P.join(";"))||p||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),f=Z.svg(h),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const S=-C/2,w=-b/2;let B=y?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(B=a*2);const M=f.rectangle(S-a,w-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+B,m),v=h.insert(()=>M,":first-child");v.attr("class","basic label-container outer-path");const W=v.node().getBBox(),D=h.select(".annotation-group").node().getBBox().height-(y?a/2:0)||0,I=h.select(".label-group").node().getBBox().height-(y?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(y?a/2:0)||0,H=(D+I+w+a-(w-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((L,O,A)=>{var ut,Ct;const _=ht(A[O]),N=_.attr("transform");let V=0;if(N){const Nt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);Nt&&(V=parseFloat(Nt[2]))}let dt=V+w+a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(_.attr("class").includes("methods-group")){const vt=Math.max(Y,o/2);k?dt=Math.max(H,D+I+vt+w+o*2+a)+o*2:dt=D+I+vt+w+o*4+a}l.members.length===0&&l.methods.length===0&&((ut=r.class)!=null&&ut.hideEmptyMembersBox)&&(l.annotations.length>0?dt=V-o:dt=V),n||(dt-=4);let ft=S;(_.attr("class").includes("label-group")||_.attr("class").includes("annotation-group"))&&(ft=-((Ct=_.node())==null?void 0:Ct.getBBox().width)/2||0,h.selectAll("text").each(function(vt,Nt,ae){window.getComputedStyle(ae[Nt]).textAnchor==="middle"&&(ft=0)})),_.attr("transform",`translate(${ft}, ${dt})`)}),l.members.length>0||l.methods.length>0||y){const L=D+I+w+a,O=f.line(W.x,L,W.x+W.width,L+.001,m);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(y||l.members.length>0||l.methods.length>0){const L=D+I+Y+w+o*2+a,O=f.line(W.x,k?Math.max(H,L):L,W.x+W.width,(k?Math.max(H,L):L)+.001,m);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),h.selectAll(".divider").select("path").attr("style",u),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",u),!n){const L=RegExp(/color\s*:\s*([^;]*)/),O=L.exec(u);if(O){const A=O[0].replace("color","fill");h.selectAll("tspan").attr("style",A)}else if(d){const A=L.exec(d);if(A){const _=A[0].replace("color","fill");h.selectAll("tspan").attr("style",_)}}}return J(t,v),t.intersect=function(L){return G.rect(t,L)},h}g(ng,"classBox");async function lg(e,t){var W,D;const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=it(t),{themeVariables:c}=xt(),{borderColorArray:d,requirementEdgeLabelBackground:p}=c,u=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let y;l?y=await Le(u,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):y=await Le(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=y;const m=await Le(u,s.name,f,t.labelStyle+"; font-weight: bold;");if(f+=m+n,l){const I=await Le(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,f,t.labelStyle);f+=I;const Y=await Le(u,`${s.text?`Text: ${s.text}`:""}`,f,t.labelStyle);f+=Y;const H=await Le(u,`${s.risk?`Risk: ${s.risk}`:""}`,f,t.labelStyle);f+=H,await Le(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,f,t.labelStyle)}else{const I=await Le(u,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=I,await Le(u,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const C=(((W=u.node())==null?void 0:W.getBBox().width)??200)+o,b=(((D=u.node())==null?void 0:D.getBBox().height)??200)+o,k=-C/2,S=-b/2,w=Z.svg(u),B=K(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const M=w.rectangle(k,S,C,b,B),v=u.insert(()=>M,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const I=t.colorIndex??0;u.attr("data-color-id",`color-${I%d.length}`)}if(u.selectAll(".label").each((I,Y,H)=>{const P=ht(H[Y]),E=P.attr("transform");let L=0,O=0;if(E){const V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);V&&(L=parseFloat(V[1]),O=parseFloat(V[2]))}const A=O-b/2;let _=k+o/2;(Y===0||Y===1)&&(_=L),P.attr("transform",`translate(${_}, ${A+o})`)}),f>y+m+n){const I=S+y+m+n;let Y;if(t.look==="neo"){const E=[[k,I],[k+C,I],[k+C,I+.001],[k,I+.001]];Y=w.polygon(E,B)}else Y=w.line(k,I,k+C,I,B);u.insert(()=>Y).attr("class","divider")}return J(t,v),t.intersect=function(I){return G.rect(t,I)},i&&t.look!=="handDrawn"&&(p||d!=null&&d.length)&&u.selectAll("path").attr("style",i),u}g(lg,"requirementBox");async function Le(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=xt(),o=a.htmlLabels??!0,n=await We(s,Ko(xr(t)),{width:Ne(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=ht(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(Le,"addText");var Kb=g(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 hg(e,t,{config:r}){var Y,H;const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=t.padding||10;let d="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(d=(H=r==null?void 0:r.kanban)==null?void 0:H.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,f;p?{label:y,bbox:f}=await Wa(p,"ticket"in t&&t.ticket||"",u):{label:y,bbox:f}=await Wa(n,"ticket"in t&&t.ticket||"",u);const{label:m,bbox:C}=await Wa(n,"assigned"in t&&t.assigned||"",u);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,S=Math.max(f.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+S,B=-k/2,M=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-S-l.height/2)+")"),y.attr("transform","translate("+(c-k/2)+", "+(-S+l.height/2)+")"),m.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-S+l.height/2)+")");let v;const{rx:W,ry:D}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const P=Z.svg(n),E=K(t,{}),L=W||D?P.path(sr(B,M,k,w,W||0),E):P.rectangle(B,M,k,w,E);v=n.insert(()=>L,":first-child"),v.attr("class","basic label-container").attr("style",I||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",D??5).attr("x",B).attr("y",M).attr("width",k).attr("height",w);const P="priority"in t&&t.priority;if(P){const E=n.append("line"),L=B+2,O=M+Math.floor((W??0)/2),A=M+w-Math.floor((W??0)/2);E.attr("x1",L).attr("y1",O).attr("x2",L).attr("y2",A).attr("stroke-width","4").attr("stroke",Kb(P))}}return J(t,v),t.height=w,t.intersect=function(P){return G.rect(t,P)},n}g(hg,"kanbanItem");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:d}=t,p=a.width+20,u=a.height+20,y=Math.max(l,p),f=Math.max(h,u);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let m;const C=`M0 0
240
- a${c},${c} 1 0,0 ${y*.25},${-1*f*.1}
241
- a${c},${c} 1 0,0 ${y*.25},0
242
- a${c},${c} 1 0,0 ${y*.25},0
243
- a${c},${c} 1 0,0 ${y*.25},${f*.1}
244
-
245
- a${c},${c} 1 0,0 ${y*.15},${f*.33}
246
- a${c*.8},${c*.8} 1 0,0 0,${f*.34}
247
- a${c},${c} 1 0,0 ${-1*y*.15},${f*.33}
248
-
249
- a${c},${c} 1 0,0 ${-1*y*.25},${f*.15}
250
- a${c},${c} 1 0,0 ${-1*y*.25},0
251
- a${c},${c} 1 0,0 ${-1*y*.25},0
252
- a${c},${c} 1 0,0 ${-1*y*.25},${-1*f*.15}
253
-
254
- a${c},${c} 1 0,0 ${-1*y*.1},${-1*f*.33}
255
- a${c*.8},${c*.8} 1 0,0 0,${-1*f*.34}
256
- a${c},${c} 1 0,0 ${y*.1},${-1*f*.33}
257
- H0 V0 Z`;if(t.look==="handDrawn"){const b=Z.svg(s),k=K(t,{}),S=b.path(C,k);m=s.insert(()=>S,":first-child"),m.attr("class","basic label-container").attr("style",qt(d))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-y/2}, ${-f/2})`),J(t,m),t.calcIntersect=function(b,k){return G.rect(b,k)},t.intersect=function(b){return z.info("Bang intersect",t,b),G.rect(t,b)},s}g(cg,"bang");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+2*o,h=a.height+2*o,c=.15*l,d=.25*l,p=.35*l,u=.2*l,{cssStyles:y}=t;let f;const m=`M0 0
258
- a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
259
- a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
260
- a${d},${d} 1 0,1 ${l*.35},${l*.2}
261
-
262
- a${c},${c} 1 0,1 ${l*.15},${h*.35}
263
- a${u},${u} 1 0,1 ${-1*l*.15},${h*.65}
264
-
265
- a${d},${c} 1 0,1 ${-1*l*.25},${l*.15}
266
- a${p},${p} 1 0,1 ${-1*l*.5},0
267
- a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
268
-
269
- a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
270
- a${u},${u} 1 0,1 ${l*.1},${-1*h*.65}
271
- H0 V0 Z`;if(t.look==="handDrawn"){const C=Z.svg(s),b=K(t,{}),k=C.path(m,b);f=s.insert(()=>k,":first-child"),f.attr("class","basic label-container").attr("style",qt(y))}else f=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),J(t,f),t.calcIntersect=function(C,b){return G.rect(C,b)},t.intersect=function(C){return z.info("Cloud intersect",t,C),G.rect(t,C)},s}g(dg,"cloud");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+8*o,h=a.height+2*o,c=5,d=t.look==="neo"?`
272
- M${-l/2} ${h/2-c}
273
- v${-h+2*c}
274
- q0,-${c} ${c},-${c}
275
- h${l-2*c}
276
- q${c},0 ${c},${c}
277
- v${h-c}
278
- H${-l/2}
279
- Z
280
- `:`
281
- M${-l/2} ${h/2-c}
282
- v${-h+2*c}
283
- q0,-${c} ${c},-${c}
284
- h${l-2*c}
285
- q${c},0 ${c},${c}
286
- v${h-2*c}
287
- q0,${c} ${-c},${c}
288
- h${-(l-2*c)}
289
- q${-c},0 ${-c},${-c}
290
- Z
291
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),J(t,p),t.calcIntersect=function(u,y){return G.rect(u,y)},t.intersect=function(u){return G.rect(t,u)},s}g(ug,"defaultMindmapNode");async function pg(e,t){const r={padding:t.padding??0};return An(e,t,r)}g(pg,"mindmapCircle");var Qb=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Yp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:zp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Up},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Vp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:pp},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:gp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:An},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:cg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:dg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Rp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:kp},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Ep},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ap},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tg},{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:Lp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:mp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Qp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ap},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Wp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Xp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Gp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:xp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Tp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:hp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:cp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:dp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Mp},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ig},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:bp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Jp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:$p},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:up},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:fp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:rg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ag},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:yp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:eg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Cp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Hp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Dp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ip},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:sp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:lp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Kp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Zp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:sg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:qp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Op}],Jb=g(()=>{const t=[...Object.entries({state:jp,choice:op,note:Pp,rectWithTitle:Np,labelRect:Fp,iconSquare:Bp,iconCircle:wp,icon:Sp,iconRounded:_p,imageSquare:vp,anchor:rp,kanbanItem:hg,mindmapCircle:pg,defaultMindmapNode:ug,classBox:ng,erBox:En,requirementBox:lg}),...Qb.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),gg=Jb();function tk(e){return e in gg}g(tk,"isValidShape");var oa=new Map;async function fg(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?gg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",qt(t.look)),t.tooltip&&s.attr("title",t.tooltip),oa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(fg,"insertNode");var LS=g((e,t)=>{oa.set(t.id,e)},"setNodeElem"),FS=g(()=>{oa.clear()},"clear"),AS=g(e=>{const t=oa.get(e.id);z.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),ek=g((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&fh(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&fh(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),rk={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},ik=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],fh=g((e,t,r,i,s,a,o=!1,n)=>{var y;const l=rk[r],h=l&&ik.includes(l.type);if(!l){z.warn(`Unknown arrow type: ${r}`);return}const c=l.type,u=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const f=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${f}`;if(!document.getElementById(m)){const C=document.getElementById(u);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),(y=C.parentNode)==null||y.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),sk=g(e=>{var t,r;return typeof e=="string"?e:(r=(t=xt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),js=new Map,Ht=new Map,ES=g(()=>{js.clear(),Ht.clear()},"clear"),ki=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),ak=g(async(e,t)=>{const r=xt();let i=ee(r);const{labelStyles:s}=Q(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await We(e,t.label,{style:ki(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),z.info("abc82",t,t.labelType);let c=h.getBBox(),d=c;if(i){const u=h.children[0],y=ht(h);c=u.getBoundingClientRect(),d=c,y.attr("width",c.width),y.attr("height",c.height)}else{const u=ht(h).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}o.attr("transform",mi(d,i)),js.set(t.id,a),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(y,t.startLabelLeft,ki(t.labelStyle)||"",!1,!1);p=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",mi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=u,vi(p,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(y,t.startLabelRight,ki(t.labelStyle)||"",!1,!1);p=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",mi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=u,vi(p,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(u,t.endLabelLeft,ki(t.labelStyle)||"",!1,!1);p=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",mi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=u,vi(p,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(u,t.endLabelRight,ki(t.labelStyle)||"",!1,!1);p=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",mi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=u,vi(p,t.endLabelRight)}return h},"insertEdgeLabel");function vi(e,t){ee(xt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(vi,"setTerminalWidth");var ok=g((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,js.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:s}=yn(i);if(e.label){const a=js.get(e.id);let o=e.x,n=e.y;if(r){const l=ye.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Ht.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ht.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ht.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ht.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),nk=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),lk=g((e,t,r)=>{z.debug(`intersection calc abc89:
292
- outsidePoint: ${JSON.stringify(t)}
293
- insidePoint : ${JSON.stringify(r)}
294
- 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),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=c*d/h;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-d:r.y-h+d};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),z.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${c}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let d=h*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,u=r.y<t.y?r.y+d:r.y-d;return z.debug(`sides calc abc89, Q ${h}, q ${d}, R ${c}, r ${n}`,{_x:p,_y:u}),n===0&&(p=t.x,u=t.y),c===0&&(p=t.x),h===0&&(u=t.y),{x:p,y:u}}},"intersection"),mh=g((e,t)=>{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(z.info("abc88 checking point",a,t),!nk(t,a)&&!s){const o=lk(t,i,a);z.debug("abc88 inside",a,i,o),z.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?z.warn("abc88 no intersect",o,r):r.push(o),s=!0}else z.warn("abc88 outside",a,i),i=a,s||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");function mg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(mg,"extractCornerPoints");var yh=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),hk=g(function(e){const{cornerPointPositions:t}=mg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=yh(s,o,5),l=yh(a,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const u=5;o.x===n.x?p={x:h<0?n.x-u+d:n.x+u-d,y:c<0?n.y-d:n.y+d}:p={x:h<0?n.x-d:n.x+d,y:c<0?n.y-u+d:n.y+u-d}}else z.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),ck=g((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),dk=g(function(e,t,r,i,s,a,o,n=!1){var O;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=xt();let h=t.points,c=!1;const d=s;var p=a;const u=[];for(const A in t.cssCompiledStyles)gu(A)||u.push(t.cssCompiledStyles[A]);z.debug("UIO intersect check",t.points,p.x,d.x),p.intersect&&d.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),z.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=mh(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=mh(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let f=h.filter(A=>!Number.isNaN(A.y));const m=sk(t.curve);m!=="rounded"&&(f=hk(f));let C=Li;switch(m){case"linear":C=Li;break;case"basis":C=Xa;break;case"cardinal":C=Mh;break;case"bumpX":C=vh;break;case"bumpY":C=Lh;break;case"catmullRom":C=Oh;break;case"monotoneX":C=Nh;break;case"monotoneY":C=zh;break;case"natural":C=Hh;break;case"step":C=Yh;break;case"stepAfter":C=jh;break;case"stepBefore":C=Uh;break;case"rounded":C=Li;break;default:C=Xa}const{x:b,y:k}=s0(t),S=Yf().x(b).y(k).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let B,M=m==="rounded"?yg(Cg(f,t),5):S(f);const v=Array.isArray(t.style)?t.style:[t.style];let W=v.find(A=>A==null?void 0:A.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let I=!1;if(t.look==="handDrawn"){const A=Z.svg(e);Object.assign([],f);const _=A.path(M,{roughness:.3,seed:l});w+=" transition",B=ht(_).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",v?v.reduce((V,dt)=>V+";"+dt,""):"");let N=B.attr("d");B.attr("d",N),e.node().appendChild(B.node())}else{const A=u.join(";"),_=v?v.reduce((Ct,vt)=>Ct+vt+";",""):"",N=(A?A+";"+_+";":_)+";"+(v?v.reduce((Ct,vt)=>Ct+";"+vt,""):"");B=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",N),W=(O=N.match(/stroke:([^;]+)/))==null?void 0:O[1],I=t.animate===!0||!!t.animation||A.includes("animation");const V=B.node(),dt=typeof V.getTotalLength=="function"?V.getTotalLength():0,ft=El[t.arrowTypeStart]||0,ut=El[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const vt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?ck(dt,ft,ut):`0 ${ft} ${dt-ft-ut} ${ut}`}; stroke-dashoffset: 0;`;B.attr("style",vt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",y),B.attr("data-look",qt(t.look)),t.showPoints&&f.forEach(A=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",A.x).attr("cy",A.y)});let Y="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);const H=!I&&(t==null?void 0:t.look)==="neo";ek(B,t,Y,o,i,H,W);const P=Math.floor(h.length/2),E=h[P];ye.isLabelCoordinateInPath(E,B.attr("d"))||(c=!0);let L={};return c&&(L.updatedPath=h),L.originalPath=t.points,L},"insertEdge");function yg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,d=l.x-o.x,p=l.y-o.y,u=Math.hypot(h,c),y=Math.hypot(d,p);if(u<s||y<s){r+=`L${o.x},${o.y}`;continue}const f=h/u,m=c/u,C=d/y,b=p/y,k=f*C+m*b,S=Math.max(-1,Math.min(1,k)),w=Math.acos(S);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${o.x},${o.y}`;continue}const B=Math.min(t/Math.sin(w/2),u/2,y/2),M=o.x-f*B,v=o.y-m*B,W=o.x+C*B,D=o.y+b*B;r+=`L${M},${v}`,r+=`Q${o.x},${o.y} ${W},${D}`}}return r}g(yg,"generateRoundedPath");function $o(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}}g($o,"calculateDeltaAndAngle");function Cg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Gt[t.arrowTypeStart]){const s=Gt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=$o(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Gt[t.arrowTypeEnd]){const s=Gt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=$o(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}g(Cg,"applyMarkerOffsetsToPoints");var uk=g((e,t,r,i)=>{t.forEach(s=>{Ik[s](e,r,i)})},"insertMarkers"),pk=g((e,t,r)=>{z.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").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"),gk=g((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").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").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"),fk=g((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").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").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"),mk=g((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").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").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"),yk=g((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").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").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"),Ck=g((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"),xk=g((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"),bk=g((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"),kk=g((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"),Tk=g((e,t,r)=>{const i=Bt(),{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"),Sk=g((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"),wk=g((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"),_k=g((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"),Bk=g((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"),vk=g((e,t,r)=>{const i=Bt(),{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"),Lk=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=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");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Fk=g((e,t,r)=>{const i=Bt(),{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"),Ak=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=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");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),Ek=g((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
295
- L20,10
296
- M20,10
297
- L0,20`)},"requirement_arrow"),Mk=g((e,t,r)=>{const i=Bt(),{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
298
- L20,10
299
- M20,10
300
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),$k=g((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"),Ok=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=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");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Ik={extension:pk,composition:gk,aggregation:fk,dependency:mk,lollipop:yk,point:Ck,circle:xk,cross:bk,barb:kk,barbNeo:Tk,only_one:Sk,zero_or_one:wk,one_or_more:_k,zero_or_more:Bk,only_one_neo:vk,zero_or_one_neo:Lk,one_or_more_neo:Fk,zero_or_more_neo:Ak,requirement_arrow:Ek,requirement_contains:$k,requirement_arrow_neo:Mk,requirement_contains_neo:Ok},Dk=uk,Pk={common:Hi,getConfig:Bt,insertCluster:Ob,insertEdge:dk,insertEdgeLabel:ak,insertMarkers:Dk,insertNode:fg,interpolateToCurve:dn,labelHelper:st,log:z,positionEdgeLabel:ok},Ni={},xg=g(e=>{for(const t of e)Ni[t.name]=t},"registerLayoutLoaders"),Rk=g(()=>{xg([{name:"dagre",loader:g(async()=>await gt(()=>import("./dagre-BM42HDAG-CISbgani.js"),__vite__mapDeps([0,1,2,3,4,5,6])),"loader")},{name:"cose-bilkent",loader:g(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A-CAM4jLYo.js"),__vite__mapDeps([7,8,6,3,4,5])),"loader")}])},"registerDefaultLayoutLoaders");Rk();var MS=g(async(e,t)=>{if(!(e.layoutAlgorithm in Ni))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const d=c.domId||c.id;c.domId=`${e.diagramId}-${d}`}const r=Ni[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Pk,{algorithm:r.algorithm})},"render"),$S=g((e="",{fallback:t="dagre"}={})=>{if(e in Ni)return e;if(t in Ni)return z.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Mn="comm",bg="rule",kg="decl",qk="@media",Nk="@import",zk="@supports",Wk="@namespace",Oo="@keyframes",Tg="@layer",Hk="@scope",Yk=Math.abs,$i=String.fromCharCode;function Sg(e){return e.trim()}function Io(e,t,r){return e.replace(t,r)}function qr(e,t){return e.charCodeAt(t)|0}function si(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function wg(e){return e.length}function cs(e,t){return t.push(e),e}var na=1,ai=1,_g=0,ue=0,Mt=0,hi="";function $n(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:na,column:ai,length:o,return:"",siblings:n}}function Uk(){return Mt}function jk(){return Mt=ue>0?qr(hi,--ue):0,ai--,Mt===10&&(ai=1,na--),Mt}function xe(){return Mt=ue<_g?qr(hi,ue++):0,ai++,Mt===10&&(ai=1,na++),Mt}function Ke(){return qr(hi,ue)}function ks(){return ue}function la(e,t){return si(hi,e,t)}function zi(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 Gk(e){return na=ai=1,_g=Fe(hi=e),ue=0,[]}function Xk(e){return hi="",e}function Ya(e){return Sg(la(ue-1,Do(e===91?e+2:e===40?e+1:e)))}function Vk(e){for(;(Mt=Ke())&&Mt<33;)xe();return zi(e)>2||zi(Mt)>3?"":" "}function Zk(e,t){for(;--t&&xe()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return la(e,ks()+(t<6&&Ke()==32&&xe()==32))}function Do(e){for(;xe();)switch(Mt){case e:return ue;case 34:case 39:e!==34&&e!==39&&Do(Mt);break;case 40:e===41&&Do(e);break;case 92:xe();break}return ue}function Kk(e,t){for(;xe()&&e+Mt!==57;)if(e+Mt===84&&Ke()===47)break;return"/*"+la(t,ue-1)+"*"+$i(e===47?e:xe())}function Qk(e){for(;!zi(Ke());)xe();return la(e,ue)}function Jk(e){return Xk(Ts("",null,null,null,[""],e=Gk(e),0,[0],e))}function Ts(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,d=o,p=0,u=0,y=0,f=1,m=1,C=1,b=0,k=0,S="",w=s,B=a,M=i,v=S;m;)switch(y=k,k=xe()){case 40:y!=108&&qr(v,d-1)==58?(b++,v+="("):v+=Ya(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=Ya(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=$i(k);break}v+=Vk(y);break;case 92:v+=Zk(ks()-1,7);continue;case 47:switch(Ke()){case 42:case 47:cs(t1(Kk(xe(),ks()),t,r,l),l),(zi(y||1)==5||zi(Ke()||1)==5)&&Fe(v)&&si(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*f:n[h++]=Fe(v)*C;case 125*f:case 59:case 0:if(b>0&&k){v+=$i(k);break}switch(k){case 0:case 125:m=0;case 59+c:C==-1&&(v=Io(v,/\f/g,"")),u>0&&(Fe(v)-d||f===0)&&cs(u>32?xh(v+";",i,r,d-1,l):xh(Io(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(cs(M=Ch(v,t,r,h,c,s,n,S,w=[],B=[],d,a),a),k===123)if(c===0)Ts(v,t,M,M,w,a,d,n,B);else{switch(p){case 99:if(qr(v,3)===110)break;case 108:if(qr(v,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Ts(e,M,M,i&&cs(Ch(e,M,M,0,0,s,n,S,s,w=[],d,B),B),s,B,d,n,i?w:B):Ts(v,M,M,M,[""],B,0,n,B)}}h=c=u=0,f=C=1,S=v="",d=o;break;case 58:d=1+Fe(v),u=y;default:if(f<1){if(k==123)--f;else if(k==125&&f++==0&&jk()==125)continue}switch(v+=$i(k),k*f){case 38:C=c>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[h++]=(Fe(v)-1)*C,C=1;break;case 64:Ke()===45&&(v+=Ya(xe())),p=Ke(),c=d=Fe(S=v+=Qk(ks())),k++;break;case 45:y===45&&Fe(v)==2&&(f=0)}}return a}function Ch(e,t,r,i,s,a,o,n,l,h,c,d){for(var p=s-1,u=s===0?a:[""],y=wg(u),f=0,m=0,C=0;f<i;++f)for(var b=0,k=si(e,p+1,p=Yk(m=o[f])),S=e;b<y;++b)(S=Sg(m>0?u[b]+" "+k:Io(k,/&\f/g,u[b])))&&(l[C++]=S);return $n(e,t,r,s===0?bg:n,l,h,c,d)}function t1(e,t,r,i){return $n(e,t,r,Mn,$i(Uk()),si(e,2,-2),0,i)}function xh(e,t,r,i,s){return $n(e,t,r,kg,si(e,0,i),si(e,i+1,-1),i,s)}function Po(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function e1(e,t,r,i){switch(e.type){case Tg:if(e.children.length)break;case Nk:case Wk:case kg:return e.return=e.return||e.value;case Mn:return"";case Oo:return e.return=e.value+"{"+Po(e.children,i)+"}";case bg:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=Po(e.children,i))?e.return=e.value+"{"+r+"}":""}function r1(e){var t=wg(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var Bg="c4",i1=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),s1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-BIwHcwcH.js");return{diagram:t}},__vite__mapDeps([9,10,6,3,4,5]));return{id:Bg,diagram:e}},"loader"),a1={id:Bg,detector:i1,loader:s1},o1=a1,vg="flowchart",n1=g((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),l1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-D-q1cK69.js");return{diagram:t}},__vite__mapDeps([11,12,10,6,13,14,15,3,4,5]));return{id:vg,diagram:e}},"loader"),h1={id:vg,detector:n1,loader:l1},c1=h1,Lg="flowchart-v2",d1=g((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),u1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-D-q1cK69.js");return{diagram:t}},__vite__mapDeps([11,12,10,6,13,14,15,3,4,5]));return{id:Lg,diagram:e}},"loader"),p1={id:Lg,detector:d1,loader:u1},g1=p1,Fg="er",f1=g(e=>/^\s*erDiagram/.test(e),"detector"),m1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-BSWwMysi.js");return{diagram:t}},__vite__mapDeps([16,13,6,14,15,3,4,5]));return{id:Fg,diagram:e}},"loader"),y1={id:Fg,detector:f1,loader:m1},C1=y1,Ag="gitGraph",x1=g(e=>/^\s*gitGraph/.test(e),"detector"),b1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-vJByl99X.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,3,4,5,6]));return{id:Ag,diagram:e}},"loader"),k1={id:Ag,detector:x1,loader:b1},T1=k1,Eg="gantt",S1=g(e=>/^\s*gantt/.test(e),"detector"),w1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-DrYn1H_t.js");return{diagram:t}},__vite__mapDeps([21,6,22,23,24,3,4,5]));return{id:Eg,diagram:e}},"loader"),_1={id:Eg,detector:S1,loader:w1},B1=_1,Mg="info",v1=g(e=>/^\s*info/.test(e),"detector"),L1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-D6zhGTMj.js");return{diagram:t}},__vite__mapDeps([25,20,3,4,5,6]));return{id:Mg,diagram:e}},"loader"),F1={id:Mg,detector:v1,loader:L1},$g="pie",A1=g(e=>/^\s*pie/.test(e),"detector"),E1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-C7GJ49et.js");return{diagram:t}},__vite__mapDeps([26,18,20,3,4,5,6,27,28,23]));return{id:$g,diagram:e}},"loader"),M1={id:$g,detector:A1,loader:E1},Og="quadrantChart",$1=g(e=>/^\s*quadrantChart/.test(e),"detector"),O1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-DQyQN5K7.js");return{diagram:t}},__vite__mapDeps([29,6,22,23,24,3,4,5]));return{id:Og,diagram:e}},"loader"),I1={id:Og,detector:$1,loader:O1},D1=I1,Ig="xychart",P1=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),R1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-OJbmgDx6.js");return{diagram:t}},__vite__mapDeps([30,6,23,28,22,24,3,4,5]));return{id:Ig,diagram:e}},"loader"),q1={id:Ig,detector:P1,loader:R1},N1=q1,Dg="requirement",z1=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),W1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-CDrkwz1t.js");return{diagram:t}},__vite__mapDeps([31,13,6,14,3,4,5]));return{id:Dg,diagram:e}},"loader"),H1={id:Dg,detector:z1,loader:W1},Y1=H1,Pg="sequence",U1=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),j1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-B8If_JZp.js");return{diagram:t}},__vite__mapDeps([32,10,6,19,3,4,5]));return{id:Pg,diagram:e}},"loader"),G1={id:Pg,detector:U1,loader:j1},X1=G1,Rg="class",V1=g((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Z1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-DnHeGLmR.js");return{diagram:t}},__vite__mapDeps([33,34,12,10,6,13,14,3,4,5]));return{id:Rg,diagram:e}},"loader"),K1={id:Rg,detector:V1,loader:Z1},Q1=K1,qg="classDiagram",J1=g((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),t2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-DnHeGLmR.js");return{diagram:t}},__vite__mapDeps([35,34,12,10,6,13,14,3,4,5]));return{id:qg,diagram:e}},"loader"),e2={id:qg,detector:J1,loader:t2},r2=e2,Ng="state",i2=g((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),s2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-BbpTp9VX.js");return{diagram:t}},__vite__mapDeps([36,37,13,6,14,1,2,3,4,5]));return{id:Ng,diagram:e}},"loader"),a2={id:Ng,detector:i2,loader:s2},o2=a2,zg="stateDiagram",n2=g((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),l2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-BT4PvMFS.js");return{diagram:t}},__vite__mapDeps([38,37,13,6,14,3,4,5]));return{id:zg,diagram:e}},"loader"),h2={id:zg,detector:n2,loader:l2},c2=h2,Wg="journey",d2=g(e=>/^\s*journey/.test(e),"detector"),u2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-jKj4lBEJ.js");return{diagram:t}},__vite__mapDeps([39,12,10,6,27,3,4,5]));return{id:Wg,diagram:e}},"loader"),p2={id:Wg,detector:d2,loader:u2},g2=p2,f2=g((e,t,r)=>{z.debug(`rendering svg for syntax error
301
- `);const i=Zy(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),fc(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Hg={draw:f2},m2=Hg,y2={db:{},renderer:Hg,parser:{parse:g(()=>{},"parse")}},C2=y2,Yg="flowchart-elk",x2=g((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),b2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-D-q1cK69.js");return{diagram:t}},__vite__mapDeps([11,12,10,6,13,14,15,3,4,5]));return{id:Yg,diagram:e}},"loader"),k2={id:Yg,detector:x2,loader:b2},T2=k2,Ug="timeline",S2=g(e=>/^\s*timeline/.test(e),"detector"),w2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-DhUg6aIV.js");return{diagram:t}},__vite__mapDeps([40,6,27,3,4,5]));return{id:Ug,diagram:e}},"loader"),_2={id:Ug,detector:S2,loader:w2},B2=_2,jg="mindmap",v2=g(e=>/^\s*mindmap/.test(e),"detector"),L2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-CPY2Fdu_.js");return{diagram:t}},__vite__mapDeps([41,13,6,14,3,4,5]));return{id:jg,diagram:e}},"loader"),F2={id:jg,detector:v2,loader:L2},A2=F2,Gg="kanban",E2=g(e=>/^\s*kanban/.test(e),"detector"),M2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-PZ-5AYw2.js");return{diagram:t}},__vite__mapDeps([42,12,3,4,5,6]));return{id:Gg,diagram:e}},"loader"),$2={id:Gg,detector:E2,loader:M2},O2=$2,Xg="sankey",I2=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),D2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-BrYb9Eql.js");return{diagram:t}},__vite__mapDeps([43,6,28,23,3,4,5]));return{id:Xg,diagram:e}},"loader"),P2={id:Xg,detector:I2,loader:D2},R2=P2,Vg="packet",q2=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),N2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-C3AVVxcm.js");return{diagram:t}},__vite__mapDeps([44,18,20,3,4,5,6]));return{id:Vg,diagram:e}},"loader"),z2={id:Vg,detector:q2,loader:N2},Zg="radar",W2=g(e=>/^\s*radar-beta/.test(e),"detector"),H2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-BmXargwF.js");return{diagram:t}},__vite__mapDeps([45,18,20,3,4,5,6]));return{id:Zg,diagram:e}},"loader"),Y2={id:Zg,detector:W2,loader:H2},Kg="block",U2=g(e=>/^\s*block(-beta)?/.test(e),"detector"),j2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-CgiNAArN.js");return{diagram:t}},__vite__mapDeps([46,12,6,1,15,3,4,5]));return{id:Kg,diagram:e}},"loader"),G2={id:Kg,detector:U2,loader:j2},X2=G2,Qg="treeView",V2=g(e=>/^\s*treeView-beta/.test(e),"detector"),Z2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-COlrLu0O.js");return{diagram:t}},__vite__mapDeps([47,18,19,20,3,4,5,6]));return{id:Qg,diagram:e}},"loader"),K2={id:Qg,detector:V2,loader:Z2},Q2=K2,Jg="architecture",J2=g(e=>/^\s*architecture/.test(e),"detector"),tT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-Cun_Ijrv.js");return{diagram:t}},__vite__mapDeps([48,18,20,3,4,5,8,6]));return{id:Jg,diagram:e}},"loader"),eT={id:Jg,detector:J2,loader:tT},rT=eT,tf="eventmodeling",iT=g(e=>/^\s*eventmodeling/.test(e),"detector"),sT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-B-kUxuHX.js");return{diagram:t}},__vite__mapDeps([49,18,20,3,4,5,6]));return{id:tf,diagram:e}},"loader"),aT={id:tf,detector:iT,loader:sT},oT=aT,ef="ishikawa",nT=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),lT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-CY-U_l7l.js");return{diagram:t}},__vite__mapDeps([50,3,4,5,6]));return{id:ef,diagram:e}},"loader"),hT={id:ef,detector:nT,loader:lT},rf="venn",cT=g(e=>/^\s*venn-beta/.test(e),"detector"),dT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-DpQVNNzF.js");return{diagram:t}},__vite__mapDeps([51,6,3,4,5]));return{id:rf,diagram:e}},"loader"),uT={id:rf,detector:cT,loader:dT},pT=uT,sf="treemap",gT=g(e=>/^\s*treemap/.test(e),"detector"),fT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-JHeftSsO.js");return{diagram:t}},__vite__mapDeps([52,14,18,20,3,4,5,6,24,28,23]));return{id:sf,diagram:e}},"loader"),mT={id:sf,detector:gT,loader:fT},af="wardley-beta",yT=g(e=>/^\s*wardley-beta/i.test(e),"detector"),CT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-Bm0mA7wm.js");return{diagram:t}},__vite__mapDeps([53,18,20,3,4,5,6]));return{id:af,diagram:e}},"loader"),xT={id:af,detector:yT,loader:CT},bT=xT,bh=!1,ha=g(()=>{bh||(bh=!0,As("error",C2,e=>e.toLowerCase().trim()==="error"),As("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{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:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ka(T2,A2,rT),Ka(o1,O2,r2,Q1,C1,B1,F1,M1,Y1,X1,g1,c1,B2,T1,c2,o2,g2,D1,R2,z2,N1,X2,oT,Q2,Y2,hT,mT,pT,bT))},"addDiagrams"),kT=g(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(mr).map(async([r,{detector:i,loader:s}])=>{if(s)try{ro(r)}catch{try{const{diagram:a,id:o}=await s();As(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete mr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),TT="graphics-document document";function of(e,t){e.attr("role",TT),t!==""&&e.attr("aria-roledescription",t)}g(of,"setA11yDiagramInfo");function nf(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)}}}g(nf,"addSVGa11yTitleDescription");var fr,Ro=(fr=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 h,c;const i=Bt(),s=jo(t,i);t=tx(t)+`
302
- `;try{ro(s)}catch{const d=jm(s);if(!d)throw new tc(`Diagram ${s} not found.`);const{id:p,diagram:u}=await d();As(p,u)}const{db:a,parser:o,renderer:n,init:l}=ro(s);return o.parser&&(o.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await o.parse(t),new fr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(fr,"Diagram"),fr),kh=[],ST=g(()=>{kh.forEach(e=>{e()}),kh=[]},"attachFunctions"),wT=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function lf(e){const t=e.match(Jh);if(!t)return{text:e,metadata:{}};let r=i0(t[1],{schema:r0})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}g(lf,"extractFrontMatter");var _T=g(e=>e.replace(/\r\n?/g,`
303
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),BT=g(e=>{const{text:t,metadata:r}=lf(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"),vT=g(e=>{const t=ye.detectInit(e)??{},r=ye.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:z0(e),directive:t}},"processDirectives");function On(e){const t=_T(e),r=BT(t),i=vT(r.text),s=mn(r.config,i.directive);return e=wT(i.text),{code:e,title:r.title,config:s}}g(On,"preprocessDiagram");function hf(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(hf,"toBase64");var LT=5e4,FT="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",AT="sandbox",ET="loose",MT="http://www.w3.org/2000/svg",$T="http://www.w3.org/1999/xlink",OT="http://www.w3.org/1999/xhtml",IT="100%",DT="100%",PT="border:0;margin:0;",RT="margin:0",qT="allow-top-navigation-by-user-activation allow-popups",NT='The "iframe" tag is not supported by your browser.',zT=["foreignobject"],WT=["dominant-baseline"];function In(e){const t=On(e);return Ls(),xy(t.config??{}),t}g(In,"processAndSetConfigs");async function cf(e,t){ha();try{const{code:r,config:i}=In(e);return{diagramType:(await uf(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}g(cf,"parse");var Th=g((e,t,r=[])=>{const i=ac(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),HT=g((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Dl(l.styles)||n.forEach(h=>{r.insertRule(Th(l.id,h,l.styles),r.cssRules.length)}),Dl(l.textStyles)||r.insertRule(Th(l.id,"tspan",((l==null?void 0:l.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=eo(s)+`
304
- `}else i+=`${e.themeCSS}
305
- `;return i+eo(r)},"createCssStyles"),YT=g((e,t)=>Po(Jk(`${e}{${t}}`),r1([g(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Oo)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[qk,zk,Tg,Hk,"@container","@starting-style"],Oo].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Mn))},"addNamespace"),e1])),"compileCSS"),UT=g((e,t,r,i)=>{const s=HT(e,r),a=Ry(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return YT(i,a)},"createUserStyles"),jT=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=xr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),GT=g((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":DT,i=hf(`<body style="${RT}">${e}</body>`);return`<iframe style="width:${IT};height:${r};${PT}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${qT}">
306
- ${NT}
307
- </iframe>`},"putIntoIFrame"),Sh=g((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",MT);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function qo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(qo,"sandboxedIframe");var XT=g((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),VT=g(async function(e,t,r){var Y,H,P,E,L,O;ha();const i=In(t);t=i.code;const s=Bt();z.debug(s),t.length>((s==null?void 0:s.maxTextSize)??LT)&&(t=FT);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=g(()=>{const _=ht(p?n:h).node();_&&"remove"in _&&_.remove()},"removeTempElements");let d=ht(document.body);const p=s.securityLevel===AT,u=s.securityLevel===ET,y=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const A=qo(ht(r),o);d=ht(A.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ht(r);Sh(d,e,l,`font-family: ${y}`,$T)}else{if(XT(document,e,l,o),p){const A=qo(ht(document.body),o);d=ht(A.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ht("body");Sh(d,e,l)}let f,m;try{f=await Ro.fromText(t,{title:i.title})}catch(A){if(s.suppressErrorRendering)throw c(),A;f=await Ro.fromText("error"),m=A}const C=d.select(h).node(),b=f.type,k=C.firstChild,S=k.firstChild,w=(H=(Y=f.renderer).getClasses)==null?void 0:H.call(Y,t,f),B=UT(s,b,w,a),M=document.createElement("style");M.innerHTML=B,k.insertBefore(M,S);try{await f.renderer.draw(t,e,"11.15.0",f)}catch(A){throw s.suppressErrorRendering?c():m2.draw(t,e,"11.15.0"),A}const v=d.select(`${h} svg`),W=(E=(P=f.db).getAccTitle)==null?void 0:E.call(P),D=(O=(L=f.db).getAccDescription)==null?void 0:O.call(L);pf(b,v,W,D),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",OT);let I=d.select(h).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),I=jT(I,p,ze(s.arrowMarkerAbsolute)),p){const A=d.select(h+" svg").node();I=GT(I,A)}else u||(I=ti.sanitize(I,{ADD_TAGS:zT,ADD_ATTR:WT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(ST(),m)throw m;return c(),{diagramType:b,svg:I,bindFunctions:f.db.bindFunctions}},"render");function df(e={}){var i;const t=It({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),yy(t),t!=null&&t.theme&&t.theme in Re?t.themeVariables=Re[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Re.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?my(t):oc();Uo(r.logLevel),ha()}g(df,"initialize");var uf=g((e,t={})=>{const{code:r}=On(e);return Ro.fromText(r,t)},"getDiagramFromText");function pf(e,t,r,i){of(t,e),nf(t,r,i,t.attr("id"))}g(pf,"addA11yInfo");var kr=Object.freeze({render:VT,parse:cf,getDiagramFromText:uf,initialize:df,getConfig:Bt,setConfig:nc,getSiteConfig:oc,updateSiteConfig:Cy,reset:g(()=>{Ls()},"reset"),globalReset:g(()=>{Ls(ei)},"globalReset"),defaultConfig:ei});Uo(Bt().logLevel);Ls(Bt());var ZT=g((e,t,r)=>{z.warn(e),fn(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"),gf=g(async function(e={querySelector:".mermaid"}){try{await KT(e)}catch(t){if(fn(t)&&z.error(t.str),ne.parseError&&ne.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KT=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=kr.getConfig();z.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");z.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(z.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),kr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ye.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(z.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=vu(ye.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=ye.detectInit(o);c&&z.debug("Detected early reinit: ",c);try{const{svg:d,bindFunctions:p}=await Cf(h,o,l);l.innerHTML=d,e&&await e(h),p&&p(l)}catch(d){ZT(d,n,ne.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),ff=g(function(e){kr.initialize(e)},"initialize"),QT=g(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&ff(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await gf(i)},"init"),JT=g(async(e,{lazyLoad:t=!0}={})=>{ha(),Ka(...e),t===!1&&await kT()},"registerExternalDiagrams"),mf=g(function(){if(ne.startOnLoad){const{startOnLoad:e}=kr.getConfig();e&&ne.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",mf,!1);var tS=g(function(e){ne.parseError=e},"setParseErrorHandler"),Gs=[],Ua=!1,yf=g(async()=>{if(!Ua){for(Ua=!0;Gs.length>0;){const e=Gs.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}Ua=!1}},"executeQueue"),eS=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((a,o)=>{kr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;z.error("Error parsing",n),(l=ne.parseError)==null||l.call(ne,n),o(n),i(n)})}),"performCall");Gs.push(s),yf().catch(i)}),"parse"),Cf=g((e,t,r)=>new Promise((i,s)=>{const a=g(()=>new Promise((o,n)=>{kr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;z.error("Error parsing",l),(h=ne.parseError)==null||h.call(ne,l),n(l),s(l)})}),"performCall");Gs.push(a),yf().catch(s)}),"render"),rS=g(()=>Object.keys(mr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ne={startOnLoad:!0,mermaidAPI:kr,parse:eS,render:Cf,init:QT,run:gf,registerExternalDiagrams:JT,registerLayoutLoaders:xg,initialize:ff,parseError:void 0,contentLoaded:mf,setParseErrorHandler:tS,detectType:jo,registerIconPacks:nb,getRegisteredDiagramsMetadata:rS},iS=ne;/*! Check if previously processed *//*!
308
- * Wait for document loaded before starting the execution
309
- */const OS=Object.freeze(Object.defineProperty({__proto__:null,default:iS},Symbol.toStringTag,{value:"Module"}));export{Nf as $,Qe as A,sm as B,Bt as C,Gy as D,mn as E,sc as F,j0 as G,Zy as H,Qm as I,r0 as J,Oi as K,CS as L,ta as M,vy as N,gc as O,Bl as P,Yf as Q,Xa as R,U0 as S,Wi as T,ke as U,R as V,q as W,Iy as X,mc as Y,P0 as Z,g as _,zy as a,ok as a$,No as a0,hS as a1,uS as a2,Lr as a3,sl as a4,il as a5,gS as a6,pS as a7,dS as a8,nS as a9,w0 as aA,S0 as aB,T0 as aC,B0 as aD,_0 as aE,d0 as aF,eu as aG,y0 as aH,f0 as aI,g0 as aJ,ru as aK,s0 as aL,ee as aM,We as aN,mi as aO,yn as aP,hu as aQ,xr as aR,pu as aS,Vh as aT,Dk as aU,FS as aV,ES as aW,vS as aX,J as aY,LS as aZ,dk as a_,lS as aa,cS as ab,mS as ac,fS as ad,Ob as ae,fg as af,AS as ag,nt as ah,Ae as ai,gn as aj,Z as ak,hb as al,hn as am,nn as an,ys as ao,k0 as ap,b0 as aq,x0 as ar,C0 as as,c0 as at,Jd as au,p0 as av,h0 as aw,m0 as ax,tu as ay,u0 as az,Ny as b,ak as b0,zf as b1,yS as b2,Jf as b3,Gi as b4,nb as b5,ob as b6,Q as b7,gu as b8,im as b9,OS as ba,xt as c,fc as d,It as e,Ne as f,Hy as g,be as h,n0 as i,Hi as j,du as k,z as l,xS as m,$S as n,Yy as o,Uy as p,i0 as q,MS as r,Wy as s,tk as t,ye as u,kS as v,V0 as w,ti as x,qy as y,bS as z};