@marimo-team/frontend 0.9.33-dev1 → 0.9.33-dev3

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 (95) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-DUjkbZYx.js → ConnectedDataExplorerComponent-B4l-1x6A.js} +3 -3
  2. package/dist/assets/{VegaLite-BPgA3_2Q.js → VegaLite-DNjOmcNp.js} +1 -1
  3. package/dist/assets/_baseEach-Dgbgpk3b.js +1 -0
  4. package/dist/assets/_baseMap-NhSmkYjF.js +1 -0
  5. package/dist/assets/_baseUniq-DHTeqDLE.js +1 -0
  6. package/dist/assets/{any-language-editor-BksdRRxo.js → any-language-editor-COGdSp39.js} +1 -1
  7. package/dist/assets/{architectureDiagram-IFBEXTG3-UxOtE4d0.js → architectureDiagram-IFBEXTG3-Da3BNZ4e.js} +1 -1
  8. package/dist/assets/{blockDiagram-TCMKQVZ6-Dybkj_w9.js → blockDiagram-TCMKQVZ6-k4TPgBbL.js} +1 -1
  9. package/dist/assets/{c4Diagram-ZCSEYPFN-C8NScG61.js → c4Diagram-ZCSEYPFN-CPHdQFQQ.js} +1 -1
  10. package/dist/assets/channel-C7e1gRT2.js +1 -0
  11. package/dist/assets/{chunk-4LC2V6XN-gUE8bKRN.js → chunk-4LC2V6XN-B7Aee02i.js} +1 -1
  12. package/dist/assets/{chunk-5RIWM3LS-B1WjxeAJ.js → chunk-5RIWM3LS-B_aHlphV.js} +1 -1
  13. package/dist/assets/{chunk-6JKP7OK7-DVCbOIE1.js → chunk-6JKP7OK7-DADZ0bb_.js} +1 -1
  14. package/dist/assets/{chunk-NGC4727B-BJBlGfRT.js → chunk-NGC4727B-CYRVeryW.js} +1 -1
  15. package/dist/assets/{chunk-REEJFE46-CF9EL3x2.js → chunk-REEJFE46-mXW4OO2m.js} +1 -1
  16. package/dist/assets/{chunk-RYO7GUH3-DkRHWPaA.js → chunk-RYO7GUH3-BR0smFK4.js} +1 -1
  17. package/dist/assets/{chunk-V35ELUW5-BixvDeUp.js → chunk-V35ELUW5-B7qPKIxC.js} +1 -1
  18. package/dist/assets/{classDiagram-Q73GJZWF--mYf5qKg.js → classDiagram-Q73GJZWF-6WafQy5Z.js} +1 -1
  19. package/dist/assets/{classDiagram-v2-C6QPLPW4-Bmzcft5F.js → classDiagram-v2-C6QPLPW4-BDBjXCKd.js} +1 -1
  20. package/dist/assets/clone-DFIeajvN.js +1 -0
  21. package/dist/assets/{dagre-7KT5K2WU-YvPaHyt5.js → dagre-7KT5K2WU-De_Pcwob.js} +1 -1
  22. package/dist/assets/{data-editor-D9zGkqVd.js → data-editor-CKh0Jws9.js} +1 -1
  23. package/dist/assets/{diagram-AVGMFHF7-CPq7I5ob.js → diagram-AVGMFHF7-DrSL49Vr.js} +1 -1
  24. package/dist/assets/{edit-page-DWftg21b.js → edit-page-CHt-tPcs.js} +3 -3
  25. package/dist/assets/{erDiagram-DKC2X5TE-DZPkgiYL.js → erDiagram-DKC2X5TE-CwjUe35E.js} +1 -1
  26. package/dist/assets/{flowDiagram-NWEUNK3L-ylNzzPqt.js → flowDiagram-NWEUNK3L-ChZHfqcz.js} +1 -1
  27. package/dist/assets/{ganttDiagram-HLVPPPRE-C_kax-sw.js → ganttDiagram-HLVPPPRE-BQy_ps-C.js} +1 -1
  28. package/dist/assets/gitGraph-YCYPL57B-F6vrX3b7.js +1 -0
  29. package/dist/assets/{gitGraphDiagram-JPZ3KUXI-Df9StGyC.js → gitGraphDiagram-JPZ3KUXI-C1JroHyP.js} +1 -1
  30. package/dist/assets/graph-DRFnGGGK.js +1 -0
  31. package/dist/assets/{home-page-Cksnpj_x.js → home-page-CxTexBuw.js} +2 -2
  32. package/dist/assets/{index-Bcce7rIA.js → index-AT8JyQ8c.js} +1 -1
  33. package/dist/assets/{index-CrhMMIPj.js → index-B15zQ6zJ.js} +1 -1
  34. package/dist/assets/{index-CBCntULr.js → index-B2LqrDm1.js} +1 -1
  35. package/dist/assets/{index-iy1uybU0.js → index-BBeuLRFm.js} +1 -1
  36. package/dist/assets/index-BCj0kXuG.js +72 -0
  37. package/dist/assets/{index-Gvhb7PB5.js → index-BMRjfMn2.js} +1 -1
  38. package/dist/assets/{index-C0QNRozM.js → index-BRyMkDuc.js} +1 -1
  39. package/dist/assets/{index-_Jj79Bli.js → index-BbCS6e36.js} +1 -1
  40. package/dist/assets/{index-B82Bdu_h.js → index-Bf5revQ7.js} +1 -1
  41. package/dist/assets/{index-DRFxf7aB.js → index-BfRanzQe.js} +1 -1
  42. package/dist/assets/{index-DF2-JCia.js → index-Bgk45RYO.js} +1 -1
  43. package/dist/assets/{index-C8zTqBOb.js → index-BgxkNyUT.js} +1 -1
  44. package/dist/assets/{index-CUnE1yxC.js → index-CB-2ToIz.js} +1 -1
  45. package/dist/assets/{index-D2Fvyp3W.js → index-CQNUI_J_.js} +1 -1
  46. package/dist/assets/index-Cc-U_8rG.css +1 -0
  47. package/dist/assets/{index-RBesSwkz.js → index-D0HsxOZT.js} +1 -1
  48. package/dist/assets/{index-D5TKz2aa.js → index-PiU4IQNi.js} +1 -1
  49. package/dist/assets/{index-Cztx3eW6.js → index-c0OStgXv.js} +1 -1
  50. package/dist/assets/{infoDiagram-RZZSJVI2-CWPzQHkV.js → infoDiagram-RZZSJVI2-CvQAn7sA.js} +1 -1
  51. package/dist/assets/{journeyDiagram-BLD6N6MZ-D9KLPpfb.js → journeyDiagram-BLD6N6MZ-DHHnHNT9.js} +1 -1
  52. package/dist/assets/{json-Be8cxRkJ.js → json-BUIIK6WC.js} +1 -1
  53. package/dist/assets/layout-B6FYO_jG.js +1 -0
  54. package/dist/assets/{linear-zd9t_zUd.js → linear-CQ4AyQ6a.js} +1 -1
  55. package/dist/assets/mermaid-DdL8an-X.js +13 -0
  56. package/dist/assets/min-CDd-md_4.js +1 -0
  57. package/dist/assets/{mindmap-definition-OEB2RXX2-C0iyIXeB.js → mindmap-definition-OEB2RXX2-CwUQHZ8j.js} +1 -1
  58. package/dist/assets/{pieDiagram-X7YZ5ZEZ-DXYxOVzP.js → pieDiagram-X7YZ5ZEZ-BVQUBZwf.js} +1 -1
  59. package/dist/assets/{quadrantDiagram-F36EZAVT-C6qm3-LE.js → quadrantDiagram-F36EZAVT-D4nHM-US.js} +1 -1
  60. package/dist/assets/{react-plotly-JYl0e76_.js → react-plotly-CQ7A5HLW.js} +1 -1
  61. package/dist/assets/{requirementDiagram-JG2LMPGF-WzPpzUAb.js → requirementDiagram-JG2LMPGF-CAGZjmCw.js} +1 -1
  62. package/dist/assets/run-page-CbP65KID.js +1 -0
  63. package/dist/assets/{sankeyDiagram-ATFNWWW6-C9tcLsXo.js → sankeyDiagram-ATFNWWW6-BLGrVuzA.js} +1 -1
  64. package/dist/assets/{sequenceDiagram-WK7YDQ3N-BlFngsu0.js → sequenceDiagram-WK7YDQ3N-DtYsGAio.js} +1 -1
  65. package/dist/assets/{slides-component-BisBxM9Z.js → slides-component-D9mgq7Ev.js} +1 -1
  66. package/dist/assets/sortBy-DMUoPUb8.js +1 -0
  67. package/dist/assets/{stateDiagram-4JV6CC6H-Byr2vGI5.js → stateDiagram-4JV6CC6H-BvMQwrSY.js} +1 -1
  68. package/dist/assets/stateDiagram-v2-7KT6RKTD-oBtVgAWX.js +1 -0
  69. package/dist/assets/{terminal-BZ8yraCr.js → terminal-C31UoeJX.js} +1 -1
  70. package/dist/assets/{time-ClQtKL_r.js → time-_4Ha_BpN.js} +1 -1
  71. package/dist/assets/{timeline-definition-3ZMEY6HS-hhCwxsn9.js → timeline-definition-3ZMEY6HS-Bxxv9l4U.js} +1 -1
  72. package/dist/assets/transform-B3MLqdQw.js +1 -0
  73. package/dist/assets/tree-nHuhcZRp.js +14 -0
  74. package/dist/assets/{useMarimoWebSocket-sX_ecHvK.js → useMarimoWebSocket-Ceqi6d9S.js} +5 -5
  75. package/dist/assets/{vega-component-BPdP4nG2.js → vega-component-Dz0-44gC.js} +1 -1
  76. package/dist/assets/{xychartDiagram-KECQ2H5Q-BVDiXW3Y.js → xychartDiagram-KECQ2H5Q-Cm6WGVwP.js} +1 -1
  77. package/dist/index.html +3 -3
  78. package/package.json +1 -1
  79. package/dist/assets/_baseEach-BuRb9hgn.js +0 -1
  80. package/dist/assets/_baseMap-fQvWlZ5N.js +0 -1
  81. package/dist/assets/_baseUniq-Co74-MzZ.js +0 -1
  82. package/dist/assets/channel-9Mrcp9gD.js +0 -1
  83. package/dist/assets/clone-DRCEsi9j.js +0 -1
  84. package/dist/assets/gitGraph-YCYPL57B-Dd3tbwKs.js +0 -1
  85. package/dist/assets/graph-C9CgavfA.js +0 -1
  86. package/dist/assets/index-BBLijs4u.css +0 -1
  87. package/dist/assets/index-BbUdw004.js +0 -72
  88. package/dist/assets/layout-rl0hW--0.js +0 -1
  89. package/dist/assets/mermaid-C_JulG0D.js +0 -13
  90. package/dist/assets/min-C00TSzw_.js +0 -1
  91. package/dist/assets/run-page-BAc9ISZ5.js +0 -1
  92. package/dist/assets/sortBy-CJhGhnUR.js +0 -1
  93. package/dist/assets/stateDiagram-v2-7KT6RKTD-Dywkw8Z1.js +0 -1
  94. package/dist/assets/transform-3CbIiks1.js +0 -1
  95. package/dist/assets/tree-DQBIxPkW.js +0 -14
@@ -1,13 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-7KT5K2WU-YvPaHyt5.js","./graph-C9CgavfA.js","./_baseUniq-Co74-MzZ.js","./index-BbUdw004.js","./index-BBLijs4u.css","./_baseEach-BuRb9hgn.js","./transform-3CbIiks1.js","./timer-CK-RIWfW.js","./layout-rl0hW--0.js","./min-C00TSzw_.js","./_baseMap-fQvWlZ5N.js","./sortBy-CJhGhnUR.js","./json-Be8cxRkJ.js","./clone-DRCEsi9j.js","./step-CNn2V7Th.js","./c4Diagram-ZCSEYPFN-C8NScG61.js","./chunk-V35ELUW5-BixvDeUp.js","./flowDiagram-NWEUNK3L-ylNzzPqt.js","./chunk-4LC2V6XN-gUE8bKRN.js","./channel-9Mrcp9gD.js","./erDiagram-DKC2X5TE-DZPkgiYL.js","./gitGraphDiagram-JPZ3KUXI-Df9StGyC.js","./chunk-RYO7GUH3-DkRHWPaA.js","./chunk-6JKP7OK7-DVCbOIE1.js","./gitGraph-YCYPL57B-Dd3tbwKs.js","./main-cdvIQCIX.js","./ganttDiagram-HLVPPPRE-C_kax-sw.js","./time-ClQtKL_r.js","./linear-zd9t_zUd.js","./init-DLRA0X12.js","./infoDiagram-RZZSJVI2-CWPzQHkV.js","./pieDiagram-X7YZ5ZEZ-DXYxOVzP.js","./arc-lt4NHaVr.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-F36EZAVT-C6qm3-LE.js","./xychartDiagram-KECQ2H5Q-BVDiXW3Y.js","./range-CtcPcB_L.js","./requirementDiagram-JG2LMPGF-WzPpzUAb.js","./sequenceDiagram-WK7YDQ3N-BlFngsu0.js","./classDiagram-Q73GJZWF--mYf5qKg.js","./chunk-NGC4727B-BJBlGfRT.js","./classDiagram-v2-C6QPLPW4-Bmzcft5F.js","./chunk-REEJFE46-CF9EL3x2.js","./stateDiagram-4JV6CC6H-Byr2vGI5.js","./chunk-5RIWM3LS-B1WjxeAJ.js","./stateDiagram-v2-7KT6RKTD-Dywkw8Z1.js","./journeyDiagram-BLD6N6MZ-D9KLPpfb.js","./timeline-definition-3ZMEY6HS-hhCwxsn9.js","./mindmap-definition-OEB2RXX2-C0iyIXeB.js","./cytoscape.esm-DXieaT54.js","./sankeyDiagram-ATFNWWW6-C9tcLsXo.js","./colors-bszWmPJw.js","./diagram-AVGMFHF7-CPq7I5ob.js","./blockDiagram-TCMKQVZ6-Dybkj_w9.js","./architectureDiagram-IFBEXTG3-UxOtE4d0.js"])))=>i.map(i=>d[i]);
2
- var t,e,r,i,a,n,o,s,l,h,c,d,u,p=Object.defineProperty,g=t=>{throw TypeError(t)},f=(t,e,r)=>((t,e,r)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),y=(t,e,r)=>(((t,e,r)=>{e.has(t)||g("Cannot "+r)})(t,e,"access private method"),r);import{b$ as m,cw as x,co as b,af as C,cD as k,n as w,cE as S,cF as T,cj as v,cG as B,cH as _,cI as L,aU as M,cm as F,cJ as A,ab as $,cK as E,A as D,bZ as I,ck as O,cL as P,av as R,g as q,cM as z,cN as W,D as N,G as j,a6 as H,aj as U,ar as Y,K as V}from"./index-BbUdw004.js";import{b as G,a as Z,s as X}from"./transform-3CbIiks1.js";import{k as Q,q as K,r as J,u as tt,v as et,x as rt,y as it,z as at,A as nt,B as ot,n as st,C as lt,D as ht,E as ct,F as dt,G as ut,H as pt,I as gt,l as ft}from"./step-CNn2V7Th.js";var yt=Object.create,mt=function(){function t(){}return function(e){if(!m(e))return{};if(yt)return yt(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function xt(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}function bt(t,e,r,i){var a=!r;r||(r={});for(var n=-1,o=e.length;++n<o;){var s=e[n],l=void 0;void 0===l&&(l=t[s]),a?x(r,s,l):b(r,s,l)}return r}function Ct(t){return G((function(e,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(n=t.length>3&&"function"==typeof n?(a--,n):void 0,o&&C(r[0],r[1],o)&&(n=a<3?void 0:n,a=1),e=Object(e);++i<a;){var s=r[i];s&&t(e,s,i,n)}return e}))}var kt=Object.prototype.hasOwnProperty;function wt(t){if(!m(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=k(t),r=[];for(var i in t)("constructor"!=i||!e&&kt.call(t,i))&&r.push(i);return r}function St(t){return w(t)?S(t,!0):wt(t)}var Tt=T(Object.getPrototypeOf,Object),vt=Function.prototype,Bt=Object.prototype,_t=vt.toString,Lt=Bt.hasOwnProperty,Mt=_t.call(Object);var Ft="object"==typeof exports&&exports&&!exports.nodeType&&exports,At=Ft&&"object"==typeof module&&module&&!module.nodeType&&module,$t=At&&At.exports===Ft?_.Buffer:void 0,Et=$t?$t.allocUnsafe:void 0;function Dt(t,e){if(e)return t.slice();var r=t.length,i=Et?Et(r):new t.constructor(r);return t.copy(i),i}function It(t){var e=new t.constructor(t.byteLength);return new L(e).set(new L(t)),e}function Ot(t,e){var r=e?It(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Pt(t){return"function"!=typeof t.constructor||k(t)?{}:mt(Tt(t))}function Rt(t,e,r){(void 0!==r&&!M(t[e],r)||void 0===r&&!(e in t))&&x(t,e,r)}function qt(t){return v(t)&&w(t)}function zt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Wt(t,e,r,i,a,n,o){var s=zt(t,r),l=zt(e,r),h=o.get(l);if(h)Rt(t,r,h);else{var c,d=n?n(s,l,r+"",t,e,o):void 0,u=void 0===d;if(u){var p=$(l),g=!p&&F(l),f=!p&&!g&&A(l);d=l,p||g||f?$(s)?d=s:qt(s)?d=xt(s):g?(u=!1,d=Dt(l,!0)):f?(u=!1,d=Ot(l,!0)):d=[]:function(t){if(!v(t)||"[object Object]"!=B(t))return!1;var e=Tt(t);if(null===e)return!0;var r=Lt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&_t.call(r)==Mt}(l)||E(l)?(d=s,E(s)?d=bt(c=s,St(c)):m(s)&&!D(s)||(d=Pt(l))):u=!1}u&&(o.set(l,d),a(d,l,i,n,o),o.delete(l)),Rt(t,r,d)}}function Nt(t,e,r,i,a){t!==e&&Z(e,(function(n,o){if(a||(a=new I),m(n))Wt(t,e,o,r,Nt,i,a);else{var s=i?i(zt(t,o),n,o+"",t,e,a):void 0;void 0===s&&(s=n),Rt(t,o,s)}}),St)}var jt=Object.prototype.hasOwnProperty;function Ht(t){if(null==t)return!0;if(w(t)&&($(t)||"string"==typeof t||"function"==typeof t.splice||F(t)||A(t)||E(t)))return!t.length;var e=O(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(k(t))return!P(t).length;for(var r in t)if(jt.call(t,r))return!1;return!0}var Ut=Ct((function(t,e,r){Nt(t,e,r)}));class Yt{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}var Vt={exports:{}};const Gt=q(Vt.exports=function(){var t=1e3,e=6e4,r=36e5,i="millisecond",a="second",n="minute",o="hour",s="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|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,y={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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),a=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(a,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),a=e.clone().add(i,h),n=r-a<0,o=e.clone().add(i+(n?-1:1),h);return+(-(i+(r-a)/(n?a-o:o-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:s,D:u,h:o,m:n,s:a,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",C={};C[b]=y;var k="$isDayjsObject",w=function(t){return t instanceof B||!(!t||!t[k])},S=function t(e,r,i){var a;if(!e)return b;if("string"==typeof e){var n=e.toLowerCase();C[n]&&(a=n),r&&(C[n]=r,a=n);var o=e.split("-");if(!a&&o.length>1)return t(o[0])}else{var s=e.name;C[s]=e,a=s}return!i&&a&&(b=a),a||!i&&b},T=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new B(r)},v=x;v.l=S,v.i=w,v.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var B=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var a=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return v},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=T(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return T(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<T(t)},m.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!v.u(e)||e,c=v.p(t),p=function(t,e){var a=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?a:a.endOf(s)},g=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var b=this.$locale().weekStart||0,C=(f<b?f+7:f)-b;return p(i?m-C:m+(6-C),y);case s:case u:return g(x+"Hours",0);case o:return g(x+"Minutes",1);case n:return g(x+"Seconds",2);case a:return g(x+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=v.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[s]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[o]=c+"Hours",r[n]=c+"Minutes",r[a]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===s?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[v.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=v.p(c),f=function(t){var e=T(p);return v.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return f(1);if(g===l)return f(7);var y=(u={},u[n]=e,u[o]=r,u[a]=t,u)[g]||1,m=this.$d.getTime()+i*y;return v.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=v.z(this),n=this.$H,o=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,a,n){return t&&(t[r]||t(e,i))||a[r].slice(0,n)},u=function(t){return v.s(n%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,h,3);case"MMMM":return d(h,s);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return v.s(n,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(n,o,!0);case"A":return g(n,o,!1);case"m":return String(o);case"mm":return v.s(o,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return a}return null}(t)||a.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=v.p(u),m=T(i),x=(m.utcOffset()-this.utcOffset())*e,b=this-m,C=function(){return v.m(f,m)};switch(y){case d:g=C()/12;break;case h:g=C();break;case c:g=C()/3;break;case l:g=(b-x)/6048e5;break;case s:g=(b-x)/864e5;break;case o:g=b/r;break;case n:g=b/e;break;case a:g=b/t;break;default:g=b}return p?g:v.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return C[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=S(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return v.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),_=B.prototype;return T.prototype=_,[["$ms",i],["$s",a],["$m",n],["$H",o],["$W",s],["$M",h],["$y",d],["$D",u]].forEach((function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),T.extend=function(t,e){return t.$i||(t(e,B,T),t.$i=!0),T},T.locale=S,T.isDayjs=w,T.unix=function(t){return T(1e3*t)},T.en=C[b],T.Ls=C,T.p={},T}()),Zt={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,n=2*r-a;switch(i){case"r":return 255*Zt.hue2rgb(n,a,t+1/3);case"g":return 255*Zt.hue2rgb(n,a,t);case"b":return 255*Zt.hue2rgb(n,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const a=Math.max(t,e,r),n=Math.min(t,e,r),o=(a+n)/2;if("l"===i)return 100*o;if(a===n)return 0;const s=a-n;if("s"===i)return 100*(o>.5?s/(2-a-n):s/(a+n));switch(a){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},Xt={channel:Zt,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},Qt={};for(let ky=0;ky<=255;ky++)Qt[ky]=Xt.unit.dec2hex(ky);const Kt=0,Jt=1,te=2;class ee{constructor(){this.type=Kt}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=Kt}is(t){return this.type===t}}const re=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new ee}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=Kt,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=Xt.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=Xt.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=Xt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=Xt.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=Xt.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=Xt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(te)||void 0===e?(this._ensureHSL(),Xt.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(te)||void 0===e?(this._ensureHSL(),Xt.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(te)||void 0===e?(this._ensureHSL(),Xt.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(Jt)||void 0===e?(this._ensureRGB(),Xt.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(Jt)||void 0===e?(this._ensureRGB(),Xt.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(Jt)||void 0===e?(this._ensureRGB(),Xt.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(Jt),this.changed=!0,this.data.r=t}set g(t){this.type.set(Jt),this.changed=!0,this.data.g=t}set b(t){this.type.set(Jt),this.changed=!0,this.data.b=t}set h(t){this.type.set(te),this.changed=!0,this.data.h=t}set s(t){this.type.set(te),this.changed=!0,this.data.s=t}set l(t){this.type.set(te),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),ie={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(ie.re);if(!e)return;const r=e[1],i=parseInt(r,16),a=r.length,n=a%4==0,o=a>4,s=o?1:17,l=o?8:4,h=n?0:-1,c=o?255:15;return re.set({r:(i>>l*(h+3)&c)*s,g:(i>>l*(h+2)&c)*s,b:(i>>l*(h+1)&c)*s,a:n?(i&c)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`#${Qt[Math.round(e)]}${Qt[Math.round(r)]}${Qt[Math.round(i)]}${Qt[Math.round(255*a)]}`:`#${Qt[Math.round(e)]}${Qt[Math.round(r)]}${Qt[Math.round(i)]}`}},ae={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:t=>{const e=t.match(ae.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return Xt.channel.clamp.h(.9*parseFloat(t));case"rad":return Xt.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Xt.channel.clamp.h(360*parseFloat(t))}}return Xt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(ae.re);if(!r)return;const[,i,a,n,o,s]=r;return re.set({h:ae._hue2deg(i),s:Xt.channel.clamp.s(parseFloat(a)),l:Xt.channel.clamp.l(parseFloat(n)),a:o?Xt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:a}=t;return a<1?`hsla(${Xt.lang.round(e)}, ${Xt.lang.round(r)}%, ${Xt.lang.round(i)}%, ${a})`:`hsl(${Xt.lang.round(e)}, ${Xt.lang.round(r)}%, ${Xt.lang.round(i)}%)`}},ne={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:t=>{t=t.toLowerCase();const e=ne.colors[t];if(e)return ie.parse(e)},stringify:t=>{const e=ie.stringify(t);for(const r in ne.colors)if(ne.colors[r]===e)return r}},oe={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:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(oe.re);if(!r)return;const[,i,a,n,o,s,l,h,c]=r;return re.set({r:Xt.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:Xt.channel.clamp.g(o?2.55*parseFloat(n):parseFloat(n)),b:Xt.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:h?Xt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`rgba(${Xt.lang.round(e)}, ${Xt.lang.round(r)}, ${Xt.lang.round(i)}, ${Xt.lang.round(a)})`:`rgb(${Xt.lang.round(e)}, ${Xt.lang.round(r)}, ${Xt.lang.round(i)})`}},se={format:{keyword:ne,hex:ie,rgb:oe,rgba:oe,hsl:ae,hsla:ae},parse:t=>{if("string"!=typeof t)return t;const e=ie.parse(t)||oe.parse(t)||ae.parse(t)||ne.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(te)||void 0===t.data.r?ae.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?oe.stringify(t):ie.stringify(t)},le=(t,e)=>{const r=se.parse(t);for(const i in e)r[i]=Xt.channel.clamp[i](e[i]);return se.stringify(r)},he=(t,e,r=0,i=1)=>{if("number"!=typeof t)return le(t,{a:e});const a=re.set({r:Xt.channel.clamp.r(t),g:Xt.channel.clamp.g(e),b:Xt.channel.clamp.b(r),a:Xt.channel.clamp.a(i)});return se.stringify(a)},ce=t=>(t=>{const{r:e,g:r,b:i}=se.parse(t),a=.2126*Xt.channel.toLinear(e)+.7152*Xt.channel.toLinear(r)+.0722*Xt.channel.toLinear(i);return Xt.lang.round(a)})(t)>=.5,de=t=>!ce(t),ue=(t,e,r)=>{const i=se.parse(t),a=i[e],n=Xt.channel.clamp[e](a+r);return a!==n&&(i[e]=n),se.stringify(i)},pe=(t,e)=>ue(t,"l",e),ge=(t,e)=>ue(t,"l",-e),fe=(t,e)=>{const r=se.parse(t),i={};for(const a in e)e[a]&&(i[a]=r[a]+e[a]);return le(t,i)},ye=(t,e=100)=>{const r=se.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:a,b:n,a:o}=se.parse(t),{r:s,g:l,b:h,a:c}=se.parse(e),d=r/100,u=2*d-1,p=o-c,g=((u*p==-1?u:(u+p)/(1+u*p))+1)/2,f=1-g;return he(i*g+s*f,a*g+l*f,n*g+h*f,o*d+c*(1-d))})(r,t,e)},{entries:me,setPrototypeOf:xe,isFrozen:be,getPrototypeOf:Ce,getOwnPropertyDescriptor:ke}=Object;let{freeze:we,seal:Se,create:Te}=Object,{apply:ve,construct:Be}="undefined"!=typeof Reflect&&Reflect;we||(we=function(t){return t}),Se||(Se=function(t){return t}),ve||(ve=function(t,e,r){return t.apply(e,r)}),Be||(Be=function(t,e){return new t(...e)});const _e=ze(Array.prototype.forEach),Le=ze(Array.prototype.pop),Me=ze(Array.prototype.push),Fe=ze(String.prototype.toLowerCase),Ae=ze(String.prototype.toString),$e=ze(String.prototype.match),Ee=ze(String.prototype.replace),De=ze(String.prototype.indexOf),Ie=ze(String.prototype.trim),Oe=ze(Object.prototype.hasOwnProperty),Pe=ze(RegExp.prototype.test),Re=(qe=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Be(qe,e)});var qe;function ze(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return ve(t,e,i)}}function We(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fe;xe&&xe(t,null);let i=e.length;for(;i--;){let a=e[i];if("string"==typeof a){const t=r(a);t!==a&&(be(e)||(e[i]=t),a=t)}t[a]=!0}return t}function Ne(t){for(let e=0;e<t.length;e++){Oe(t,e)||(t[e]=null)}return t}function je(t){const e=Te(null);for(const[r,i]of me(t)){Oe(t,r)&&(Array.isArray(i)?e[r]=Ne(i):i&&"object"==typeof i&&i.constructor===Object?e[r]=je(i):e[r]=i)}return e}function He(t,e){for(;null!==t;){const r=ke(t,e);if(r){if(r.get)return ze(r.get);if("function"==typeof r.value)return ze(r.value)}t=Ce(t)}return function(){return null}}const Ue=we(["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","section","select","shadow","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"]),Ye=we(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ve=we(["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"]),Ge=we(["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"]),Ze=we(["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"]),Xe=we(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Qe=we(["#text"]),Ke=we(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Je=we(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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","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"]),tr=we(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),er=we(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rr=Se(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ir=Se(/<%[\w\W]*|[\w\W]*%>/gm),ar=Se(/\${[\w\W]*}/gm),nr=Se(/^data-[\-\w.\u00B7-\uFFFF]/),or=Se(/^aria-[\-\w]+$/),sr=Se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lr=Se(/^(?:\w+script|data):/i),hr=Se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cr=Se(/^html$/i),dr=Se(/^[a-z][.\w]*(-[.\w]+)+$/i);var ur=Object.freeze({__proto__:null,MUSTACHE_EXPR:rr,ERB_EXPR:ir,TMPLIT_EXPR:ar,DATA_ATTR:nr,ARIA_ATTR:or,IS_ALLOWED_URI:sr,IS_SCRIPT_OR_DATA:lr,ATTR_WHITESPACE:hr,DOCTYPE_NAME:cr,CUSTOM_ELEMENT:dr});const pr=1,gr=3,fr=7,yr=8,mr=9;var xr,br=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const r=e=>t(e);if(r.version="3.1.6",r.removed=[],!e||!e.document||e.document.nodeType!==mr)return r.isSupported=!1,r;let{document:i}=e;const a=i,n=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:h,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:g}=e,f=h.prototype,y=He(f,"cloneNode"),m=He(f,"remove"),x=He(f,"nextSibling"),b=He(f,"childNodes"),C=He(f,"parentNode");if("function"==typeof s){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let k,w="";const{implementation:S,createNodeIterator:T,createDocumentFragment:v,getElementsByTagName:B}=i,{importNode:_}=a;let L={};r.isSupported="function"==typeof me&&"function"==typeof C&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:M,ERB_EXPR:F,TMPLIT_EXPR:A,DATA_ATTR:$,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:O}=ur;let{IS_ALLOWED_URI:P}=ur,R=null;const q=We({},[...Ue,...Ye,...Ve,...Ze,...Qe]);let z=null;const W=We({},[...Ke,...Je,...tr,...er]);let N=Object.seal(Te(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}})),j=null,H=null,U=!0,Y=!0,V=!1,G=!0,Z=!1,X=!0,Q=!1,K=!1,J=!1,tt=!1,et=!1,rt=!1,it=!0,at=!1,nt=!0,ot=!1,st={},lt=null;const ht=We({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ct=null;const dt=We({},["audio","video","img","source","image","track"]);let ut=null;const pt=We({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gt="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml";let mt=yt,xt=!1,bt=null;const Ct=We({},[gt,ft,yt],Ae);let kt=null;const wt=["application/xhtml+xml","text/html"];let St=null,Tt=null;const vt=i.createElement("form"),Bt=function(t){return t instanceof RegExp||t instanceof Function},_t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Tt||Tt!==t){if(t&&"object"==typeof t||(t={}),t=je(t),kt=-1===wt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,St="application/xhtml+xml"===kt?Ae:Fe,R=Oe(t,"ALLOWED_TAGS")?We({},t.ALLOWED_TAGS,St):q,z=Oe(t,"ALLOWED_ATTR")?We({},t.ALLOWED_ATTR,St):W,bt=Oe(t,"ALLOWED_NAMESPACES")?We({},t.ALLOWED_NAMESPACES,Ae):Ct,ut=Oe(t,"ADD_URI_SAFE_ATTR")?We(je(pt),t.ADD_URI_SAFE_ATTR,St):pt,ct=Oe(t,"ADD_DATA_URI_TAGS")?We(je(dt),t.ADD_DATA_URI_TAGS,St):dt,lt=Oe(t,"FORBID_CONTENTS")?We({},t.FORBID_CONTENTS,St):ht,j=Oe(t,"FORBID_TAGS")?We({},t.FORBID_TAGS,St):{},H=Oe(t,"FORBID_ATTR")?We({},t.FORBID_ATTR,St):{},st=!!Oe(t,"USE_PROFILES")&&t.USE_PROFILES,U=!1!==t.ALLOW_ARIA_ATTR,Y=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Z=t.SAFE_FOR_TEMPLATES||!1,X=!1!==t.SAFE_FOR_XML,Q=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,rt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,it=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,nt=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,P=t.ALLOWED_URI_REGEXP||sr,mt=t.NAMESPACE||yt,N=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Bt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Bt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(N.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(Y=!1),et&&(tt=!0),st&&(R=We({},Qe),z=[],!0===st.html&&(We(R,Ue),We(z,Ke)),!0===st.svg&&(We(R,Ye),We(z,Je),We(z,er)),!0===st.svgFilters&&(We(R,Ve),We(z,Je),We(z,er)),!0===st.mathMl&&(We(R,Ze),We(z,tr),We(z,er))),t.ADD_TAGS&&(R===q&&(R=je(R)),We(R,t.ADD_TAGS,St)),t.ADD_ATTR&&(z===W&&(z=je(z)),We(z,t.ADD_ATTR,St)),t.ADD_URI_SAFE_ATTR&&We(ut,t.ADD_URI_SAFE_ATTR,St),t.FORBID_CONTENTS&&(lt===ht&&(lt=je(lt)),We(lt,t.FORBID_CONTENTS,St)),nt&&(R["#text"]=!0),Q&&We(R,["html","head","body"]),R.table&&(We(R,["tbody"]),delete j.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw Re('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw Re('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=t.TRUSTED_TYPES_POLICY,w=k.createHTML("")}else void 0===k&&(k=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(n){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(g,n)),null!==k&&"string"==typeof w&&(w=k.createHTML(""));we&&we(t),Tt=t}},Lt=We({},["mi","mo","mn","ms","mtext"]),Mt=We({},["foreignobject","annotation-xml"]),Ft=We({},["title","style","font","a","script"]),At=We({},[...Ye,...Ve,...Ge]),$t=We({},[...Ze,...Xe]),Et=function(t){Me(r.removed,{element:t});try{C(t).removeChild(t)}catch(e){m(t)}},Dt=function(t,e){try{Me(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(i){Me(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!z[t])if(tt||et)try{Et(e)}catch(i){}else try{e.setAttribute(t,"")}catch(i){}},It=function(t){let e=null,r=null;if(J)t="<remove></remove>"+t;else{const e=$e(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===kt&&mt===yt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=k?k.createHTML(t):t;if(mt===yt)try{e=(new p).parseFromString(a,kt)}catch(o){}if(!e||!e.documentElement){e=S.createDocument(mt,"template",null);try{e.documentElement.innerHTML=xt?w:a}catch(o){}}const n=e.body||e.documentElement;return t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),mt===yt?B.call(e,Q?"html":"body")[0]:Q?e.documentElement:n},Ot=function(t){return T.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Pt=function(t){return t instanceof u&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Rt=function(t){return"function"==typeof l&&t instanceof l},qt=function(t,e,i){L[t]&&_e(L[t],(t=>{t.call(r,e,i,Tt)}))},zt=function(t){let e=null;if(qt("beforeSanitizeElements",t,null),Pt(t))return Et(t),!0;const i=St(t.nodeName);if(qt("uponSanitizeElement",t,{tagName:i,allowedTags:R}),t.hasChildNodes()&&!Rt(t.firstElementChild)&&Pe(/<[/\w]/g,t.innerHTML)&&Pe(/<[/\w]/g,t.textContent))return Et(t),!0;if(t.nodeType===fr)return Et(t),!0;if(X&&t.nodeType===yr&&Pe(/<[/\w]/g,t.data))return Et(t),!0;if(!R[i]||j[i]){if(!j[i]&&Nt(i)){if(N.tagNameCheck instanceof RegExp&&Pe(N.tagNameCheck,i))return!1;if(N.tagNameCheck instanceof Function&&N.tagNameCheck(i))return!1}if(nt&&!lt[i]){const e=C(t)||t.parentNode,r=b(t)||t.childNodes;if(r&&e){for(let i=r.length-1;i>=0;--i){const a=y(r[i],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,x(t))}}}return Et(t),!0}return t instanceof h&&!function(t){let e=C(t);e&&e.tagName||(e={namespaceURI:mt,tagName:"template"});const r=Fe(t.tagName),i=Fe(e.tagName);return!!bt[t.namespaceURI]&&(t.namespaceURI===ft?e.namespaceURI===yt?"svg"===r:e.namespaceURI===gt?"svg"===r&&("annotation-xml"===i||Lt[i]):Boolean(At[r]):t.namespaceURI===gt?e.namespaceURI===yt?"math"===r:e.namespaceURI===ft?"math"===r&&Mt[i]:Boolean($t[r]):t.namespaceURI===yt?!(e.namespaceURI===ft&&!Mt[i])&&!(e.namespaceURI===gt&&!Lt[i])&&!$t[r]&&(Ft[r]||!At[r]):!("application/xhtml+xml"!==kt||!bt[t.namespaceURI]))}(t)?(Et(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Pe(/<\/no(script|embed|frames)/i,t.innerHTML)?(Z&&t.nodeType===gr&&(e=t.textContent,_e([M,F,A],(t=>{e=Ee(e,t," ")})),t.textContent!==e&&(Me(r.removed,{element:t.cloneNode()}),t.textContent=e)),qt("afterSanitizeElements",t,null),!1):(Et(t),!0)},Wt=function(t,e,r){if(it&&("id"===e||"name"===e)&&(r in i||r in vt))return!1;if(Y&&!H[e]&&Pe($,e));else if(U&&Pe(E,e));else if(!z[e]||H[e]){if(!(Nt(t)&&(N.tagNameCheck instanceof RegExp&&Pe(N.tagNameCheck,t)||N.tagNameCheck instanceof Function&&N.tagNameCheck(t))&&(N.attributeNameCheck instanceof RegExp&&Pe(N.attributeNameCheck,e)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(e))||"is"===e&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&Pe(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r))))return!1}else if(ut[e]);else if(Pe(P,Ee(r,I,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==De(r,"data:")||!ct[t]){if(V&&!Pe(D,Ee(r,I,"")));else if(r)return!1}else;return!0},Nt=function(t){return"annotation-xml"!==t&&$e(t,O)},jt=function(t){qt("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};let a=e.length;for(;a--;){const o=e[a],{name:s,namespaceURI:l,value:h}=o,c=St(s);let d="value"===s?h:Ie(h);if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,qt("uponSanitizeAttribute",t,i),d=i.attrValue,X&&Pe(/((--!?|])>)|<\/(style|title)/i,d)){Dt(s,t);continue}if(i.forceKeepAttr)continue;if(Dt(s,t),!i.keepAttr)continue;if(!G&&Pe(/\/>/i,d)){Dt(s,t);continue}Z&&_e([M,F,A],(t=>{d=Ee(d,t," ")}));const u=St(t.nodeName);if(Wt(u,c,d)){if(!at||"id"!==c&&"name"!==c||(Dt(s,t),d="user-content-"+d),k&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(l);else switch(g.getAttributeType(u,c)){case"TrustedHTML":d=k.createHTML(d);break;case"TrustedScriptURL":d=k.createScriptURL(d)}try{l?t.setAttributeNS(l,s,d):t.setAttribute(s,d),Pt(t)?Et(t):Le(r.removed)}catch(n){}}}qt("afterSanitizeAttributes",t,null)},Ht=function t(e){let r=null;const i=Ot(e);for(qt("beforeSanitizeShadowDOM",e,null);r=i.nextNode();)qt("uponSanitizeShadowNode",r,null),zt(r)||(r.content instanceof o&&t(r.content),jt(r));qt("afterSanitizeShadowDOM",e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,s=null,h=null;if(xt=!t,xt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Rt(t)){if("function"!=typeof t.toString)throw Re("toString is not a function");if("string"!=typeof(t=t.toString()))throw Re("dirty is not a string, aborting")}if(!r.isSupported)return t;if(K||_t(e),r.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=St(t.nodeName);if(!R[e]||j[e])throw Re("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=It("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===pr&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n);else{if(!tt&&!Z&&!Q&&-1===t.indexOf("<"))return k&&rt?k.createHTML(t):t;if(i=It(t),!i)return tt?null:rt?w:""}i&&J&&Et(i.firstChild);const c=Ot(ot?t:i);for(;s=c.nextNode();)zt(s)||(s.content instanceof o&&Ht(s.content),jt(s));if(ot)return t;if(tt){if(et)for(h=v.call(i.ownerDocument);i.firstChild;)h.appendChild(i.firstChild);else h=i;return(z.shadowroot||z.shadowrootmode)&&(h=_.call(a,h,!0)),h}let d=Q?i.outerHTML:i.innerHTML;return Q&&R["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Pe(cr,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),Z&&_e([M,F,A],(t=>{d=Ee(d,t," ")})),k&&rt?k.createHTML(d):d},r.setConfig=function(){_t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},r.clearConfig=function(){Tt=null,K=!1},r.isValidAttribute=function(t,e,r){Tt||_t({});const i=St(t),a=St(e);return Wt(i,a,r)},r.addHook=function(t,e){"function"==typeof e&&(L[t]=L[t]||[],Me(L[t],e))},r.removeHook=function(t){if(L[t])return Le(L[t])},r.removeHooks=function(t){L[t]&&(L[t]=[])},r.removeAllHooks=function(){L={}},r}(),Cr=Object.defineProperty,kr=(t,e)=>Cr(t,"name",{value:e,configurable:!0}),wr=(t,e)=>{for(var r in e)Cr(t,r,{get:e[r],enumerable:!0})},Sr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Tr={trace:kr(((...t)=>{}),"trace"),debug:kr(((...t)=>{}),"debug"),info:kr(((...t)=>{}),"info"),warn:kr(((...t)=>{}),"warn"),error:kr(((...t)=>{}),"error"),fatal:kr(((...t)=>{}),"fatal")},vr=kr((function(t="fatal"){let e=Sr.fatal;"string"==typeof t?t.toLowerCase()in Sr&&(e=Sr[t]):"number"==typeof t&&(e=t),Tr.trace=()=>{},Tr.debug=()=>{},Tr.info=()=>{},Tr.warn=()=>{},Tr.error=()=>{},Tr.fatal=()=>{},e<=Sr.fatal&&(Tr.fatal=console.error?console.error.bind(console,Br("FATAL"),"color: orange"):console.log.bind(console,"",Br("FATAL"))),e<=Sr.error&&(Tr.error=console.error?console.error.bind(console,Br("ERROR"),"color: orange"):console.log.bind(console,"",Br("ERROR"))),e<=Sr.warn&&(Tr.warn=console.warn?console.warn.bind(console,Br("WARN"),"color: orange"):console.log.bind(console,"",Br("WARN"))),e<=Sr.info&&(Tr.info=console.info?console.info.bind(console,Br("INFO"),"color: lightblue"):console.log.bind(console,"",Br("INFO"))),e<=Sr.debug&&(Tr.debug=console.debug?console.debug.bind(console,Br("DEBUG"),"color: lightgreen"):console.log.bind(console,"",Br("DEBUG"))),e<=Sr.trace&&(Tr.trace=console.debug?console.debug.bind(console,Br("TRACE"),"color: lightgreen"):console.log.bind(console,"",Br("TRACE")))}),"setLogLevel"),Br=kr((t=>`%c${Gt().format("ss.SSS")} : ${t} : `),"format"),_r=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Lr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Mr=/\s*%%.*\n/gm,Fr=(t=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},kr(t,"UnknownDiagramError"),t),Ar={},$r=kr((function(t,e){t=t.replace(_r,"").replace(Lr,"").replace(Mr,"\n");for(const[r,{detector:i}]of Object.entries(Ar)){if(i(t,e))return r}throw new Fr(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),Er=kr(((...t)=>{for(const{id:e,detector:r,loader:i}of t)Dr(e,r,i)}),"registerLazyLoadedDiagrams"),Dr=kr(((t,e,r)=>{Ar[t]&&Tr.warn(`Detector with key ${t} already exists. Overwriting.`),Ar[t]={detector:e,loader:r},Tr.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),Ir=kr((t=>Ar[t].loader),"getDiagramLoader"),Or=kr(((t,e,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Or(t,e,a))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((a=>{"object"!=typeof e[a]||void 0!==t[a]&&"object"!=typeof t[a]?(i||"object"!=typeof t[a]&&"object"!=typeof e[a])&&(t[a]=e[a]):(void 0===t[a]&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=Or(t[a],e[a],{depth:r-1,clobber:i}))})),t)}),"assignWithDepth"),Pr=Or,Rr="#ffffff",qr="#f2f2f2",zr=kr(((t,e)=>fe(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),Wr=(kr(e=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||zr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||zr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||zr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||zr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ye(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ye(this.tertiaryColor),this.lineColor=this.lineColor||ye(this.background),this.arrowheadColor=this.arrowheadColor||ye(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?ge(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||ge(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ye(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||pe(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.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||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||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=ge(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=ge(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||ye(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||pe(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||ge(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 d=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||fe(this.mainBkg,{h:180,s:-15,l:d*(5+3*u)}),this["surfacePeer"+u]=this["surfacePeer"+u]||fe(this.mainBkg,{h:180,s:-15,l:d*(8+3*u)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||fe(this.primaryColor,{h:64}),this.fillType3=this.fillType3||fe(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||fe(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||fe(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||fe(this.primaryColor,{h:128}),this.fillType7=this.fillType7||fe(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||fe(this.primaryColor,{l:-10}),this.pie5=this.pie5||fe(this.secondaryColor,{l:-10}),this.pie6=this.pie6||fe(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||fe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||fe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||fe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||fe(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||fe(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||fe(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.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||fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?pe(this.quadrant1Fill):ge(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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?ge(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||fe(this.primaryColor,{h:-30}),this.git4=this.git4||fe(this.primaryColor,{h:-60}),this.git5=this.git5||fe(this.primaryColor,{h:-90}),this.git6=this.git6||fe(this.primaryColor,{h:60}),this.git7=this.git7||fe(this.primaryColor,{h:120}),this.darkMode?(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)):(this.git0=ge(this.git0,25),this.git1=ge(this.git1,25),this.git2=ge(this.git2,25),this.git3=ge(this.git3,25),this.git4=ge(this.git4,25),this.git5=ge(this.git5,25),this.git6=ge(this.git6,25),this.git7=ge(this.git7,25)),this.gitInv0=this.gitInv0||ye(this.git0),this.gitInv1=this.gitInv1||ye(this.git1),this.gitInv2=this.gitInv2||ye(this.git2),this.gitInv3=this.gitInv3||ye(this.git3),this.gitInv4=this.gitInv4||ye(this.git4),this.gitInv5=this.gitInv5||ye(this.git5),this.gitInv6=this.gitInv6||ye(this.git6),this.gitInv7=this.gitInv7||ye(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||Rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),e),Nr=kr((t=>{const e=new Wr;return e.calculate(t),e}),"getThemeVariables"),jr=(kr(r=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pe(this.primaryColor,16),this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=ye(this.background),this.secondaryBorderColor=zr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=zr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ye(this.primaryColor),this.secondaryTextColor=ye(this.secondaryColor),this.tertiaryTextColor=ye(this.tertiaryColor),this.lineColor=ye(this.background),this.textColor=ye(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pe(ye("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=he(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.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.sectionBkgColor=ge("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ge(this.sectionBkgColor,10),this.taskBorderColor=he(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=he(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.secondBkg=pe(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=pe(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=pe(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,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=fe(this.primaryColor,{h:64}),this.fillType3=fe(this.secondaryColor,{h:64}),this.fillType4=fe(this.primaryColor,{h:-64}),this.fillType5=fe(this.secondaryColor,{h:-64}),this.fillType6=fe(this.primaryColor,{h:128}),this.fillType7=fe(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||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330});for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||ye(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScalePeer"+d]=this["cScalePeer"+d]||pe(this["cScale"+d],10);for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||fe(this.mainBkg,{h:30,s:-30,l:-(4*d-10)}),this["surfacePeer"+d]=this["surfacePeer"+d]||fe(this.mainBkg,{h:30,s:-30,l:-(4*d-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["pie"+d]=this["cScale"+d];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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?pe(this.quadrant1Fill):ge(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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.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?ge(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=pe(this.secondaryColor,20),this.git1=pe(this.pie2||this.secondaryColor,20),this.git2=pe(this.pie3||this.tertiaryColor,20),this.git3=pe(this.pie4||fe(this.primaryColor,{h:-30}),20),this.git4=pe(this.pie5||fe(this.primaryColor,{h:-60}),20),this.git5=pe(this.pie6||fe(this.primaryColor,{h:-90}),10),this.git6=pe(this.pie7||fe(this.primaryColor,{h:60}),10),this.git7=pe(this.pie8||fe(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ye(this.git0),this.gitInv1=this.gitInv1||ye(this.git1),this.gitInv2=this.gitInv2||ye(this.git2),this.gitInv3=this.gitInv3||ye(this.git3),this.gitInv4=this.gitInv4||ye(this.git4),this.gitInv5=this.gitInv5||ye(this.git5),this.gitInv6=this.gitInv6||ye(this.git6),this.gitInv7=this.gitInv7||ye(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ye(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ye(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||pe(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||pe(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),r),Hr=kr((t=>{const e=new jr;return e.calculate(t),e}),"getThemeVariables"),Ur=(kr(i=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=fe(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=zr(this.primaryColor,this.darkMode),this.secondaryBorderColor=zr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=zr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ye(this.primaryColor),this.secondaryTextColor=ye(this.secondaryColor),this.tertiaryTextColor=ye(this.tertiaryColor),this.lineColor=ye(this.background),this.textColor=ye(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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.sectionBkgColor=he(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ge(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ge(this.tertiaryColor,40);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=ge(this["cScale"+d],10),this["cScalePeer"+d]=this["cScalePeer"+d]||ge(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||fe(this["cScale"+d],{h:180});for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||fe(this.mainBkg,{h:30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||fe(this.mainBkg,{h:30,l:-(7+5*d)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||ye(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ye(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=pe(this.border1,23),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.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=fe(this.primaryColor,{h:64}),this.fillType3=fe(this.secondaryColor,{h:64}),this.fillType4=fe(this.primaryColor,{h:-64}),this.fillType5=fe(this.secondaryColor,{h:-64}),this.fillType6=fe(this.primaryColor,{h:128}),this.fillType7=fe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||fe(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||fe(this.primaryColor,{l:-10}),this.pie5=this.pie5||fe(this.secondaryColor,{l:-30}),this.pie6=this.pie6||fe(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||fe(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||fe(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||fe(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||fe(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||fe(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||fe(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?pe(this.quadrant1Fill):ge(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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||fe(this.primaryColor,{h:-30}),this.git4=this.git4||fe(this.primaryColor,{h:-60}),this.git5=this.git5||fe(this.primaryColor,{h:-90}),this.git6=this.git6||fe(this.primaryColor,{h:60}),this.git7=this.git7||fe(this.primaryColor,{h:120}),this.darkMode?(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)):(this.git0=ge(this.git0,25),this.git1=ge(this.git1,25),this.git2=ge(this.git2,25),this.git3=ge(this.git3,25),this.git4=ge(this.git4,25),this.git5=ge(this.git5,25),this.git6=ge(this.git6,25),this.git7=ge(this.git7,25)),this.gitInv0=this.gitInv0||ge(ye(this.git0),25),this.gitInv1=this.gitInv1||ye(this.git1),this.gitInv2=this.gitInv2||ye(this.git2),this.gitInv3=this.gitInv3||ye(this.git3),this.gitInv4=this.gitInv4||ye(this.git4),this.gitInv5=this.gitInv5||ye(this.git5),this.gitInv6=this.gitInv6||ye(this.git6),this.gitInv7=this.gitInv7||ye(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ye(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ye(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),i),Yr=kr((t=>{const e=new Ur;return e.calculate(t),e}),"getThemeVariables"),Vr=(kr(a=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=pe("#cde498",10),this.primaryBorderColor=zr(this.primaryColor,this.darkMode),this.secondaryBorderColor=zr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=zr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ye(this.primaryColor),this.secondaryTextColor=ye(this.secondaryColor),this.tertiaryTextColor=ye(this.primaryColor),this.lineColor=ye(this.background),this.textColor=ye(this.background),this.THEME_COLOR_LIMIT=12,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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.actorBorder=ge(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||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ge(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ge(this.tertiaryColor,40);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=ge(this["cScale"+d],10),this["cScalePeer"+d]=this["cScalePeer"+d]||ge(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||fe(this["cScale"+d],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||fe(this.mainBkg,{h:30,s:-30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||fe(this.mainBkg,{h:30,s:-30,l:-(8+5*d)});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.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=fe(this.primaryColor,{h:64}),this.fillType3=fe(this.secondaryColor,{h:64}),this.fillType4=fe(this.primaryColor,{h:-64}),this.fillType5=fe(this.secondaryColor,{h:-64}),this.fillType6=fe(this.primaryColor,{h:128}),this.fillType7=fe(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||fe(this.primaryColor,{l:-30}),this.pie5=this.pie5||fe(this.secondaryColor,{l:-30}),this.pie6=this.pie6||fe(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||fe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||fe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||fe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||fe(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||fe(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||fe(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?pe(this.quadrant1Fill):ge(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.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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||fe(this.primaryColor,{h:-30}),this.git4=this.git4||fe(this.primaryColor,{h:-60}),this.git5=this.git5||fe(this.primaryColor,{h:-90}),this.git6=this.git6||fe(this.primaryColor,{h:60}),this.git7=this.git7||fe(this.primaryColor,{h:120}),this.darkMode?(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)):(this.git0=ge(this.git0,25),this.git1=ge(this.git1,25),this.git2=ge(this.git2,25),this.git3=ge(this.git3,25),this.git4=ge(this.git4,25),this.git5=ge(this.git5,25),this.git6=ge(this.git6,25),this.git7=ge(this.git7,25)),this.gitInv0=this.gitInv0||ye(this.git0),this.gitInv1=this.gitInv1||ye(this.git1),this.gitInv2=this.gitInv2||ye(this.git2),this.gitInv3=this.gitInv3||ye(this.git3),this.gitInv4=this.gitInv4||ye(this.git4),this.gitInv5=this.gitInv5||ye(this.git5),this.gitInv6=this.gitInv6||ye(this.git6),this.gitInv7=this.gitInv7||ye(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ye(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ye(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),a),Gr=kr((t=>{const e=new Vr;return e.calculate(t),e}),"getThemeVariables"),Zr=(kr(n=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=pe(this.contrast,55),this.background="#ffffff",this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=zr(this.primaryColor,this.darkMode),this.secondaryBorderColor=zr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=zr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ye(this.primaryColor),this.secondaryTextColor=ye(this.secondaryColor),this.tertiaryTextColor=ye(this.tertiaryColor),this.lineColor=ye(this.background),this.textColor=ye(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.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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.secondBkg=pe(this.contrast,55),this.border2=this.contrast,this.actorBorder=pe(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||ye(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||pe(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||ge(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||fe(this.mainBkg,{l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||fe(this.mainBkg,{l:-(8+5*d)});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=pe(this.contrast,30),this.sectionBkgColor2=pe(this.contrast,30),this.taskBorderColor=ge(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=pe(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ge(this.critBkgColor,10),this.todayLineColor=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=fe(this.primaryColor,{h:64}),this.fillType3=fe(this.secondaryColor,{h:64}),this.fillType4=fe(this.primaryColor,{h:-64}),this.fillType5=fe(this.secondaryColor,{h:-64}),this.fillType6=fe(this.primaryColor,{h:128}),this.fillType7=fe(this.secondaryColor,{h:128});for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["pie"+d]=this["cScale"+d];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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?pe(this.quadrant1Fill):ge(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},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=ge(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||fe(this.primaryColor,{h:-30}),this.git4=this.pie5||fe(this.primaryColor,{h:-60}),this.git5=this.pie6||fe(this.primaryColor,{h:-90}),this.git6=this.pie7||fe(this.primaryColor,{h:60}),this.git7=this.pie8||fe(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ye(this.git0),this.gitInv1=this.gitInv1||ye(this.git1),this.gitInv2=this.gitInv2||ye(this.git2),this.gitInv3=this.gitInv3||ye(this.git3),this.gitInv4=this.gitInv4||ye(this.git4),this.gitInv5=this.gitInv5||ye(this.git5),this.gitInv6=this.gitInv6||ye(this.git6),this.gitInv7=this.gitInv7||ye(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),n),Xr={base:{getThemeVariables:Nr},dark:{getThemeVariables:Hr},default:{getThemeVariables:Yr},forest:{getThemeVariables:Gr},neutral:{getThemeVariables:kr((t=>{const e=new Zr;return e.calculate(t),e}),"getThemeVariables")}},Qr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},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,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"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},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,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,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},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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},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},Kr={...Qr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Xr.default.getThemeVariables(),sequence:{...Qr.sequence,messageFont:kr((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:kr((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:kr((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},gantt:{...Qr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Qr.c4,useWidth:void 0,personFont:kr((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:kr((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:kr((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:kr((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:kr((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:kr((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:kr((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:kr((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:kr((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:kr((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:kr((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:kr((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:kr((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:kr((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:kr((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:kr((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:kr((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:kr((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:kr((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:kr((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:kr((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:kr((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...Qr.pie,useWidth:984},xyChart:{...Qr.xyChart,useWidth:void 0},requirement:{...Qr.requirement,useWidth:void 0},packet:{...Qr.packet}},Jr=kr(((t,e="")=>Object.keys(t).reduce(((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Jr(t[i],"")]:[...r,e+i]),[])),"keyify"),ti=new Set(Jr(Kr,"")),ei=Kr,ri=kr((t=>{if(Tr.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>ri(t)));else{for(const e of Object.keys(t)){if(Tr.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!ti.has(e)||null==t[e]){Tr.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){Tr.debug("sanitizing object",e),ri(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(Tr.debug("sanitizing css option",e),t[e]=ii(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];(null==r?void 0:r.match)&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}Tr.debug("After sanitization",t)}}),"sanitizeDirective"),ii=kr((t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t}),"sanitizeCss"),ai=Object.freeze(ei),ni=Pr({},ai),oi=[],si=Pr({},ai),li=kr(((t,e)=>{let r=Pr({},t),i={};for(const a of e)fi(a),i=Pr(i,a);if(r=Pr(r,i),i.theme&&i.theme in Xr){const t=Pr({},xr),e=Pr(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in Xr&&(r.themeVariables=Xr[r.theme].getThemeVariables(e))}return ki(si=r),si}),"updateCurrentConfig"),hi=kr((t=>(ni=Pr({},ai),ni=Pr(ni,t),t.theme&&Xr[t.theme]&&(ni.themeVariables=Xr[t.theme].getThemeVariables(t.themeVariables)),li(ni,oi),ni)),"setSiteConfig"),ci=kr((t=>{xr=Pr({},t)}),"saveConfigFromInitialize"),di=kr((t=>(ni=Pr(ni,t),li(ni,oi),ni)),"updateSiteConfig"),ui=kr((()=>Pr({},ni)),"getSiteConfig"),pi=kr((t=>(ki(t),Pr(si,t),gi())),"setConfig"),gi=kr((()=>Pr({},si)),"getConfig"),fi=kr((t=>{t&&(["secure",...ni.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(Tr.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&fi(t[e])})))}),"sanitize"),yi=kr((t=>{var e;ri(t),t.fontFamily&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),oi.push(t),li(ni,oi)}),"addDirective"),mi=kr(((t=ni)=>{li(t,oi=[])}),"reset"),xi={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},bi={},Ci=kr((t=>{bi[t]||(Tr.warn(xi[t]),bi[t]=!0)}),"issueWarning"),ki=kr((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Ci("LAZY_LOAD_DEPRECATED")}),"checkConfig"),wi=/<br\s*\/?>/gi,Si=kr((t=>{if(!t)return[""];return Ei(t).replace(/\\n/g,"#br#").split("#br#")}),"getRows"),Ti=(()=>{let t=!1;return()=>{t||(vi(),t=!0)}})();function vi(){const t="data-temp-href-target";br.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),br.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}kr(vi,"setupDompurifyHooks");var Bi=kr((t=>{Ti();return br.sanitize(t)}),"removeScript"),_i=kr(((t,e)=>{var r;if(!1!==(null==(r=e.flowchart)?void 0:r.htmlLabels)){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=Bi(t):"loose"!==r&&(t=(t=(t=Ei(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=$i(t))}return t}),"sanitizeMore"),Li=kr(((t,e)=>t?t=e.dompurifyConfig?br.sanitize(_i(t,e),e.dompurifyConfig).toString():br.sanitize(_i(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),Mi=kr(((t,e)=>"string"==typeof t?Li(t,e):t.flat().map((t=>Li(t,e)))),"sanitizeTextOrArray"),Fi=kr((t=>wi.test(t)),"hasBreaks"),Ai=kr((t=>t.split(wi)),"splitBreaks"),$i=kr((t=>t.replace(/#br#/g,"<br/>")),"placeholderToBreak"),Ei=kr((t=>t.replace(wi,"#br#")),"breakToPlaceholder"),Di=kr((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),Ii=kr((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Oi=kr((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Pi=kr((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),Ri=kr((function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let t=e[i];if(","===t&&i>0&&i+1<e.length){const a=e[i-1],n=e[i+1];zi(a,n)&&(t=a+","+n,i++,r.pop())}r.push(Wi(t))}return r.join("")}),"parseGenericTypes"),qi=kr(((t,e)=>Math.max(0,t.split(e).length-1)),"countOccurrence"),zi=kr(((t,e)=>{const r=qi(t,"~"),i=qi(e,"~");return 1===r&&1===i}),"shouldCombineSets"),Wi=kr((t=>{const e=qi(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;-1!==a&&-1!==n&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")}),"processSet"),Ni=kr((()=>void 0!==window.MathMLElement),"isMathMLSupported"),ji=/\$\$(.*)\$\$/g,Hi=kr((t=>{var e;return((null==(e=t.match(ji))?void 0:e.length)??0)>0}),"hasKatex"),Ui=kr((async(t,e)=>{t=await Yi(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");null==i||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a}),"calculateMathMLDimensions"),Yi=kr((async(t,e)=>{if(!Hi(t))return t;if(!(Ni()||e.legacyMathML||e.forceLegacyMathML))return t.replace(ji,"MathML is unsupported in this environment.");const{default:r}=await z((async()=>{const{default:t}=await import("./katex-D1MatCUS.js");return{default:t}}),[],import.meta.url),i=e.forceLegacyMathML||!Ni()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(wi).map((t=>Hi(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`)).join("").replace(ji,((t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,"")))}),"renderKatex"),Vi={getRows:Si,sanitizeText:Li,sanitizeTextOrArray:Mi,hasBreaks:Fi,splitBreaks:Ai,lineBreakRegex:wi,removeScript:Bi,getUrl:Di,evaluate:Ii,getMax:Oi,getMin:Pi},Gi=kr((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),Zi=kr((function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i}),"calculateSvgSizeAttrs"),Xi=kr((function(t,e,r,i){const a=Zi(e,r,i);Gi(t,a)}),"configureSvgSize"),Qi=kr((function(t,e,r,i){const a=e.node().getBBox(),n=a.width,o=a.height;Tr.info(`SVG bounds: ${n}x${o}`,a);let s=0,l=0;Tr.info(`Graph bounds: ${s}x${l}`,t),s=n+2*r,l=o+2*r,Tr.info(`Calculated bounds: ${s}x${l}`),Xi(e,l,s,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)}),"setupGraphViewbox"),Ki={},Ji=kr(((t,e,r)=>{let i="";return t in Ki&&Ki[t]?i=Ki[t](r):Tr.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`}),"getStyles"),ta=kr(((t,e)=>{void 0!==e&&(Ki[t]=e)}),"addStylesForDiagram"),ea=Ji,ra={};wr(ra,{clear:()=>sa,getAccDescription:()=>da,getAccTitle:()=>ha,getDiagramTitle:()=>pa,setAccDescription:()=>ca,setAccTitle:()=>la,setDiagramTitle:()=>ua});var ia="",aa="",na="",oa=kr((t=>Li(t,gi())),"sanitizeText"),sa=kr((()=>{ia="",na="",aa=""}),"clear"),la=kr((t=>{ia=oa(t).replace(/^\s+/g,"")}),"setAccTitle"),ha=kr((()=>ia),"getAccTitle"),ca=kr((t=>{na=oa(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),da=kr((()=>na),"getAccDescription"),ua=kr((t=>{aa=oa(t)}),"setDiagramTitle"),pa=kr((()=>aa),"getDiagramTitle"),ga=Tr,fa=vr,ya=gi,ma=pi,xa=ai,ba=kr((t=>Li(t,ya())),"sanitizeText"),Ca=Qi,ka=kr((()=>ra),"getCommonDb"),wa={},Sa=kr(((t,e,r)=>{var i;wa[t]&&ga.warn(`Diagram with id ${t} already registered. Overwriting.`),wa[t]=e,r&&Dr(t,r),ta(t,e.styles),null==(i=e.injectUtils)||i.call(e,ga,fa,ya,ba,Ca,ka(),(()=>{}))}),"registerDiagram"),Ta=kr((t=>{if(t in wa)return wa[t];throw new va(t)}),"getDiagram"),va=(o=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},kr(o,"DiagramNotFoundError"),o);function Ba(t){return null==t}function _a(t){return"object"==typeof t&&null!==t}function La(t){return Array.isArray(t)?t:Ba(t)?[]:[t]}function Ma(t,e){var r,i,a,n;if(e)for(r=0,i=(n=Object.keys(e)).length;r<i;r+=1)t[a=n[r]]=e[a];return t}function Fa(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function Aa(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}kr(Ba,"isNothing"),kr(_a,"isObject"),kr(La,"toArray"),kr(Ma,"extend"),kr(Fa,"repeat"),kr(Aa,"isNegativeZero");var $a={isNothing:Ba,isObject:_a,toArray:La,repeat:Fa,isNegativeZero:Aa,extend:Ma};function Ea(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function Da(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Ea(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}kr(Ea,"formatError"),kr(Da,"YAMLException$1"),Da.prototype=Object.create(Error.prototype),Da.prototype.constructor=Da,Da.prototype.toString=kr((function(t){return this.name+": "+Ea(this,t)}),"toString");var Ia=Da;function Oa(t,e,r,i,a){var n="",o="",s=Math.floor(a/2)-1;return i-e>s&&(e=i-s+(n=" ... ").length),r-i>s&&(r=i+s-(o=" ...").length),{str:n+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+n.length}}function Pa(t,e){return $a.repeat(" ",e-t.length)+t}function Ra(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,a=[0],n=[],o=-1;r=i.exec(t.buffer);)n.push(r.index),a.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=a.length-2);o<0&&(o=a.length-1);var s,l,h="",c=Math.min(t.line+e.linesAfter,n.length).toString().length,d=e.maxLength-(e.indent+c+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=Oa(t.buffer,a[o-s],n[o-s],t.position-(a[o]-a[o-s]),d),h=$a.repeat(" ",e.indent)+Pa((t.line-s+1).toString(),c)+" | "+l.str+"\n"+h;for(l=Oa(t.buffer,a[o],n[o],t.position,d),h+=$a.repeat(" ",e.indent)+Pa((t.line+1).toString(),c)+" | "+l.str+"\n",h+=$a.repeat("-",e.indent+c+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=n.length);s++)l=Oa(t.buffer,a[o+s],n[o+s],t.position-(a[o]-a[o+s]),d),h+=$a.repeat(" ",e.indent)+Pa((t.line+s+1).toString(),c)+" | "+l.str+"\n";return h.replace(/\n$/,"")}kr(Oa,"getLine"),kr(Pa,"padStart"),kr(Ra,"makeSnippet");var qa=Ra,za=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Wa=["scalar","sequence","mapping"];function Na(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function ja(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===za.indexOf(e))throw new Ia('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Na(e.styleAliases||null),-1===Wa.indexOf(this.kind))throw new Ia('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}kr(Na,"compileStyleAliases"),kr(ja,"Type$1");var Ha=ja;function Ua(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)})),r[e]=t})),r}function Ya(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(kr(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function Va(t){return this.extend(t)}kr(Ua,"compileList"),kr(Ya,"compileMap"),kr(Va,"Schema$1"),Va.prototype.extend=kr((function(t){var e=[],r=[];if(t instanceof Ha)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Ia("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof Ha))throw new Ia("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Ia("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Ia("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(t){if(!(t instanceof Ha))throw new Ia("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(Va.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Ua(i,"implicit"),i.compiledExplicit=Ua(i,"explicit"),i.compiledTypeMap=Ya(i.compiledImplicit,i.compiledExplicit),i}),"extend");var Ga=new Va({explicit:[new Ha("tag:yaml.org,2002:str",{kind:"scalar",construct:kr((function(t){return null!==t?t:""}),"construct")}),new Ha("tag:yaml.org,2002:seq",{kind:"sequence",construct:kr((function(t){return null!==t?t:[]}),"construct")}),new Ha("tag:yaml.org,2002:map",{kind:"mapping",construct:kr((function(t){return null!==t?t:{}}),"construct")})]});function Za(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function Xa(){return null}function Qa(t){return null===t}kr(Za,"resolveYamlNull"),kr(Xa,"constructYamlNull"),kr(Qa,"isNull");var Ka=new Ha("tag:yaml.org,2002:null",{kind:"scalar",resolve:Za,construct:Xa,predicate:Qa,represent:{canonical:kr((function(){return"~"}),"canonical"),lowercase:kr((function(){return"null"}),"lowercase"),uppercase:kr((function(){return"NULL"}),"uppercase"),camelcase:kr((function(){return"Null"}),"camelcase"),empty:kr((function(){return""}),"empty")},defaultStyle:"lowercase"});function Ja(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function tn(t){return"true"===t||"True"===t||"TRUE"===t}function en(t){return"[object Boolean]"===Object.prototype.toString.call(t)}kr(Ja,"resolveYamlBoolean"),kr(tn,"constructYamlBoolean"),kr(en,"isBoolean");var rn=new Ha("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ja,construct:tn,predicate:en,represent:{lowercase:kr((function(t){return t?"true":"false"}),"lowercase"),uppercase:kr((function(t){return t?"TRUE":"FALSE"}),"uppercase"),camelcase:kr((function(t){return t?"True":"False"}),"camelcase")},defaultStyle:"lowercase"});function an(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function nn(t){return 48<=t&&t<=55}function on(t){return 48<=t&&t<=57}function sn(t){if(null===t)return!1;var e,r=t.length,i=0,a=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;a=!0}return a&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!an(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!nn(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!on(t.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===e)}function ln(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function hn(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!$a.isNegativeZero(t)}kr(an,"isHexCode"),kr(nn,"isOctCode"),kr(on,"isDecCode"),kr(sn,"resolveYamlInteger"),kr(ln,"constructYamlInteger"),kr(hn,"isInteger");var cn=new Ha("tag:yaml.org,2002:int",{kind:"scalar",resolve:sn,construct:ln,predicate:hn,represent:{binary:kr((function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:kr((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:kr((function(t){return t.toString(10)}),"decimal"),hexadecimal:kr((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),dn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function un(t){return null!==t&&!(!dn.test(t)||"_"===t[t.length-1])}function pn(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}kr(un,"resolveYamlFloat"),kr(pn,"constructYamlFloat");var gn=/^[-+]?[0-9]+e/;function fn(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if($a.isNegativeZero(t))return"-0.0";return r=t.toString(10),gn.test(r)?r.replace("e",".e"):r}function yn(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||$a.isNegativeZero(t))}kr(fn,"representYamlFloat"),kr(yn,"isFloat");var mn=new Ha("tag:yaml.org,2002:float",{kind:"scalar",resolve:un,construct:pn,predicate:yn,represent:fn,defaultStyle:"lowercase"}),xn=Ga.extend({implicit:[Ka,rn,cn,mn]}),bn=xn,Cn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kn=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 wn(t){return null!==t&&(null!==Cn.exec(t)||null!==kn.exec(t))}function Sn(t){var e,r,i,a,n,o,s,l,h=0,c=null;if(null===(e=Cn.exec(t))&&(e=kn.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,i,a));if(n=+e[4],o=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,a,n,o,s,h)),c&&l.setTime(l.getTime()-c),l}function Tn(t){return t.toISOString()}kr(wn,"resolveYamlTimestamp"),kr(Sn,"constructYamlTimestamp"),kr(Tn,"representYamlTimestamp");var vn=new Ha("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:wn,construct:Sn,instanceOf:Date,represent:Tn});function Bn(t){return"<<"===t||null===t}kr(Bn,"resolveYamlMerge");var _n=new Ha("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Bn}),Ln="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Mn(t){if(null===t)return!1;var e,r,i=0,a=t.length,n=Ln;for(r=0;r<a;r++)if(!((e=n.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function Fn(t){var e,r,i=t.replace(/[\r\n=]/g,""),a=i.length,n=Ln,o=0,s=[];for(e=0;e<a;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|n.indexOf(i.charAt(e));return 0===(r=a%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function An(t){var e,r,i="",a=0,n=t.length,o=Ln;for(e=0;e<n;e++)e%3==0&&e&&(i+=o[a>>18&63],i+=o[a>>12&63],i+=o[a>>6&63],i+=o[63&a]),a=(a<<8)+t[e];return 0===(r=n%3)?(i+=o[a>>18&63],i+=o[a>>12&63],i+=o[a>>6&63],i+=o[63&a]):2===r?(i+=o[a>>10&63],i+=o[a>>4&63],i+=o[a<<2&63],i+=o[64]):1===r&&(i+=o[a>>2&63],i+=o[a<<4&63],i+=o[64],i+=o[64]),i}function $n(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}kr(Mn,"resolveYamlBinary"),kr(Fn,"constructYamlBinary"),kr(An,"representYamlBinary"),kr($n,"isBinary");var En=new Ha("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Mn,construct:Fn,predicate:$n,represent:An}),Dn=Object.prototype.hasOwnProperty,In=Object.prototype.toString;function On(t){if(null===t)return!0;var e,r,i,a,n,o=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(i=s[e],n=!1,"[object Object]"!==In.call(i))return!1;for(a in i)if(Dn.call(i,a)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==o.indexOf(a))return!1;o.push(a)}return!0}function Pn(t){return null!==t?t:[]}kr(On,"resolveYamlOmap"),kr(Pn,"constructYamlOmap");var Rn=new Ha("tag:yaml.org,2002:omap",{kind:"sequence",resolve:On,construct:Pn}),qn=Object.prototype.toString;function zn(t){if(null===t)return!0;var e,r,i,a,n,o=t;for(n=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],"[object Object]"!==qn.call(i))return!1;if(1!==(a=Object.keys(i)).length)return!1;n[e]=[a[0],i[a[0]]]}return!0}function Wn(t){if(null===t)return[];var e,r,i,a,n,o=t;for(n=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],a=Object.keys(i),n[e]=[a[0],i[a[0]]];return n}kr(zn,"resolveYamlPairs"),kr(Wn,"constructYamlPairs");var Nn=new Ha("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:zn,construct:Wn}),jn=Object.prototype.hasOwnProperty;function Hn(t){if(null===t)return!0;var e,r=t;for(e in r)if(jn.call(r,e)&&null!==r[e])return!1;return!0}function Un(t){return null!==t?t:{}}kr(Hn,"resolveYamlSet"),kr(Un,"constructYamlSet");var Yn=new Ha("tag:yaml.org,2002:set",{kind:"mapping",resolve:Hn,construct:Un}),Vn=bn.extend({implicit:[vn,_n],explicit:[En,Rn,Nn,Yn]}),Gn=Object.prototype.hasOwnProperty,Zn=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Xn=/[\x85\u2028\u2029]/,Qn=/[,\[\]\{\}]/,Kn=/^(?:!|!!|![a-z\-]+!)$/i,Jn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function to(t){return Object.prototype.toString.call(t)}function eo(t){return 10===t||13===t}function ro(t){return 9===t||32===t}function io(t){return 9===t||32===t||10===t||13===t}function ao(t){return 44===t||91===t||93===t||123===t||125===t}function no(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function oo(t){return 120===t?2:117===t?4:85===t?8:0}function so(t){return 48<=t&&t<=57?t-48:-1}function lo(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function ho(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}kr(to,"_class"),kr(eo,"is_EOL"),kr(ro,"is_WHITE_SPACE"),kr(io,"is_WS_OR_EOL"),kr(ao,"is_FLOW_INDICATOR"),kr(no,"fromHexCode"),kr(oo,"escapedHexLen"),kr(so,"fromDecimalCode"),kr(lo,"simpleEscapeSequence"),kr(ho,"charFromCodepoint");var co,uo=new Array(256),po=new Array(256);for(co=0;co<256;co++)uo[co]=lo(co)?1:0,po[co]=lo(co);function go(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Vn,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function fo(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=qa(r),new Ia(e,r)}function yo(t,e){throw fo(t,e)}function mo(t,e){t.onWarning&&t.onWarning.call(null,fo(t,e))}kr(go,"State$1"),kr(fo,"generateError"),kr(yo,"throwError"),kr(mo,"throwWarning");var xo={YAML:kr((function(t,e,r){var i,a,n;null!==t.version&&yo(t,"duplication of %YAML directive"),1!==r.length&&yo(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&yo(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),n=parseInt(i[2],10),1!==a&&yo(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&mo(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:kr((function(t,e,r){var i,a;2!==r.length&&yo(t,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],Kn.test(i)||yo(t,"ill-formed tag handle (first argument) of the TAG directive"),Gn.call(t.tagMap,i)&&yo(t,'there is a previously declared suffix for "'+i+'" tag handle'),Jn.test(a)||yo(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch(n){yo(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a}),"handleTagDirective")};function bo(t,e,r,i){var a,n,o,s;if(e<r){if(s=t.input.slice(e,r),i)for(a=0,n=s.length;a<n;a+=1)9===(o=s.charCodeAt(a))||32<=o&&o<=1114111||yo(t,"expected valid JSON character");else Zn.test(s)&&yo(t,"the stream contains non-printable characters");t.result+=s}}function Co(t,e,r,i){var a,n,o,s;for($a.isObject(r)||yo(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(a=Object.keys(r)).length;o<s;o+=1)n=a[o],Gn.call(e,n)||(e[n]=r[n],i[n]=!0)}function ko(t,e,r,i,a,n,o,s,l){var h,c;if(Array.isArray(a))for(h=0,c=(a=Array.prototype.slice.call(a)).length;h<c;h+=1)Array.isArray(a[h])&&yo(t,"nested arrays are not supported inside keys"),"object"==typeof a&&"[object Object]"===to(a[h])&&(a[h]="[object Object]");if("object"==typeof a&&"[object Object]"===to(a)&&(a="[object Object]"),a=String(a),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(n))for(h=0,c=n.length;h<c;h+=1)Co(t,e,n[h],r);else Co(t,e,n,r);else t.json||Gn.call(r,a)||!Gn.call(e,a)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,yo(t,"duplicated mapping key")),"__proto__"===a?Object.defineProperty(e,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[a]=n,delete r[a];return e}function wo(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):yo(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function So(t,e,r){for(var i=0,a=t.input.charCodeAt(t.position);0!==a;){for(;ro(a);)9===a&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(e&&35===a)do{a=t.input.charCodeAt(++t.position)}while(10!==a&&13!==a&&0!==a);if(!eo(a))break;for(wo(t),a=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&mo(t,"deficient indentation"),i}function To(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!io(e)))}function vo(t,e){1===e?t.result+=" ":e>1&&(t.result+=$a.repeat("\n",e-1))}function Bo(t,e,r){var i,a,n,o,s,l,h,c,d=t.kind,u=t.result;if(io(c=t.input.charCodeAt(t.position))||ao(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(io(i=t.input.charCodeAt(t.position+1))||r&&ao(i)))return!1;for(t.kind="scalar",t.result="",a=n=t.position,o=!1;0!==c;){if(58===c){if(io(i=t.input.charCodeAt(t.position+1))||r&&ao(i))break}else if(35===c){if(io(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&To(t)||r&&ao(c))break;if(eo(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,So(t,!1,-1),t.lineIndent>=e){o=!0,c=t.input.charCodeAt(t.position);continue}t.position=n,t.line=s,t.lineStart=l,t.lineIndent=h;break}}o&&(bo(t,a,n,!1),vo(t,t.line-s),a=n=t.position,o=!1),ro(c)||(n=t.position+1),c=t.input.charCodeAt(++t.position)}return bo(t,a,n,!1),!!t.result||(t.kind=d,t.result=u,!1)}function _o(t,e){var r,i,a;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=a=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(bo(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,a=t.position}else eo(r)?(bo(t,i,a,!0),vo(t,So(t,!1,e)),i=a=t.position):t.position===t.lineStart&&To(t)?yo(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);yo(t,"unexpected end of the stream within a single quoted scalar")}function Lo(t,e){var r,i,a,n,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return bo(t,r,t.position,!0),t.position++,!0;if(92===s){if(bo(t,r,t.position,!0),eo(s=t.input.charCodeAt(++t.position)))So(t,!1,e);else if(s<256&&uo[s])t.result+=po[s],t.position++;else if((o=oo(s))>0){for(a=o,n=0;a>0;a--)(o=no(s=t.input.charCodeAt(++t.position)))>=0?n=(n<<4)+o:yo(t,"expected hexadecimal character");t.result+=ho(n),t.position++}else yo(t,"unknown escape sequence");r=i=t.position}else eo(s)?(bo(t,r,i,!0),vo(t,So(t,!1,e)),r=i=t.position):t.position===t.lineStart&&To(t)?yo(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}yo(t,"unexpected end of the stream within a double quoted scalar")}function Mo(t,e){var r,i,a,n,o,s,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,h=!1,n=[];else{if(123!==p)return!1;o=125,h=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(++t.position);0!==p;){if(So(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=n,!0;g?44===p&&yo(t,"expected the node content, but found ','"):yo(t,"missed comma between flow collection entries"),u=null,s=l=!1,63===p&&io(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,So(t,!0,e)),r=t.line,i=t.lineStart,a=t.position,Oo(t,e,1,!1,!0),d=t.tag,c=t.result,So(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),So(t,!0,e),Oo(t,e,1,!1,!0),u=t.result),h?ko(t,n,m,d,c,u,r,i,a):s?n.push(ko(t,null,m,d,c,u,r,i,a)):n.push(c),So(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}yo(t,"unexpected end of the stream within a flow collection")}function Fo(t,e){var r,i,a,n,o=1,s=!1,l=!1,h=e,c=0,d=!1;if(124===(n=t.input.charCodeAt(t.position)))i=!1;else{if(62!==n)return!1;i=!0}for(t.kind="scalar",t.result="";0!==n;)if(43===(n=t.input.charCodeAt(++t.position))||45===n)1===o?o=43===n?3:2:yo(t,"repeat of a chomping mode identifier");else{if(!((a=so(n))>=0))break;0===a?yo(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?yo(t,"repeat of an indentation width identifier"):(h=e+a-1,l=!0)}if(ro(n)){do{n=t.input.charCodeAt(++t.position)}while(ro(n));if(35===n)do{n=t.input.charCodeAt(++t.position)}while(!eo(n)&&0!==n)}for(;0!==n;){for(wo(t),t.lineIndent=0,n=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),eo(n))c++;else{if(t.lineIndent<h){3===o?t.result+=$a.repeat("\n",s?1+c:c):1===o&&s&&(t.result+="\n");break}for(i?ro(n)?(d=!0,t.result+=$a.repeat("\n",s?1+c:c)):d?(d=!1,t.result+=$a.repeat("\n",c+1)):0===c?s&&(t.result+=" "):t.result+=$a.repeat("\n",c):t.result+=$a.repeat("\n",s?1+c:c),s=!0,l=!0,c=0,r=t.position;!eo(n)&&0!==n;)n=t.input.charCodeAt(++t.position);bo(t,r,t.position,!1)}}return!0}function Ao(t,e){var r,i,a=t.tag,n=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,yo(t,"tab characters must not be used in indentation")),45===i)&&io(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,So(t,!0,-1)&&t.lineIndent<=e)o.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,Oo(t,e,3,!1,!0),o.push(t.result),So(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)yo(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=a,t.anchor=n,t.kind="sequence",t.result=o,!0)}function $o(t,e,r){var i,a,n,o,s,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,y=null,m=!1,x=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,yo(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),n=t.line,63!==h&&58!==h||!io(i)){if(o=t.line,s=t.lineStart,l=t.position,!Oo(t,r,2,!1,!0))break;if(t.line===n){for(h=t.input.charCodeAt(t.position);ro(h);)h=t.input.charCodeAt(++t.position);if(58===h)io(h=t.input.charCodeAt(++t.position))||yo(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(ko(t,u,p,g,f,null,o,s,l),g=f=y=null),x=!0,m=!1,a=!1,g=t.tag,f=t.result;else{if(!x)return t.tag=c,t.anchor=d,!0;yo(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return t.tag=c,t.anchor=d,!0;yo(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(ko(t,u,p,g,f,null,o,s,l),g=f=y=null),x=!0,m=!0,a=!0):m?(m=!1,a=!0):yo(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===n||t.lineIndent>e)&&(m&&(o=t.line,s=t.lineStart,l=t.position),Oo(t,e,4,!0,a)&&(m?f=t.result:y=t.result),m||(ko(t,u,p,g,f,y,o,s,l),g=f=y=null),So(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&0!==h)yo(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&ko(t,u,p,g,f,null,o,s,l),x&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),x}function Eo(t){var e,r,i,a,n=!1,o=!1;if(33!==(a=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&yo(t,"duplication of a tag property"),60===(a=t.input.charCodeAt(++t.position))?(n=!0,a=t.input.charCodeAt(++t.position)):33===a?(o=!0,r="!!",a=t.input.charCodeAt(++t.position)):r="!",e=t.position,n){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&62!==a);t.position<t.length?(i=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):yo(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==a&&!io(a);)33===a&&(o?yo(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Kn.test(r)||yo(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Qn.test(i)&&yo(t,"tag suffix cannot contain flow indicator characters")}i&&!Jn.test(i)&&yo(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(s){yo(t,"tag name is malformed: "+i)}return n?t.tag=i:Gn.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:yo(t,'undeclared tag handle "'+r+'"'),!0}function Do(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&yo(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!io(r)&&!ao(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&yo(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Io(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!io(i)&&!ao(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&yo(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Gn.call(t.anchorMap,r)||yo(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],So(t,!0,-1),!0}function Oo(t,e,r,i,a){var n,o,s,l,h,c,d,u,p,g=1,f=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=o=s=4===r||3===r,i&&So(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;Eo(t)||Do(t);)So(t,!0,-1)?(f=!0,s=n,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):s=!1;if(s&&(s=f||a),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?s&&(Ao(t,p)||$o(t,p,u))||Mo(t,u)?y=!0:(o&&Fo(t,u)||_o(t,u)||Lo(t,u)?y=!0:Io(t)?(y=!0,null===t.tag&&null===t.anchor||yo(t,"alias node should not have any properties")):Bo(t,u,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(y=s&&Ao(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&yo(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Gn.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||yo(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&yo(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):yo(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function Po(t){var e,r,i,a,n=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(a=t.input.charCodeAt(t.position))&&(So(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==a));){for(o=!0,a=t.input.charCodeAt(++t.position),e=t.position;0!==a&&!io(a);)a=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&yo(t,"directive name must not be less than one character in length");0!==a;){for(;ro(a);)a=t.input.charCodeAt(++t.position);if(35===a){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&!eo(a));break}if(eo(a))break;for(e=t.position;0!==a&&!io(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==a&&wo(t),Gn.call(xo,r)?xo[r](t,r,i):mo(t,'unknown document directive "'+r+'"')}So(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,So(t,!0,-1)):o&&yo(t,"directives end mark is expected"),Oo(t,t.lineIndent-1,4,!1,!0),So(t,!0,-1),t.checkLineBreaks&&Xn.test(t.input.slice(n,t.position))&&mo(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&To(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,So(t,!0,-1)):t.position<t.length-1&&yo(t,"end of the stream or a document separator is expected")}function Ro(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new go(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,yo(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Po(r);return r.documents}function qo(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=Ro(t,r);if("function"!=typeof e)return i;for(var a=0,n=i.length;a<n;a+=1)e(i[a])}function zo(t,e){var r=Ro(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new Ia("expected a single document in the stream, but found more")}}kr(bo,"captureSegment"),kr(Co,"mergeMappings"),kr(ko,"storeMappingPair"),kr(wo,"readLineBreak"),kr(So,"skipSeparationSpace"),kr(To,"testDocumentSeparator"),kr(vo,"writeFoldedLines"),kr(Bo,"readPlainScalar"),kr(_o,"readSingleQuotedScalar"),kr(Lo,"readDoubleQuotedScalar"),kr(Mo,"readFlowCollection"),kr(Fo,"readBlockScalar"),kr(Ao,"readBlockSequence"),kr($o,"readBlockMapping"),kr(Eo,"readTagProperty"),kr(Do,"readAnchorProperty"),kr(Io,"readAlias"),kr(Oo,"composeNode"),kr(Po,"readDocument"),kr(Ro,"loadDocuments"),kr(qo,"loadAll$1"),kr(zo,"load$1");var Wo={loadAll:qo,load:zo},No=Object.prototype.toString,jo=Object.prototype.hasOwnProperty,Ho=65279,Uo={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Yo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Vo=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Go(t,e){var r,i,a,n,o,s,l;if(null===e)return{};for(r={},a=0,n=(i=Object.keys(e)).length;a<n;a+=1)o=i[a],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&jo.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function Zo(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new Ia("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+$a.repeat("0",i-e.length)+e}kr(Go,"compileStyleMap"),kr(Zo,"encodeHex");function Xo(t){this.schema=t.schema||Vn,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=$a.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Go(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Qo(t,e){for(var r,i=$a.repeat(" ",e),a=0,n=-1,o="",s=t.length;a<s;)-1===(n=t.indexOf("\n",a))?(r=t.slice(a),a=s):(r=t.slice(a,n+1),a=n+1),r.length&&"\n"!==r&&(o+=i),o+=r;return o}function Ko(t,e){return"\n"+$a.repeat(" ",t.indent*e)}function Jo(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function ts(t){return 32===t||9===t}function es(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==Ho||65536<=t&&t<=1114111}function rs(t){return es(t)&&t!==Ho&&13!==t&&10!==t}function is(t,e,r){var i=rs(t),a=i&&!ts(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!a)||rs(e)&&!ts(e)&&35===t||58===e&&a}function as(t){return es(t)&&t!==Ho&&!ts(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function ns(t){return!ts(t)&&58!==t}function os(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function ss(t){return/^\n* /.test(t)}kr(Xo,"State"),kr(Qo,"indentString"),kr(Ko,"generateNextLine"),kr(Jo,"testImplicitResolving"),kr(ts,"isWhitespace"),kr(es,"isPrintable"),kr(rs,"isNsCharOrWhitespace"),kr(is,"isPlainSafe"),kr(as,"isPlainSafeFirst"),kr(ns,"isPlainSafeLast"),kr(os,"codePointAt"),kr(ss,"needIndentIndicator");function ls(t,e,r,i,a,n,o,s){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=as(os(t,0))&&ns(os(t,t.length-1));if(e||o)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!es(h=os(t,l)))return 5;f=f&&is(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=os(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!es(h))return 5;f=f&&is(h,c,s),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&ss(t)?5:o?2===n?5:2:u?4:3:!f||o||a(t)?2===n?5:2:1}function hs(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Yo.indexOf(e)||Vo.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var n=t.indent*Math.max(1,r),o=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),s=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return Jo(t,e)}switch(kr(l,"testAmbiguity"),ls(e,s,t.indent,o,l,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+cs(e,t.indent)+ds(Qo(e,n));case 4:return">"+cs(e,t.indent)+ds(Qo(us(e,o),n));case 5:return'"'+gs(e)+'"';default:throw new Ia("impossible error: invalid scalar style")}}()}function cs(t,e){var r=ss(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function ds(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function us(t,e){for(var r,i,a,n=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,n.lastIndex=r,ps(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];a=n.exec(t);){var l=a[1],h=a[2];i=" "===h[0],o+=l+(s||i||""===h?"":"\n")+ps(h,e),s=i}return o}function ps(t,e){if(""===t||" "===t[0])return t;for(var r,i,a=/ [^ ]/g,n=0,o=0,s=0,l="";r=a.exec(t);)(s=r.index)-n>e&&(i=o>n?o:s,l+="\n"+t.slice(n,i),n=i+1),o=s;return l+="\n",t.length-n>e&&o>n?l+=t.slice(n,o)+"\n"+t.slice(o+1):l+=t.slice(n),l.slice(1)}function gs(t){for(var e,r="",i=0,a=0;a<t.length;i>=65536?a+=2:a++)i=os(t,a),!(e=Uo[i])&&es(i)?(r+=t[a],i>=65536&&(r+=t[a+1])):r+=e||Zo(i);return r}function fs(t,e,r){var i,a,n,o="",s=t.tag;for(i=0,a=r.length;i<a;i+=1)n=r[i],t.replacer&&(n=t.replacer.call(r,String(i),n)),(Cs(t,e,n,!1,!1)||void 0===n&&Cs(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function ys(t,e,r,i){var a,n,o,s="",l=t.tag;for(a=0,n=r.length;a<n;a+=1)o=r[a],t.replacer&&(o=t.replacer.call(r,String(a),o)),(Cs(t,e+1,o,!0,!0,!1,!0)||void 0===o&&Cs(t,e+1,null,!0,!0,!1,!0))&&(i&&""===s||(s+=Ko(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function ms(t,e,r){var i,a,n,o,s,l="",h=t.tag,c=Object.keys(r);for(i=0,a=c.length;i<a;i+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=r[n=c[i]],t.replacer&&(o=t.replacer.call(r,n,o)),Cs(t,e,n,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Cs(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function xs(t,e,r,i){var a,n,o,s,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new Ia("sortKeys must be a boolean or a function");for(a=0,n=u.length;a<n;a+=1)h="",i&&""===c||(h+=Ko(t,e)),s=r[o=u[a]],t.replacer&&(s=t.replacer.call(r,o,s)),Cs(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Ko(t,e)),Cs(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function bs(t,e,r){var i,a,n,o,s,l;for(n=0,o=(a=r?t.explicitTypes:t.implicitTypes).length;n<o;n+=1)if(((s=a[n]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===No.call(s.represent))i=s.represent(e,l);else{if(!jo.call(s.represent,l))throw new Ia("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function Cs(t,e,r,i,a,n,o){t.tag=null,t.dump=r,bs(t,r,!1)||bs(t,r,!0);var s,l=No.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(a=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(xs(t,e,t.dump,a),d&&(t.dump="&ref_"+c+t.dump)):(ms(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?ys(t,e-1,t.dump,a):ys(t,e,t.dump,a),d&&(t.dump="&ref_"+c+t.dump)):(fs(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new Ia("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&hs(t,t.dump,e,n,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function ks(t,e){var r,i,a=[],n=[];for(ws(t,a,n),r=0,i=n.length;r<i;r+=1)e.duplicates.push(a[n[r]]);e.usedDuplicates=new Array(i)}function ws(t,e,r){var i,a,n;if(null!==t&&"object"==typeof t)if(-1!==(a=e.indexOf(t)))-1===r.indexOf(a)&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)ws(t[a],e,r);else for(a=0,n=(i=Object.keys(t)).length;a<n;a+=1)ws(t[i[a]],e,r)}kr(ls,"chooseScalarStyle"),kr(hs,"writeScalar"),kr(cs,"blockHeader"),kr(ds,"dropEndingNewline"),kr(us,"foldString"),kr(ps,"foldLine"),kr(gs,"escapeString"),kr(fs,"writeFlowSequence"),kr(ys,"writeBlockSequence"),kr(ms,"writeFlowMapping"),kr(xs,"writeBlockMapping"),kr(bs,"detectType"),kr(Cs,"writeNode"),kr(ks,"getDuplicateReferences"),kr(ws,"inspectNode"),kr((function(t,e){var r=new Xo(e=e||{});r.noRefs||ks(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Cs(r,0,i,!0,!0)?r.dump+"\n":""}),"dump$1"),kr((function(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}),"renamed");var Ss=xn,Ts=Wo.load;
3
- /*! Bundled license information:
4
-
5
- js-yaml/dist/js-yaml.mjs:
6
- (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
7
- */
8
- const vs=Object.freeze({left:0,top:0,width:16,height:16}),Bs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),_s=Object.freeze({...vs,...Bs}),Ls=Object.freeze({..._s,body:"",hidden:!1}),Ms=Object.freeze({width:null,height:null}),Fs=Object.freeze({...Ms,...Bs}),As=/^[a-z0-9]+(-[a-z0-9]+)*$/,$s=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(As)||!(e&&""===t.prefix||t.prefix.match(As))||!t.name.match(As));function Es(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in Ls)i in Bs?i in t&&!(i in r)&&(r[i]=Bs[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function Ds(t,e,r){const i=t.icons,a=t.aliases||Object.create(null);let n={};function o(t){n=Es(i[t]||a[t],n)}return o(e),r.forEach(o),Es(t,n)}function Is(t,e){if(t.icons[e])return Ds(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach((function t(e){if(r[e])return a[e]=[];if(!(e in a)){a[e]=null;const r=i[e]&&i[e].parent,n=r&&t(r);n&&(a[e]=[r].concat(n))}return a[e]})),a}(t,[e])[e];return r?Ds(t,e,r):null}const Os=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ps=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Rs(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(Os);if(null===i||!i.length)return t;const a=[];let n=i.shift(),o=Ps.test(n);for(;;){if(o){const t=parseFloat(n);isNaN(t)?a.push(n):a.push(Math.ceil(t*e*r)/r)}else a.push(n);if(n=i.shift(),void 0===n)return a.join("");o=!o}}const qs=/\sid="(\S+)"/g,zs="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Ws=0;var Ns={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},js=new Map,Hs=new Map,Us=kr((t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Tr.debug("Registering icon pack:",e.name),"loader"in e)Hs.set(e.name,e.loader);else{if(!("icons"in e))throw Tr.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');js.set(e.name,e.icons)}}}),"registerIconPacks"),Ys=kr((async(t,e)=>{const r=((t,e,r,i="")=>{const a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const t=a.pop(),e=a.pop(),r={provider:a.length>0?a[0]:i,prefix:e,name:t};return $s(r)?r:null}const n=a[0],o=n.split("-");if(o.length>1){const t={provider:i,prefix:o.shift(),name:o.join("-")};return $s(t)?t:null}if(r&&""===i){const t={provider:i,prefix:"",name:n};return $s(t,r)?t:null}return null})(t,0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let a=js.get(i);if(!a){const t=Hs.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},js.set(i,a)}catch(o){throw Tr.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=Is(a,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n}),"getRegisteredIconData"),Vs=kr((async(t,e)=>{let r;try{r=await Ys(t,null==e?void 0:e.fallbackPrefix)}catch(a){Tr.error(a),r=Ns}const i=function(t,e){const r={..._s,...t},i={...Fs,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach((t=>{const e=[],r=t.hFlip,i=t.vFlip;let o,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),e.push("scale(-1 1)"),a.top=a.left=0):i&&(e.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),e.push("scale(1 -1)"),a.top=a.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=a.height/2+a.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:o=a.width/2+a.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(a.left!==a.top&&(o=a.left,a.left=a.top,a.top=o),a.width!==a.height&&(o=a.width,a.width=a.height,a.height=o)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const a=t.indexOf(">",i),n=t.indexOf("</"+e);if(-1===a||-1===n)break;const o=t.indexOf(">",n);if(-1===o)break;r+=t.slice(a+1,n).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return a=i.defs,n=e+i.content+r,a?"<defs>"+a+"</defs>"+n:n;var a,n}(n,'<g transform="'+e.join(" ")+'">',"</g>"))}));const o=i.width,s=i.height,l=a.width,h=a.height;let c,d;null===o?(d=null===s?"1em":"auto"===s?h:s,c=Rs(d,l/h)):(c="auto"===o?l:o,d=null===s?Rs(c,h/l):"auto"===s?h:s);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[a.left,a.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:n}}(r,e);return function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(function(t,e=zs){const r=[];let i;for(;i=qs.exec(t);)r.push(i[1]);if(!r.length)return t;const a="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((r=>{const i="function"==typeof e?e(r):e+(Ws++).toString(),n=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+i+a+"$3")})),t=t.replace(new RegExp(a,"g"),"")}(i.body),i.attributes)}),"getIconSVG"),Gs=kr((({flowchart:t})=>{var e,r;const i=(null==(e=null==t?void 0:t.subGraphTitleMargin)?void 0:e.top)??0,a=(null==(r=null==t?void 0:t.subGraphTitleMargin)?void 0:r.bottom)??0;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:i+a}}),"getSubGraphTitleMargins"),Zs={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Xs(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Qs(t),e=Qs(e);const[r,i]=[t.x,t.y],[a,n]=[e.x,e.y],o=a-r,s=n-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}kr(Xs,"calculateDeltaAndAngle");var Qs=kr((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),Ks=kr((t=>({x:kr((function(e,r,i){let a=0;if(0===r&&Object.hasOwn(Zs,t.arrowTypeStart)){const{angle:e,deltaX:r}=Xs(i[0],i[1]);a=Zs[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Zs,t.arrowTypeEnd)){const{angle:e,deltaX:r}=Xs(i[i.length-1],i[i.length-2]);a=Zs[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}return Qs(e).x+a}),"x"),y:kr((function(e,r,i){let a=0;if(0===r&&Object.hasOwn(Zs,t.arrowTypeStart)){const{angle:e,deltaY:r}=Xs(i[0],i[1]);a=Zs[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Zs,t.arrowTypeEnd)){const{angle:e,deltaY:r}=Xs(i[i.length-1],i[i.length-2]);a=Zs[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}return Qs(e).y+a}),"y")})),"getLineFunctionsWithOffset"),Js={},tl={};Object.defineProperty(tl,"__esModule",{value:!0}),tl.BLANK_URL=tl.relativeFirstCharacters=tl.whitespaceEscapeCharsRegex=tl.urlSchemeRegex=tl.ctrlCharactersRegex=tl.htmlCtrlEntityRegex=tl.htmlEntitiesRegex=tl.invalidProtocolRegex=void 0,tl.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,tl.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,tl.htmlCtrlEntityRegex=/&(newline|tab);/gi,tl.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,tl.urlSchemeRegex=/^.+(:|&colon;)/gim,tl.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,tl.relativeFirstCharacters=[".","/"],tl.BLANK_URL="about:blank",Object.defineProperty(Js,"__esModule",{value:!0});var el=Js.sanitizeUrl=void 0,rl=tl;function il(t){try{return decodeURIComponent(t)}catch(e){return t}}el=Js.sanitizeUrl=function(t){if(!t)return rl.BLANK_URL;var e,r,i=il(t.trim());do{e=(i=il(i=(r=i,r.replace(rl.ctrlCharactersRegex,"").replace(rl.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))).replace(rl.htmlCtrlEntityRegex,"").replace(rl.ctrlCharactersRegex,"").replace(rl.whitespaceEscapeCharsRegex,"").trim())).match(rl.ctrlCharactersRegex)||i.match(rl.htmlEntitiesRegex)||i.match(rl.htmlCtrlEntityRegex)||i.match(rl.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=i;if(!a)return rl.BLANK_URL;if(function(t){return rl.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var n=a.trimStart(),o=n.match(rl.urlSchemeRegex);if(!o)return a;var s=o[0].toLowerCase().trim();if(rl.invalidProtocolRegex.test(s))return rl.BLANK_URL;var l=n.replace(/\\/g,"/");if("mailto:"===s||s.includes("://"))return l;if("http:"===s||"https:"===s){if(!function(t){return URL.canParse(t)}(l))return rl.BLANK_URL;var h=new URL(l);return h.protocol=h.protocol.toLowerCase(),h.hostname=h.hostname.toLowerCase(),h.toString()}return l};var al="​",nl={curveBasis:Q,curveBasisClosed:K,curveBasisOpen:J,curveBumpX:function(t){return new Yt(t,!0)},curveBumpY:function(t){return new Yt(t,!1)},curveBundle:tt,curveCardinalClosed:et,curveCardinalOpen:rt,curveCardinal:it,curveCatmullRomClosed:at,curveCatmullRomOpen:nt,curveCatmullRom:ot,curveLinear:st,curveLinearClosed:lt,curveMonotoneX:ht,curveMonotoneY:ct,curveNatural:dt,curveStep:ut,curveStepAfter:pt,curveStepBefore:gt},ol=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sl=kr((function(t,e){const r=ll(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map((t=>t.args));ri(t),i=Pr(i,[...t])}else i=r.args;if(!i)return;let a=$r(t,e);const n="config";return void 0!==i[n]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[n],delete i[n]),i}),"detectInit"),ll=kr((function(t,e=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${ol.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(a,"").replace(/'/gm,'"'),Tr.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(n=Lr.exec(t));)if(n.index===Lr.lastIndex&&Lr.lastIndex++,n&&!e||e&&(null==(r=n[1])?void 0:r.match(e))||e&&(null==(i=n[2])?void 0:i.match(e))){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(a){return Tr.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),hl=kr((function(t){return t.replace(Lr,"")}),"removeDirectives"),cl=kr((function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1}),"isSubstringInArray");function dl(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return nl[r]??e}function ul(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?el(r):r}kr(dl,"interpolateToCurve"),kr(ul,"formatUrl");var pl=kr(((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n)return void Tr.error(`Function name: ${t} not found in window`);n[a](...e)}),"runFunc");function gl(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function fl(t){let e,r=0;t.forEach((t=>{r+=gl(t,e),e=t}));return xl(t,r/2)}function yl(t){return 1===t.length?t[0]:fl(t)}kr(gl,"distance"),kr(fl,"traverseEdge"),kr(yl,"calcLabelPosition");var ml=kr(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),xl=kr(((t,e)=>{let r,i=e;for(const a of t){if(r){const t=gl(a,r);if(t<i)i-=t;else{const e=i/t;if(e<=0)return r;if(e>=1)return{x:a.x,y:a.y};if(e>0&&e<1)return{x:ml((1-e)*r.x+e*a.x,5),y:ml((1-e)*r.y+e*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),bl=kr(((t,e,r)=>{Tr.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=xl(e,25),a=t?10:5,n=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(e[0].x+i.x)/2,o.y=-Math.cos(n)*a+(e[0].y+i.y)/2,o}),"calcCardinalityPosition");function Cl(t,e,r){const i=structuredClone(r);Tr.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=xl(i,25+t),n=10+.5*t,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),s={x:0,y:0};return"start_left"===e?(s.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,s.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):"end_right"===e?(s.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,s.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):"end_left"===e?(s.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,s.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(s.x=Math.sin(o)*n+(i[0].x+a.x)/2,s.y=-Math.cos(o)*n+(i[0].y+a.y)/2),s}function kl(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}kr(Cl,"calcTerminalLabelPosition"),kr(kl,"getStylesFromArray");var wl=0,Sl=kr((()=>(wl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+wl)),"generateId");function Tl(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}kr(Tl,"makeRandomHex");var vl=kr((t=>Tl(t.length)),"random"),Bl=kr((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"),_l=kr((function(t,e){const r=e.text.replace(Vi.lineBreakRegex," "),[,i]=Rl(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const n=a.append("tspan");return n.attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),a}),"drawSimpleText"),Ll=W(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Vi.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let n="";return i.forEach(((t,o)=>{const s=Al(`${t} `,r),l=Al(n,r);if(s>e){const{hyphenatedStrings:i,remainingWord:o}=Ml(t,e,"-",r);a.push(n,...i),n=o}else l+s>=e?(a.push(n),n=t):n=[n,t].filter(Boolean).join(" ");o+1===i.length&&a.push(n)})),a.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),Ml=W(((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...t],n=[];let o="";return a.forEach(((t,s)=>{const l=`${o}${t}`;if(Al(l,i)>=e){const t=s+1,e=a.length===t,i=`${l}${r}`;n.push(e?l:i),o=""}else o=l})),{hyphenatedStrings:n,remainingWord:o}}),((t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`));function Fl(t,e){return El(t,e).height}function Al(t,e){return El(t,e).width}kr(Fl,"calculateTextHeight"),kr(Al,"calculateTextWidth");var $l,El=W(((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,n]=Rl(r),o=["sans-serif",i],s=t.split(Vi.lineBreakRegex),l=[],h=X("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const d of o){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of s){const i=Bl();i.text=r||"​";const o=_l(c,i).style("font-size",n).style("font-weight",a).style("font-family",d),s=(o._groups||o)[0][0].getBBox();if(0===s.width&&0===s.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,s.width)),t=Math.round(s.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}l.push(e)}c.remove();return l[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]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),Dl=(kr(s=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}},"InitIDGenerator"),s),Il=kr((function(t){return $l=$l||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$l.innerHTML=t,unescape($l.textContent)}),"entityDecode");function Ol(t){return"str"in t}kr(Ol,"isDetailedError");var Pl=kr(((t,e,r,i)=>{var a;if(!i)return;const n=null==(a=t.node())?void 0:a.getBBox();n&&t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),Rl=kr((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function ql(t,e){return Ut({},t,e)}kr(ql,"cleanAndMerge");var zl={assignWithDepth:Pr,wrapLabel:Ll,calculateTextHeight:Fl,calculateTextWidth:Al,calculateTextDimensions:El,cleanAndMerge:ql,detectInit:sl,detectDirective:ll,isSubstringInArray:cl,interpolateToCurve:dl,calcLabelPosition:yl,calcCardinalityPosition:bl,calcTerminalLabelPosition:Cl,formatUrl:ul,getStylesFromArray:kl,generateId:Sl,random:vl,runFunc:pl,entityDecode:Il,insertTitle:Pl,parseFontSize:Rl,InitIDGenerator:Dl},Wl=kr((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),Nl=kr((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),jl=kr(((t,e,{counter:r=0,prefix:i,suffix:a})=>`${i?`${i}_`:""}${t}_${e}_${r}${a?`_${a}`:""}`),"getEdgeId");function Hl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ul={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Yl(t){Ul=t}const Vl=/[&<>"']/,Gl=new RegExp(Vl.source,"g"),Zl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Xl=new RegExp(Zl.source,"g"),Ql={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Kl=t=>Ql[t];function Jl(t,e){if(e){if(Vl.test(t))return t.replace(Gl,Kl)}else if(Zl.test(t))return t.replace(Xl,Kl);return t}const th=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const eh=/(^|[^\[])\^/g;function rh(t,e){let r="string"==typeof t?t:t.source;e=e||"";const i={replace:(t,e)=>{let a="string"==typeof e?e:e.source;return a=a.replace(eh,"$1"),r=r.replace(t,a),i},getRegex:()=>new RegExp(r,e)};return i}function ih(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const ah={exec:()=>null};function nh(t,e){const r=t.replace(/\|/g,((t,e,r)=>{let i=!1,a=e;for(;--a>=0&&"\\"===r[a];)i=!i;return i?"|":" |"})).split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function oh(t,e,r){const i=t.length;if(0===i)return"";let a=0;for(;a<i;){const n=t.charAt(i-a-1);if(n!==e||r){if(n===e||!r)break;a++}else a++}return t.slice(0,i-a)}function sh(t,e,r,i){const a=e.href,n=e.title?Jl(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){i.state.inLink=!0;const t={type:"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,t}return{type:"image",raw:r,href:a,title:n,text:Jl(o)}}class lh{constructor(t){f(this,"options"),f(this,"rules"),f(this,"lexer"),this.options=t||Ul}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:oh(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e){const r=t.match(/^(\s+)(?:```)/);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=oh(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:oh(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=oh(e[0],"\n").split("\n"),r="",i="";const a=[];for(;t.length>0;){let e=!1;const n=[];let o;for(o=0;o<t.length;o++)if(/^ {0,3}>/.test(t[o]))n.push(t[o]),e=!0;else{if(e)break;n.push(t[o])}t=t.slice(o);const s=n.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,a,!0),this.lexer.state.top=h,0===t.length)break;const c=a[a.length-1];if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){const e=c,n=e.raw+"\n"+t.join("\n"),o=this.blockquote(n);a[a.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,i=i.substring(0,i.length-e.text.length)+o.text;break}if("list"!==(null==c?void 0:c.type));else{const e=c,n=e.raw+"\n"+t.join("\n"),o=this.list(n);a[a.length-1]=o,r=r.substring(0,r.length-c.raw.length)+o.raw,i=i.substring(0,i.length-e.raw.length)+o.raw,t=n.substring(a[a.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const i=r.length>1,a={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const n=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;t;){let r=!1,i="",s="";if(!(e=n.exec(t)))break;if(this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(/[^ ]/),d=d>4?1:d,s=l.slice(d),d+=e[1].length),c&&/^ *$/.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){const e=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;t;){const o=t.split("\n",1)[0];if(h=o,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),a.test(h))break;if(n.test(h))break;if(e.test(h))break;if(r.test(t))break;if(h.search(/[^ ]/)>=d||!h.trim())s+="\n"+h.slice(d);else{if(c)break;if(l.search(/[^ ]/)>=4)break;if(a.test(l))break;if(n.test(l))break;if(r.test(l))break;s+="\n"+h}c||h.trim()||(c=!0),i+=o+"\n",t=t.substring(o.length+1),l=h.slice(d)}}a.loose||(o?a.loose=!0:/\n *\n *$/.test(i)&&(o=!0));let u,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s),p&&(u="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:s,tokens:[]}),a.raw+=i}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let t=0;t<a.items.length;t++)if(this.lexer.state.top=!1,a.items[t].tokens=this.lexer.blockTokens(a.items[t].text,[]),!a.loose){const e=a.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));a.loose=r}if(a.loose)for(let t=0;t<a.items.length;t++)a.items[t].loose=!0;return a}}html(t){const e=this.rules.block.html.exec(t);if(e){return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(/\s+/g," "),r=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const r=nh(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),a=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const t of i)/^ *-+: *$/.test(t)?n.align.push("right"):/^ *:-+: *$/.test(t)?n.align.push("center"):/^ *:-+ *$/.test(t)?n.align.push("left"):n.align.push(null);for(let t=0;t<r.length;t++)n.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:n.align[t]});for(const t of a)n.rows.push(nh(t,n.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]}))));return n}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:Jl(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;const e=oh(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(t)?r.slice(1):r.slice(1,-1)),sh(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return sh(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i)return;if(i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const r=[...i[0]].length-1;let a,n,o=r,s=0;const l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(i=l.exec(e));){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(n=[...a].length,i[3]||i[4]){o+=n;continue}if((i[5]||i[6])&&r%3&&!((r+n)%3)){s+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o+s);const e=[...i[0]][0].length,l=t.slice(0,r+i.index+e+n);if(Math.min(r,n)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=Jl(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=Jl(e[1]),r="mailto:"+t):(t=Jl(e[1]),r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var e;let r;if(r=this.rules.inline.url.exec(t)){let t,i;if("@"===r[2])t=Jl(r[0]),i="mailto:"+t;else{let a;do{a=r[0],r[0]=(null==(e=this.rules.inline._backpedal.exec(r[0]))?void 0:e[0])??""}while(a!==r[0]);t=Jl(r[0]),i="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:Jl(e[0]),{type:"text",raw:e[0],text:t}}}}const hh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ch=/(?:[*+-]|\d{1,9}[.)])/,dh=rh(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ch).replace(/blockCode/g,/ {4}/).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/).getRegex(),uh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ph=/(?!\s*\])(?:\\.|[^\[\]\\])+/,gh=rh(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",ph).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fh=rh(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ch).getRegex(),yh="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",mh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,xh=rh("^ {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",mh).replace("tag",yh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bh=rh(uh).replace("hr",hh).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",yh).getRegex(),Ch={blockquote:rh(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bh).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:gh,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:hh,html:xh,lheading:dh,list:fh,newline:/^(?: *(?:\n|$))+/,paragraph:bh,table:ah,text:/^[^\n]+/},kh=rh("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",yh).getRegex(),wh={...Ch,table:kh,paragraph:rh(uh).replace("hr",hh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kh).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",yh).getRegex()},Sh={...Ch,html:rh("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",mh).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:ah,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:rh(uh).replace("hr",hh).replace("heading"," *#{1,6} *[^\n]").replace("lheading",dh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Th=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,vh=/^( {2,}|\\)\n(?!\s*$)/,Bh="\\p{P}\\p{S}",_h=rh(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Bh).getRegex(),Lh=rh(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Bh).getRegex(),Mh=rh("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Bh).getRegex(),Fh=rh("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Bh).getRegex(),Ah=rh(/\\([punct])/,"gu").replace(/punct/g,Bh).getRegex(),$h=rh(/^<(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(),Eh=rh(mh).replace("(?:--\x3e|$)","--\x3e").getRegex(),Dh=rh("^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",Eh).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ih=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Oh=rh(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ih).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ph=rh(/^!?\[(label)\]\[(ref)\]/).replace("label",Ih).replace("ref",ph).getRegex(),Rh=rh(/^!?\[(ref)\](?:\[\])?/).replace("ref",ph).getRegex(),qh={_backpedal:ah,anyPunctuation:Ah,autolink:$h,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:vh,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ah,emStrongLDelim:Lh,emStrongRDelimAst:Mh,emStrongRDelimUnd:Fh,escape:Th,link:Oh,nolink:Rh,punctuation:_h,reflink:Ph,reflinkSearch:rh("reflink|nolink(?!\\()","g").replace("reflink",Ph).replace("nolink",Rh).getRegex(),tag:Dh,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ah},zh={...qh,link:rh(/^!?\[(label)\]\((.*?)\)/).replace("label",Ih).getRegex(),reflink:rh(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ih).getRegex()},Wh={...qh,escape:rh(Th).replace("])","~|])").getRegex(),url:rh(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Nh={...Wh,br:rh(vh).replace("{2,}","*").getRegex(),text:rh(Wh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},jh={normal:Ch,gfm:wh,pedantic:Sh},Hh={normal:qh,gfm:Wh,breaks:Nh,pedantic:zh};class Uh{constructor(t){f(this,"tokens"),f(this,"options"),f(this,"state"),f(this,"tokenizer"),f(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ul,this.options.tokenizer=this.options.tokenizer||new lh,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={block:jh.normal,inline:Hh.normal};this.options.pedantic?(e.block=jh.pedantic,e.inline=Hh.pedantic):this.options.gfm&&(e.block=jh.gfm,this.options.breaks?e.inline=Hh.breaks:e.inline=Hh.gfm),this.tokenizer.rules=e}static get rules(){return{block:jh,inline:Hh}}static lex(t,e){return new Uh(e).lex(t)}static lexInline(t,e){return new Uh(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){let i,a,n;for(t=this.options.pedantic?t.replace(/\t/g," ").replace(/^ +$/gm,""):t.replace(/^( *)(\t+)/gm,((t,e,r)=>e+" ".repeat(r.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))))if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),1===i.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(i);else if(i=this.tokenizer.code(t))t=t.substring(i.raw.length),a=e[e.length-1],!a||"paragraph"!==a.type&&"text"!==a.type?e.push(i):(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.list(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.html(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.def(t))t=t.substring(i.raw.length),a=e[e.length-1],!a||"paragraph"!==a.type&&"text"!==a.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(a.raw+="\n"+i.raw,a.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text);else if(i=this.tokenizer.table(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.lheading(t))t=t.substring(i.raw.length),e.push(i);else{if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startBlock.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n)))a=e[e.length-1],r&&"paragraph"===(null==a?void 0:a.type)?(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);else if(i=this.tokenizer.text(t))t=t.substring(i.raw.length),a=e[e.length-1],a&&"text"===a.type?(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,a,n,o,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,n.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.emStrong(t,l,s))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.autolink(t))t=t.substring(r.raw.length),e.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(t))){if(a=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startInline.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(a=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(a))t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),o=!0,i=e[e.length-1],i&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(r.raw.length),e.push(r);return e}}class Yh{constructor(t){f(this,"options"),f(this,"parser"),this.options=t||Ul}space(t){return""}code({text:t,lang:e,escaped:r}){var i;const a=null==(i=(e||"").match(/^\S*/))?void 0:i[0],n=t.replace(/\n$/,"")+"\n";return a?'<pre><code class="language-'+Jl(a)+'">'+(r?n:Jl(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:Jl(n,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let i="";for(let n=0;n<t.items.length;n++){const e=t.items[n];i+=this.listitem(e)}const a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+a+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let a=0;a<t.header.length;a++)r+=this.tablecell(t.header[a]);e+=this.tablerow({text:r});let i="";for(let a=0;a<t.rows.length;a++){const e=t.rows[a];r="";for(let t=0;t<e.length;t++)r+=this.tablecell(e[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}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>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){const i=this.parser.parseInline(r),a=ih(t);if(null===a)return i;let n='<a href="'+(t=a)+'"';return e&&(n+=' title="'+e+'"'),n+=">"+i+"</a>",n}image({href:t,title:e,text:r}){const i=ih(t);if(null===i)return r;let a=`<img src="${t=i}" alt="${r}"`;return e&&(a+=` title="${e}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class Vh{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""}}class Gh{constructor(t){f(this,"options"),f(this,"renderer"),f(this,"textRenderer"),this.options=t||Ul,this.options.renderer=this.options.renderer||new Yh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vh}static parse(t,e){return new Gh(e).parse(t)}static parseInline(t,e){return new Gh(e).parseInline(t)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const t=a,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const n=a;switch(n.type){case"space":r+=this.renderer.space(n);continue;case"hr":r+=this.renderer.hr(n);continue;case"heading":r+=this.renderer.heading(n);continue;case"code":r+=this.renderer.code(n);continue;case"table":r+=this.renderer.table(n);continue;case"blockquote":r+=this.renderer.blockquote(n);continue;case"list":r+=this.renderer.list(n);continue;case"html":r+=this.renderer.html(n);continue;case"paragraph":r+=this.renderer.paragraph(n);continue;case"text":{let a=n,o=this.renderer.text(a);for(;i+1<t.length&&"text"===t[i+1].type;)a=t[++i],o+="\n"+this.renderer.text(a);r+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o}]}):o;continue}default:{const t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const t=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=t||"";continue}}const n=a;switch(n.type){case"escape":case"text":r+=e.text(n);break;case"html":r+=e.html(n);break;case"link":r+=e.link(n);break;case"image":r+=e.image(n);break;case"strong":r+=e.strong(n);break;case"em":r+=e.em(n);break;case"codespan":r+=e.codespan(n);break;case"br":r+=e.br(n);break;case"del":r+=e.del(n);break;default:{const t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class Zh{constructor(t){f(this,"options"),this.options=t||Ul}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}f(Zh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));l=new WeakSet,h=function(t,e,r){switch(e){case"heading":return function(i){return i.type&&i.type===e?t.call(this,r.parser.parseInline(i.tokens),i.depth,r.parser.parseInline(i.tokens,r.parser.textRenderer).replace(th,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let i="",a="";for(let t=0;t<r.header.length;t++)a+=this.tablecell({text:r.header[t].text,tokens:r.header[t].tokens,header:!0,align:r.align[t]});i+=this.tablerow({text:a});let n="";for(let t=0;t<r.rows.length;t++){const e=r.rows[t];a="";for(let t=0;t<e.length;t++)a+=this.tablecell({text:e[t].text,tokens:e[t].tokens,header:!1,align:r.align[t]});n+=this.tablerow({text:a})}return t.call(this,i,n)};case"blockquote":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);const i=this.parser.parse(r.tokens);return t.call(this,i)};case"list":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);const i=r.ordered,a=r.start,n=r.loose;let o="";for(let t=0;t<r.items.length;t++){const e=r.items[t],i=e.checked,a=e.task;let s="";if(e.task){const t=this.checkbox({checked:!!i});n?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,n),o+=this.listitem({type:"list_item",raw:s,text:s,task:a,checked:!!i,loose:n,tokens:e.tokens})}return t.call(this,o,i,a)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t},c=function(t,e){return(r,i)=>{const a={...i},n={...this.defaults,...a};!0===this.defaults.async&&!1===a.async&&(n.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),n.async=!0);const o=y(this,l,d).call(this,!!n.silent,!!n.async);if(null==r)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n),n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then((e=>t(e,n))).then((t=>n.hooks?n.hooks.processAllTokens(t):t)).then((t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then((()=>t)):t)).then((t=>e(t,n))).then((t=>n.hooks?n.hooks.postprocess(t):t)).catch(o);try{n.hooks&&(r=n.hooks.preprocess(r));let i=t(r,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let a=e(i,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(s){return o(s)}}},d=function(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+Jl(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}};const Xh=new class{constructor(...t){var e,r,i;e=this,(r=l).has(e)?g("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,i),f(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),f(this,"options",this.setOptions),f(this,"parse",y(this,l,c).call(this,Uh.lex,Gh.parse)),f(this,"parseInline",y(this,l,c).call(this,Uh.lexInline,Gh.parseInline)),f(this,"Parser",Gh),f(this,"Renderer",Yh),f(this,"TextRenderer",Vh),f(this,"Lexer",Uh),f(this,"Tokenizer",lh),f(this,"Hooks",Zh),this.use(...t)}walkTokens(t,e){var r,i;let a=[];for(const n of t)switch(a=a.concat(e.call(this,n)),n.type){case"table":{const t=n;for(const r of t.header)a=a.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)a=a.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=n;a=a.concat(this.walkTokens(t.items,e));break}default:{const t=n;(null==(i=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:i[t.type])?this.defaults.extensions.childTokens[t.type].forEach((r=>{const i=t[r].flat(1/0);a=a.concat(this.walkTokens(i,e))})):t.tokens&&(a=a.concat(this.walkTokens(t.tokens,e)))}}return a}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new Yh(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const i=r;let a=t.renderer[i];t.useNewRenderer||(a=y(this,l,h).call(this,a,i,e));const n=e[i];e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new lh(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const i=r,a=t.tokenizer[i],n=e[i];e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new Zh;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if("options"===r)continue;const i=r,a=t.hooks[i],n=e[i];Zh.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async)return Promise.resolve(a.call(e,t)).then((t=>n.call(e,t)));const r=a.call(e,t);return n.call(e,r)}:e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Uh.lex(t,e??this.defaults)}parser(t,e){return Gh.parse(t,e??this.defaults)}};function Qh(t,e){return Xh.parse(t,e)}function Kh(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce((function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map((function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0}))):t}),[]);if(a.length){var n=new RegExp("\n[\t ]{"+Math.min.apply(Math,a)+"}","g");i=i.map((function(t){return t.replace(n,"\n")}))}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return e.forEach((function(t,e){var r=o.match(/(?:^|\n)( *)$/),a=r?r[1]:"",n=t;"string"==typeof t&&t.includes("\n")&&(n=String(t).split("\n").map((function(t,e){return 0===e?t:""+a+t})).join("\n")),o+=n+i[e+1]})),o}function Jh(t,{markdownAutoWrap:e}){const r=Kh(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"));return!1===e?r.replace(/ /g,"&nbsp;"):r}function tc(t,e={}){const r=Jh(t,e),i=Qh.lexer(r),a=[[]];let n=0;function o(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach(((t,r)=>{0!==r&&(n++,a.push([])),t.split(" ").forEach((t=>{t&&a[n].push({content:t,type:e})}))}))}else"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{o(e,t.type)})):"html"===t.type&&a[n].push({content:t.text,type:"normal"})}return kr(o,"processNode"),i.forEach((t=>{var e;"paragraph"===t.type?null==(e=t.tokens)||e.forEach((t=>{o(t)})):"html"===t.type&&a[n].push({content:t.text,type:"normal"})})),a}function ec(t,{markdownAutoWrap:e}={}){const r=Qh.lexer(t);function i(t){var r,a,n;return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${null==(r=t.tokens)?void 0:r.map(i).join("")}</strong>`:"em"===t.type?`<em>${null==(a=t.tokens)?void 0:a.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${null==(n=t.tokens)?void 0:n.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:`Unsupported markdown: ${t.type}`}return kr(i,"output"),r.map(i).join("")}function rc(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function ic(t,e){return ac(t,[],rc(e.content),e.type)}function ac(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[a,...n]=r,o=[...e,a];return t([{content:o.join(""),type:i}])?ac(t,o,n,i):(0===e.length&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function nc(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return oc(t,e)}function oc(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let a="";" "===t[0].content&&(a=" ",t.shift());const n=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==a&&o.push({content:a,type:"normal"}),o.push(n),e(o))return oc(t,e,r,o);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){const[i,a]=ic(e,n);r.push([i]),a.content&&t.unshift(a)}return oc(t,e,r)}function sc(t,e){e&&t.attr("style",e)}async function lc(t,e,r,i,a=!1){const n=t.append("foreignObject");n.attr("width",10*r+"px"),n.attr("height",10*r+"px");const o=n.append("xhtml:div");let s=e.label;e.label&&Hi(e.label)&&(s=await Yi(e.label.replace(Vi.lineBreakRegex,"\n"),ya()));const l=e.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(s),sc(h,e.labelStyle),h.attr("class",`${l} ${i}`),sc(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&o.attr("class","labelBkg");let c=o.node().getBoundingClientRect();return c.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),c=o.node().getBoundingClientRect()),n.node()}function hc(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function cc(t,e,r){const i=t.append("text"),a=hc(i,1,e);pc(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}function dc(t,e,r){var i;const a=t.append("text"),n=hc(a,1,e);pc(n,[{content:r,type:"normal"}]);const o=null==(i=n.node())?void 0:i.getBoundingClientRect();return o&&a.remove(),o}function uc(t,e,r,i=!1){const a=e.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let s=0;for(const l of r){const e=kr((e=>cc(a,1.1,e)<=t),"checkWidth"),r=e(l)?[l]:nc(l,e);for(const t of r){pc(hc(o,s,1.1),t),s++}}if(i){const t=o.node().getBBox(),e=2;return n.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return o.node()}function pc(t,e){t.text(""),e.forEach(((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)}))}function gc(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`))}Qh.options=Qh.setOptions=function(t){return Xh.setOptions(t),Qh.defaults=Xh.defaults,Yl(Qh.defaults),Qh},Qh.getDefaults=Hl,Qh.defaults=Ul,Qh.use=function(...t){return Xh.use(...t),Qh.defaults=Xh.defaults,Yl(Qh.defaults),Qh},Qh.walkTokens=function(t,e){return Xh.walkTokens(t,e)},Qh.parseInline=Xh.parseInline,Qh.Parser=Gh,Qh.parser=Gh.parse,Qh.Renderer=Yh,Qh.TextRenderer=Vh,Qh.Lexer=Uh,Qh.lexer=Uh.lex,Qh.Tokenizer=lh,Qh.Hooks=Zh,Qh.parse=Qh,Qh.options,Qh.setOptions,Qh.use,Qh.walkTokens,Qh.parseInline,Gh.parse,Uh.lex,kr(Jh,"preprocessMarkdown"),kr(tc,"markdownToLines"),kr(ec,"markdownToHTML"),kr(rc,"splitTextToChars"),kr(ic,"splitWordToFitWidth"),kr(ac,"splitWordToFitWidthRecursion"),kr(nc,"splitLineToFitWidth"),kr(oc,"splitLineToFitWidthRecursion"),kr(sc,"applyStyle"),kr(lc,"addHtmlSpan"),kr(hc,"createTspan"),kr(cc,"computeWidthOfText"),kr(dc,"computeDimensionOfText"),kr(uc,"createFormattedText"),kr(pc,"updateTextContentAndStyles"),kr(gc,"replaceIconSubstring");var fc=kr((async(t,e="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},h)=>{if(Tr.debug("XYZ createText",e,r,i,a,n,o,"addSvgBackground: ",l),n){const i=ec(e,h),n=gc(Nl(i)),c=e.replace(/\\\\/g,"\\"),d={isNode:o,label:Hi(e)?c:n,labelStyle:r.replace("fill:","color:")};return await lc(t,d,s,a,l)}{const i=uc(s,t,tc(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),h),!!e&&l);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");X(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");X(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");X(i).select("text").attr("style",e)}return i}}),"createText");function yc(t,e,r){if(t&&t.length){const[i,a]=e,n=Math.PI/180*r,o=Math.cos(n),s=Math.sin(n);for(const e of t){const[t,r]=e;e[0]=(t-i)*o-(r-a)*s+i,e[1]=(t-i)*s+(r-a)*o+a}}}function mc(t,e){return t[0]===e[0]&&t[1]===e[1]}function xc(t,e){var r;const i=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(n=a),function(t,e,r,i=1){const a=r,n=Math.max(e,.1),o=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,s=[0,0];if(a)for(const h of o)yc(h,s,a);const l=function(t,e,r){const i=[];for(const h of t){const t=[...h];mc(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const a=[];e=Math.max(e,.1);const n=[];for(const h of i)for(let t=0;t<h.length-1;t++){const e=h[t],r=h[t+1];if(e[1]!==r[1]){const t=Math.min(e[1],r[1]);n.push({ymin:t,ymax:Math.max(e[1],r[1]),x:t===e[1]?e[0]:r[0],islope:(r[0]-e[0])/(r[1]-e[1])})}}if(n.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!n.length)return a;let o=[],s=n[0].ymin,l=0;for(;o.length||n.length;){if(n.length){let t=-1;for(let e=0;e<n.length&&!(n[e].ymin>s);e++)t=e;n.splice(0,t+1).forEach((t=>{o.push({s:s,edge:t})}))}if(o=o.filter((t=>!(t.edge.ymax<=s))),o.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==r||l%e==0)&&o.length>1)for(let t=0;t<o.length;t+=2){const e=t+1;if(e>=o.length)break;const r=o[t].edge,i=o[e].edge;a.push([[Math.round(r.x),s],[Math.round(i.x),s]])}s+=r,o.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),l++}return a}(o,n,i);if(a){for(const t of o)yc(t,s,-a);!function(t,e,r){const i=[];t.forEach((t=>i.push(...t))),yc(i,e,r)}(l,s,-a)}return l}(t,a,i,n||1)}class bc{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=xc(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function Cc(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class kc extends bc{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=xc(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,n=[],o=.5*r*Math.cos(a),s=.5*r*Math.sin(a);for(const[l,h]of i)Cc([l,h])&&n.push([[l[0]-o,l[1]+s],[...h]],[[l[0]+o,l[1]-s],[...h]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class wc extends bc{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),a=this._fillPolygons(t,i);return r.ops=r.ops.concat(a.ops),r}}class Sc{constructor(t){this.helper=t}fillPolygons(t,e){const r=xc(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let a=e.fillWeight;a<0&&(a=e.strokeWidth/2);const n=i/4;for(const o of t){const t=Cc(o),s=t/i,l=Math.ceil(s)-1,h=t-l*i,c=(o[0][0]+o[1][0])/2-i/4,d=Math.min(o[0][1],o[1][1]);for(let o=0;o<l;o++){const t=d+h+o*i,s=c-n+2*Math.random()*n,l=t-n+2*Math.random()*n,u=this.helper.ellipse(s,l,a,a,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class Tc{constructor(t){this.helper=t}fillPolygons(t,e){const r=xc(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,a=[];return t.forEach((t=>{const n=Cc(t),o=Math.floor(n/(r+i)),s=(n+i-o*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<o;d++){const t=d*(r+i),n=t+r,o=[l[0]+t*Math.cos(c)+s*Math.cos(c),l[1]+t*Math.sin(c)+s*Math.sin(c)],h=[l[0]+n*Math.cos(c)+s*Math.cos(c),l[1]+n*Math.sin(c)+s*Math.sin(c)];a.push(...this.helper.doubleLineOps(o[0],o[1],h[0],h[1],e))}})),a}}class vc{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,a=xc(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach((t=>{const a=Cc(t),n=Math.round(a/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const l=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let h=0;h<n;h++){const t=2*h*e,a=2*(h+1)*e,n=Math.sqrt(2*Math.pow(e,2)),s=[o[0]+t*Math.cos(l),o[1]+t*Math.sin(l)],c=[o[0]+a*Math.cos(l),o[1]+a*Math.sin(l)],d=[s[0]+n*Math.cos(l+Math.PI/4),s[1]+n*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(s[0],s[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}})),i}}const Bc={};class _c{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Lc={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 Mc(t,e){return t.type===e}function Fc(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",a=0,n=r[a];for(;!Mc(n,2);){let o=0;const s=[];if("BOD"===i){if("M"!==n.text&&"m"!==n.text)return Fc("M0,0"+t);a++,o=Lc[n.text],i=n.text}else Mc(n,1)?o=Lc[i]:(a++,o=Lc[n.text],i=n.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let t=a;t<a+o;t++){const e=r[t];if(!Mc(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof Lc[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),a+=o,n=r[a],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function Ac(t){let e=0,r=0,i=0,a=0;const n=[];for(const{key:o,data:s}of t)switch(o){case"M":n.push({key:"M",data:[...s]}),[e,r]=s,[i,a]=s;break;case"m":e+=s[0],r+=s[1],n.push({key:"M",data:[e,r]}),i=e,a=r;break;case"L":n.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=a}return n}function $c(t){const e=[];let r="",i=0,a=0,n=0,o=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,a]=c,[n,o]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],a=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,a]});break;case"V":a=c[0],e.push({key:"L",data:[i,a]});break;case"S":{let t=0,n=0;"C"===r||"S"===r?(t=i+(i-s),n=a+(a-l)):(t=i,n=a),e.push({key:"C",data:[t,n,...c]}),s=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[t,n]=c;let o=0,h=0;"Q"===r||"T"===r?(o=i+(i-s),h=a+(a-l)):(o=i,h=a);const d=i+2*(o-i)/3,u=a+2*(h-a)/3,p=t+2*(o-t)/3,g=n+2*(h-n)/3;e.push({key:"C",data:[d,u,p,g,t,n]}),s=o,l=h,i=t,a=n;break}case"Q":{const[t,r,n,o]=c,h=i+2*(t-i)/3,d=a+2*(r-a)/3,u=n+2*(t-n)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[h,d,u,p,n,o]}),s=t,l=r,i=n,a=o;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),n=c[2],o=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,a,l,h,l,h]}),i=l,a=h):i===l&&a===h||(Dc(i,a,l,h,t,r,n,o,s).forEach((function(t){e.push({key:"C",data:t})})),i=l,a=h);break}case"Z":e.push({key:"Z",data:[]}),i=n,a=o}r=h}return e}function Ec(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Dc(t,e,r,i,a,n,o,s,l,h){const c=(d=o,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=Ec(t,e,-c),[r,i]=Ec(r,i,-c);const o=(t-r)/2,h=(e-i)/2;let d=o*o/(a*a)+h*h/(n*n);d>1&&(d=Math.sqrt(d),a*=d,n*=d);const u=a*a,m=n*n,x=u*m-u*h*h-m*o*o,b=u*h*h+m*o*o,C=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));f=C*a*h/n+(t+r)/2,y=C*-n*o/a+(e+i)/2,p=Math.asin(parseFloat(((e-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,s=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=Dc(r=f+a*Math.cos(g),i=y+n*Math.sin(g),e,s,a,n,o,0,l,[g,t,f,y])}m=g-p;const x=Math.cos(p),b=Math.sin(p),C=Math.cos(g),k=Math.sin(g),w=Math.tan(m/4),S=4/3*a*w,T=4/3*n*w,v=[t,e],B=[t+S*b,e-T*x],_=[r+S*k,i-T*C],L=[r,i];if(B[0]=2*v[0]-B[0],B[1]=2*v[1]-B[1],h)return[B,_,L].concat(u);{u=[B,_,L].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=Ec(u[e][0],u[e][1],c),i=Ec(u[e+1][0],u[e+1][1],c),a=Ec(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],a[0],a[1]])}return t}}const Ic={randOffset:function(t,e){return Gc(t,e)},randOffsetWithRange:function(t,e,r){return Vc(t,e,r)},ellipse:function(t,e,r,i,a){return zc(t,e,a,qc(r,i,a)).opset},doubleLineOps:function(t,e,r,i,a){return Zc(t,e,r,i,a,!0)}};function Oc(t,e,r,i,a){return{type:"path",ops:Zc(t,e,r,i,a)}}function Pc(t,e,r){const i=(t||[]).length;if(i>2){const a=[];for(let e=0;e<i-1;e++)a.push(...Zc(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&a.push(...Zc(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:a}}return 2===i?Oc(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Rc(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=Qc(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Qc(r[0],1.5*(1+.22*e.roughness),Uc(e));for(let t=1;t<r.length;t++){const n=r[t];if(n.length){const t=Qc(n,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:Qc(n,1.5*(1+.22*e.roughness),Uc(e));for(const e of t)"move"!==e.op&&i.push(e);for(const e of r)"move"!==e.op&&a.push(e)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function qc(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return o+=Gc(o*l,r),s+=Gc(s*l,r),{increment:n,rx:o,ry:s}}function zc(t,e,r,i){const[a,n]=Jc(i.increment,t,e,i.rx,i.ry,1,i.increment*Vc(.1,Vc(.4,1,r),r),r);let o=Kc(a,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[a]=Jc(i.increment,t,e,i.rx,i.ry,1.5,0,r),n=Kc(a,null,r);o=o.concat(n)}return{estimatedPoints:n,opset:{type:"path",ops:o}}}function Wc(t,e,r,i,a,n,o,s,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=Gc(.01*d,l),u+=Gc(.01*u,l);let p=a,g=n;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=td(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=td(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return o&&(s?m.push(...Zc(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...Zc(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function Nc(t,e){const r=$c(Ac(Fc(t))),i=[];let a=[0,0],n=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":n=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...Zc(n[0],n[1],s[0],s[1],e)),n=[s[0],s[1]];break;case"C":{const[t,r,a,o,l,h]=s;i.push(...ed(t,r,a,o,l,h,n,e)),n=[l,h];break}case"Z":i.push(...Zc(n[0],n[1],a[0],a[1],e)),n=[a[0],a[1]]}return{type:"path",ops:i}}function jc(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Gc(t,e),i[0][1]+Gc(t,e)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Gc(t,e),i[n][1]+Gc(t,e)]})}}return{type:"fillPath",ops:r}}function Hc(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!Bc[r])switch(r){case"zigzag":Bc[r]||(Bc[r]=new kc(e));break;case"cross-hatch":Bc[r]||(Bc[r]=new wc(e));break;case"dots":Bc[r]||(Bc[r]=new Sc(e));break;case"dashed":Bc[r]||(Bc[r]=new Tc(e));break;case"zigzag-line":Bc[r]||(Bc[r]=new vc(e));break;default:r="hachure",Bc[r]||(Bc[r]=new bc(e))}return Bc[r]}(e,Ic).fillPolygons(t,e)}function Uc(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Yc(t){return t.randomizer||(t.randomizer=new _c(t.seed||0)),t.randomizer.next()}function Vc(t,e,r,i=1){return r.roughness*i*(Yc(r)*(e-t)+t)}function Gc(t,e,r=1){return Vc(-t,t,e,r)}function Zc(t,e,r,i,a,n=!1){const o=n?a.disableMultiStrokeFill:a.disableMultiStroke,s=Xc(t,e,r,i,a,!0,!1);if(o)return s;const l=Xc(t,e,r,i,a,!0,!0);return s.concat(l)}function Xc(t,e,r,i,a,n,o){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*Yc(a);let p=a.bowing*a.maxRandomnessOffset*(i-e)/200,g=a.bowing*a.maxRandomnessOffset*(t-r)/200;p=Gc(p,a,h),g=Gc(g,a,h);const f=[],y=()=>Gc(d,a,h),m=()=>Gc(c,a,h),x=a.preserveVertices;return o?f.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):f.push({op:"move",data:[t+(x?0:Gc(c,a,h)),e+(x?0:Gc(c,a,h))]}),o?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(x?0:y()),i+(x?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(x?0:m()),i+(x?0:m())]}),f}function Qc(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+Gc(e,r),t[0][1]+Gc(e,r)]),i.push([t[0][0]+Gc(e,r),t[0][1]+Gc(e,r)]);for(let a=1;a<t.length;a++)i.push([t[a][0]+Gc(e,r),t[a][1]+Gc(e,r)]),a===t.length-1&&i.push([t[a][0]+Gc(e,r),t[a][1]+Gc(e,r)]);return Kc(i,null,r)}function Kc(t,e,r){const i=t.length,a=[];if(i>3){const e=[],n=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let r=1;r+2<i;r++){const i=t[r];e[0]=[i[0],i[1]],e[1]=[i[0]+(n*t[r+1][0]-n*t[r-1][0])/6,i[1]+(n*t[r+1][1]-n*t[r-1][1])/6],e[2]=[t[r+1][0]+(n*t[r][0]-n*t[r+2][0])/6,t[r+1][1]+(n*t[r][1]-n*t[r+2][1])/6],e[3]=[t[r+1][0],t[r+1][1]],a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[3][0],e[3][1]]})}}else 3===i?(a.push({op:"move",data:[t[1][0],t[1][1]]}),a.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&a.push(...Xc(t[0][0],t[0][1],t[1][0],t[1][1],r,0,!0));return a}function Jc(t,e,r,i,a,n,o,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+a*Math.sin(-t)]);for(let n=0;n<=2*Math.PI;n+=t){const t=[e+i*Math.cos(n),r+a*Math.sin(n)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+a*Math.sin(0)]),h.push([e+i*Math.cos(t),r+a*Math.sin(t)])}else{const c=Gc(.5,s)-Math.PI/2;h.push([Gc(n,s)+e+.9*i*Math.cos(c-t),Gc(n,s)+r+.9*a*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let o=c;o<d;o+=t){const t=[Gc(n,s)+e+i*Math.cos(o),Gc(n,s)+r+a*Math.sin(o)];l.push(t),h.push(t)}h.push([Gc(n,s)+e+i*Math.cos(c+2*Math.PI+.5*o),Gc(n,s)+r+a*Math.sin(c+2*Math.PI+.5*o)]),h.push([Gc(n,s)+e+.98*i*Math.cos(c+o),Gc(n,s)+r+.98*a*Math.sin(c+o)]),h.push([Gc(n,s)+e+.9*i*Math.cos(c+.5*o),Gc(n,s)+r+.9*a*Math.sin(c+.5*o)])}return[h,l]}function td(t,e,r,i,a,n,o,s,l){const h=n+Gc(.1,l),c=[];c.push([Gc(s,l)+e+.9*i*Math.cos(h-t),Gc(s,l)+r+.9*a*Math.sin(h-t)]);for(let d=h;d<=o;d+=t)c.push([Gc(s,l)+e+i*Math.cos(d),Gc(s,l)+r+a*Math.sin(d)]);return c.push([e+i*Math.cos(o),r+a*Math.sin(o)]),c.push([e+i*Math.cos(o),r+a*Math.sin(o)]),Kc(c,0,l)}function ed(t,e,r,i,a,n,o,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const d=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(u?0:Gc(h[0],s)),o[1]+(u?0:Gc(h[0],s))]}),c=u?[a,n]:[a+Gc(h[p],s),n+Gc(h[p],s)],l.push({op:"bcurveTo",data:[t+Gc(h[p],s),e+Gc(h[p],s),r+Gc(h[p],s),i+Gc(h[p],s),c[0],c[1]]});return l}function rd(t){return[...t]}function id(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(rd(t[0]),rd(t[1]),rd(t[2]),rd(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const a=[],n=1-e;i.push(rd(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];a[0]=[e[0],e[1]],a[1]=[e[0]+(n*r[t+1][0]-n*r[t-1][0])/6,e[1]+(n*r[t+1][1]-n*r[t-1][1])/6],a[2]=[r[t+1][0]+(n*r[t][0]-n*r[t+2][0])/6,r[t+1][1]+(n*r[t][1]-n*r[t+2][1])/6],a[3]=[r[t+1][0],r[t+1][1]],i.push(a[1],a[2],a[3])}}return i}function ad(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function nd(t,e,r){const i=ad(e,r);if(0===i)return ad(t,e);let a=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return a=Math.max(0,Math.min(1,a)),ad(t,od(e,r,a))}function od(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function sd(t,e,r,i){const a=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],a=t[e+2],n=t[e+3];let o=3*i[0]-2*r[0]-n[0];o*=o;let s=3*i[1]-2*r[1]-n[1];s*=s;let l=3*a[0]-2*n[0]-r[0];l*=l;let h=3*a[1]-2*n[1]-r[1];return h*=h,o<l&&(o=l),s<h&&(s=h),o+s}(t,e)<r){const r=t[e+0];a.length?(n=a[a.length-1],o=r,Math.sqrt(ad(n,o))>1&&a.push(r)):a.push(r),a.push(t[e+3])}else{const i=.5,n=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],h=od(n,o,i),c=od(o,s,i),d=od(s,l,i),u=od(h,c,i),p=od(c,d,i),g=od(u,p,i);sd([n,h,u,g],0,r,a),sd([g,p,d,l],0,r,a)}var n,o;return a}function ld(t,e){return hd(t,0,t.length,e)}function hd(t,e,r,i,a){const n=a||[],o=t[e],s=t[r-1];let l=0,h=1;for(let c=e+1;c<r-1;++c){const e=nd(t[c],o,s);e>l&&(l=e,h=c)}return Math.sqrt(l)>i?(hd(t,e,h+1,i,n),hd(t,h,r,i,n)):(n.length||n.push(o),n.push(s)),n}function cd(t,e=.15,r){const i=[],a=(t.length-1)/3;for(let n=0;n<a;n++)sd(t,3*n,e,i);return r&&r>0?hd(i,0,i.length,r):i}const dd="none";class ud{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,a){const n=this._o(a);return this._d("line",[Oc(t,e,r,i,n)],n)}rectangle(t,e,r,i,a){const n=this._o(a),o=[],s=function(t,e,r,i,a){return Pc([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],!0,a)}(t,e,r,i,n);if(n.fill){const a=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===n.fillStyle?o.push(jc([a],n)):o.push(Hc([a],n))}return n.stroke!==dd&&o.push(s),this._d("rectangle",o,n)}ellipse(t,e,r,i,a){const n=this._o(a),o=[],s=qc(r,i,n),l=zc(t,e,n,s);if(n.fill)if("solid"===n.fillStyle){const r=zc(t,e,n,s).opset;r.type="fillPath",o.push(r)}else o.push(Hc([l.estimatedPoints],n));return n.stroke!==dd&&o.push(l.opset),this._d("ellipse",o,n)}circle(t,e,r,i){const a=this.ellipse(t,e,r,r,i);return a.shape="circle",a}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[Pc(t,!1,r)],r)}arc(t,e,r,i,a,n,o=!1,s){const l=this._o(s),h=[],c=Wc(t,e,r,i,a,n,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=Wc(t,e,r,i,a,n,!0,!1,o);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,a,n,o){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=Gc(.01*h,o),c+=Gc(.01*c,o);let d=a,u=n;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/o.curveStepCount,g=[];for(let f=d;f<=u;f+=p)g.push([s+h*Math.cos(f),l+c*Math.sin(f)]);return g.push([s+h*Math.cos(u),l+c*Math.sin(u)]),g.push([s,l]),Hc([g],o)}(t,e,r,i,a,n,l));return l.stroke!==dd&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],a=Rc(t,r);if(r.fill&&r.fill!==dd)if("solid"===r.fillStyle){const e=Rc(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],a=t;if(a.length){const t="number"==typeof a[0][0]?[a]:a;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...cd(id([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...cd(id(i),10,(1+r.roughness)/2))}e.length&&i.push(Hc([e],r))}return r.stroke!==dd&&i.push(a),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],a=Pc(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(jc([t],r)):i.push(Hc([t],r))),r.stroke!==dd&&i.push(a),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=r.fill&&"transparent"!==r.fill&&r.fill!==dd,n=r.stroke!==dd,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=$c(Ac(Fc(t))),a=[];let n=[],o=[0,0],s=[];const l=()=>{s.length>=4&&n.push(...cd(s,1)),s=[]},h=()=>{l(),n.length&&(a.push(n),n=[])};for(const{key:d,data:u}of i)switch(d){case"M":h(),o=[u[0],u[1]],n.push(o);break;case"L":l(),n.push([u[0],u[1]]);break;case"C":if(!s.length){const t=n.length?n[n.length-1]:o;s.push([t[0],t[1]])}s.push([u[0],u[1]]),s.push([u[2],u[3]]),s.push([u[4],u[5]]);break;case"Z":l(),n.push([o[0],o[1]])}if(h(),!r)return a;const c=[];for(const d of a){const t=ld(d,r);t.length&&c.push(t)}return c}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=Nc(t,r);if(a)if("solid"===r.fillStyle)if(1===s.length){const e=Nc(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(jc(s,r));else i.push(Hc(s,r));return n&&(o?s.forEach((t=>{i.push(Pc(t,!1,r))})):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map((t=>+t.toFixed(e))):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const a of e){let t=null;switch(a.type){case"path":t={d:this.opsToPath(a),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:dd};break;case"fillPath":t={d:this.opsToPath(a),stroke:dd,strokeWidth:0,fill:r.fill||dd};break;case"fillSketch":t=this.fillSketch(a,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||dd,strokeWidth:r,fill:dd}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}const pd="http://www.w3.org/2000/svg";class gd{constructor(t,e){this.svg=t,this.gen=new ud(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(pd,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=i.createElementNS(pd,"path"),e.setAttribute("d",this.opsToPath(o,n)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(pd,"path"),e.setAttribute("d",this.opsToPath(o,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,o,r)}e&&a.appendChild(e)}return a}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const a=t.createElementNS(pd,"path");return a.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),a.setAttribute("stroke",r.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),r.fillLineDash&&a.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,a){const n=this.gen.line(t,e,r,i,a);return this.draw(n)}rectangle(t,e,r,i,a){const n=this.gen.rectangle(t,e,r,i,a);return this.draw(n)}ellipse(t,e,r,i,a){const n=this.gen.ellipse(t,e,r,i,a);return this.draw(n)}circle(t,e,r,i){const a=this.gen.circle(t,e,r,i);return this.draw(a)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,a,n,o=!1,s){const l=this.gen.arc(t,e,r,i,a,n,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var fd=(t,e)=>new gd(t,e),yd=kr(((t,e)=>{var r,i,a=t.x,n=t.y,o=e.x-a,s=e.y-n,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(o)*h?(s<0&&(h=-h),r=0===s?0:h*o/s,i=h):(o<0&&(l=-l),r=l,i=0===o?0:l*s/o),{x:a+r,y:n+i}}),"intersectRect");function md(t,e){e&&t.attr("style",e)}async function xd(t){const e=X(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let i=t.label;t.label&&Hi(t.label)&&(i=await Yi(t.label.replace(Vi.lineBreakRegex,"\n"),ya()));const a=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+a+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),md(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}kr(md,"applyStyle"),kr(xd,"addHtmlLabel");var bd=kr((async(t,e,r,i)=>{let a=t||"";if("object"==typeof a&&(a=a[0]),Ii(ya().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),Tr.info("vertexText"+a);const t={isNode:i,label:Nl(a).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),labelStyle:e?e.replace("fill:","color:"):e};return await xd(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof a?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}}),"createLabel"),Cd=kr(((t,e,r,i,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+i-a,"A",a,a,0,0,1,t+r-a,e+i,"H",t+a,"A",a,a,0,0,1,t,e+i-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" ")),"createRoundedRectPathD"),kd=kr((t=>{const{handDrawnSeed:e}=ya();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),wd=kr((t=>{const e=Sd([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),Sd=kr((t=>{const e=new Map;return t.forEach((t=>{const[r,i]=t.split(":");e.set(r.trim(),null==i?void 0:i.trim())})),e}),"styles2Map"),Td=kr((t=>{const{stylesArray:e}=wd(t),r=[],i=[],a=[],n=[];return e.forEach((t=>{const e=t[0];"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"===e?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&a.push(t.join(":")+" !important"),"fill"===e&&n.push(t.join(":")+" !important"))})),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:n}}),"styles2String"),vd=kr(((t,e)=>{var r;const{themeVariables:i,handDrawnSeed:a}=ya(),{nodeBorder:n,mainBkg:o}=i,{stylesMap:s}=wd(t);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:a,strokeWidth:(null==(r=s.get("stroke-width"))?void 0:r.replace("px",""))||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),Bd=kr((async(t,e)=>{Tr.info("Creating subgraph rect for ",e.id,e);const r=ya(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Td(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),u=Ii(r.flowchart.htmlLabels),p=d.insert("g").attr("class","cluster-label "),g=await fc(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0});let f=g.getBBox();if(Ii(r.flowchart.htmlLabels)){const t=g.children[0],e=X(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,x=e.x-y/2,b=e.y-m/2;let C;if(Tr.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=fd(d),r=vd(e,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),i=t.path(Cd(x,b,y,m,0),r);C=d.insert((()=>(Tr.debug("Rough node insert CXC",i),i)),":first-child"),C.select("path:nth-child(2)").attr("style",h.join(";")),C.select("path").attr("style",c.join(";").replace("fill","stroke"))}else C=d.insert("rect",":first-child"),C.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:k}=Gs(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+k})`),s){const t=p.select("span");t&&t.attr("style",s)}const w=C.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return yd(e,t)},{cluster:d,labelBBox:f}}),"rect"),_d=kr(((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),a=0*e.padding,n=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return yd(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),Ld={rect:Bd,squareRect:Bd,roundedWithTitle:kr((async(t,e)=>{const r=ya(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let u=h.append("rect");const p=d.node().appendChild(await bd(e.label,e.labelStyle,void 0,!0));let g=p.getBBox();if(Ii(r.flowchart.htmlLabels)){const t=p.children[0],e=X(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,y=f/2,m=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height+f,b=e.height+f-g.height-6,C=e.x-m/2,k=e.y-x/2;e.width=m;const w=e.y-e.height/2-y+g.height+2;let S;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=fd(h),i=e.rx||e.ry?r.path(Cd(C,k,m,x,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:a}):r.rectangle(C,k,m,x,{seed:a});S=h.insert((()=>i),":first-child");const c=r.rectangle(C,w,m,b,{fill:t?n:o,fillStyle:t?"hachure":"solid",stroke:l,seed:a});S=h.insert((()=>i),":first-child"),u=h.insert((()=>c))}else{S=c.insert("rect",":first-child");const t="outer";S.attr("class",t).attr("x",C).attr("y",k).attr("width",m).attr("height",x).attr("data-look",e.look),u.attr("class","inner").attr("x",C).attr("y",w).attr("width",m).attr("height",b)}d.attr("transform",`translate(${e.x-g.width/2}, ${k+1-(Ii(r.flowchart.htmlLabels)?0:3)})`);const T=S.node().getBBox();return e.height=T.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return yd(e,t)},{cluster:h,labelBBox:g}}),"roundedWithTitle"),noteGroup:_d,divider:kr(((t,e)=>{const r=ya(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),s=o.insert("g",":first-child"),l=0*e.padding,h=e.width+l;e.diff=-e.padding;const c=e.height+l,d=e.x-h/2,u=e.y-c/2;let p;if(e.width=h,"handDrawn"===e.look){const t=fd(o).rectangle(d,u,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});p=o.insert((()=>t),":first-child")}else{p=s.insert("rect",":first-child");const t="divider";p.attr("class",t).attr("x",d).attr("y",u).attr("width",h).attr("height",c).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return yd(e,t)},{cluster:o,labelBBox:{}}}),"divider")},Md=new Map,Fd=kr((async(t,e)=>{const r=e.shape||"rect",i=await Ld[r](t,e);return Md.set(e.id,i),i}),"insertCluster"),Ad=kr((()=>{Md=new Map}),"clear"),$d=kr(((t,e,r,i,a)=>{e.arrowTypeStart&&Dd(t,"start",e.arrowTypeStart,r,i,a),e.arrowTypeEnd&&Dd(t,"end",e.arrowTypeEnd,r,i,a)}),"addEdgeMarkers"),Ed={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Dd=kr(((t,e,r,i,a,n)=>{const o=Ed[r];if(!o)return void Tr.warn(`Unknown arrow type: ${r}`);const s="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${i}#${a}_${n}-${o}${s})`)}),"addEdgeMarker"),Id=new Map,Od=new Map,Pd=kr((()=>{Id.clear(),Od.clear()}),"clear"),Rd=kr((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),qd=kr((async(t,e)=>{let r=Ii(ya().flowchart.htmlLabels);const i=await fc(t,e.label,{style:Rd(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});Tr.info("abc82",e,e.labelType);const a=t.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label");n.node().appendChild(i);let o,s=i.getBBox();if(r){const t=i.children[0],e=X(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}if(n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Id.set(e.id,a),e.width=s.width,e.height=s.height,e.startLabelLeft){const r=await bd(e.startLabelLeft,Rd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Od.get(e.id)||Od.set(e.id,{}),Od.get(e.id).startLeft=i,zd(o,e.startLabelLeft)}if(e.startLabelRight){const r=await bd(e.startLabelRight,Rd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=i.node().appendChild(r),a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Od.get(e.id)||Od.set(e.id,{}),Od.get(e.id).startRight=i,zd(o,e.startLabelRight)}if(e.endLabelLeft){const r=await bd(e.endLabelLeft,Rd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),Od.get(e.id)||Od.set(e.id,{}),Od.get(e.id).endLeft=i,zd(o,e.endLabelLeft)}if(e.endLabelRight){const r=await bd(e.endLabelRight,Rd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),Od.get(e.id)||Od.set(e.id,{}),Od.get(e.id).endRight=i,zd(o,e.endLabelRight)}return i}),"insertEdgeLabel");function zd(t,e){ya().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}kr(zd,"setTerminalWidth");var Wd=kr(((t,e)=>{Tr.debug("Moving label abc88 ",t.id,t.label,Id.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=ya(),{subGraphTitleTotalMargin:a}=Gs(i);if(t.label){const i=Id.get(t.id);let n=t.x,o=t.y;if(r){const i=zl.calcLabelPosition(r);Tr.debug("Moving label "+t.label+" from (",n,",",o,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,o=i.y)}i.attr("transform",`translate(${n}, ${o+a/2})`)}if(t.startLabelLeft){const e=Od.get(t.id).startLeft;let i=t.x,a=t.y;if(r){const e=zl.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.startLabelRight){const e=Od.get(t.id).startRight;let i=t.x,a=t.y;if(r){const e=zl.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelLeft){const e=Od.get(t.id).endLeft;let i=t.x,a=t.y;if(r){const e=zl.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelRight){const e=Od.get(t.id).endRight;let i=t.x,a=t.y;if(r){const e=zl.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}}),"positionEdgeLabel"),Nd=kr(((t,e)=>{const r=t.x,i=t.y,a=Math.abs(e.x-r),n=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return a>=o||n>=s}),"outsideNode"),jd=kr(((t,e,r)=>{Tr.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,a=t.y,n=Math.abs(i-r.x),o=t.width/2;let s=r.x<e.x?o-n:o+n;const l=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*o>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-a:a-l-e.y;s=c*t/h;const i={x:r.x<e.x?r.x+s:r.x-c+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===c&&(i.x=e.x),0===h&&(i.y=e.y),Tr.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${c}, r ${s}`,i),i}{s=r.x<e.x?e.x-o-i:i-o-e.x;let t=h*s/c,a=r.x<e.x?r.x+c-s:r.x-c+s,n=r.y<e.y?r.y+t:r.y-t;return Tr.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${s}`,{_x:a,_y:n}),0===s&&(a=e.x,n=e.y),0===c&&(a=e.x),0===h&&(n=e.y),{x:a,y:n}}}),"intersection"),Hd=kr(((t,e)=>{Tr.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],a=!1;return t.forEach((t=>{if(Tr.info("abc88 checking point",t,e),Nd(e,t)||a)Tr.warn("abc88 outside",t,i),i=t,a||r.push(t);else{const n=jd(e,i,t);Tr.debug("abc88 inside",t,i,n),Tr.debug("abc88 intersection",n,e);let o=!1;r.forEach((t=>{o=o||t.x===n.x&&t.y===n.y})),r.some((t=>t.x===n.x&&t.y===n.y))?Tr.warn("abc88 no intersect",n,r):r.push(n),a=!0}})),Tr.debug("returning points",r),r}),"cutPathAtIntersect");function Ud(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const a=t[i-1],n=t[i],o=t[i+1];(a.x===n.x&&n.y===o.y&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===o.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}kr(Ud,"extractCornerPoints");var Yd=kr((function(t,e,r){const i=e.x-t.x,a=e.y-t.y,n=r/Math.sqrt(i*i+a*a);return{x:e.x-n*i,y:e.y-n*a}}),"findAdjacentPoint"),Vd=kr((function(t){const{cornerPointPositions:e}=Ud(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],a=t[i+1],n=t[i],o=Yd(e,n,5),s=Yd(a,n,5),l=s.x-o.x,h=s.y-o.y;r.push(o);const c=2*Math.sqrt(2);let d={x:n.x,y:n.y};if(Math.abs(a.x-e.x)>10&&Math.abs(a.y-e.y)>=10){Tr.debug("Corner point fixing",Math.abs(a.x-e.x),Math.abs(a.y-e.y));const t=5;d=n.x===o.x?{x:l<0?o.x-t+c:o.x+t-c,y:h<0?o.y-c:o.y+c}:{x:l<0?o.x-c:o.x+c,y:h<0?o.y-t+c:o.y+t-c}}else Tr.debug("Corner point skipping fixing",Math.abs(a.x-e.x),Math.abs(a.y-e.y));r.push(d,s)}else r.push(t[i]);return r}),"fixCorners"),Gd=kr((function(t,e,r,i,a,n,o){const{handDrawnSeed:s}=ya();let l=e.points,h=!1;const c=a;var d=n;d.intersect&&c.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(c.intersect(l[0])),Tr.debug("Last point APA12",e.start,"--\x3e",e.end,l[l.length-1],d,d.intersect(l[l.length-1])),l.push(d.intersect(l[l.length-1]))),e.toCluster&&(Tr.info("to cluster abc88",r.get(e.toCluster)),l=Hd(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(Tr.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=Hd(l.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let u=l.filter((t=>!Number.isNaN(t.y)));u=Vd(u);let p=u[u.length-1];if(u.length>1){p=u[u.length-1];const t=u[u.length-2],e=(p.x-t.x)/2,r=(p.y-t.y)/2,i={x:t.x+e,y:t.y+r};u.splice(-1,0,i)}let g=Q;e.curve&&(g=e.curve);const{x:f,y:y}=Ks(e),m=ft().x(f).y(y).curve(g);let x,b;switch(e.thickness){case"normal":default:x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible"}switch(e.pattern){case"solid":default:x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}let C=m(u);const k=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const r=fd(t);Object.assign([],u);const i=r.path(C,{roughness:.3,seed:s});x+=" transition",b=X(i).select("path").attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let a=b.attr("d");b.attr("d",a),t.node().appendChild(b.node())}else b=t.append("path").attr("d",C).attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let w="";(ya().flowchart.arrowMarkerAbsolute||ya().state.arrowMarkerAbsolute)&&(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,w=w.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Tr.info("arrowTypeStart",e.arrowTypeStart),Tr.info("arrowTypeEnd",e.arrowTypeEnd),$d(b,e,w,o,i);let S={};return h&&(S.updatedPath=l),S.originalPath=e.points,S}),"insertEdge"),Zd=kr(((t,e,r,i)=>{e.forEach((e=>{Xd[e](t,r,i)}))}),"insertMarkers"),Xd={extension:kr(((t,e,r)=>{Tr.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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")}),"extension"),composition:kr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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")}),"composition"),aggregation:kr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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")}),"aggregation"),dependency:kr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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")}),"dependency"),lollipop:kr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:kr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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")}),"point"),circle:kr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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")}),"circle"),cross:kr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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")}),"cross"),barb:kr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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")},Qd=Zd,Kd=kr((async(t,e,r)=>{let i;const a=e.useHtmlLabels||Ii(ya().flowchart.htmlLabels);i=r||"node default";const n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=n.insert("g").attr("class","label").attr("style",e.labelStyle);let s,l;s=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],l=await fc(o,Li(Nl(s),ya()),{useHtmlLabels:a,width:e.width||ya().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let h=l.getBBox();const c=e.padding/2;if(Ii(ya().flowchart.htmlLabels)){const t=l.children[0],e=X(l),r=t.getElementsByTagName("img");if(r){const t=""===s.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=ya().fontSize?ya().fontSize:window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}kr(i,"setupImage"),setTimeout((()=>{e.complete&&i()})),e.addEventListener("error",i),e.addEventListener("load",i)})))))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return a?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:h,halfPadding:c,label:o}}),"labelHelper"),Jd=kr(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),tu=kr(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function eu(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function ru(t,e,r,i,a,n){const o=[],s=r-t,l=i-e,h=s/n,c=2*Math.PI/h,d=e+l/2;for(let u=0;u<=50;u++){const e=t+u/50*s,r=d+a*Math.sin(c*(e-t));o.push({x:e,y:r})}return o}function iu(t,e,r,i,a,n){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}function au(t,e){return t.intersect(e)}kr(eu,"createPathFromPoints"),kr(ru,"generateFullSineWavePoints"),kr(iu,"generateCirclePoints"),kr(au,"intersectNode");var nu=au;function ou(t,e,r,i){var a=t.x,n=t.y,o=a-i.x,s=n-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),h=Math.abs(e*r*o/l);i.x<a&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<n&&(c=-c),{x:a+h,y:n+c}}kr(ou,"intersectEllipse");var su=ou;function lu(t,e,r){return su(t,e,e,r)}kr(lu,"intersectCircle");var hu=lu;function cu(t,e,r,i){var a,n,o,s,l,h,c,d,u,p,g,f,y;if(a=e.y-t.y,o=t.x-e.x,l=e.x*t.y-t.x*e.y,u=a*r.x+o*r.y+l,p=a*i.x+o*i.y+l,!(0!==u&&0!==p&&du(u,p)||(n=i.y-r.y,s=r.x-i.x,h=i.x*r.y-r.x*i.y,c=n*t.x+s*t.y+h,d=n*e.x+s*e.y+h,0!==c&&0!==d&&du(c,d)||0==(g=a*s-n*o))))return f=Math.abs(g/2),{x:(y=o*h-s*l)<0?(y-f)/g:(y+f)/g,y:(y=n*l-a*h)<0?(y-f)/g:(y+f)/g}}function du(t,e){return t*e>0}kr(cu,"intersectLine"),kr(du,"sameSign");var uu=cu;function pu(t,e,r){let i=t.x,a=t.y,n=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,h=a-t.height/2-s;for(let c=0;c<e.length;c++){let i=e[c],a=e[c<e.length-1?c+1:0],o=uu(t,r,{x:l+i.x,y:h+i.y},{x:l+a.x,y:h+a.y});o&&n.push(o)}return n.length?(n.length>1&&n.sort((function(t,e){let i=t.x-r.x,a=t.y-r.y,n=Math.sqrt(i*i+a*a),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return n<l?-1:n===l?0:1})),n[0]):t}kr(pu,"intersectPolygon");var gu={node:nu,circle:hu,ellipse:su,polygon:pu,rect:yd},fu=kr((async(t,e,r)=>{const{labelStyles:i,nodeStyles:a}=Td(e);e.labelStyle=i;const{shapeSvg:n,bbox:o}=await Kd(t,e,tu(e)),s=Math.max(o.width+2*r.labelPaddingX,(null==e?void 0:e.width)||0),l=Math.max(o.height+2*r.labelPaddingY,(null==e?void 0:e.height)||0),h=-s/2,c=-l/2;let d,{rx:u,ry:p}=e;const{cssStyles:g}=e;if((null==r?void 0:r.rx)&&r.ry&&(u=r.rx,p=r.ry),"handDrawn"===e.look){const t=fd(n),r=vd(e,{}),i=u||p?t.path(Cd(h,c,s,l,u||0),r):t.rectangle(h,c,s,l,r);d=n.insert((()=>i),":first-child"),d.attr("class","basic label-container").attr("style",g)}else d=n.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",u).attr("ry",p).attr("x",h).attr("y",c).attr("width",s).attr("height",l);return Jd(e,d),e.intersect=function(t){return gu.rect(e,t)},n}),"drawRect"),yu=kr((async(t,e)=>fu(t,e,{rx:5,ry:5,classes:"flowchart-node"})),"state"),mu=kr((async(t,e)=>{const r={rx:5,ry:5,classes:"",labelPaddingX:1*((null==e?void 0:e.padding)||0),labelPaddingY:1*((null==e?void 0:e.padding)||0)};return fu(t,e,r)}),"roundedRect"),xu=kr((async(t,e)=>{const r={rx:0,ry:0,classes:"",labelPaddingX:2*((null==e?void 0:e.padding)||0),labelPaddingY:1*((null==e?void 0:e.padding)||0)};return fu(t,e,r)}),"squareRect"),bu=kr(((t,e,{config:{themeVariables:r}})=>{const{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n;if("handDrawn"===e.look){const t=fd(a).circle(0,0,14,kd(i));n=a.insert((()=>t))}else n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Jd(e,n),e.intersect=function(t){return gu.circle(e,7,t)},a}),"stateStart"),Cu=kr(((t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Td(e);e.labelStyle=i;const{cssStyles:n}=e,{lineColor:o,stateBorder:s,nodeBorder:l}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),c=fd(h),d=vd(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=c.circle(0,0,14,{...d,stroke:o,strokeWidth:2}),p=s??l,g=c.circle(0,0,5,{...d,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),f=h.insert((()=>u),":first-child");return f.insert((()=>g)),n&&f.selectAll("path").attr("style",n),a&&f.selectAll("path").attr("style",a),Jd(e,f),e.intersect=function(t){return gu.circle(e,7,t)},h}),"stateEnd"),ku=kr(((t,e,{dir:r,config:{state:i,themeVariables:a}})=>{const{nodeStyles:n}=Td(e);e.label="";const o=t.insert("g").attr("class",tu(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,(null==e?void 0:e.width)??0),h=Math.max(10,(null==e?void 0:e.height)??0);"LR"===r&&(l=Math.max(10,(null==e?void 0:e.width)??0),h=Math.max(70,(null==e?void 0:e.height)??0));const c=-1*l/2,d=-1*h/2,u=fd(o),p=vd(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(c,d,l,h,p),f=o.insert((()=>g),":first-child");s&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),Jd(e,f);const y=(null==i?void 0:i.padding)??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(t){return gu.rect(e,t)},o}),"forkJoin"),wu=kr(((t,e)=>{const{nodeStyles:r}=Td(e);e.label="";const i=t.insert("g").attr("class",tu(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,n=Math.max(28,e.width??0),o=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],s=fd(i),l=vd(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=eu(o),c=s.path(h,l),d=i.insert((()=>c),":first-child");return a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return gu.polygon(e,o,t)},i}),"choice"),Su=kr((async(t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Td(e);e.labelStyle=i;const{shapeSvg:n,bbox:o}=await Kd(t,e,tu(e)),s=Math.max(o.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(o.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e;e.useHtmlLabels||(e.centerLabel=!0);const u=fd(n),p=vd(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(h,c,s,l,p),f=n.insert((()=>g),":first-child");return f.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",d),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),Jd(e,f),e.intersect=function(t){return gu.rect(e,t)},n}),"note"),Tu=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=n.height+e.padding,s=n.width+o/4+e.padding;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=Cd(-s/2,-o/2,s,o,o/2),n=t.path(i,r);l=a.insert((()=>n),":first-child"),l.attr("class","basic label-container").attr("style",h)}else l=a.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return Jd(e,l),e.intersect=function(t){return gu.rect(e,t)},a}),"stadium"),vu=kr((async(t,e)=>{var r,i;const{labelStyles:a,nodeStyles:n}=Td(e);let o;e.labelStyle=a,o=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",o).attr("id",e.domId||e.id),l=s.insert("g"),h=s.insert("g").attr("class","label").attr("style",n),c=e.description,d=e.label,u=h.node().appendChild(await bd(d,e.labelStyle,!0,!0));let p={width:0,height:0};if(Ii(null==(i=null==(r=ya())?void 0:r.flowchart)?void 0:i.htmlLabels)){const t=u.children[0],e=X(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}Tr.info("Text 2",c);const g=c||[],f=u.getBBox(),y=h.node().appendChild(await bd(g.join?g.join("<br/>"):g,e.labelStyle,!0,!0)),m=y.children[0],x=X(y);p=m.getBoundingClientRect(),x.attr("width",p.width),x.attr("height",p.height);const b=(e.padding||0)/2;X(y).attr("transform","translate( "+(p.width>f.width?0:(f.width-p.width)/2)+", "+(f.height+b+5)+")"),X(u).attr("transform","translate( "+(p.width<f.width?0:-(f.width-p.width)/2)+", 0)"),p=h.node().getBBox(),h.attr("transform","translate("+-p.width/2+", "+(-p.height/2-b+3)+")");const C=p.width+(e.padding||0),k=p.height+(e.padding||0),w=-p.width/2-b,S=-p.height/2-b;let T,v;if("handDrawn"===e.look){const t=fd(s),r=vd(e,{}),i=t.path(Cd(w,S,C,k,e.rx||0),r),a=t.line(-p.width/2-b,-p.height/2-b+f.height+b,p.width/2+b,-p.height/2-b+f.height+b,r);v=s.insert((()=>(Tr.debug("Rough node insert CXC",i),a)),":first-child"),T=s.insert((()=>(Tr.debug("Rough node insert CXC",i),i)),":first-child")}else T=l.insert("rect",":first-child"),v=l.insert("line"),T.attr("class","outer title-state").attr("style",n).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),v.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+f.height+b).attr("y2",-p.height/2-b+f.height+b);return Jd(e,T),e.intersect=function(t){return gu.rect(e,t)},s}),"rectWithTitle");function Bu(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}kr(Bu,"insertPolygonShape");var _u=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=((null==e?void 0:e.padding)||0)/2,s=n.width+e.padding,l=n.height+e.padding,h=-n.width/2-o,c=-n.height/2-o,d=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=t.rectangle(h-8,c,s+16,l,r),n=t.line(h,c,h,c+l,r),o=t.line(h+s,c,h+s,c+l,r);a.insert((()=>n),":first-child"),a.insert((()=>o),":first-child");const d=a.insert((()=>i),":first-child"),{cssStyles:u}=e;d.attr("class","basic label-container").attr("style",u),Jd(e,d)}else{const t=Bu(a,s,l,d);i&&t.attr("style",i),Jd(e,t)}return e.intersect=function(t){return gu.polygon(e,d,t)},a}),"subroutine"),Lu=kr(((t,e,r,i,a,n)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createCylinderPathD"),Mu=kr(((t,e,r,i,a,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createOuterCylinderPathD"),Fu=kr(((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),Au=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+e.padding,e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(n.height+h+e.padding,e.height??0);let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=fd(a),r=Mu(0,0,s,c,l,h),i=Fu(0,h,s,c,l,h),n=t.path(r,vd(e,{})),o=t.path(i,vd(e,{fill:"none"}));d=a.insert((()=>o),":first-child"),d=a.insert((()=>n),":first-child"),d.attr("class","basic label-container"),u&&d.attr("style",u)}else{const t=Lu(0,0,s,c,l,h);d=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",u).attr("style",i)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),Jd(e,d),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(e.padding??0)/1.5-(n.y-(n.top??0))})`),e.intersect=function(t){const r=gu.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let a=h*h*(1-i*i/(l*l));a>0&&(a=Math.sqrt(a)),a=h-a,t.y-(e.y??0)>0&&(a=-a),r.y+=a}return r},a}),"cylinder"),$u=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o}=await Kd(t,e,tu(e)),s=n.width/2+o;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=t.circle(0,0,2*s,r);l=a.insert((()=>i),":first-child"),l.attr("class","basic label-container").attr("style",h)}else l=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return Jd(e,l),e.intersect=function(t){return Tr.info("Circle intersect",e,s,t),gu.circle(e,s,t)},a}),"circle"),Eu=kr((async(t,e)=>{var r,i;const{labelStyles:a,nodeStyles:n}=Td(e);e.labelStyle=a;const{shapeSvg:o,bbox:s,halfPadding:l}=await Kd(t,e,tu(e)),h=s.width/2+l+5,c=s.width/2+l;let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=fd(o),a=vd(e,{roughness:.2,strokeWidth:2.5}),n=vd(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*h,a),l=t.circle(0,0,2*c,n);d=o.insert("g",":first-child"),d.attr("class",e.cssClasses).attr("style",u),null==(r=d.node())||r.appendChild(s),null==(i=d.node())||i.appendChild(l)}else{d=o.insert("g",":first-child");const t=d.insert("circle",":first-child"),e=d.insert("circle");d.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return Jd(e,d),e.intersect=function(t){return Tr.info("DoubleCircle intersect",e,h,t),gu.circle(e,h,t)},o}),"doublecircle"),Du=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=-Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0)/2,l=-Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0)/2,h=l/2,c=[{x:s+h,y:l},{x:s,y:0},{x:s+h,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:d}=e,u=fd(a),p=vd(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=eu(c),f=u.path(g,p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${-h/2},0)`),o.attr("transform",`translate(${-h/2-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Jd(e,y),e.intersect=function(t){return gu.polygon(e,c,t)},a}),"rect_left_inv_arrow"),Iu=kr(((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createDecisionBoxPathD"),Ou=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=n.width+e.padding+(n.height+e.padding),s=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=Iu(0,0,o),n=t.path(i,r);l=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${o/2})`),h&&l.attr("style",h)}else l=Bu(a,o,o,s);return i&&l.attr("style",i),Jd(e,l),e.intersect=function(t){return Tr.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",gu.polygon(e,s,t)),gu.polygon(e,s,t)},a}),"question"),Pu=kr(((t,e,r,i,a)=>[`M${t+a},${e}`,`L${t+r-a},${e}`,`L${t+r},${e-i/2}`,`L${t+r-a},${e-i}`,`L${t+a},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" ")),"createHexagonPathD"),Ru=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=n.height+e.padding,s=o/4,l=n.width+2*s+e.padding,h=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-o/2},{x:l-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=Pu(0,0,l,o,s),n=t.path(i,r);c=a.insert((()=>n),":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),d&&c.attr("style",d)}else c=Bu(a,l,o,h);return i&&c.attr("style",i),e.width=l,e.height=o,Jd(e,c),e.intersect=function(t){return gu.polygon(e,h,t)},a}),"hexagon");async function qu(t,e){const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(n.width+e.padding,(null==e?void 0:e.width)||0),s=Math.max(n.height+e.padding,(null==e?void 0:e.height)||0),l=-o/2,h=-s/2,c=a.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",s),Jd(e,c),e.intersect=function(t){return gu.rect(e,t)},a}async function zu(t,e){const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=n.height+e.padding,s=n.width+e.padding+12,l=-o,h=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=eu(h),n=t.path(i,r);c=a.insert((()=>n),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),d&&c.attr("style",d)}else c=Bu(a,s,o,h);return i&&c.attr("style",i),Jd(e,c),e.intersect=function(t){return gu.polygon(e,h,t)},a}kr(qu,"text"),kr(zu,"card");var Wu=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=(null==e?void 0:e.padding)??0,l=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),h=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),c=-n.width/2-s,d=-n.height/2-s,{cssStyles:u}=e,p=fd(a),g=vd(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:c,y:d},{x:c+l+8,y:d},{x:c+l+8,y:d+h},{x:c-8,y:d+h},{x:c-8,y:d},{x:c,y:d},{x:c,y:d+h}],y=p.polygon(f.map((t=>[t.x,t.y])),g),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container").attr("style",u),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(e.padding??0)-(n.x-(n.left??0))},${-h/2+(e.padding??0)-(n.y-(n.top??0))})`),Jd(e,m),e.intersect=function(t){return gu.rect(e,t)},a}),"shadedProcess"),Nu=kr(((t,e)=>{const{labelStyles:r}=Td(e);e.labelStyle=r;const i=tu(e);let a=i;i||(a="anchor");const n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:o}=e,s=fd(n),l=vd(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(l.roughness=0);const h=s.circle(0,0,2,l),c=n.insert((()=>h),":first-child");return c.attr("class","anchor").attr("style",o),Jd(e,c),e.intersect=function(t){return Tr.info("Circle intersect",e,1,t),gu.circle(e,1,t)},n}),"anchor"),ju=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=eu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=Bu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Jd(e,h),e.intersect=function(t){return gu.polygon(e,l,t)},a}),"lean_right"),Hu=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=eu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=Bu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Jd(e,h),e.intersect=function(t){return gu.polygon(e,l,t)},a}),"lean_left"),Uu=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=n.width+e.padding,s=n.height+e.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=eu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=Bu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Jd(e,h),e.intersect=function(t){return gu.polygon(e,l,t)},a}),"trapezoid"),Yu=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=fd(a),r=vd(e,{}),i=eu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=Bu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Jd(e,h),e.intersect=function(t){return gu.polygon(e,l,t)},a}),"inv_trapezoid"),Vu=kr((async(t,e)=>{const{shapeSvg:r,bbox:i,label:a}=await Kd(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),Jd(e,n),e.intersect=function(t){return gu.rect(e,t)},r}),"labelRect"),Gu=kr((async(t,e)=>{var r;const{labelStyles:i,nodeStyles:a}=Td(e);e.labelStyle=i;const{shapeSvg:n,bbox:o,label:s}=await Kd(t,e,tu(e)),l=Ii(null==(r=ya().flowchart)?void 0:r.htmlLabels),h=o.width+(e.padding??0),c=h+o.height,d=h+o.height,u=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-c}],{cssStyles:p}=e,g=fd(n),f=vd(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=eu(u),m=g.path(y,f),x=n.insert((()=>m),":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return p&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",p),a&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",a),e.width=h,e.height=c,Jd(e,x),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${c/2-(o.height+(e.padding??0)/(l?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return Tr.info("Triangle intersect",e,u,t),gu.polygon(e,u,t)},n}),"triangle"),Zu=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(80,n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(50,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=s/2,{cssStyles:h}=e,c=fd(a),d=vd(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=[{x:-o/2,y:-s/2},{x:o/2-l,y:-s/2},...iu(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},{x:-o/2,y:s/2}],p=eu(u),g=c.path(p,d),f=a.insert((()=>g),":first-child");return f.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),Jd(e,f),e.intersect=function(t){Tr.info("Pill intersect",e,{radius:l,point:t});return gu.polygon(e,u,t)},a}),"halfRoundedRectangle"),Xu=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(80,1.25*(n.width+2*(e.padding??0)),(null==e?void 0:e.width)??0),s=Math.max(20,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=s/2,{cssStyles:h}=e,c=fd(a),d=vd(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=o-l,p=s/4,g=[{x:u,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:u,y:s},...iu(-u,-s/2,l,50,270,90)],f=eu(g),y=c.path(f,d),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-o/2}, ${-s/2})`),Jd(e,m),e.intersect=function(t){return gu.polygon(e,g,t)},a}),"curvedTrapezoid"),Qu=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=fd(a),p=vd(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:h,y:c},{x:h,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-l/2}],f=eu(g),y=u.path(f,p),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))}, ${-l/4+(e.padding??0)-(n.y-(n.top??0))})`),Jd(e,m),e.intersect=function(t){return gu.polygon(e,g,t)},a}),"slopedRect");function Ku(t,e,r,i,a,n,o){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/a,d=(i-e)/2/n,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=s+p*n*Math.sin(h)*(o?-1:1),f=l-p*a*Math.cos(h)*(o?-1:1),y=Math.atan2((e-f)/n,(t-g)/a);let m=Math.atan2((i-f)/n,(r-g)/a)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const t=y+b/19*m,e=g+a*Math.cos(t),r=f+n*Math.sin(t);x.push({x:e,y:r})}return x}kr(Ku,"generateArcPoints");var Ju=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=n.width+e.padding+20,s=n.height+e.padding,l=s/2,h=l/(2.5+s/50),{cssStyles:c}=e,d=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Ku(-o/2,-s/2,-o/2,s/2,h,l,!1),{x:o/2,y:s/2},...Ku(o/2,s/2,o/2,-s/2,h,l,!0)],u=fd(a),p=vd(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=eu(d),f=u.path(g,p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${h/2}, 0)`),Jd(e,y),e.intersect=function(t){return gu.polygon(e,d,t)},a}),"bowTieRect"),tp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=n.width+e.padding,l=n.height+e.padding,h=.2*l,c=-s/2,d=-l/2-h/2,{cssStyles:u}=e,p=fd(a),g=vd(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:c,y:d+h},{x:-c,y:d+h},{x:-c,y:-d},{x:c,y:-d},{x:c,y:d},{x:-c,y:d},{x:-c,y:d+h}],y=p.polygon(f.map((t=>[t.x,t.y])),g),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${c+(e.padding??0)/2-(n.x-(n.left??0))}, ${d+h+(e.padding??0)/2-(n.y-(n.top??0))})`),Jd(e,m),e.intersect=function(t){return gu.rect(e,t)},a}),"dividedRectangle");function ep(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}kr(ep,"createLine");var rp=kr(((t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",tu(e)).attr("id",e.domId??e.id),n=Math.max(30,(null==e?void 0:e.width)??0),{cssStyles:o}=e,s=fd(a),l=vd(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=s.circle(0,0,2*n,l),c=ep(n),d=s.path(c,l),u=a.insert((()=>h),":first-child");return u.insert((()=>d)),o&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Jd(e,u),e.intersect=function(t){Tr.info("crossedCircle intersect",e,{radius:n,point:t});return gu.circle(e,n,t)},a}),"crossedCircle"),ip=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=o/s;let h=o,c=s;h>c*l?c=h/l:h=c*l,h=Math.max(h,100),c=Math.max(c,50);const d=Math.min(.2*c,c/4),u=c+2*d,{cssStyles:p}=e,g=fd(a),f=vd(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:u/2},...ru(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...ru(h/2,-u/2,-h/2,-u/2,d,-1)],m=eu(y),x=g.path(m,f),b=a.insert((()=>x),":first-child");return b.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),Jd(e,b),e.intersect=function(t){return gu.polygon(e,y,t)},a}),"waveRectangle"),ap=kr(((t,e,r,i,a,n)=>`M${t},${e}\n a${a},${n} 0,0,1 0,${-i}\n l${r},0\n a${a},${n} 0,0,1 0,${i}\n M${r},${-i}\n a${a},${n} 0,0,0 0,${i}\n l${-r},0`),"createCylinderPathD"),np=kr(((t,e,r,i,a,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" ")),"createOuterCylinderPathD"),op=kr(((t,e,r,i,a,n)=>[`M${t+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" ")),"createInnerCylinderPathD"),sp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o,halfPadding:s}=await Kd(t,e,tu(e)),l="neo"===e.look?2*s:s,h=n.height+l,c=h/2,d=c/(2.5+h/50),u=n.width+d+l,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=fd(a),r=np(0,0,u,h,d,c),i=op(0,0,u,h,d,c),n=t.path(r,vd(e,{})),o=t.path(i,vd(e,{fill:"none"}));g=a.insert((()=>o),":first-child"),g=a.insert((()=>n),":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=ap(0,0,u,h,d,c);g=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",p).attr("style",i)}return g.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),g.attr("label-offset-x",d),g.attr("transform",`translate(${-u/2}, ${h/2} )`),o.attr("transform",`translate(${-n.width/2-d-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Jd(e,g),e.intersect=function(t){const r=gu.rect(e,t),i=r.y-(e.y??0);if(0!=c&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-d)){let a=d*d*(1-i*i/(c*c));0!=a&&(a=Math.sqrt(a)),a=d-a,t.x-(e.x??0)>0&&(a=-a),r.x+=a}return r},a}),"tiltedCylinder"),lp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(60,n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(20,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),{cssStyles:l}=e,h=fd(a),c=vd(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=[{x:-o/2*.8,y:-s/2},{x:o/2*.8,y:-s/2},{x:o/2,y:-s/2*.6},{x:o/2,y:s/2},{x:-o/2,y:s/2},{x:-o/2,y:-s/2*.6}],u=eu(d),p=h.path(u,c),g=a.insert((()=>p),":first-child");return g.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",l),i&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",i),Jd(e,g),e.intersect=function(t){return gu.polygon(e,d,t)},a}),"trapezoidalPentagon"),hp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=n.width+(e.padding??0),l=s+n.height,h=s+n.height,c=[{x:0,y:-l},{x:h,y:-l},{x:h/2,y:0}],{cssStyles:d}=e,u=fd(a),p=vd(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=eu(c),f=u.path(g,p),y=a.insert((()=>f),":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",i),e.width=s,e.height=l,Jd(e,y),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return Tr.info("Triangle intersect",e,c,t),gu.polygon(e,c,t)},a}),"flippedTriangle"),cp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await Kd(t,e,tu(e)),n=Math.max(30,(null==e?void 0:e.width)??0),o=Math.max(30,(null==e?void 0:e.height)??0),{cssStyles:s}=e,l=fd(a),h=vd(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:n,y:0},{x:0,y:o},{x:n,y:o}],d=eu(c),u=l.path(d,h),p=a.insert((()=>u),":first-child");return p.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-n/2}, ${-o/2})`),Jd(e,p),e.intersect=function(t){Tr.info("Pill intersect",e,{points:c});return gu.polygon(e,c,t)},a}),"hourglass"),dp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Kd(t,e,tu(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=-o/2,h=-s/2,c=.2*s,d=.2*s,{cssStyles:u}=e,p=fd(a),g=vd(e,{}),f=[{x:l-c/2,y:h},{x:l+o+c/2,y:h},{x:l+o+c/2,y:h+s},{x:l-c/2,y:h+s}],y=[{x:l+o-c/2,y:h+s},{x:l+o+c/2,y:h+s},{x:l+o+c/2,y:h+s-d}];"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const m=eu(f),x=p.path(m,g),b=eu(y),C=p.path(b,{...g,fillStyle:"solid"}),k=a.insert((()=>C),":first-child");return k.insert((()=>x),":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),Jd(e,k),e.intersect=function(t){return gu.polygon(e,f,t)},a}),"taggedRect"),up=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=fd(a),p=vd(e,{}),g=[{x:h-5,y:c+5},{x:h-5,y:c+l+5},{x:h+s-5,y:c+l+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c+l-5},{x:h+s+5,y:c+l-5},{x:h+s+5,y:c-5},{x:h+5,y:c-5},{x:h+5,y:c},{x:h,y:c},{x:h,y:c+5}],f=[{x:h,y:c+5},{x:h+s-5,y:c+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c},{x:h,y:c}];"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const y=eu(g),m=u.path(y,p),x=eu(f),b=u.path(x,{...p,fill:"none"}),C=a.insert((()=>b),":first-child");return C.insert((()=>m),":first-child"),C.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),o.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),Jd(e,C),e.intersect=function(t){return gu.polygon(e,g,t)},a}),"multiRect"),pp=kr(((t,e,r,i,a,n,o)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createCylinderPathD"),gp=kr(((t,e,r,i,a,n,o)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createOuterCylinderPathD"),fp=kr(((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),yp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+(e.padding??0),e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(n.height+h+(e.padding??0),e.height??0),d=.1*c;let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=fd(a),r=gp(0,0,s,c,l,h,d),i=fp(0,h,s,c,l,h),n=vd(e,{}),o=t.path(r,n),g=t.path(i,n);a.insert((()=>g),":first-child").attr("class","line"),u=a.insert((()=>o),":first-child"),u.attr("class","basic label-container"),p&&u.attr("style",p)}else{const t=pp(0,0,s,c,l,h,d);u=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",p).attr("style",i)}return u.attr("label-offset-y",h),u.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),Jd(e,u),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),e.intersect=function(t){const r=gu.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let a=h*h*(1-i*i/(l*l));a>0&&(a=Math.sqrt(a)),a=h-a,t.y-(e.y??0)>0&&(a=-a),r.y+=a}return r},a}),"linedCylinder"),mp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/8,c=l+h,{cssStyles:d}=e,u=70-s,p=u>0?u/2:0,g=fd(a),f=vd(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-s/2-p,y:c/2},...ru(-s/2-p,c/2,s/2+p,c/2,h,.8),{x:s/2+p,y:-c/2},{x:-s/2-p,y:-c/2}],m=eu(y),x=g.path(m,f),b=a.insert((()=>x),":first-child");return b.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h-(n.y-(n.top??0))})`),Jd(e,b),e.intersect=function(t){return gu.polygon(e,y,t)},a}),"waveEdgedRectangle"),xp=kr(((t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",tu(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,o=Math.max(35,(null==e?void 0:e.width)??0),s=Math.max(35,(null==e?void 0:e.height)??0),l=[{x:o,y:0},{x:0,y:s+3.5},{x:o-14,y:s+3.5},{x:0,y:2*s},{x:o,y:s-3.5},{x:14,y:s-3.5}],h=fd(a),c=vd(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=eu(l),u=h.path(d,c),p=a.insert((()=>u),":first-child");return n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${o/2},${-s})`),Jd(e,p),e.intersect=function(t){Tr.info("lightningBolt intersect",e,t);return gu.polygon(e,l,t)},a}),"lightningBolt"),bp=kr(((t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Td(e);e.label="",e.labelStyle=i;const n=t.insert("g").attr("class",tu(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=fd(n),{nodeBorder:l}=r,h=vd(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=s.circle(0,0,14,h),d=n.insert((()=>c),":first-child");return d.selectAll("path").attr("style",`fill: ${l} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),Jd(e,d),e.intersect=function(t){Tr.info("filledCircle intersect",e,{radius:7,point:t});return gu.circle(e,7,t)},n}),"filledCircle"),Cp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=l+h,d=-s/2,u=-c/2,{cssStyles:p}=e,g=ru(d-5,u+c+5,d+s-5,u+c+5,h,.8),f=null==g?void 0:g[g.length-1],y=[{x:d-5,y:u+5},{x:d-5,y:u+c+5},...g,{x:d+s-5,y:f.y-5},{x:d+s,y:f.y-5},{x:d+s,y:f.y-10},{x:d+s+5,y:f.y-10},{x:d+s+5,y:u-5},{x:d+5,y:u-5},{x:d+5,y:u},{x:d,y:u},{x:d,y:u+5}],m=[{x:d,y:u+5},{x:d+s-5,y:u+5},{x:d+s-5,y:f.y-5},{x:d+s,y:f.y-5},{x:d+s,y:u},{x:d,y:u}],x=fd(a),b=vd(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const C=eu(y),k=x.path(C,b),w=eu(m),S=x.path(w,b),T=a.insert((()=>k),":first-child");return T.insert((()=>S)),T.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-h/2-(n.y-(n.top??0))})`),Jd(e,T),e.intersect=function(t){return gu.polygon(e,y,t)},a}),"multiWaveEdgedRectangle"),kp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=fd(a),p=vd(e,{}),g=[{x:h-5,y:c-5},{x:h-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-5}],f=`M${h-5},${c-5} L${h+s},${c-5} L${h+s},${c+l} L${h-5},${c+l} L${h-5},${c-5}\n M${h-5},${c} L${h+s},${c}\n M${h},${c-5} L${h},${c+l}`;"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const y=u.path(f,p),m=a.insert((()=>y),":first-child");return m.attr("transform","translate(2.5, 2.5)"),m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${-n.width/2+2.5-(n.x-(n.left??0))}, ${-n.height/2+2.5-(n.y-(n.top??0))})`),Jd(e,m),e.intersect=function(t){return gu.polygon(e,g,t)},a}),"windowPane"),wp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=l+h,{cssStyles:d}=e,u=fd(a),p=vd(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...ru(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,h,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],f=u.polygon(g.map((t=>[t.x,t.y])),p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),Jd(e,y),e.intersect=function(t){return gu.polygon(e,g,t)},a}),"linedWaveEdgedRect"),Sp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=.2*s,d=.2*l,u=l+h,{cssStyles:p}=e,g=fd(a),f=vd(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:u/2},...ru(-s/2-s/2*.1,u/2,s/2+s/2*.1,u/2,h,.8),{x:s/2+s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:-u/2}],m=-s/2+s/2*.1,x=-u/2-.4*d,b=[{x:m+s-c,y:1.4*(x+l)},{x:m+s,y:x+l-d},{x:m+s,y:.9*(x+l)},...ru(m+s,1.3*(x+l),m+s-c,1.5*(x+l),.03*-l,.5)],C=eu(y),k=g.path(C,f),w=eu(b),S=g.path(w,{...f,fillStyle:"solid"}),T=a.insert((()=>S),":first-child");return T.insert((()=>k),":first-child"),T.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),Jd(e,T),e.intersect=function(t){return gu.polygon(e,y,t)},a}),"taggedWaveEdgedRectangle");function Tp(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}kr(Tp,"generateCirclePoints");var vp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...Tp(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},...Tp(s/2+2*h,-h,h,20,-180,-270),...Tp(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},...Tp(s/2,l/2,h,20,0,90)],u=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},...Tp(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},...Tp(s/2+.1*s,-h,h,20,-180,-270),...Tp(s/2+.1*s,h,h,20,-90,-180),{x:-s/2-h,y:l/2},...Tp(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2,y:l/2+h}],p=fd(a),g=vd(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=eu(d).replace("Z",""),y=p.path(f,g),m=eu(u),x=p.path(m,{...g}),b=a.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>y),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${h}, 0)`),o.attr("transform",`translate(${-s/2+h-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Jd(e,b),e.intersect=function(t){return gu.polygon(e,u,t)},a}),"curlyBraceLeft");function Bp(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:a,y:n})}return o}kr(Bp,"generateCirclePoints");var _p=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...Bp(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...Bp(s/2+2*h,-h,h,20,-180,-270),...Bp(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...Bp(s/2,l/2,h,20,0,90)],u=[{x:-s/2,y:-l/2-h},{x:s/2,y:-l/2-h},...Bp(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...Bp(s/2+2*h,-h,h,20,-180,-270),...Bp(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...Bp(s/2,l/2,h,20,0,90),{x:s/2,y:l/2+h},{x:-s/2,y:l/2+h}],p=fd(a),g=vd(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=eu(d).replace("Z",""),y=p.path(f,g),m=eu(u),x=p.path(m,{...g}),b=a.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>y),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-h}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Jd(e,b),e.intersect=function(t){return gu.polygon(e,u,t)},a}),"curlyBraceRight");function Lp(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}kr(Lp,"generateCirclePoints");var Mp=kr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Td(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Kd(t,e,tu(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...Lp(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},...Lp(s/2+2*h,-h,h,20,-180,-270),...Lp(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},...Lp(s/2,l/2,h,20,0,90)],u=[...Lp(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},...Lp(-s/2-h/2,-h,h,20,0,90),...Lp(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},...Lp(-s/2+h+h/2,l/2,h,30,-180,-270)],p=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},...Lp(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},...Lp(s/2+2*h,-h,h,20,-180,-270),...Lp(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:l/2},...Lp(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2-h-h/2,y:l/2+h},...Lp(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},...Lp(-s/2-h/2,-h,h,20,0,90),...Lp(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},...Lp(-s/2+h+h/2,l/2,h,30,-180,-270)],g=fd(a),f=vd(e,{fill:"none"});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=eu(d).replace("Z",""),m=g.path(y,f),x=eu(u).replace("Z",""),b=g.path(x,f),C=eu(p),k=g.path(C,{...f}),w=a.insert("g",":first-child");return w.insert((()=>k),":first-child").attr("stroke-opacity",0),w.insert((()=>m),":first-child"),w.insert((()=>b),":first-child"),w.attr("class","text"),c&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${h-h/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Jd(e,w),e.intersect=function(t){return gu.polygon(e,p,t)},a}),"curlyBraces"),Fp=kr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Td(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await Kd(t,e,"icon-shape default"),p="t"===e.pos,g=s+2*d,f=s+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=wd(e),b=-f/2,C=-g/2,k=e.label?8:0,w=fd(h),S=vd(e,{stroke:x.get("fill")||m});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=w.rectangle(b,C,f,g,S),v=Math.max(f,c.width),B=g+c.height+k,_=w.rectangle(-v/2,-B/2,v,B,{...S,fill:"transparent",stroke:"none"}),L=h.insert((()=>T),":first-child"),M=h.insert((()=>_));if(e.icon){const t=h.append("g");t.html(`<g>${await Vs(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${p?c.height/2+k/2-a/2-o:-c.height/2-k/2-a/2-o})`),t.selectAll("path").attr("fill",x.get("stroke")??y)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-B/2:B/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),Jd(e,M),e.intersect=function(t){if(Tr.info("iconSquare intersect",e,t),!e.label)return gu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=p?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+k},{x:r+f/2,y:i-a/2+c.height+k},{x:r+f/2,y:i+a/2},{x:r-f/2,y:i+a/2},{x:r-f/2,y:i-a/2+c.height+k},{x:r-c.width/2,y:i-a/2+c.height+k}]:[{x:r-f/2,y:i-a/2},{x:r+f/2,y:i-a/2},{x:r+f/2,y:i-a/2+g},{x:r+c.width/2,y:i-a/2+g},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+g},{x:r-f/2,y:i-a/2+g}];return gu.polygon(e,n,t)},h}),"iconSquare"),Ap=kr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Td(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await Kd(t,e,"icon-shape default"),u=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:y}=wd(e),m=fd(h),x=vd(e,{stroke:y.get("fill")||f});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=h.append("g");e.icon&&b.html(`<g>${await Vs(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=b.node().getBBox(),k=C.width,w=C.height,S=C.x,T=C.y,v=Math.max(k,w)*Math.SQRT2+40,B=m.circle(0,0,v,x),_=Math.max(v,c.width),L=v+c.height+u,M=m.rectangle(-_/2,-L/2,_,L,{...x,fill:"transparent",stroke:"none"}),F=h.insert((()=>B),":first-child"),A=h.insert((()=>M));return b.attr("transform",`translate(${-k/2-S},${p?c.height/2+u/2-w/2-T:-c.height/2-u/2-w/2-T})`),b.selectAll("path").attr("fill",y.get("stroke")||g),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),F.attr("transform",`translate(0,${p?c.height/2+u/2:-c.height/2-u/2})`),Jd(e,A),e.intersect=function(t){Tr.info("iconSquare intersect",e,t);return gu.rect(e,t)},h}),"iconCircle"),$p=kr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Td(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await Kd(t,e,"icon-shape default"),u="t"===e.pos,p=s,g=s,{nodeBorder:f}=r,{stylesMap:y}=wd(e),m=-g/2,x=-p/2,b=e.label?8:0,C=fd(h),k=vd(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=C.rectangle(m,x,g,p,k),S=Math.max(g,c.width),T=p+c.height+b,v=C.rectangle(-S/2,-T/2,S,T,{...k,fill:"transparent",stroke:"none"}),B=h.insert((()=>w),":first-child"),_=h.insert((()=>v));if(e.icon){const t=h.append("g");t.html(`<g>${await Vs(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${u?c.height/2+b/2-a/2-o:-c.height/2-b/2-a/2-o})`),t.selectAll("path").attr("fill",y.get("stroke")||f)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-T/2:T/2-c.height})`),B.attr("transform",`translate(0,${u?c.height/2+b/2:-c.height/2-b/2})`),Jd(e,_),e.intersect=function(t){if(Tr.info("iconSquare intersect",e,t),!e.label)return gu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=u?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+b},{x:r+g/2,y:i-a/2+c.height+b},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+c.height+b},{x:r-c.width/2,y:i-a/2+c.height+b}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+p},{x:r+c.width/2,y:i-a/2+p},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+p},{x:r-g/2,y:i-a/2+p}];return gu.polygon(e,n,t)},h}),"icon"),Ep=kr((async(t,e,{config:{flowchart:r}})=>{const i=new Image;i.src=(null==e?void 0:e.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/n;const{labelStyles:o}=Td(e);e.labelStyle=o;const s=null==r?void 0:r.wrappingWidth;e.defaultWidth=null==r?void 0:r.wrappingWidth;const l=Math.max(e.label?s??0:0,(null==e?void 0:e.assetWidth)??a),h="on"===e.constraint&&(null==e?void 0:e.assetHeight)?e.assetHeight*e.imageAspectRatio:l,c="on"===e.constraint?h/e.imageAspectRatio:(null==e?void 0:e.assetHeight)??n;e.width=Math.max(h,s??0);const{shapeSvg:d,bbox:u,label:p}=await Kd(t,e,"image-shape default"),g="t"===e.pos,f=-h/2,y=-c/2,m=e.label?8:0,x=fd(d),b=vd(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const C=x.rectangle(f,y,h,c,b),k=Math.max(h,u.width),w=c+u.height+m,S=x.rectangle(-k/2,-w/2,k,w,{...b,fill:"none",stroke:"none"}),T=d.insert((()=>C),":first-child"),v=d.insert((()=>S));if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",h),t.attr("height",c),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-h/2},${g?w/2-c:-w/2})`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-c/2-u.height/2-m/2:c/2-u.height/2+m/2})`),T.attr("transform",`translate(0,${g?u.height/2+m/2:-u.height/2-m/2})`),Jd(e,v),e.intersect=function(t){if(Tr.info("iconSquare intersect",e,t),!e.label)return gu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=g?[{x:r-u.width/2,y:i-a/2},{x:r+u.width/2,y:i-a/2},{x:r+u.width/2,y:i-a/2+u.height+m},{x:r+h/2,y:i-a/2+u.height+m},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+u.height+m},{x:r-u.width/2,y:i-a/2+u.height+m}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+c},{x:r+u.width/2,y:i-a/2+c},{x:r+u.width/2/2,y:i+a/2},{x:r-u.width/2,y:i+a/2},{x:r-u.width/2,y:i-a/2+c},{x:r-h/2,y:i-a/2+c}];return gu.polygon(e,n,t)},d}),"imageSquare"),Dp={state:yu,stateStart:bu,stateEnd:Cu,forkJoin:ku,choice:wu,note:Su,rectWithTitle:vu,roundedRect:mu,squareRect:xu,rectangle:xu,rect:xu,process:xu,proc:xu,rounded:mu,event:mu,stadium:Tu,pill:Tu,terminal:Tu,subroutine:_u,"framed-rectangle":_u,"fr-rect":_u,subprocess:_u,subproc:_u,cylinder:Au,db:Au,cyl:Au,database:Au,question:Ou,diam:Ou,diamond:Ou,decision:Ou,hexagon:Ru,hex:Ru,prepare:Ru,lean_right:ju,"lean-r":ju,"lean-right":ju,"in-out":ju,lean_left:Hu,"lean-l":Hu,"lean-left":Hu,"out-in":Hu,trapezoid:Uu,"trap-b":Uu,"trapezoid-bottom":Uu,priority:Uu,inv_trapezoid:Yu,"inv-trapezoid":Yu,"trapezoid-top":Yu,"trap-t":Yu,manual:Yu,doublecircle:Eu,"dbl-circ":Eu,"double-circle":Eu,circle:$u,circ:$u,rect_left_inv_arrow:Du,odd:Du,card:zu,"notched-rectangle":zu,"notch-rect":zu,"lined-rectangle":Wu,"lin-rect":Wu,"lin-proc":Wu,"lined-process":Wu,"shaded-process":Wu,"small-circle":bu,"sm-circ":bu,start:bu,stop:Cu,"framed-circle":Cu,"fr-circ":Cu,join:ku,fork:ku,comment:vp,"brace-l":vp,bolt:xp,"com-link":xp,"lightning-bolt":xp,doc:mp,document:mp,delay:Zu,"half-rounded-rectangle":Zu,"horizontal-cylinder":sp,"h-cyl":sp,das:sp,"lined-cylinder":yp,"lin-cyl":yp,disk:yp,"curved-trapezoid":Xu,"curv-trap":Xu,display:Xu,"divided-rectangle":tp,"div-rect":tp,"div-proc":tp,"divided-process":tp,triangle:Gu,tri:Gu,extract:Gu,"window-pane":kp,"win-pane":kp,"internal-storage":kp,"f-circ":bp,junction:bp,"filled-circle":bp,"lin-doc":wp,"lined-document":wp,"notched-pentagon":lp,"notch-pent":lp,"loop-limit":lp,"flipped-triangle":hp,"flip-tri":hp,"manual-file":hp,"sloped-rectangle":Qu,"sl-rect":Qu,"manual-input":Qu,docs:Cp,documents:Cp,"st-doc":Cp,"stacked-document":Cp,processes:up,procs:up,"stacked-rectangle":up,"st-rect":up,flag:ip,"paper-tape":ip,"bow-tie-rectangle":Ju,"bow-rect":Ju,"stored-data":Ju,"crossed-circle":rp,"cross-circ":rp,summary:rp,"tag-doc":Sp,"tagged-document":Sp,"tag-rect":dp,"tagged-rectangle":dp,"tag-proc":dp,"tagged-process":dp,hourglass:cp,collate:cp,text:qu,anchor:Nu,brace:vp,labelRect:Vu,"brace-r":_p,braces:Mp,iconSquare:Fp,iconCircle:Ap,icon:$p,iconRounded:kr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Td(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await Kd(t,e,"icon-shape default"),p="t"===e.pos,g=s+2*d,f=s+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=wd(e),b=-f/2,C=-g/2,k=e.label?8:0,w=fd(h),S=vd(e,{stroke:x.get("fill")||m});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=w.path(Cd(b,C,f,g,5),S),v=Math.max(f,c.width),B=g+c.height+k,_=w.rectangle(-v/2,-B/2,v,B,{...S,fill:"transparent",stroke:"none"}),L=h.insert((()=>T),":first-child"),M=h.insert((()=>_));if(e.icon){const t=h.append("g");t.html(`<g>${await Vs(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${p?c.height/2+k/2-a/2-o:-c.height/2-k/2-a/2-o})`),t.selectAll("path").attr("fill",x.get("stroke")??y)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-B/2:B/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),Jd(e,M),e.intersect=function(t){if(Tr.info("iconSquare intersect",e,t),!e.label)return gu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=p?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+k},{x:r+f/2,y:i-a/2+c.height+k},{x:r+f/2,y:i+a/2},{x:r-f/2,y:i+a/2},{x:r-f/2,y:i-a/2+c.height+k},{x:r-c.width/2,y:i-a/2+c.height+k}]:[{x:r-f/2,y:i-a/2},{x:r+f/2,y:i-a/2},{x:r+f/2,y:i-a/2+g},{x:r+c.width/2,y:i-a/2+g},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+g},{x:r-f/2,y:i-a/2+g}];return gu.polygon(e,n,t)},h}),"iconRounded"),imageSquare:Ep},Ip=new Map,Op=kr((async(t,e,r)=>{let i,a;if("rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),!Dp[e.shape])throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===r.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),a=await Dp[e.shape](i,e,r)}else a=await Dp[e.shape](t,e,r),i=a;return e.tooltip&&a.attr("title",e.tooltip),Ip.set(e.id,i),e.haveCallback&&Ip.get(e.id).attr("class",Ip.get(e.id).attr("class")+" clickable"),i}),"insertNode"),Pp=kr(((t,e)=>{Ip.set(e.id,t)}),"setNodeElem"),Rp=kr((()=>{Ip.clear()}),"clear"),qp=kr((t=>{const e=Ip.get(t.id);Tr.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode"),zp={common:Vi,getConfig:gi,insertCluster:Fd,insertEdge:Gd,insertEdgeLabel:qd,insertMarkers:Qd,insertNode:Op,interpolateToCurve:dl,labelHelper:Kd,log:Tr,positionEdgeLabel:Wd},Wp={},Np=kr((t=>{for(const e of t)Wp[e.name]=e}),"registerLayoutLoaders");kr((()=>{Np([{name:"dagre",loader:kr((async()=>await z((()=>import("./dagre-7KT5K2WU-YvPaHyt5.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),"loader")}])}),"registerDefaultLayoutLoaders")();var jp=kr((async(t,e)=>{if(!(t.layoutAlgorithm in Wp))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=Wp[t.layoutAlgorithm];return(await r.loader()).render(t,e,zp,{algorithm:r.algorithm})}),"render"),Hp=kr(((t="",{fallback:e="dagre"}={})=>{if(t in Wp)return t;if(e in Wp)return Tr.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm"),Up="11.3.0",Yp=kr((t=>{var e;const{securityLevel:r}=ya();let i=X("body");if("sandbox"===r){const r=(null==(e=X(`#i${t}`).node())?void 0:e.contentDocument)??document;i=X(r.body)}return i.select(`#${t}`)}),"selectSvgElement"),Vp="comm",Gp="rule",Zp="decl",Xp=Math.abs,Qp=String.fromCharCode;function Kp(t){return t.trim()}function Jp(t,e,r){return t.replace(e,r)}function tg(t,e,r){return t.indexOf(e,r)}function eg(t,e){return 0|t.charCodeAt(e)}function rg(t,e,r){return t.slice(e,r)}function ig(t){return t.length}function ag(t,e){return e.push(t),t}var ng=1,og=1,sg=0,lg=0,hg=0,cg="";function dg(t,e,r,i,a,n,o,s){return{value:t,root:e,parent:r,type:i,props:a,children:n,line:ng,column:og,length:o,return:"",siblings:s}}function ug(){return hg=lg<sg?eg(cg,lg++):0,og++,10===hg&&(og=1,ng++),hg}function pg(){return eg(cg,lg)}function gg(){return lg}function fg(t,e){return rg(cg,t,e)}function yg(t){switch(t){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 mg(t){return Kp(fg(lg-1,Cg(91===t?t+2:40===t?t+1:t)))}function xg(t){for(;(hg=pg())&&hg<33;)ug();return yg(t)>2||yg(hg)>3?"":" "}function bg(t,e){for(;--e&&ug()&&!(hg<48||hg>102||hg>57&&hg<65||hg>70&&hg<97););return fg(t,gg()+(e<6&&32==pg()&&32==ug()))}function Cg(t){for(;ug();)switch(hg){case t:return lg;case 34:case 39:34!==t&&39!==t&&Cg(hg);break;case 40:41===t&&Cg(t);break;case 92:ug()}return lg}function kg(t,e){for(;ug()&&t+hg!==57&&(t+hg!==84||47!==pg()););return"/*"+fg(e,lg-1)+"*"+Qp(47===t?t:ug())}function wg(t){for(;!yg(pg());)ug();return fg(t,lg)}function Sg(t){return function(t){return cg="",t}(Tg("",null,null,null,[""],t=function(t){return ng=og=1,sg=ig(cg=t),lg=0,[]}(t),0,[0],t))}function Tg(t,e,r,i,a,n,o,s,l){for(var h=0,c=0,d=o,u=0,p=0,g=0,f=1,y=1,m=1,x=0,b="",C=a,k=n,w=i,S=b;y;)switch(g=x,x=ug()){case 40:if(108!=g&&58==eg(S,d-1)){-1!=tg(S+=Jp(mg(x),"&","&\f"),"&\f",Xp(h?s[h-1]:0))&&(m=-1);break}case 34:case 39:case 91:S+=mg(x);break;case 9:case 10:case 13:case 32:S+=xg(g);break;case 92:S+=bg(gg()-1,7);continue;case 47:switch(pg()){case 42:case 47:ag(Bg(kg(ug(),gg()),e,r,l),l),5!=yg(g||1)&&5!=yg(pg()||1)||!ig(S)||" "===rg(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*f:s[h++]=ig(S)*m;case 125*f:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+c:-1==m&&(S=Jp(S,/\f/g,"")),p>0&&(ig(S)-d||0===f&&47===g)&&ag(p>32?_g(S+";",i,r,d-1,l):_g(Jp(S," ","")+";",i,r,d-2,l),l);break;case 59:S+=";";default:if(ag(w=vg(S,e,r,h,c,a,s,b,C=[],k=[],d,n),n),123===x)if(0===c)Tg(S,e,w,w,C,n,d,s,k);else switch(99===u&&110===eg(S,3)?100:u){case 100:case 108:case 109:case 115:Tg(t,w,w,i&&ag(vg(t,w,w,0,0,a,s,b,a,C=[],d,k),k),a,k,d,s,i?C:k);break;default:Tg(S,w,w,w,[""],k,0,s,k)}}h=c=p=0,f=m=1,b=S="",d=o;break;case 58:d=1+ig(S),p=g;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==(hg=lg>0?eg(cg,--lg):0,og--,10===hg&&(og=1,ng--),hg))continue;switch(S+=Qp(x),x*f){case 38:m=c>0?1:(S+="\f",-1);break;case 44:s[h++]=(ig(S)-1)*m,m=1;break;case 64:45===pg()&&(S+=mg(ug())),u=pg(),c=d=ig(b=S+=wg(gg())),x++;break;case 45:45===g&&2==ig(S)&&(f=0)}}return n}function vg(t,e,r,i,a,n,o,s,l,h,c,d){for(var u=a-1,p=0===a?n:[""],g=function(t){return t.length}(p),f=0,y=0,m=0;f<i;++f)for(var x=0,b=rg(t,u+1,u=Xp(y=o[f])),C=t;x<g;++x)(C=Kp(y>0?p[x]+" "+b:Jp(b,/&\f/g,p[x])))&&(l[m++]=C);return dg(t,e,r,0===a?Gp:s,l,h,c,d)}function Bg(t,e,r,i){return dg(t,e,r,Vp,Qp(hg),rg(t,2,-2),0,i)}function _g(t,e,r,i,a){return dg(t,e,r,Zp,rg(t,0,i),rg(t,i+1,-1),i,a)}function Lg(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function Mg(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case Zp:return t.return=t.return||t.value;case Vp:return"";case"@keyframes":return t.return=t.value+"{"+Lg(t.children,i)+"}";case Gp:if(!ig(t.value=t.props.join(",")))return""}return ig(r=Lg(t.children,i))?t.return=t.value+"{"+r+"}":""}var Fg={id:"c4",detector:kr((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./c4Diagram-ZCSEYPFN-C8NScG61.js");return{diagram:t}}),__vite__mapDeps([15,16,6,3,4,7,14]),import.meta.url);return{id:"c4",diagram:t}}),"loader")},Ag="flowchart",$g={id:Ag,detector:kr(((t,e)=>{var r,i;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&"elk"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&/^\s*graph/.test(t)}),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-ylNzzPqt.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:Ag,diagram:t}}),"loader")},Eg="flowchart-v2",Dg={id:Eg,detector:kr(((t,e)=>{var r,i,a;return"dagre-d3"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&("elk"===(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==(null==(a=null==e?void 0:e.flowchart)?void 0:a.defaultRenderer))||/^\s*flowchart/.test(t))}),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-ylNzzPqt.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:Eg,diagram:t}}),"loader")},Ig={id:"er",detector:kr((t=>/^\s*erDiagram/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./erDiagram-DKC2X5TE-DZPkgiYL.js");return{diagram:t}}),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,14]),import.meta.url);return{id:"er",diagram:t}}),"loader")},Og="gitGraph",Pg={id:Og,detector:kr((t=>/^\s*gitGraph/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./gitGraphDiagram-JPZ3KUXI-Df9StGyC.js");return{diagram:t}}),__vite__mapDeps([21,22,23,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:Og,diagram:t}}),"loader")},Rg="gantt",qg={id:Rg,detector:kr((t=>/^\s*gantt/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./ganttDiagram-HLVPPPRE-C_kax-sw.js");return{diagram:t}}),__vite__mapDeps([26,3,4,6,7,27,28,29,14]),import.meta.url);return{id:Rg,diagram:t}}),"loader")},zg="info",Wg={id:zg,detector:kr((t=>/^\s*info/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./infoDiagram-RZZSJVI2-CWPzQHkV.js");return{diagram:t}}),__vite__mapDeps([30,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:zg,diagram:t}}),"loader")},Ng={id:"pie",detector:kr((t=>/^\s*pie/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./pieDiagram-X7YZ5ZEZ-DXYxOVzP.js");return{diagram:t}}),__vite__mapDeps([31,22,24,3,4,25,5,6,7,2,9,10,13,32,14,33,29]),import.meta.url);return{id:"pie",diagram:t}}),"loader")},jg="quadrantChart",Hg={id:jg,detector:kr((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./quadrantDiagram-F36EZAVT-C6qm3-LE.js");return{diagram:t}}),__vite__mapDeps([34,6,3,4,7,28,29,14]),import.meta.url);return{id:jg,diagram:t}}),"loader")},Ug="xychart",Yg={id:Ug,detector:kr((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./xychartDiagram-KECQ2H5Q-BVDiXW3Y.js");return{diagram:t}}),__vite__mapDeps([35,6,3,4,7,29,33,36,28,14]),import.meta.url);return{id:Ug,diagram:t}}),"loader")},Vg="requirement",Gg={id:Vg,detector:kr((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./requirementDiagram-JG2LMPGF-WzPpzUAb.js");return{diagram:t}}),__vite__mapDeps([37,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:Vg,diagram:t}}),"loader")},Zg="sequence",Xg={id:Zg,detector:kr((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./sequenceDiagram-WK7YDQ3N-BlFngsu0.js");return{diagram:t}}),__vite__mapDeps([38,16,23,6,3,4,7,14]),import.meta.url);return{id:Zg,diagram:t}}),"loader")},Qg="class",Kg={id:Qg,detector:kr(((t,e)=>{var r;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.class)?void 0:r.defaultRenderer)&&/^\s*classDiagram/.test(t)}),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./classDiagram-Q73GJZWF--mYf5qKg.js");return{diagram:t}}),__vite__mapDeps([39,40,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:Qg,diagram:t}}),"loader")},Jg="classDiagram",tf={id:Jg,detector:kr(((t,e)=>{var r;return!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==(null==(r=null==e?void 0:e.class)?void 0:r.defaultRenderer))||/^\s*classDiagram-v2/.test(t)}),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./classDiagram-v2-C6QPLPW4-Bmzcft5F.js");return{diagram:t}}),__vite__mapDeps([41,42,6,3,4,7,14,40,1,2,5,8,9,10,11,12,13]),import.meta.url);return{id:Jg,diagram:t}}),"loader")},ef="state",rf={id:ef,detector:kr(((t,e)=>{var r;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.state)?void 0:r.defaultRenderer)&&/^\s*stateDiagram/.test(t)}),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./stateDiagram-4JV6CC6H-Byr2vGI5.js");return{diagram:t}}),__vite__mapDeps([43,44,18,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:ef,diagram:t}}),"loader")},af="stateDiagram",nf={id:af,detector:kr(((t,e)=>{var r;return!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==(null==(r=null==e?void 0:e.state)?void 0:r.defaultRenderer))}),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./stateDiagram-v2-7KT6RKTD-Dywkw8Z1.js");return{diagram:t}}),__vite__mapDeps([45,44,18,6,3,4,7,14]),import.meta.url);return{id:af,diagram:t}}),"loader")},of="journey",sf={id:of,detector:kr((t=>/^\s*journey/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./journeyDiagram-BLD6N6MZ-D9KLPpfb.js");return{diagram:t}}),__vite__mapDeps([46,16,6,3,4,7,32,14]),import.meta.url);return{id:of,diagram:t}}),"loader")},lf={draw:kr(((t,e,r)=>{Tr.debug("rendering svg for syntax error\n");const i=Yp(e),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Xi(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)}),"draw")},hf=lf,cf={db:{},renderer:lf,parser:{parse:kr((()=>{}),"parse")}},df="flowchart-elk",uf={id:df,detector:kr(((t,e={})=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer))&&(e.layout="elk",!0)}),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-ylNzzPqt.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:df,diagram:t}}),"loader")},pf="timeline",gf={id:pf,detector:kr((t=>/^\s*timeline/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./timeline-definition-3ZMEY6HS-hhCwxsn9.js");return{diagram:t}}),__vite__mapDeps([47,6,3,4,7,32,14]),import.meta.url);return{id:pf,diagram:t}}),"loader")},ff="mindmap",yf={id:ff,detector:kr((t=>/^\s*mindmap/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./mindmap-definition-OEB2RXX2-C0iyIXeB.js");return{diagram:t}}),__vite__mapDeps([48,49,3,4,6,7,14]),import.meta.url);return{id:ff,diagram:t}}),"loader")},mf="sankey",xf={id:mf,detector:kr((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./sankeyDiagram-ATFNWWW6-C9tcLsXo.js");return{diagram:t}}),__vite__mapDeps([50,6,3,4,7,33,29,51,14]),import.meta.url);return{id:mf,diagram:t}}),"loader")},bf="packet",Cf={id:bf,detector:kr((t=>/^\s*packet-beta/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./diagram-AVGMFHF7-CPq7I5ob.js");return{diagram:t}}),__vite__mapDeps([52,22,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:bf,diagram:t}}),"loader")},kf="block",wf={id:kf,detector:kr((t=>/^\s*block-beta/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./blockDiagram-TCMKQVZ6-Dybkj_w9.js");return{diagram:t}}),__vite__mapDeps([53,42,6,3,4,7,14,13,2,5,1,19]),import.meta.url);return{id:kf,diagram:t}}),"loader")},Sf="architecture",Tf={id:Sf,detector:kr((t=>/^\s*architecture/.test(t)),"detector"),loader:kr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./architectureDiagram-IFBEXTG3-UxOtE4d0.js");return{diagram:t}}),__vite__mapDeps([54,22,23,24,3,4,25,5,6,7,2,9,10,13,49,14]),import.meta.url);return{id:Sf,diagram:t}}),"loader")},vf=!1,Bf=kr((()=>{vf||(vf=!0,Sa("error",cf,(t=>"error"===t.toLowerCase().trim())),Sa("---",{db:{clear:kr((()=>{}),"clear")},styles:{},renderer:{draw:kr((()=>{}),"draw")},parser:{parse:kr((()=>{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:kr((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),Er(Fg,tf,Kg,Ig,qg,Wg,Ng,Gg,Xg,uf,Dg,$g,yf,gf,Pg,nf,rf,sf,Hg,xf,Cf,Yg,wf,Tf))}),"addDiagrams"),_f=kr((async()=>{Tr.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ar).map((async([t,{detector:e,loader:r}])=>{if(r)try{Ta(t)}catch{try{const{diagram:t,id:i}=await r();Sa(i,t,e)}catch(i){throw Tr.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Ar[t],i}}})))).filter((t=>"rejected"===t.status));if(t.length>0){Tr.error(`Failed to load ${t.length} external diagrams`);for(const e of t)Tr.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams");function Lf(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function Mf(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}kr(Lf,"setA11yDiagramInfo"),kr(Mf,"addSVGa11yTitleDescription");var Ff=(kr(u=class{constructor(t,e,r,i,a){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=a}static async fromText(t,e={}){var r,i;const a=gi(),n=$r(t,a);t=Wl(t)+"\n";try{Ta(n)}catch{const t=Ir(n);if(!t)throw new Fr(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();Sa(e,r)}const{db:o,parser:s,renderer:l,init:h}=Ta(n);return s.parser&&(s.parser.yy=o),null==(r=o.clear)||r.call(o),null==h||h(a),e.title&&(null==(i=o.setDiagramTitle)||i.call(o,e.title)),await s.parse(t),new u(n,t,o,s,l)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},"Diagram"),u),Af=[],$f=kr((()=>{Af.forEach((t=>{t()})),Af=[]}),"attachFunctions"),Ef=kr((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function Df(t){const e=t.match(_r);if(!e)return{text:t,metadata:{}};let r=Ts(e[1],{schema:Ss})??{};r="object"!=typeof r||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:t.slice(e[0].length),metadata:i}}kr(Df,"extractFrontMatter");var If=kr((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),Of=kr((t=>{const{text:e,metadata:r}=Df(t),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:e}}),"processFrontmatter"),Pf=kr((t=>{const e=zl.detectInit(t)??{},r=zl.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===(null==r?void 0:r.type)&&(e.wrap=!0),{text:hl(t),directive:e}}),"processDirectives");function Rf(t){const e=If(t),r=Of(e),i=Pf(r.text),a=ql(r.config,i.directive);return{code:t=Ef(i.text),title:r.title,config:a}}function qf(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}kr(Rf,"preprocessDiagram"),kr(qf,"toBase64");var zf=["foreignobject"],Wf=["dominant-baseline"];function Nf(t){const e=Rf(t);return mi(),yi(e.config??{}),e}async function jf(t,e){Bf();try{const{code:e,config:r}=Nf(t);return{diagramType:(await ty(e)).type,config:r}}catch(r){if(null==e?void 0:e.suppressErrors)return!1;throw r}}kr(Nf,"processAndSetConfigs"),kr(jf,"parse");var Hf=kr(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),Uf=kr(((t,e=new Map)=>{var r;let i="";if(void 0!==t.themeCSS&&(i+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(i+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(i+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const a=t.htmlLabels??(null==(r=t.flowchart)?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{Ht(t.styles)||a.forEach((e=>{i+=Hf(t.id,e,t.styles)})),Ht(t.textStyles)||(i+=Hf(t.id,"tspan",((null==t?void 0:t.textStyles)||[]).map((t=>t.replace("color","fill")))))}))}return i}),"createCssStyles"),Yf=kr(((t,e,r,i)=>{const a=Uf(t,r);return Lg(Sg(`${i}{${ea(e,a,t.themeVariables)}}`),Mg)}),"createUserStyles"),Vf=kr(((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Nl(i),i=i.replace(/<br>/g,"<br/>"),i}),"cleanUpSvgCode"),Gf=kr(((t="",e)=>{var r,i;return`<iframe style="width:100%;height:${(null==(i=null==(r=null==e?void 0:e.viewBox)?void 0:r.baseVal)?void 0:i.height)?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${qf(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`}),"putIntoIFrame"),Zf=kr(((t,e,r,i,a)=>{const n=t.append("div");n.attr("id",r),i&&n.attr("style",i);const o=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&o.attr("xmlns:xlink",a),o.append("g"),t}),"appendDivSvgG");function Xf(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}kr(Xf,"sandboxedIframe");var Qf=kr(((t,e,r,i)=>{var a,n,o;null==(a=t.getElementById(e))||a.remove(),null==(n=t.getElementById(r))||n.remove(),null==(o=t.getElementById(i))||o.remove()}),"removeExistingElements"),Kf=kr((async function(t,e,r){var i,a,n,o,s,l;Bf();const h=Nf(e);e=h.code;const c=gi();Tr.debug(c),e.length>((null==c?void 0:c.maxTextSize)??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const d="#"+t,u="i"+t,p="#"+u,g="d"+t,f="#"+g,y=kr((()=>{const t=X(x?p:f).node();t&&"remove"in t&&t.remove()}),"removeTempElements");let m=X("body");const x="sandbox"===c.securityLevel,b="loose"===c.securityLevel,C=c.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const t=Xf(X(r),u);m=X(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=X(r);Zf(m,t,g,`font-family: ${C}`,"http://www.w3.org/1999/xlink")}else{if(Qf(document,t,g,u),x){const t=Xf(X("body"),u);m=X(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=X("body");Zf(m,t,g)}let k,w;try{k=await Ff.fromText(e,{title:h.title})}catch(A){if(c.suppressErrorRendering)throw y(),A;k=await Ff.fromText("error"),w=A}const S=m.select(f).node(),T=k.type,v=S.firstChild,B=v.firstChild,_=null==(a=(i=k.renderer).getClasses)?void 0:a.call(i,e,k),L=Yf(c,T,_,d),M=document.createElement("style");M.innerHTML=L,v.insertBefore(M,B);try{await k.renderer.draw(e,t,Up,k)}catch($){throw c.suppressErrorRendering?y():hf.draw(e,t,Up),$}ey(T,m.select(`${f} svg`),null==(o=(n=k.db).getAccTitle)?void 0:o.call(n),null==(l=(s=k.db).getAccDescription)?void 0:l.call(s)),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=m.select(f).node().innerHTML;if(Tr.debug("config.arrowMarkerAbsolute",c.arrowMarkerAbsolute),F=Vf(F,x,Ii(c.arrowMarkerAbsolute)),x){const t=m.select(f+" svg").node();F=Gf(F,t)}else b||(F=br.sanitize(F,{ADD_TAGS:zf,ADD_ATTR:Wf}));if($f(),w)throw w;return y(),{diagramType:T,svg:F,bindFunctions:k.db.bindFunctions}}),"render");function Jf(t={}){var e;const r=Pr({},t);(null==r?void 0:r.fontFamily)&&!(null==(e=r.themeVariables)?void 0:e.fontFamily)&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),ci(r),(null==r?void 0:r.theme)&&r.theme in Xr?r.themeVariables=Xr[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=Xr.default.getThemeVariables(r.themeVariables));const i="object"==typeof r?hi(r):ui();vr(i.logLevel),Bf()}kr(Jf,"initialize");var ty=kr(((t,e={})=>{const{code:r}=Rf(t);return Ff.fromText(r,e)}),"getDiagramFromText");function ey(t,e,r,i){Lf(e,t),Mf(e,r,i,e.attr("id"))}kr(ey,"addA11yInfo");var ry=Object.freeze({render:Kf,parse:jf,getDiagramFromText:ty,initialize:Jf,getConfig:gi,setConfig:pi,getSiteConfig:ui,updateSiteConfig:di,reset:kr((()=>{mi()}),"reset"),globalReset:kr((()=>{mi(ai)}),"globalReset"),defaultConfig:ai});vr(gi().logLevel),mi(gi());var iy=kr(((t,e,r)=>{Tr.warn(t),Ol(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))}),"handleError"),ay=kr((async function(t={querySelector:".mermaid"}){try{await ny(t)}catch(e){if(Ol(e)&&Tr.error(e.str),yy.parseError&&yy.parseError(e),!t.suppressErrors)throw Tr.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),ny=kr((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=ry.getConfig();let a;if(Tr.debug((t?"":"No ")+"Callback function found"),r)a=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(e)}Tr.debug(`Found ${a.length} diagrams`),void 0!==(null==i?void 0:i.startOnLoad)&&(Tr.debug("Start On Load: "+(null==i?void 0:i.startOnLoad)),ry.updateSiteConfig({startOnLoad:null==i?void 0:i.startOnLoad}));const n=new zl.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const h of Array.from(a)){if(Tr.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const e=`mermaid-${n.next()}`;o=h.innerHTML,o=Kh(zl.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=zl.detectInit(o);r&&Tr.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await fy(e,o,h);h.innerHTML=r,t&&await t(e),i&&i(h)}catch(l){iy(l,s,yy.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),oy=kr((function(t){ry.initialize(t)}),"initialize"),sy=kr((async function(t,e,r){Tr.warn("mermaid.init is deprecated. Please use run instead."),t&&oy(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await ay(i)}),"init"),ly=kr((async(t,{lazyLoad:e=!0}={})=>{Bf(),Er(...t),!1===e&&await _f()}),"registerExternalDiagrams"),hy=kr((function(){if(yy.startOnLoad){const{startOnLoad:t}=ry.getConfig();t&&yy.run().catch((t=>Tr.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",hy,!1);var cy=kr((function(t){yy.parseError=t}),"setParseErrorHandler"),dy=[],uy=!1,py=kr((async()=>{if(!uy){for(uy=!0;dy.length>0;){const e=dy.shift();if(e)try{await e()}catch(t){Tr.error("Error executing queue",t)}}uy=!1}}),"executeQueue"),gy=kr((async(t,e)=>new Promise(((r,i)=>{const a=kr((()=>new Promise(((a,n)=>{ry.parse(t,e).then((t=>{a(t),r(t)}),(t=>{var e;Tr.error("Error parsing",t),null==(e=yy.parseError)||e.call(yy,t),n(t),i(t)}))}))),"performCall");dy.push(a),py().catch(i)}))),"parse"),fy=kr(((t,e,r)=>new Promise(((i,a)=>{const n=kr((()=>new Promise(((n,o)=>{ry.render(t,e,r).then((t=>{n(t),i(t)}),(t=>{var e;Tr.error("Error parsing",t),null==(e=yy.parseError)||e.call(yy,t),o(t),a(t)}))}))),"performCall");dy.push(n),py().catch(a)}))),"render"),yy={startOnLoad:!0,mermaidAPI:ry,parse:gy,render:fy,init:sy,run:ay,registerExternalDiagrams:ly,registerLayoutLoaders:Np,initialize:oy,parseError:void 0,contentLoaded:hy,setParseErrorHandler:cy,detectType:$r,registerIconPacks:Us},my=yy;
9
- /*! Check if previously processed */
10
- /*!
11
- * Wait for document loaded before starting the execution
12
- */
13
- const xy={startOnLoad:!0,theme:"forest",logLevel:"fatal",securityLevel:"strict",fontFamily:"var(--text-font)",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,curve:"linear"},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};function by(){return function(){const t="abcdefghijklmnopqrstuvwxyz";return Array.from({length:6},(()=>t[Math.floor(26*Math.random())])).join("")}()}const Cy=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const e=N(9),{diagram:r}=t,[i]=j.useState(by),a="dark"===H().theme;let n,o;my.initialize({...xy,theme:a?"dark":"forest",darkMode:a}),e[0]!==i||e[1]!==r?(n=async()=>(await my.render(i,r,void 0).catch((t=>{var e;throw null==(e=document.getElementById(i))||e.remove(),Y.warn("Failed to render mermaid diagram",t),t}))).svg,e[0]=i,e[1]=r,e[2]=n):n=e[2],e[3]!==r||e[4]!==i||e[5]!==a?(o=[r,i,a],e[3]=r,e[4]=i,e[5]=a,e[6]=o):o=e[6];const{data:s}=U(n,o);if(!s)return null;let l;return e[7]!==s?(l=V.jsx("div",{dangerouslySetInnerHTML:{__html:s}}),e[7]=s,e[8]=l):l=e[8],l}},Symbol.toStringTag,{value:"Module"}));export{Sl as $,ei as A,ql as B,se as C,gi as D,vl as E,Ca as F,Yp as G,Up as H,Yr as I,Ss as J,Hi as K,Ui as L,Yi as M,Rl as N,Ri as O,Qi as P,kl as Q,dl as R,Gs as S,Ii as T,Xt as U,fc as V,Ks as W,gc as X,Nl as Y,al as Z,kr as _,Pr as a,wr as a0,ra as a1,de as a2,pe as a3,ge as a4,Qd as a5,Rp as a6,Pd as a7,Ad as a8,Jd as a9,Pp as aa,Op as ab,qp as ac,Fd as ad,Gd as ae,Wd as af,qd as ag,qt as ah,Ht as ai,dc as aj,Ns as ak,Us as al,Vs as am,St as an,Gt as ao,bt as ap,Tt as aq,It as ar,Ot as as,xt as at,Dt as au,Pt as av,Ut as aw,Ct as ax,Cy as ay,da as b,ca as c,ya as d,Vi as e,Fl as f,ha as g,Al as h,Li as i,Xi as j,el as k,Tr as l,wi as m,ma as n,xa as o,ua as p,pa as q,Ts as r,la as s,sa as t,zl as u,jl as v,Ll as w,Hp as x,jp as y,he as z};