@hamak/smart-data-dico 1.12.6 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +13 -1
  2. package/backend/dist/server.mjs +5167 -2521
  3. package/backend/dist/validate.mjs +31 -9
  4. package/bin/cli.js +21 -0
  5. package/frontend/dist/assets/abnfDiagram-VRR7QNED-24485caa.js +1 -0
  6. package/frontend/dist/assets/arc-19b95fda.js +1 -0
  7. package/frontend/dist/assets/architecture-TIHT7OUA-7f8a28b6.js +1 -0
  8. package/frontend/dist/assets/architectureDiagram-ZJ3FMSHR-201443e3.js +36 -0
  9. package/frontend/dist/assets/blockDiagram-677ZJIJ3-fe079e1c.js +132 -0
  10. package/frontend/dist/assets/c4Diagram-LMCZKHZV-1551f7f2.js +10 -0
  11. package/frontend/dist/assets/channel-61abe24f.js +1 -0
  12. package/frontend/dist/assets/chunk-2Q5K7J3B-3a5a6cd4.js +1 -0
  13. package/frontend/dist/assets/chunk-32BRIVSS-94067150.js +1 -0
  14. package/frontend/dist/assets/chunk-5VM5RSS4-9cf6a906.js +15 -0
  15. package/frontend/dist/assets/chunk-EX3LRPZG-95013528.js +231 -0
  16. package/frontend/dist/assets/chunk-JWPE2WC7-3c5a598c.js +1 -0
  17. package/frontend/dist/assets/chunk-MOJQB5TN-e521cfda.js +88 -0
  18. package/frontend/dist/assets/chunk-PUDLZKDR-07116136.js +156 -0
  19. package/frontend/dist/assets/chunk-RYQCIY6F-5b515d80.js +1 -0
  20. package/frontend/dist/assets/chunk-V7JOEXUC-9715cf14.js +206 -0
  21. package/frontend/dist/assets/chunk-VR4S4FIN-85d2e965.js +1 -0
  22. package/frontend/dist/assets/chunk-XXDRQBXY-944c77f5.js +1 -0
  23. package/frontend/dist/assets/classDiagram-OUVF2IWQ-2f87b733.js +1 -0
  24. package/frontend/dist/assets/classDiagram-v2-EOCWNBFH-2f87b733.js +1 -0
  25. package/frontend/dist/assets/cose-bilkent-JH36ORCC-2ed0fa33.js +1 -0
  26. package/frontend/dist/assets/cynefin-VYW2F7L2-786f7f5e.js +1 -0
  27. package/frontend/dist/assets/cynefinDiagram-TSTJHNR4-22c1a8a5.js +62 -0
  28. package/frontend/dist/assets/dagre-VKFMJZFB-a9311217.js +4 -0
  29. package/frontend/dist/assets/defaultLocale-52cfb4e1.js +1 -0
  30. package/frontend/dist/assets/diagram-FQU43EPY-6d80ef9b.js +3 -0
  31. package/frontend/dist/assets/diagram-G47NLZAW-951f899c.js +24 -0
  32. package/frontend/dist/assets/diagram-NH7WQ7WH-6d1fbe39.js +24 -0
  33. package/frontend/dist/assets/diagram-OA4YK3LP-76385969.js +30 -0
  34. package/frontend/dist/assets/diagram-WEI45ONY-fc8615f4.js +41 -0
  35. package/frontend/dist/assets/ebnfDiagram-CCIWWBDH-11fda8b1.js +1 -0
  36. package/frontend/dist/assets/erDiagram-Q63AITRT-9e62e673.js +85 -0
  37. package/frontend/dist/assets/eventmodeling-45OFAUF4-333aa76a.js +1 -0
  38. package/frontend/dist/assets/flowDiagram-23GEKE2U-c8b30799.js +1 -0
  39. package/frontend/dist/assets/ganttDiagram-NO4QXBWP-81cf321e.js +292 -0
  40. package/frontend/dist/assets/gitGraph-TEB2WS4Q-c7d4c5b8.js +1 -0
  41. package/frontend/dist/assets/gitGraphDiagram-IHSO6WYX-3e93a095.js +106 -0
  42. package/frontend/dist/assets/graph-7008991d.js +1 -0
  43. package/frontend/dist/assets/index-3c996d39.css +1 -0
  44. package/frontend/dist/assets/index-e2bcee83.js +546 -0
  45. package/frontend/dist/assets/info-DKCQHKI2-7d9b277f.js +1 -0
  46. package/frontend/dist/assets/infoDiagram-FWYZ7A6U-53d9e3c5.js +2 -0
  47. package/frontend/dist/assets/init-77b53fdd.js +1 -0
  48. package/frontend/dist/assets/ishikawaDiagram-FXEZZL3T-ab5a0f04.js +70 -0
  49. package/frontend/dist/assets/journeyDiagram-5HDEW3XC-cac024da.js +139 -0
  50. package/frontend/dist/assets/kanban-definition-HUTT4EX6-6a860eb3.js +89 -0
  51. package/frontend/dist/assets/katex-0cba7652.js +257 -0
  52. package/frontend/dist/assets/layout-47dc10e6.js +1 -0
  53. package/frontend/dist/assets/linear-60f52dc3.js +1 -0
  54. package/frontend/dist/assets/map-338884f0.js +1 -0
  55. package/frontend/dist/assets/mermaid-parser.core-fb428282.js +178 -0
  56. package/frontend/dist/assets/mermaid.core-d8dddb84.js +313 -0
  57. package/frontend/dist/assets/mindmap-definition-LN4V7U3C-940aea0d.js +96 -0
  58. package/frontend/dist/assets/ordinal-ba9b4969.js +1 -0
  59. package/frontend/dist/assets/packet-7NZHBO7P-3fff77ef.js +1 -0
  60. package/frontend/dist/assets/pegDiagram-2B236MQR-8ef56fb9.js +1 -0
  61. package/frontend/dist/assets/pie-RZYD4A2V-f6a2cb0c.js +1 -0
  62. package/frontend/dist/assets/pieDiagram-ENE6RG2P-c60a583c.js +39 -0
  63. package/frontend/dist/assets/quadrantDiagram-ABIIQ3AL-e1de7a9f.js +7 -0
  64. package/frontend/dist/assets/radar-I7S5WNFK-51d28f01.js +1 -0
  65. package/frontend/dist/assets/railroad-3IZDKUUU-f3464d99.js +1 -0
  66. package/frontend/dist/assets/railroad-abnf-AHOZXSZD-221fdd7d.js +1 -0
  67. package/frontend/dist/assets/railroad-ebnf-EBAXGLYW-47f8776d.js +1 -0
  68. package/frontend/dist/assets/railroad-peg-LSFZ7HO6-7ae39966.js +1 -0
  69. package/frontend/dist/assets/railroadDiagram-RFXS5EU6-5cebf589.js +1 -0
  70. package/frontend/dist/assets/requirementDiagram-TGXJPOKE-103dc537.js +84 -0
  71. package/frontend/dist/assets/sankeyDiagram-HTMAVEWB-7b94c363.js +40 -0
  72. package/frontend/dist/assets/sequenceDiagram-DBY2YBRQ-72ee08c9.js +162 -0
  73. package/frontend/dist/assets/sizeCapture-X5ZJPWSS-cbc74abe.js +1 -0
  74. package/frontend/dist/assets/stateDiagram-2N3HPSRC-99599962.js +1 -0
  75. package/frontend/dist/assets/stateDiagram-v2-6OUMAXLB-4b27b493.js +1 -0
  76. package/frontend/dist/assets/swimlanes-5IMT3BWC-b9d54b95.js +1 -0
  77. package/frontend/dist/assets/swimlanesDiagram-G3AALYLV-cda8be30.js +8 -0
  78. package/frontend/dist/assets/timeline-definition-FHXFAJF6-be69bbbb.js +120 -0
  79. package/frontend/dist/assets/treeView-QDETBFTQ-7350f9b9.js +1 -0
  80. package/frontend/dist/assets/treemap-6X3UGDF4-d66e8b29.js +1 -0
  81. package/frontend/dist/assets/vennDiagram-L72KCM5P-7c53b13d.js +34 -0
  82. package/frontend/dist/assets/wardley-OPB4EBWU-5f8aa19e.js +1 -0
  83. package/frontend/dist/assets/wardleyDiagram-EHGQE667-fdffdae1.js +78 -0
  84. package/frontend/dist/assets/xychartDiagram-FW5EYKEG-15c22d90.js +7 -0
  85. package/frontend/dist/index.html +2 -2
  86. package/package.json +1 -1
  87. package/frontend/dist/assets/index-8945f70e.css +0 -1
  88. package/frontend/dist/assets/index-a8d4265c.js +0 -543
@@ -0,0 +1,313 @@
1
+ var Iy=Object.defineProperty;var Dy=(e,t,r)=>t in e?Iy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ft=(e,t,r)=>(Dy(e,typeof t!="symbol"?t+"":t,r),r);import{a as Py,g as Ry,_ as mt}from"./index-e2bcee83.js";var Wc=Object.defineProperty,p=(e,t)=>Wc(e,"name",{value:t,configurable:!0}),Ny=(e,t)=>{for(var r in t)Wc(e,r,{get:t[r],enumerable:!0})},zc={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Py,function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",y="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var A=["th","st","nd","rd"],B=O%100;return"["+O+(A[(B-20)%10]||A[B]||A[0])+"]"}},k=function(O,A,B){var $=String(O);return!$||$.length>=A?O:""+Array(A+1-$.length).join(B)+O},w={s:k,z:function(O){var A=-O.utcOffset(),B=Math.abs(A),$=Math.floor(B/60),E=B%60;return(A<=0?"+":"-")+k($,2,"0")+":"+k(E,2,"0")},m:function O(A,B){if(A.date()<B.date())return-O(B,A);var $=12*(B.year()-A.year())+(B.month()-A.month()),E=A.clone().add($,u),q=B-E<0,Y=A.clone().add($+(q?-1:1),u);return+(-($+(B-E)/(q?E-Y:Y-E))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:u,y:d,w:h,d:c,D:y,h:l,m:n,s:a,ms:o,Q:f}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},S="en",_={};_[S]=b;var F="$isDayjsObject",v=function(O){return O instanceof U||!(!O||!O[F])},z=function O(A,B,$){var E;if(!A)return S;if(typeof A=="string"){var q=A.toLowerCase();_[q]&&(E=q),B&&(_[q]=B,E=q);var Y=A.split("-");if(!E&&Y.length>1)return O(Y[0])}else{var G=A.name;_[G]=A,E=G}return!$&&E&&(S=E),E||!$&&S},N=function(O,A){if(v(O))return O.clone();var B=typeof A=="object"?A:{};return B.date=O,B.args=arguments,new U(B)},M=w;M.l=z,M.i=v,M.w=function(O,A){return N(O,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var U=function(){function O(B){this.$L=z(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[F]=!0}var A=O.prototype;return A.parse=function(B){this.$d=function($){var E=$.date,q=$.utc;if(E===null)return new Date(NaN);if(M.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var Y=E.match(m);if(Y){var G=Y[2]-1||0,et=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)}}return new Date(E)}(B),this.init()},A.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},A.$utils=function(){return M},A.isValid=function(){return this.$d.toString()!==g},A.isSame=function(B,$){var E=N(B);return this.startOf($)<=E&&E<=this.endOf($)},A.isAfter=function(B,$){return N(B)<this.startOf($)},A.isBefore=function(B,$){return this.endOf($)<N(B)},A.$g=function(B,$,E){return M.u(B)?this[$]:this.set(E,B)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(B,$){var E=this,q=!!M.u($)||$,Y=M.p(B),G=function(Lt,Z){var V=M.w(E.$u?Date.UTC(E.$y,Z,Lt):new Date(E.$y,Z,Lt),E);return q?V:V.endOf(c)},et=function(Lt,Z){return M.w(E.toDate()[Lt].apply(E.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(Z)),E)},lt=this.$W,at=this.$M,ut=this.$D,bt="set"+(this.$u?"UTC":"");switch(Y){case d:return q?G(1,0):G(31,11);case u:return q?G(1,at):G(0,at+1);case h:var Ct=this.$locale().weekStart||0,Bt=(lt<Ct?lt+7:lt)-Ct;return G(q?ut-Bt:ut+(6-Bt),at);case c:case y:return et(bt+"Hours",0);case l:return et(bt+"Minutes",1);case n:return et(bt+"Seconds",2);case a:return et(bt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(B){return this.startOf(B,!1)},A.$set=function(B,$){var E,q=M.p(B),Y="set"+(this.$u?"UTC":""),G=(E={},E[c]=Y+"Date",E[y]=Y+"Date",E[u]=Y+"Month",E[d]=Y+"FullYear",E[l]=Y+"Hours",E[n]=Y+"Minutes",E[a]=Y+"Seconds",E[o]=Y+"Milliseconds",E)[q],et=q===c?this.$D+($-this.$W):$;if(q===u||q===d){var lt=this.clone().set(y,1);lt.$d[G](et),lt.init(),this.$d=lt.set(y,Math.min(this.$D,lt.daysInMonth())).$d}else G&&this.$d[G](et);return this.init(),this},A.set=function(B,$){return this.clone().$set(B,$)},A.get=function(B){return this[M.p(B)]()},A.add=function(B,$){var E,q=this;B=Number(B);var Y=M.p($),G=function(at){var ut=N(q);return M.w(ut.date(ut.date()+Math.round(at*B)),q)};if(Y===u)return this.set(u,this.$M+B);if(Y===d)return this.set(d,this.$y+B);if(Y===c)return G(1);if(Y===h)return G(7);var et=(E={},E[n]=i,E[l]=s,E[a]=r,E)[Y]||1,lt=this.$d.getTime()+B*et;return M.w(lt,this)},A.subtract=function(B,$){return this.add(-1*B,$)},A.format=function(B){var $=this,E=this.$locale();if(!this.isValid())return E.invalidDate||g;var q=B||"YYYY-MM-DDTHH:mm:ssZ",Y=M.z(this),G=this.$H,et=this.$m,lt=this.$M,at=E.weekdays,ut=E.months,bt=E.meridiem,Ct=function(Z,V,gt,nt){return Z&&(Z[V]||Z($,q))||gt[V].slice(0,nt)},Bt=function(Z){return M.s(G%12||12,Z,"0")},Lt=bt||function(Z,V,gt){var nt=Z<12?"AM":"PM";return gt?nt.toLowerCase():nt};return q.replace(C,function(Z,V){return V||function(gt){switch(gt){case"YY":return String($.$y).slice(-2);case"YYYY":return M.s($.$y,4,"0");case"M":return lt+1;case"MM":return M.s(lt+1,2,"0");case"MMM":return Ct(E.monthsShort,lt,ut,3);case"MMMM":return Ct(ut,lt);case"D":return $.$D;case"DD":return M.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Ct(E.weekdaysMin,$.$W,at,2);case"ddd":return Ct(E.weekdaysShort,$.$W,at,3);case"dddd":return at[$.$W];case"H":return String(G);case"HH":return M.s(G,2,"0");case"h":return Bt(1);case"hh":return Bt(2);case"a":return Lt(G,et,!0);case"A":return Lt(G,et,!1);case"m":return String(et);case"mm":return M.s(et,2,"0");case"s":return String($.$s);case"ss":return M.s($.$s,2,"0");case"SSS":return M.s($.$ms,3,"0");case"Z":return Y}return null}(Z)||Y.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(B,$,E){var q,Y=this,G=M.p($),et=N(B),lt=(et.utcOffset()-this.utcOffset())*i,at=this-et,ut=function(){return M.m(Y,et)};switch(G){case d:q=ut()/12;break;case u:q=ut();break;case f:q=ut()/3;break;case h:q=(at-lt)/6048e5;break;case c:q=(at-lt)/864e5;break;case l:q=at/s;break;case n:q=at/i;break;case a:q=at/r;break;default:q=at}return E?q:M.a(q)},A.daysInMonth=function(){return this.endOf(u).$D},A.$locale=function(){return _[this.$L]},A.locale=function(B,$){if(!B)return this.$L;var E=this.clone(),q=z(B,$,!0);return q&&(E.$L=q),E},A.clone=function(){return M.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},O}(),W=U.prototype;return N.prototype=W,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",y]].forEach(function(O){W[O[1]]=function(A){return this.$g(A,O[0],O[1])}}),N.extend=function(O,A){return O.$i||(O(A,U,N),O.$i=!0),N},N.locale=z,N.isDayjs=v,N.unix=function(O){return N(1e3*O)},N.en=_[S],N.Ls=_,N.p={},N})})(zc);var qy=zc.exports;const Wy=Ry(qy);var Ye={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},H={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Dn=p(function(e="fatal"){let t=Ye.fatal;typeof e=="string"?e.toLowerCase()in Ye&&(t=Ye[e]):typeof e=="number"&&(t=e),H.trace=()=>{},H.debug=()=>{},H.info=()=>{},H.warn=()=>{},H.error=()=>{},H.fatal=()=>{},t<=Ye.fatal&&(H.fatal=console.error?console.error.bind(console,ge("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ge("FATAL"))),t<=Ye.error&&(H.error=console.error?console.error.bind(console,ge("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ge("ERROR"))),t<=Ye.warn&&(H.warn=console.warn?console.warn.bind(console,ge("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ge("WARN"))),t<=Ye.info&&(H.info=console.info?console.info.bind(console,ge("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ge("INFO"))),t<=Ye.debug&&(H.debug=console.debug?console.debug.bind(console,ge("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("DEBUG"))),t<=Ye.trace&&(H.trace=console.debug?console.debug.bind(console,ge("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("TRACE")))},"setLogLevel"),ge=p(e=>`%c${Wy().format("ss.SSS")} : ${e} : `,"format");const Ns={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return Ns.hue2rgb(o,s,e+1/3)*255;case"g":return Ns.hue2rgb(o,s,e)*255;case"b":return Ns.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},zy=Ns,Hy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Yy=Hy,Uy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Gy=Uy,jy={channel:zy,lang:Yy,unit:Gy},pt=jy,ir={};for(let e=0;e<=255;e++)ir[e]=pt.unit.dec2hex(e);const Zt={ALL:0,RGB:1,HSL:2};class Xy{constructor(){this.type=Zt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Zt.ALL}is(t){return this.type===t}}const Vy=Xy;class Zy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Vy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Zt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=pt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=pt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=pt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=pt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=pt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=pt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),pt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),pt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Zt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Zt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Zt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Zt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Zt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Zt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ky=Zy,Qy=new Ky({r:0,g:0,b:0,a:0},"transparent"),Mo=Qy,Hc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Hc.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return Mo.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${ir[Math.round(t)]}${ir[Math.round(r)]}${ir[Math.round(i)]}${ir[Math.round(s*255)]}`:`#${ir[Math.round(t)]}${ir[Math.round(r)]}${ir[Math.round(i)]}`}},Ei=Hc,qs={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(qs.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return pt.channel.clamp.h(parseFloat(r)*.9);case"rad":return pt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return pt.channel.clamp.h(parseFloat(r)*360)}}return pt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(qs.re);if(!r)return;const[,i,s,o,a,n]=r;return Mo.set({h:qs._hue2deg(i),s:pt.channel.clamp.s(parseFloat(s)),l:pt.channel.clamp.l(parseFloat(o)),a:a?pt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${pt.lang.round(t)}, ${pt.lang.round(r)}%, ${pt.lang.round(i)}%, ${s})`:`hsl(${pt.lang.round(t)}, ${pt.lang.round(r)}%, ${pt.lang.round(i)}%)`}},_s=qs,Ws={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ws.colors[e];if(t)return Ei.parse(t)},stringify:e=>{const t=Ei.stringify(e);for(const r in Ws.colors)if(Ws.colors[r]===t)return r}},oh=Ws,Yc={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Yc.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return Mo.set({r:pt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:pt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:pt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?pt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${pt.lang.round(t)}, ${pt.lang.round(r)}, ${pt.lang.round(i)}, ${pt.lang.round(s)})`:`rgb(${pt.lang.round(t)}, ${pt.lang.round(r)}, ${pt.lang.round(i)})`}},Bs=Yc,Jy={format:{keyword:oh,hex:Ei,rgb:Bs,rgba:Bs,hsl:_s,hsla:_s},parse:e=>{if(typeof e!="string")return e;const t=Ei.parse(e)||Bs.parse(e)||_s.parse(e)||oh.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Zt.HSL)||e.data.r===void 0?_s.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Bs.stringify(e):Ei.stringify(e)},De=Jy,t0=(e,t)=>{const r=De.parse(e);for(const i in t)r[i]=pt.channel.clamp[i](t[i]);return De.stringify(r)},Uc=t0,e0=(e,t,r=0,i=1)=>{if(typeof e!="number")return Uc(e,{a:t});const s=Mo.set({r:pt.channel.clamp.r(e),g:pt.channel.clamp.g(t),b:pt.channel.clamp.b(r),a:pt.channel.clamp.a(i)});return De.stringify(s)},lr=e0,r0=e=>{const{r:t,g:r,b:i}=De.parse(e),s=.2126*pt.channel.toLinear(t)+.7152*pt.channel.toLinear(r)+.0722*pt.channel.toLinear(i);return pt.lang.round(s)},i0=r0,s0=e=>i0(e)>=.5,o0=s0,a0=e=>!o0(e),Be=a0,n0=(e,t,r)=>{const i=De.parse(e),s=i[t],o=pt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),De.stringify(i)},Gc=n0,l0=(e,t)=>Gc(e,"l",t),P=l0,h0=(e,t)=>Gc(e,"l",-t),R=h0,c0=(e,t)=>{const r=De.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Uc(e,i)},x=c0,u0=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=De.parse(e),{r:n,g:l,b:c,a:h}=De.parse(t),u=r/100,f=u*2-1,d=a-h,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,m=1-g,C=i*g+n*m,b=s*g+l*m,k=o*g+c*m,w=a*u+h*(1-u);return lr(C,b,k,w)},d0=u0,f0=(e,t=100)=>{const r=De.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,d0(r,e,t)},L=f0;/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function ah(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function p0(e){if(Array.isArray(e))return e}function g0(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,o,a,n=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(i=o.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw s}}return n}}function m0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y0(e,t){return p0(e)||g0(e,t)||C0(e,t)||m0()}function C0(e,t){if(e){if(typeof e=="string")return ah(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ah(e,t):void 0}}const jc=Object.entries,nh=Object.setPrototypeOf,x0=Object.isFrozen,b0=Object.getPrototypeOf,k0=Object.getOwnPropertyDescriptor;let Xt=Object.freeze,Vt=Object.seal,Yr=Object.create,Xc=typeof Reflect<"u"&&Reflect,Ia=Xc.apply,Da=Xc.construct;Xt||(Xt=function(t){return t});Vt||(Vt=function(t){return t});Ia||(Ia=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return t.apply(r,s)});Da||(Da=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const fi=Pt(Array.prototype.forEach),T0=Pt(Array.prototype.lastIndexOf),lh=Pt(Array.prototype.pop),qr=Pt(Array.prototype.push),w0=Pt(Array.prototype.splice),or=Array.isArray,wi=Pt(String.prototype.toLowerCase),ga=Pt(String.prototype.toString),hh=Pt(String.prototype.match),pi=Pt(String.prototype.replace),ch=Pt(String.prototype.indexOf),S0=Pt(String.prototype.trim),_0=Pt(Number.prototype.toString),B0=Pt(Boolean.prototype.toString),uh=typeof BigInt>"u"?null:Pt(BigInt.prototype.toString),dh=typeof Symbol>"u"?null:Pt(Symbol.prototype.toString),Wt=Pt(Object.prototype.hasOwnProperty),gi=Pt(Object.prototype.toString),Ut=Pt(RegExp.prototype.test),yr=v0(TypeError);function Pt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return Ia(e,t,i)}}function v0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Da(e,r)}}function Tt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wi;if(nh&&nh(e,null),!or(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const o=r(s);o!==s&&(x0(t)||(t[i]=o),s=o)}e[s]=!0}return e}function L0(e){for(let t=0;t<e.length;t++)Wt(e,t)||(e[t]=null);return e}function re(e){const t=Yr(null);for(const i of jc(e)){var r=y0(i,2);const s=r[0],o=r[1];Wt(e,s)&&(or(o)?t[s]=L0(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=re(o):t[s]=o)}return t}function F0(e){switch(typeof e){case"string":return e;case"number":return _0(e);case"boolean":return B0(e);case"bigint":return uh?uh(e):"0";case"symbol":return dh?dh(e):"Symbol()";case"undefined":return gi(e);case"function":case"object":{if(e===null)return gi(e);const t=e,r=Ee(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:gi(i)}return gi(e)}default:return gi(e)}}function Ee(e,t){for(;e!==null;){const i=k0(e,t);if(i){if(i.get)return Pt(i.get);if(typeof i.value=="function")return Pt(i.value)}e=b0(e)}function r(){return null}return r}function A0(e){try{return Ut(e,""),!0}catch{return!1}}const fh=Xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ma=Xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ya=Xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E0=Xt(["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"]),Ca=Xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M0=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ph=Xt(["#text"]),gh=Xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),xa=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mh=Xt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),vs=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$0=Vt(/{{[\w\W]*|^[\w\W]*}}/g),O0=Vt(/<%[\w\W]*|^[\w\W]*%>/g),I0=Vt(/\${[\w\W]*/g),D0=Vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),P0=Vt(/^aria-[\-\w]+$/),yh=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),R0=Vt(/^(?:\w+script|data):/i),N0=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q0=Vt(/^html$/i),W0=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i),Ch=Vt(/<[/\w!]/g),z0=Vt(/<[/\w]/g),H0=Vt(/<\/no(script|embed|frames)/i),Y0=Vt(/\/>/i),Ae={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},U0=function(){return typeof window>"u"?null:window},G0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},xh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rr=function(t,r,i,s){return Wt(t,r)&&or(t[r])?Tt(s.base?re(s.base):{},t[r],s.transform):i};function Vc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:U0();const t=X=>Vc(X);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Ae.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,u=e.trustedTypes,f=n.prototype,d=Ee(f,"cloneNode"),y=Ee(f,"remove"),g=Ee(f,"nextSibling"),m=Ee(f,"childNodes"),C=Ee(f,"parentNode"),b=Ee(f,"shadowRoot"),k=Ee(f,"attributes"),w=a&&a.prototype?Ee(a.prototype,"nodeType"):null,S=a&&a.prototype?Ee(a.prototype,"nodeName"):null;if(typeof o=="function"){const X=r.createElement("template");X.content&&X.content.ownerDocument&&(r=X.content.ownerDocument)}let _,F="",v,z=!1,N=0;const M=function(){if(N>0)throw yr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},U=function(T){M(),N++;try{return _.createHTML(T)}finally{N--}},W=function(T){M(),N++;try{return _.createScriptURL(T)}finally{N--}},O=function(){return z||(v=G0(u,s),z=!0),v},A=r,B=A.implementation,$=A.createNodeIterator,E=A.createDocumentFragment,q=A.getElementsByTagName,Y=i.importNode;let G=xh();t.isSupported=typeof jc=="function"&&typeof C=="function"&&B&&B.createHTMLDocument!==void 0;const et=$0,lt=O0,at=I0,ut=D0,bt=P0,Ct=R0,Bt=N0,Lt=W0;let Z=yh,V=null;const gt=Tt({},[...fh,...ma,...ya,...Ca,...ph]);let nt=null;const D=Tt({},[...gh,...xa,...mh,...vs]);let K=Object.seal(Yr(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}})),Je=null,Ko=null;const fe=Object.seal(Yr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Rl=!0,Qo=!0,Nl=!1,ql=!0,tr=!1,ci=!0,gr=!1,Jo=!1,ta=null,ea=null,ra=!1,Ir=!1,Cs=!1,xs=!1,Wl=!0,zl=!1;const Hl="user-content-";let ia=!0,sa=!1,Dr={},Le=null;const oa=Tt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Yl=null;const Ul=Tt({},["audio","video","img","source","image","track"]);let aa=null;const Gl=Tt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bs="http://www.w3.org/1998/Math/MathML",ks="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let Pr=Fe,na=!1,la=null;const xy=Tt({},[bs,ks,Fe],ga),jl=Xt(["mi","mo","mn","ms","mtext"]);let ha=Tt({},jl);const Xl=Xt(["annotation-xml"]);let ca=Tt({},Xl);const by=Tt({},["title","style","font","a","script"]);let ui=null;const ky=["application/xhtml+xml","text/html"],Ty="text/html";let Mt=null,Rr=null;const wy=r.createElement("form"),Vl=function(T){return T instanceof RegExp||T instanceof Function},ua=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rr&&Rr===T)return;(!T||typeof T!="object")&&(T={}),T=re(T),ui=ky.indexOf(T.PARSER_MEDIA_TYPE)===-1?Ty:T.PARSER_MEDIA_TYPE,Mt=ui==="application/xhtml+xml"?ga:wi,V=rr(T,"ALLOWED_TAGS",gt,{transform:Mt}),nt=rr(T,"ALLOWED_ATTR",D,{transform:Mt}),la=rr(T,"ALLOWED_NAMESPACES",xy,{transform:ga}),aa=rr(T,"ADD_URI_SAFE_ATTR",Gl,{transform:Mt,base:Gl}),Yl=rr(T,"ADD_DATA_URI_TAGS",Ul,{transform:Mt,base:Ul}),Le=rr(T,"FORBID_CONTENTS",oa,{transform:Mt}),Je=rr(T,"FORBID_TAGS",re({}),{transform:Mt}),Ko=rr(T,"FORBID_ATTR",re({}),{transform:Mt}),Dr=Wt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?re(T.USE_PROFILES):T.USE_PROFILES:!1,Rl=T.ALLOW_ARIA_ATTR!==!1,Qo=T.ALLOW_DATA_ATTR!==!1,Nl=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ql=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,tr=T.SAFE_FOR_TEMPLATES||!1,ci=T.SAFE_FOR_XML!==!1,gr=T.WHOLE_DOCUMENT||!1,Ir=T.RETURN_DOM||!1,Cs=T.RETURN_DOM_FRAGMENT||!1,xs=T.RETURN_TRUSTED_TYPE||!1,ra=T.FORCE_BODY||!1,Wl=T.SANITIZE_DOM!==!1,zl=T.SANITIZE_NAMED_PROPS||!1,ia=T.KEEP_CONTENT!==!1,sa=T.IN_PLACE||!1,Z=A0(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:yh,Pr=typeof T.NAMESPACE=="string"?T.NAMESPACE:Fe,ha=Wt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?re(T.MATHML_TEXT_INTEGRATION_POINTS):Tt({},jl),ca=Wt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?re(T.HTML_INTEGRATION_POINTS):Tt({},Xl);const I=Wt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?re(T.CUSTOM_ELEMENT_HANDLING):Yr(null);if(K=Yr(null),Wt(I,"tagNameCheck")&&Vl(I.tagNameCheck)&&(K.tagNameCheck=I.tagNameCheck),Wt(I,"attributeNameCheck")&&Vl(I.attributeNameCheck)&&(K.attributeNameCheck=I.attributeNameCheck),Wt(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),Vt(K),tr&&(Qo=!1),Cs&&(Ir=!0),Dr&&(V=Tt({},ph),nt=Yr(null),Dr.html===!0&&(Tt(V,fh),Tt(nt,gh)),Dr.svg===!0&&(Tt(V,ma),Tt(nt,xa),Tt(nt,vs)),Dr.svgFilters===!0&&(Tt(V,ya),Tt(nt,xa),Tt(nt,vs)),Dr.mathMl===!0&&(Tt(V,Ca),Tt(nt,mh),Tt(nt,vs))),fe.tagCheck=null,fe.attributeCheck=null,Wt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?fe.tagCheck=T.ADD_TAGS:or(T.ADD_TAGS)&&(V===gt&&(V=re(V)),Tt(V,T.ADD_TAGS,Mt))),Wt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?fe.attributeCheck=T.ADD_ATTR:or(T.ADD_ATTR)&&(nt===D&&(nt=re(nt)),Tt(nt,T.ADD_ATTR,Mt))),Wt(T,"ADD_URI_SAFE_ATTR")&&or(T.ADD_URI_SAFE_ATTR)&&Tt(aa,T.ADD_URI_SAFE_ATTR,Mt),Wt(T,"FORBID_CONTENTS")&&or(T.FORBID_CONTENTS)&&(Le===oa&&(Le=re(Le)),Tt(Le,T.FORBID_CONTENTS,Mt)),Wt(T,"ADD_FORBID_CONTENTS")&&or(T.ADD_FORBID_CONTENTS)&&(Le===oa&&(Le=re(Le)),Tt(Le,T.ADD_FORBID_CONTENTS,Mt)),ia&&(V["#text"]=!0),gr&&Tt(V,["html","head","body"]),V.table&&(Tt(V,["tbody"]),delete Je.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const j=_;_=T.TRUSTED_TYPES_POLICY;try{F=U("")}catch(st){throw _=j,st}}else T.TRUSTED_TYPES_POLICY===null?(_=void 0,F=""):(_===void 0&&(_=O()),_&&typeof F=="string"&&(F=U("")));Xt&&Xt(T),Rr=T},Zl=Tt({},[...ma,...ya,...E0]),Kl=Tt({},[...Ca,...M0]),Sy=function(T,I,j){return I.namespaceURI===Fe?T==="svg":I.namespaceURI===bs?T==="svg"&&(j==="annotation-xml"||ha[j]):!!Zl[T]},_y=function(T,I,j){return I.namespaceURI===Fe?T==="math":I.namespaceURI===ks?T==="math"&&ca[j]:!!Kl[T]},By=function(T,I,j){return I.namespaceURI===ks&&!ca[j]||I.namespaceURI===bs&&!ha[j]?!1:!Kl[T]&&(by[T]||!Zl[T])},vy=function(T){let I=C(T);(!I||!I.tagName)&&(I={namespaceURI:Pr,tagName:"template"});const j=wi(T.tagName),st=wi(I.tagName);return la[T.namespaceURI]?T.namespaceURI===ks?Sy(j,I,st):T.namespaceURI===bs?_y(j,I,st):T.namespaceURI===Fe?By(j,I,st):!!(ui==="application/xhtml+xml"&&la[T.namespaceURI]):!1},er=function(T){qr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(y(T),!C(T))throw yr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ql=function(T){const I=m(T);if(I){const st=[];fi(I,xt=>{qr(st,xt)}),fi(st,xt=>{try{y(xt)}catch{}})}const j=k(T);if(j)for(let st=j.length-1;st>=0;--st){const xt=j[st],wt=xt&&xt.name;if(typeof wt=="string")try{T.removeAttribute(wt)}catch{}}},mr=function(T,I){try{qr(t.removed,{attribute:I.getAttributeNode(T),from:I})}catch{qr(t.removed,{attribute:null,from:I})}if(I.removeAttribute(T),T==="is")if(Ir||Cs)try{er(I)}catch{}else try{I.setAttribute(T,"")}catch{}},Ly=function(T){const I=k(T);if(I)for(let j=I.length-1;j>=0;--j){const st=I[j],xt=st&&st.name;if(!(typeof xt!="string"||nt[Mt(xt)]))try{T.removeAttribute(xt)}catch{}}},Fy=function(T){const I=[T];for(;I.length>0;){const j=I.pop();(w?w(j):j.nodeType)===Ae.element&&Ly(j);const xt=m(j);if(xt)for(let wt=xt.length-1;wt>=0;--wt)I.push(xt[wt])}},Jl=function(T){let I=null,j=null;if(ra)T="<remove></remove>"+T;else{const wt=hh(T,/^[\r\n\t ]+/);j=wt&&wt[0]}ui==="application/xhtml+xml"&&Pr===Fe&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const st=_?U(T):T;if(Pr===Fe)try{I=new h().parseFromString(st,ui)}catch{}if(!I||!I.documentElement){I=B.createDocument(Pr,"template",null);try{I.documentElement.innerHTML=na?F:st}catch{}}const xt=I.body||I.documentElement;return T&&j&&xt.insertBefore(r.createTextNode(j),xt.childNodes[0]||null),Pr===Fe?q.call(I,gr?"html":"body")[0]:gr?I.documentElement:xt},th=function(T){return $.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ts=function(T){return T=pi(T,et," "),T=pi(T,lt," "),T=pi(T,at," "),T},da=function(T){var I;T.normalize();const j=$.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let st=j.nextNode();for(;st;)st.data=Ts(st.data),st=j.nextNode();const xt=(I=T.querySelectorAll)===null||I===void 0?void 0:I.call(T,"template");xt&&fi(xt,wt=>{Nr(wt.content)&&da(wt.content)})},ws=function(T){const I=S?S(T):null;return typeof I!="string"||Mt(I)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==w(T)||T.childNodes!==m(T)},Nr=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===Ae.documentFragment}catch{return!1}},di=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function He(X,T,I){X.length!==0&&fi(X,j=>{j.call(t,T,I,Rr)})}const Ay=function(T,I){return!!(ci&&T.hasChildNodes()&&!di(T.firstElementChild)&&Ut(Ch,T.textContent)&&Ut(Ch,T.innerHTML)||ci&&T.namespaceURI===Fe&&I==="style"&&di(T.firstElementChild)||T.nodeType===Ae.processingInstruction||ci&&T.nodeType===Ae.comment&&Ut(z0,T.data))},Ey=function(T,I){if(!Je[I]&&ih(I)&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,I)||K.tagNameCheck instanceof Function&&K.tagNameCheck(I)))return!1;if(ia&&!Le[I]){const j=C(T),st=m(T);if(st&&j){const xt=st.length;for(let wt=xt-1;wt>=0;--wt){const qt=sa?st[wt]:d(st[wt],!0);j.insertBefore(qt,g(T))}}}return er(T),!0},eh=function(T){if(He(G.beforeSanitizeElements,T,null),ws(T))return er(T),!0;const I=Mt(S?S(T):T.nodeName);if(He(G.uponSanitizeElement,T,{tagName:I,allowedTags:V}),Ay(T,I))return er(T),!0;if(Je[I]||!(fe.tagCheck instanceof Function&&fe.tagCheck(I))&&!V[I])return Ey(T,I);if((w?w(T):T.nodeType)===Ae.element&&!vy(T)||(I==="noscript"||I==="noembed"||I==="noframes")&&Ut(H0,T.innerHTML))return er(T),!0;if(tr&&T.nodeType===Ae.text){const st=Ts(T.textContent);T.textContent!==st&&(qr(t.removed,{element:T.cloneNode()}),T.textContent=st)}return He(G.afterSanitizeElements,T,null),!1},rh=function(T,I,j){if(Ko[I]||Wl&&(I==="id"||I==="name")&&(j in r||j in wy))return!1;const st=nt[I]||fe.attributeCheck instanceof Function&&fe.attributeCheck(I,T);if(!(Qo&&Ut(ut,I))){if(!(Rl&&Ut(bt,I))){if(st){if(!aa[I]){if(!Ut(Z,pi(j,Bt,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&T!=="script"&&ch(j,"data:")===0&&Yl[T])){if(!(Nl&&!Ut(Ct,pi(j,Bt,"")))){if(j)return!1}}}}}else if(!(ih(T)&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,T)||K.tagNameCheck instanceof Function&&K.tagNameCheck(T))&&(K.attributeNameCheck instanceof RegExp&&Ut(K.attributeNameCheck,I)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(I,T))||I==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Ut(K.tagNameCheck,j)||K.tagNameCheck instanceof Function&&K.tagNameCheck(j))))return!1}}return!0},My=Tt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ih=function(T){return!My[wi(T)]&&Ut(Lt,T)},$y=function(T,I,j,st){if(_&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!j)switch(u.getAttributeType(T,I)){case"TrustedHTML":return U(st);case"TrustedScriptURL":return W(st)}return st},Oy=function(T,I,j,st){try{j?T.setAttributeNS(j,I,st):T.setAttribute(I,st),ws(T)?er(T):lh(t.removed)}catch{mr(I,T)}},sh=function(T){He(G.beforeSanitizeAttributes,T,null);const I=T.attributes;if(!I||ws(T))return;const j={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let st=I.length;const xt=Mt(T.nodeName);for(;st--;){const wt=I[st],qt=wt.name,It=wt.namespaceURI,pe=wt.value,ye=Mt(qt),pa=pe;let ee=qt==="value"?pa:S0(pa);if(j.attrName=ye,j.attrValue=ee,j.keepAttr=!0,j.forceKeepAttr=void 0,He(G.uponSanitizeAttribute,T,j),ee=j.attrValue,zl&&(ye==="id"||ye==="name")&&ch(ee,Hl)!==0&&(mr(qt,T),ee=Hl+ee),ci&&Ut(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ee)){mr(qt,T);continue}if(ye==="attributename"&&hh(ee,"href")){mr(qt,T);continue}if(!j.forceKeepAttr){if(!j.keepAttr){mr(qt,T);continue}if(!ql&&Ut(Y0,ee)){mr(qt,T);continue}if(tr&&(ee=Ts(ee)),!rh(xt,ye,ee)){mr(qt,T);continue}ee=$y(xt,ye,It,ee),ee!==pa&&Oy(T,qt,It,ee)}}He(G.afterSanitizeAttributes,T,null)},Ss=function(T){let I=null;const j=th(T);for(He(G.beforeSanitizeShadowDOM,T,null);I=j.nextNode();)if(He(G.uponSanitizeShadowNode,I,null),eh(I),sh(I),Nr(I.content)&&Ss(I.content),(w?w(I):I.nodeType)===Ae.element){const xt=b(I);Nr(xt)&&(fa(xt),Ss(xt))}He(G.afterSanitizeShadowDOM,T,null)},fa=function(T){const I=[{node:T,shadow:null}];for(;I.length>0;){const j=I.pop();if(j.shadow){Ss(j.shadow);continue}const st=j.node,wt=(w?w(st):st.nodeType)===Ae.element,qt=m(st);if(qt)for(let It=qt.length-1;It>=0;--It)I.push({node:qt[It],shadow:null});if(wt){const It=S?S(st):null;if(typeof It=="string"&&Mt(It)==="template"){const pe=st.content;Nr(pe)&&I.push({node:pe,shadow:null})}}if(wt){const It=b(st);Nr(It)&&I.push({node:null,shadow:It},{node:It,shadow:null})}}};return t.sanitize=function(X){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,j=null,st=null,xt=null;if(na=!X,na&&(X="<!-->"),typeof X!="string"&&!di(X)&&(X=F0(X),typeof X!="string"))throw yr("dirty is not a string, aborting");if(!t.isSupported)return X;Jo?(V=ta,nt=ea):ua(T),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(V=re(V)),G.uponSanitizeAttribute.length>0&&(nt=re(nt)),t.removed=[];const wt=sa&&typeof X!="string"&&di(X);if(wt){const pe=S?S(X):X.nodeName;if(typeof pe=="string"){const ye=Mt(pe);if(!V[ye]||Je[ye])throw yr("root node is forbidden and cannot be sanitized in-place")}if(ws(X))throw yr("root node is clobbered and cannot be sanitized in-place");try{fa(X)}catch(ye){throw Ql(X),ye}}else if(di(X))I=Jl("<!---->"),j=I.ownerDocument.importNode(X,!0),j.nodeType===Ae.element&&j.nodeName==="BODY"||j.nodeName==="HTML"?I=j:I.appendChild(j),fa(j);else{if(!Ir&&!tr&&!gr&&X.indexOf("<")===-1)return _&&xs?U(X):X;if(I=Jl(X),!I)return Ir?null:xs?F:""}I&&ra&&er(I.firstChild);const qt=th(wt?X:I);try{for(;st=qt.nextNode();)eh(st),sh(st),Nr(st.content)&&Ss(st.content)}catch(pe){throw wt&&Ql(X),pe}if(wt)return fi(t.removed,pe=>{pe.element&&Fy(pe.element)}),tr&&da(X),X;if(Ir){if(tr&&da(I),Cs)for(xt=E.call(I.ownerDocument);I.firstChild;)xt.appendChild(I.firstChild);else xt=I;return(nt.shadowroot||nt.shadowrootmode)&&(xt=Y.call(i,xt,!0)),xt}let It=gr?I.outerHTML:I.innerHTML;return gr&&V["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Ut(q0,I.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
3
+ `+It),tr&&(It=Ts(It)),_&&xs?U(It):It},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ua(X),Jo=!0,ta=V,ea=nt},t.clearConfig=function(){Rr=null,Jo=!1,ta=null,ea=null,_=v,F=""},t.isValidAttribute=function(X,T,I){Rr||ua({});const j=Mt(X),st=Mt(T);return rh(j,st,I)},t.addHook=function(X,T){typeof T=="function"&&Wt(G,X)&&qr(G[X],T)},t.removeHook=function(X,T){if(Wt(G,X)){if(T!==void 0){const I=T0(G[X],T);return I===-1?void 0:w0(G[X],I,1)[0]}return lh(G[X])}},t.removeHooks=function(X){Wt(G,X)&&(G[X]=[])},t.removeAllHooks=function(){G=xh()},t}var Qr=Vc(),Pa=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>Pa(e,o,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]=="object"&&t[o]!==null&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=Pa(e[o],t[o],{depth:r-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)},"assignWithDepth"),Rt=Pa,Re="#ffffff",Ne="#f2f2f2",ft=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Vi,j0=(Vi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,o,a,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,at,ut,bt,Ct,Bt,Lt,Z,V,gt,nt,D;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this["cScale"+K]=R(this["cScale"+K],75);else for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this["cScale"+K]=R(this["cScale"+K],25);for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this["cScaleInv"+K]=this["cScaleInv"+K]||L(this["cScale"+K]);for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this.darkMode?this["cScalePeer"+K]=this["cScalePeer"+K]||P(this["cScale"+K],10):this["cScalePeer"+K]=this["cScalePeer"+K]||R(this["cScale"+K],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let K=0;K<this.THEME_COLOR_LIMIT;K++)this["cScaleLabel"+K]=this["cScaleLabel"+K]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let K=0;K<5;K++)this["surface"+K]=this["surface"+K]||x(this.mainBkg,{h:180,s:-15,l:t*(5+K*3)}),this["surfacePeer"+K]=this["surfacePeer"+K]||x(this.mainBkg,{h:180,s:-15,l:t*(8+K*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((f=this.cynefin)==null?void 0:f.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((S=this.radar)==null?void 0:S.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((F=this.radar)==null?void 0:F.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((z=this.radar)==null?void 0:z.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((U=this.wardley)==null?void 0:U.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((O=this.wardley)==null?void 0:O.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((B=this.wardley)==null?void 0:B.componentStroke)||this.lineColor,componentLabelColor:(($=this.wardley)==null?void 0:$.componentLabelColor)||this.primaryTextColor,linkStroke:((E=this.wardley)==null?void 0:E.linkStroke)||this.lineColor,evolutionStroke:((q=this.wardley)==null?void 0:q.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Y=this.wardley)==null?void 0:Y.annotationStroke)||this.lineColor,annotationTextColor:((G=this.wardley)==null?void 0:G.annotationTextColor)||this.primaryTextColor,annotationFill:((et=this.wardley)==null?void 0:et.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((lt=this.xyChart)==null?void 0:lt.backgroundColor)||this.background,titleColor:((at=this.xyChart)==null?void 0:at.titleColor)||this.primaryTextColor,dataLabelColor:((ut=this.xyChart)==null?void 0:ut.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((bt=this.xyChart)==null?void 0:bt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Z=this.xyChart)==null?void 0:Z.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((V=this.xyChart)==null?void 0:V.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((gt=this.xyChart)==null?void 0:gt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((nt=this.xyChart)==null?void 0:nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((D=this.xyChart)==null?void 0:D.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Vi,"Theme"),Vi),X0=p(e=>{const t=new j0;return t.calculate(e),t},"getThemeVariables"),Zi,V0=(Zi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=lr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=lr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||P(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,o,a,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,at,ut,bt,Ct,Bt,Lt,Z,V,gt,nt;this.secondBkg=P(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=P(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=P(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=L(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||L(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],10);for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,s:-30,l:-(-10+D*4)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,s:-30,l:-(-7+D*4)});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.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??P(this["cScale"+D],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#FF6B6B",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((W=this.radar)==null?void 0:W.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((q=this.radar)==null?void 0:q.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((G=this.radar)==null?void 0:G.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((ut=this.wardley)==null?void 0:ut.gridColor)||this.gridColor,componentFill:((bt=this.wardley)==null?void 0:bt.componentFill)||this.mainBkg,componentStroke:((Ct=this.wardley)==null?void 0:Ct.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((Lt=this.wardley)==null?void 0:Lt.linkStroke)||this.lineColor,evolutionStroke:((Z=this.wardley)==null?void 0:Z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((gt=this.wardley)==null?void 0:gt.annotationTextColor)||this.primaryTextColor,annotationFill:((nt=this.wardley)==null?void 0:nt.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=P(this.secondaryColor,20),this.git1=P(this.pie2||this.secondaryColor,20),this.git2=P(this.pie3||this.tertiaryColor,20),this.git3=P(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=P(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=P(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=P(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=P(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||P("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||P("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||P("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||P("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||P(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||P(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||P(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Zi,"Theme"),Zi),Z0=p(e=>{const t=new V0;return t.calculate(e),t},"getThemeVariables"),Ki,K0=(Ki=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=lr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,o,a,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,at,ut,bt,Ct,Bt,Lt,Z,V,gt,nt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=R(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||x(this["cScale"+D],{h:180});for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,l:-(7+D*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||P(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||P(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((M=this.wardley)==null?void 0:M.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.xyChart={backgroundColor:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((at=this.xyChart)==null?void 0:at.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ut=this.xyChart)==null?void 0:ut.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((V=this.xyChart)==null?void 0:V.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((gt=this.xyChart)==null?void 0:gt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((nt=this.xyChart)==null?void 0:nt.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ki,"Theme"),Ki),Q0=p(e=>{const t=new K0;return t.calculate(e),t},"getThemeVariables"),Qi,J0=(Qi=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=P("#cde498",10),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,o,a,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,at,ut,bt,Ct,Bt,Lt,Z,V,gt,nt;this.actorBorder=R(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=R(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||x(this["cScale"+D],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&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]||x(this.mainBkg,{h:30,s:-30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,s:-30,l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B4513",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((M=this.wardley)==null?void 0:M.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.xyChart={backgroundColor:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((at=this.xyChart)==null?void 0:at.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ut=this.xyChart)==null?void 0:ut.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((V=this.xyChart)==null?void 0:V.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((gt=this.xyChart)==null?void 0:gt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((nt=this.xyChart)==null?void 0:nt.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Qi,"Theme"),Qi),tC=p(e=>{const t=new J0;return t.calculate(e),t},"getThemeVariables"),Ji,eC=(Ji=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=P(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,o,a,n,l,c,h,u,f,d,y,g,m,C,b,k,w,S,_,F,v,z,N,M,U,W,O,A,B,$,E,q,Y,G,et,lt,at,ut,bt,Ct,Bt,Lt,Z,V,gt,nt;this.secondBkg=P(this.contrast,55),this.border2=this.contrast,this.actorBorder=P(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||L(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this.darkMode?this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],10):this["cScalePeer"+D]=this["cScalePeer"+D]||R(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]||x(this.mainBkg,{l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=P(this.contrast,30),this.sectionBkgColor2=P(this.contrast,30),this.taskBorderColor=R(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=P(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let 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";for(let D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??this["cScale"+D];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((W=this.radar)==null?void 0:W.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((q=this.radar)==null?void 0:q.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((G=this.radar)==null?void 0:G.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((ut=this.wardley)==null?void 0:ut.gridColor)||this.gridColor,componentFill:((bt=this.wardley)==null?void 0:bt.componentFill)||this.background,componentStroke:((Ct=this.wardley)==null?void 0:Ct.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((Lt=this.wardley)==null?void 0:Lt.linkStroke)||this.lineColor,evolutionStroke:((Z=this.wardley)==null?void 0:Z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((gt=this.wardley)==null?void 0:gt.annotationTextColor)||this.primaryTextColor,annotationFill:((nt=this.wardley)==null?void 0:nt.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ji,"Theme"),Ji),rC=p(e=>{const t=new eC;return t.calculate(e),t},"getThemeVariables"),ts,iC=(ts=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var o,a,n,l,c,h,u,f,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=R(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=R(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||P(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ts,"Theme"),ts),sC=p(e=>{const t=new iC;return t.calculate(e),t},"getThemeVariables"),es,oC=(es=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,o,a,n,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(es,"Theme"),es),aC=p(e=>{const t=new oC;return t.calculate(e),t},"getThemeVariables"),rs,nC=(rs=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ft("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,a,n,l,c,h,u,f,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=R(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=R(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||P(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(rs,"Theme"),rs),lC=p(e=>{const t=new nC;return t.calculate(e),t},"getThemeVariables"),is,hC=(is=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,o,a,n,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(is,"Theme"),is),cC=p(e=>{const t=new hC;return t.calculate(e),t},"getThemeVariables"),ss,uC=(ss=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var o,a,n,l,c,h,u,f,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||P(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ss,"Theme"),ss),dC=p(e=>{const t=new uC;return t.calculate(e),t},"getThemeVariables"),os,fC=(os=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=lr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,o,a,n,l,c,h,u,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=R(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Be(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ne}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(os,"Theme"),os),pC=p(e=>{const t=new fC;return t.calculate(e),t},"getThemeVariables"),Xe={base:{getThemeVariables:X0},dark:{getThemeVariables:Z0},default:{getThemeVariables:Q0},forest:{getThemeVariables:tC},neutral:{getThemeVariables:rC},neo:{getThemeVariables:sC},"neo-dark":{getThemeVariables:aC},redux:{getThemeVariables:lC},"redux-dark":{getThemeVariables:cC},"redux-color":{getThemeVariables:dC},"redux-dark-color":{getThemeVariables:pC}},Yt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Zc={...Yt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Xe.default.getThemeVariables(),sequence:{...Yt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Yt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Yt.pie,useWidth:984},xyChart:{...Yt.xyChart,useWidth:void 0},requirement:{...Yt.requirement,useWidth:void 0},packet:{...Yt.packet},eventmodeling:{...Yt.eventmodeling},treeView:{...Yt.treeView,useWidth:void 0},radar:{...Yt.radar},railroad:{...Yt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Yt.ishikawa},sankey:{...Yt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Yt.venn},cynefin:{...Yt.cynefin}},Kc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Kc(e[i],"")]:[...r,t+i],[]),"keyify"),gC=new Set(Kc(Zc,"")),Qc=Zc,mC={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},yC=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(H.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),to=p(e=>{if(H.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>to(t));return}for(const t of Object.keys(e)){if(H.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!gC.has(t)||e[t]==null){H.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=mC[t];i?yC(e[t],i):(H.debug("sanitizing object",t),to(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(H.debug("sanitizing css option",t),e[t]=Jc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}H.debug("After sanitization",e)}},"sanitizeDirective"),Jc=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Jr=Object.freeze(Qc),qe=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ne=Rt({},Jr),eo,Br=[],Mi=Rt({},Jr),$o=p((e,t)=>{let r=Rt({},e),i={};for(const s of t)ru(s),i=Rt(i,s);if(r=Rt(r,i),i.theme&&i.theme in Xe){const s=Rt({},eo),o=Rt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Xe&&(r.themeVariables=Xe[r.theme].getThemeVariables(o))}return Mi=r,su(Mi),Mi},"updateCurrentConfig"),CC=p(e=>(ne=Rt({},Jr),ne=Rt(ne,e),e.theme&&Xe[e.theme]&&(ne.themeVariables=Xe[e.theme].getThemeVariables(e.themeVariables)),$o(ne,Br),ne),"setSiteConfig"),xC=p(e=>{eo=Rt({},e)},"saveConfigFromInitialize"),bC=p(e=>(ne=Rt(ne,e),$o(ne,Br),ne),"updateSiteConfig"),tu=p(()=>Rt({},ne),"getSiteConfig"),eu=p(e=>(su(e),Rt(Mi,e),Et()),"setConfig"),Et=p(()=>Rt({},Mi),"getConfig"),ru=p(e=>{e&&(["secure",...ne.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(H.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&ru(e[t])}))},"sanitize"),kC=p(e=>{var t;to(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Br.push(e),$o(ne,Br)},"addDirective"),ro=p((e=ne)=>{Br=[],$o(e,Br)},"reset"),TC={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},bh={},iu=p(e=>{bh[e]||(H.warn(TC[e]),bh[e]=!0)},"issueWarning"),su=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&iu("LAZY_LOAD_DEPRECATED")},"checkConfig"),hF=p(()=>{let e={};eo&&(e=Rt(e,eo));for(const t of Br)e=Rt(e,t);return e},"getUserDefinedConfig"),oe=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&iu("FLOWCHART_HTML_LABELS_DEPRECATED"),qe(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ou=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,$i=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wC=/\s*%%.*\n/gm,as,au=(as=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(as,"UnknownDiagramError"),as),vr={},Pn=p(function(e,t){e=e.replace(ou,"").replace($i,"").replace(wC,`
4
+ `);for(const[r,{detector:i}]of Object.entries(vr))if(i(e,t))return r;throw new au(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ra=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)nu(t,r,i)},"registerLazyLoadedDiagrams"),nu=p((e,t,r)=>{vr[e]&&H.warn(`Detector with key ${e} already exists. Overwriting.`),vr[e]={detector:t,loader:r},H.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),SC=p(e=>vr[e].loader,"getDiagramLoader"),hs=/<br\s*\/?>/gi,_C=p(e=>e?cu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),BC=(()=>{let e=!1;return()=>{e||(lu(),e=!0)}})();function lu(){const e="data-temp-href-target";Qr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Qr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(lu,"setupDompurifyHooks");var hu=p(e=>(BC(),Qr.sanitize(e)),"removeScript"),kh=p((e,t)=>{if(oe(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=hu(e):r!=="loose"&&(e=cu(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=AC(e))}return e},"sanitizeMore"),_e=p((e,t)=>e&&(t.dompurifyConfig?e=Qr.sanitize(kh(e,t),t.dompurifyConfig).toString():e=Qr.sanitize(kh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),vC=p((e,t)=>typeof e=="string"?_e(e,t):e.flat().map(r=>_e(r,t)),"sanitizeTextOrArray"),LC=p(e=>hs.test(e),"hasBreaks"),FC=p(e=>e.split(hs),"splitBreaks"),AC=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),cu=p(e=>e.replace(hs,"#br#"),"breakToPlaceholder"),EC=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),MC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),$C=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Th=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];OC(o,a)&&(s=o+","+a,i++,r.pop())}r.push(IC(s))}return r.join("")},"parseGenericTypes"),Na=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),OC=p((e,t)=>{const r=Na(e,"~"),i=Na(t,"~");return r===1&&i===1},"shouldCombineSets"),IC=p(e=>{const t=Na(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),wh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),qa=/\$\$(.*?)\$\$/g,Pi=p(e=>{var t;return(((t=e.match(qa))==null?void 0:t.length)??0)>0},"hasKatex"),cF=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await uu(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),DC=p(async(e,t)=>{if(!Pi(e))return e;if(!(wh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(qa,"MathML is unsupported in this environment.");{const{default:r}=await mt(()=>import("./katex-0cba7652.js"),[]),i=t.forceLegacyMathML||!wh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(hs).map(s=>Pi(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(qa,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),uu=p(async(e,t)=>_e(await DC(e,t),t),"renderKatexSanitized"),cs={getRows:_C,sanitizeText:_e,sanitizeTextOrArray:vC,hasBreaks:LC,splitBreaks:FC,lineBreakRegex:hs,removeScript:hu,getUrl:EC,evaluate:qe,getMax:MC,getMin:$C},PC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),RC=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),du=p(function(e,t,r,i){const s=RC(t,r,i);PC(e,s)},"configureSvgSize"),NC=p(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;H.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;H.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,H.info(`Calculated bounds: ${n}x${l}`),du(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),zs={};function Wa(e){return[...e.cssRules].map(t=>t.cssText).join(`
5
+ `)}p(Wa,"cssStyleSheetToString");var qC=p((e,t,r,i)=>{let s="";return e in zs&&zs[e]?s=zs[e]({...r,svgId:i}):H.warn(`No theme found for ${e}`),` & {
6
+ font-family: ${r.fontFamily};
7
+ font-size: ${r.fontSize};
8
+ fill: ${r.textColor}
9
+ }
10
+ @keyframes edge-animation-frame {
11
+ from {
12
+ stroke-dashoffset: 0;
13
+ }
14
+ }
15
+ @keyframes dash {
16
+ to {
17
+ stroke-dashoffset: 0;
18
+ }
19
+ }
20
+ & .edge-animation-slow {
21
+ stroke-dasharray: 9,5 !important;
22
+ stroke-dashoffset: 900;
23
+ animation: dash 50s linear infinite;
24
+ stroke-linecap: round;
25
+ }
26
+ & .edge-animation-fast {
27
+ stroke-dasharray: 9,5 !important;
28
+ stroke-dashoffset: 900;
29
+ animation: dash 20s linear infinite;
30
+ stroke-linecap: round;
31
+ }
32
+ /* Classes common for multiple diagrams */
33
+
34
+ & .error-icon {
35
+ fill: ${r.errorBkgColor};
36
+ }
37
+ & .error-text {
38
+ fill: ${r.errorTextColor};
39
+ stroke: ${r.errorTextColor};
40
+ }
41
+
42
+ & .edge-thickness-normal {
43
+ stroke-width: ${r.strokeWidth??1}px;
44
+ }
45
+ & .edge-thickness-thick {
46
+ stroke-width: 3.5px
47
+ }
48
+ & .edge-pattern-solid {
49
+ stroke-dasharray: 0;
50
+ }
51
+ & .edge-thickness-invisible {
52
+ stroke-width: 0;
53
+ fill: none;
54
+ }
55
+ & .edge-pattern-dashed{
56
+ stroke-dasharray: 3;
57
+ }
58
+ .edge-pattern-dotted {
59
+ stroke-dasharray: 2;
60
+ }
61
+
62
+ & .marker {
63
+ fill: ${r.lineColor};
64
+ stroke: ${r.lineColor};
65
+ }
66
+ & .marker.cross {
67
+ stroke: ${r.lineColor};
68
+ }
69
+
70
+ & svg {
71
+ font-family: ${r.fontFamily};
72
+ font-size: ${r.fontSize};
73
+ }
74
+ & p {
75
+ margin: 0
76
+ }
77
+
78
+ ${s}
79
+ .node .neo-node {
80
+ stroke: ${r.nodeBorder};
81
+ }
82
+
83
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
84
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
85
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
86
+ }
87
+ [data-look="neo"].swimlane.cluster rect {
88
+ filter: none;
89
+ }
90
+
91
+
92
+ [data-look="neo"].node path {
93
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
94
+ stroke-width: ${r.strokeWidth??1}px;
95
+ }
96
+
97
+ [data-look="neo"].node .outer-path {
98
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
99
+ }
100
+
101
+ [data-look="neo"].node .neo-line path {
102
+ stroke: ${r.nodeBorder};
103
+ filter: none;
104
+ }
105
+
106
+ [data-look="neo"].node circle{
107
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
108
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
109
+ }
110
+
111
+ [data-look="neo"].node circle .state-start{
112
+ fill: #000000;
113
+ }
114
+
115
+ [data-look="neo"].icon-shape .icon {
116
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
117
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
118
+ }
119
+
120
+ [data-look="neo"].icon-shape .icon-neo path {
121
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
122
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
123
+ }
124
+
125
+ ${t}
126
+ `},"getStyles"),WC=p((e,t)=>{t!==void 0&&(zs[e]=t)},"addStylesForDiagram"),zC=qC,fu={};Ny(fu,{clear:()=>HC,getAccDescription:()=>jC,getAccTitle:()=>UC,getDiagramTitle:()=>VC,setAccDescription:()=>GC,setAccTitle:()=>YC,setDiagramTitle:()=>XC});var Rn="",Nn="",qn="",Wn=p(e=>_e(e,Et()),"sanitizeText"),HC=p(()=>{Rn="",qn="",Nn=""},"clear"),YC=p(e=>{Rn=Wn(e).replace(/^\s+/g,"")},"setAccTitle"),UC=p(()=>Rn,"getAccTitle"),GC=p(e=>{qn=Wn(e).replace(/\n\s+/g,`
127
+ `)},"setAccDescription"),jC=p(()=>qn,"getAccDescription"),XC=p(e=>{Nn=Wn(e)},"setDiagramTitle"),VC=p(()=>Nn,"getDiagramTitle"),Sh=H,ZC=Dn,St=Et,uF=eu,dF=Jr,zn=p(e=>_e(e,St()),"sanitizeText"),KC=NC,QC=p(()=>fu,"getCommonDb"),io={},so=p((e,t,r)=>{var i;io[e]&&Sh.warn(`Diagram with id ${e} already registered. Overwriting.`),io[e]=t,r&&nu(e,r),WC(e,t.styles),(i=t.injectUtils)==null||i.call(t,Sh,ZC,St,zn,KC,QC(),()=>{})},"registerDiagram"),za=p(e=>{if(e in io)return io[e];throw new JC(e)},"getDiagram"),ns,JC=(ns=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(ns,"DiagramNotFoundError"),ns),tx={value:()=>{}};function pu(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Hs(r)}function Hs(e){this._=e}function ex(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Hs.prototype=pu.prototype={constructor:Hs,on:function(e,t){var r=this._,i=ex(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=rx(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=_h(r[s],e.name,t);else if(t==null)for(s in r)r[s]=_h(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Hs(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function rx(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function _h(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=tx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ha="http://www.w3.org/1999/xhtml";const Bh={svg:"http://www.w3.org/2000/svg",xhtml:Ha,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oo(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Bh.hasOwnProperty(t)?{space:Bh[t],local:e}:e}function ix(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ha&&t.documentElement.namespaceURI===Ha?t.createElement(e):t.createElementNS(r,e)}}function sx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function gu(e){var t=Oo(e);return(t.local?sx:ix)(t)}function ox(){}function Hn(e){return e==null?ox:function(){return this.querySelector(e)}}function ax(e){typeof e!="function"&&(e=Hn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,c,h=0;h<a;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new de(i,this._parents)}function nx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function lx(){return[]}function mu(e){return e==null?lx:function(){return this.querySelectorAll(e)}}function hx(e){return function(){return nx(e.apply(this,arguments))}}function cx(e){typeof e=="function"?e=hx(e):e=mu(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),s.push(l));return new de(i,s)}function yu(e){return function(){return this.matches(e)}}function Cu(e){return function(t){return t.matches(e)}}var ux=Array.prototype.find;function dx(e){return function(){return ux.call(this.children,e)}}function fx(){return this.firstElementChild}function px(e){return this.select(e==null?fx:dx(typeof e=="function"?e:Cu(e)))}var gx=Array.prototype.filter;function mx(){return Array.from(this.children)}function yx(e){return function(){return gx.call(this.children,e)}}function Cx(e){return this.selectAll(e==null?mx:yx(typeof e=="function"?e:Cu(e)))}function xx(e){typeof e!="function"&&(e=yu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new de(i,this._parents)}function xu(e){return new Array(e.length)}function bx(){return new de(this._enter||this._groups.map(xu),this._parents)}function oo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}oo.prototype={constructor:oo,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function kx(e){return function(){return e}}function Tx(e,t,r,i,s,o){for(var a=0,n,l=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new oo(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function wx(e,t,r,i,s,o,a){var n,l,c=new Map,h=t.length,u=o.length,f=new Array(h),d;for(n=0;n<h;++n)(l=t[n])&&(f[n]=d=a.call(l,l.__data__,n,t)+"",c.has(d)?s[n]=l:c.set(d,l));for(n=0;n<u;++n)d=a.call(e,o[n],n,o)+"",(l=c.get(d))?(i[n]=l,l.__data__=o[n],c.delete(d)):r[n]=new oo(e,o[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(s[n]=l)}function Sx(e){return e.__data__}function _x(e,t){if(!arguments.length)return Array.from(this,Sx);var r=t?wx:Tx,i=this._parents,s=this._groups;typeof e!="function"&&(e=kx(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=s[c],f=u.length,d=Bx(e.call(h,h&&h.__data__,c,i)),y=d.length,g=n[c]=new Array(y),m=a[c]=new Array(y),C=l[c]=new Array(f);r(h,u,g,m,C,d,t);for(var b=0,k=0,w,S;b<y;++b)if(w=g[b]){for(b>=k&&(k=b+1);!(S=m[k])&&++k<y;);w._next=S||null}}return a=new de(a,i),a._enter=n,a._exit=l,a}function Bx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vx(){return new de(this._exit||this._groups.map(xu),this._parents)}function Lx(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function Fx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var c=r[l],h=i[l],u=c.length,f=n[l]=new Array(u),d,y=0;y<u;++y)(d=c[y]||h[y])&&(f[y]=d);for(;l<s;++l)n[l]=r[l];return new de(n,this._parents)}function Ax(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Ex(e){e||(e=Mx);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new de(s,this._parents).order()}function Mx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $x(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ox(){return Array.from(this)}function Ix(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function Dx(){let e=0;for(const t of this)++e;return e}function Px(){return!this.node()}function Rx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function Nx(e){return function(){this.removeAttribute(e)}}function qx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wx(e,t){return function(){this.setAttribute(e,t)}}function zx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Hx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Yx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Ux(e,t){var r=Oo(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?qx:Nx:typeof t=="function"?r.local?Yx:Hx:r.local?zx:Wx)(r,t))}function bu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Gx(e){return function(){this.style.removeProperty(e)}}function jx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Xx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Vx(e,t,r){return arguments.length>1?this.each((t==null?Gx:typeof t=="function"?Xx:jx)(e,t,r??"")):ti(this.node(),e)}function ti(e,t){return e.style.getPropertyValue(t)||bu(e).getComputedStyle(e,null).getPropertyValue(t)}function Zx(e){return function(){delete this[e]}}function Kx(e,t){return function(){this[e]=t}}function Qx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Jx(e,t){return arguments.length>1?this.each((t==null?Zx:typeof t=="function"?Qx:Kx)(e,t)):this.node()[e]}function ku(e){return e.trim().split(/^|\s+/)}function Yn(e){return e.classList||new Tu(e)}function Tu(e){this._node=e,this._names=ku(e.getAttribute("class")||"")}Tu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function wu(e,t){for(var r=Yn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Su(e,t){for(var r=Yn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function tb(e){return function(){wu(this,e)}}function eb(e){return function(){Su(this,e)}}function rb(e,t){return function(){(t.apply(this,arguments)?wu:Su)(this,e)}}function ib(e,t){var r=ku(e+"");if(arguments.length<2){for(var i=Yn(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?rb:t?tb:eb)(r,t))}function sb(){this.textContent=""}function ob(e){return function(){this.textContent=e}}function ab(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function nb(e){return arguments.length?this.each(e==null?sb:(typeof e=="function"?ab:ob)(e)):this.node().textContent}function lb(){this.innerHTML=""}function hb(e){return function(){this.innerHTML=e}}function cb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ub(e){return arguments.length?this.each(e==null?lb:(typeof e=="function"?cb:hb)(e)):this.node().innerHTML}function db(){this.nextSibling&&this.parentNode.appendChild(this)}function fb(){return this.each(db)}function pb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gb(){return this.each(pb)}function mb(e){var t=typeof e=="function"?e:gu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function yb(){return null}function Cb(e,t){var r=typeof e=="function"?e:gu(e),i=t==null?yb:typeof t=="function"?t:Hn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function xb(){var e=this.parentNode;e&&e.removeChild(this)}function bb(){return this.each(xb)}function kb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Tb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wb(e){return this.select(e?Tb:kb)}function Sb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function _b(e){return function(t){e.call(this,t,this.__data__)}}function Bb(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function vb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function Lb(e,t,r){return function(){var i=this.__on,s,o=_b(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function Fb(e,t,r){var i=Bb(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<o;++s)if((a=i[s]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?Lb:vb,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function _u(e,t,r){var i=bu(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Ab(e,t){return function(){return _u(this,e,t)}}function Eb(e,t){return function(){return _u(this,e,t.apply(this,arguments))}}function Mb(e,t){return this.each((typeof t=="function"?Eb:Ab)(e,t))}function*$b(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var Bu=[null];function de(e,t){this._groups=e,this._parents=t}function us(){return new de([[document.documentElement]],Bu)}function Ob(){return this}de.prototype=us.prototype={constructor:de,select:ax,selectAll:cx,selectChild:px,selectChildren:Cx,filter:xx,data:_x,enter:bx,exit:vx,join:Lx,merge:Fx,selection:Ob,order:Ax,sort:Ex,call:$x,nodes:Ox,node:Ix,size:Dx,empty:Px,each:Rx,attr:Ux,style:Vx,property:Jx,classed:ib,text:nb,html:ub,raise:fb,lower:gb,append:mb,insert:Cb,remove:bb,clone:wb,datum:Sb,on:Fb,dispatch:Mb,[Symbol.iterator]:$b};function yt(e){return typeof e=="string"?new de([[document.querySelector(e)]],[document.documentElement]):new de([[e]],Bu)}function Un(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function vu(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ds(){}var Ri=.7,ao=1/Ri,Zr="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ib=/^#([0-9a-f]{3,8})$/,Db=new RegExp(`^rgb\\(${Zr},${Zr},${Zr}\\)$`),Pb=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),Rb=new RegExp(`^rgba\\(${Zr},${Zr},${Zr},${Ni}\\)$`),Nb=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${Ni}\\)$`),qb=new RegExp(`^hsl\\(${Ni},${Ie},${Ie}\\)$`),Wb=new RegExp(`^hsla\\(${Ni},${Ie},${Ie},${Ni}\\)$`),vh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Un(ds,qi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lh,formatHex:Lh,formatHex8:zb,formatHsl:Hb,formatRgb:Fh,toString:Fh});function Lh(){return this.rgb().formatHex()}function zb(){return this.rgb().formatHex8()}function Hb(){return Lu(this).formatHsl()}function Fh(){return this.rgb().formatRgb()}function qi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ib.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ah(t):r===3?new he(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ls(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ls(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Db.exec(e))?new he(t[1],t[2],t[3],1):(t=Pb.exec(e))?new he(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Rb.exec(e))?Ls(t[1],t[2],t[3],t[4]):(t=Nb.exec(e))?Ls(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qb.exec(e))?$h(t[1],t[2]/100,t[3]/100,1):(t=Wb.exec(e))?$h(t[1],t[2]/100,t[3]/100,t[4]):vh.hasOwnProperty(e)?Ah(vh[e]):e==="transparent"?new he(NaN,NaN,NaN,0):null}function Ah(e){return new he(e>>16&255,e>>8&255,e&255,1)}function Ls(e,t,r,i){return i<=0&&(e=t=r=NaN),new he(e,t,r,i)}function Yb(e){return e instanceof ds||(e=qi(e)),e?(e=e.rgb(),new he(e.r,e.g,e.b,e.opacity)):new he}function Ya(e,t,r,i){return arguments.length===1?Yb(e):new he(e,t,r,i??1)}function he(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Un(he,Ya,vu(ds,{brighter(e){return e=e==null?ao:Math.pow(ao,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new he(_r(this.r),_r(this.g),_r(this.b),no(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Eh,formatHex:Eh,formatHex8:Ub,formatRgb:Mh,toString:Mh}));function Eh(){return`#${Tr(this.r)}${Tr(this.g)}${Tr(this.b)}`}function Ub(){return`#${Tr(this.r)}${Tr(this.g)}${Tr(this.b)}${Tr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mh(){const e=no(this.opacity);return`${e===1?"rgb(":"rgba("}${_r(this.r)}, ${_r(this.g)}, ${_r(this.b)}${e===1?")":`, ${e})`}`}function no(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _r(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Tr(e){return e=_r(e),(e<16?"0":"")+e.toString(16)}function $h(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,r,i)}function Lu(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof ds||(e=qi(e)),!e)return new ke;if(e instanceof ke)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,l=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?o+s:2-o-s,a*=60):n=l>0&&l<1?0:a,new ke(a,n,l,e.opacity)}function Gb(e,t,r,i){return arguments.length===1?Lu(e):new ke(e,t,r,i??1)}function ke(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Un(ke,Gb,vu(ds,{brighter(e){return e=e==null?ao:Math.pow(ao,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new ke(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new he(ba(e>=240?e-240:e+120,s,i),ba(e,s,i),ba(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new ke(Oh(this.h),Fs(this.s),Fs(this.l),no(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=no(this.opacity);return`${e===1?"hsl(":"hsla("}${Oh(this.h)}, ${Fs(this.s)*100}%, ${Fs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Oh(e){return e=(e||0)%360,e<0?e+360:e}function Fs(e){return Math.max(0,Math.min(1,e||0))}function ba(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Gn=e=>()=>e;function Fu(e,t){return function(r){return e+r*t}}function jb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function fF(e,t){var r=t-e;return r?Fu(e,r>180||r<-180?r-360*Math.round(r/360):r):Gn(isNaN(e)?t:e)}function Xb(e){return(e=+e)==1?Au:function(t,r){return r-t?jb(t,r,e):Gn(isNaN(t)?r:t)}}function Au(e,t){var r=t-e;return r?Fu(e,r):Gn(isNaN(e)?t:e)}const Ih=function e(t){var r=Xb(t);function i(s,o){var a=r((s=Ya(s)).r,(o=Ya(o)).r),n=r(s.g,o.g),l=r(s.b,o.b),c=Au(s.opacity,o.opacity);return function(h){return s.r=a(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i}(1);function sr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ua=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ka=new RegExp(Ua.source,"g");function Vb(e){return function(){return e}}function Zb(e){return function(t){return e(t)+""}}function Kb(e,t){var r=Ua.lastIndex=ka.lastIndex=0,i,s,o,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Ua.exec(e))&&(s=ka.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,l.push({i:a,x:sr(i,s)})),r=ka.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?l[0]?Zb(l[0].x):Vb(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)n[(u=l[h]).i]=u.x(c);return n.join("")})}var Dh=180/Math.PI,Ga={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Eu(e,t,r,i,s,o){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Dh,skewX:Math.atan(l)*Dh,scaleX:a,scaleY:n}}var As;function Qb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ga:Eu(t.a,t.b,t.c,t.d,t.e,t.f)}function Jb(e){return e==null||(As||(As=document.createElementNS("http://www.w3.org/2000/svg","g")),As.setAttribute("transform",e),!(e=As.transform.baseVal.consolidate()))?Ga:(e=e.matrix,Eu(e.a,e.b,e.c,e.d,e.e,e.f))}function Mu(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,d,y){if(c!==u||h!==f){var g=d.push("translate(",null,t,null,r);y.push({i:g-4,x:sr(c,u)},{i:g-2,x:sr(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function a(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(s(u)+"rotate(",null,i)-2,x:sr(c,h)})):h&&u.push(s(u)+"rotate("+h+i)}function n(c,h,u,f){c!==h?f.push({i:u.push(s(u)+"skewX(",null,i)-2,x:sr(c,h)}):h&&u.push(s(u)+"skewX("+h+i)}function l(c,h,u,f,d,y){if(c!==u||h!==f){var g=d.push(s(d)+"scale(",null,",",null,")");y.push({i:g-4,x:sr(c,u)},{i:g-2,x:sr(h,f)})}else(u!==1||f!==1)&&d.push(s(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),a(c.rotate,h.rotate,u,f),n(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var y=-1,g=f.length,m;++y<g;)u[(m=f[y]).i]=m.x(d);return u.join("")}}}var t1=Mu(Qb,"px, ","px)","deg)"),e1=Mu(Jb,", ",")",")"),ei=0,Si=0,mi=0,$u=1e3,lo,_i,ho=0,Lr=0,Io=0,Wi=typeof performance=="object"&&performance.now?performance:Date,Ou=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function jn(){return Lr||(Ou(r1),Lr=Wi.now()+Io)}function r1(){Lr=0}function co(){this._call=this._time=this._next=null}co.prototype=Iu.prototype={constructor:co,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?jn():+r)+(t==null?0:+t),!this._next&&_i!==this&&(_i?_i._next=this:lo=this,_i=this),this._call=e,this._time=r,ja()},stop:function(){this._call&&(this._call=null,this._time=1/0,ja())}};function Iu(e,t,r){var i=new co;return i.restart(e,t,r),i}function i1(){jn(),++ei;for(var e=lo,t;e;)(t=Lr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ei}function Ph(){Lr=(ho=Wi.now())+Io,ei=Si=0;try{i1()}finally{ei=0,o1(),Lr=0}}function s1(){var e=Wi.now(),t=e-ho;t>$u&&(Io-=t,ho=e)}function o1(){for(var e,t=lo,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:lo=r);_i=e,ja(i)}function ja(e){if(!ei){Si&&(Si=clearTimeout(Si));var t=e-Lr;t>24?(e<1/0&&(Si=setTimeout(Ph,e-Wi.now()-Io)),mi&&(mi=clearInterval(mi))):(mi||(ho=Wi.now(),mi=setInterval(s1,$u)),ei=1,Ou(Ph))}}function Rh(e,t,r){var i=new co;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var a1=pu("start","end","cancel","interrupt"),n1=[],Du=0,Nh=1,Xa=2,Ys=3,qh=4,Va=5,Us=6;function Do(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;l1(e,r,{name:t,index:i,group:s,on:a1,tween:n1,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Du})}function Xn(e,t){var r=ve(e,t);if(r.state>Du)throw new Error("too late; already scheduled");return r}function We(e,t){var r=ve(e,t);if(r.state>Ys)throw new Error("too late; already running");return r}function ve(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function l1(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Iu(o,0,r.time);function o(c){r.state=Nh,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,u,f,d;if(r.state!==Nh)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Ys)return Rh(a);d.state===qh?(d.state=Us,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Us,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Rh(function(){r.state===Ys&&(r.state=qh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=Xa,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Xa){for(r.state=Ys,s=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Va,1),u=-1,f=s.length;++u<f;)s[u].call(e,h);r.state===Va&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Us,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function h1(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>Xa&&i.state<Va,i.state=Us,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function c1(e){return this.each(function(){h1(this,e)})}function u1(e,t){var r,i;return function(){var s=We(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function d1(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=We(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}o.tween=s}}function f1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ve(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?u1:d1)(r,e,t))}function Vn(e,t,r){var i=e._id;return e.each(function(){var s=We(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return ve(s,i).value[t]}}function Pu(e,t){var r;return(typeof t=="number"?sr:t instanceof qi?Ih:(r=qi(t))?(t=r,Ih):Kb)(e,t)}function p1(e){return function(){this.removeAttribute(e)}}function g1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function m1(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function y1(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function C1(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function x1(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function b1(e,t){var r=Oo(e),i=r==="transform"?e1:Pu;return this.attrTween(e,typeof t=="function"?(r.local?x1:C1)(r,i,Vn(this,"attr."+e,t)):t==null?(r.local?g1:p1)(r):(r.local?y1:m1)(r,i,t))}function k1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function T1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function w1(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&T1(e,o)),r}return s._value=t,s}function S1(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&k1(e,o)),r}return s._value=t,s}function _1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Oo(e);return this.tween(r,(i.local?w1:S1)(i,t))}function B1(e,t){return function(){Xn(this,e).delay=+t.apply(this,arguments)}}function v1(e,t){return t=+t,function(){Xn(this,e).delay=t}}function L1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?B1:v1)(t,e)):ve(this.node(),t).delay}function F1(e,t){return function(){We(this,e).duration=+t.apply(this,arguments)}}function A1(e,t){return t=+t,function(){We(this,e).duration=t}}function E1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?F1:A1)(t,e)):ve(this.node(),t).duration}function M1(e,t){if(typeof t!="function")throw new Error;return function(){We(this,e).ease=t}}function $1(e){var t=this._id;return arguments.length?this.each(M1(t,e)):ve(this.node(),t).ease}function O1(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;We(this,e).ease=r}}function I1(e){if(typeof e!="function")throw new Error;return this.each(O1(this._id,e))}function D1(e){typeof e!="function"&&(e=yu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Ze(i,this._parents,this._name,this._id)}function P1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var l=t[n],c=r[n],h=l.length,u=a[n]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;n<i;++n)a[n]=t[n];return new Ze(a,this._parents,this._name,this._id)}function R1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function N1(e,t,r){var i,s,o=R1(t)?Xn:We;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function q1(e,t){var r=this._id;return arguments.length<2?ve(this.node(),r).on.on(e):this.each(N1(r,e,t))}function W1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function z1(){return this.on("end.remove",W1(this._id))}function H1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Hn(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],l=n.length,c=o[a]=new Array(l),h,u,f=0;f<l;++f)(h=n[f])&&(u=e.call(h,h.__data__,f,n))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Do(c[f],t,r,f,c,ve(h,r)));return new Ze(o,this._parents,t,r)}function Y1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=mu(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,y=ve(h,r),g=0,m=f.length;g<m;++g)(d=f[g])&&Do(d,t,r,g,f,y);o.push(f),a.push(h)}return new Ze(o,a,t,r)}var U1=us.prototype.constructor;function G1(){return new U1(this._groups,this._parents)}function j1(e,t){var r,i,s;return function(){var o=ti(this,e),a=(this.style.removeProperty(e),ti(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function Ru(e){return function(){this.style.removeProperty(e)}}function X1(e,t,r){var i,s=r+"",o;return function(){var a=ti(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function V1(e,t,r){var i,s,o;return function(){var a=ti(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),ti(this,e))),a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n))}}function Z1(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var l=We(this,e),c=l.on,h=l.value[o]==null?n||(n=Ru(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(a,s=h),l.on=i}}function K1(e,t,r){var i=(e+="")=="transform"?t1:Pu;return t==null?this.styleTween(e,j1(e,i)).on("end.style."+e,Ru(e)):typeof t=="function"?this.styleTween(e,V1(e,i,Vn(this,"style."+e,t))).each(Z1(this._id,e)):this.styleTween(e,X1(e,i,t),r).on("end.style."+e,null)}function Q1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function J1(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&Q1(e,a,r)),i}return o._value=t,o}function tk(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,J1(e,t,r??""))}function ek(e){return function(){this.textContent=e}}function rk(e){return function(){var t=e(this);this.textContent=t??""}}function ik(e){return this.tween("text",typeof e=="function"?rk(Vn(this,"text",e)):ek(e==null?"":e+""))}function sk(e){return function(t){this.textContent=e.call(this,t)}}function ok(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&sk(s)),t}return i._value=e,i}function ak(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,ok(e))}function nk(){for(var e=this._name,t=this._id,r=Nu(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=ve(l,t);Do(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ze(i,this._parents,e,r)}function lk(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},l={value:function(){--s===0&&o()}};r.each(function(){var c=We(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),s===0&&o()})}var hk=0;function Ze(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Nu(){return++hk}var Ue=us.prototype;Ze.prototype={constructor:Ze,select:H1,selectAll:Y1,selectChild:Ue.selectChild,selectChildren:Ue.selectChildren,filter:D1,merge:P1,selection:G1,transition:nk,call:Ue.call,nodes:Ue.nodes,node:Ue.node,size:Ue.size,empty:Ue.empty,each:Ue.each,on:q1,attr:b1,attrTween:_1,style:K1,styleTween:tk,text:ik,textTween:ak,remove:z1,tween:f1,delay:L1,duration:E1,ease:$1,easeVarying:I1,end:lk,[Symbol.iterator]:Ue[Symbol.iterator]};function ck(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var uk={time:null,delay:0,duration:250,ease:ck};function dk(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function fk(e){var t,r;e instanceof Ze?(t=e._id,e=e._name):(t=Nu(),(r=uk).time=jn(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&Do(l,e,t,c,a,r||dk(l,t));return new Ze(i,this._parents,e,t)}us.prototype.interrupt=c1;us.prototype.transition=fk;const Za=Math.PI,Ka=2*Za,br=1e-6,pk=Ka-br;function qu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function gk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qu;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class mk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?qu:gk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,u=n-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>br)if(!(Math.abs(u*l-c*h)>br)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-a,y=s-n,g=l*l+c*c,m=d*d+y*y,C=Math.sqrt(g),b=Math.sqrt(f),k=o*Math.tan((Za-Math.acos((g+f-m)/(2*C*b)))/2),w=k/b,S=k/C;Math.abs(w-1)>br&&this._append`L${t+w*h},${r+w*u}`,this._append`A${o},${o},0,0,${+(u*d>h*y)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,u=1^a,f=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>br||Math.abs(this._y1-h)>br)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ka+Ka),f>pk?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>br&&this._append`A${i},${i},0,${+(f>=Za)},${u},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Wr(e){return function(){return e}}const pF=Math.abs,gF=Math.atan2,mF=Math.cos,yF=Math.max,CF=Math.min,xF=Math.sin,bF=Math.sqrt,Wh=1e-12,Zn=Math.PI,zh=Zn/2,kF=2*Zn;function TF(e){return e>1?0:e<-1?Zn:Math.acos(e)}function wF(e){return e>=1?zh:e<=-1?-zh:Math.asin(e)}function yk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new mk(t)}function Ck(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Wu(e){this._context=e}Wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Oi(e){return new Wu(e)}function xk(e){return e[0]}function bk(e){return e[1]}function kk(e,t){var r=Wr(!0),i=null,s=Oi,o=null,a=yk(n);e=typeof e=="function"?e:e===void 0?xk:Wr(e),t=typeof t=="function"?t:t===void 0?bk:Wr(t);function n(l){var c,h=(l=Ck(l)).length,u,f=!1,d;for(i==null&&(o=s(d=a())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(u,c,l),+t(u,c,l));if(d)return o=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Wr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Wr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Wr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class zu{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Hu(e){return new zu(e,!0)}function Yu(e){return new zu(e,!1)}function cr(){}function uo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Po(e){this._context=e}Po.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:uo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qa(e){return new Po(e)}function Uu(e){this._context=e}Uu.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tk(e){return new Uu(e)}function Gu(e){this._context=e}Gu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wk(e){return new Gu(e)}function ju(e,t){this._basis=new Po(e),this._beta=t}ju.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Sk=function e(t){function r(i){return t===1?new Po(i):new ju(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function fo(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Kn(e,t){this._context=e,this._k=(1-t)/6}Kn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:fo(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:fo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Xu=function e(t){function r(i){return new Kn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Qn(e,t){this._context=e,this._k=(1-t)/6}Qn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:fo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _k=function e(t){function r(i){return new Qn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Jn(e,t){this._context=e,this._k=(1-t)/6}Jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:fo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Bk=function e(t){function r(i){return new Jn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function tl(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Wh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Wh){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function Vu(e,t){this._context=e,this._alpha=t}Vu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:tl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Zu=function e(t){function r(i){return t?new Vu(i,t):new Kn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Ku(e,t){this._context=e,this._alpha=t}Ku.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:tl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vk=function e(t){function r(i){return t?new Ku(i,t):new Qn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Qu(e,t){this._context=e,this._alpha=t}Qu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:tl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Lk=function e(t){function r(i){return t?new Qu(i,t):new Jn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Ju(e){this._context=e}Ju.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Fk(e){return new Ju(e)}function Hh(e){return e<0?-1:1}function Yh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(Hh(o)+Hh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function Uh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ta(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function po(e){this._context=e}po.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ta(this,this._t0,Uh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ta(this,Uh(this,r=Yh(this,e,t)),r);break;default:Ta(this,this._t0,r=Yh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function td(e){this._context=new ed(e)}(td.prototype=Object.create(po.prototype)).point=function(e,t){po.prototype.point.call(this,t,e)};function ed(e){this._context=e}ed.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function rd(e){return new po(e)}function id(e){return new td(e)}function sd(e){this._context=e}sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Gh(e),s=Gh(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Gh(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function od(e){return new sd(e)}function Ro(e,t){this._context=e,this._t=t}Ro.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function ad(e){return new Ro(e,.5)}function nd(e){return new Ro(e,0)}function ld(e){return new Ro(e,1)}function Bi(e,t,r){this.k=e,this.x=t,this.y=r}Bi.prototype={constructor:Bi,scale:function(e){return e===1?this:new Bi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Bi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Bi.prototype;var Ak=p(e=>{var s;const{securityLevel:t}=St();let r=yt("body");if(t==="sandbox"){const a=((s=yt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=yt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function el(e){return typeof e>"u"||e===null}p(el,"isNothing");function hd(e){return typeof e=="object"&&e!==null}p(hd,"isObject");function cd(e){return Array.isArray(e)?e:el(e)?[]:[e]}p(cd,"toArray");function ud(e,t){var r,i,s,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)s=o[r],e[s]=t[s];return e}p(ud,"extend");function dd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(dd,"repeat");function fd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(fd,"isNegativeZero");var Ek=el,Mk=hd,$k=cd,Ok=dd,Ik=fd,Dk=ud,Nt={isNothing:Ek,isObject:Mk,toArray:$k,repeat:Ok,isNegativeZero:Ik,extend:Dk};function rl(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
128
+
129
+ `+e.mark.snippet),i+" "+r):i}p(rl,"formatError");function ri(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=rl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(ri,"YAMLException$1");ri.prototype=Object.create(Error.prototype);ri.prototype.constructor=ri;ri.prototype.toString=p(function(t){return this.name+": "+rl(this,t)},"toString");var le=ri;function Gs(e,t,r,i,s){var o="",a="",n=Math.floor(s/2)-1;return i-t>n&&(o=" ... ",t=i-n+o.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+o.length}}p(Gs,"getLine");function js(e,t){return Nt.repeat(" ",t-e.length)+e}p(js,"padStart");function pd(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],o,a=-1;o=r.exec(e.buffer);)s.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=Gs(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),u),n=Nt.repeat(" ",t.indent)+js((e.line-l+1).toString(),h)+" | "+c.str+`
130
+ `+n;for(c=Gs(e.buffer,i[a],s[a],e.position,u),n+=Nt.repeat(" ",t.indent)+js((e.line+1).toString(),h)+" | "+c.str+`
131
+ `,n+=Nt.repeat("-",t.indent+h+3+c.pos)+`^
132
+ `,l=1;l<=t.linesAfter&&!(a+l>=s.length);l++)c=Gs(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),u),n+=Nt.repeat(" ",t.indent)+js((e.line+l+1).toString(),h)+" | "+c.str+`
133
+ `;return n.replace(/\n$/,"")}p(pd,"makeSnippet");var Pk=pd,Rk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Nk=["scalar","sequence","mapping"];function gd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(gd,"compileStyleAliases");function md(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Rk.indexOf(r)===-1)throw new le('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=gd(t.styleAliases||null),Nk.indexOf(this.kind)===-1)throw new le('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(md,"Type$1");var Jt=md;function Ja(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(s=a)}),r[s]=i}),r}p(Ja,"compileList");function yd(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(yd,"compileMap");function go(e){return this.extend(e)}p(go,"Schema$1");go.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Jt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new le("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Jt))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new le("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new le("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof Jt))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(go.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Ja(s,"implicit"),s.compiledExplicit=Ja(s,"explicit"),s.compiledTypeMap=yd(s.compiledImplicit,s.compiledExplicit),s},"extend");var qk=go,Wk=new Jt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),zk=new Jt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),Hk=new Jt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Yk=new qk({explicit:[Wk,zk,Hk]});function Cd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Cd,"resolveYamlNull");function xd(){return null}p(xd,"constructYamlNull");function bd(e){return e===null}p(bd,"isNull");var Uk=new Jt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Cd,construct:xd,predicate:bd,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function kd(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(kd,"resolveYamlBoolean");function Td(e){return e==="true"||e==="True"||e==="TRUE"}p(Td,"constructYamlBoolean");function wd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(wd,"isBoolean");var Gk=new Jt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:kd,construct:Td,predicate:wd,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Sd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Sd,"isHexCode");function _d(e){return 48<=e&&e<=55}p(_d,"isOctCode");function Bd(e){return 48<=e&&e<=57}p(Bd,"isDecCode");function vd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Sd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!_d(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Bd(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}p(vd,"resolveYamlInteger");function Ld(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(Ld,"constructYamlInteger");function Fd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Nt.isNegativeZero(e)}p(Fd,"isInteger");var jk=new Jt("tag:yaml.org,2002:int",{kind:"scalar",resolve:vd,construct:Ld,predicate:Fd,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Xk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ad(e){return!(e===null||!Xk.test(e)||e[e.length-1]==="_")}p(Ad,"resolveYamlFloat");function Ed(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Ed,"constructYamlFloat");var Vk=/^[-+]?[0-9]+e/;function Md(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Nt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Vk.test(r)?r.replace("e",".e"):r}p(Md,"representYamlFloat");function $d(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Nt.isNegativeZero(e))}p($d,"isFloat");var Zk=new Jt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ad,construct:Ed,predicate:$d,represent:Md,defaultStyle:"lowercase"}),Od=Yk.extend({implicit:[Uk,Gk,jk,Zk]}),Kk=Od,Id=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Dd=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 Pd(e){return e===null?!1:Id.exec(e)!==null||Dd.exec(e)!==null}p(Pd,"resolveYamlTimestamp");function Rd(e){var t,r,i,s,o,a,n,l=0,c=null,h,u,f;if(t=Id.exec(e),t===null&&(t=Dd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(o=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,s,o,a,n,l)),c&&f.setTime(f.getTime()-c),f}p(Rd,"constructYamlTimestamp");function Nd(e){return e.toISOString()}p(Nd,"representYamlTimestamp");var Qk=new Jt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Pd,construct:Rd,instanceOf:Date,represent:Nd});function qd(e){return e==="<<"||e===null}p(qd,"resolveYamlMerge");var Jk=new Jt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:qd}),il=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
134
+ \r`;function Wd(e){if(e===null)return!1;var t,r,i=0,s=e.length,o=il;for(r=0;r<s;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Wd,"resolveYamlBinary");function zd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,o=il,a=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|o.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}p(zd,"constructYamlBinary");function Hd(e){var t="",r=0,i,s,o=e.length,a=il;for(i=0;i<o;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return s=o%3,s===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):s===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):s===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}p(Hd,"representYamlBinary");function Yd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Yd,"isBinary");var t2=new Jt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Wd,construct:zd,predicate:Yd,represent:Hd}),e2=Object.prototype.hasOwnProperty,r2=Object.prototype.toString;function Ud(e){if(e===null)return!0;var t=[],r,i,s,o,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],a=!1,r2.call(s)!=="[object Object]")return!1;for(o in s)if(e2.call(s,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}p(Ud,"resolveYamlOmap");function Gd(e){return e!==null?e:[]}p(Gd,"constructYamlOmap");var i2=new Jt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ud,construct:Gd}),s2=Object.prototype.toString;function jd(e){if(e===null)return!0;var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],s2.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;o[t]=[s[0],i[s[0]]]}return!0}p(jd,"resolveYamlPairs");function Xd(e){if(e===null)return[];var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],s=Object.keys(i),o[t]=[s[0],i[s[0]]];return o}p(Xd,"constructYamlPairs");var o2=new Jt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:jd,construct:Xd}),a2=Object.prototype.hasOwnProperty;function Vd(e){if(e===null)return!0;var t,r=e;for(t in r)if(a2.call(r,t)&&r[t]!==null)return!1;return!0}p(Vd,"resolveYamlSet");function Zd(e){return e!==null?e:{}}p(Zd,"constructYamlSet");var n2=new Jt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Vd,construct:Zd}),Kd=Kk.extend({implicit:[Qk,Jk],explicit:[t2,i2,o2,n2]}),ur=Object.prototype.hasOwnProperty,mo=1,Qd=2,Jd=3,yo=4,wa=1,l2=2,jh=3,h2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c2=/[\x85\u2028\u2029]/,u2=/[,\[\]\{\}]/,tf=/^(?:!|!!|![a-z\-]+!)$/i,ef=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function tn(e){return Object.prototype.toString.call(e)}p(tn,"_class");function we(e){return e===10||e===13}p(we,"is_EOL");function hr(e){return e===9||e===32}p(hr,"is_WHITE_SPACE");function ie(e){return e===9||e===32||e===10||e===13}p(ie,"is_WS_OR_EOL");function wr(e){return e===44||e===91||e===93||e===123||e===125}p(wr,"is_FLOW_INDICATOR");function rf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(rf,"fromHexCode");function sf(e){return e===120?2:e===117?4:e===85?8:0}p(sf,"escapedHexLen");function of(e){return 48<=e&&e<=57?e-48:-1}p(of,"fromDecimalCode");function en(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
135
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(en,"simpleEscapeSequence");function af(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(af,"charFromCodepoint");function sl(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(sl,"setProperty");var nf=new Array(256),lf=new Array(256);for(Cr=0;Cr<256;Cr++)nf[Cr]=en(Cr)?1:0,lf[Cr]=en(Cr);var Cr;function hf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Kd,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(hf,"State$1");function ol(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Pk(r),new le(t,r)}p(ol,"generateError");function ot(e,t){throw ol(e,t)}p(ot,"throwError");function zi(e,t){e.onWarning&&e.onWarning.call(null,ol(e,t))}p(zi,"throwWarning");var Xh={YAML:p(function(t,r,i){var s,o,a;t.version!==null&&ot(t,"duplication of %YAML directive"),i.length!==1&&ot(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&ot(t,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),a=parseInt(s[2],10),o!==1&&ot(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&zi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var s,o;i.length!==2&&ot(t,"TAG directive accepts exactly two arguments"),s=i[0],o=i[1],tf.test(s)||ot(t,"ill-formed tag handle (first argument) of the TAG directive"),ur.call(t.tagMap,s)&&ot(t,'there is a previously declared suffix for "'+s+'" tag handle'),ef.test(o)||ot(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ot(t,"tag prefix is malformed: "+o)}t.tagMap[s]=o},"handleTagDirective")};function Ve(e,t,r,i){var s,o,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,o=n.length;s<o;s+=1)a=n.charCodeAt(s),a===9||32<=a&&a<=1114111||ot(e,"expected valid JSON character");else h2.test(n)&&ot(e,"the stream contains non-printable characters");e.result+=n}}p(Ve,"captureSegment");function rn(e,t,r,i){var s,o,a,n;for(Nt.isObject(r)||ot(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),a=0,n=s.length;a<n;a+=1)o=s[a],ur.call(t,o)||(sl(t,o,r[o]),i[o]=!0)}p(rn,"mergeMappings");function Sr(e,t,r,i,s,o,a,n,l){var c,h;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,h=s.length;c<h;c+=1)Array.isArray(s[c])&&ot(e,"nested arrays are not supported inside keys"),typeof s=="object"&&tn(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&tn(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,h=o.length;c<h;c+=1)rn(e,t,o[c],r);else rn(e,t,o,r);else!e.json&&!ur.call(r,s)&&ur.call(t,s)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,ot(e,"duplicated mapping key")),sl(t,s,o),delete r[s];return t}p(Sr,"storeMappingPair");function No(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):ot(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(No,"readLineBreak");function Ot(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;hr(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(we(s))for(No(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&zi(e,"deficient indentation"),i}p(Ot,"skipSeparationSpace");function fs(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||ie(r)))}p(fs,"testDocumentSeparator");function qo(e,t){t===1?e.result+=" ":t>1&&(e.result+=Nt.repeat(`
136
+ `,t-1))}p(qo,"writeFoldedLines");function cf(e,t,r){var i,s,o,a,n,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),ie(d)||wr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(s=e.input.charCodeAt(e.position+1),ie(s)||r&&wr(s)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),ie(s)||r&&wr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),ie(i))break}else{if(e.position===e.lineStart&&fs(e)||r&&wr(d))break;if(we(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Ot(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Ve(e,o,a,!1),qo(e,e.line-l),o=a=e.position,n=!1),hr(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return Ve(e,o,a,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(cf,"readPlainScalar");function uf(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ve(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else we(r)?(Ve(e,i,s,!0),qo(e,Ot(e,!1,t)),i=s=e.position):e.position===e.lineStart&&fs(e)?ot(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);ot(e,"unexpected end of the stream within a single quoted scalar")}p(uf,"readSingleQuotedScalar");function df(e,t){var r,i,s,o,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ve(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ve(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),we(n))Ot(e,!1,t);else if(n<256&&nf[n])e.result+=lf[n],e.position++;else if((a=sf(n))>0){for(s=a,o=0;s>0;s--)n=e.input.charCodeAt(++e.position),(a=rf(n))>=0?o=(o<<4)+a:ot(e,"expected hexadecimal character");e.result+=af(o),e.position++}else ot(e,"unknown escape sequence");r=i=e.position}else we(n)?(Ve(e,r,i,!0),qo(e,Ot(e,!1,t)),r=i=e.position):e.position===e.lineStart&&fs(e)?ot(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ot(e,"unexpected end of the stream within a double quoted scalar")}p(df,"readDoubleQuotedScalar");function ff(e,t){var r=!0,i,s,o,a=e.tag,n,l=e.anchor,c,h,u,f,d,y=Object.create(null),g,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,n=[];else if(b===123)h=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Ot(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&ot(e,"expected the node content, but found ','"):ot(e,"missed comma between flow collection entries"),m=g=C=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),ie(c)&&(u=f=!0,e.position++,Ot(e,!0,t))),i=e.line,s=e.lineStart,o=e.position,Fr(e,t,mo,!1,!0),m=e.tag,g=e.result,Ot(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Ot(e,!0,t),Fr(e,t,mo,!1,!0),C=e.result),d?Sr(e,n,y,m,g,C,i,s,o):u?n.push(Sr(e,null,y,m,g,C,i,s,o)):n.push(g),Ot(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}ot(e,"unexpected end of the stream within a flow collection")}p(ff,"readFlowCollection");function pf(e,t){var r,i,s=wa,o=!1,a=!1,n=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)wa===s?s=u===43?jh:l2:ot(e,"repeat of a chomping mode identifier");else if((h=of(u))>=0)h===0?ot(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?ot(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(hr(u)){do u=e.input.charCodeAt(++e.position);while(hr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!we(u)&&u!==0)}for(;u!==0;){for(No(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),we(u)){l++;continue}if(e.lineIndent<n){s===jh?e.result+=Nt.repeat(`
137
+ `,o?1+l:l):s===wa&&o&&(e.result+=`
138
+ `);break}for(i?hr(u)?(c=!0,e.result+=Nt.repeat(`
139
+ `,o?1+l:l)):c?(c=!1,e.result+=Nt.repeat(`
140
+ `,l+1)):l===0?o&&(e.result+=" "):e.result+=Nt.repeat(`
141
+ `,l):e.result+=Nt.repeat(`
142
+ `,o?1+l:l),o=!0,a=!0,l=0,r=e.position;!we(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ve(e,r,e.position,!1)}return!0}p(pf,"readBlockScalar");function sn(e,t){var r,i=e.tag,s=e.anchor,o=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ot(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!ie(a))));){if(n=!0,e.position++,Ot(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Fr(e,t,Jd,!1,!0),o.push(e.result),Ot(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)ot(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=o,!0):!1}p(sn,"readBlockSequence");function gf(e,t,r){var i,s,o,a,n,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,y=null,g=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ot(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(b===63||b===58)&&ie(i))b===63?(m&&(Sr(e,u,f,d,y,null,a,n,l),d=y=g=null),C=!0,m=!0,s=!0):m?(m=!1,s=!0):ot(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,n=e.lineStart,l=e.position,!Fr(e,r,Qd,!1,!0))break;if(e.line===o){for(b=e.input.charCodeAt(e.position);hr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),ie(b)||ot(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Sr(e,u,f,d,y,null,a,n,l),d=y=g=null),C=!0,m=!1,s=!1,d=e.tag,y=e.result;else if(C)ot(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)ot(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===o||e.lineIndent>t)&&(m&&(a=e.line,n=e.lineStart,l=e.position),Fr(e,t,yo,!0,s)&&(m?y=e.result:g=e.result),m||(Sr(e,u,f,d,y,g,a,n,l),d=y=g=null),Ot(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&b!==0)ot(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&Sr(e,u,f,d,y,null,a,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),C}p(gf,"readBlockMapping");function mf(e){var t,r=!1,i=!1,s,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&ot(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,s="!!",a=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):ot(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!ie(a);)a===33&&(i?ot(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),tf.test(s)||ot(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),u2.test(o)&&ot(e,"tag suffix cannot contain flow indicator characters")}o&&!ef.test(o)&&ot(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ot(e,"tag name is malformed: "+o)}return r?e.tag=o:ur.call(e.tagMap,s)?e.tag=e.tagMap[s]+o:s==="!"?e.tag="!"+o:s==="!!"?e.tag="tag:yaml.org,2002:"+o:ot(e,'undeclared tag handle "'+s+'"'),!0}p(mf,"readTagProperty");function yf(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&ot(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!ie(r)&&!wr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ot(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(yf,"readAnchorProperty");function Cf(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ie(i)&&!wr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ot(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ur.call(e.anchorMap,r)||ot(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ot(e,!0,-1),!0}p(Cf,"readAlias");function Fr(e,t,r,i,s){var o,a,n,l=1,c=!1,h=!1,u,f,d,y,g,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=n=yo===r||Jd===r,i&&Ot(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;mf(e)||yf(e);)Ot(e,!0,-1)?(c=!0,n=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||s),(l===1||yo===r)&&(mo===r||Qd===r?g=t:g=t+1,m=e.position-e.lineStart,l===1?n&&(sn(e,m)||gf(e,m,g))||ff(e,g)?h=!0:(a&&pf(e,g)||uf(e,g)||df(e,g)?h=!0:Cf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&ot(e,"alias node should not have any properties")):cf(e,g,mo===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&sn(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ot(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(y=e.implicitTypes[u],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ur.call(e.typeMap[e.kind||"fallback"],e.tag))y=e.typeMap[e.kind||"fallback"][e.tag];else for(y=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){y=d[u];break}y||ot(e,"unknown tag !<"+e.tag+">"),e.result!==null&&y.kind!==e.kind&&ot(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ot(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(Fr,"composeNode");function xf(e){var t=e.position,r,i,s,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Ot(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!ie(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&ot(e,"directive name must not be less than one character in length");a!==0;){for(;hr(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!we(a));break}if(we(a))break;for(r=e.position;a!==0&&!ie(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}a!==0&&No(e),ur.call(Xh,i)?Xh[i](e,i,s):zi(e,'unknown document directive "'+i+'"')}if(Ot(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ot(e,!0,-1)):o&&ot(e,"directives end mark is expected"),Fr(e,e.lineIndent-1,yo,!1,!0),Ot(e,!0,-1),e.checkLineBreaks&&c2.test(e.input.slice(t,e.position))&&zi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&fs(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ot(e,!0,-1));return}if(e.position<e.length-1)ot(e,"end of the stream or a document separator is expected");else return}p(xf,"readDocument");function al(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
143
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new hf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,ot(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)xf(r);return r.documents}p(al,"loadDocuments");function bf(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=al(e,r);if(typeof t!="function")return i;for(var s=0,o=i.length;s<o;s+=1)t(i[s])}p(bf,"loadAll$1");function kf(e,t){var r=al(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new le("expected a single document in the stream, but found more")}}p(kf,"load$1");var d2=bf,f2=kf,p2={loadAll:d2,load:f2},Tf=Object.prototype.toString,wf=Object.prototype.hasOwnProperty,nl=65279,g2=9,Hi=10,m2=13,y2=32,C2=33,x2=34,on=35,b2=37,k2=38,T2=39,w2=42,Sf=44,S2=45,Co=58,_2=61,B2=62,v2=63,L2=64,_f=91,Bf=93,F2=96,vf=123,A2=124,Lf=125,te={};te[0]="\\0";te[7]="\\a";te[8]="\\b";te[9]="\\t";te[10]="\\n";te[11]="\\v";te[12]="\\f";te[13]="\\r";te[27]="\\e";te[34]='\\"';te[92]="\\\\";te[133]="\\N";te[160]="\\_";te[8232]="\\L";te[8233]="\\P";var E2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],M2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ff(e,t){var r,i,s,o,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,o=i.length;s<o;s+=1)a=i[s],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&wf.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}p(Ff,"compileStyleMap");function Af(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new le("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Nt.repeat("0",i-t.length)+t}p(Af,"encodeHex");var $2=1,Yi=2;function Ef(e){this.schema=e.schema||Kd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Nt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ff(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Yi:$2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(Ef,"State");function an(e,t){for(var r=Nt.repeat(" ",t),i=0,s=-1,o="",a,n=e.length;i<n;)s=e.indexOf(`
144
+ `,i),s===-1?(a=e.slice(i),i=n):(a=e.slice(i,s+1),i=s+1),a.length&&a!==`
145
+ `&&(o+=r),o+=a;return o}p(an,"indentString");function xo(e,t){return`
146
+ `+Nt.repeat(" ",e.indent*t)}p(xo,"generateNextLine");function Mf(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}p(Mf,"testImplicitResolving");function Ui(e){return e===y2||e===g2}p(Ui,"isWhitespace");function ii(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==nl||65536<=e&&e<=1114111}p(ii,"isPrintable");function nn(e){return ii(e)&&e!==nl&&e!==m2&&e!==Hi}p(nn,"isNsCharOrWhitespace");function ln(e,t,r){var i=nn(e),s=i&&!Ui(e);return(r?i:i&&e!==Sf&&e!==_f&&e!==Bf&&e!==vf&&e!==Lf)&&e!==on&&!(t===Co&&!s)||nn(t)&&!Ui(t)&&e===on||t===Co&&s}p(ln,"isPlainSafe");function $f(e){return ii(e)&&e!==nl&&!Ui(e)&&e!==S2&&e!==v2&&e!==Co&&e!==Sf&&e!==_f&&e!==Bf&&e!==vf&&e!==Lf&&e!==on&&e!==k2&&e!==w2&&e!==C2&&e!==A2&&e!==_2&&e!==B2&&e!==T2&&e!==x2&&e!==b2&&e!==L2&&e!==F2}p($f,"isPlainSafeFirst");function Of(e){return!Ui(e)&&e!==Co}p(Of,"isPlainSafeLast");function Xr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Xr,"codePointAt");function ll(e){var t=/^\n* /;return t.test(e)}p(ll,"needIndentIndicator");var If=1,hn=2,Df=3,Pf=4,Ur=5;function Rf(e,t,r,i,s,o,a,n){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,y=-1,g=$f(Xr(e,0))&&Of(Xr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Xr(e,l),!ii(c))return Ur;g=g&&ln(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Xr(e,l),c===Hi)u=!0,d&&(f=f||l-y-1>i&&e[y+1]!==" ",y=l);else if(!ii(c))return Ur;g=g&&ln(c,h,n),h=c}f=f||d&&l-y-1>i&&e[y+1]!==" "}return!u&&!f?g&&!a&&!s(e)?If:o===Yi?Ur:hn:r>9&&ll(e)?Ur:a?o===Yi?Ur:hn:f?Pf:Df}p(Rf,"chooseScalarStyle");function Nf(e,t,r,i,s){e.dump=function(){if(t.length===0)return e.quotingType===Yi?'""':"''";if(!e.noCompatMode&&(E2.indexOf(t)!==-1||M2.test(t)))return e.quotingType===Yi?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Mf(e,c)}switch(p(l,"testAmbiguity"),Rf(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,s)){case If:return t;case hn:return"'"+t.replace(/'/g,"''")+"'";case Df:return"|"+cn(t,e.indent)+un(an(t,o));case Pf:return">"+cn(t,e.indent)+un(an(qf(t,a),o));case Ur:return'"'+Wf(t)+'"';default:throw new le("impossible error: invalid scalar style")}}()}p(Nf,"writeScalar");function cn(e,t){var r=ll(e)?String(t):"",i=e[e.length-1]===`
147
+ `,s=i&&(e[e.length-2]===`
148
+ `||e===`
149
+ `),o=s?"+":i?"":"-";return r+o+`
150
+ `}p(cn,"blockHeader");function un(e){return e[e.length-1]===`
151
+ `?e.slice(0,-1):e}p(un,"dropEndingNewline");function qf(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
152
+ `);return c=c!==-1?c:e.length,r.lastIndex=c,dn(e.slice(0,c),t)}(),s=e[0]===`
153
+ `||e[0]===" ",o,a;a=r.exec(e);){var n=a[1],l=a[2];o=l[0]===" ",i+=n+(!s&&!o&&l!==""?`
154
+ `:"")+dn(l,t),s=o}return i}p(qf,"foldString");function dn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,o,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(o=a>s?a:n,l+=`
155
+ `+e.slice(s,o),s=o+1),a=n;return l+=`
156
+ `,e.length-s>t&&a>s?l+=e.slice(s,a)+`
157
+ `+e.slice(a+1):l+=e.slice(s),l.slice(1)}p(dn,"foldLine");function Wf(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Xr(e,s),i=te[r],!i&&ii(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Af(r);return t}p(Wf,"escapeString");function zf(e,t,r){var i="",s=e.tag,o,a,n;for(o=0,a=r.length;o<a;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),(Pe(e,t,n,!1,!1)||typeof n>"u"&&Pe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}p(zf,"writeFlowSequence");function fn(e,t,r,i){var s="",o=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Pe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Pe(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=xo(e,t)),e.dump&&Hi===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=o,e.dump=s||"[]"}p(fn,"writeBlockSequence");function Hf(e,t,r){var i="",s=e.tag,o=Object.keys(r),a,n,l,c,h;for(a=0,n=o.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=o[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Pe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Pe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=s,e.dump="{"+i+"}"}p(Hf,"writeFlowMapping");function Yf(e,t,r,i){var s="",o=e.tag,a=Object.keys(r),n,l,c,h,u,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new le("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||s!=="")&&(f+=xo(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Pe(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Hi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=xo(e,t)),Pe(e,t+1,h,!0,u)&&(e.dump&&Hi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,s+=f));e.tag=o,e.dump=s||"{}"}p(Yf,"writeBlockMapping");function pn(e,t,r){var i,s,o,a,n,l;for(s=r?e.explicitTypes:e.implicitTypes,o=0,a=s.length;o<a;o+=1)if(n=s[o],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Tf.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(wf.call(n.represent,l))i=n.represent[l](t,l);else throw new le("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(pn,"detectType");function Pe(e,t,r,i,s,o,a){e.tag=null,e.dump=r,pn(e,r,!1)||pn(e,r,!0);var n=Tf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(s=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Yf(e,t,e.dump,s),f&&(e.dump="&ref_"+u+e.dump)):(Hf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?fn(e,t-1,e.dump,s):fn(e,t,e.dump,s),f&&(e.dump="&ref_"+u+e.dump)):(zf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Nf(e,e.dump,t,o,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new le("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(Pe,"writeNode");function Uf(e,t){var r=[],i=[],s,o;for(bo(e,r,i),s=0,o=i.length;s<o;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(o)}p(Uf,"getDuplicateReferences");function bo(e,t,r){var i,s,o;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,o=e.length;s<o;s+=1)bo(e[s],t,r);else for(i=Object.keys(e),s=0,o=i.length;s<o;s+=1)bo(e[i[s]],t,r)}p(bo,"inspectNode");function O2(e,t){t=t||{};var r=new Ef(t);r.noRefs||Uf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Pe(r,0,i,!0,!0)?r.dump+`
158
+ `:""}p(O2,"dump$1");function I2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(I2,"renamed");var D2=Od,P2=p2.load;/*! Bundled license information:
159
+
160
+ js-yaml/dist/js-yaml.mjs:
161
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
162
+ */var R2=p(e=>{const{handDrawnSeed:t}=St();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ni=p(e=>{const t=N2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),N2=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Gf=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),rt=p(e=>{const{stylesArray:t}=ni(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];Gf(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),J=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=St(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=ni(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:((l=a.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:q2(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),q2=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),jf={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.BLANK_URL=zt.relativeFirstCharacters=zt.whitespaceEscapeCharsRegex=zt.urlSchemeRegex=zt.ctrlCharactersRegex=zt.htmlCtrlEntityRegex=zt.htmlEntitiesRegex=zt.invalidProtocolRegex=void 0;zt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;zt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;zt.htmlCtrlEntityRegex=/&(newline|tab);/gi;zt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;zt.urlSchemeRegex=/^.+(:|&colon;)/gim;zt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;zt.relativeFirstCharacters=[".","/"];zt.BLANK_URL="about:blank";Object.defineProperty(jf,"__esModule",{value:!0});var W2=jf.sanitizeUrl=U2,Kt=zt;function z2(e){return Kt.relativeFirstCharacters.indexOf(e[0])>-1}function H2(e){var t=e.replace(Kt.ctrlCharactersRegex,"");return t.replace(Kt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function Y2(e){return URL.canParse(e)}function Vh(e){try{return decodeURIComponent(e)}catch{return e}}function U2(e){if(!e)return Kt.BLANK_URL;var t,r=Vh(e.trim());do r=H2(r).replace(Kt.htmlCtrlEntityRegex,"").replace(Kt.ctrlCharactersRegex,"").replace(Kt.whitespaceEscapeCharsRegex,"").trim(),r=Vh(r),t=r.match(Kt.ctrlCharactersRegex)||r.match(Kt.htmlEntitiesRegex)||r.match(Kt.htmlCtrlEntityRegex)||r.match(Kt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Kt.BLANK_URL;if(z2(i))return i;var s=i.trimStart(),o=s.match(Kt.urlSchemeRegex);if(!o)return i;var a=o[0].toLowerCase().trim();if(Kt.invalidProtocolRegex.test(a))return Kt.BLANK_URL;var n=s.replace(/\\/g,"/");if(a==="mailto:"||a.includes("://"))return n;if(a==="http:"||a==="https:"){if(!Y2(n))return Kt.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function Sa(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function G2(){}function Xf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function hl(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const j2="[object RegExp]",Vf="[object String]",Zf="[object Number]",Kf="[object Boolean]",Qf="[object Arguments]",X2="[object Symbol]",V2="[object Date]",Z2="[object Map]",K2="[object Set]",Q2="[object Array]",J2="[object ArrayBuffer]",tT="[object Object]",eT="[object DataView]",rT="[object Uint8Array]",iT="[object Uint8ClampedArray]",sT="[object Uint16Array]",oT="[object Uint32Array]",aT="[object Int8Array]",nT="[object Int16Array]",lT="[object Int32Array]",hT="[object Float32Array]",cT="[object Float64Array]",Zh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}();function cl(e){return typeof Zh.Buffer<"u"&&Zh.Buffer.isBuffer(e)}function uT(e){return Number.isSafeInteger(e)&&e>=0}function Jf(e){return e!=null&&typeof e!="function"&&uT(e.length)}function dT(e){return e==="__proto__"}function ul(e){return e==null||typeof e!="object"&&typeof e!="function"}function dl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fT(e,t){return Vr(e,void 0,e,new Map,t)}function Vr(e,t,r,i=new Map,s=void 0){const o=s==null?void 0:s(e,t,r,i);if(o!==void 0)return o;if(ul(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Vr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,Vr(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(Vr(n,void 0,r,i,s));return a}if(cl(e))return e.subarray();if(dl(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Vr(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),Ce(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),Ce(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),Ce(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,Ce(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),Ce(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),Ce(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),Ce(a,e,r,i,s),a}if(typeof e=="object"&&pT(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),Ce(a,e,r,i,s),a}return e}function Ce(e,t,r=e,i,s){const o=[...Object.keys(t),...Xf(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Vr(t[n],n,r,i,s))}}function pT(e){switch(hl(e)){case Qf:case Q2:case J2:case eT:case Kf:case V2:case hT:case cT:case aT:case nT:case lT:case Z2:case Zf:case tT:case j2:case K2:case Vf:case X2:case rT:case iT:case sT:case oT:return!0;default:return!1}}function gT(e,t){return fT(e,(r,i,s,o)=>{const a=t==null?void 0:t(r,i,s,o);if(a!==void 0)return a;if(typeof e=="object"){if(hl(e)==="[object Object]"&&typeof e.constructor!="function"){const n={};return o.set(e,n),Ce(n,e,s,o),n}switch(Object.prototype.toString.call(e)){case Zf:case Vf:case Kf:{const n=new e.constructor(e==null?void 0:e.valueOf());return Ce(n,e),n}case Qf:{const n={};return Ce(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}function Kh(e){return gT(e)}function gn(e){return e!==null&&typeof e=="object"&&hl(e)==="[object Arguments]"}function mn(e){return typeof e=="object"&&e!==null}function mT(e){return mn(e)&&Jf(e)}function ps(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(ps.Cache||Map),r}ps.Cache=Map;function Xs(e){return dl(e)}function yT(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function CT(e){if(ul(e))return e;if(Array.isArray(e)||dl(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function xT(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=Vs(s,a,i,new Map)}return s}function Vs(e,t,r,i){if(ul(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return CT(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...Xf(t)];for(let o=0;o<s.length;o++){const a=s[o];if(dT(a))continue;let n=t[a],l=e[a];if(gn(n)&&(n={...n}),gn(l)&&(l={...l}),cl(n)&&(n=Kh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let f=0;f<u.length;f++){const d=u[f];h[d]=l[d]}l=h}else if(mT(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||mn(l)&&mn(n)&&(Sa(l)||Sa(n)||Xs(l)||Xs(n))?e[a]=Vs(l,n,r,i):l==null&&Sa(n)?e[a]=Vs({},n,r,i):l==null&&Xs(n)?e[a]=Kh(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function bT(e,...t){return xT(e,...t,G2)}function Qh(e){if(e==null)return!0;if(Jf(e))return typeof e.splice!="function"&&typeof e!="string"&&!cl(e)&&!Xs(e)&&!gn(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return yT(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var kT="​",TT={curveBasis:Qa,curveBasisClosed:Tk,curveBasisOpen:wk,curveBumpX:Hu,curveBumpY:Yu,curveBundle:Sk,curveCardinalClosed:_k,curveCardinalOpen:Bk,curveCardinal:Xu,curveCatmullRomClosed:vk,curveCatmullRomOpen:Lk,curveCatmullRom:Zu,curveLinear:Oi,curveLinearClosed:Fk,curveMonotoneX:rd,curveMonotoneY:id,curveNatural:od,curveStep:ad,curveStepAfter:ld,curveStepBefore:nd},wT=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ST=p(function(e,t){const r=tp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);to(a),i=Rt(i,[...a])}else i=r.args;if(!i)return;let s=Pn(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),tp=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${wT.source})(?=[}][%]{2}).*
163
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),H.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let o;const a=[];for(;(o=$i.exec(e))!==null;)if(o.index===$i.lastIndex&&$i.lastIndex++,o&&!t||t&&((r=o[1])!=null&&r.match(t))||t&&((i=o[2])!=null&&i.match(t))){const n=o[1]?o[1]:o[2],l=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;a.push({type:n,args:l})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(s){return H.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),_T=p(function(e){return e.replace($i,"")},"removeDirectives"),BT=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function fl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return TT[r]??t}p(fl,"interpolateToCurve");function ep(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?W2(r):r}p(ep,"formatUrl");var vT=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){H.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function pl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(pl,"distance");function rp(e){let t,r=0;e.forEach(s=>{r+=pl(s,t),t=s});const i=r/2;return gl(e,i)}p(rp,"traverseEdge");function ip(e){return e.length===1?e[0]:rp(e)}p(ip,"calcLabelPosition");var Jh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),gl=p((e,t)=>{let r,i=t;for(const s of e){if(r){const o=pl(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Jh((1-a)*r.x+a*s.x,5),y:Jh((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),LT=p((e,t,r)=>{H.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=gl(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function sp(e,t,r){const i=structuredClone(r);H.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=gl(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}p(sp,"calcTerminalLabelPosition");function op(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(op,"getStylesFromArray");var tc=0,FT=p(()=>(tc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tc),"generateId");function ap(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(ap,"makeRandomHex");var AT=p(e=>ap(e.length),"random"),ET=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),MT=p(function(e,t){const r=t.text.replace(cs.lineBreakRegex," "),[,i]=Wo(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),$T=ps((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),cs.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=Ke(`${a} `,r),c=Ke(o,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=OT(a,t,"-",r);s.push(o,...f),o=d}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),OT=ps((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(Ke(c,i)>=t){const u=l+1,f=s.length===u,d=`${c}${r}`;o.push(f?c:d),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function np(e,t){return ml(e,t).height}p(np,"calculateTextHeight");function Ke(e,t){return ml(e,t).width}p(Ke,"calculateTextWidth");var ml=ps((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Wo(r),a=["sans-serif",i],n=e.split(cs.lineBreakRegex),l=[],c=yt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let d=0;const y={width:0,height:0,lineHeight:0};for(const g of n){const m=ET();m.text=g||kT;const C=MT(h,m).style("font-size",o).style("font-weight",s).style("font-family",f),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,b.width)),d=Math.round(b.height),y.height+=d,y.lineHeight=Math.round(Math.max(y.lineHeight,d))}l.push(y)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ls,IT=(ls=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(ls,"InitIDGenerator"),ls),Es,DT=p(function(e){return Es=Es||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Es.innerHTML=e,unescape(Es.textContent)},"entityDecode");function yl(e){return"str"in e}p(yl,"isDetailedError");var PT=p((e,t,r,i)=>{var o;if(!i)return;const s=(o=e.node())==null?void 0:o.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Wo=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Cl(e,t){return bT({},e,t)}p(Cl,"cleanAndMerge");var Te={assignWithDepth:Rt,wrapLabel:$T,calculateTextHeight:np,calculateTextWidth:Ke,calculateTextDimensions:ml,cleanAndMerge:Cl,detectInit:ST,detectDirective:tp,isSubstringInArray:BT,interpolateToCurve:fl,calcLabelPosition:ip,calcCardinalityPosition:LT,calcTerminalLabelPosition:sp,formatUrl:ep,getStylesFromArray:op,generateId:FT,random:AT,runFunc:vT,entityDecode:DT,insertTitle:PT,isLabelCoordinateInPath:lp,parseFontSize:Wo,InitIDGenerator:IT},RT=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ar=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),SF=p((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Ht(e){return e??null}p(Ht,"handleUndefinedAttr");function lp(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(lp,"isLabelCoordinateInPath");var xl=p(({flowchart:e})=>{var s,o;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((o=e==null?void 0:e.subGraphTitleMargin)==null?void 0:o.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function hp(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(o=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=St().fontSize?St().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Qc.fontSize]=Wo(n),h=c*l+"px";s.style.minWidth=h,s.style.maxWidth=h}else s.style.width="100%";o(s)}p(a,"setupImage"),setTimeout(()=>{s.complete&&a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}p(hp,"configureLabelImages");const NT=Object.freeze({left:0,top:0,width:16,height:16}),ko=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),cp=Object.freeze({...NT,...ko}),qT=Object.freeze({...cp,body:"",hidden:!1}),WT=Object.freeze({width:null,height:null}),zT=Object.freeze({...WT,...ko}),HT=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return t&&!_a(c)?null:c}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return t&&!_a(n)?null:n}if(r&&i===""){const n={provider:i,prefix:"",name:o};return t&&!_a(n,r)?null:n}return null},_a=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function YT(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function ec(e,t){const r=YT(e,t);for(const i in qT)i in ko?i in e&&!(i in r)&&(r[i]=ko[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function UT(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function rc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=ec(i[n]||s[n],o)}return a(t),r.forEach(a),ec(e,o)}function GT(e,t){if(e.icons[t])return rc(e,t,[]);const r=UT(e,[t])[t];return r?rc(e,t,r):null}const jT=/(-?[0-9.]*[0-9]+[0-9.]*)/g,XT=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ic(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(jT);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=XT.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function VT(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function ZT(e,t){return e?"<defs>"+e+"</defs>"+t:t}function KT(e,t,r){const i=VT(e);return ZT(i.defs,t+i.content+r)}const QT=e=>e==="unset"||e==="undefined"||e==="none";function JT(e,t){const r={...cp,...e},i={...zT,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(g=>{const m=[],C=g.hFlip,b=g.vFlip;let k=g.rotate;C?b?k+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):b&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,m.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,m.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),m.length&&(o=KT(o,'<g transform="'+m.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,u;a===null?(u=n===null?"1em":n==="auto"?c:n,h=ic(u,l/c)):(h=a==="auto"?l:a,u=n===null?ic(h,c/l):n==="auto"?c:n);const f={},d=(g,m)=>{QT(m)||(f[g]=m.toString())};d("width",h),d("height",u);const y=[s.left,s.top,l,c];return f.viewBox=y.join(" "),{attributes:f,viewBox:y,body:o}}const tw=/\sid="(\S+)"/g,sc=new Map;function ew(e){e=e.replace(/[0-9]+$/,"")||"a";const t=sc.get(e)||0;return sc.set(e,t+1),t?`${e}${t}`:e}function rw(e){const t=[];let r;for(;r=tw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=ew(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function iw(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var sw={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},yn=new Map,up=new Map,ow=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(H.debug("Registering icon pack:",t.name),"loader"in t)up.set(t.name,t.loader);else if("icons"in t)yn.set(t.name,t.icons);else throw H.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),dp=p(async(e,t)=>{const r=HT(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=yn.get(i);if(!s){const a=up.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},yn.set(i,s)}catch(n){throw H.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=GT(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),aw=p(async e=>{try{return await dp(e),!0}catch{return!1}},"isIconAvailable"),gs=p(async(e,t,r)=>{let i;try{i=await dp(e,t==null?void 0:t.fallbackPrefix)}catch(a){H.error(a),i=sw}const s=JT(i,t),o=iw(rw(s.body),{...s.attributes,...r});return _e(o,Et())},"getIconSVG");function bl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $r=bl();function fp(e){$r=e}var Ii={exec:()=>null};function _t(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(se.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var nw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},lw=/^(?:[ \t]*(?:\n|$))+/,hw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ms=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,uw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kl=/(?:[*+-]|\d{1,9}[.)])/,pp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gp=_t(pp).replace(/bull/g,kl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),dw=_t(pp).replace(/bull/g,kl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Tl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,fw=/^[^\n]+/,wl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,pw=_t(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gw=_t(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kl).getRegex(),zo="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",Sl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mw=_t("^ {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",Sl).replace("tag",zo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mp=_t(Tl).replace("hr",ms).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",zo).getRegex(),yw=_t(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mp).getRegex(),_l={blockquote:yw,code:hw,def:pw,fences:cw,heading:uw,hr:ms,html:mw,lheading:gp,list:gw,newline:lw,paragraph:mp,table:Ii,text:fw},oc=_t("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ms).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zo).getRegex(),Cw={..._l,lheading:dw,table:oc,paragraph:_t(Tl).replace("hr",ms).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",oc).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",zo).getRegex()},xw={..._l,html:_t(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sl).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:Ii,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_t(Tl).replace("hr",ms).replace("heading",` *#{1,6} *[^
164
+ ]`).replace("lheading",gp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},bw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,kw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yp=/^( {2,}|\\)\n(?!\s*$)/,Tw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ho=/[\p{P}\p{S}]/u,Bl=/[\s\p{P}\p{S}]/u,Cp=/[^\s\p{P}\p{S}]/u,ww=_t(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bl).getRegex(),xp=/(?!~)[\p{P}\p{S}]/u,Sw=/(?!~)[\s\p{P}\p{S}]/u,_w=/(?:[^\s\p{P}\p{S}]|~)/u,Bw=_t(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",nw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),bp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vw=_t(bp,"u").replace(/punct/g,Ho).getRegex(),Lw=_t(bp,"u").replace(/punct/g,xp).getRegex(),kp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Fw=_t(kp,"gu").replace(/notPunctSpace/g,Cp).replace(/punctSpace/g,Bl).replace(/punct/g,Ho).getRegex(),Aw=_t(kp,"gu").replace(/notPunctSpace/g,_w).replace(/punctSpace/g,Sw).replace(/punct/g,xp).getRegex(),Ew=_t("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Cp).replace(/punctSpace/g,Bl).replace(/punct/g,Ho).getRegex(),Mw=_t(/\\(punct)/,"gu").replace(/punct/g,Ho).getRegex(),$w=_t(/^<(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(),Ow=_t(Sl).replace("(?:-->|$)","-->").getRegex(),Iw=_t("^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",Ow).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),To=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Dw=_t(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",To).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Tp=_t(/^!?\[(label)\]\[(ref)\]/).replace("label",To).replace("ref",wl).getRegex(),wp=_t(/^!?\[(ref)\](?:\[\])?/).replace("ref",wl).getRegex(),Pw=_t("reflink|nolink(?!\\()","g").replace("reflink",Tp).replace("nolink",wp).getRegex(),ac=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vl={_backpedal:Ii,anyPunctuation:Mw,autolink:$w,blockSkip:Bw,br:yp,code:kw,del:Ii,emStrongLDelim:vw,emStrongRDelimAst:Fw,emStrongRDelimUnd:Ew,escape:bw,link:Dw,nolink:wp,punctuation:ww,reflink:Tp,reflinkSearch:Pw,tag:Iw,text:Tw,url:Ii},Rw={...vl,link:_t(/^!?\[(label)\]\((.*?)\)/).replace("label",To).getRegex(),reflink:_t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",To).getRegex()},Cn={...vl,emStrongRDelimAst:Aw,emStrongLDelim:Lw,url:_t(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ac).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:_t(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ac).getRegex()},Nw={...Cn,br:_t(yp).replace("{2,}","*").getRegex(),text:_t(Cn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ms={normal:_l,gfm:Cw,pedantic:xw},yi={normal:vl,gfm:Cn,breaks:Nw,pedantic:Rw},qw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nc=e=>qw[e];function Me(e,t){if(t){if(se.escapeTest.test(e))return e.replace(se.escapeReplace,nc)}else if(se.escapeTestNoEncode.test(e))return e.replace(se.escapeReplaceNoEncode,nc);return e}function lc(e){try{e=encodeURI(e).replace(se.percentDecode,"%")}catch{return null}return e}function hc(e,t){var o;let r=e.replace(se.findPipe,(a,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(se.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((o=i.at(-1))!=null&&o.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(se.slashPipe,"|");return i}function Ci(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i;){let o=e.charAt(i-s-1);if(o===t&&!r)s++;else if(o!==t&&r)s++;else break}return e.slice(0,i-s)}function Ww(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function cc(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function zw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
165
+ `).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
166
+ `)}var wo=class{constructor(t){Ft(this,"options");Ft(this,"rules");Ft(this,"lexer");this.options=t||$r}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ci(i,`
167
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=zw(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Ci(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Ci(r[0],`
168
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ci(r[0],`
169
+ `).split(`
170
+ `),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
171
+ `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
172
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
173
+ ${h}`:h,o=o?`${o}
174
+ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=f,i.length===0)break;let d=a.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let y=d,g=y.raw+`
175
+ `+i.join(`
176
+ `),m=this.blockquote(g);a[a.length-1]=m,s=s.substring(0,s.length-y.raw.length)+m.raw,o=o.substring(0,o.length-y.text.length)+m.text;break}else if((d==null?void 0:d.type)==="list"){let y=d,g=y.raw+`
177
+ `+i.join(`
178
+ `),m=this.list(g);a[a.length-1]=m,s=s.substring(0,s.length-d.raw.length)+m.raw,o=o.substring(0,o.length-y.raw.length)+m.raw,i=g.substring(a.at(-1).raw.length).split(`
179
+ `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
180
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
181
+ `,1)[0],y=!f.trim(),g=0;if(this.options.pedantic?(g=2,u=f.trimStart()):y?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=f.slice(g),g+=r[1].length),y&&this.rules.other.blankLine.test(d)&&(h+=d+`
182
+ `,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),S=this.rules.other.headingBeginRegex(g),_=this.rules.other.htmlBeginRegex(g);for(;t;){let F=t.split(`
183
+ `,1)[0],v;if(d=F,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||_.test(d)||b.test(d)||k.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
184
+ `+v.slice(g);else{if(y||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||S.test(f)||k.test(f))break;u+=`
185
+ `+d}!y&&!d.trim()&&(y=!0),h+=F+`
186
+ `,t=t.substring(F.length+1),f=v.slice(g)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(C=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!m,checked:C,loose:!1,text:u,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=u}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=hc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
187
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<i.length;l++)a.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:a.align[l]});for(let l of o)a.rows.push(hc(l,a.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[h]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
188
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Ci(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=Ww(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),cc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return cc(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...s[0]][0].length,f=t.slice(0,o+s.index+u+n);if(Math.min(o,n)%2){let y=f.slice(1,-1);return{type:"em",raw:f,text:y,tokens:this.lexer.inlineTokens(y)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,o;if(r[2]==="@")s=r[0],o="mailto:"+s;else{let a;do a=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(a!==r[0]);s=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},xe=class xn{constructor(t){Ft(this,"tokens");Ft(this,"options");Ft(this,"state");Ft(this,"tokenizer");Ft(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||$r,this.options.tokenizer=this.options.tokenizer||new wo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:se,block:Ms.normal,inline:yi.normal};this.options.pedantic?(r.block=Ms.pedantic,r.inline=yi.pedantic):this.options.gfm&&(r.block=Ms.gfm,this.options.breaks?r.inline=yi.breaks:r.inline=yi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ms,inline:yi}}static lex(t,r){return new xn(r).lex(t)}static lexInline(t,r){return new xn(r).inlineTokens(t)}lex(t){t=t.replace(se.carriageReturn,`
189
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,o,a;for(this.options.pedantic&&(t=t.replace(se.tabCharGlobal," ").replace(se.spaceLine,""));t;){let n;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(c=>(n=c.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let c=r.at(-1);n.raw.length===1&&c!==void 0?c.raw+=`
190
+ `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
191
+ `)?"":`
192
+ `)+n.raw,c.text+=`
193
+ `+n.text,this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
194
+ `)?"":`
195
+ `)+n.raw,c.text+=`
196
+ `+n.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
197
+ `)?"":`
198
+ `)+n.raw,c.text+=`
199
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
200
+ `)?"":`
201
+ `)+n.raw,c.text+=`
202
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,u,f;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let y=t;if((f=this.options.extensions)!=null&&f.startInline){let g=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},m),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(y=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(y)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),a=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},So=class{constructor(t){Ft(this,"options");Ft(this,"parser");this.options=t||$r}space(t){return""}code({text:t,lang:r,escaped:i}){var a;let s=(a=(r||"").match(se.notSpaceStart))==null?void 0:a[0],o=t.replace(se.endingNewline,"")+`
203
+ `;return s?'<pre><code class="language-'+Me(s)+'">'+(i?o:Me(o,!0))+`</code></pre>
204
+ `:"<pre><code>"+(i?o:Me(o,!0))+`</code></pre>
205
+ `}blockquote({tokens:t}){return`<blockquote>
206
+ ${this.parser.parse(t)}</blockquote>
207
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
208
+ `}hr(t){return`<hr>
209
+ `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
210
+ `+s+"</"+o+`>
211
+ `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Me(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
212
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
213
+ `}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
214
+ <thead>
215
+ `+r+`</thead>
216
+ `+s+`</table>
217
+ `}tablerow({text:t}){return`<tr>
218
+ ${t}</tr>
219
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
220
+ `}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>${Me(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=lc(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+Me(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=lc(t);if(o===null)return Me(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Me(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Me(t.text)}},Ll=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},be=class bn{constructor(t){Ft(this,"options");Ft(this,"renderer");Ft(this,"textRenderer");this.options=t||$r,this.options.renderer=this.options.renderer||new So,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ll}static parse(t,r){return new bn(r).parse(t)}static parseInline(t,r){return new bn(r).parseInline(t)}parse(t,r=!0){var s,o;let i="";for(let a=0;a<t.length;a++){let n=t[a];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[n.type]){let c=n,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;a+1<t.length&&t[a+1].type==="text";)c=t[++a],h+=`
221
+ `+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var s,o;let i="";for(let a=0;a<t.length;a++){let n=t[a];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=c||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Rs,vi=(Rs=class{constructor(t){Ft(this,"options");Ft(this,"block");this.options=t||$r}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?xe.lex:xe.lexInline}provideParser(){return this.block?be.parse:be.parseInline}},Ft(Rs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ft(Rs,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Rs),Hw=class{constructor(...t){Ft(this,"defaults",bl());Ft(this,"options",this.setOptions);Ft(this,"parse",this.parseMarkdown(!0));Ft(this,"parseInline",this.parseMarkdown(!1));Ft(this,"Parser",be);Ft(this,"Renderer",So);Ft(this,"TextRenderer",Ll);Ft(this,"Lexer",xe);Ft(this,"Tokenizer",wo);Ft(this,"Hooks",vi);this.use(...t)}walkTokens(t,r){var s,o;let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let n=a;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let n=a;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=a;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let c=n[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new So(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new wo(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new vi;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];vi.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&vi.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(o,h);return c.call(o,f)})();let u=l.call(o,h);return c.call(o,u)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(o,h);return f===!1&&(f=await c.apply(o,h)),f})();let u=l.apply(o,h);return u===!1&&(u=c.apply(o,h)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return xe.lex(t,r??this.defaults)}parser(t,r){return be.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?xe.lex:xe.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?be.parse:be.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?xe.lex:xe.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?be.parse:be.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
222
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Me(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Er=new Hw;function vt(e,t){return Er.parse(e,t)}vt.options=vt.setOptions=function(e){return Er.setOptions(e),vt.defaults=Er.defaults,fp(vt.defaults),vt};vt.getDefaults=bl;vt.defaults=$r;vt.use=function(...e){return Er.use(...e),vt.defaults=Er.defaults,fp(vt.defaults),vt};vt.walkTokens=function(e,t){return Er.walkTokens(e,t)};vt.parseInline=Er.parseInline;vt.Parser=be;vt.parser=be.parse;vt.Renderer=So;vt.TextRenderer=Ll;vt.Lexer=xe;vt.lexer=xe.lex;vt.Tokenizer=wo;vt.Hooks=vi;vt.parse=vt;vt.options;vt.setOptions;vt.use;vt.walkTokens;vt.parseInline;be.parse;xe.lex;function Sp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var o=new RegExp(`
223
+ [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(o,`
224
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
225
+ `)&&(u=String(n).split(`
226
+ `).map(function(f,d){return d===0?f:"".concat(h).concat(f)}).join(`
227
+ `)),a+=u+i[l+1]}),a}function _p(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
228
+ `).replace(/\n{2,}/g,`
229
+ `);return Sp(i)}p(_p,"preprocessMarkdown");function Bp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(Bp,"nonMarkdownToLines");function vp(e,t={}){const r=_p(e,t),i=vt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
230
+ `).forEach((h,u)=>{u!==0&&(o++,s.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&s[o].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{a(c)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}p(vp,"markdownToLines");function Lp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Lp,"nonMarkdownToHTML");function Fp(e,{markdownAutoWrap:t}={}){const r=vt.lexer(e);function i(s){var o,a,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(o=s.tokens)==null?void 0:o.map(i).join("")}</strong>`:s.type==="em"?`<em>${(a=s.tokens)==null?void 0:a.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(H.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(Fp,"markdownToHTML");function Ap(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Ap,"splitTextToChars");function Ep(e,t){const r=Ap(t.content);return Fl(e,[],r,t.type)}p(Ep,"splitWordToFitWidth");function Fl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?Fl(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Fl,"splitWordToFitWidthRecursion");function Mp(e,t){if(e.some(({content:r})=>r.includes(`
231
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return _o(e,t)}p(Mp,"splitLineToFitWidth");function _o(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return _o(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=Ep(t,o);r.push([n]),l.content&&e.unshift(l)}return _o(e,t,r)}p(_o,"splitLineToFitWidthRecursion");function kn(e,t){t&&e.attr("style",t)}p(kn,"applyStyle");var uc=16384;async function $p(e,t,r,i,s=!1,o=Et()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,uc)}px`),a.attr("height",`${Math.min(10*r,uc)}px`);const n=a.append("xhtml:div"),l=Pi(t.label)?await uu(t.label.replace(cs.lineBreakRegex,`
232
+ `),o):_e(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),kn(h,t.labelStyle),h.attr("class",`${c} ${i}`),kn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),a.node()}p($p,"addHtmlSpan");function Yo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(Yo,"createTspan");function Op(e,t,r){const i=e.append("text"),s=Yo(i,1,t);Uo(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}p(Op,"computeWidthOfText");function Yw(e,t,r){var a;const i=e.append("text"),s=Yo(i,1,t);Uo(s,[{content:r,type:"normal"}]);const o=(a=s.node())==null?void 0:a.getBoundingClientRect();return o&&i.remove(),o}p(Yw,"computeDimensionOfText");function Ip(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(d=>Op(a,1.1,d)<=e,"checkWidth"),f=u(h)?[h]:Mp(h,u);for(const d of f){const y=Yo(l,c,1.1,s);Uo(y,d),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),a.node()}else return l.node()}p(Ip,"createFormattedText");function Tn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(Tn,"decodeHTMLEntities");function Uo(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(Tn(r.content)):s.text(" "+Tn(r.content))})}p(Uo,"updateTextContentAndStyles");async function Dp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await aw(n)?await gs(n,void 0,{class:"label-icon"}):`<i class='${_e(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Dp,"replaceIconSubstring");var ze=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(H.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const u=a?Fp(t,h):Lp(t),f=await Dp(Ar(u),h),d=t.replace(/\\\\/g,"\\"),y={isNode:n,label:Pi(t)?d:f,labelStyle:r.replace("fill:","color:")};return await $p(e,y,l,s,c,h)}else{const u=Ar(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?vp(u.replace("<br>","<br/>"),h):Bp(u),d=Ip(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");yt(d).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");yt(d).select("rect").attr("style",y.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");yt(d).select("text").attr("style",g)}return i?yt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):yt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Ba(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function Uw(e,t){return e[0]===t[0]&&e[1]===t[1]}function Gw(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)Ba(c,n,s);const l=function(c,h,u){const f=[];for(const b of c){const k=[...b];Uw(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];h=Math.max(h,.1);const y=[];for(const b of f)for(let k=0;k<b.length-1;k++){const w=b[k],S=b[k+1];if(w[1]!==S[1]){const _=Math.min(w[1],S[1]);y.push({ymin:_,ymax:Math.max(w[1],S[1]),x:_===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(y.sort((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!y.length)return d;let g=[],m=y[0].ymin,C=0;for(;g.length||y.length;){if(y.length){let b=-1;for(let k=0;k<y.length&&!(y[k].ymin>m);k++)b=k;y.splice(0,b+1).forEach(k=>{g.push({s:m,edge:k})})}if(g=g.filter(b=>!(b.edge.ymax<=m)),g.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||C%h==0)&&g.length>1)for(let b=0;b<g.length;b+=2){const k=b+1;if(k>=g.length)break;const w=g[b].edge,S=g[k].edge;d.push([[Math.round(w.x),m],[Math.round(S.x),m]])}m+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(a,o,i);if(s){for(const c of a)Ba(c,n,-s);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),Ba(f,h,u)})(l,n,-s)}return l}function ys(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),Gw(e,s,i,o||1)}class Al{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ys(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Go(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class jw extends Al{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=ys(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)Go([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class Xw extends Al{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class Vw{constructor(t){this.helper=t}fillPolygons(t,r){const i=ys(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=Go(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let y=0;y<h;y++){const g=d+u+y*s,m=f-a+2*Math.random()*a,C=g-a+2*Math.random()*a,b=this.helper.ellipse(m,C,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Zw{constructor(t){this.helper=t}fillPolygons(t,r){const i=ys(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach(a=>{const n=Go(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],u=a[1];h[0]>u[0]&&(h=a[1],u=a[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const y=d*(i+s),g=y+i,m=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)],C=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}}),o}}class Kw{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=ys(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(o=>{const a=Go(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,y=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[g[0]+y*Math.cos(h+Math.PI/4),g[1]+y*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}}),s}}const ae={};class Qw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Jw=0,va=1,dc=2,$s={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 La(e,t){return e.type===t}function El(e){const t=[],r=function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Jw,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:va,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:dc,text:""},n}(e);let i="BOD",s=0,o=r[s];for(;!La(o,dc);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return El("M0,0"+e);s++,a=$s[o.text],i=o.text}else La(o,va)?a=$s[i]:(s++,a=$s[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!La(c,va))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof $s[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Pp(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((c,h)=>h%2?c+r:c+t);o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((c,h)=>h%2?c+r:c+t);o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((c,h)=>h%2?c+r:c+t);o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function Rp(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-n),f=s+(s-l)):(u=i,f=s),t.push({key:"C",data:[u,f,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,f]=h;let d=0,y=0;r==="Q"||r==="T"?(d=i+(i-n),y=s+(s-l)):(d=i,y=s);const g=i+2*(d-i)/3,m=s+2*(y-s)/3,C=u+2*(d-u)/3,b=f+2*(y-f)/3;t.push({key:"C",data:[g,m,C,b,u,f]}),n=d,l=y,i=u,s=f;break}case"Q":{const[u,f,d,y]=h,g=i+2*(u-i)/3,m=s+2*(f-s)/3,C=d+2*(u-d)/3,b=y+2*(f-y)/3;t.push({key:"C",data:[g,m,C,b,d,y]}),n=u,l=f,i=d,s=y;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],y=h[3],g=h[4],m=h[5],C=h[6];u===0||f===0?(t.push({key:"C",data:[i,s,m,C,m,C]}),i=m,s=C):(i!==m||s!==C)&&(Np(i,s,m,C,u,f,d,y,g).forEach(function(b){t.push({key:"C",data:b})}),i=m,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function xi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Np(e,t,r,i,s,o,a,n,l,c){const h=(u=a,Math.PI*u/180);var u;let f=[],d=0,y=0,g=0,m=0;if(c)[d,y,g,m]=c;else{[e,t]=xi(e,t,-h),[r,i]=xi(r,i,-h);const W=(e-r)/2,O=(t-i)/2;let A=W*W/(s*s)+O*O/(o*o);A>1&&(A=Math.sqrt(A),s*=A,o*=A);const B=s*s,$=o*o,E=B*$-B*O*O-$*W*W,q=B*O*O+$*W*W,Y=(n===l?-1:1)*Math.sqrt(Math.abs(E/q));g=Y*s*O/o+(e+r)/2,m=Y*-o*W/s+(t+i)/2,d=Math.asin(parseFloat(((t-m)/o).toFixed(9))),y=Math.asin(parseFloat(((i-m)/o).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(y=Math.PI-y),d<0&&(d=2*Math.PI+d),y<0&&(y=2*Math.PI+y),l&&d>y&&(d-=2*Math.PI),!l&&y>d&&(y-=2*Math.PI)}let C=y-d;if(Math.abs(C)>120*Math.PI/180){const W=y,O=r,A=i;y=l&&y>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Np(r=g+s*Math.cos(y),i=m+o*Math.sin(y),O,A,s,o,a,0,l,[y,W,g,m])}C=y-d;const b=Math.cos(d),k=Math.sin(d),w=Math.cos(y),S=Math.sin(y),_=Math.tan(C/4),F=4/3*s*_,v=4/3*o*_,z=[e,t],N=[e+F*k,t-v*b],M=[r+F*S,i-v*w],U=[r,i];if(N[0]=2*z[0]-N[0],N[1]=2*z[1]-N[1],c)return[N,M,U].concat(f);{f=[N,M,U].concat(f);const W=[];for(let O=0;O<f.length;O+=3){const A=xi(f[O][0],f[O][1],h),B=xi(f[O+1][0],f[O+1][1],h),$=xi(f[O+2][0],f[O+2][1],h);W.push([A[0],A[1],B[0],B[1],$[0],$[1]])}return W}}const tS={randOffset:function(e,t){return ct(e,t)},randOffsetWithRange:function(e,t,r){return Bo(e,t,r)},ellipse:function(e,t,r,i,s){const o=Wp(r,i,s);return wn(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return dr(e,t,r,i,s,!0)}};function qp(e,t,r,i,s){return{type:"path",ops:dr(e,t,r,i,s)}}function Zs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...dr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...dr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?qp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function eS(e,t,r,i,s){return function(o,a){return Zs(o,!0,a)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function fc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Os(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Os(r[0],1.5*(1+.22*t.roughness),mc(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Os(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Os(a,1.5*(1+.22*t.roughness),mc(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Wp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=ct(a*l,r),n+=ct(n*l,r),{increment:o,rx:a,ry:n}}function wn(e,t,r,i){const[s,o]=yc(i.increment,e,t,i.rx,i.ry,1,i.increment*Bo(.1,Bo(.4,1,r),r),r);let a=vo(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=yc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=vo(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function pc(e,t,r,i,s,o,a,n,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=ct(.01*u,l),f+=ct(.01*f,l);let d=s,y=o;for(;d<0;)d+=2*Math.PI,y+=2*Math.PI;y-d>2*Math.PI&&(d=0,y=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(y-d)/2),C=Cc(m,c,h,u,f,d,y,1,l);if(!l.disableMultiStroke){const b=Cc(m,c,h,u,f,d,y,1.5,l);C.push(...b)}return a&&(n?C.push(...dr(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...dr(c,h,c+u*Math.cos(y),h+f*Math.sin(y),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:C}}function gc(e,t){const r=Rp(Pp(El(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...dr(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,u,f,d]=n;i.push(...rS(l,c,h,u,f,d,o,t)),o=[f,d];break}case"Z":i.push(...dr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function Fa(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+ct(s,t),i[0][1]+ct(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+ct(s,t),i[a][1]+ct(s,t)]})}}return{type:"fillPath",ops:r}}function zr(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!ae[s])switch(s){case"zigzag":ae[s]||(ae[s]=new jw(i));break;case"cross-hatch":ae[s]||(ae[s]=new Xw(i));break;case"dots":ae[s]||(ae[s]=new Vw(i));break;case"dashed":ae[s]||(ae[s]=new Zw(i));break;case"zigzag-line":ae[s]||(ae[s]=new Kw(i));break;default:s="hachure",ae[s]||(ae[s]=new Al(i))}return ae[s]}(t,tS).fillPolygons(e,t)}function mc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function zp(e){return e.randomizer||(e.randomizer=new Qw(e.seed||0)),e.randomizer.next()}function Bo(e,t,r,i=1){return r.roughness*i*(zp(r)*(t-e)+e)}function ct(e,t,r=1){return Bo(-e,e,t,r)}function dr(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=Sn(e,t,r,i,s,!0,!1);if(a)return n;const l=Sn(e,t,r,i,s,!0,!0);return n.concat(l)}function Sn(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,f=.2+.2*zp(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,y=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=ct(d,s,c),y=ct(y,s,c);const g=[],m=()=>ct(u,s,c),C=()=>ct(h,s,c),b=s.preserveVertices;return o&&(a?g.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):g.push({op:"move",data:[e+(b?0:ct(h,s,c)),t+(b?0:ct(h,s,c))]})),a?g.push({op:"bcurveTo",data:[d+e+(r-e)*f+m(),y+t+(i-t)*f+m(),d+e+2*(r-e)*f+m(),y+t+2*(i-t)*f+m(),r+(b?0:m()),i+(b?0:m())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*f+C(),y+t+(i-t)*f+C(),d+e+2*(r-e)*f+C(),y+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}),g}function Os(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+ct(t,r),e[0][1]+ct(t,r)]),i.push([e[0][0]+ct(t,r),e[0][1]+ct(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+ct(t,r),e[s][1]+ct(t,r)]),s===e.length-1&&i.push([e[s][0]+ct(t,r),e[s][1]+ct(t,r)]);return vo(i,null,r)}function vo(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(t&&t.length===2){const n=r.maxRandomnessOffset;s.push({op:"lineTo",data:[t[0]+ct(n,r),t[1]+ct(n,r)]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Sn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function yc(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=ct(.5,n)-Math.PI/2;c.push([ct(o,n)+t+.9*i*Math.cos(h-e),ct(o,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[ct(o,n)+t+i*Math.cos(f),ct(o,n)+r+s*Math.sin(f)];l.push(d),c.push(d)}c.push([ct(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),ct(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([ct(o,n)+t+.98*i*Math.cos(h+a),ct(o,n)+r+.98*s*Math.sin(h+a)]),c.push([ct(o,n)+t+.9*i*Math.cos(h+.5*a),ct(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function Cc(e,t,r,i,s,o,a,n,l){const c=o+ct(.1,l),h=[];h.push([ct(n,l)+t+.9*i*Math.cos(c-e),ct(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=a;u+=e)h.push([ct(n,l)+t+i*Math.cos(u),ct(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),vo(h,null,l)}function rS(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:ct(c[0],n)),a[1]+(f?0:ct(c[0],n))]}),h=f?[s,o]:[s+ct(c[d],n),o+ct(c[d],n)],l.push({op:"bcurveTo",data:[e+ct(c[d],n),t+ct(c[d],n),r+ct(c[d],n),i+ct(c[d],n),h[0],h[1]]});return l}function bi(e){return[...e]}function xc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(bi(e[0]),bi(e[1]),bi(e[2]),bi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(bi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function Ks(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function iS(e,t,r){const i=Ks(t,r);if(i===0)return Ks(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Ks(e,kr(t,r,s))}function kr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function _n(e,t,r,i){const s=i||[];if(function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],f=n[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let y=3*h[1]-2*c[1]-f[1];y*=y;let g=3*u[0]-2*f[0]-c[0];g*=g;let m=3*u[1]-2*f[1]-c[1];return m*=m,d<g&&(d=g),y<m&&(y=m),d+y}(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(Ks(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=kr(l,c,.5),d=kr(c,h,.5),y=kr(h,u,.5),g=kr(f,d,.5),m=kr(d,y,.5),C=kr(g,m,.5);_n([l,f,g,C],0,r,s),_n([C,m,y,u],0,r,s)}var o,a;return s}function sS(e,t){return Lo(e,0,e.length,t)}function Lo(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=iS(e[h],a,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Lo(e,t,c+1,i,o),Lo(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function Aa(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)_n(e,3*o,t,i);return r&&r>0?Lo(i,0,i.length,r):i}const ce="none";class Fo{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[qp(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=eS(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(Fa([c],a)):n.push(zr([c],a))}return a.stroke!==ce&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=Wp(i,s,a),c=wn(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=wn(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(zr([c.estimatedPoints],a));return a.stroke!==ce&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Zs(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],u=pc(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=pc(t,r,i,s,o,a,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,y,g,m,C,b){const k=f,w=d;let S=Math.abs(y/2),_=Math.abs(g/2);S+=ct(.01*S,b),_+=ct(.01*_,b);let F=m,v=C;for(;F<0;)F+=2*Math.PI,v+=2*Math.PI;v-F>2*Math.PI&&(F=0,v=2*Math.PI);const z=(v-F)/b.curveStepCount,N=[];for(let M=F;M<=v;M+=z)N.push([k+S*Math.cos(M),w+_*Math.sin(M)]);return N.push([k+S*Math.cos(v),w+_*Math.sin(v)]),N.push([k,w]),zr([N],b)}(t,r,i,s,o,a,c));return c.stroke!==ce&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=fc(t,i);if(i.fill&&i.fill!==ce)if(i.fillStyle==="solid"){const a=fc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...Aa(xc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Aa(xc(c),10,(1+i.roughness)/2))}a.length&&s.push(zr([a],i))}return i.stroke!==ce&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=Zs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Fa([t],i)):s.push(zr([t],i))),i.stroke!==ce&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==ce,a=i.stroke!==ce,n=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=Rp(Pp(El(h))),y=[];let g=[],m=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...Aa(C,u)),C=[]},k=()=>{b(),g.length&&(y.push(g),g=[])};for(const{key:S,data:_}of d)switch(S){case"M":k(),m=[_[0],_[1]],g.push(m);break;case"L":b(),g.push([_[0],_[1]]);break;case"C":if(!C.length){const F=g.length?g[g.length-1]:m;C.push([F[0],F[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":b(),g.push([m[0],m[1]])}if(k(),!f)return y;const w=[];for(const S of y){const _=sS(S,f);_.length&&w.push(_)}return w}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=gc(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=gc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Fa(l,i));else s.push(zr(l,i));return a&&(n?l.forEach(h=>{s.push(Zs(h,!1,i))}):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map(a=>+a.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ce};break;case"fillPath":a={d:this.opsToPath(o),stroke:ce,strokeWidth:0,fill:i.fill||ce};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ce,strokeWidth:i,fill:ce}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class oS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Fo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map(n=>+n.toFixed(i)):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Is="http://www.w3.org/2000/svg";class aS{constructor(t,r){this.svg=t,this.gen=new Fo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Is,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Is,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Is,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Is,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var tt={canvas:(e,t)=>new oS(e,t),svg:(e,t)=>new aS(e,t),generator:e=>new Fo(e),newSeed:()=>Fo.newSeed()},dt=p(async(e,t,r)=>{var d,y;let i;const s=t.useHtmlLabels||qe((d=St())==null?void 0:d.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",Ht(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await ze(a,_e(Ar(n),St()),{useHtmlLabels:s,width:t.width||((y=St().flowchart)==null?void 0:y.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},St());let u=h.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(s){const g=h.children[0],m=yt(h);await hp(g,n),u=g.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}return s?a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):a.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:u,halfPadding:f,label:a}},"labelHelper"),Ea=p(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??oe(St()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await ze(s,_e(Ar(t),St()),{useHtmlLabels:i,width:r.width||((c=(l=St())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=o.getBBox();const n=r.padding/2;if(oe(St())){const h=o.children[0],u=yt(o);a=h.getBoundingClientRect(),u.attr("width",a.width),u.attr("height",a.height)}return i?s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):s.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:s}},"insertLabel"),it=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ht=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function kt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(kt,"createPathFromPoints");function fr(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const y=d/50,g=e+y*l,m=f+s*Math.sin(u*(g-e));a.push({x:g,y:m})}return a}p(fr,"generateFullSineWavePoints");function Gi(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),y=t+r*Math.sin(f);a.push({x:-d,y:-y})}return a}p(Gi,"generateCirclePoints");function Bn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=p((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(Bn,"mergePaths");var nS=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),Or=nS,lS=p(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=St(),n=oe(a);return await ze(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),ar=lS,pr=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),hS=p(async(e,t)=>{const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=rt(t),f=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),d=qe(r.flowchart.htmlLabels),y=t.direction==="LR",g=f.insert("g").attr("class","cluster-label swimlane-label"),m=await ze(g,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let C=m.getBBox();if(d){const W=m.children[0],O=yt(m);C=W.getBoundingClientRect(),O.attr("width",C.width),O.attr("height",C.height)}const b=t.padding??0,k=t.width<=C.width+b?C.width+b:t.width;t.width<=C.width+b?t.diff=(k-t.width)/2-b:t.diff=-b;const w=t.height,S=t.y-w/2,_=t.y+w/2,F=t.x-k/2,v=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+w/3,z=y?4:0,N=C.height+2*z;let M,U;if(y){const W=Math.max(N,C.height+2*z),O=F+W,A=Math.max(0,k-W);if(t.look==="handDrawn"){const E=tt.svg(f),q=J(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),Y=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),G=E.rectangle(F,S,W,w,q);M=f.insert(()=>G,":first-child");const et=E.rectangle(O,S,A,w,Y);U=f.insert(()=>et,":first-child"),M.select("path:nth-child(2)").attr("style",h.join(";")),M.select("path").attr("style",u.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",S).attr("width",W).attr("height",w).attr("fill",o).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",O).attr("y",S).attr("width",A).attr("height",w).attr("fill","none").attr("stroke",n);const B=F+W/2,$=t.y;g.attr("transform",`translate(${B}, ${$}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const W=Math.max(0,v-S),O=Math.min(N,W),A=S+O,B=Math.max(0,_-A),$=t.x-k/2;if(t.look==="handDrawn"){const Y=tt.svg(f),G=J(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),et=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),lt=Y.rectangle($,S,k,O,G);M=f.insert(()=>lt,":first-child");const at=Y.rectangle($,A,k,B,et);U=f.insert(()=>at,":first-child"),M.select("path:nth-child(2)").attr("style",h.join(";")),M.select("path").attr("style",u.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",c).attr("x",$).attr("y",S).attr("width",k).attr("height",O).attr("fill",o).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",$).attr("y",A).attr("width",k).attr("height",B).attr("fill","none").attr("stroke",n);const E=t.x-C.width/2,q=S+(O-C.height)/2;g.attr("transform",`translate(${E}, ${q})`)}if(H.trace("Swimlane data ",t,JSON.stringify(t)),l){const W=g.select("span");W&&W.attr("style",l)}return t.offsetX=0,t.width=k,t.height=w,t.offsetY=C.height-b/2,t.intersect=function(W){return Or(t,W)},{cluster:f,labelBBox:C}},"swimlane"),Hp=p(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=rt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=oe(r),d=u.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await ze(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):y=await ar(d,t.label,t.labelStyle||"",!1,!0);let g=y.getBBox();if(oe(r)){const F=y.children[0],v=yt(y);g=F.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const F=tt.svg(u),v=J(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),z=F.path(pr(b,k,m,C,0),v);w=u.insert(()=>(H.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:S}=xl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const F=d.select("span");F&&F.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(F){return Or(t,F)},{cluster:u,labelBBox:g}},"rect"),cS=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return Or(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),uS=p(async(e,t)=>{const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=await ar(u,t.label,t.labelStyle,void 0,!0);let y=d.getBBox();if(oe(r)){const z=d.children[0],N=yt(d);y=z.getBoundingClientRect(),N.attr("width",y.width),N.attr("height",y.height)}const g=0*t.padding,m=g/2,C=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+g;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-y.height-6,w=t.x-C/2,S=t.y-b/2;t.width=C;const _=t.y-t.height/2-m+y.height+2;let F;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),N=tt.svg(c),M=t.rx||t.ry?N.path(pr(w,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):N.rectangle(w,S,C,b,{seed:s});F=c.insert(()=>M,":first-child");const U=N.rectangle(w,_,C,k,{fill:z?o:a,fillStyle:z?"hachure":"solid",stroke:l,seed:s});F=c.insert(()=>M,":first-child"),f=c.insert(()=>U)}else{F=h.insert("rect",":first-child");const z="outer";F.attr("class",z).attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",w).attr("y",_).attr("width",C).attr("height",k)}u.attr("transform",`translate(${t.x-y.width/2}, ${S+1-(oe(r)?0:3)})`);const v=F.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(z){return Or(t,z)},{cluster:c,labelBBox:y}},"roundedWithTitle"),dS=p(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=rt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=oe(r),d=u.insert("g").attr("class","cluster-label "),y=await ze(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let g=y.getBBox();if(oe(r)){const F=y.children[0],v=yt(y);g=F.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const F=tt.svg(u),v=J(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),z=F.path(pr(b,k,m,C,t.rx),v);w=u.insert(()=>(H.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:S}=xl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const F=d.select("span");F&&F.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(F){return Or(t,F)},{cluster:u,labelBBox:g}},"kanbanSection"),fS=p((e,t)=>{const r=St(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const m=tt.svg(a).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});d=a.insert(()=>m,":first-child")}else{d=n.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const y=d.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return Or(t,g)},{cluster:a,labelBBox:{}}},"divider"),pS=Hp,gS={rect:Hp,squareRect:pS,roundedWithTitle:uS,noteGroup:cS,divider:fS,kanbanSection:dS,swimlane:hS},Yp=new Map,mS=p(async(e,t)=>{const r=t.shape||"rect",i=await gS[r](e,t);return Yp.set(t.id,i),i},"insertCluster"),AF=p(()=>{Yp=new Map},"clear");function Up(e,t){return e.intersect(t)}p(Up,"intersectNode");var yS=Up;function Gp(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}p(Gp,"intersectEllipse");var jp=Gp;function Xp(e,t,r){return jp(e,t,t,r)}p(Xp,"intersectCircle");var CS=Xp;function Vp(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&vn(n,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,y=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(y)<c&&vn(d,y))return;const g=s*u-h*o;if(g===0)return;const m=Math.abs(g/2);let C=o*f-u*a;const b=C<0?(C-m)/g:(C+m)/g;C=h*a-s*f;const k=C<0?(C-m)/g:(C+m)/g;return{x:b,y:k}}}p(Vp,"intersectLine");function vn(e,t){return e*t>0}p(vn,"sameSign");var xS=Vp;function Zp(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=xS(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&o.push(d)}return o.length?(o.length>1&&o.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,y=Math.sqrt(f*f+d*d),g=u.x-r.x,m=u.y-r.y,C=Math.sqrt(g*g+m*m);return y<C?-1:y===C?0:1}),o[0]):e}p(Zp,"intersectPolygon");var bS=Zp,Q={node:yS,circle:CS,ellipse:jp,polygon:bS,rect:Or};function Kp(e,t){const{labelStyles:r}=rt(t);t.labelStyle=r;const i=ht(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=tt.svg(o),c=J(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),u=o.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Ht(n)),it(t,u),t.intersect=function(f){return H.info("Circle intersect",t,a,f),Q.circle(t,a,f)},o}p(Kp,"anchor");function Ln(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/s,y=f/o,g=Math.sqrt(d**2+y**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-g**2),C=l+m*o*Math.sin(h)*(a?-1:1),b=c-m*s*Math.cos(h)*(a?-1:1),k=Math.atan2((t-b)/o,(e-C)/s);let S=Math.atan2((i-b)/o,(r-C)/s)-k;a&&S<0&&(S+=2*Math.PI),!a&&S>0&&(S-=2*Math.PI);const _=[];for(let F=0;F<20;F++){const v=F/19,z=k+v*S,N=C+s*Math.cos(z),M=b+o*Math.sin(z);_.push({x:N,y:M})}return _}p(Ln,"generateArcPoints");function Qp(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(Qp,"calculateArcSagitta");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=p(z=>z+a,"calcTotalHeight"),l=p(z=>{const N=z/2;return[N/(2.5+z/50),N]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await dt(e,t,ht(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[f,d]=l(u),y=Qp(u,f,d),m=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2+y-y,C=u,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...Ln(-m/2,-C/2,-m/2,C/2,f,d,!1),{x:m/2,y:C/2},...Ln(m/2,C/2,m/2,-C/2,f,d,!0)],w=tt.svg(c),S=J(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=kt(k),F=w.path(_,S),v=c.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${f/2}, 0)`),it(t,v),t.intersect=function(z){return Q.polygon(t,k,z)},c}p(Jp,"bowTieRect");function Qe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Qe,"insertPolygonShape");var Ds=12;async function tg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o+Ds),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?a*2:a),u=0,f=c,d=-h,y=0,g=[{x:u+Ds,y:d},{x:f,y:d},{x:f,y},{x:u,y},{x:u,y:d+Ds},{x:u+Ds,y:d}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=tt.svg(n),k=J(t,{}),w=kt(g),S=b.path(w,k);m=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&m.attr("style",C)}else m=Qe(n,c,h,g);return i&&m.attr("style",i),it(t,m),t.intersect=function(b){return Q.polygon(t,g,b)},n}p(tg,"card");function eg(e,t){const{nodeStyles:r}=rt(t);t.label="";const i=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=tt.svg(i),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=kt(a),h=n.path(c,l),u=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return Q.polygon(t,a,f)},i}p(eg,"choice");async function Ml(e,t,r){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await dt(e,t,ht(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=tt.svg(o),y=J(t,{}),g=d.circle(0,0,h*2,y);u=o.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",Ht(f))}else u=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return it(t,u),t.calcIntersect=function(d,y){const g=d.width/2;return Q.circle(d,g,y)},t.intersect=function(d){return H.info("Circle intersect",t,h,d),Q.circle(t,h,d)},o}p(Ml,"circle");function rg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
233
+ M ${s.x},${s.y} L ${a.x},${a.y}`}p(rg,"createLine");function ig(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:a}=t,n=tt.svg(s),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=rg(o),u=n.path(h,l),f=s.insert(()=>c,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),it(t,f),t.intersect=function(d){return H.info("crossedCircle intersect",t,{radius:o,point:d}),Q.circle(t,o,d)},s}p(ig,"crossedCircle");function Ge(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),y=t+r*Math.sin(f);a.push({x:-d,y:-y})}return a}p(Ge,"generateCirclePoints");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await dt(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...Ge(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Ge(c/2+u*2,-u,u,20,-180,-270),...Ge(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Ge(c/2,h/2,u,20,0,90)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Ge(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Ge(c/2+c*.1,-u,u,20,-180,-270),...Ge(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Ge(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],g=tt.svg(s),m=J(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=kt(d).replace("Z",""),k=g.path(b,m),w=kt(y),S=g.path(w,{...m}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${u}, 0)`),a.attr("transform",`translate(${-c/2+u-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),it(t,_),t.intersect=function(F){return Q.polygon(t,y,F)},s}p(sg,"curlyBraceLeft");function je(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),y=t+r*Math.sin(f);a.push({x:d,y})}return a}p(je,"generateCirclePoints");async function og(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await dt(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90)],y=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],g=tt.svg(s),m=J(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=kt(d).replace("Z",""),k=g.path(b,m),w=kt(y),S=g.path(w,{...m}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-u}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),it(t,_),t.intersect=function(F){return Q.polygon(t,y,F)},s}p(og,"curlyBraceRight");function Gt(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),y=t+r*Math.sin(f);a.push({x:-d,y:-y})}return a}p(Gt,"generateCirclePoints");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await dt(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:f}=t,d=[...Gt(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Gt(c/2+u*2,-u,u,20,-180,-270),...Gt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Gt(c/2,h/2,u,20,0,90)],y=[...Gt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Gt(-c/2-u/2,-u,u,20,0,90),...Gt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Gt(-c/2+u+u/2,h/2,u,30,-180,-270)],g=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Gt(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Gt(c/2+u*2,-u,u,20,-180,-270),...Gt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Gt(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...Gt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Gt(-c/2-u/2,-u,u,20,0,90),...Gt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Gt(-c/2+u+u/2,h/2,u,30,-180,-270)],m=tt.svg(s),C=J(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=kt(d).replace("Z",""),w=m.path(k,C),_=kt(y).replace("Z",""),F=m.path(_,C),v=kt(g),z=m.path(v,{...C}),N=s.insert("g",":first-child");return N.insert(()=>z,":first-child").attr("stroke-opacity",0),N.insert(()=>w,":first-child"),N.insert(()=>F,":first-child"),N.attr("class","text"),f&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${u-u/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),it(t,N),t.intersect=function(M){return Q.polygon(t,g,M)},s}p(ag,"curlyBraces");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await dt(e,t,ht(t)),u=Math.max(n,(h.width+o*2)*1.25,(t==null?void 0:t.width)??0),f=Math.max(l,h.height+a*2,(t==null?void 0:t.height)??0),d=f/2,{cssStyles:y}=t,g=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=u,b=f,k=C-d,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...Gi(-k,-b/2,d,50,270,90)],_=kt(S),F=g.path(_,m),v=c.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-u/2}, ${-f/2})`),it(t,v),t.intersect=function(z){return Q.polygon(t,S,z)},c}p(ng,"curvedTrapezoid");var kS=p((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),TS=p((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),wS=p((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),bc=8,kc=8;async function lg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-a,t.width<kc&&(t.width=kc);const b=m/2/(2.5+m/50);t.height=(t.height??0)-o-b*3,t.height<bc&&(t.height=bc)}const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=(t.width?t.width:l.width)+a,u=h/2,f=u/(2.5+h/50),d=(t.height?t.height:l.height)+o+f;let y;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=tt.svg(n),C=TS(0,0,h,d,u,f),b=wS(0,f,h,d,u,f),k=J(t,{}),w=m.path(C,k),S=m.path(b,J(t,{fill:"none"}));y=n.insert(()=>S,":first-child"),y=n.insert(()=>w,":first-child"),y.attr("class","basic label-container"),g&&y.attr("style",g)}else{const m=kS(0,0,h,d,u,f);y=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",Ht(g)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-h/2}, ${-(d/2+f)})`),it(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=Q.rect(t,m),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=f-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}p(lg,"cylinder");async function li(e,t,r){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await dt(e,t,ht(t)),n=Math.max(a.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(a.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const g=tt.svg(o),m=J(t,{}),C=f||d?g.path(pr(c,h,n,l,f||0),m):g.rectangle(c,h,n,l,m);u=o.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Ht(y))}else u=o.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Ht(f)).attr("ry",Ht(d)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return it(t,u),t.calcIntersect=function(g,m){return Q.rect(g,m)},t.intersect=function(g){return Q.rect(t,g)},o}p(li,"drawRect");async function hg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,classes:r??"",labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await li(e,t,l);if(t.look==="handDrawn"){const d=tt.svg(c),y=J(t,{}),g=c.select(".basic.label-container > path:nth-child(2)"),m=g.node();if(!m)return c;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return c;return c.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,y),".basic.label-container g.label"),c.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,y),".basic.label-container g.label"),g.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||a)??0,f=(Number(h.attr("height"))||n)??0;return u>0&&f>0&&h.attr("stroke-dasharray",`${u} ${f}`),c}p(hg,"datastore");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await dt(e,t,ht(t)),c=n.width+s,h=n.height+o,u=h*.2,f=-c/2,d=-h/2-u/2,{cssStyles:y}=t,g=tt.svg(a),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],b=g.polygon(C.map(w=>[w.x,w.y]),m),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),it(t,k),t.intersect=function(w){return Q.rect(t,w)},a}p(cg,"dividedRectangle");async function ug(e,t){var d,y;const{labelStyles:r,nodeStyles:i}=rt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(a??0),h=c-s;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=tt.svg(n),m=J(t,{roughness:.2,strokeWidth:2.5}),C=J(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,c*2,m),k=g.circle(0,0,h*2,C);u=n.insert("g",":first-child"),u.attr("class",Ht(t.cssClasses)).attr("style",Ht(f)),(d=u.node())==null||d.appendChild(b),(y=u.node())==null||y.appendChild(k)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return it(t,u),t.intersect=function(g){return H.info("DoubleCircle intersect",t,c,g),Q.circle(t,c,g)},n}p(ug,"doublecircle");function dg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=rt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=tt.svg(o),{nodeBorder:c}=r,h=J(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,a*2,h),f=o.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),it(t,f),t.intersect=function(d){return H.info("filledCircle intersect",t,{radius:a,point:d}),Q.circle(t,a,d)},o}p(dg,"filledCircle");var Tc=10,wc=10;async function fg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Tc&&(t.height=Tc),t.width=((t==null?void 0:t.width)??0)-o-o/2,t.width<wc&&(t.width=wc));const{shapeSvg:a,bbox:n,label:l}=await dt(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(o??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,f=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,y=tt.svg(a),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=kt(f),C=y.path(m,g),b=a.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,it(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return H.info("Triangle intersect",t,f,k),Q.polygon(t,f,k)},a}p(fg,"flippedTriangle");function pg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=rt(t);t.label="";const a=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,f=tt.svg(a),d=J(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=f.rectangle(h,u,l,c,d),g=a.insert(()=>y,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),it(t,g);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return Q.rect(t,C)},a}p(pg,"forkJoin");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<o&&(t.height=o),t.width=((t==null?void 0:t.width)??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await dt(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+a*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(o,c.height))+n*2,f=u/2,{cssStyles:d}=t,y=tt.svg(l),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-h/2,y:-u/2},{x:h/2-f,y:-u/2},...Gi(-h/2+f,0,f,50,90,270),{x:h/2-f,y:u/2},{x:-h/2,y:u/2}],C=kt(m),b=y.path(C,g),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),it(t,k),t.intersect=function(w){return H.info("Pill intersect",t,{radius:f,point:w}),Q.polygon(t,m,w)},l}p(gg,"halfRoundedRectangle");var SS=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await dt(e,t,ht(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=f/s,y=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+c,g=[{x:d,y:0},{x:y-d,y:0},{x:y,y:-f/2},{x:y-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=tt.svg(h),k=J(t,{}),w=SS(0,0,y,f,d),S=b.path(w,k);m=h.insert(()=>S,":first-child").attr("transform",`translate(${-y/2}, ${f/2})`),C&&m.attr("style",C)}else m=Qe(h,y,f,g);return i&&m.attr("style",i),t.width=y,t.height=f,it(t,m),t.intersect=function(b){return Q.polygon(t,g,b)},h}p(mg,"hexagon");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await dt(e,t,ht(t)),o=Math.max(30,(t==null?void 0:t.width)??0),a=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=tt.svg(s),c=J(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],u=kt(h),f=l.path(u,c),d=s.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-o/2}, ${-a/2})`),it(t,d),t.intersect=function(y){return H.info("Pill intersect",t,{points:h}),Q.polygon(t,h,y)},s}p(yg,"hourglass");async function Cg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await dt(e,t,"icon-shape default"),f=t.pos==="t",d=n,y=n,{nodeBorder:g}=r,{stylesMap:m}=ni(t),C=-y/2,b=-d/2,k=t.label?8:0,w=tt.svg(c),S=J(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=w.rectangle(C,b,y,d,S),F=Math.max(y,h.width),v=d+h.height+k,z=w.rectangle(-F/2,-v/2,F,v,{...S,fill:"transparent",stroke:"none"}),N=c.insert(()=>_,":first-child"),M=c.insert(()=>z);if(t.icon){const U=c.append("g");U.html(`<g>${await gs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const W=U.node().getBBox(),O=W.width,A=W.height,B=W.x,$=W.y;U.attr("transform",`translate(${-O/2-B},${f?h.height/2+k/2-A/2-$:-h.height/2-k/2-A/2-$})`),U.attr("style",`color: ${m.get("stroke")??g};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-v/2:v/2-h.height})`),N.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),it(t,M),t.intersect=function(U){if(H.info("iconSquare intersect",t,U),!t.label)return Q.rect(t,U);const W=t.x??0,O=t.y??0,A=t.height??0;let B=[];return f?B=[{x:W-h.width/2,y:O-A/2},{x:W+h.width/2,y:O-A/2},{x:W+h.width/2,y:O-A/2+h.height+k},{x:W+y/2,y:O-A/2+h.height+k},{x:W+y/2,y:O+A/2},{x:W-y/2,y:O+A/2},{x:W-y/2,y:O-A/2+h.height+k},{x:W-h.width/2,y:O-A/2+h.height+k}]:B=[{x:W-y/2,y:O-A/2},{x:W+y/2,y:O-A/2},{x:W+y/2,y:O-A/2+d},{x:W+h.width/2,y:O-A/2+d},{x:W+h.width/2/2,y:O+A/2},{x:W-h.width/2,y:O+A/2},{x:W-h.width/2,y:O-A/2+d},{x:W-y/2,y:O-A/2+d}],Q.polygon(t,B,U)},c}p(Cg,"icon");async function xg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await dt(e,t,"icon-shape default"),f=20,d=t.label?8:0,y=t.pos==="t",{nodeBorder:g,mainBkg:m}=r,{stylesMap:C}=ni(t),b=tt.svg(c),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??m;const S=c.append("g");t.icon&&S.html(`<g>${await gs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),F=_.width,v=_.height,z=_.x,N=_.y,M=Math.max(F,v)*Math.SQRT2+f*2,U=b.circle(0,0,M,k),W=Math.max(M,h.width),O=M+h.height+d,A=b.rectangle(-W/2,-O/2,W,O,{...k,fill:"transparent",stroke:"none"}),B=c.insert(()=>U,":first-child"),$=c.insert(()=>A);return S.attr("transform",`translate(${-F/2-z},${y?h.height/2+d/2-v/2-N:-h.height/2-d/2-v/2-N})`),S.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${y?-O/2:O/2-h.height})`),B.attr("transform",`translate(0,${y?h.height/2+d/2:-h.height/2-d/2})`),it(t,$),t.intersect=function(E){return H.info("iconSquare intersect",t,E),Q.rect(t,E)},c}p(xg,"iconCircle");async function bg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await dt(e,t,"icon-shape default"),d=t.pos==="t",y=n+u*2,g=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=ni(t),k=-g/2,w=-y/2,S=t.label?8:0,_=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const v=b.get("fill");F.stroke=v??C;const z=_.path(pr(k,w,g,y,5),F),N=Math.max(g,h.width),M=y+h.height+S,U=_.rectangle(-N/2,-M/2,N,M,{...F,fill:"transparent",stroke:"none"}),W=c.insert(()=>z,":first-child").attr("class","icon-shape2"),O=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await gs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),$=B.width,E=B.height,q=B.x,Y=B.y;A.attr("transform",`translate(${-$/2-q},${d?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),A.attr("style",`color: ${b.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-M/2:M/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),it(t,O),t.intersect=function(A){if(H.info("iconSquare intersect",t,A),!t.label)return Q.rect(t,A);const B=t.x??0,$=t.y??0,E=t.height??0;let q=[];return d?q=[{x:B-h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2+h.height+S},{x:B+g/2,y:$-E/2+h.height+S},{x:B+g/2,y:$+E/2},{x:B-g/2,y:$+E/2},{x:B-g/2,y:$-E/2+h.height+S},{x:B-h.width/2,y:$-E/2+h.height+S}]:q=[{x:B-g/2,y:$-E/2},{x:B+g/2,y:$-E/2},{x:B+g/2,y:$-E/2+y},{x:B+h.width/2,y:$-E/2+y},{x:B+h.width/2/2,y:$+E/2},{x:B-h.width/2,y:$+E/2},{x:B-h.width/2,y:$-E/2+y},{x:B-g/2,y:$-E/2+y}],Q.polygon(t,q,A)},c}p(bg,"iconRounded");async function kg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await dt(e,t,"icon-shape default"),d=t.pos==="t",y=n+u*2,g=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=ni(t),k=-g/2,w=-y/2,S=t.label?8:0,_=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const v=b.get("fill");F.stroke=v??C;const z=_.path(pr(k,w,g,y,.1),F),N=Math.max(g,h.width),M=y+h.height+S,U=_.rectangle(-N/2,-M/2,N,M,{...F,fill:"transparent",stroke:"none"}),W=c.insert(()=>z,":first-child"),O=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await gs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),$=B.width,E=B.height,q=B.x,Y=B.y;A.attr("transform",`translate(${-$/2-q},${d?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),A.attr("style",`color: ${b.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-M/2:M/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),it(t,O),t.intersect=function(A){if(H.info("iconSquare intersect",t,A),!t.label)return Q.rect(t,A);const B=t.x??0,$=t.y??0,E=t.height??0;let q=[];return d?q=[{x:B-h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2},{x:B+h.width/2,y:$-E/2+h.height+S},{x:B+g/2,y:$-E/2+h.height+S},{x:B+g/2,y:$+E/2},{x:B-g/2,y:$+E/2},{x:B-g/2,y:$-E/2+h.height+S},{x:B-h.width/2,y:$-E/2+h.height+S}]:q=[{x:B-g/2,y:$-E/2},{x:B+g/2,y:$-E/2},{x:B+g/2,y:$-E/2+y},{x:B+h.width/2,y:$-E/2+y},{x:B+h.width/2/2,y:$+E/2},{x:B-h.width/2,y:$+E/2},{x:B-h.width/2,y:$-E/2+y},{x:B-g/2,y:$-E/2+y}],Q.polygon(t,q,A)},c}p(kg,"iconSquare");async function Tg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=rt(t);t.labelStyle=a;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:f,label:d}=await dt(e,t,"image-shape default"),y=t.pos==="t",g=-c/2,m=-h/2,C=t.label?8:0,b=tt.svg(u),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(g,m,c,h,k),S=Math.max(c,f.width),_=h+f.height+C,F=b.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),v=u.insert(()=>w,":first-child"),z=u.insert(()=>F);if(t.img){const N=u.append("image");N.attr("href",t.img),N.attr("width",c),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-c/2},${y?_/2-h:-_/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-h/2-f.height/2-C/2:h/2-f.height/2+C/2})`),v.attr("transform",`translate(0,${y?f.height/2+C/2:-f.height/2-C/2})`),it(t,z),t.intersect=function(N){if(H.info("iconSquare intersect",t,N),!t.label)return Q.rect(t,N);const M=t.x??0,U=t.y??0,W=t.height??0;let O=[];return y?O=[{x:M-f.width/2,y:U-W/2},{x:M+f.width/2,y:U-W/2},{x:M+f.width/2,y:U-W/2+f.height+C},{x:M+c/2,y:U-W/2+f.height+C},{x:M+c/2,y:U+W/2},{x:M-c/2,y:U+W/2},{x:M-c/2,y:U-W/2+f.height+C},{x:M-f.width/2,y:U-W/2+f.height+C}]:O=[{x:M-c/2,y:U-W/2},{x:M+c/2,y:U-W/2},{x:M+c/2,y:U-W/2+h},{x:M+f.width/2,y:U-W/2+h},{x:M+f.width/2/2,y:U+W/2},{x:M-f.width/2,y:U+W/2},{x:M-f.width/2,y:U-W/2+h},{x:M-c/2,y:U-W/2+h}],Q.polygon(t,O,N)},u}p(Tg,"imageSquare");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=Math.max(l.width+(a??0)*2,(t==null?void 0:t.width)??0),h=Math.max(l.height+(o??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=tt.svg(n),g=J(t,{}),m=kt(u),C=y.path(m,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=Qe(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,it(t,f),t.intersect=function(y){return Q.polygon(t,u,y)},n}p(wg,"inv_trapezoid");async function Sg(e,t){const{shapeSvg:r,bbox:i,label:s}=await dt(e,t,"label"),o=r.insert("rect",":first-child"),a=.1,n=.1;return o.attr("width",a).attr("height",n),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),it(t,o),t.intersect=function(l){return Q.rect(t,l)},r}p(Sg,"labelRect");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+o,h=((t==null?void 0:t.width)??l.width)+a,u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=tt.svg(n),g=J(t,{}),m=kt(u),C=y.path(m,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Qe(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(y){return Q.polygon(t,u,y)},n}p(_g,"lean_left");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+o,h=((t==null?void 0:t.width)??l.width)+a,u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=tt.svg(n),g=J(t,{}),m=kt(u),C=y.path(m,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Qe(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(y){return Q.polygon(t,u,y)},n}p(Bg,"lean_right");function vg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=tt.svg(s),u=J(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=kt(c),d=h.path(f,u),y=s.insert(()=>d,":first-child");return y.attr("class","outer-path"),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${a/2},${-n})`),it(t,y),t.intersect=function(g){return H.info("lightningBolt intersect",t,g),Q.polygon(t,c,g)},s}p(vg,"lightningBolt");var _S=p((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),BS=p((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),vS=p((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Sc=10,_c=10;async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-o,t.width<_c&&(t.width=_c);const k=C/2/(2.5+C/50);t.height=(t.height??0)-a-k*3,t.height<Sc&&(t.height=Sc)}const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=h/2,f=u/(2.5+h/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+f+a*2,y=d*.1;let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=tt.svg(n),b=BS(0,0,h,d,u,f,y),k=vS(0,f,h,d,u,f),w=J(t,{}),S=C.path(b,w),_=C.path(k,w);n.insert(()=>_,":first-child").attr("class","line"),g=n.insert(()=>S,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{const C=_S(0,0,h,d,u,f,y);g=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Ht(m)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-h/2}, ${-(d/2+f)})`),it(t,g),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(C){const b=Q.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let w=f*f*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=f-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}p(Lg,"linedCylinder");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(o??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(a??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:y}=t,g=tt.svg(n),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...fr(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,f,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],b=g.polygon(C.map(w=>[w.x,w.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),it(t,k),t.intersect=function(w){return Q.polygon(t,C,w)},n}p(Fg,"linedWaveEdgedRect");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await dt(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+o*2+2*n,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+a*2+2*n,d=u-2*n,y=f-2*n,g=-d/2,m=-y/2,{cssStyles:C}=t,b=tt.svg(l),k=J(t,{}),w=[{x:g-n,y:m+n},{x:g-n,y:m+y+n},{x:g+d-n,y:m+y+n},{x:g+d-n,y:m+y},{x:g+d,y:m+y},{x:g+d,y:m+y-n},{x:g+d+n,y:m+y-n},{x:g+d+n,y:m-n},{x:g+n,y:m-n},{x:g+n,y:m},{x:g,y:m},{x:g,y:m+n}],S=[{x:g,y:m+n},{x:g+d-n,y:m+n},{x:g+d-n,y:m+y},{x:g+d,y:m+y},{x:g+d,y:m},{x:g,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=kt(w);let F=b.path(_,k);const v=kt(S);let z=b.path(v,k);t.look!=="handDrawn"&&(F=Bn(F),z=Bn(z));const N=l.insert("g",":first-child");return N.insert(()=>F),N.insert(()=>z),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),it(t,N),t.intersect=function(M){return Q.polygon(t,w,M)},l}p(Ag,"multiRect");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await dt(e,t,ht(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(o.width,(t==null?void 0:t.width)??0)+l*2,f=Math.max(o.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?f/4:f/8,y=f+(h?d/2:-d/2),g=-u/2,m=-y/2,C=10,{cssStyles:b}=t,k=fr(g-C,m+y+C,g+u-C,m+y+C,d,.8),w=k==null?void 0:k[k.length-1],S=[{x:g-C,y:m+C},{x:g-C,y:m+y+C},...k,{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y:w.y-2*C},{x:g+u+C,y:w.y-2*C},{x:g+u+C,y:m-C},{x:g+C,y:m-C},{x:g+C,y:m},{x:g,y:m},{x:g,y:m+C}],_=[{x:g,y:m+C},{x:g+u-C,y:m+C},{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y:m},{x:g,y:m}],F=tt.svg(s),v=J(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const z=kt(S),N=F.path(z,v),M=kt(_),U=F.path(M,v),W=s.insert(()=>N,":first-child");return W.insert(()=>U),W.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-d/2})`),a.attr("transform",`translate(${-(o.width/2)-C-(o.x-(o.left??0))}, ${-(o.height/2)+C-d/2-(o.y-(o.top??0))})`),it(t,W),t.intersect=function(O){return Q.polygon(t,S,O)},s}p(Eg,"multiWaveEdgedRectangle");async function Mg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i,t.useHtmlLabels||oe(Et())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await dt(e,t,ht(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,f=-h/2,{cssStyles:d}=t,y=tt.svg(a),g=J(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=y.rectangle(u,f,c,h,g),C=a.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,C),t.intersect=function(b){return Q.rect(t,b)},a}p(Mg,"note");var LS=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await dt(e,t,ht(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=tt.svg(s),y=J(t,{}),g=LS(0,0,l),m=d.path(g,y);u=s.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Qe(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),it(t,u),t.calcIntersect=function(d,y){const g=d.width,m=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=Q.polygon(d,m,y);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}p($g,"question");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?a*2:a),f=-h/2,d=-u/2,y=d/2,g=[{x:f+y,y:d},{x:f,y:0},{x:f+y,y:-d},{x:-f,y:-d},{x:-f,y:d}],{cssStyles:m}=t,C=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=kt(g),w=C.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-y/2},0)`),c.attr("transform",`translate(${-y/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),it(t,S),t.intersect=function(_){return Q.polygon(t,g,_)},n}p(Og,"rect_left_inv_arrow");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await ar(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(oe(St())){const v=h.children[0],z=yt(h);u=v.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}H.info("Text 2",l);const f=l||[],d=h.getBBox(),y=await ar(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),g=y.children[0],m=yt(y);u=g.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const C=(t.padding||0)/2;yt(y).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),yt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),w=-u.width/2-C,S=-u.height/2-C;let _,F;if(t.look==="handDrawn"){const v=tt.svg(o),z=J(t,{}),N=v.path(pr(w,S,b,k,t.rx||0),z),M=v.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,z);F=o.insert(()=>(H.debug("Rough node insert CXC",N),M),":first-child"),_=o.insert(()=>(H.debug("Rough node insert CXC",N),N),":first-child")}else _=a.insert("rect",":first-child"),F=a.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),F.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return it(t,_),t.intersect=function(v){return Q.rect(t,v)},o}p(Ig,"rectWithTitle");async function Dg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,classes:"",labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return li(e,t,s)}p(Dg,"roundedRect");var xr=8;async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?xr:xr*2),h=((t==null?void 0:t.height)??n.height)+o*2,u=c-xr,f=h,d=xr-c/2,y=-h/2,{cssStyles:g}=t,m=tt.svg(a),C=J(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y},{x:d+u,y},{x:d+u,y:y+f},{x:d-xr,y:y+f},{x:d-xr,y},{x:d,y},{x:d,y:y+f}],k=m.polygon(b.map(S=>[S.x,S.y]),C),w=a.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Ht(g)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${xr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,w),t.intersect=function(S){return Q.rect(t,S)},a}p(Pg,"shadedProcess");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2)*1.5,f=h,d=u/1.5,y=-f/2,g=-d/2,{cssStyles:m}=t,C=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:y,y:g},{x:y,y:g+d},{x:y+f,y:g+d},{x:y+f,y:g-d/2}],w=kt(k),S=C.path(w,b),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),it(t,_),t.intersect=function(F){return Q.polygon(t,k,F)},n}p(Rg,"slopedRect");async function Ng(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return li(e,t,o)}p(Ng,"squareRect");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),u=c/2,{cssStyles:f}=t,d=tt.svg(n),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const g=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...Gi(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...Gi(h/2-u,0,u,50,270,450)],m=kt(g),C=d.path(m,y),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),it(t,b),t.intersect=function(k){return Q.polygon(t,g,k)},n}p(qg,"stadium");async function Wg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return li(e,t,r)}p(Wg,"state");function zg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=tt.svg(h),f=J(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),y=n??l,g=(t.width??0)*5/14,m=u.circle(0,0,g,{...f,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>d,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),o&&C.selectAll("path").attr("style",o),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return it(t,C),t.intersect=function(w){return Q.circle(t,(t.width??0)/2,w)},h}p(zg,"stateEnd");function Hg(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const h=tt.svg(o).circle(0,0,t.width,R2(i));a=o.insert(()=>h),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${h})`)}return it(t,a),t.intersect=function(c){return Q.circle(t,(t.width??7)/2,c)},o}p(Hg,"stateStart");var Hr=8;async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+2*Hr+o,h=((t==null?void 0:t.height)??l.height)+a,u=c-2*Hr,f=h,d=-c/2,y=-h/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const m=tt.svg(n),C=J(t,{}),b=m.rectangle(d,y,u+16,f,C),k=m.line(d+Hr,y,d+Hr,y+f,C),w=m.line(d+Hr+u,y,d+Hr+u,y+f,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",Ht(_)),it(t,S)}else{const m=Qe(n,u,f,g);i&&m.attr("style",i),it(t,m)}return t.intersect=function(m){return Q.polygon(t,g,m)},n}p(Yg,"subroutine");var Ma=.2;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-a*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-Ma*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2,h=Ma*c,u=Ma*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2+h-h,y=c,g=-d/2,m=-y/2,{cssStyles:C}=t,b=tt.svg(n),k=J(t,{}),w=[{x:g-h/2,y:m},{x:g+d+h/2,y:m},{x:g+d+h/2,y:m+y},{x:g-h/2,y:m+y}],S=[{x:g+d-h/2,y:m+y},{x:g+d+h/2,y:m+y},{x:g+d+h/2,y:m+y-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=kt(w),F=b.path(_,k),v=kt(S),z=b.path(v,{...k,fillStyle:"solid"}),N=n.insert(()=>z,":first-child");return N.insert(()=>F,":first-child"),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),it(t,N),t.intersect=function(M){return Q.polygon(t,w,M)},n}p(Ug,"taggedRect");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await dt(e,t,ht(t)),n=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,f=l+c,{cssStyles:d}=t,y=tt.svg(s),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-n/2-n/2*.1,y:f/2},...fr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],C=-n/2+n/2*.1,b=-f/2-u*.4,k=[{x:C+n-h,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...fr(C+n,(b+l)*1.25,C+n-h,(b+l)*1.3,-l*.02,.5)],w=kt(m),S=y.path(w,g),_=kt(k),F=y.path(_,{...g,fillStyle:"solid"}),v=s.insert(()=>F,":first-child");return v.insert(()=>S,":first-child"),v.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),it(t,v),t.intersect=function(z){return Q.polygon(t,m,z)},s}p(Gg,"taggedWaveEdgedRectangle");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await dt(e,t,ht(t)),a=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-a/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),it(t,h),t.intersect=function(u){return Q.rect(t,u)},s}p(jg,"text");var FS=p((e,t,r,i,s,o)=>`M${e},${t}
234
+ a${s},${o} 0,0,1 0,${-i}
235
+ l${r},0
236
+ a${s},${o} 0,0,1 0,${i}
237
+ M${r},${-i}
238
+ a${s},${o} 0,0,0 0,${i}
239
+ l${-r},0`,"createCylinderPathD"),AS=p((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ES=p((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Bc=5,vc=10;async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-o,t.height<Bc&&(t.height=Bc);const C=g/2/(2.5+g/50);t.width=(t.width??0)-o-C*3,t.width<vc&&(t.width=vc)}const{shapeSvg:a,bbox:n,label:l}=await dt(e,t,ht(t)),c=(t.height?t.height:n.height)+o,h=c/2,u=h/(2.5+c/50),f=(t.width?t.width:n.width)+u+o,{cssStyles:d}=t;let y;if(t.look==="handDrawn"){const g=tt.svg(a),m=AS(0,0,f,c,u,h),C=ES(0,0,f,c,u,h),b=g.path(m,J(t,{})),k=g.path(C,J(t,{fill:"none"}));y=a.insert(()=>k,":first-child"),y=a.insert(()=>b,":first-child"),y.attr("class","basic label-container"),d&&y.attr("style",d)}else{const g=FS(0,0,f,c,u,h);y=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Ht(d)).attr("style",i),y.attr("class","basic label-container outer-path"),d&&y.selectAll("path").attr("style",d),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",u),y.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),it(t,y),t.intersect=function(g){const m=Q.rect(t,g),C=m.y-(t.y??0);if(h!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},a}p(Xg,"tiltedCylinder");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+o,h=((t==null?void 0:t.width)??l.width)+a,u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=tt.svg(n),g=J(t,{}),m=kt(u),C=y.path(m,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=Qe(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,it(t,f),t.intersect=function(y){return Q.polygon(t,u,y)},n}p(Vg,"trapezoid");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await dt(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+a*2,{cssStyles:d}=t,y=tt.svg(c),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],C=kt(m),b=y.path(C,g),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),it(t,k),t.intersect=function(w){return Q.polygon(t,m,w)},c}p(Zg,"trapezoidalPentagon");var Lc=10,Fc=10;async function Kg(e,t){var w;const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-o)/2,t.width<Fc&&(t.width=Fc),t.height=(t==null?void 0:t.height)??0,t.height<Lc&&(t.height=Lc));const{shapeSvg:a,bbox:n,label:l}=await dt(e,t,ht(t)),c=qe((w=St().flowchart)==null?void 0:w.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+o,u=t!=null&&t.height?t==null?void 0:t.height:h+n.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:y}=t,g=tt.svg(a),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=kt(d),b=g.path(C,m),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=u,it(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return H.info("Triangle intersect",t,d,S),Q.polygon(t,d,S)},a}p(Kg,"triangle");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await dt(e,t,ht(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(o??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(a??0)*2,d=t.look==="neo"?f/4:f/8,y=f+(n?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,k=tt.svg(l),w=J(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-b,y:y/2},...fr(-u/2-b,y/2,u/2+b,y/2,d,.8),{x:u/2+b,y:-y/2},{x:-u/2-b,y:-y/2}],_=kt(S),F=k.path(_,w),v=l.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-d-(c.y-(c.top??0))})`),it(t,v),t.intersect=function(z){return Q.polygon(t,S,z)},l}p(Qg,"waveEdgedRectangle");async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-w*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a,u=h/8,f=h+u*2,{cssStyles:d}=t,y=tt.svg(n),g=J(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2,y:f/2},...fr(-c/2,f/2,c/2,f/2,u,1),{x:c/2,y:-f/2},...fr(c/2,-f/2,-c/2,-f/2,u,-1)],C=kt(m),b=y.path(C,g),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),it(t,k),t.intersect=function(w){return Q.polygon(t,m,w)},n}p(Jg,"waveRectangle");var $t=10;async function tm(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-$t,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-$t,10));const{shapeSvg:a,bbox:n,label:l}=await dt(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+$t,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+o*2+$t,u=c-$t,f=h-$t,d=-u/2,y=-f/2,{cssStyles:g}=t,m=tt.svg(a),C=J(t,{}),b=[{x:d-$t,y:y-$t},{x:d-$t,y:y+f},{x:d+u,y:y+f},{x:d+u,y:y-$t}],k=`M${d-$t},${y-$t} L${d+u},${y-$t} L${d+u},${y+f} L${d-$t},${y+f} L${d-$t},${y-$t}
240
+ M${d-$t},${y} L${d+u},${y}
241
+ M${d},${y-$t} L${d},${y+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=m.path(k,C),S=a.insert(()=>w,":first-child");return S.attr("transform",`translate(${$t/2}, ${$t/2})`),S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+$t/2-(n.x-(n.left??0))}, ${-(n.height/2)+$t/2-(n.y-(n.top??0))})`),it(t,S),t.intersect=function(_){return Q.polygon(t,b,_)},a}p(tm,"windowPane");var Ac=new Set(["redux-color","redux-dark-color"]),MS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function $l(e,t){var bt,Ct,Bt,Lt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Et(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:Z}=Et(),{background:V}=Z,gt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await $l(e,gt)}const c=Et();t.useHtmlLabels=c.htmlLabels;let h=((bt=c.er)==null?void 0:bt.diagramPadding)??10,u=((Ct=c.er)==null?void 0:Ct.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:y}=rt(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5,classes:""};Ke(t.label,c)+Z.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const V=await li(e,t,Z);if(i!=null&&Ac.has(i)){const gt=r.colorIndex??0;V.attr("data-color-id",`color-${gt%l.length}`)}if(!qe(c.htmlLabels)){const gt=V.select("text"),nt=(Bt=gt.node())==null?void 0:Bt.getBBox();gt.attr("transform",`translate(${-nt.width/2}, 0)`)}return V}c.htmlLabels||(h*=1.25,u*=1.25);let g=ht(t);g||(g="node default");const m=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await Gr(m,t.label??"",c,0,0,["name"],d);C.height+=u;let b=0;const k=[],w=[];let S=0,_=0,F=0,v=0,z=!0,N=!0;for(const Z of r.attributes){const V=await Gr(m,Z.type,c,0,b,["attribute-type"],d);S=Math.max(S,V.width+h);const gt=await Gr(m,Z.name,c,0,b,["attribute-name"],d);_=Math.max(_,gt.width+h);const nt=await Gr(m,Z.keys.join(),c,0,b,["attribute-keys"],d);F=Math.max(F,nt.width+h);const D=await Gr(m,Z.comment,c,0,b,["attribute-comment"],d);v=Math.max(v,D.width+h);const K=Math.max(V.height,gt.height,nt.height,D.height)+u;w.push({yOffset:b,rowHeight:K}),b+=K}let M=4;F<=h&&(z=!1,F=0,M--),v<=h&&(N=!1,v=0,M--);const U=m.node().getBBox();if(C.width+h*2-(S+_+F+v)>0){const Z=C.width+h*2-(S+_+F+v);S+=Z/M,_+=Z/M,F>0&&(F+=Z/M),v>0&&(v+=Z/M)}const W=S+_+F+v,O=tt.svg(m),A=J(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let B=0;w.length>0&&(B=w.reduce((Z,V)=>Z+((V==null?void 0:V.rowHeight)??0),0));const $=Math.max(U.width+h*2,(t==null?void 0:t.width)||0,W),E=Math.max((B??0)+C.height,(t==null?void 0:t.height)||0),q=-$/2,Y=-E/2;if(m.selectAll("g:not(:first-child)").each((Z,V,gt)=>{const nt=yt(gt[V]),D=nt.attr("transform");let K=0,Je=0;if(D){const fe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);fe&&(K=parseFloat(fe[1]),Je=parseFloat(fe[2]),nt.attr("class").includes("attribute-name")?K+=S:nt.attr("class").includes("attribute-keys")?K+=S+_:nt.attr("class").includes("attribute-comment")&&(K+=S+_+F))}nt.attr("transform",`translate(${q+h/2+K}, ${Je+Y+C.height+u/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(Y+u/2)+")"),i!=null&&Ac.has(i)){const Z=r.colorIndex??0;m.attr("data-color-id",`color-${Z%l.length}`)}const G=O.rectangle(q,Y,$,E,A),et=m.insert(()=>G,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[Z,V]of w.entries()){const nt=(Z+1)%2===0&&V.yOffset!==0,D=O.rectangle(q,C.height+Y+(V==null?void 0:V.yOffset),$,V==null?void 0:V.rowHeight,{...A,fill:nt?o:a,stroke:n});m.insert(()=>D,"g.label").attr("style",f.join("")).attr("class",`row-rect-${nt?"even":"odd"}`)}const lt=1e-4;let at=jr(q,C.height+Y,$+q,C.height+Y,lt),ut=O.polygon(at.map(Z=>[Z.x,Z.y]),A);if(m.insert(()=>ut).attr("class","divider"),at=jr(S+q,C.height+Y,S+q,E+Y,lt),ut=O.polygon(at.map(Z=>[Z.x,Z.y]),A),m.insert(()=>ut).attr("class","divider"),z){const Z=S+_+q;at=jr(Z,C.height+Y,Z,E+Y,lt),ut=O.polygon(at.map(V=>[V.x,V.y]),A),m.insert(()=>ut).attr("class","divider")}if(N){const Z=S+_+F+q;at=jr(Z,C.height+Y,Z,E+Y,lt),ut=O.polygon(at.map(V=>[V.x,V.y]),A),m.insert(()=>ut).attr("class","divider")}for(const Z of k){const V=C.height+Y+Z;at=jr(q,V,$+q,V,lt),ut=O.polygon(at.map(gt=>[gt.x,gt.y]),A),m.insert(()=>ut).attr("class","divider")}if(it(t,et),y&&t.look!=="handDrawn")if(i!=null&&MS.has(i))m.selectAll("path").attr("style",y);else{const Z=y.split(";"),V=(Lt=Z==null?void 0:Z.filter(gt=>gt.includes("stroke")))==null?void 0:Lt.map(gt=>`${gt}`).join("; ");m.selectAll("path").attr("style",V??""),m.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(Z){return Q.rect(t,Z)},m}p($l,"erBox");async function Gr(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==Th(t)&&(t=Th(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ze(n,t,{width:Ke(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(qe(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=yt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Gr,"addText");function jr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(jr,"lineToPolygon");async function em(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",ht(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,f=0,d=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Li(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Li(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();f=y.height,c=a.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await Li(c,b,g,[b.parseClassifier()]);g+=k+o}d=c.node().getBBox().height,d<=0&&(d=s/2),h=a.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await Li(h,b,m,[b.parseClassifier()]);m+=k+o}let C=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${u})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${u+f+s*2})`),C=a.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+s*4:s*2)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}p(em,"textHelper");async function Li(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Et();let a="useHtmlLabels"in t?t.useHtmlLabels:qe(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Pi(n)&&(a=!0);const l=await ze(s,zn(Ar(n)),{width:Ke(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const u=l.children[0],f=yt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const y=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(m=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",y){const k=((b=o.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=5,S=parseInt(k,10)*w+"px";g.style.minWidth=S,g.style.maxWidth=S}else g.style.width="100%";m(g)}p(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.addEventListener("load",C)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&yt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Li,"addText");async function rm(e,t){var O,A;const r=St(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??qe(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await em(e,t,r,n,a),{labelStyles:u,nodeStyles:f}=rt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((O=l.styles)==null?void 0:O.join(";"))||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((A=r.class)!=null&&A.hideEmptyMembersBox),g=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const w=-C/2,S=-b/2;let _=y?o*2:l.members.length===0&&l.methods.length===0?-o:0;k&&(_=o*2);const F=g.rectangle(w-o,S-o-(y?o:l.members.length===0&&l.methods.length===0?-o/2:0),C+2*o,b+2*o+_,m),v=c.insert(()=>F,":first-child");v.attr("class","basic label-container outer-path");const z=v.node().getBBox(),N=c.select(".annotation-group").node().getBBox().height-(y?o/2:0)||0,M=c.select(".label-group").node().getBBox().height-(y?o/2:0)||0,U=c.select(".members-group").node().getBBox().height-(y?o/2:0)||0,W=(N+M+S+o-(S-o-(y?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((B,$,E)=>{var at,ut;const q=yt(E[$]),Y=q.attr("transform");let G=0;if(Y){const Ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Y);Ct&&(G=parseFloat(Ct[2]))}let et=G+S+o-(y?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(q.attr("class").includes("methods-group")){const bt=Math.max(U,a/2);k?et=Math.max(W,N+M+bt+S+a*2+o)+a*2:et=N+M+bt+S+a*4+o}l.members.length===0&&l.methods.length===0&&((at=r.class)!=null&&at.hideEmptyMembersBox)&&(l.annotations.length>0?et=G-a:et=G),n||(et-=4);let lt=w;(q.attr("class").includes("label-group")||q.attr("class").includes("annotation-group"))&&(lt=-((ut=q.node())==null?void 0:ut.getBBox().width)/2||0,c.selectAll("text").each(function(bt,Ct,Bt){window.getComputedStyle(Bt[Ct]).textAnchor==="middle"&&(lt=0)})),q.attr("transform",`translate(${lt}, ${et})`)}),l.members.length>0||l.methods.length>0||y){const B=N+M+S+o,$=g.line(z.x,B,z.x+z.width,B+.001,m);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(y||l.members.length>0||l.methods.length>0){const B=N+M+U+S+a*2+o,$=g.line(z.x,k?Math.max(W,B):B,z.x+z.width,(k?Math.max(W,B):B)+.001,m);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),v.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!n){const B=RegExp(/color\s*:\s*([^;]*)/),$=B.exec(d);if($){const E=$[0].replace("color","fill");c.selectAll("tspan").attr("style",E)}else if(u){const E=B.exec(u);if(E){const q=E[0].replace("color","fill");c.selectAll("tspan").attr("style",q)}}}return it(t,v),t.intersect=function(B){return Q.rect(t,B)},c}p(rm,"classBox");async function im(e,t){var z,N;const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=ht(t),{themeVariables:h}=St(),{borderColorArray:u,requirementEdgeLabelBackground:f}=h,d=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let y;l?y=await $e(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):y=await $e(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let g=y;const m=await $e(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=m+n,l){const M=await $e(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=M;const U=await $e(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=U;const W=await $e(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=W,await $e(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const M=await $e(d,`${o.type?`Type: ${o.type}`:""}`,g,t.labelStyle);g+=M,await $e(d,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,g,t.labelStyle)}const C=(((z=d.node())==null?void 0:z.getBBox().width)??200)+a,b=(((N=d.node())==null?void 0:N.getBBox().height)??200)+a,k=-C/2,w=-b/2,S=tt.svg(d),_=J(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const F=S.rectangle(k,w,C,b,_),v=d.insert(()=>F,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const M=t.colorIndex??0;d.attr("data-color-id",`color-${M%u.length}`)}if(d.selectAll(".label").each((M,U,W)=>{const O=yt(W[U]),A=O.attr("transform");let B=0,$=0;if(A){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);G&&(B=parseFloat(G[1]),$=parseFloat(G[2]))}const E=$-b/2;let q=k+a/2;(U===0||U===1)&&(q=B),O.attr("transform",`translate(${q}, ${E+a})`)}),g>y+m+n){const M=w+y+m+n;let U;if(t.look==="neo"){const A=[[k,M],[k+C,M],[k+C,M+.001],[k,M+.001]];U=S.polygon(A,_)}else U=S.line(k,M,k+C,M,_);d.insert(()=>U).attr("class","divider")}return it(t,v),t.intersect=function(M){return Q.rect(t,M)},i&&t.look!=="handDrawn"&&(f||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}p(im,"requirementBox");async function $e(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),o=St(),a=o.htmlLabels??!0,n=await ze(s,zn(Ar(t)),{width:Ke(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},o);let l;if(a){const c=n.children[0],h=yt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p($e,"addText");var $S=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function sm(e,t,{config:r}){var U,W;const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((U=r==null?void 0:r.kanban)!=null&&U.ticketBaseUrl)&&(u=(W=r==null?void 0:r.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,g;f?{label:y,bbox:g}=await Ea(f,"ticket"in t&&t.ticket||"",d):{label:y,bbox:g}=await Ea(n,"ticket"in t&&t.ticket||"",d);const{label:m,bbox:C}=await Ea(n,"assigned"in t&&t.assigned||"",d);t.width=a;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(g.height,C.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,_=-k/2,F=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-w-l.height/2)+")"),y.attr("transform","translate("+(h-k/2)+", "+(-w+l.height/2)+")"),m.attr("transform","translate("+(h+k/2-C.width-2*o)+", "+(-w+l.height/2)+")");let v;const{rx:z,ry:N}=t,{cssStyles:M}=t;if(t.look==="handDrawn"){const O=tt.svg(n),A=J(t,{}),B=z||N?O.path(pr(_,F,k,S,z||0),A):O.rectangle(_,F,k,S,A);v=n.insert(()=>B,":first-child"),v.attr("class","basic label-container").attr("style",M||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",N??5).attr("x",_).attr("y",F).attr("width",k).attr("height",S);const O="priority"in t&&t.priority;if(O){const A=n.append("line"),B=_+2,$=F+Math.floor((z??0)/2),E=F+S-Math.floor((z??0)/2);A.attr("x1",B).attr("y1",$).attr("x2",B).attr("y2",E).attr("stroke-width","4").attr("stroke",$S(O))}}return it(t,v),t.height=S,t.intersect=function(O){return Q.rect(t,O)},n}p(sm,"kanbanItem");async function om(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await dt(e,t,ht(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:u}=t,f=o.width+20,d=o.height+20,y=Math.max(l,f),g=Math.max(c,d);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let m;const C=`M0 0
242
+ a${h},${h} 1 0,0 ${y*.25},${-1*g*.1}
243
+ a${h},${h} 1 0,0 ${y*.25},0
244
+ a${h},${h} 1 0,0 ${y*.25},0
245
+ a${h},${h} 1 0,0 ${y*.25},${g*.1}
246
+
247
+ a${h},${h} 1 0,0 ${y*.15},${g*.33}
248
+ a${h*.8},${h*.8} 1 0,0 0,${g*.34}
249
+ a${h},${h} 1 0,0 ${-1*y*.15},${g*.33}
250
+
251
+ a${h},${h} 1 0,0 ${-1*y*.25},${g*.15}
252
+ a${h},${h} 1 0,0 ${-1*y*.25},0
253
+ a${h},${h} 1 0,0 ${-1*y*.25},0
254
+ a${h},${h} 1 0,0 ${-1*y*.25},${-1*g*.15}
255
+
256
+ a${h},${h} 1 0,0 ${-1*y*.1},${-1*g*.33}
257
+ a${h*.8},${h*.8} 1 0,0 0,${-1*g*.34}
258
+ a${h},${h} 1 0,0 ${y*.1},${-1*g*.33}
259
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=tt.svg(s),k=J(t,{}),w=b.path(C,k);m=s.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Ht(u))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-y/2}, ${-g/2})`),it(t,m),t.calcIntersect=function(b,k){return Q.rect(b,k)},t.intersect=function(b){return H.info("Bang intersect",t,b),Q.rect(t,b)},s}p(om,"bang");async function am(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await dt(e,t,ht(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:y}=t;let g;const m=`M0 0
260
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
261
+ a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
262
+ a${u},${u} 1 0,1 ${l*.35},${l*.2}
263
+
264
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
265
+ a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
266
+
267
+ a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
268
+ a${f},${f} 1 0,1 ${-1*l*.5},0
269
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
270
+
271
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
272
+ a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
273
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=tt.svg(s),b=J(t,{}),k=C.path(m,b);g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Ht(y))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),g.attr("transform",`translate(${-l/2}, ${-c/2})`),it(t,g),t.calcIntersect=function(C,b){return Q.rect(C,b)},t.intersect=function(C){return H.info("Cloud intersect",t,C),Q.rect(t,C)},s}p(am,"cloud");async function nm(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await dt(e,t,ht(t)),l=o.width+8*a,c=o.height+2*a,h=5,u=t.look==="neo"?`
274
+ M${-l/2} ${c/2-h}
275
+ v${-c+2*h}
276
+ q0,-${h} ${h},-${h}
277
+ h${l-2*h}
278
+ q${h},0 ${h},${h}
279
+ v${c-h}
280
+ H${-l/2}
281
+ Z
282
+ `:`
283
+ M${-l/2} ${c/2-h}
284
+ v${-c+2*h}
285
+ q0,-${h} ${h},-${h}
286
+ h${l-2*h}
287
+ q${h},0 ${h},${h}
288
+ v${c-2*h}
289
+ q0,${h} ${-h},${h}
290
+ h${-(l-2*h)}
291
+ q${-h},0 ${-h},${-h}
292
+ Z
293
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),it(t,f),t.calcIntersect=function(d,y){return Q.rect(d,y)},t.intersect=function(d){return Q.rect(t,d)},s}p(nm,"defaultMindmapNode");async function lm(e,t){const r={padding:t.padding??0};return Ml(e,t,r)}p(lm,"mindmapCircle");var OS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Ng},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Dg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:qg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Yg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:lg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:hg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ml},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:om},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:am},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:$g},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:mg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Bg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:_g},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Vg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:wg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ug},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:jg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:tg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Pg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Hg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:zg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:pg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:yg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:sg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:og},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ag},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:vg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Qg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:gg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Xg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:ng},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:cg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Kg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:tm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:dg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Zg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:fg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Rg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Eg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ag},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Jp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ig},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Gg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ug},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Jg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Og},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Fg}],IS=p(()=>{const t=[...Object.entries({state:Wg,choice:eg,note:Mg,rectWithTitle:Ig,labelRect:Sg,iconSquare:kg,iconCircle:xg,icon:Cg,iconRounded:bg,imageSquare:Tg,anchor:Kp,kanbanItem:sm,mindmapCircle:lm,defaultMindmapNode:nm,classBox:rm,erBox:$l,requirementBox:im}),...OS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),hm=IS();function DS(e){return e in hm}p(DS,"isValidShape");var jo=new Map;async function cm(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?hm[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",Ht(t.look)),t.tooltip&&s.attr("title",t.tooltip),jo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(cm,"insertNode");var EF=p((e,t)=>{jo.set(t.id,e)},"setNodeElem"),MF=p(()=>{jo.clear()},"clear"),$F=p(e=>{const t=jo.get(e.id);H.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),ki=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Qt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Ec={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Fi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=At(e),t=At(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}p(Fi,"calculateDeltaAndAngle");var At=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),PS=p(e=>({x:p(function(t,r,i){let s=0;const o=At(i[0]).x<At(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Qt,e.arrowTypeStart)){const{angle:d,deltaX:y}=Fi(i[0],i[1]);s=Qt[e.arrowTypeStart]*Math.cos(d)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Qt,e.arrowTypeEnd)){const{angle:d,deltaX:y}=Fi(i[i.length-1],i[i.length-2]);s=Qt[e.arrowTypeEnd]*Math.cos(d)*(y>=0?1:-1)}const a=Math.abs(At(t).x-At(i[i.length-1]).x),n=Math.abs(At(t).y-At(i[i.length-1]).y),l=Math.abs(At(t).x-At(i[0]).x),c=Math.abs(At(t).y-At(i[0]).y),h=Qt[e.arrowTypeStart],u=Qt[e.arrowTypeEnd],f=1;if(a<u&&a>0&&n<u){let d=u+f-a;d*=o==="right"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=o==="right"?-1:1,s+=d}return At(t).x+s},"x"),y:p(function(t,r,i){let s=0;const o=At(i[0]).y<At(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Qt,e.arrowTypeStart)){const{angle:d,deltaY:y}=Fi(i[0],i[1]);s=Qt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Qt,e.arrowTypeEnd)){const{angle:d,deltaY:y}=Fi(i[i.length-1],i[i.length-2]);s=Qt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(y>=0?1:-1)}const a=Math.abs(At(t).y-At(i[i.length-1]).y),n=Math.abs(At(t).x-At(i[i.length-1]).x),l=Math.abs(At(t).y-At(i[0]).y),c=Math.abs(At(t).x-At(i[0]).x),h=Qt[e.arrowTypeStart],u=Qt[e.arrowTypeEnd],f=1;if(a<u&&a>0&&n<u){let d=u+f-a;d*=o==="up"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=o==="up"?-1:1,s+=d}return At(t).y+s},"y")}),"getLineFunctionsWithOffset"),RS=p((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Mc(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Mc(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),NS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},qS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Mc=p((e,t,r,i,s,o,a=!1,n)=>{var y;const l=NS[r],c=l&&qS.includes(l.type);if(!l){H.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),m=`${d}_${g}`;if(!document.getElementById(m)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(y=C.parentNode)==null||y.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),WS=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=St())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Ao=new Map,jt=new Map,OF=p(()=>{Ao.clear(),jt.clear()},"clear"),Ti=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),zS=p(async(e,t)=>{const r=St();let i=oe(r);const{labelStyles:s}=rt(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",l=void 0,c=await ze(e,t.label,{style:Ti(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?l:void 0},r);a.node().appendChild(c),H.info("abc82",t,t.labelType);let h=c.getBBox(),u=h;if(i){const d=c.children[0],y=yt(c);h=d.getBoundingClientRect(),u=h,y.attr("width",h.width),y.attr("height",h.height)}else{const d=yt(c).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}a.attr("transform",ki(u,i)),Ao.set(t.id,o),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await ar(y,t.startLabelLeft,Ti(t.labelStyle)||"",!1,!1);f=g;let m=g.getBBox();if(i){const C=g.children[0],b=yt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",ki(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startLeft=d,Ai(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await ar(y,t.startLabelRight,Ti(t.labelStyle)||"",!1,!1);f=g;let m=g.getBBox();if(i){const C=g.children[0],b=yt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",ki(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startRight=d,Ai(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await ar(d,t.endLabelLeft,Ti(t.labelStyle)||"",!1,!1);f=g;let m=g.getBBox();if(i){const C=g.children[0],b=yt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",ki(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endLeft=d,Ai(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await ar(d,t.endLabelRight,Ti(t.labelStyle)||"",!1,!1);f=g;let m=g.getBBox();if(i){const C=g.children[0],b=yt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",ki(m,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endRight=d,Ai(f,t.endLabelRight)}return c},"insertEdgeLabel");function Ai(e,t){oe(St())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Ai,"setTerminalWidth");var HS=p((e,t)=>{H.debug("Moving label abc88 ",e.id,e.label,Ao.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=St(),{subGraphTitleTotalMargin:s}=xl(i);if(e.label){const o=Ao.get(e.id);let a=e.x,n=e.y;if(r){const l=Te.calcLabelPosition(r);H.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=jt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=jt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=jt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=jt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),YS=p((e,t)=>{var a;if(!(e!=null&&e.isLabelEdge)||!((a=e==null?void 0:e.id)!=null&&a.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),US=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),GS=p((e,t,r)=>{H.debug(`intersection calc abc89:
294
+ outsidePoint: ${JSON.stringify(t)}
295
+ insidePoint : ${JSON.stringify(r)}
296
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),H.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let u=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return H.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:f,_y:d}),n===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),$c=p((e,t)=>{H.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(H.info("abc88 checking point",o,t),!US(t,o)&&!s){const a=GS(t,i,o);H.debug("abc88 inside",o,i,a),H.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?H.warn("abc88 no intersect",a,r):r.push(a),s=!0}else H.warn("abc88 outside",o,i),i=o,s||r.push(o)}),H.debug("returning points",r),r},"cutPathAtIntersect");function um(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(um,"extractCornerPoints");var Oc=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),jS=p(function(e){const{cornerPointPositions:t}=um(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Oc(s,a,5),l=Oc(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){H.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const d=5;a.x===n.x?f={x:c<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:f={x:c<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else H.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),XS=p((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Array(n).fill(`${s} ${o}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),VS=p(function(e,t,r,i,s,o,a,n=!1){var E;if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=St();let h=t.points,u=!1;const f=s;var d=o;const y=[];for(const q in t.cssCompiledStyles)Gf(q)||y.push(t.cssCompiledStyles[q]);if(c==="swimlane"){if(d.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),d.intersect(h[1])];else{const q=h.slice(1,-1),Y=q[0],G=q[q.length-1],et=.5,lt=Math.abs(h[h.length-1].x-G.x)<et&&Math.abs(h[h.length-1].y-G.y)<et,at=f.intersect(Y),ut=lt?G:d.intersect(G),bt=Math.abs(ut.x-G.x)<et&&Math.abs(ut.y-G.y)<et,Bt=Math.abs(at.x-Y.x)<et&&Math.abs(at.y-Y.y)<et?[]:[at],Lt=bt?[]:[ut];h=[...Bt,...q,...Lt]}h=YS(t,h)}else d.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(d.intersect(h[h.length-1])));const g=btoa(JSON.stringify(h));t.toCluster&&(H.info("to cluster abc88",r.get(t.toCluster)),h=$c(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(H.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=$c(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let m=h.filter(q=>!Number.isNaN(q.y));const C=WS(t.curve);C!=="rounded"&&(m=jS(m));let b=Oi;switch(C){case"linear":b=Oi;break;case"basis":b=Qa;break;case"cardinal":b=Xu;break;case"bumpX":b=Hu;break;case"bumpY":b=Yu;break;case"catmullRom":b=Zu;break;case"monotoneX":b=rd;break;case"monotoneY":b=id;break;case"natural":b=od;break;case"step":b=ad;break;case"stepAfter":b=ld;break;case"stepBefore":b=nd;break;case"rounded":b=Oi;break;default:b=Qa}const{x:k,y:w}=PS(t),S=kk().x(k).y(w).curve(b);let _;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let F,v=C==="rounded"?dm(fm(m,t),5):S(m);const z=Array.isArray(t.style)?t.style:[t.style];let N=z.find(q=>q==null?void 0:q.startsWith("stroke:")),M="";t.animate&&(M="edge-animation-fast"),t.animation&&(M="edge-animation-"+t.animation);let U=!1;if(t.look==="handDrawn"){const q=tt.svg(e);Object.assign([],m);const Y=q.path(v,{roughness:.3,seed:l});_+=" transition",F=yt(Y).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",z?z.reduce((et,lt)=>et+";"+lt,""):"");let G=F.attr("d");F.attr("d",G),e.node().appendChild(F.node())}else{const q=y.join(";"),Y=z?z.reduce((bt,Ct)=>bt+Ct+";",""):"",G=(q?q+";"+Y+";":Y)+";"+(z?z.reduce((bt,Ct)=>bt+";"+Ct,""):"");F=e.append("path").attr("d",v).attr("id",`${a}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",G),N=(E=G.match(/stroke:([^;]+)/))==null?void 0:E[1],U=t.animate===!0||!!t.animation||q.includes("animation");const et=F.node(),lt=typeof et.getTotalLength=="function"?et.getTotalLength():0,at=Ec[t.arrowTypeStart]||0,ut=Ec[t.arrowTypeEnd]||0;if(t.look==="neo"&&!U){const Ct=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?XS(lt,at,ut):`0 ${at} ${lt-at-ut} ${ut}`}; stroke-dashoffset: 0;`;F.attr("style",Ct+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",g),F.attr("data-look",Ht(t.look)),t.showPoints&&m.forEach(q=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",q.x).attr("cy",q.y)});let W="";(St().flowchart.arrowMarkerAbsolute||St().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),H.info("arrowTypeStart",t.arrowTypeStart),H.info("arrowTypeEnd",t.arrowTypeEnd);const O=!U&&(t==null?void 0:t.look)==="neo";RS(F,t,W,a,i,O,N);const A=Math.floor(h.length/2),B=h[A];Te.isLabelCoordinateInPath(B,F.attr("d"))||(u=!0);let $={};return u&&($.updatedPath=h),$.originalPath=t.points,$},"insertEdge");function dm(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,u=l.x-a.x,f=l.y-a.y,d=Math.hypot(c,h),y=Math.hypot(u,f);if(d<s||y<s){r+=`L${a.x},${a.y}`;continue}const g=c/d,m=h/d,C=u/y,b=f/y,k=g*C+m*b,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${a.x},${a.y}`;continue}const _=Math.min(t/Math.sin(S/2),d/2,y/2),F=a.x-g*_,v=a.y-m*_,z=a.x+C*_,N=a.y+b*_;r+=`L${F},${v}`,r+=`Q${a.x},${a.y} ${z},${N}`}}return r}p(dm,"generateRoundedPath");function Fn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Fn,"calculateDeltaAndAngle");function fm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Qt[t.arrowTypeStart]){const s=Qt[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=Fn(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&Qt[t.arrowTypeEnd]){const s=Qt[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=Fn(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}p(fm,"applyMarkerOffsetsToPoints");var ZS=p((e,t,r,i)=>{t.forEach(s=>{x_[s](e,r,i)})},"insertMarkers"),KS=p((e,t,r)=>{H.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),QS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),JS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),t_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),e_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),r_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),i_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),s_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),o_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),a_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),n_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),l_=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),h_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),c_=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),u_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),d_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),f_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),p_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),g_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
297
+ L20,10
298
+ M20,10
299
+ L0,20`)},"requirement_arrow"),m_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
300
+ L20,10
301
+ M20,10
302
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),y_=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),C_=p((e,t,r)=>{const i=Et(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),x_={extension:KS,composition:QS,aggregation:JS,dependency:t_,lollipop:e_,point:r_,circle:i_,cross:s_,barb:o_,barbNeo:a_,only_one:n_,zero_or_one:l_,one_or_more:h_,zero_or_more:c_,only_one_neo:u_,zero_or_one_neo:d_,one_or_more_neo:f_,zero_or_more_neo:p_,requirement_arrow:g_,requirement_contains:y_,requirement_arrow_neo:m_,requirement_contains_neo:C_},b_=ZS,k_={common:cs,getConfig:Et,insertCluster:mS,insertEdge:VS,insertEdgeLabel:zS,insertMarkers:b_,insertNode:cm,interpolateToCurve:fl,labelHelper:dt,log:H,positionEdgeLabel:HS},ji={},pm=p(e=>{for(const t of e)ji[t.name]=t},"registerLayoutLoaders"),T_=p(()=>{pm([{name:"dagre",loader:p(async()=>await mt(()=>import("./dagre-VKFMJZFB-a9311217.js"),["assets/dagre-VKFMJZFB-a9311217.js","assets/chunk-RYQCIY6F-5b515d80.js","assets/graph-7008991d.js","assets/map-338884f0.js","assets/layout-47dc10e6.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]),"loader")},{name:"swimlane",loader:p(async()=>await mt(()=>import("./swimlanes-5IMT3BWC-b9d54b95.js"),["assets/swimlanes-5IMT3BWC-b9d54b95.js","assets/index-e2bcee83.js","assets/index-3c996d39.css","assets/chunk-RYQCIY6F-5b515d80.js","assets/graph-7008991d.js","assets/map-338884f0.js"]),"loader")},{name:"cose-bilkent",loader:p(async()=>await mt(()=>import("./cose-bilkent-JH36ORCC-2ed0fa33.js"),["assets/cose-bilkent-JH36ORCC-2ed0fa33.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]),"loader")}])},"registerDefaultLayoutLoaders");T_();var IF=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in ji))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const u of e.nodes){const f=u.domId||u.id;u.domId=`${e.diagramId}-${f}`}const i=ji[e.layoutAlgorithm],s=await i.loader(),{theme:o,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o!=null&&o.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o!=null&&o.includes("dark")?"#FFFFFF":"#000000"}`),n){const u=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,k_,{algorithm:i.algorithm},r)},"render"),DF=p((e="",{fallback:t="dagre"}={})=>{if(e in ji)return e;if(t in ji)return H.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ol="comm",gm="rule",mm="decl",w_="@media",S_="@import",__="@supports",B_="@namespace",An="@keyframes",ym="@layer",v_="@scope",L_=Math.abs,Di=String.fromCharCode;function Cm(e){return e.trim()}function En(e,t,r){return e.replace(t,r)}function Kr(e,t){return e.charCodeAt(t)|0}function si(e,t,r){return e.slice(t,r)}function Oe(e){return e.length}function xm(e){return e.length}function Ps(e,t){return t.push(e),e}var Xo=1,oi=1,bm=0,me=0,Dt=0,hi="";function Il(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:Xo,column:oi,length:a,return:"",siblings:n}}function F_(){return Dt}function A_(){return Dt=me>0?Kr(hi,--me):0,oi--,Dt===10&&(oi=1,Xo--),Dt}function Se(){return Dt=me<bm?Kr(hi,me++):0,oi++,Dt===10&&(oi=1,Xo++),Dt}function nr(){return Kr(hi,me)}function Qs(){return me}function Vo(e,t){return si(hi,e,t)}function Xi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function E_(e){return Xo=oi=1,bm=Oe(hi=e),me=0,[]}function M_(e){return hi="",e}function $a(e){return Cm(Vo(me-1,Mn(e===91?e+2:e===40?e+1:e)))}function $_(e){for(;(Dt=nr())&&Dt<33;)Se();return Xi(e)>2||Xi(Dt)>3?"":" "}function O_(e,t){for(;--t&&Se()&&!(Dt<48||Dt>102||Dt>57&&Dt<65||Dt>70&&Dt<97););return Vo(e,Qs()+(t<6&&nr()==32&&Se()==32))}function Mn(e){for(;Se();)switch(Dt){case e:return me;case 34:case 39:e!==34&&e!==39&&Mn(Dt);break;case 40:e===41&&Mn(e);break;case 92:Se();break}return me}function I_(e,t){for(;Se()&&e+Dt!==47+10;)if(e+Dt===42+42&&nr()===47)break;return"/*"+Vo(t,me-1)+"*"+Di(e===47?e:Se())}function D_(e){for(;!Xi(nr());)Se();return Vo(e,me)}function P_(e){return M_(Js("",null,null,null,[""],e=E_(e),0,[0],e))}function Js(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,u=a,f=0,d=0,y=0,g=1,m=1,C=1,b=0,k=0,w="",S=s,_=o,F=i,v=w;m;)switch(y=k,k=Se()){case 40:y!=108&&Kr(v,u-1)==58?(b++,v+="("):v+=$a(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=$a(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Di(k);break}v+=$_(y);break;case 92:v+=O_(Qs()-1,7);continue;case 47:switch(nr()){case 42:case 47:Ps(R_(I_(Se(),Qs()),t,r,l),l),(Xi(y||1)==5||Xi(nr()||1)==5)&&Oe(v)&&si(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*g:n[c++]=Oe(v)*C;case 125*g:case 59:case 0:if(b>0&&k){v+=Di(k);break}switch(k){case 0:case 125:m=0;case 59+h:C==-1&&(v=En(v,/\f/g,"")),d>0&&(Oe(v)-u||g===0)&&Ps(d>32?Dc(v+";",i,r,u-1,l):Dc(En(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(Ps(F=Ic(v,t,r,c,h,s,n,w,S=[],_=[],u,o),o),k===123)if(h===0)Js(v,t,F,F,S,o,u,n,_);else{switch(f){case 99:if(Kr(v,3)===110)break;case 108:if(Kr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Js(e,F,F,i&&Ps(Ic(e,F,F,0,0,s,n,w,s,S=[],u,_),_),s,_,u,n,i?S:_):Js(v,F,F,F,[""],_,0,n,_)}}c=h=d=0,g=C=1,w=v="",u=a;break;case 58:u=1+Oe(v),d=y;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&A_()==125)continue}switch(v+=Di(k),k*g){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Oe(v)-1)*C,C=1;break;case 64:nr()===45&&(v+=$a(Se())),f=nr(),h=u=Oe(w=v+=D_(Qs())),k++;break;case 45:y===45&&Oe(v)==2&&(g=0)}}return o}function Ic(e,t,r,i,s,o,a,n,l,c,h,u){for(var f=s-1,d=s===0?o:[""],y=xm(d),g=0,m=0,C=0;g<i;++g)for(var b=0,k=si(e,f+1,f=L_(m=a[g])),w=e;b<y;++b)(w=Cm(m>0?d[b]+" "+k:En(k,/&\f/g,d[b])))&&(l[C++]=w);return Il(e,t,r,s===0?gm:n,l,c,h,u)}function R_(e,t,r,i){return Il(e,t,r,Ol,Di(F_()),si(e,2,-2),0,i)}function Dc(e,t,r,i,s){return Il(e,t,r,mm,si(e,0,i),si(e,i+1,-1),i,s)}function $n(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function N_(e,t,r,i){switch(e.type){case ym:if(e.children.length)break;case S_:case B_:case mm:return e.return=e.return||e.value;case Ol:return"";case An:return e.return=e.value+"{"+$n(e.children,i)+"}";case gm:if(!Oe(e.value=e.props.join(",")))return""}return Oe(r=$n(e.children,i))?e.return=e.value+"{"+r+"}":""}function q_(e){var t=xm(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var km="c4",W_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await mt(()=>import("./c4Diagram-LMCZKHZV-1551f7f2.js"),["assets/c4Diagram-LMCZKHZV-1551f7f2.js","assets/chunk-32BRIVSS-94067150.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:km,diagram:e}},"loader"),H_={id:km,detector:W_,loader:z_},Y_=H_,Tm="flowchart",U_=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),G_=p(async()=>{const{diagram:e}=await mt(()=>import("./flowDiagram-23GEKE2U-c8b30799.js"),["assets/flowDiagram-23GEKE2U-c8b30799.js","assets/chunk-PUDLZKDR-07116136.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/chunk-32BRIVSS-94067150.js","assets/channel-61abe24f.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Tm,diagram:e}},"loader"),j_={id:Tm,detector:U_,loader:G_},X_=j_,wm="flowchart-v2",V_=p((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),Z_=p(async()=>{const{diagram:e}=await mt(()=>import("./flowDiagram-23GEKE2U-c8b30799.js"),["assets/flowDiagram-23GEKE2U-c8b30799.js","assets/chunk-PUDLZKDR-07116136.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/chunk-32BRIVSS-94067150.js","assets/channel-61abe24f.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:wm,diagram:e}},"loader"),K_={id:wm,detector:V_,loader:Z_},Q_=K_,Sm="swimlane",J_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),tB=p(async()=>{const{diagram:e}=await mt(()=>import("./swimlanesDiagram-G3AALYLV-cda8be30.js"),["assets/swimlanesDiagram-G3AALYLV-cda8be30.js","assets/chunk-PUDLZKDR-07116136.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/chunk-32BRIVSS-94067150.js","assets/channel-61abe24f.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Sm,diagram:e}},"loader"),eB={id:Sm,detector:J_,loader:tB},rB=eB,_m="er",iB=p(e=>/^\s*erDiagram/.test(e),"detector"),sB=p(async()=>{const{diagram:e}=await mt(()=>import("./erDiagram-Q63AITRT-9e62e673.js"),["assets/erDiagram-Q63AITRT-9e62e673.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/channel-61abe24f.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:_m,diagram:e}},"loader"),oB={id:_m,detector:iB,loader:sB},aB=oB,Bm="gitGraph",nB=p(e=>/^\s*gitGraph/.test(e),"detector"),lB=p(async()=>{const{diagram:e}=await mt(()=>import("./gitGraphDiagram-IHSO6WYX-3e93a095.js"),["assets/gitGraphDiagram-IHSO6WYX-3e93a095.js","assets/chunk-2Q5K7J3B-3a5a6cd4.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Bm,diagram:e}},"loader"),hB={id:Bm,detector:nB,loader:lB},cB=hB,vm="gantt",uB=p(e=>/^\s*gantt/.test(e),"detector"),dB=p(async()=>{const{diagram:e}=await mt(()=>import("./ganttDiagram-NO4QXBWP-81cf321e.js"),["assets/ganttDiagram-NO4QXBWP-81cf321e.js","assets/index-e2bcee83.js","assets/index-3c996d39.css","assets/linear-60f52dc3.js","assets/init-77b53fdd.js","assets/defaultLocale-52cfb4e1.js"]);return{id:vm,diagram:e}},"loader"),fB={id:vm,detector:uB,loader:dB},pB=fB,Lm="info",gB=p(e=>/^\s*info/.test(e),"detector"),mB=p(async()=>{const{diagram:e}=await mt(()=>import("./infoDiagram-FWYZ7A6U-53d9e3c5.js"),["assets/infoDiagram-FWYZ7A6U-53d9e3c5.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Lm,diagram:e}},"loader"),yB={id:Lm,detector:gB,loader:mB},Fm="pie",CB=p(e=>/^\s*pie/.test(e),"detector"),xB=p(async()=>{const{diagram:e}=await mt(()=>import("./pieDiagram-ENE6RG2P-c60a583c.js"),["assets/pieDiagram-ENE6RG2P-c60a583c.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css","assets/arc-19b95fda.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js"]);return{id:Fm,diagram:e}},"loader"),bB={id:Fm,detector:CB,loader:xB},Am="quadrantChart",kB=p(e=>/^\s*quadrantChart/.test(e),"detector"),TB=p(async()=>{const{diagram:e}=await mt(()=>import("./quadrantDiagram-ABIIQ3AL-e1de7a9f.js"),["assets/quadrantDiagram-ABIIQ3AL-e1de7a9f.js","assets/linear-60f52dc3.js","assets/init-77b53fdd.js","assets/defaultLocale-52cfb4e1.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Am,diagram:e}},"loader"),wB={id:Am,detector:kB,loader:TB},SB=wB,Em="xychart",_B=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),BB=p(async()=>{const{diagram:e}=await mt(()=>import("./xychartDiagram-FW5EYKEG-15c22d90.js"),["assets/xychartDiagram-FW5EYKEG-15c22d90.js","assets/init-77b53fdd.js","assets/ordinal-ba9b4969.js","assets/linear-60f52dc3.js","assets/defaultLocale-52cfb4e1.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Em,diagram:e}},"loader"),vB={id:Em,detector:_B,loader:BB},LB=vB,Mm="requirement",FB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),AB=p(async()=>{const{diagram:e}=await mt(()=>import("./requirementDiagram-TGXJPOKE-103dc537.js"),["assets/requirementDiagram-TGXJPOKE-103dc537.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Mm,diagram:e}},"loader"),EB={id:Mm,detector:FB,loader:AB},MB=EB,$m="sequence",$B=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),OB=p(async()=>{const{diagram:e}=await mt(()=>import("./sequenceDiagram-DBY2YBRQ-72ee08c9.js"),["assets/sequenceDiagram-DBY2YBRQ-72ee08c9.js","assets/chunk-2Q5K7J3B-3a5a6cd4.js","assets/chunk-32BRIVSS-94067150.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:$m,diagram:e}},"loader"),IB={id:$m,detector:$B,loader:OB},DB=IB,Om="class",PB=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),RB=p(async()=>{const{diagram:e}=await mt(()=>import("./classDiagram-OUVF2IWQ-2f87b733.js"),["assets/classDiagram-OUVF2IWQ-2f87b733.js","assets/chunk-V7JOEXUC-9715cf14.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/chunk-32BRIVSS-94067150.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Om,diagram:e}},"loader"),NB={id:Om,detector:PB,loader:RB},qB=NB,Im="classDiagram",WB=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),zB=p(async()=>{const{diagram:e}=await mt(()=>import("./classDiagram-v2-EOCWNBFH-2f87b733.js"),["assets/classDiagram-v2-EOCWNBFH-2f87b733.js","assets/chunk-V7JOEXUC-9715cf14.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/chunk-32BRIVSS-94067150.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Im,diagram:e}},"loader"),HB={id:Im,detector:WB,loader:zB},YB=HB,Dm="state",UB=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),GB=p(async()=>{const{diagram:e}=await mt(()=>import("./stateDiagram-2N3HPSRC-99599962.js"),["assets/stateDiagram-2N3HPSRC-99599962.js","assets/chunk-EX3LRPZG-95013528.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/chunk-32BRIVSS-94067150.js","assets/graph-7008991d.js","assets/layout-47dc10e6.js","assets/map-338884f0.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Dm,diagram:e}},"loader"),jB={id:Dm,detector:UB,loader:GB},XB=jB,Pm="stateDiagram",VB=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),ZB=p(async()=>{const{diagram:e}=await mt(()=>import("./stateDiagram-v2-6OUMAXLB-4b27b493.js"),["assets/stateDiagram-v2-6OUMAXLB-4b27b493.js","assets/chunk-EX3LRPZG-95013528.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/chunk-32BRIVSS-94067150.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Pm,diagram:e}},"loader"),KB={id:Pm,detector:VB,loader:ZB},QB=KB,Rm="journey",JB=p(e=>/^\s*journey/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await mt(()=>import("./journeyDiagram-5HDEW3XC-cac024da.js"),["assets/journeyDiagram-5HDEW3XC-cac024da.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/chunk-32BRIVSS-94067150.js","assets/arc-19b95fda.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Rm,diagram:e}},"loader"),ev={id:Rm,detector:JB,loader:tv},rv=ev,iv=p((e,t,r)=>{H.debug(`rendering svg for syntax error
303
+ `);const i=Ak(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),du(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Nm={draw:iv},sv=Nm,ov={db:{},renderer:Nm,parser:{parse:p(()=>{},"parse")}},av=ov,qm="flowchart-elk",nv=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),lv=p(async()=>{const{diagram:e}=await mt(()=>import("./flowDiagram-23GEKE2U-c8b30799.js"),["assets/flowDiagram-23GEKE2U-c8b30799.js","assets/chunk-PUDLZKDR-07116136.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/chunk-32BRIVSS-94067150.js","assets/channel-61abe24f.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:qm,diagram:e}},"loader"),hv={id:qm,detector:nv,loader:lv},cv=hv,Wm="timeline",uv=p(e=>/^\s*timeline/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await mt(()=>import("./timeline-definition-FHXFAJF6-be69bbbb.js"),["assets/timeline-definition-FHXFAJF6-be69bbbb.js","assets/arc-19b95fda.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Wm,diagram:e}},"loader"),fv={id:Wm,detector:uv,loader:dv},pv=fv,zm="mindmap",gv=p(e=>/^\s*mindmap/.test(e),"detector"),mv=p(async()=>{const{diagram:e}=await mt(()=>import("./mindmap-definition-LN4V7U3C-940aea0d.js"),["assets/mindmap-definition-LN4V7U3C-940aea0d.js","assets/chunk-XXDRQBXY-944c77f5.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:zm,diagram:e}},"loader"),yv={id:zm,detector:gv,loader:mv},Cv=yv,Hm="kanban",xv=p(e=>/^\s*kanban/.test(e),"detector"),bv=p(async()=>{const{diagram:e}=await mt(()=>import("./kanban-definition-HUTT4EX6-6a860eb3.js"),["assets/kanban-definition-HUTT4EX6-6a860eb3.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Hm,diagram:e}},"loader"),kv={id:Hm,detector:xv,loader:bv},Tv=kv,Ym="sankey",wv=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Sv=p(async()=>{const{diagram:e}=await mt(()=>import("./sankeyDiagram-HTMAVEWB-7b94c363.js"),["assets/sankeyDiagram-HTMAVEWB-7b94c363.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Ym,diagram:e}},"loader"),_v={id:Ym,detector:wv,loader:Sv},Bv=_v,Um="packet",vv=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),Lv=p(async()=>{const{diagram:e}=await mt(()=>import("./diagram-NH7WQ7WH-6d1fbe39.js"),["assets/diagram-NH7WQ7WH-6d1fbe39.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Um,diagram:e}},"loader"),Fv={id:Um,detector:vv,loader:Lv},Gm="radar",Av=p(e=>/^\s*radar-beta/.test(e),"detector"),Ev=p(async()=>{const{diagram:e}=await mt(()=>import("./diagram-WEI45ONY-fc8615f4.js"),["assets/diagram-WEI45ONY-fc8615f4.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Gm,diagram:e}},"loader"),Mv={id:Gm,detector:Av,loader:Ev},jm="block",$v=p(e=>/^\s*block(-beta)?/.test(e),"detector"),Ov=p(async()=>{const{diagram:e}=await mt(()=>import("./blockDiagram-677ZJIJ3-fe079e1c.js"),["assets/blockDiagram-677ZJIJ3-fe079e1c.js","assets/chunk-5VM5RSS4-9cf6a906.js","assets/graph-7008991d.js","assets/channel-61abe24f.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:jm,diagram:e}},"loader"),Iv={id:jm,detector:$v,loader:Ov},Dv=Iv,Xm="treeView",Pv=p(e=>/^\s*treeView-beta/.test(e),"detector"),Rv=p(async()=>{const{diagram:e}=await mt(()=>import("./diagram-OA4YK3LP-76385969.js"),["assets/diagram-OA4YK3LP-76385969.js","assets/chunk-2Q5K7J3B-3a5a6cd4.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Xm,diagram:e}},"loader"),Nv={id:Xm,detector:Pv,loader:Rv},qv=Nv,Vm="architecture",Wv=p(e=>/^\s*architecture/.test(e),"detector"),zv=p(async()=>{const{diagram:e}=await mt(()=>import("./architectureDiagram-ZJ3FMSHR-201443e3.js"),["assets/architectureDiagram-ZJ3FMSHR-201443e3.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Vm,diagram:e}},"loader"),Hv={id:Vm,detector:Wv,loader:zv},Yv=Hv,Zm="eventmodeling",Uv=p(e=>/^\s*eventmodeling/.test(e),"detector"),Gv=p(async()=>{const{diagram:e}=await mt(()=>import("./diagram-FQU43EPY-6d80ef9b.js"),["assets/diagram-FQU43EPY-6d80ef9b.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Zm,diagram:e}},"loader"),jv={id:Zm,detector:Uv,loader:Gv},Xv=jv,Km="ishikawa",Vv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Zv=p(async()=>{const{diagram:e}=await mt(()=>import("./ishikawaDiagram-FXEZZL3T-ab5a0f04.js"),["assets/ishikawaDiagram-FXEZZL3T-ab5a0f04.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Km,diagram:e}},"loader"),Kv={id:Km,detector:Vv,loader:Zv},Qm="venn",Qv=p(e=>/^\s*venn-beta/.test(e),"detector"),Jv=p(async()=>{const{diagram:e}=await mt(()=>import("./vennDiagram-L72KCM5P-7c53b13d.js"),["assets/vennDiagram-L72KCM5P-7c53b13d.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:Qm,diagram:e}},"loader"),tL={id:Qm,detector:Qv,loader:Jv},eL=tL,Jm="treemap",rL=p(e=>/^\s*treemap/.test(e),"detector"),iL=p(async()=>{const{diagram:e}=await mt(()=>import("./diagram-G47NLZAW-951f899c.js"),["assets/diagram-G47NLZAW-951f899c.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/chunk-VR4S4FIN-85d2e965.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css","assets/defaultLocale-52cfb4e1.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js"]);return{id:Jm,diagram:e}},"loader"),sL={id:Jm,detector:rL,loader:iL},ty="wardley",oL=p(e=>/^\s*wardley-beta/i.test(e),"detector"),aL=p(async()=>{const{diagram:e}=await mt(()=>import("./wardleyDiagram-EHGQE667-fdffdae1.js"),["assets/wardleyDiagram-EHGQE667-fdffdae1.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:ty,diagram:e}},"loader"),nL={id:ty,detector:oL,loader:aL},lL=nL,ey="cynefin",hL=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),cL=p(async()=>{const{diagram:e}=await mt(()=>import("./cynefinDiagram-TSTJHNR4-22c1a8a5.js"),["assets/cynefinDiagram-TSTJHNR4-22c1a8a5.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:ey,diagram:e}},"loader"),uL={id:ey,detector:hL,loader:cL},ry="railroad",dL=p(e=>/^\s*railroad-beta/i.test(e),"detector"),fL=p(async()=>{const{diagram:e}=await mt(()=>import("./railroadDiagram-RFXS5EU6-5cebf589.js"),["assets/railroadDiagram-RFXS5EU6-5cebf589.js","assets/chunk-MOJQB5TN-e521cfda.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:ry,diagram:e}},"loader"),pL={id:ry,detector:dL,loader:fL},iy="railroadEbnf",gL=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),mL=p(async()=>{const{diagram:e}=await mt(()=>import("./ebnfDiagram-CCIWWBDH-11fda8b1.js"),["assets/ebnfDiagram-CCIWWBDH-11fda8b1.js","assets/chunk-MOJQB5TN-e521cfda.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:iy,diagram:e}},"loader"),yL={id:iy,detector:gL,loader:mL},sy="railroadAbnf",CL=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),xL=p(async()=>{const{diagram:e}=await mt(()=>import("./abnfDiagram-VRR7QNED-24485caa.js"),["assets/abnfDiagram-VRR7QNED-24485caa.js","assets/chunk-MOJQB5TN-e521cfda.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:sy,diagram:e}},"loader"),bL={id:sy,detector:CL,loader:xL},oy="railroadPeg",kL=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),TL=p(async()=>{const{diagram:e}=await mt(()=>import("./pegDiagram-2B236MQR-8ef56fb9.js"),["assets/pegDiagram-2B236MQR-8ef56fb9.js","assets/chunk-MOJQB5TN-e521cfda.js","assets/chunk-JWPE2WC7-3c5a598c.js","assets/mermaid-parser.core-fb428282.js","assets/index-e2bcee83.js","assets/index-3c996d39.css"]);return{id:oy,diagram:e}},"loader"),wL={id:oy,detector:kL,loader:TL},Pc=!1,Zo=p(()=>{Pc||(Pc=!0,so("error",av,e=>e.toLowerCase().trim()==="error"),so("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ra(cv,Cv,Yv),Ra(Y_,Tv,YB,qB,aB,pB,yB,bB,MB,DB,rB,Q_,X_,pv,cB,QB,XB,rv,SB,Bv,Fv,LB,Dv,Xv,qv,Mv,Kv,sL,pL,yL,bL,wL,eL,lL,uL))},"addDiagrams"),SL=p(async()=>{H.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(vr).map(async([r,{detector:i,loader:s}])=>{if(s)try{za(r)}catch{try{const{diagram:o,id:a}=await s();so(a,o,i)}catch(o){throw H.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete vr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){H.error(`Failed to load ${t.length} external diagrams`);for(const r of t)H.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),_L="graphics-document document";function ay(e,t){e.attr("role",_L),t!==""&&e.attr("aria-roledescription",t)}p(ay,"setA11yDiagramInfo");function ny(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(ny,"addSVGa11yTitleDescription");var ai,On=(ai=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){var c,h;const i=Et(),s=Pn(t,i);t=RT(t)+`
304
+ `;try{za(s)}catch{const u=SC(s);if(!u)throw new au(`Diagram ${s} not found.`);const{id:f,diagram:d}=await u();so(f,d)}const{db:o,parser:a,renderer:n,init:l}=za(s);return a.parser&&(a.parser.yy=o),(c=o.clear)==null||c.call(o),l==null||l(i),r.title&&((h=o.setDiagramTitle)==null||h.call(o,r.title)),await a.parse(t),new ai(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(ai,"Diagram"),ai),Rc=[],BL=p(()=>{Rc.forEach(e=>{e()}),Rc=[]},"attachFunctions"),vL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ly(e){const t=e.match(ou);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
305
+ `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
306
+ `):t[2];let s=P2(i,{schema:D2})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}p(ly,"extractFrontMatter");var LL=p(e=>e.replace(/\r\n?/g,`
307
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),FL=p(e=>{const{text:t,metadata:r}=ly(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),AL=p(e=>{const t=Te.detectInit(e)??{},r=Te.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:_T(e),directive:t}},"processDirectives");function Dl(e){const t=LL(e),r=FL(t),i=AL(r.text),s=Cl(r.config,i.directive);return e=vL(i.text),{code:e,title:r.title,config:s}}p(Dl,"preprocessDiagram");function hy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(hy,"toBase64");var EL=5e4,ML="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",$L="sandbox",OL="loose",IL="http://www.w3.org/2000/svg",DL="http://www.w3.org/1999/xlink",PL="http://www.w3.org/1999/xhtml",RL="100%",NL="100%",qL="border:0;margin:0;",WL="margin:0",zL="allow-top-navigation-by-user-activation allow-popups",HL='The "iframe" tag is not supported by your browser.',YL=["foreignobject"],UL=["dominant-baseline"];function Pl(e){const t=Dl(e);return ro(),kC(t.config??{}),t}p(Pl,"processAndSetConfigs");async function cy(e,t){Zo();try{const{code:r,config:i}=Pl(e);return{diagramType:(await dy(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(cy,"parse");var Nc=p((e,t,r=[])=>{const i=Jc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),GL=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=oe(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Qh(l.styles)||n.forEach(c=>{r.insertRule(Nc(l.id,c,l.styles),r.cssRules.length)}),Qh(l.textStyles)||r.insertRule(Nc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Wa(s)+`
308
+ `}else i+=`${e.themeCSS}
309
+ `;return i+Wa(r)},"createCssStyles"),jL=p((e,t)=>$n(P_(`${e}{${t}}`),q_([p(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===An)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[w_,__,ym,v_,"@container","@starting-style"],An].includes(i.type)||(H.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Ol))},"addNamespace"),N_])),"compileCSS"),XL=p((e,t,r,i)=>{const s=GL(e,r),o=zC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return jL(i,o)},"createUserStyles"),VL=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ar(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),ZL=p((e="",t)=>{var s,o;const r=(o=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&o.height?t.viewBox.baseVal.height+"px":NL,i=hy(`<body style="${WL}">${e}</body>`);return`<iframe style="width:${RL};height:${r};${qL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${zL}">
310
+ ${HL}
311
+ </iframe>`},"putIntoIFrame"),qc=p((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",IL);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function In(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(In,"sandboxedIframe");var KL=p((e,t,r,i)=>{var s,o,a;(s=e.getElementById(t))==null||s.remove(),(o=e.getElementById(r))==null||o.remove(),(a=e.getElementById(i))==null||a.remove()},"removeExistingElements"),QL=p(async function(e,t,r){var U,W,O,A,B,$;Zo();const i=Pl(t);t=i.code;const s=Et();H.debug(s),t.length>((s==null?void 0:s.maxTextSize)??EL)&&(t=ML);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=p(()=>{const q=yt(f?n:c).node();q&&"remove"in q&&q.remove()},"removeTempElements");let u=yt(document.body);const f=s.securityLevel===$L,d=s.securityLevel===OL,y=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const E=In(yt(r),a);u=yt(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=yt(r);qc(u,e,l,`font-family: ${y}`,DL)}else{if(KL(document,e,l,a),f){const E=In(yt(document.body),a);u=yt(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=yt("body");qc(u,e,l)}let g,m;try{g=await On.fromText(t,{title:i.title})}catch(E){if(s.suppressErrorRendering)throw h(),E;g=await On.fromText("error"),m=E}const C=u.select(c).node(),b=g.type,k=C.firstChild,w=k.firstChild,S=(W=(U=g.renderer).getClasses)==null?void 0:W.call(U,t,g),_=XL(s,b,S,o),F=document.createElement("style");F.innerHTML=_,k.insertBefore(F,w);try{await g.renderer.draw(t,e,"11.16.0",g)}catch(E){throw s.suppressErrorRendering?h():sv.draw(t,e,"11.16.0"),E}const v=u.select(`${c} svg`),z=(A=(O=g.db).getAccTitle)==null?void 0:A.call(O),N=($=(B=g.db).getAccDescription)==null?void 0:$.call(B);fy(b,v,z,N),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",PL);let M=u.select(c).node().innerHTML;if(H.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),M=VL(M,f,qe(s.arrowMarkerAbsolute)),f){const E=u.select(c+" svg").node();M=ZL(M,E)}else d||(M=Qr.sanitize(M,{ADD_TAGS:YL,ADD_ATTR:UL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(BL(),m)throw m;return h(),{diagramType:b,svg:M,bindFunctions:g.db.bindFunctions}},"render");function uy(e={}){var i;const t=Rt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),xC(t),t!=null&&t.theme&&t.theme in Xe?t.themeVariables=Xe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Xe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?CC(t):tu();Dn(r.logLevel),Zo()}p(uy,"initialize");var dy=p((e,t={})=>{const{code:r}=Dl(e);return On.fromText(r,t)},"getDiagramFromText");function fy(e,t,r,i){ay(t,e),ny(t,r,i,t.attr("id"))}p(fy,"addA11yInfo");var Mr=Object.freeze({render:QL,parse:cy,getDiagramFromText:dy,initialize:uy,getConfig:Et,setConfig:eu,getSiteConfig:tu,updateSiteConfig:bC,reset:p(()=>{ro()},"reset"),globalReset:p(()=>{ro(Jr)},"globalReset"),defaultConfig:Jr});Dn(Et().logLevel);ro(Et());var JL=p((e,t,r)=>{H.warn(e),yl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),py=p(async function(e={querySelector:".mermaid"}){try{await tF(e)}catch(t){if(yl(t)&&H.error(t.str),ue.parseError&&ue.parseError(t),!e.suppressErrors)throw H.error("Use the suppressErrors option to suppress these errors"),t}},"run"),tF=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Mr.getConfig();H.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");H.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(H.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Mr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new Te.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(H.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=Sp(Te.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Te.detectInit(a);h&&H.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Cy(c,a,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){JL(u,n,ue.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),gy=p(function(e){Mr.initialize(e)},"initialize"),eF=p(async function(e,t,r){H.warn("mermaid.init is deprecated. Please use run instead."),e&&gy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await py(i)},"init"),rF=p(async(e,{lazyLoad:t=!0}={})=>{Zo(),Ra(...e),t===!1&&await SL()},"registerExternalDiagrams"),my=p(function(){if(ue.startOnLoad){const{startOnLoad:e}=Mr.getConfig();e&&ue.run().catch(t=>H.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",my,!1);var iF=p(function(e){ue.parseError=e},"setParseErrorHandler"),Eo=[],Oa=!1,yy=p(async()=>{if(!Oa){for(Oa=!0;Eo.length>0;){const e=Eo.shift();if(e)try{await e()}catch(t){H.error("Error executing queue",t)}}Oa=!1}},"executeQueue"),sF=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((o,a)=>{Mr.parse(e,t).then(n=>{o(n),r(n)},n=>{var l;H.error("Error parsing",n),(l=ue.parseError)==null||l.call(ue,n),a(n),i(n)})}),"performCall");Eo.push(s),yy().catch(i)}),"parse"),Cy=p((e,t,r)=>new Promise((i,s)=>{const o=p(()=>new Promise((a,n)=>{Mr.render(e,t,r).then(l=>{a(l),i(l)},l=>{var c;H.error("Error parsing",l),(c=ue.parseError)==null||c.call(ue,l),n(l),s(l)})}),"performCall");Eo.push(o),yy().catch(s)}),"render"),oF=p(()=>Object.keys(vr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ue={startOnLoad:!0,mermaidAPI:Mr,parse:sF,render:Cy,init:eF,run:py,registerExternalDiagrams:rF,registerLayoutLoaders:pm,initialize:gy,parseError:void 0,contentLoaded:my,setParseErrorHandler:iF,detectType:Pn,registerIconPacks:ow,getRegisteredDiagramsMetadata:oF},aF=ue;/*! Check if previously processed *//*!
312
+ * Wait for document loaded before starting the execution
313
+ */const PF=Object.freeze(Object.defineProperty({__proto__:null,default:aF},Symbol.toStringTag,{value:"Module"}));export{P as $,DF as A,IF as B,lr as C,Ny as D,Qc as E,Cl as F,Et as G,AT as H,KC as I,D2 as J,Ak as K,Q0 as L,Pi as M,cF as N,EC as O,uu as P,Wo as Q,Th as R,kk as S,Qa as T,FT as U,hs as V,fu as W,NC as X,Be as Y,kT as Z,p as _,Rt as a,J2 as a$,R as a0,yk as a1,zh as a2,Wh as a3,kF as a4,mF as a5,xF as a6,CF as a7,pF as a8,Zn as a9,zS as aA,Qt as aB,Ao as aC,jt as aD,Yw as aE,ul as aF,hl as aG,Xs as aH,oT as aI,sT as aJ,iT as aK,rT as aL,X2 as aM,Vf as aN,K2 as aO,j2 as aP,tT as aQ,Zf as aR,Z2 as aS,lT as aT,nT as aU,aT as aV,cT as aW,hT as aX,V2 as aY,Kf as aZ,eT as a_,bF as aa,gF as ab,Wr as ac,wF as ad,TF as ae,yF as af,mS as ag,cm as ah,$F as ai,pt as aj,De as ak,ow as al,gs as am,sw as an,ze as ao,ml as ap,tt as aq,b_ as ar,MF as as,OF as at,AF as au,it as av,EF as aw,xl as ax,VS as ay,HS as az,jC as b,Q2 as b0,Qf as b1,oe as b2,op as b3,ki as b4,PS as b5,Ar as b6,hp as b7,Gc as b8,Ck as b9,Gn as ba,sr as bb,qi as bc,Ih as bd,Kb as be,Gf as bf,rt as bg,Un as bh,vu as bi,he as bj,ds as bk,Yb as bl,Au as bm,fF as bn,Wy as bo,PF as bp,GC as c,St as d,cs as e,np as f,UC as g,Ke as h,_e as i,yt as j,du as k,H as l,W2 as m,XC as n,VC as o,P2 as p,DS as q,SF as r,YC as s,Qr as t,Te as u,HC as v,$T as w,dF as x,hF as y,uF as z};