archsight 0.2.0 → 0.2.2

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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/chart/archsight/values.yaml +2 -0
  3. data/docs/kubernetes.md +53 -0
  4. data/lib/archsight/annotations/annotation.rb +13 -1
  5. data/lib/archsight/cli.rb +6 -0
  6. data/lib/archsight/import/license_analyzer.rb +14 -6
  7. data/lib/archsight/resources/base.rb +2 -2
  8. data/lib/archsight/resources/technology_artifact.rb +7 -3
  9. data/lib/archsight/version.rb +1 -1
  10. data/lib/archsight/web/application.rb +38 -0
  11. data/lib/archsight/web/public/vue/{ApiDocsPage-B1RqTNqh.js → ApiDocsPage-Cwn04X61.js} +1 -1
  12. data/lib/archsight/web/public/vue/{DocPage-DzwBgBd4.js → DocPage-Y83PCbYi.js} +1 -1
  13. data/lib/archsight/web/public/vue/{EditorPage-D_miHSv4.js → EditorPage-DqRMOBE6.js} +1 -1
  14. data/lib/archsight/web/public/vue/{ErrorPage-CQQtPey3.js → ErrorPage-D0lKMCXA.js} +1 -1
  15. data/lib/archsight/web/public/vue/{GraphView-T9jFH_qg.js → GraphView-Byq-Nfd9.js} +1 -1
  16. data/lib/archsight/web/public/vue/{InstanceRouter-1Sm-CRhf.js → InstanceRouter-B3Q2fH0X.js} +1 -1
  17. data/lib/archsight/web/public/vue/{KindList-JA_L_-Cz.js → KindList-DlDrvJDd.js} +1 -1
  18. data/lib/archsight/web/public/vue/{ResourceList-8iqavWdg.js → ResourceList-DwsfI85-.js} +1 -1
  19. data/lib/archsight/web/public/vue/{SearchResults-BdgFeHcm.js → SearchResults-DlWGROho.js} +1 -1
  20. data/lib/archsight/web/public/vue/{_basePickBy-CVgieyx-.js → _basePickBy-DXGWsL9H.js} +1 -1
  21. data/lib/archsight/web/public/vue/{_baseUniq-BNfrOSaP.js → _baseUniq-C8pAAASt.js} +1 -1
  22. data/lib/archsight/web/public/vue/{architectureDiagram-VXUJARFQ-CJXNpTr5.js → architectureDiagram-VXUJARFQ-Dg_wTk4u.js} +1 -1
  23. data/lib/archsight/web/public/vue/{blockDiagram-VD42YOAC-B5488Hes.js → blockDiagram-VD42YOAC-C8HXvtNT.js} +1 -1
  24. data/lib/archsight/web/public/vue/{c4Diagram-YG6GDRKO-eYY3hprM.js → c4Diagram-YG6GDRKO-QzXboDJ8.js} +1 -1
  25. data/lib/archsight/web/public/vue/{chunk-4BX2VUAB-ZoXeL4D1.js → chunk-4BX2VUAB-DSPzEX5F.js} +1 -1
  26. data/lib/archsight/web/public/vue/{chunk-55IACEB6-rNtQYnu_.js → chunk-55IACEB6-Dd5Z8Bov.js} +1 -1
  27. data/lib/archsight/web/public/vue/{chunk-B4BG7PRW-DolAeVV9.js → chunk-B4BG7PRW-B_hXD1nI.js} +1 -1
  28. data/lib/archsight/web/public/vue/{chunk-DI55MBZ5-DnN0f_hj.js → chunk-DI55MBZ5-C-2DUMJY.js} +1 -1
  29. data/lib/archsight/web/public/vue/{chunk-FMBD7UC4-BQWOCMuR.js → chunk-FMBD7UC4-BlBtfKnL.js} +1 -1
  30. data/lib/archsight/web/public/vue/{chunk-QN33PNHL-DId301Kb.js → chunk-QN33PNHL-Db3REDIz.js} +1 -1
  31. data/lib/archsight/web/public/vue/{chunk-QZHKN3VN-xbY0NLgv.js → chunk-QZHKN3VN-BqVqGMTy.js} +1 -1
  32. data/lib/archsight/web/public/vue/{chunk-TZMSLE5B-CgF9_37b.js → chunk-TZMSLE5B-DfX4VDWu.js} +1 -1
  33. data/lib/archsight/web/public/vue/classDiagram-2ON5EDUG-C9Kk58xl.js +1 -0
  34. data/lib/archsight/web/public/vue/classDiagram-v2-WZHVMYZB-C9Kk58xl.js +1 -0
  35. data/lib/archsight/web/public/vue/clone-B6uzD5eH.js +1 -0
  36. data/lib/archsight/web/public/vue/{cose-bilkent-S5V4N54A-CB9Zfu50.js → cose-bilkent-S5V4N54A-CfkQxn-a.js} +1 -1
  37. data/lib/archsight/web/public/vue/{dagre-6UL2VRFP-BqkmE-LI.js → dagre-6UL2VRFP-D13da1qu.js} +1 -1
  38. data/lib/archsight/web/public/vue/{diagram-PSM6KHXK-CKBfqtw3.js → diagram-PSM6KHXK-BwzbeHPK.js} +1 -1
  39. data/lib/archsight/web/public/vue/{diagram-QEK2KX5R-B78rOlvK.js → diagram-QEK2KX5R-COjSoDC8.js} +1 -1
  40. data/lib/archsight/web/public/vue/{diagram-S2PKOQOG-BlXC6Cia.js → diagram-S2PKOQOG-FH65FafS.js} +1 -1
  41. data/lib/archsight/web/public/vue/{erDiagram-Q2GNP2WA-BnliyziJ.js → erDiagram-Q2GNP2WA-D1mxJWSp.js} +1 -1
  42. data/lib/archsight/web/public/vue/{flowDiagram-NV44I4VS-wuqPowTd.js → flowDiagram-NV44I4VS-DpRd5cPP.js} +1 -1
  43. data/lib/archsight/web/public/vue/{ganttDiagram-JELNMOA3-GSffAIH3.js → ganttDiagram-JELNMOA3-D04Sdd3Q.js} +1 -1
  44. data/lib/archsight/web/public/vue/{gitGraphDiagram-V2S2FVAM-OA7VyugW.js → gitGraphDiagram-V2S2FVAM-DgNNP2nj.js} +1 -1
  45. data/lib/archsight/web/public/vue/{graph-BXHAtA0S.js → graph-Cnoy0p_X.js} +1 -1
  46. data/lib/archsight/web/public/vue/{index-DsEsN0_K.js → index-Zr9MoxJi.js} +2 -2
  47. data/lib/archsight/web/public/vue/{infoDiagram-HS3SLOUP-nlVe2qgv.js → infoDiagram-HS3SLOUP-D5asL_9P.js} +1 -1
  48. data/lib/archsight/web/public/vue/{journeyDiagram-XKPGCS4Q-CtTIcKwf.js → journeyDiagram-XKPGCS4Q-D-SRalYk.js} +1 -1
  49. data/lib/archsight/web/public/vue/{kanban-definition-3W4ZIXB7-837KX0sW.js → kanban-definition-3W4ZIXB7-CuOjHa3p.js} +1 -1
  50. data/lib/archsight/web/public/vue/{layout-DtE0QdL6.js → layout-CD8FBujT.js} +1 -1
  51. data/lib/archsight/web/public/vue/{mermaid-DpPHPFQh.js → mermaid-DUllW9QE.js} +60 -60
  52. data/lib/archsight/web/public/vue/{mindmap-definition-VGOIOE7T-9gLF2AoY.js → mindmap-definition-VGOIOE7T-BfbYXGBk.js} +1 -1
  53. data/lib/archsight/web/public/vue/{pieDiagram-ADFJNKIX-CyCNgw3u.js → pieDiagram-ADFJNKIX-mb757Gpq.js} +1 -1
  54. data/lib/archsight/web/public/vue/{quadrantDiagram-AYHSOK5B-CkPh8g02.js → quadrantDiagram-AYHSOK5B-DMtvHJQW.js} +1 -1
  55. data/lib/archsight/web/public/vue/{requirementDiagram-UZGBJVZJ-Dkt6OSlY.js → requirementDiagram-UZGBJVZJ-CHguirsB.js} +1 -1
  56. data/lib/archsight/web/public/vue/{sankeyDiagram-TZEHDZUN-BqprTk8x.js → sankeyDiagram-TZEHDZUN-nblWMNF6.js} +1 -1
  57. data/lib/archsight/web/public/vue/{sequenceDiagram-WL72ISMW-CTmTe1FQ.js → sequenceDiagram-WL72ISMW-B83ZoXls.js} +1 -1
  58. data/lib/archsight/web/public/vue/{stateDiagram-FKZM4ZOC-CphqmkEU.js → stateDiagram-FKZM4ZOC-Ct0OgmPh.js} +1 -1
  59. data/lib/archsight/web/public/vue/stateDiagram-v2-4FDKWEC3-CJZXQ6xd.js +1 -0
  60. data/lib/archsight/web/public/vue/{timeline-definition-IT6M3QCI-CSQUZkyE.js → timeline-definition-IT6M3QCI-D1Wd-DLb.js} +1 -1
  61. data/lib/archsight/web/public/vue/{treemap-GDKQZRPO-DTojm7Yr.js → treemap-GDKQZRPO-DFPZrNlp.js} +1 -1
  62. data/lib/archsight/web/public/vue/{useGraphviz-A5s4h76R.js → useGraphviz-BN4iwLLN.js} +1 -1
  63. data/lib/archsight/web/public/vue/{useHighlight-C6Kb5G3l.js → useHighlight-DmGaxZxx.js} +1 -1
  64. data/lib/archsight/web/public/vue/{useMermaid-DqxTrLRB.js → useMermaid-DSo5f1Jc.js} +1 -1
  65. data/lib/archsight/web/public/vue/{usePanZoom-BybZ_rfh.js → usePanZoom-BEXq_r0S.js} +1 -1
  66. data/lib/archsight/web/public/vue/{xychartDiagram-PRI3JC2R-B1ZJZtDC.js → xychartDiagram-PRI3JC2R-i_eB4HAQ.js} +1 -1
  67. data/lib/archsight/web/public/vue.html +2 -2
  68. metadata +71 -57
  69. data/lib/archsight/web/public/vue/classDiagram-2ON5EDUG-jGlvI-Za.js +0 -1
  70. data/lib/archsight/web/public/vue/classDiagram-v2-WZHVMYZB-jGlvI-Za.js +0 -1
  71. data/lib/archsight/web/public/vue/clone-6iRPe1-W.js +0 -1
  72. data/lib/archsight/web/public/vue/stateDiagram-v2-4FDKWEC3-CxaDW5sW.js +0 -1
@@ -1,7 +1,7 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["vue/dagre-6UL2VRFP-BqkmE-LI.js","vue/graph-BXHAtA0S.js","vue/_baseUniq-BNfrOSaP.js","vue/layout-DtE0QdL6.js","vue/_basePickBy-CVgieyx-.js","vue/clone-6iRPe1-W.js","vue/cose-bilkent-S5V4N54A-CB9Zfu50.js","vue/cytoscape.esm-5J0xJHOV.js","vue/c4Diagram-YG6GDRKO-eYY3hprM.js","vue/chunk-TZMSLE5B-CgF9_37b.js","vue/flowDiagram-NV44I4VS-wuqPowTd.js","vue/chunk-FMBD7UC4-BQWOCMuR.js","vue/chunk-55IACEB6-rNtQYnu_.js","vue/chunk-QN33PNHL-DId301Kb.js","vue/erDiagram-Q2GNP2WA-BnliyziJ.js","vue/gitGraphDiagram-V2S2FVAM-OA7VyugW.js","vue/chunk-4BX2VUAB-ZoXeL4D1.js","vue/chunk-QZHKN3VN-xbY0NLgv.js","vue/treemap-GDKQZRPO-DTojm7Yr.js","vue/infoDiagram-HS3SLOUP-nlVe2qgv.js","vue/pieDiagram-ADFJNKIX-CyCNgw3u.js","vue/requirementDiagram-UZGBJVZJ-Dkt6OSlY.js","vue/sequenceDiagram-WL72ISMW-CTmTe1FQ.js","vue/classDiagram-2ON5EDUG-jGlvI-Za.js","vue/chunk-B4BG7PRW-DolAeVV9.js","vue/classDiagram-v2-WZHVMYZB-jGlvI-Za.js","vue/stateDiagram-FKZM4ZOC-CphqmkEU.js","vue/chunk-DI55MBZ5-DnN0f_hj.js","vue/stateDiagram-v2-4FDKWEC3-CxaDW5sW.js","vue/journeyDiagram-XKPGCS4Q-CtTIcKwf.js","vue/mindmap-definition-VGOIOE7T-9gLF2AoY.js","vue/kanban-definition-3W4ZIXB7-837KX0sW.js","vue/diagram-S2PKOQOG-BlXC6Cia.js","vue/diagram-QEK2KX5R-B78rOlvK.js","vue/blockDiagram-VD42YOAC-B5488Hes.js","vue/architectureDiagram-VXUJARFQ-CJXNpTr5.js","vue/diagram-PSM6KHXK-CKBfqtw3.js"])))=>i.map(i=>d[i]);
2
- const hx="modulepreload",ux=function(e){return"/"+e},uh={},_t=function(t,r,i){let n=Promise.resolve();if(r&&r.length>0){let l=function(c){return Promise.all(c.map(h=>Promise.resolve(h).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=s?.nonce||s?.getAttribute("nonce");n=l(r.map(c=>{if(c=ux(c),c in uh)return;uh[c]=!0;const h=c.endsWith(".css"),u=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const f=document.createElement("link");if(f.rel=h?"stylesheet":hx,h||(f.as="script"),f.crossOrigin="",f.href=c,o&&f.setAttribute("nonce",o),document.head.appendChild(f),h)return new Promise((d,g)=>{f.addEventListener("load",d),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return n.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})};var n3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a3(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function i(){var n=!1;try{n=this instanceof i}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),r}var fh={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},la={exports:{}},dx=la.exports,dh;function px(){return dh||(dh=1,(function(e,t){(function(r,i){e.exports=i()})(dx,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,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(T){var E=["th","st","nd","rd"],A=T%100;return"["+T+(E[(A-20)%10]||E[A]||E[0])+"]"}},_=function(T,E,A){var D=String(T);return!D||D.length>=E?T:""+Array(E+1-D.length).join(A)+T},w={s:_,z:function(T){var E=-T.utcOffset(),A=Math.abs(E),D=Math.floor(A/60),F=A%60;return(E<=0?"+":"-")+_(D,2,"0")+":"+_(F,2,"0")},m:function T(E,A){if(E.date()<A.date())return-T(A,E);var D=12*(A.year()-E.year())+(A.month()-E.month()),F=E.clone().add(D,u),U=A-F<0,W=E.clone().add(D+(U?-1:1),u);return+(-(D+(A-F)/(U?F-W:W-F))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:u,y:d,w:h,d:c,D:g,h:l,m:o,s,ms:a,Q:f}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},C="en",v={};v[C]=b;var S="$isDayjsObject",O=function(T){return T instanceof $||!(!T||!T[S])},I=function T(E,A,D){var F;if(!E)return C;if(typeof E=="string"){var U=E.toLowerCase();v[U]&&(F=U),A&&(v[U]=A,F=U);var W=E.split("-");if(!F&&W.length>1)return T(W[0])}else{var Y=E.name;v[Y]=E,F=Y}return!D&&F&&(C=F),F||!D&&C},R=function(T,E){if(O(T))return T.clone();var A=typeof E=="object"?E:{};return A.date=T,A.args=arguments,new $(A)},B=w;B.l=I,B.i=O,B.w=function(T,E){return R(T,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var $=(function(){function T(A){this.$L=I(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[S]=!0}var E=T.prototype;return E.parse=function(A){this.$d=(function(D){var F=D.date,U=D.utc;if(F===null)return new Date(NaN);if(B.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var W=F.match(y);if(W){var Y=W[2]-1||0,Q=(W[7]||"0").substring(0,3);return U?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,Q)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,Q)}}return new Date(F)})(A),this.init()},E.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},E.$utils=function(){return B},E.isValid=function(){return this.$d.toString()!==m},E.isSame=function(A,D){var F=R(A);return this.startOf(D)<=F&&F<=this.endOf(D)},E.isAfter=function(A,D){return R(A)<this.startOf(D)},E.isBefore=function(A,D){return this.endOf(D)<R(A)},E.$g=function(A,D,F){return B.u(A)?this[D]:this.set(F,A)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(A,D){var F=this,U=!!B.u(D)||D,W=B.p(A),Y=function(q,J){var ht=B.w(F.$u?Date.UTC(F.$y,J,q):new Date(F.$y,J,q),F);return U?ht:ht.endOf(c)},Q=function(q,J){return B.w(F.toDate()[q].apply(F.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(J)),F)},G=this.$W,ut=this.$M,rt=this.$D,Ct="set"+(this.$u?"UTC":"");switch(W){case d:return U?Y(1,0):Y(31,11);case u:return U?Y(1,ut):Y(0,ut+1);case h:var wt=this.$locale().weekStart||0,Mt=(G<wt?G+7:G)-wt;return Y(U?rt-Mt:rt+(6-Mt),ut);case c:case g:return Q(Ct+"Hours",0);case l:return Q(Ct+"Minutes",1);case o:return Q(Ct+"Seconds",2);case s:return Q(Ct+"Milliseconds",3);default:return this.clone()}},E.endOf=function(A){return this.startOf(A,!1)},E.$set=function(A,D){var F,U=B.p(A),W="set"+(this.$u?"UTC":""),Y=(F={},F[c]=W+"Date",F[g]=W+"Date",F[u]=W+"Month",F[d]=W+"FullYear",F[l]=W+"Hours",F[o]=W+"Minutes",F[s]=W+"Seconds",F[a]=W+"Milliseconds",F)[U],Q=U===c?this.$D+(D-this.$W):D;if(U===u||U===d){var G=this.clone().set(g,1);G.$d[Y](Q),G.init(),this.$d=G.set(g,Math.min(this.$D,G.daysInMonth())).$d}else Y&&this.$d[Y](Q);return this.init(),this},E.set=function(A,D){return this.clone().$set(A,D)},E.get=function(A){return this[B.p(A)]()},E.add=function(A,D){var F,U=this;A=Number(A);var W=B.p(D),Y=function(ut){var rt=R(U);return B.w(rt.date(rt.date()+Math.round(ut*A)),U)};if(W===u)return this.set(u,this.$M+A);if(W===d)return this.set(d,this.$y+A);if(W===c)return Y(1);if(W===h)return Y(7);var Q=(F={},F[o]=i,F[l]=n,F[s]=r,F)[W]||1,G=this.$d.getTime()+A*Q;return B.w(G,this)},E.subtract=function(A,D){return this.add(-1*A,D)},E.format=function(A){var D=this,F=this.$locale();if(!this.isValid())return F.invalidDate||m;var U=A||"YYYY-MM-DDTHH:mm:ssZ",W=B.z(this),Y=this.$H,Q=this.$m,G=this.$M,ut=F.weekdays,rt=F.months,Ct=F.meridiem,wt=function(J,ht,N,vt){return J&&(J[ht]||J(D,U))||N[ht].slice(0,vt)},Mt=function(J){return B.s(Y%12||12,J,"0")},q=Ct||function(J,ht,N){var vt=J<12?"AM":"PM";return N?vt.toLowerCase():vt};return U.replace(x,(function(J,ht){return ht||(function(N){switch(N){case"YY":return String(D.$y).slice(-2);case"YYYY":return B.s(D.$y,4,"0");case"M":return G+1;case"MM":return B.s(G+1,2,"0");case"MMM":return wt(F.monthsShort,G,rt,3);case"MMMM":return wt(rt,G);case"D":return D.$D;case"DD":return B.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return wt(F.weekdaysMin,D.$W,ut,2);case"ddd":return wt(F.weekdaysShort,D.$W,ut,3);case"dddd":return ut[D.$W];case"H":return String(Y);case"HH":return B.s(Y,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return q(Y,Q,!0);case"A":return q(Y,Q,!1);case"m":return String(Q);case"mm":return B.s(Q,2,"0");case"s":return String(D.$s);case"ss":return B.s(D.$s,2,"0");case"SSS":return B.s(D.$ms,3,"0");case"Z":return W}return null})(J)||W.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(A,D,F){var U,W=this,Y=B.p(D),Q=R(A),G=(Q.utcOffset()-this.utcOffset())*i,ut=this-Q,rt=function(){return B.m(W,Q)};switch(Y){case d:U=rt()/12;break;case u:U=rt();break;case f:U=rt()/3;break;case h:U=(ut-G)/6048e5;break;case c:U=(ut-G)/864e5;break;case l:U=ut/n;break;case o:U=ut/i;break;case s:U=ut/r;break;default:U=ut}return F?U:B.a(U)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return v[this.$L]},E.locale=function(A,D){if(!A)return this.$L;var F=this.clone(),U=I(A,D,!0);return U&&(F.$L=U),F},E.clone=function(){return B.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},T})(),L=$.prototype;return R.prototype=L,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach((function(T){L[T[1]]=function(E){return this.$g(E,T[0],T[1])}})),R.extend=function(T,E){return T.$i||(T(E,$,R),T.$i=!0),R},R.locale=I,R.isDayjs=O,R.unix=function(T){return R(1e3*T)},R.en=v[C],R.Ls=v,R.p={},R}))})(la)),la.exports}var gx=px();const mx=fx(gx);var gf=Object.defineProperty,p=(e,t)=>gf(e,"name",{value:t,configurable:!0}),yx=(e,t)=>{for(var r in t)gf(e,r,{get:t[r],enumerable:!0})},je={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Wl=p(function(e="fatal"){let t=je.fatal;typeof e=="string"?e.toLowerCase()in je&&(t=je[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=je.fatal&&(P.fatal=console.error?console.error.bind(console,de("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",de("FATAL"))),t<=je.error&&(P.error=console.error?console.error.bind(console,de("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",de("ERROR"))),t<=je.warn&&(P.warn=console.warn?console.warn.bind(console,de("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",de("WARN"))),t<=je.info&&(P.info=console.info?console.info.bind(console,de("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",de("INFO"))),t<=je.debug&&(P.debug=console.debug?console.debug.bind(console,de("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("DEBUG"))),t<=je.trace&&(P.trace=console.debug?console.debug.bind(console,de("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("TRACE")))},"setLogLevel"),de=p(e=>`%c${mx().format("ss.SSS")} : ${e} : `,"format");const ca={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 n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return ca.hue2rgb(a,n,e+1/3)*255;case"g":return ca.hue2rgb(a,n,e)*255;case"b":return ca.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;const o=n-a,l=s>.5?o/(2-n-a):o/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},xx={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},bx={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ct={channel:ca,lang:xx,unit:bx},sr={};for(let e=0;e<=255;e++)sr[e]=ct.unit.dec2hex(e);const Yt={ALL:0,RGB:1,HSL:2};class _x{constructor(){this.type=Yt.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=Yt.ALL}is(t){return this.type===t}}class wx{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new _x}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Yt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=ct.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ct.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=ct.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=ct.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ct.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=ct.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),ct.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),ct.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),ct.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),ct.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),ct.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),ct.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Yt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Yt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Yt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Yt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Yt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Yt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const _s=new wx({r:0,g:0,b:0,a:0},"transparent"),ai={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ai.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return _s.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${sr[Math.round(t)]}${sr[Math.round(r)]}${sr[Math.round(i)]}${sr[Math.round(n*255)]}`:`#${sr[Math.round(t)]}${sr[Math.round(r)]}${sr[Math.round(i)]}`}},vr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(vr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ct.channel.clamp.h(parseFloat(r)*.9);case"rad":return ct.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ct.channel.clamp.h(parseFloat(r)*360)}}return ct.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(vr.re);if(!r)return;const[,i,n,a,s,o]=r;return _s.set({h:vr._hue2deg(i),s:ct.channel.clamp.s(parseFloat(n)),l:ct.channel.clamp.l(parseFloat(a)),a:s?ct.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${ct.lang.round(t)}, ${ct.lang.round(r)}%, ${ct.lang.round(i)}%, ${n})`:`hsl(${ct.lang.round(t)}, ${ct.lang.round(r)}%, ${ct.lang.round(i)}%)`}},cn={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=cn.colors[e];if(t)return ai.parse(t)},stringify:e=>{const t=ai.stringify(e);for(const r in cn.colors)if(cn.colors[r]===t)return r}},Ji={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(Ji.re);if(!r)return;const[,i,n,a,s,o,l,c,h]=r;return _s.set({r:ct.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ct.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:ct.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?ct.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${ct.lang.round(t)}, ${ct.lang.round(r)}, ${ct.lang.round(i)}, ${ct.lang.round(n)})`:`rgb(${ct.lang.round(t)}, ${ct.lang.round(r)}, ${ct.lang.round(i)})`}},Te={format:{keyword:cn,hex:ai,rgb:Ji,rgba:Ji,hsl:vr,hsla:vr},parse:e=>{if(typeof e!="string")return e;const t=ai.parse(e)||Ji.parse(e)||vr.parse(e)||cn.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Yt.HSL)||e.data.r===void 0?vr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ji.stringify(e):ai.stringify(e)},mf=(e,t)=>{const r=Te.parse(e);for(const i in t)r[i]=ct.channel.clamp[i](t[i]);return Te.stringify(r)},hn=(e,t,r=0,i=1)=>{if(typeof e!="number")return mf(e,{a:t});const n=_s.set({r:ct.channel.clamp.r(e),g:ct.channel.clamp.g(t),b:ct.channel.clamp.b(r),a:ct.channel.clamp.a(i)});return Te.stringify(n)},s3=(e,t)=>ct.lang.round(Te.parse(e)[t]),Cx=e=>{const{r:t,g:r,b:i}=Te.parse(e),n=.2126*ct.channel.toLinear(t)+.7152*ct.channel.toLinear(r)+.0722*ct.channel.toLinear(i);return ct.lang.round(n)},vx=e=>Cx(e)>=.5,Ln=e=>!vx(e),yf=(e,t,r)=>{const i=Te.parse(e),n=i[t],a=ct.channel.clamp[t](n+r);return n!==a&&(i[t]=a),Te.stringify(i)},V=(e,t)=>yf(e,"l",t),at=(e,t)=>yf(e,"l",-t),M=(e,t)=>{const r=Te.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return mf(e,i)},kx=(e,t,r=50)=>{const{r:i,g:n,b:a,a:s}=Te.parse(e),{r:o,g:l,b:c,a:h}=Te.parse(t),u=r/100,f=u*2-1,d=s-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+o*y,b=n*m+l*y,_=a*m+c*y,w=s*u+h*(1-u);return hn(x,b,_,w)},H=(e,t=100)=>{const r=Te.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,kx(r,e,t)};const{entries:xf,setPrototypeOf:ph,isFrozen:Sx,getPrototypeOf:Tx,getOwnPropertyDescriptor:Mx}=Object;let{freeze:ne,seal:ge,create:ha}=Object,{apply:Po,construct:No}=typeof Reflect<"u"&&Reflect;ne||(ne=function(t){return t});ge||(ge=function(t){return t});Po||(Po=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return t.apply(r,n)});No||(No=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const Yn=ae(Array.prototype.forEach),Ax=ae(Array.prototype.lastIndexOf),gh=ae(Array.prototype.pop),Ii=ae(Array.prototype.push),Lx=ae(Array.prototype.splice),ua=ae(String.prototype.toLowerCase),ao=ae(String.prototype.toString),so=ae(String.prototype.match),Pi=ae(String.prototype.replace),Bx=ae(String.prototype.indexOf),Ex=ae(String.prototype.trim),ue=ae(Object.prototype.hasOwnProperty),te=ae(RegExp.prototype.test),Ni=$x(TypeError);function ae(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Po(e,t,i)}}function $x(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return No(e,r)}}function ft(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ua;ph&&ph(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(Sx(t)||(t[i]=a),n=a)}e[n]=!0}return e}function Fx(e){for(let t=0;t<e.length;t++)ue(e,t)||(e[t]=null);return e}function $e(e){const t=ha(null);for(const[r,i]of xf(e))ue(e,r)&&(Array.isArray(i)?t[r]=Fx(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=$e(i):t[r]=i);return t}function zi(e,t){for(;e!==null;){const i=Mx(e,t);if(i){if(i.get)return ae(i.get);if(typeof i.value=="function")return ae(i.value)}e=Tx(e)}function r(){return null}return r}const mh=ne(["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"]),oo=ne(["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"]),lo=ne(["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"]),Dx=ne(["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"]),co=ne(["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"]),Ox=ne(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),yh=ne(["#text"]),xh=ne(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","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","slot"]),ho=ne(["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"]),bh=ne(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gn=ne(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rx=ge(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ix=ge(/<%[\w\W]*|[\w\W]*%>/gm),Px=ge(/\$\{[\w\W]*/gm),Nx=ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),zx=ge(/^aria-[\-\w]+$/),bf=ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wx=ge(/^(?:\w+script|data):/i),qx=ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_f=ge(/^html$/i),Hx=ge(/^[a-z][.\w]*(-[.\w]+)+$/i);var _h=Object.freeze({__proto__:null,ARIA_ATTR:zx,ATTR_WHITESPACE:qx,CUSTOM_ELEMENT:Hx,DATA_ATTR:Nx,DOCTYPE_NAME:_f,ERB_EXPR:Ix,IS_ALLOWED_URI:bf,IS_SCRIPT_OR_DATA:Wx,MUSTACHE_EXPR:Rx,TMPLIT_EXPR:Px});const Wi={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ux=function(){return typeof window>"u"?null:window},jx=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},wh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function wf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ux();const t=nt=>wf(nt);if(t.version="3.3.2",t.removed=[],!e||!e.document||e.document.nodeType!==Wi.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=l.prototype,m=zi(g,"cloneNode"),y=zi(g,"remove"),x=zi(g,"nextSibling"),b=zi(g,"childNodes"),_=zi(g,"parentNode");if(typeof s=="function"){const nt=r.createElement("template");nt.content&&nt.content.ownerDocument&&(r=nt.content.ownerDocument)}let w,C="";const{implementation:v,createNodeIterator:S,createDocumentFragment:O,getElementsByTagName:I}=r,{importNode:R}=i;let B=wh();t.isSupported=typeof xf=="function"&&typeof _=="function"&&v&&v.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:$,ERB_EXPR:L,TMPLIT_EXPR:T,DATA_ATTR:E,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:U}=_h;let{IS_ALLOWED_URI:W}=_h,Y=null;const Q=ft({},[...mh,...oo,...lo,...co,...yh]);let G=null;const ut=ft({},[...xh,...ho,...bh,...Gn]);let rt=Object.seal(ha(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}})),Ct=null,wt=null;const Mt=Object.seal(ha(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let q=!0,J=!0,ht=!1,N=!0,vt=!1,yt=!0,At=!1,zt=!1,xe=!1,We=!1,zn=!1,Wn=!1,Vc=!0,Xc=!1;const rx="user-content-";let Ks=!0,Oi=!1,Gr={},Ae=null;const Qs=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zc=null;const Kc=ft({},["audio","video","img","source","image","track"]);let Js=null;const Qc=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qn="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Vr=qe,to=!1,eo=null;const ix=ft({},[qn,Hn,qe],ao);let Un=ft({},["mi","mo","mn","ms","mtext"]),jn=ft({},["annotation-xml"]);const nx=ft({},["title","style","font","a","script"]);let Ri=null;const ax=["application/xhtml+xml","text/html"],sx="text/html";let Ft=null,Xr=null;const ox=r.createElement("form"),Jc=function(k){return k instanceof RegExp||k instanceof Function},ro=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Xr&&Xr===k)){if((!k||typeof k!="object")&&(k={}),k=$e(k),Ri=ax.indexOf(k.PARSER_MEDIA_TYPE)===-1?sx:k.PARSER_MEDIA_TYPE,Ft=Ri==="application/xhtml+xml"?ao:ua,Y=ue(k,"ALLOWED_TAGS")?ft({},k.ALLOWED_TAGS,Ft):Q,G=ue(k,"ALLOWED_ATTR")?ft({},k.ALLOWED_ATTR,Ft):ut,eo=ue(k,"ALLOWED_NAMESPACES")?ft({},k.ALLOWED_NAMESPACES,ao):ix,Js=ue(k,"ADD_URI_SAFE_ATTR")?ft($e(Qc),k.ADD_URI_SAFE_ATTR,Ft):Qc,Zc=ue(k,"ADD_DATA_URI_TAGS")?ft($e(Kc),k.ADD_DATA_URI_TAGS,Ft):Kc,Ae=ue(k,"FORBID_CONTENTS")?ft({},k.FORBID_CONTENTS,Ft):Qs,Ct=ue(k,"FORBID_TAGS")?ft({},k.FORBID_TAGS,Ft):$e({}),wt=ue(k,"FORBID_ATTR")?ft({},k.FORBID_ATTR,Ft):$e({}),Gr=ue(k,"USE_PROFILES")?k.USE_PROFILES:!1,q=k.ALLOW_ARIA_ATTR!==!1,J=k.ALLOW_DATA_ATTR!==!1,ht=k.ALLOW_UNKNOWN_PROTOCOLS||!1,N=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,vt=k.SAFE_FOR_TEMPLATES||!1,yt=k.SAFE_FOR_XML!==!1,At=k.WHOLE_DOCUMENT||!1,We=k.RETURN_DOM||!1,zn=k.RETURN_DOM_FRAGMENT||!1,Wn=k.RETURN_TRUSTED_TYPE||!1,xe=k.FORCE_BODY||!1,Vc=k.SANITIZE_DOM!==!1,Xc=k.SANITIZE_NAMED_PROPS||!1,Ks=k.KEEP_CONTENT!==!1,Oi=k.IN_PLACE||!1,W=k.ALLOWED_URI_REGEXP||bf,Vr=k.NAMESPACE||qe,Un=k.MATHML_TEXT_INTEGRATION_POINTS||Un,jn=k.HTML_INTEGRATION_POINTS||jn,rt=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&Jc(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(rt.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&Jc(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(rt.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(rt.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),vt&&(J=!1),zn&&(We=!0),Gr&&(Y=ft({},yh),G=ha(null),Gr.html===!0&&(ft(Y,mh),ft(G,xh)),Gr.svg===!0&&(ft(Y,oo),ft(G,ho),ft(G,Gn)),Gr.svgFilters===!0&&(ft(Y,lo),ft(G,ho),ft(G,Gn)),Gr.mathMl===!0&&(ft(Y,co),ft(G,bh),ft(G,Gn))),ue(k,"ADD_TAGS")||(Mt.tagCheck=null),ue(k,"ADD_ATTR")||(Mt.attributeCheck=null),k.ADD_TAGS&&(typeof k.ADD_TAGS=="function"?Mt.tagCheck=k.ADD_TAGS:(Y===Q&&(Y=$e(Y)),ft(Y,k.ADD_TAGS,Ft))),k.ADD_ATTR&&(typeof k.ADD_ATTR=="function"?Mt.attributeCheck=k.ADD_ATTR:(G===ut&&(G=$e(G)),ft(G,k.ADD_ATTR,Ft))),k.ADD_URI_SAFE_ATTR&&ft(Js,k.ADD_URI_SAFE_ATTR,Ft),k.FORBID_CONTENTS&&(Ae===Qs&&(Ae=$e(Ae)),ft(Ae,k.FORBID_CONTENTS,Ft)),k.ADD_FORBID_CONTENTS&&(Ae===Qs&&(Ae=$e(Ae)),ft(Ae,k.ADD_FORBID_CONTENTS,Ft)),Ks&&(Y["#text"]=!0),At&&ft(Y,["html","head","body"]),Y.table&&(ft(Y,["tbody"]),delete Ct.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ni('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ni('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=k.TRUSTED_TYPES_POLICY,C=w.createHTML("")}else w===void 0&&(w=jx(d,n)),w!==null&&typeof C=="string"&&(C=w.createHTML(""));ne&&ne(k),Xr=k}},th=ft({},[...oo,...lo,...Dx]),eh=ft({},[...co,...Ox]),lx=function(k){let z=_(k);(!z||!z.tagName)&&(z={namespaceURI:Vr,tagName:"template"});const et=ua(k.tagName),St=ua(z.tagName);return eo[k.namespaceURI]?k.namespaceURI===Hn?z.namespaceURI===qe?et==="svg":z.namespaceURI===qn?et==="svg"&&(St==="annotation-xml"||Un[St]):!!th[et]:k.namespaceURI===qn?z.namespaceURI===qe?et==="math":z.namespaceURI===Hn?et==="math"&&jn[St]:!!eh[et]:k.namespaceURI===qe?z.namespaceURI===Hn&&!jn[St]||z.namespaceURI===qn&&!Un[St]?!1:!eh[et]&&(nx[et]||!th[et]):!!(Ri==="application/xhtml+xml"&&eo[k.namespaceURI]):!1},Le=function(k){Ii(t.removed,{element:k});try{_(k).removeChild(k)}catch{y(k)}},yr=function(k,z){try{Ii(t.removed,{attribute:z.getAttributeNode(k),from:z})}catch{Ii(t.removed,{attribute:null,from:z})}if(z.removeAttribute(k),k==="is")if(We||zn)try{Le(z)}catch{}else try{z.setAttribute(k,"")}catch{}},rh=function(k){let z=null,et=null;if(xe)k="<remove></remove>"+k;else{const Et=so(k,/^[\r\n\t ]+/);et=Et&&Et[0]}Ri==="application/xhtml+xml"&&Vr===qe&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const St=w?w.createHTML(k):k;if(Vr===qe)try{z=new f().parseFromString(St,Ri)}catch{}if(!z||!z.documentElement){z=v.createDocument(Vr,"template",null);try{z.documentElement.innerHTML=to?C:St}catch{}}const Ut=z.body||z.documentElement;return k&&et&&Ut.insertBefore(r.createTextNode(et),Ut.childNodes[0]||null),Vr===qe?I.call(z,At?"html":"body")[0]:At?z.documentElement:Ut},ih=function(k){return S.call(k.ownerDocument||k,k,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},io=function(k){return k instanceof u&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof h)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},nh=function(k){return typeof o=="function"&&k instanceof o};function He(nt,k,z){Yn(nt,et=>{et.call(t,k,z,Xr)})}const ah=function(k){let z=null;if(He(B.beforeSanitizeElements,k,null),io(k))return Le(k),!0;const et=Ft(k.nodeName);if(He(B.uponSanitizeElement,k,{tagName:et,allowedTags:Y}),yt&&k.hasChildNodes()&&!nh(k.firstElementChild)&&te(/<[/\w!]/g,k.innerHTML)&&te(/<[/\w!]/g,k.textContent)||k.nodeType===Wi.progressingInstruction||yt&&k.nodeType===Wi.comment&&te(/<[/\w]/g,k.data))return Le(k),!0;if(!(Mt.tagCheck instanceof Function&&Mt.tagCheck(et))&&(!Y[et]||Ct[et])){if(!Ct[et]&&oh(et)&&(rt.tagNameCheck instanceof RegExp&&te(rt.tagNameCheck,et)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(et)))return!1;if(Ks&&!Ae[et]){const St=_(k)||k.parentNode,Ut=b(k)||k.childNodes;if(Ut&&St){const Et=Ut.length;for(let se=Et-1;se>=0;--se){const Ue=m(Ut[se],!0);Ue.__removalCount=(k.__removalCount||0)+1,St.insertBefore(Ue,x(k))}}}return Le(k),!0}return k instanceof l&&!lx(k)||(et==="noscript"||et==="noembed"||et==="noframes")&&te(/<\/no(script|embed|frames)/i,k.innerHTML)?(Le(k),!0):(vt&&k.nodeType===Wi.text&&(z=k.textContent,Yn([$,L,T],St=>{z=Pi(z,St," ")}),k.textContent!==z&&(Ii(t.removed,{element:k.cloneNode()}),k.textContent=z)),He(B.afterSanitizeElements,k,null),!1)},sh=function(k,z,et){if(wt[z]||Vc&&(z==="id"||z==="name")&&(et in r||et in ox))return!1;if(!(J&&!wt[z]&&te(E,z))){if(!(q&&te(A,z))){if(!(Mt.attributeCheck instanceof Function&&Mt.attributeCheck(z,k))){if(!G[z]||wt[z]){if(!(oh(k)&&(rt.tagNameCheck instanceof RegExp&&te(rt.tagNameCheck,k)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(k))&&(rt.attributeNameCheck instanceof RegExp&&te(rt.attributeNameCheck,z)||rt.attributeNameCheck instanceof Function&&rt.attributeNameCheck(z,k))||z==="is"&&rt.allowCustomizedBuiltInElements&&(rt.tagNameCheck instanceof RegExp&&te(rt.tagNameCheck,et)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(et))))return!1}else if(!Js[z]){if(!te(W,Pi(et,F,""))){if(!((z==="src"||z==="xlink:href"||z==="href")&&k!=="script"&&Bx(et,"data:")===0&&Zc[k])){if(!(ht&&!te(D,Pi(et,F,"")))){if(et)return!1}}}}}}}return!0},oh=function(k){return k!=="annotation-xml"&&so(k,U)},lh=function(k){He(B.beforeSanitizeAttributes,k,null);const{attributes:z}=k;if(!z||io(k))return;const et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let St=z.length;for(;St--;){const Ut=z[St],{name:Et,namespaceURI:se,value:Ue}=Ut,Zr=Ft(Et),no=Ue;let Wt=Et==="value"?no:Ex(no);if(et.attrName=Zr,et.attrValue=Wt,et.keepAttr=!0,et.forceKeepAttr=void 0,He(B.uponSanitizeAttribute,k,et),Wt=et.attrValue,Xc&&(Zr==="id"||Zr==="name")&&(yr(Et,k),Wt=rx+Wt),yt&&te(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Wt)){yr(Et,k);continue}if(Zr==="attributename"&&so(Wt,"href")){yr(Et,k);continue}if(et.forceKeepAttr)continue;if(!et.keepAttr){yr(Et,k);continue}if(!N&&te(/\/>/i,Wt)){yr(Et,k);continue}vt&&Yn([$,L,T],hh=>{Wt=Pi(Wt,hh," ")});const ch=Ft(k.nodeName);if(!sh(ch,Zr,Wt)){yr(Et,k);continue}if(w&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!se)switch(d.getAttributeType(ch,Zr)){case"TrustedHTML":{Wt=w.createHTML(Wt);break}case"TrustedScriptURL":{Wt=w.createScriptURL(Wt);break}}if(Wt!==no)try{se?k.setAttributeNS(se,Et,Wt):k.setAttribute(Et,Wt),io(k)?Le(k):gh(t.removed)}catch{yr(Et,k)}}He(B.afterSanitizeAttributes,k,null)},cx=function nt(k){let z=null;const et=ih(k);for(He(B.beforeSanitizeShadowDOM,k,null);z=et.nextNode();)He(B.uponSanitizeShadowNode,z,null),ah(z),lh(z),z.content instanceof a&&nt(z.content);He(B.afterSanitizeShadowDOM,k,null)};return t.sanitize=function(nt){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,et=null,St=null,Ut=null;if(to=!nt,to&&(nt="<!-->"),typeof nt!="string"&&!nh(nt))if(typeof nt.toString=="function"){if(nt=nt.toString(),typeof nt!="string")throw Ni("dirty is not a string, aborting")}else throw Ni("toString is not a function");if(!t.isSupported)return nt;if(zt||ro(k),t.removed=[],typeof nt=="string"&&(Oi=!1),Oi){if(nt.nodeName){const Ue=Ft(nt.nodeName);if(!Y[Ue]||Ct[Ue])throw Ni("root node is forbidden and cannot be sanitized in-place")}}else if(nt instanceof o)z=rh("<!---->"),et=z.ownerDocument.importNode(nt,!0),et.nodeType===Wi.element&&et.nodeName==="BODY"||et.nodeName==="HTML"?z=et:z.appendChild(et);else{if(!We&&!vt&&!At&&nt.indexOf("<")===-1)return w&&Wn?w.createHTML(nt):nt;if(z=rh(nt),!z)return We?null:Wn?C:""}z&&xe&&Le(z.firstChild);const Et=ih(Oi?nt:z);for(;St=Et.nextNode();)ah(St),lh(St),St.content instanceof a&&cx(St.content);if(Oi)return nt;if(We){if(zn)for(Ut=O.call(z.ownerDocument);z.firstChild;)Ut.appendChild(z.firstChild);else Ut=z;return(G.shadowroot||G.shadowrootmode)&&(Ut=R.call(i,Ut,!0)),Ut}let se=At?z.outerHTML:z.innerHTML;return At&&Y["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&te(_f,z.ownerDocument.doctype.name)&&(se="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
3
- `+se),vt&&Yn([$,L,T],Ue=>{se=Pi(se,Ue," ")}),w&&Wn?w.createHTML(se):se},t.setConfig=function(){let nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ro(nt),zt=!0},t.clearConfig=function(){Xr=null,zt=!1},t.isValidAttribute=function(nt,k,z){Xr||ro({});const et=Ft(nt),St=Ft(k);return sh(et,St,z)},t.addHook=function(nt,k){typeof k=="function"&&Ii(B[nt],k)},t.removeHook=function(nt,k){if(k!==void 0){const z=Ax(B[nt],k);return z===-1?void 0:Lx(B[nt],z,1)[0]}return gh(B[nt])},t.removeHooks=function(nt){B[nt]=[]},t.removeAllHooks=function(){B=wh()},t}var yi=wf(),Cf=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,un=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Yx=/\s*%%.*\n/gm,ci,vf=(ci=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(ci,"UnknownDiagramError"),ci),Br={},ql=p(function(e,t){e=e.replace(Cf,"").replace(un,"").replace(Yx,`
4
- `);for(const[r,{detector:i}]of Object.entries(Br))if(i(e,t))return r;throw new vf(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),zo=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)kf(t,r,i)},"registerLazyLoadedDiagrams"),kf=p((e,t,r)=>{Br[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),Br[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Gx=p(e=>Br[e].loader,"getDiagramLoader"),Wo=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Wo(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Wo(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ot=Wo,ws="#ffffff",Cs="#f2f2f2",ee=p((e,t)=>t?M(e,{s:-40,l:10}):M(e,{s:-40,l:-10}),"mkBorder"),hi,Vx=(hi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||H(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||H(this.tertiaryColor),this.lineColor=this.lineColor||H(this.background),this.arrowheadColor=this.arrowheadColor||H(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?at(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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||H(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||V(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||at(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,10)):(this.rowOdd=this.rowOdd||V(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||V(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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=at(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=at(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||H(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||V(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||at(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||M(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||M(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(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||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(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.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?V(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?at(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||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(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||ws,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Cs}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(hi,"Theme"),hi),Xx=p(e=>{const t=new Vx;return t.calculate(e),t},"getThemeVariables"),ui,Zx=(ui=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=V(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=V(H("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=hn(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=at("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=at(this.sectionBkgColor,10),this.taskBorderColor=hn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=hn(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||V(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=V(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=V(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=V(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||H(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||V(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||M(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||M(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?V(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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?at(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=V(this.secondaryColor,20),this.git1=V(this.pie2||this.secondaryColor,20),this.git2=V(this.pie3||this.tertiaryColor,20),this.git3=V(this.pie4||M(this.primaryColor,{h:-30}),20),this.git4=V(this.pie5||M(this.primaryColor,{h:-60}),20),this.git5=V(this.pie6||M(this.primaryColor,{h:-90}),10),this.git6=V(this.pie7||M(this.primaryColor,{h:60}),10),this.git7=V(this.pie8||M(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||V(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||V(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(ui,"Theme"),ui),Kx=p(e=>{const t=new Zx;return t.calculate(e),t},"getThemeVariables"),fi,Qx=(fi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=M(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=hn(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=at(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||at(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||M(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||M(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||M(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||H(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||H(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=V(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||V(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||V(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||M(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-30}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||M(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?V(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||at(H(this.git0),25),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ws,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Cs}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(fi,"Theme"),fi),Jx=p(e=>{const t=new Qx;return t.calculate(e),t},"getThemeVariables"),di,tb=(di=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=V("#cde498",10),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.primaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=at(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=at(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||at(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||M(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||M(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||M(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||V(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||V(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(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||M(this.primaryColor,{l:-30}),this.pie5=this.pie5||M(this.secondaryColor,{l:-30}),this.pie6=this.pie6||M(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?V(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ws,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Cs}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(di,"Theme"),di),eb=p(e=>{const t=new tb;return t.calculate(e),t},"getThemeVariables"),pi,rb=(pi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=V(this.contrast,55),this.background="#ffffff",this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.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.rowOdd=this.rowOdd||V(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=V(this.contrast,55),this.border2=this.contrast,this.actorBorder=V(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||H(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||V(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||at(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||M(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||M(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=V(this.contrast,30),this.sectionBkgColor2=V(this.contrast,30),this.taskBorderColor=at(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=V(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=at(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ln(this.quadrant1Fill)?V(this.quadrant1Fill):at(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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=at(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||M(this.primaryColor,{h:-30}),this.git4=this.pie5||M(this.primaryColor,{h:-60}),this.git5=this.pie6||M(this.primaryColor,{h:-90}),this.git6=this.pie7||M(this.primaryColor,{h:60}),this.git7=this.pie8||M(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ws,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Cs}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(pi,"Theme"),pi),ib=p(e=>{const t=new rb;return t.calculate(e),t},"getThemeVariables"),Qe={base:{getThemeVariables:Xx},dark:{getThemeVariables:Kx},default:{getThemeVariables:Jx},forest:{getThemeVariables:eb},neutral:{getThemeVariables:ib}},Be={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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},Sf={...Be,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Qe.default.getThemeVariables(),sequence:{...Be.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},gantt:{...Be.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Be.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Be.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:{...Be.pie,useWidth:984},xyChart:{...Be.xyChart,useWidth:void 0},requirement:{...Be.requirement,useWidth:void 0},packet:{...Be.packet},radar:{...Be.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Tf=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Tf(e[i],"")]:[...r,t+i],[]),"keyify"),nb=new Set(Tf(Sf,"")),Mf=Sf,Ma=p(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ma(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!nb.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){P.debug("sanitizing object",t),Ma(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=ab(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),ab=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"),xi=Object.freeze(Mf),le=Ot({},xi),Aa,Er=[],fn=Ot({},xi),vs=p((e,t)=>{let r=Ot({},e),i={};for(const n of t)Bf(n),i=Ot(i,n);if(r=Ot(r,i),i.theme&&i.theme in Qe){const n=Ot({},Aa),a=Ot(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Qe&&(r.themeVariables=Qe[r.theme].getThemeVariables(a))}return fn=r,Ef(fn),fn},"updateCurrentConfig"),sb=p(e=>(le=Ot({},xi),le=Ot(le,e),e.theme&&Qe[e.theme]&&(le.themeVariables=Qe[e.theme].getThemeVariables(e.themeVariables)),vs(le,Er),le),"setSiteConfig"),ob=p(e=>{Aa=Ot({},e)},"saveConfigFromInitialize"),lb=p(e=>(le=Ot(le,e),vs(le,Er),le),"updateSiteConfig"),Af=p(()=>Ot({},le),"getSiteConfig"),Lf=p(e=>(Ef(e),Ot(fn,e),Zt()),"setConfig"),Zt=p(()=>Ot({},fn),"getConfig"),Bf=p(e=>{e&&(["secure",...le.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.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"&&Bf(e[t])}))},"sanitize"),cb=p(e=>{Ma(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Er.push(e),vs(le,Er)},"addDirective"),La=p((e=le)=>{Er=[],vs(e,Er)},"reset"),hb={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ch={},ub=p(e=>{Ch[e]||(P.warn(hb[e]),Ch[e]=!0)},"issueWarning"),Ef=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ub("LAZY_LOAD_DEPRECATED")},"checkConfig"),o3=p(()=>{let e={};Aa&&(e=Ot(e,Aa));for(const t of Er)e=Ot(e,t);return e},"getUserDefinedConfig"),Bn=/<br\s*\/?>/gi,fb=p(e=>e?Df(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),db=(()=>{let e=!1;return()=>{e||($f(),e=!0)}})();function $f(){const e="data-temp-href-target";yi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),yi.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($f,"setupDompurifyHooks");var Ff=p(e=>(db(),yi.sanitize(e)),"removeScript"),vh=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Ff(e):r!=="loose"&&(e=Df(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=yb(e))}return e},"sanitizeMore"),me=p((e,t)=>e&&(t.dompurifyConfig?e=yi.sanitize(vh(e,t),t.dompurifyConfig).toString():e=yi.sanitize(vh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),pb=p((e,t)=>typeof e=="string"?me(e,t):e.flat().map(r=>me(r,t)),"sanitizeTextOrArray"),gb=p(e=>Bn.test(e),"hasBreaks"),mb=p(e=>e.split(Bn),"splitBreaks"),yb=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Df=p(e=>e.replace(Bn,"#br#"),"breakToPlaceholder"),xb=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"),It=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),bb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),_b=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),kh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],s=t[i+1];wb(a,s)&&(n=a+","+s,i++,r.pop())}r.push(Cb(n))}return r.join("")},"parseGenericTypes"),qo=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),wb=p((e,t)=>{const r=qo(e,"~"),i=qo(t,"~");return r===1&&i===1},"shouldCombineSets"),Cb=p(e=>{const t=qo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Sh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ho=/\$\$(.*)\$\$/g,bi=p(e=>(e.match(Ho)?.length??0)>0,"hasKatex"),l3=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Hl(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),vb=p(async(e,t)=>{if(!bi(e))return e;if(!(Sh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ho,"MathML is unsupported in this environment.");{const{default:r}=await _t(async()=>{const{default:n}=await import("./katex-C-M49wc6.js");return{default:n}},[]),i=t.forceLegacyMathML||!Sh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Bn).map(n=>bi(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Ho,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Hl=p(async(e,t)=>me(await vb(e,t),t),"renderKatexSanitized"),Li={getRows:fb,sanitizeText:me,sanitizeTextOrArray:pb,hasBreaks:gb,splitBreaks:mb,lineBreakRegex:Bn,removeScript:Ff,getUrl:xb,evaluate:It,getMax:bb,getMin:_b},kb=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Sb=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"),Of=p(function(e,t,r,i){const n=Sb(t,r,i);kb(e,n)},"configureSvgSize"),Tb=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,s=n.height;P.info(`SVG bounds: ${a}x${s}`,n);let o=0,l=0;P.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,P.info(`Calculated bounds: ${o}x${l}`),Of(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),fa={},Mb=p((e,t,r)=>{let i="";return e in fa&&fa[e]?i=fa[e](r):P.warn(`No theme found for ${e}`),` & {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["vue/dagre-6UL2VRFP-D13da1qu.js","vue/graph-Cnoy0p_X.js","vue/_baseUniq-C8pAAASt.js","vue/layout-CD8FBujT.js","vue/_basePickBy-DXGWsL9H.js","vue/clone-B6uzD5eH.js","vue/cose-bilkent-S5V4N54A-CfkQxn-a.js","vue/cytoscape.esm-5J0xJHOV.js","vue/c4Diagram-YG6GDRKO-QzXboDJ8.js","vue/chunk-TZMSLE5B-DfX4VDWu.js","vue/flowDiagram-NV44I4VS-DpRd5cPP.js","vue/chunk-FMBD7UC4-BlBtfKnL.js","vue/chunk-55IACEB6-Dd5Z8Bov.js","vue/chunk-QN33PNHL-Db3REDIz.js","vue/erDiagram-Q2GNP2WA-D1mxJWSp.js","vue/gitGraphDiagram-V2S2FVAM-DgNNP2nj.js","vue/chunk-4BX2VUAB-DSPzEX5F.js","vue/chunk-QZHKN3VN-BqVqGMTy.js","vue/treemap-GDKQZRPO-DFPZrNlp.js","vue/infoDiagram-HS3SLOUP-D5asL_9P.js","vue/pieDiagram-ADFJNKIX-mb757Gpq.js","vue/requirementDiagram-UZGBJVZJ-CHguirsB.js","vue/sequenceDiagram-WL72ISMW-B83ZoXls.js","vue/classDiagram-2ON5EDUG-C9Kk58xl.js","vue/chunk-B4BG7PRW-B_hXD1nI.js","vue/classDiagram-v2-WZHVMYZB-C9Kk58xl.js","vue/stateDiagram-FKZM4ZOC-Ct0OgmPh.js","vue/chunk-DI55MBZ5-C-2DUMJY.js","vue/stateDiagram-v2-4FDKWEC3-CJZXQ6xd.js","vue/journeyDiagram-XKPGCS4Q-D-SRalYk.js","vue/mindmap-definition-VGOIOE7T-BfbYXGBk.js","vue/kanban-definition-3W4ZIXB7-CuOjHa3p.js","vue/diagram-S2PKOQOG-FH65FafS.js","vue/diagram-QEK2KX5R-COjSoDC8.js","vue/blockDiagram-VD42YOAC-C8HXvtNT.js","vue/architectureDiagram-VXUJARFQ-Dg_wTk4u.js","vue/diagram-PSM6KHXK-BwzbeHPK.js"])))=>i.map(i=>d[i]);
2
+ const hx="modulepreload",ux=function(e){return"/"+e},fh={},_t=function(t,r,i){let n=Promise.resolve();if(r&&r.length>0){let l=function(c){return Promise.all(c.map(h=>Promise.resolve(h).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=s?.nonce||s?.getAttribute("nonce");n=l(r.map(c=>{if(c=ux(c),c in fh)return;fh[c]=!0;const h=c.endsWith(".css"),u=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const f=document.createElement("link");if(f.rel=h?"stylesheet":hx,h||(f.as="script"),f.crossOrigin="",f.href=c,o&&f.setAttribute("nonce",o),document.head.appendChild(f),h)return new Promise((d,g)=>{f.addEventListener("load",d),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return n.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})};var n3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a3(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function i(){var n=!1;try{n=this instanceof i}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),r}var dh={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},ca={exports:{}},dx=ca.exports,ph;function px(){return ph||(ph=1,(function(e,t){(function(r,i){e.exports=i()})(dx,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,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(S){var E=["th","st","nd","rd"],A=S%100;return"["+S+(E[(A-20)%10]||E[A]||E[0])+"]"}},_=function(S,E,A){var D=String(S);return!D||D.length>=E?S:""+Array(E+1-D.length).join(A)+S},w={s:_,z:function(S){var E=-S.utcOffset(),A=Math.abs(E),D=Math.floor(A/60),F=A%60;return(E<=0?"+":"-")+_(D,2,"0")+":"+_(F,2,"0")},m:function S(E,A){if(E.date()<A.date())return-S(A,E);var D=12*(A.year()-E.year())+(A.month()-E.month()),F=E.clone().add(D,u),U=A-F<0,W=E.clone().add(D+(U?-1:1),u);return+(-(D+(A-F)/(U?F-W:W-F))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:u,y:d,w:h,d:c,D:g,h:l,m:o,s,ms:a,Q:f}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},C="en",v={};v[C]=b;var T="$isDayjsObject",O=function(S){return S instanceof $||!(!S||!S[T])},I=function S(E,A,D){var F;if(!E)return C;if(typeof E=="string"){var U=E.toLowerCase();v[U]&&(F=U),A&&(v[U]=A,F=U);var W=E.split("-");if(!F&&W.length>1)return S(W[0])}else{var Y=E.name;v[Y]=E,F=Y}return!D&&F&&(C=F),F||!D&&C},R=function(S,E){if(O(S))return S.clone();var A=typeof E=="object"?E:{};return A.date=S,A.args=arguments,new $(A)},B=w;B.l=I,B.i=O,B.w=function(S,E){return R(S,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var $=(function(){function S(A){this.$L=I(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[T]=!0}var E=S.prototype;return E.parse=function(A){this.$d=(function(D){var F=D.date,U=D.utc;if(F===null)return new Date(NaN);if(B.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var W=F.match(y);if(W){var Y=W[2]-1||0,Q=(W[7]||"0").substring(0,3);return U?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,Q)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,Q)}}return new Date(F)})(A),this.init()},E.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},E.$utils=function(){return B},E.isValid=function(){return this.$d.toString()!==m},E.isSame=function(A,D){var F=R(A);return this.startOf(D)<=F&&F<=this.endOf(D)},E.isAfter=function(A,D){return R(A)<this.startOf(D)},E.isBefore=function(A,D){return this.endOf(D)<R(A)},E.$g=function(A,D,F){return B.u(A)?this[D]:this.set(F,A)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(A,D){var F=this,U=!!B.u(D)||D,W=B.p(A),Y=function(q,J){var ht=B.w(F.$u?Date.UTC(F.$y,J,q):new Date(F.$y,J,q),F);return U?ht:ht.endOf(c)},Q=function(q,J){return B.w(F.toDate()[q].apply(F.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(J)),F)},G=this.$W,ut=this.$M,rt=this.$D,vt="set"+(this.$u?"UTC":"");switch(W){case d:return U?Y(1,0):Y(31,11);case u:return U?Y(1,ut):Y(0,ut+1);case h:var wt=this.$locale().weekStart||0,Mt=(G<wt?G+7:G)-wt;return Y(U?rt-Mt:rt+(6-Mt),ut);case c:case g:return Q(vt+"Hours",0);case l:return Q(vt+"Minutes",1);case o:return Q(vt+"Seconds",2);case s:return Q(vt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(A){return this.startOf(A,!1)},E.$set=function(A,D){var F,U=B.p(A),W="set"+(this.$u?"UTC":""),Y=(F={},F[c]=W+"Date",F[g]=W+"Date",F[u]=W+"Month",F[d]=W+"FullYear",F[l]=W+"Hours",F[o]=W+"Minutes",F[s]=W+"Seconds",F[a]=W+"Milliseconds",F)[U],Q=U===c?this.$D+(D-this.$W):D;if(U===u||U===d){var G=this.clone().set(g,1);G.$d[Y](Q),G.init(),this.$d=G.set(g,Math.min(this.$D,G.daysInMonth())).$d}else Y&&this.$d[Y](Q);return this.init(),this},E.set=function(A,D){return this.clone().$set(A,D)},E.get=function(A){return this[B.p(A)]()},E.add=function(A,D){var F,U=this;A=Number(A);var W=B.p(D),Y=function(ut){var rt=R(U);return B.w(rt.date(rt.date()+Math.round(ut*A)),U)};if(W===u)return this.set(u,this.$M+A);if(W===d)return this.set(d,this.$y+A);if(W===c)return Y(1);if(W===h)return Y(7);var Q=(F={},F[o]=i,F[l]=n,F[s]=r,F)[W]||1,G=this.$d.getTime()+A*Q;return B.w(G,this)},E.subtract=function(A,D){return this.add(-1*A,D)},E.format=function(A){var D=this,F=this.$locale();if(!this.isValid())return F.invalidDate||m;var U=A||"YYYY-MM-DDTHH:mm:ssZ",W=B.z(this),Y=this.$H,Q=this.$m,G=this.$M,ut=F.weekdays,rt=F.months,vt=F.meridiem,wt=function(J,ht,N,Ct){return J&&(J[ht]||J(D,U))||N[ht].slice(0,Ct)},Mt=function(J){return B.s(Y%12||12,J,"0")},q=vt||function(J,ht,N){var Ct=J<12?"AM":"PM";return N?Ct.toLowerCase():Ct};return U.replace(x,(function(J,ht){return ht||(function(N){switch(N){case"YY":return String(D.$y).slice(-2);case"YYYY":return B.s(D.$y,4,"0");case"M":return G+1;case"MM":return B.s(G+1,2,"0");case"MMM":return wt(F.monthsShort,G,rt,3);case"MMMM":return wt(rt,G);case"D":return D.$D;case"DD":return B.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return wt(F.weekdaysMin,D.$W,ut,2);case"ddd":return wt(F.weekdaysShort,D.$W,ut,3);case"dddd":return ut[D.$W];case"H":return String(Y);case"HH":return B.s(Y,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return q(Y,Q,!0);case"A":return q(Y,Q,!1);case"m":return String(Q);case"mm":return B.s(Q,2,"0");case"s":return String(D.$s);case"ss":return B.s(D.$s,2,"0");case"SSS":return B.s(D.$ms,3,"0");case"Z":return W}return null})(J)||W.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(A,D,F){var U,W=this,Y=B.p(D),Q=R(A),G=(Q.utcOffset()-this.utcOffset())*i,ut=this-Q,rt=function(){return B.m(W,Q)};switch(Y){case d:U=rt()/12;break;case u:U=rt();break;case f:U=rt()/3;break;case h:U=(ut-G)/6048e5;break;case c:U=(ut-G)/864e5;break;case l:U=ut/n;break;case o:U=ut/i;break;case s:U=ut/r;break;default:U=ut}return F?U:B.a(U)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return v[this.$L]},E.locale=function(A,D){if(!A)return this.$L;var F=this.clone(),U=I(A,D,!0);return U&&(F.$L=U),F},E.clone=function(){return B.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},S})(),L=$.prototype;return R.prototype=L,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach((function(S){L[S[1]]=function(E){return this.$g(E,S[0],S[1])}})),R.extend=function(S,E){return S.$i||(S(E,$,R),S.$i=!0),R},R.locale=I,R.isDayjs=O,R.unix=function(S){return R(1e3*S)},R.en=v[C],R.Ls=v,R.p={},R}))})(ca)),ca.exports}var gx=px();const mx=fx(gx);var mf=Object.defineProperty,p=(e,t)=>mf(e,"name",{value:t,configurable:!0}),yx=(e,t)=>{for(var r in t)mf(e,r,{get:t[r],enumerable:!0})},je={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ql=p(function(e="fatal"){let t=je.fatal;typeof e=="string"?e.toLowerCase()in je&&(t=je[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=je.fatal&&(P.fatal=console.error?console.error.bind(console,de("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",de("FATAL"))),t<=je.error&&(P.error=console.error?console.error.bind(console,de("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",de("ERROR"))),t<=je.warn&&(P.warn=console.warn?console.warn.bind(console,de("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",de("WARN"))),t<=je.info&&(P.info=console.info?console.info.bind(console,de("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",de("INFO"))),t<=je.debug&&(P.debug=console.debug?console.debug.bind(console,de("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("DEBUG"))),t<=je.trace&&(P.trace=console.debug?console.debug.bind(console,de("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("TRACE")))},"setLogLevel"),de=p(e=>`%c${mx().format("ss.SSS")} : ${e} : `,"format");const ha={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 n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return ha.hue2rgb(a,n,e+1/3)*255;case"g":return ha.hue2rgb(a,n,e)*255;case"b":return ha.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;const o=n-a,l=s>.5?o/(2-n-a):o/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},xx={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},bx={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ct={channel:ha,lang:xx,unit:bx},or={};for(let e=0;e<=255;e++)or[e]=ct.unit.dec2hex(e);const Yt={ALL:0,RGB:1,HSL:2};class _x{constructor(){this.type=Yt.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=Yt.ALL}is(t){return this.type===t}}class wx{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new _x}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Yt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=ct.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ct.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=ct.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=ct.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ct.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=ct.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),ct.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),ct.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),ct.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),ct.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),ct.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),ct.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Yt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Yt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Yt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Yt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Yt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Yt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const _s=new wx({r:0,g:0,b:0,a:0},"transparent"),si={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(si.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return _s.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${or[Math.round(t)]}${or[Math.round(r)]}${or[Math.round(i)]}${or[Math.round(n*255)]}`:`#${or[Math.round(t)]}${or[Math.round(r)]}${or[Math.round(i)]}`}},kr={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(kr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ct.channel.clamp.h(parseFloat(r)*.9);case"rad":return ct.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ct.channel.clamp.h(parseFloat(r)*360)}}return ct.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(kr.re);if(!r)return;const[,i,n,a,s,o]=r;return _s.set({h:kr._hue2deg(i),s:ct.channel.clamp.s(parseFloat(n)),l:ct.channel.clamp.l(parseFloat(a)),a:s?ct.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${ct.lang.round(t)}, ${ct.lang.round(r)}%, ${ct.lang.round(i)}%, ${n})`:`hsl(${ct.lang.round(t)}, ${ct.lang.round(r)}%, ${ct.lang.round(i)}%)`}},un={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=un.colors[e];if(t)return si.parse(t)},stringify:e=>{const t=si.stringify(e);for(const r in un.colors)if(un.colors[r]===t)return r}},tn={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(tn.re);if(!r)return;const[,i,n,a,s,o,l,c,h]=r;return _s.set({r:ct.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ct.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:ct.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?ct.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${ct.lang.round(t)}, ${ct.lang.round(r)}, ${ct.lang.round(i)}, ${ct.lang.round(n)})`:`rgb(${ct.lang.round(t)}, ${ct.lang.round(r)}, ${ct.lang.round(i)})`}},Ae={format:{keyword:un,hex:si,rgb:tn,rgba:tn,hsl:kr,hsla:kr},parse:e=>{if(typeof e!="string")return e;const t=si.parse(e)||tn.parse(e)||kr.parse(e)||un.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Yt.HSL)||e.data.r===void 0?kr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?tn.stringify(e):si.stringify(e)},yf=(e,t)=>{const r=Ae.parse(e);for(const i in t)r[i]=ct.channel.clamp[i](t[i]);return Ae.stringify(r)},fn=(e,t,r=0,i=1)=>{if(typeof e!="number")return yf(e,{a:t});const n=_s.set({r:ct.channel.clamp.r(e),g:ct.channel.clamp.g(t),b:ct.channel.clamp.b(r),a:ct.channel.clamp.a(i)});return Ae.stringify(n)},s3=(e,t)=>ct.lang.round(Ae.parse(e)[t]),Cx=e=>{const{r:t,g:r,b:i}=Ae.parse(e),n=.2126*ct.channel.toLinear(t)+.7152*ct.channel.toLinear(r)+.0722*ct.channel.toLinear(i);return ct.lang.round(n)},vx=e=>Cx(e)>=.5,En=e=>!vx(e),xf=(e,t,r)=>{const i=Ae.parse(e),n=i[t],a=ct.channel.clamp[t](n+r);return n!==a&&(i[t]=a),Ae.stringify(i)},V=(e,t)=>xf(e,"l",t),nt=(e,t)=>xf(e,"l",-t),M=(e,t)=>{const r=Ae.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return yf(e,i)},kx=(e,t,r=50)=>{const{r:i,g:n,b:a,a:s}=Ae.parse(e),{r:o,g:l,b:c,a:h}=Ae.parse(t),u=r/100,f=u*2-1,d=s-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+o*y,b=n*m+l*y,_=a*m+c*y,w=s*u+h*(1-u);return fn(x,b,_,w)},H=(e,t=100)=>{const r=Ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,kx(r,e,t)};const{entries:bf,setPrototypeOf:gh,isFrozen:Sx,getPrototypeOf:Tx,getOwnPropertyDescriptor:Mx}=Object;let{freeze:ne,seal:ge,create:en}=Object,{apply:No,construct:zo}=typeof Reflect<"u"&&Reflect;ne||(ne=function(t){return t});ge||(ge=function(t){return t});No||(No=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return t.apply(r,n)});zo||(zo=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const Pi=ae(Array.prototype.forEach),Ax=ae(Array.prototype.lastIndexOf),mh=ae(Array.prototype.pop),Ni=ae(Array.prototype.push),Lx=ae(Array.prototype.splice),ua=ae(String.prototype.toLowerCase),so=ae(String.prototype.toString),oo=ae(String.prototype.match),Kr=ae(String.prototype.replace),Bx=ae(String.prototype.indexOf),Ex=ae(String.prototype.trim),_e=ae(Object.prototype.hasOwnProperty),te=ae(RegExp.prototype.test),zi=$x(TypeError);function ae(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return No(e,t,i)}}function $x(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return zo(e,r)}}function ft(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ua;gh&&gh(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(Sx(t)||(t[i]=a),n=a)}e[n]=!0}return e}function Fx(e){for(let t=0;t<e.length;t++)_e(e,t)||(e[t]=null);return e}function De(e){const t=en(null);for(const[r,i]of bf(e))_e(e,r)&&(Array.isArray(i)?t[r]=Fx(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=De(i):t[r]=i);return t}function Wi(e,t){for(;e!==null;){const i=Mx(e,t);if(i){if(i.get)return ae(i.get);if(typeof i.value=="function")return ae(i.value)}e=Tx(e)}function r(){return null}return r}const yh=ne(["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"]),lo=ne(["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"]),co=ne(["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"]),Dx=ne(["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"]),ho=ne(["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"]),Ox=ne(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xh=ne(["#text"]),bh=ne(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","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","slot"]),uo=ne(["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"]),_h=ne(["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"]),Vn=ne(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rx=ge(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ix=ge(/<%[\w\W]*|[\w\W]*%>/gm),Px=ge(/\$\{[\w\W]*/gm),Nx=ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),zx=ge(/^aria-[\-\w]+$/),_f=ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wx=ge(/^(?:\w+script|data):/i),qx=ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wf=ge(/^html$/i),Hx=ge(/^[a-z][.\w]*(-[.\w]+)+$/i);var wh=Object.freeze({__proto__:null,ARIA_ATTR:zx,ATTR_WHITESPACE:qx,CUSTOM_ELEMENT:Hx,DATA_ATTR:Nx,DOCTYPE_NAME:wf,ERB_EXPR:Ix,IS_ALLOWED_URI:_f,IS_SCRIPT_OR_DATA:Wx,MUSTACHE_EXPR:Rx,TMPLIT_EXPR:Px});const qi={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ux=function(){return typeof window>"u"?null:window},jx=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Ch=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Cf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ux();const t=at=>Cf(at);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==qi.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=l.prototype,m=Wi(g,"cloneNode"),y=Wi(g,"remove"),x=Wi(g,"nextSibling"),b=Wi(g,"childNodes"),_=Wi(g,"parentNode");if(typeof s=="function"){const at=r.createElement("template");at.content&&at.content.ownerDocument&&(r=at.content.ownerDocument)}let w,C="";const{implementation:v,createNodeIterator:T,createDocumentFragment:O,getElementsByTagName:I}=r,{importNode:R}=i;let B=Ch();t.isSupported=typeof bf=="function"&&typeof _=="function"&&v&&v.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:$,ERB_EXPR:L,TMPLIT_EXPR:S,DATA_ATTR:E,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:U}=wh;let{IS_ALLOWED_URI:W}=wh,Y=null;const Q=ft({},[...yh,...lo,...co,...ho,...xh]);let G=null;const ut=ft({},[...bh,...uo,..._h,...Vn]);let rt=Object.seal(en(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}})),vt=null,wt=null;const Mt=Object.seal(en(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let q=!0,J=!0,ht=!1,N=!0,Ct=!1,gt=!0,At=!1,zt=!1,xe=!1,He=!1,qn=!1,Hn=!1,Xc=!0,Zc=!1;const ix="user-content-";let Ks=!0,Ri=!1,Vr={},Be=null;const Qs=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Kc=null;const Qc=ft({},["audio","video","img","source","image","track"]);let Js=null;const Jc=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Un="http://www.w3.org/1998/Math/MathML",jn="http://www.w3.org/2000/svg",Ee="http://www.w3.org/1999/xhtml";let Xr=Ee,to=!1,eo=null;const nx=ft({},[Un,jn,Ee],so);let Yn=ft({},["mi","mo","mn","ms","mtext"]),Gn=ft({},["annotation-xml"]);const ax=ft({},["title","style","font","a","script"]);let Ii=null;const sx=["application/xhtml+xml","text/html"],ox="text/html";let Ft=null,Zr=null;const lx=r.createElement("form"),th=function(k){return k instanceof RegExp||k instanceof Function},ro=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Zr&&Zr===k)){if((!k||typeof k!="object")&&(k={}),k=De(k),Ii=sx.indexOf(k.PARSER_MEDIA_TYPE)===-1?ox:k.PARSER_MEDIA_TYPE,Ft=Ii==="application/xhtml+xml"?so:ua,Y=_e(k,"ALLOWED_TAGS")?ft({},k.ALLOWED_TAGS,Ft):Q,G=_e(k,"ALLOWED_ATTR")?ft({},k.ALLOWED_ATTR,Ft):ut,eo=_e(k,"ALLOWED_NAMESPACES")?ft({},k.ALLOWED_NAMESPACES,so):nx,Js=_e(k,"ADD_URI_SAFE_ATTR")?ft(De(Jc),k.ADD_URI_SAFE_ATTR,Ft):Jc,Kc=_e(k,"ADD_DATA_URI_TAGS")?ft(De(Qc),k.ADD_DATA_URI_TAGS,Ft):Qc,Be=_e(k,"FORBID_CONTENTS")?ft({},k.FORBID_CONTENTS,Ft):Qs,vt=_e(k,"FORBID_TAGS")?ft({},k.FORBID_TAGS,Ft):De({}),wt=_e(k,"FORBID_ATTR")?ft({},k.FORBID_ATTR,Ft):De({}),Vr=_e(k,"USE_PROFILES")?k.USE_PROFILES:!1,q=k.ALLOW_ARIA_ATTR!==!1,J=k.ALLOW_DATA_ATTR!==!1,ht=k.ALLOW_UNKNOWN_PROTOCOLS||!1,N=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ct=k.SAFE_FOR_TEMPLATES||!1,gt=k.SAFE_FOR_XML!==!1,At=k.WHOLE_DOCUMENT||!1,He=k.RETURN_DOM||!1,qn=k.RETURN_DOM_FRAGMENT||!1,Hn=k.RETURN_TRUSTED_TYPE||!1,xe=k.FORCE_BODY||!1,Xc=k.SANITIZE_DOM!==!1,Zc=k.SANITIZE_NAMED_PROPS||!1,Ks=k.KEEP_CONTENT!==!1,Ri=k.IN_PLACE||!1,W=k.ALLOWED_URI_REGEXP||_f,Xr=k.NAMESPACE||Ee,Yn=k.MATHML_TEXT_INTEGRATION_POINTS||Yn,Gn=k.HTML_INTEGRATION_POINTS||Gn,rt=k.CUSTOM_ELEMENT_HANDLING||en(null),k.CUSTOM_ELEMENT_HANDLING&&th(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(rt.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&th(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(rt.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(rt.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ct&&(J=!1),qn&&(He=!0),Vr&&(Y=ft({},xh),G=en(null),Vr.html===!0&&(ft(Y,yh),ft(G,bh)),Vr.svg===!0&&(ft(Y,lo),ft(G,uo),ft(G,Vn)),Vr.svgFilters===!0&&(ft(Y,co),ft(G,uo),ft(G,Vn)),Vr.mathMl===!0&&(ft(Y,ho),ft(G,_h),ft(G,Vn))),Mt.tagCheck=null,Mt.attributeCheck=null,k.ADD_TAGS&&(typeof k.ADD_TAGS=="function"?Mt.tagCheck=k.ADD_TAGS:(Y===Q&&(Y=De(Y)),ft(Y,k.ADD_TAGS,Ft))),k.ADD_ATTR&&(typeof k.ADD_ATTR=="function"?Mt.attributeCheck=k.ADD_ATTR:(G===ut&&(G=De(G)),ft(G,k.ADD_ATTR,Ft))),k.ADD_URI_SAFE_ATTR&&ft(Js,k.ADD_URI_SAFE_ATTR,Ft),k.FORBID_CONTENTS&&(Be===Qs&&(Be=De(Be)),ft(Be,k.FORBID_CONTENTS,Ft)),k.ADD_FORBID_CONTENTS&&(Be===Qs&&(Be=De(Be)),ft(Be,k.ADD_FORBID_CONTENTS,Ft)),Ks&&(Y["#text"]=!0),At&&ft(Y,["html","head","body"]),Y.table&&(ft(Y,["tbody"]),delete vt.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw zi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=k.TRUSTED_TYPES_POLICY,C=w.createHTML("")}else w===void 0&&(w=jx(d,n)),w!==null&&typeof C=="string"&&(C=w.createHTML(""));ne&&ne(k),Zr=k}},eh=ft({},[...lo,...co,...Dx]),rh=ft({},[...ho,...Ox]),cx=function(k){let z=_(k);(!z||!z.tagName)&&(z={namespaceURI:Xr,tagName:"template"});const tt=ua(k.tagName),St=ua(z.tagName);return eo[k.namespaceURI]?k.namespaceURI===jn?z.namespaceURI===Ee?tt==="svg":z.namespaceURI===Un?tt==="svg"&&(St==="annotation-xml"||Yn[St]):!!eh[tt]:k.namespaceURI===Un?z.namespaceURI===Ee?tt==="math":z.namespaceURI===jn?tt==="math"&&Gn[St]:!!rh[tt]:k.namespaceURI===Ee?z.namespaceURI===jn&&!Gn[St]||z.namespaceURI===Un&&!Yn[St]?!1:!rh[tt]&&(ax[tt]||!eh[tt]):!!(Ii==="application/xhtml+xml"&&eo[k.namespaceURI]):!1},be=function(k){Ni(t.removed,{element:k});try{_(k).removeChild(k)}catch{y(k)}},xr=function(k,z){try{Ni(t.removed,{attribute:z.getAttributeNode(k),from:z})}catch{Ni(t.removed,{attribute:null,from:z})}if(z.removeAttribute(k),k==="is")if(He||qn)try{be(z)}catch{}else try{z.setAttribute(k,"")}catch{}},ih=function(k){let z=null,tt=null;if(xe)k="<remove></remove>"+k;else{const Et=oo(k,/^[\r\n\t ]+/);tt=Et&&Et[0]}Ii==="application/xhtml+xml"&&Xr===Ee&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const St=w?w.createHTML(k):k;if(Xr===Ee)try{z=new f().parseFromString(St,Ii)}catch{}if(!z||!z.documentElement){z=v.createDocument(Xr,"template",null);try{z.documentElement.innerHTML=to?C:St}catch{}}const Ut=z.body||z.documentElement;return k&&tt&&Ut.insertBefore(r.createTextNode(tt),Ut.childNodes[0]||null),Xr===Ee?I.call(z,At?"html":"body")[0]:At?z.documentElement:Ut},nh=function(k){return T.call(k.ownerDocument||k,k,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},io=function(k){return k instanceof u&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof h)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},no=function(k){return typeof o=="function"&&k instanceof o};function Ue(at,k,z){Pi(at,tt=>{tt.call(t,k,z,Zr)})}const ah=function(k){let z=null;if(Ue(B.beforeSanitizeElements,k,null),io(k))return be(k),!0;const tt=Ft(k.nodeName);if(Ue(B.uponSanitizeElement,k,{tagName:tt,allowedTags:Y}),gt&&k.hasChildNodes()&&!no(k.firstElementChild)&&te(/<[/\w!]/g,k.innerHTML)&&te(/<[/\w!]/g,k.textContent)||gt&&k.namespaceURI===Ee&&tt==="style"&&no(k.firstElementChild)||k.nodeType===qi.progressingInstruction||gt&&k.nodeType===qi.comment&&te(/<[/\w]/g,k.data))return be(k),!0;if(vt[tt]||!(Mt.tagCheck instanceof Function&&Mt.tagCheck(tt))&&!Y[tt]){if(!vt[tt]&&oh(tt)&&(rt.tagNameCheck instanceof RegExp&&te(rt.tagNameCheck,tt)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(tt)))return!1;if(Ks&&!Be[tt]){const St=_(k)||k.parentNode,Ut=b(k)||k.childNodes;if(Ut&&St){const Et=Ut.length;for(let se=Et-1;se>=0;--se){const he=m(Ut[se],!0);he.__removalCount=(k.__removalCount||0)+1,St.insertBefore(he,x(k))}}}return be(k),!0}return k instanceof l&&!cx(k)||(tt==="noscript"||tt==="noembed"||tt==="noframes")&&te(/<\/no(script|embed|frames)/i,k.innerHTML)?(be(k),!0):(Ct&&k.nodeType===qi.text&&(z=k.textContent,Pi([$,L,S],St=>{z=Kr(z,St," ")}),k.textContent!==z&&(Ni(t.removed,{element:k.cloneNode()}),k.textContent=z)),Ue(B.afterSanitizeElements,k,null),!1)},sh=function(k,z,tt){if(wt[z]||Xc&&(z==="id"||z==="name")&&(tt in r||tt in lx))return!1;if(!(J&&!wt[z]&&te(E,z))){if(!(q&&te(A,z))){if(!(Mt.attributeCheck instanceof Function&&Mt.attributeCheck(z,k))){if(!G[z]||wt[z]){if(!(oh(k)&&(rt.tagNameCheck instanceof RegExp&&te(rt.tagNameCheck,k)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(k))&&(rt.attributeNameCheck instanceof RegExp&&te(rt.attributeNameCheck,z)||rt.attributeNameCheck instanceof Function&&rt.attributeNameCheck(z,k))||z==="is"&&rt.allowCustomizedBuiltInElements&&(rt.tagNameCheck instanceof RegExp&&te(rt.tagNameCheck,tt)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(tt))))return!1}else if(!Js[z]){if(!te(W,Kr(tt,F,""))){if(!((z==="src"||z==="xlink:href"||z==="href")&&k!=="script"&&Bx(tt,"data:")===0&&Kc[k])){if(!(ht&&!te(D,Kr(tt,F,"")))){if(tt)return!1}}}}}}}return!0},oh=function(k){return k!=="annotation-xml"&&oo(k,U)},lh=function(k){Ue(B.beforeSanitizeAttributes,k,null);const{attributes:z}=k;if(!z||io(k))return;const tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let St=z.length;for(;St--;){const Ut=z[St],{name:Et,namespaceURI:se,value:he}=Ut,sr=Ft(Et),ao=he;let Wt=Et==="value"?ao:Ex(ao);if(tt.attrName=sr,tt.attrValue=Wt,tt.keepAttr=!0,tt.forceKeepAttr=void 0,Ue(B.uponSanitizeAttribute,k,tt),Wt=tt.attrValue,Zc&&(sr==="id"||sr==="name")&&(xr(Et,k),Wt=ix+Wt),gt&&te(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Wt)){xr(Et,k);continue}if(sr==="attributename"&&oo(Wt,"href")){xr(Et,k);continue}if(tt.forceKeepAttr)continue;if(!tt.keepAttr){xr(Et,k);continue}if(!N&&te(/\/>/i,Wt)){xr(Et,k);continue}Ct&&Pi([$,L,S],uh=>{Wt=Kr(Wt,uh," ")});const hh=Ft(k.nodeName);if(!sh(hh,sr,Wt)){xr(Et,k);continue}if(w&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!se)switch(d.getAttributeType(hh,sr)){case"TrustedHTML":{Wt=w.createHTML(Wt);break}case"TrustedScriptURL":{Wt=w.createScriptURL(Wt);break}}if(Wt!==ao)try{se?k.setAttributeNS(se,Et,Wt):k.setAttribute(Et,Wt),io(k)?be(k):mh(t.removed)}catch{xr(Et,k)}}Ue(B.afterSanitizeAttributes,k,null)},ch=function(k){let z=null;const tt=nh(k);for(Ue(B.beforeSanitizeShadowDOM,k,null);z=tt.nextNode();)Ue(B.uponSanitizeShadowNode,z,null),ah(z),lh(z),z.content instanceof a&&ch(z.content);Ue(B.afterSanitizeShadowDOM,k,null)};return t.sanitize=function(at){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,tt=null,St=null,Ut=null;if(to=!at,to&&(at="<!-->"),typeof at!="string"&&!no(at))if(typeof at.toString=="function"){if(at=at.toString(),typeof at!="string")throw zi("dirty is not a string, aborting")}else throw zi("toString is not a function");if(!t.isSupported)return at;if(zt||ro(k),t.removed=[],typeof at=="string"&&(Ri=!1),Ri){if(at.nodeName){const he=Ft(at.nodeName);if(!Y[he]||vt[he])throw zi("root node is forbidden and cannot be sanitized in-place")}}else if(at instanceof o)z=ih("<!---->"),tt=z.ownerDocument.importNode(at,!0),tt.nodeType===qi.element&&tt.nodeName==="BODY"||tt.nodeName==="HTML"?z=tt:z.appendChild(tt);else{if(!He&&!Ct&&!At&&at.indexOf("<")===-1)return w&&Hn?w.createHTML(at):at;if(z=ih(at),!z)return He?null:Hn?C:""}z&&xe&&be(z.firstChild);const Et=nh(Ri?at:z);for(;St=Et.nextNode();)ah(St),lh(St),St.content instanceof a&&ch(St.content);if(Ri)return at;if(He){if(Ct){z.normalize();let he=z.innerHTML;Pi([$,L,S],sr=>{he=Kr(he,sr," ")}),z.innerHTML=he}if(qn)for(Ut=O.call(z.ownerDocument);z.firstChild;)Ut.appendChild(z.firstChild);else Ut=z;return(G.shadowroot||G.shadowrootmode)&&(Ut=R.call(i,Ut,!0)),Ut}let se=At?z.outerHTML:z.innerHTML;return At&&Y["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&te(wf,z.ownerDocument.doctype.name)&&(se="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
3
+ `+se),Ct&&Pi([$,L,S],he=>{se=Kr(se,he," ")}),w&&Hn?w.createHTML(se):se},t.setConfig=function(){let at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ro(at),zt=!0},t.clearConfig=function(){Zr=null,zt=!1},t.isValidAttribute=function(at,k,z){Zr||ro({});const tt=Ft(at),St=Ft(k);return sh(tt,St,z)},t.addHook=function(at,k){typeof k=="function"&&Ni(B[at],k)},t.removeHook=function(at,k){if(k!==void 0){const z=Ax(B[at],k);return z===-1?void 0:Lx(B[at],z,1)[0]}return mh(B[at])},t.removeHooks=function(at){B[at]=[]},t.removeAllHooks=function(){B=Ch()},t}var xi=Cf(),vf=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,dn=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Yx=/\s*%%.*\n/gm,hi,kf=(hi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(hi,"UnknownDiagramError"),hi),Er={},Hl=p(function(e,t){e=e.replace(vf,"").replace(dn,"").replace(Yx,`
4
+ `);for(const[r,{detector:i}]of Object.entries(Er))if(i(e,t))return r;throw new kf(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Wo=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Sf(t,r,i)},"registerLazyLoadedDiagrams"),Sf=p((e,t,r)=>{Er[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),Er[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Gx=p(e=>Er[e].loader,"getDiagramLoader"),qo=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>qo(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=qo(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ot=qo,ws="#ffffff",Cs="#f2f2f2",ee=p((e,t)=>t?M(e,{s:-40,l:10}):M(e,{s:-40,l:-10}),"mkBorder"),ui,Vx=(ui=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||H(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||H(this.tertiaryColor),this.lineColor=this.lineColor||H(this.background),this.arrowheadColor=this.arrowheadColor||H(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?nt(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||nt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||H(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||V(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||nt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||nt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||V(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||V(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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=nt(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=nt(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||H(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||V(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||nt(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||M(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||M(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(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||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(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.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||En(this.quadrant1Fill)?V(this.quadrant1Fill):nt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?nt(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||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(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||ws,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Cs}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(ui,"Theme"),ui),Xx=p(e=>{const t=new Vx;return t.calculate(e),t},"getThemeVariables"),fi,Zx=(fi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=V(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=V(H("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=fn(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=nt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=nt(this.sectionBkgColor,10),this.taskBorderColor=fn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=fn(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||V(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||nt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=V(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=V(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=V(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(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||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||H(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||V(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||M(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||M(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||En(this.quadrant1Fill)?V(this.quadrant1Fill):nt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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?nt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=V(this.secondaryColor,20),this.git1=V(this.pie2||this.secondaryColor,20),this.git2=V(this.pie3||this.tertiaryColor,20),this.git3=V(this.pie4||M(this.primaryColor,{h:-30}),20),this.git4=V(this.pie5||M(this.primaryColor,{h:-60}),20),this.git5=V(this.pie6||M(this.primaryColor,{h:-90}),10),this.git6=V(this.pie7||M(this.primaryColor,{h:60}),10),this.git7=V(this.pie8||M(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||V(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||V(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(fi,"Theme"),fi),Kx=p(e=>{const t=new Zx;return t.calculate(e),t},"getThemeVariables"),di,Qx=(di=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=M(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=fn(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||nt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||nt(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=nt(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||nt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||M(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||M(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||M(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||H(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||H(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=V(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||V(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||V(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||M(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-30}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||M(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||En(this.quadrant1Fill)?V(this.quadrant1Fill):nt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||nt(H(this.git0),25),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ws,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Cs}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(di,"Theme"),di),Jx=p(e=>{const t=new Qx;return t.calculate(e),t},"getThemeVariables"),pi,tb=(pi=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=V("#cde498",10),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.primaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=nt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||nt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||nt(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=nt(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||nt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||M(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||M(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||M(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||V(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||V(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(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||M(this.primaryColor,{l:-30}),this.pie5=this.pie5||M(this.secondaryColor,{l:-30}),this.pie6=this.pie6||M(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||En(this.quadrant1Fill)?V(this.quadrant1Fill):nt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ws,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Cs}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(pi,"Theme"),pi),eb=p(e=>{const t=new tb;return t.calculate(e),t},"getThemeVariables"),gi,rb=(gi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=V(this.contrast,55),this.background="#ffffff",this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.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.rowOdd=this.rowOdd||V(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=V(this.contrast,55),this.border2=this.contrast,this.actorBorder=V(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||H(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||V(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||nt(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||M(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||M(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=V(this.contrast,30),this.sectionBkgColor2=V(this.contrast,30),this.taskBorderColor=nt(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=V(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=nt(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=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||En(this.quadrant1Fill)?V(this.quadrant1Fill):nt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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=nt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||M(this.primaryColor,{h:-30}),this.git4=this.pie5||M(this.primaryColor,{h:-60}),this.git5=this.pie6||M(this.primaryColor,{h:-90}),this.git6=this.pie7||M(this.primaryColor,{h:60}),this.git7=this.pie8||M(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ws,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Cs}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(gi,"Theme"),gi),ib=p(e=>{const t=new rb;return t.calculate(e),t},"getThemeVariables"),Qe={base:{getThemeVariables:Xx},dark:{getThemeVariables:Kx},default:{getThemeVariables:Jx},forest:{getThemeVariables:eb},neutral:{getThemeVariables:ib}},$e={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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},Tf={...$e,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Qe.default.getThemeVariables(),sequence:{...$e.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},gantt:{...$e.gantt,tickInterval:void 0,useWidth:void 0},c4:{...$e.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...$e.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:{...$e.pie,useWidth:984},xyChart:{...$e.xyChart,useWidth:void 0},requirement:{...$e.requirement,useWidth:void 0},packet:{...$e.packet},radar:{...$e.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Mf=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Mf(e[i],"")]:[...r,t+i],[]),"keyify"),nb=new Set(Mf(Tf,"")),Af=Tf,Ma=p(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ma(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!nb.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){P.debug("sanitizing object",t),Ma(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=ab(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),ab=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"),bi=Object.freeze(Af),le=Ot({},bi),Aa,$r=[],pn=Ot({},bi),vs=p((e,t)=>{let r=Ot({},e),i={};for(const n of t)Ef(n),i=Ot(i,n);if(r=Ot(r,i),i.theme&&i.theme in Qe){const n=Ot({},Aa),a=Ot(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Qe&&(r.themeVariables=Qe[r.theme].getThemeVariables(a))}return pn=r,$f(pn),pn},"updateCurrentConfig"),sb=p(e=>(le=Ot({},bi),le=Ot(le,e),e.theme&&Qe[e.theme]&&(le.themeVariables=Qe[e.theme].getThemeVariables(e.themeVariables)),vs(le,$r),le),"setSiteConfig"),ob=p(e=>{Aa=Ot({},e)},"saveConfigFromInitialize"),lb=p(e=>(le=Ot(le,e),vs(le,$r),le),"updateSiteConfig"),Lf=p(()=>Ot({},le),"getSiteConfig"),Bf=p(e=>($f(e),Ot(pn,e),Zt()),"setConfig"),Zt=p(()=>Ot({},pn),"getConfig"),Ef=p(e=>{e&&(["secure",...le.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.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"&&Ef(e[t])}))},"sanitize"),cb=p(e=>{Ma(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),$r.push(e),vs(le,$r)},"addDirective"),La=p((e=le)=>{$r=[],vs(e,$r)},"reset"),hb={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},vh={},ub=p(e=>{vh[e]||(P.warn(hb[e]),vh[e]=!0)},"issueWarning"),$f=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ub("LAZY_LOAD_DEPRECATED")},"checkConfig"),o3=p(()=>{let e={};Aa&&(e=Ot(e,Aa));for(const t of $r)e=Ot(e,t);return e},"getUserDefinedConfig"),$n=/<br\s*\/?>/gi,fb=p(e=>e?Of(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),db=(()=>{let e=!1;return()=>{e||(Ff(),e=!0)}})();function Ff(){const e="data-temp-href-target";xi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),xi.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(Ff,"setupDompurifyHooks");var Df=p(e=>(db(),xi.sanitize(e)),"removeScript"),kh=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Df(e):r!=="loose"&&(e=Of(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=yb(e))}return e},"sanitizeMore"),me=p((e,t)=>e&&(t.dompurifyConfig?e=xi.sanitize(kh(e,t),t.dompurifyConfig).toString():e=xi.sanitize(kh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),pb=p((e,t)=>typeof e=="string"?me(e,t):e.flat().map(r=>me(r,t)),"sanitizeTextOrArray"),gb=p(e=>$n.test(e),"hasBreaks"),mb=p(e=>e.split($n),"splitBreaks"),yb=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Of=p(e=>e.replace($n,"#br#"),"breakToPlaceholder"),xb=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"),It=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),bb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),_b=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Sh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],s=t[i+1];wb(a,s)&&(n=a+","+s,i++,r.pop())}r.push(Cb(n))}return r.join("")},"parseGenericTypes"),Ho=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),wb=p((e,t)=>{const r=Ho(e,"~"),i=Ho(t,"~");return r===1&&i===1},"shouldCombineSets"),Cb=p(e=>{const t=Ho(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Th=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Uo=/\$\$(.*)\$\$/g,_i=p(e=>(e.match(Uo)?.length??0)>0,"hasKatex"),l3=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ul(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),vb=p(async(e,t)=>{if(!_i(e))return e;if(!(Th()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Uo,"MathML is unsupported in this environment.");{const{default:r}=await _t(async()=>{const{default:n}=await import("./katex-C-M49wc6.js");return{default:n}},[]),i=t.forceLegacyMathML||!Th()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split($n).map(n=>_i(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Uo,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ul=p(async(e,t)=>me(await vb(e,t),t),"renderKatexSanitized"),Bi={getRows:fb,sanitizeText:me,sanitizeTextOrArray:pb,hasBreaks:gb,splitBreaks:mb,lineBreakRegex:$n,removeScript:Df,getUrl:xb,evaluate:It,getMax:bb,getMin:_b},kb=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Sb=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"),Rf=p(function(e,t,r,i){const n=Sb(t,r,i);kb(e,n)},"configureSvgSize"),Tb=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,s=n.height;P.info(`SVG bounds: ${a}x${s}`,n);let o=0,l=0;P.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,P.info(`Calculated bounds: ${o}x${l}`),Rf(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),fa={},Mb=p((e,t,r)=>{let i="";return e in fa&&fa[e]?i=fa[e](r):P.warn(`No theme found for ${e}`),` & {
5
5
  font-family: ${r.fontFamily};
6
6
  font-size: ${r.fontSize};
7
7
  fill: ${r.textColor}
@@ -77,45 +77,45 @@ const hx="modulepreload",ux=function(e){return"/"+e},uh={},_t=function(t,r,i){le
77
77
  ${i}
78
78
 
79
79
  ${t}
80
- `},"getStyles"),Ab=p((e,t)=>{t!==void 0&&(fa[e]=t)},"addStylesForDiagram"),Lb=Mb,Rf={};yx(Rf,{clear:()=>Bb,getAccDescription:()=>Db,getAccTitle:()=>$b,getDiagramTitle:()=>Rb,setAccDescription:()=>Fb,setAccTitle:()=>Eb,setDiagramTitle:()=>Ob});var Ul="",jl="",Yl="",Gl=p(e=>me(e,Zt()),"sanitizeText"),Bb=p(()=>{Ul="",Yl="",jl=""},"clear"),Eb=p(e=>{Ul=Gl(e).replace(/^\s+/g,"")},"setAccTitle"),$b=p(()=>Ul,"getAccTitle"),Fb=p(e=>{Yl=Gl(e).replace(/\n\s+/g,`
81
- `)},"setAccDescription"),Db=p(()=>Yl,"getAccDescription"),Ob=p(e=>{jl=Gl(e)},"setDiagramTitle"),Rb=p(()=>jl,"getDiagramTitle"),Th=P,Ib=Wl,xt=Zt,c3=Lf,h3=xi,Vl=p(e=>me(e,xt()),"sanitizeText"),Pb=Tb,Nb=p(()=>Rf,"getCommonDb"),Ba={},Ea=p((e,t,r)=>{Ba[e]&&Th.warn(`Diagram with id ${e} already registered. Overwriting.`),Ba[e]=t,r&&kf(e,r),Ab(e,t.styles),t.injectUtils?.(Th,Ib,xt,Vl,Pb,Nb(),()=>{})},"registerDiagram"),Uo=p(e=>{if(e in Ba)return Ba[e];throw new zb(e)},"getDiagram"),gi,zb=(gi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(gi,"DiagramNotFoundError"),gi);function da(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wb(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xl(e){let t,r,i;e.length!==2?(t=da,r=(o,l)=>da(e(o),l),i=(o,l)=>e(o)-l):(t=e===da||e===Wb?e:qb,r=e,i=e);function n(o,l,c=0,h=o.length){if(c<h){if(t(l,l)!==0)return h;do{const u=c+h>>>1;r(o[u],l)<0?c=u+1:h=u}while(c<h)}return c}function a(o,l,c=0,h=o.length){if(c<h){if(t(l,l)!==0)return h;do{const u=c+h>>>1;r(o[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(o,l,c=0,h=o.length){const u=n(o,l,c,h-1);return u>c&&i(o[u-1],l)>-i(o[u],l)?u-1:u}return{left:n,center:s,right:a}}function qb(){return 0}function Hb(e){return e===null?NaN:+e}const Ub=Xl(da),jb=Ub.right;Xl(Hb).center;class Mh extends Map{constructor(t,r=Vb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,n]of t)this.set(i,n)}get(t){return super.get(Ah(this,t))}has(t){return super.has(Ah(this,t))}set(t,r){return super.set(Yb(this,t),r)}delete(t){return super.delete(Gb(this,t))}}function Ah({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function Yb({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function Gb({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function Vb(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Xb=Math.sqrt(50),Zb=Math.sqrt(10),Kb=Math.sqrt(2);function $a(e,t,r){const i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=a>=Xb?10:a>=Zb?5:a>=Kb?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/s,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=r&&r<2?$a(e,t,r*2):[o,l,c]}function Qb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[n,a,s]=i?$a(t,e,r):$a(e,t,r);if(!(a>=n))return[];const o=a-n+1,l=new Array(o);if(i)if(s<0)for(let c=0;c<o;++c)l[c]=(a-c)/-s;else for(let c=0;c<o;++c)l[c]=(a-c)*s;else if(s<0)for(let c=0;c<o;++c)l[c]=(n+c)/-s;else for(let c=0;c<o;++c)l[c]=(n+c)*s;return l}function jo(e,t,r){return t=+t,e=+e,r=+r,$a(e,t,r)[2]}function Yo(e,t,r){t=+t,e=+e,r=+r;const i=t<e,n=i?jo(t,e,r):jo(e,t,r);return(i?-1:1)*(n<0?1/-n:n)}function u3(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function f3(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function Jb(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(n);++i<n;)a[i]=e+i*r;return a}function t1(e){return e}var pa=1,uo=2,Go=3,Vn=4,Lh=1e-6;function e1(e){return"translate("+e+",0)"}function r1(e){return"translate(0,"+e+")"}function i1(e){return t=>+e(t)}function n1(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function a1(){return!this.__axis}function If(e,t){var r=[],i=null,n=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===pa||e===Vn?-1:1,h=e===Vn||e===uo?"x":"y",u=e===pa||e===Go?e1:r1;function f(d){var g=i??(t.ticks?t.ticks.apply(t,r):t.domain()),m=n??(t.tickFormat?t.tickFormat.apply(t,r):t1),y=Math.max(a,0)+o,x=t.range(),b=+x[0]+l,_=+x[x.length-1]+l,w=(t.bandwidth?n1:i1)(t.copy(),l),C=d.selection?d.selection():d,v=C.selectAll(".domain").data([null]),S=C.selectAll(".tick").data(g,t).order(),O=S.exit(),I=S.enter().append("g").attr("class","tick"),R=S.select("line"),B=S.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(I),R=R.merge(I.append("line").attr("stroke","currentColor").attr(h+"2",c*a)),B=B.merge(I.append("text").attr("fill","currentColor").attr(h,c*y).attr("dy",e===pa?"0em":e===Go?"0.71em":"0.32em")),d!==C&&(v=v.transition(d),S=S.transition(d),R=R.transition(d),B=B.transition(d),O=O.transition(d).attr("opacity",Lh).attr("transform",function($){return isFinite($=w($))?u($+l):this.getAttribute("transform")}),I.attr("opacity",Lh).attr("transform",function($){var L=this.parentNode.__axis;return u((L&&isFinite(L=L($))?L:w($))+l)})),O.remove(),v.attr("d",e===Vn||e===uo?s?"M"+c*s+","+b+"H"+l+"V"+_+"H"+c*s:"M"+l+","+b+"V"+_:s?"M"+b+","+c*s+"V"+l+"H"+_+"V"+c*s:"M"+b+","+l+"H"+_),S.attr("opacity",1).attr("transform",function($){return u(w($)+l)}),R.attr(h+"2",c*a),B.attr(h,c*y).text(m),C.filter(a1).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===uo?"start":e===Vn?"end":"middle"),C.each(function(){this.__axis=w})}return f.scale=function(d){return arguments.length?(t=d,f):t},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(r=d==null?[]:Array.from(d),f):r.slice()},f.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),f):i&&i.slice()},f.tickFormat=function(d){return arguments.length?(n=d,f):n},f.tickSize=function(d){return arguments.length?(a=s=+d,f):a},f.tickSizeInner=function(d){return arguments.length?(a=+d,f):a},f.tickSizeOuter=function(d){return arguments.length?(s=+d,f):s},f.tickPadding=function(d){return arguments.length?(o=+d,f):o},f.offset=function(d){return arguments.length?(l=+d,f):l},f}function d3(e){return If(pa,e)}function p3(e){return If(Go,e)}var s1={value:()=>{}};function Pf(){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 ga(r)}function ga(e){this._=e}function o1(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}ga.prototype=Pf.prototype={constructor:ga,on:function(e,t){var r=this._,i=o1(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((n=(e=i[a]).type)&&(n=l1(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=i[a]).type)r[n]=Bh(r[n],e.name,t);else if(t==null)for(n in r)r[n]=Bh(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new ga(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function l1(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function Bh(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=s1,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Vo="http://www.w3.org/1999/xhtml";const Eh={svg:"http://www.w3.org/2000/svg",xhtml:Vo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ks(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Eh.hasOwnProperty(t)?{space:Eh[t],local:e}:e}function c1(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Vo&&t.documentElement.namespaceURI===Vo?t.createElement(e):t.createElementNS(r,e)}}function h1(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Nf(e){var t=ks(e);return(t.local?h1:c1)(t)}function u1(){}function Zl(e){return e==null?u1:function(){return this.querySelector(e)}}function f1(e){typeof e!="function"&&(e=Zl(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=new Array(s),l,c,h=0;h<s;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new fe(i,this._parents)}function d1(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function p1(){return[]}function zf(e){return e==null?p1:function(){return this.querySelectorAll(e)}}function g1(e){return function(){return d1(e.apply(this,arguments))}}function m1(e){typeof e=="function"?e=g1(e):e=zf(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(i.push(e.call(l,l.__data__,c,s)),n.push(l));return new fe(i,n)}function Wf(e){return function(){return this.matches(e)}}function qf(e){return function(t){return t.matches(e)}}var y1=Array.prototype.find;function x1(e){return function(){return y1.call(this.children,e)}}function b1(){return this.firstElementChild}function _1(e){return this.select(e==null?b1:x1(typeof e=="function"?e:qf(e)))}var w1=Array.prototype.filter;function C1(){return Array.from(this.children)}function v1(e){return function(){return w1.call(this.children,e)}}function k1(e){return this.selectAll(e==null?C1:v1(typeof e=="function"?e:qf(e)))}function S1(e){typeof e!="function"&&(e=Wf(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new fe(i,this._parents)}function Hf(e){return new Array(e.length)}function T1(){return new fe(this._enter||this._groups.map(Hf),this._parents)}function Fa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Fa.prototype={constructor:Fa,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 M1(e){return function(){return e}}function A1(e,t,r,i,n,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],i[s]=o):r[s]=new Fa(e,a[s]);for(;s<l;++s)(o=t[s])&&(n[s]=o)}function L1(e,t,r,i,n,a,s){var o,l,c=new Map,h=t.length,u=a.length,f=new Array(h),d;for(o=0;o<h;++o)(l=t[o])&&(f[o]=d=s.call(l,l.__data__,o,t)+"",c.has(d)?n[o]=l:c.set(d,l));for(o=0;o<u;++o)d=s.call(e,a[o],o,a)+"",(l=c.get(d))?(i[o]=l,l.__data__=a[o],c.delete(d)):r[o]=new Fa(e,a[o]);for(o=0;o<h;++o)(l=t[o])&&c.get(f[o])===l&&(n[o]=l)}function B1(e){return e.__data__}function E1(e,t){if(!arguments.length)return Array.from(this,B1);var r=t?L1:A1,i=this._parents,n=this._groups;typeof e!="function"&&(e=M1(e));for(var a=n.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],f=u.length,d=$1(e.call(h,h&&h.__data__,c,i)),g=d.length,m=o[c]=new Array(g),y=s[c]=new Array(g),x=l[c]=new Array(f);r(h,u,m,y,x,d,t);for(var b=0,_=0,w,C;b<g;++b)if(w=m[b]){for(b>=_&&(_=b+1);!(C=y[_])&&++_<g;);w._next=C||null}}return s=new fe(s,i),s._enter=o,s._exit=l,s}function $1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function F1(){return new fe(this._exit||this._groups.map(Hf),this._parents)}function D1(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function O1(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,s=Math.min(n,a),o=new Array(n),l=0;l<s;++l)for(var c=r[l],h=i[l],u=c.length,f=o[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(f[g]=d);for(;l<n;++l)o[l]=r[l];return new fe(o,this._parents)}function R1(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],s;--n>=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function I1(e){e||(e=P1);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var s=r[a],o=s.length,l=n[a]=new Array(o),c,h=0;h<o;++h)(c=s[h])&&(l[h]=c);l.sort(t)}return new fe(n,this._parents).order()}function P1(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function N1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function z1(){return Array.from(this)}function W1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}function q1(){let e=0;for(const t of this)++e;return e}function H1(){return!this.node()}function U1(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,s=n.length,o;a<s;++a)(o=n[a])&&e.call(o,o.__data__,a,n);return this}function j1(e){return function(){this.removeAttribute(e)}}function Y1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function G1(e,t){return function(){this.setAttribute(e,t)}}function V1(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function X1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Z1(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 K1(e,t){var r=ks(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?Y1:j1:typeof t=="function"?r.local?Z1:X1:r.local?V1:G1)(r,t))}function Uf(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Q1(e){return function(){this.style.removeProperty(e)}}function J1(e,t,r){return function(){this.style.setProperty(e,t,r)}}function t2(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function e2(e,t,r){return arguments.length>1?this.each((t==null?Q1:typeof t=="function"?t2:J1)(e,t,r??"")):_i(this.node(),e)}function _i(e,t){return e.style.getPropertyValue(t)||Uf(e).getComputedStyle(e,null).getPropertyValue(t)}function r2(e){return function(){delete this[e]}}function i2(e,t){return function(){this[e]=t}}function n2(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function a2(e,t){return arguments.length>1?this.each((t==null?r2:typeof t=="function"?n2:i2)(e,t)):this.node()[e]}function jf(e){return e.trim().split(/^|\s+/)}function Kl(e){return e.classList||new Yf(e)}function Yf(e){this._node=e,this._names=jf(e.getAttribute("class")||"")}Yf.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 Gf(e,t){for(var r=Kl(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Vf(e,t){for(var r=Kl(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function s2(e){return function(){Gf(this,e)}}function o2(e){return function(){Vf(this,e)}}function l2(e,t){return function(){(t.apply(this,arguments)?Gf:Vf)(this,e)}}function c2(e,t){var r=jf(e+"");if(arguments.length<2){for(var i=Kl(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?l2:t?s2:o2)(r,t))}function h2(){this.textContent=""}function u2(e){return function(){this.textContent=e}}function f2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function d2(e){return arguments.length?this.each(e==null?h2:(typeof e=="function"?f2:u2)(e)):this.node().textContent}function p2(){this.innerHTML=""}function g2(e){return function(){this.innerHTML=e}}function m2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function y2(e){return arguments.length?this.each(e==null?p2:(typeof e=="function"?m2:g2)(e)):this.node().innerHTML}function x2(){this.nextSibling&&this.parentNode.appendChild(this)}function b2(){return this.each(x2)}function _2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function w2(){return this.each(_2)}function C2(e){var t=typeof e=="function"?e:Nf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function v2(){return null}function k2(e,t){var r=typeof e=="function"?e:Nf(e),i=t==null?v2:typeof t=="function"?t:Zl(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function S2(){var e=this.parentNode;e&&e.removeChild(this)}function T2(){return this.each(S2)}function M2(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function A2(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function L2(e){return this.select(e?A2:M2)}function B2(e){return arguments.length?this.property("__data__",e):this.node().__data__}function E2(e){return function(t){e.call(this,t,this.__data__)}}function $2(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 F2(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function D2(e,t,r){return function(){var i=this.__on,n,a=E2(t);if(i){for(var s=0,o=i.length;s<o;++s)if((n=i[s]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function O2(e,t,r){var i=$2(e+""),n,a=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,h;l<c;++l)for(n=0,h=o[l];n<a;++n)if((s=i[n]).type===h.type&&s.name===h.name)return h.value}return}for(o=t?D2:F2,n=0;n<a;++n)this.each(o(i[n],t,r));return this}function Xf(e,t,r){var i=Uf(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function R2(e,t){return function(){return Xf(this,e,t)}}function I2(e,t){return function(){return Xf(this,e,t.apply(this,arguments))}}function P2(e,t){return this.each((typeof t=="function"?I2:R2)(e,t))}function*N2(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,s;n<a;++n)(s=i[n])&&(yield s)}var Zf=[null];function fe(e,t){this._groups=e,this._parents=t}function En(){return new fe([[document.documentElement]],Zf)}function z2(){return this}fe.prototype=En.prototype={constructor:fe,select:f1,selectAll:m1,selectChild:_1,selectChildren:k1,filter:S1,data:E1,enter:T1,exit:F1,join:D1,merge:O1,selection:z2,order:R1,sort:I1,call:N1,nodes:z1,node:W1,size:q1,empty:H1,each:U1,attr:K1,style:e2,property:a2,classed:c2,text:d2,html:y2,raise:b2,lower:w2,append:C2,insert:k2,remove:T2,clone:L2,datum:B2,on:O2,dispatch:P2,[Symbol.iterator]:N2};function pt(e){return typeof e=="string"?new fe([[document.querySelector(e)]],[document.documentElement]):new fe([[e]],Zf)}function $n(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ss(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Nr(){}var mn=.7,Da=1/mn,si="\\s*([+-]?\\d+)\\s*",yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W2=/^#([0-9a-f]{3,8})$/,q2=new RegExp(`^rgb\\(${si},${si},${si}\\)$`),H2=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),U2=new RegExp(`^rgba\\(${si},${si},${si},${yn}\\)$`),j2=new RegExp(`^rgba\\(${Re},${Re},${Re},${yn}\\)$`),Y2=new RegExp(`^hsl\\(${yn},${Re},${Re}\\)$`),G2=new RegExp(`^hsla\\(${yn},${Re},${Re},${yn}\\)$`),$h={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};$n(Nr,$r,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Fh,formatHex:Fh,formatHex8:V2,formatHsl:X2,formatRgb:Dh,toString:Dh});function Fh(){return this.rgb().formatHex()}function V2(){return this.rgb().formatHex8()}function X2(){return Qf(this).formatHsl()}function Dh(){return this.rgb().formatRgb()}function $r(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=W2.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Oh(t):r===3?new Xt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Xn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Xn(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=q2.exec(e))?new Xt(t[1],t[2],t[3],1):(t=H2.exec(e))?new Xt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=U2.exec(e))?Xn(t[1],t[2],t[3],t[4]):(t=j2.exec(e))?Xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Y2.exec(e))?Ph(t[1],t[2]/100,t[3]/100,1):(t=G2.exec(e))?Ph(t[1],t[2]/100,t[3]/100,t[4]):$h.hasOwnProperty(e)?Oh($h[e]):e==="transparent"?new Xt(NaN,NaN,NaN,0):null}function Oh(e){return new Xt(e>>16&255,e>>8&255,e&255,1)}function Xn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Xt(e,t,r,i)}function Kf(e){return e instanceof Nr||(e=$r(e)),e?(e=e.rgb(),new Xt(e.r,e.g,e.b,e.opacity)):new Xt}function Xo(e,t,r,i){return arguments.length===1?Kf(e):new Xt(e,t,r,i??1)}function Xt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}$n(Xt,Xo,Ss(Nr,{brighter(e){return e=e==null?Da:Math.pow(Da,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mn:Math.pow(mn,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xt(Ar(this.r),Ar(this.g),Ar(this.b),Oa(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:Rh,formatHex:Rh,formatHex8:Z2,formatRgb:Ih,toString:Ih}));function Rh(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}`}function Z2(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}${kr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ih(){const e=Oa(this.opacity);return`${e===1?"rgb(":"rgba("}${Ar(this.r)}, ${Ar(this.g)}, ${Ar(this.b)}${e===1?")":`, ${e})`}`}function Oa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ar(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kr(e){return e=Ar(e),(e<16?"0":"")+e.toString(16)}function Ph(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ce(e,t,r,i)}function Qf(e){if(e instanceof Ce)return new Ce(e.h,e.s,e.l,e.opacity);if(e instanceof Nr||(e=$r(e)),!e)return new Ce;if(e instanceof Ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,o=a-n,l=(a+n)/2;return o?(t===a?s=(r-i)/o+(r<i)*6:r===a?s=(i-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=l>0&&l<1?0:s,new Ce(s,o,l,e.opacity)}function K2(e,t,r,i){return arguments.length===1?Qf(e):new Ce(e,t,r,i??1)}function Ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}$n(Ce,K2,Ss(Nr,{brighter(e){return e=e==null?Da:Math.pow(Da,e),new Ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mn:Math.pow(mn,e),new Ce(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,n=2*r-i;return new Xt(fo(e>=240?e-240:e+120,n,i),fo(e,n,i),fo(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Ce(Nh(this.h),Zn(this.s),Zn(this.l),Oa(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=Oa(this.opacity);return`${e===1?"hsl(":"hsla("}${Nh(this.h)}, ${Zn(this.s)*100}%, ${Zn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Nh(e){return e=(e||0)%360,e<0?e+360:e}function Zn(e){return Math.max(0,Math.min(1,e||0))}function fo(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 Q2=Math.PI/180,J2=180/Math.PI,Ra=18,Jf=.96422,td=1,ed=.82521,rd=4/29,oi=6/29,id=3*oi*oi,t_=oi*oi*oi;function nd(e){if(e instanceof Ie)return new Ie(e.l,e.a,e.b,e.opacity);if(e instanceof Xe)return ad(e);e instanceof Xt||(e=Kf(e));var t=yo(e.r),r=yo(e.g),i=yo(e.b),n=po((.2225045*t+.7168786*r+.0606169*i)/td),a,s;return t===r&&r===i?a=s=n:(a=po((.4360747*t+.3850649*r+.1430804*i)/Jf),s=po((.0139322*t+.0971045*r+.7141733*i)/ed)),new Ie(116*n-16,500*(a-n),200*(n-s),e.opacity)}function e_(e,t,r,i){return arguments.length===1?nd(e):new Ie(e,t,r,i??1)}function Ie(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}$n(Ie,e_,Ss(Nr,{brighter(e){return new Ie(this.l+Ra*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ie(this.l-Ra*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=Jf*go(t),e=td*go(e),r=ed*go(r),new Xt(mo(3.1338561*t-1.6168667*e-.4906146*r),mo(-.9787684*t+1.9161415*e+.033454*r),mo(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function po(e){return e>t_?Math.pow(e,1/3):e/id+rd}function go(e){return e>oi?e*e*e:id*(e-rd)}function mo(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yo(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function r_(e){if(e instanceof Xe)return new Xe(e.h,e.c,e.l,e.opacity);if(e instanceof Ie||(e=nd(e)),e.a===0&&e.b===0)return new Xe(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*J2;return new Xe(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Zo(e,t,r,i){return arguments.length===1?r_(e):new Xe(e,t,r,i??1)}function Xe(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function ad(e){if(isNaN(e.h))return new Ie(e.l,0,0,e.opacity);var t=e.h*Q2;return new Ie(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}$n(Xe,Zo,Ss(Nr,{brighter(e){return new Xe(this.h,this.c,this.l+Ra*(e??1),this.opacity)},darker(e){return new Xe(this.h,this.c,this.l-Ra*(e??1),this.opacity)},rgb(){return ad(this).rgb()}}));const Ts=e=>()=>e;function sd(e,t){return function(r){return e+r*t}}function i_(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 n_(e,t){var r=t-e;return r?sd(e,r>180||r<-180?r-360*Math.round(r/360):r):Ts(isNaN(e)?t:e)}function a_(e){return(e=+e)==1?dn:function(t,r){return r-t?i_(t,r,e):Ts(isNaN(t)?r:t)}}function dn(e,t){var r=t-e;return r?sd(e,r):Ts(isNaN(e)?t:e)}const Ia=(function e(t){var r=a_(t);function i(n,a){var s=r((n=Xo(n)).r,(a=Xo(a)).r),o=r(n.g,a.g),l=r(n.b,a.b),c=dn(n.opacity,a.opacity);return function(h){return n.r=s(h),n.g=o(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function s_(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}}function o_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function l_(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),s;for(s=0;s<i;++s)n[s]=Ql(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(o){for(s=0;s<i;++s)a[s]=n[s](o);return a}}function c_(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function be(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function h_(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=Ql(e[n],t[n]):i[n]=t[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var Ko=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xo=new RegExp(Ko.source,"g");function u_(e){return function(){return e}}function f_(e){return function(t){return e(t)+""}}function od(e,t){var r=Ko.lastIndex=xo.lastIndex=0,i,n,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Ko.exec(e))&&(n=xo.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:be(i,n)})),r=xo.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?f_(l[0].x):u_(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)o[(u=l[h]).i]=u.x(c);return o.join("")})}function Ql(e,t){var r=typeof t,i;return t==null||r==="boolean"?Ts(t):(r==="number"?be:r==="string"?(i=$r(t))?(t=i,Ia):od:t instanceof $r?Ia:t instanceof Date?c_:o_(t)?s_:Array.isArray(t)?l_:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?h_:be)(e,t)}function d_(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var zh=180/Math.PI,Qo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ld(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*zh,skewX:Math.atan(l)*zh,scaleX:s,scaleY:o}}var Kn;function p_(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qo:ld(t.a,t.b,t.c,t.d,t.e,t.f)}function g_(e){return e==null||(Kn||(Kn=document.createElementNS("http://www.w3.org/2000/svg","g")),Kn.setAttribute("transform",e),!(e=Kn.transform.baseVal.consolidate()))?Qo:(e=e.matrix,ld(e.a,e.b,e.c,e.d,e.e,e.f))}function cd(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:be(c,u)},{i:m-2,x:be(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:be(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function o(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:be(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push(n(d)+"scale(",null,",",null,")");g.push({i:m-4,x:be(c,u)},{i:m-2,x:be(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),o(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,m=f.length,y;++g<m;)u[(y=f[g]).i]=y.x(d);return u.join("")}}}var m_=cd(p_,"px, ","px)","deg)"),y_=cd(g_,", ",")",")");function x_(e){return function(t,r){var i=e((t=Zo(t)).h,(r=Zo(r)).h),n=dn(t.c,r.c),a=dn(t.l,r.l),s=dn(t.opacity,r.opacity);return function(o){return t.h=i(o),t.c=n(o),t.l=a(o),t.opacity=s(o),t+""}}}const g3=x_(n_);var wi=0,tn=0,qi=0,hd=1e3,Pa,en,Na=0,Fr=0,Ms=0,xn=typeof performance=="object"&&performance.now?performance:Date,ud=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Jl(){return Fr||(ud(b_),Fr=xn.now()+Ms)}function b_(){Fr=0}function za(){this._call=this._time=this._next=null}za.prototype=fd.prototype={constructor:za,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Jl():+r)+(t==null?0:+t),!this._next&&en!==this&&(en?en._next=this:Pa=this,en=this),this._call=e,this._time=r,Jo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jo())}};function fd(e,t,r){var i=new za;return i.restart(e,t,r),i}function __(){Jl(),++wi;for(var e=Pa,t;e;)(t=Fr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--wi}function Wh(){Fr=(Na=xn.now())+Ms,wi=tn=0;try{__()}finally{wi=0,C_(),Fr=0}}function w_(){var e=xn.now(),t=e-Na;t>hd&&(Ms-=t,Na=e)}function C_(){for(var e,t=Pa,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:Pa=r);en=e,Jo(i)}function Jo(e){if(!wi){tn&&(tn=clearTimeout(tn));var t=e-Fr;t>24?(e<1/0&&(tn=setTimeout(Wh,e-xn.now()-Ms)),qi&&(qi=clearInterval(qi))):(qi||(Na=xn.now(),qi=setInterval(w_,hd)),wi=1,ud(Wh))}}function qh(e,t,r){var i=new za;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var v_=Pf("start","end","cancel","interrupt"),k_=[],dd=0,Hh=1,tl=2,ma=3,Uh=4,el=5,ya=6;function As(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;S_(e,r,{name:t,index:i,group:n,on:v_,tween:k_,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:dd})}function tc(e,t){var r=Me(e,t);if(r.state>dd)throw new Error("too late; already scheduled");return r}function Ne(e,t){var r=Me(e,t);if(r.state>ma)throw new Error("too late; already running");return r}function Me(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function S_(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=fd(a,0,r.time);function a(c){r.state=Hh,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,f,d;if(r.state!==Hh)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===ma)return qh(s);d.state===Uh?(d.state=ya,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=ya,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(qh(function(){r.state===ma&&(r.state=Uh,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=tl,r.on.call("start",e,e.__data__,r.index,r.group),r.state===tl){for(r.state=ma,n=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))&&(n[++u]=d);n.length=u+1}}function o(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=el,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===el&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=ya,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function T_(e,t){var r=e.__transition,i,n,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((i=r[s]).name!==t){a=!1;continue}n=i.state>tl&&i.state<el,i.state=ya,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function M_(e){return this.each(function(){T_(this,e)})}function A_(e,t){var r,i;return function(){var n=Ne(this,e),a=n.tween;if(a!==r){i=r=a;for(var s=0,o=i.length;s<o;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}n.tween=i}}function L_(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=Ne(this,e),s=a.tween;if(s!==i){n=(i=s).slice();for(var o={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=o;break}l===c&&n.push(o)}a.tween=n}}function B_(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Me(this.node(),r).tween,n=0,a=i.length,s;n<a;++n)if((s=i[n]).name===e)return s.value;return null}return this.each((t==null?A_:L_)(r,e,t))}function ec(e,t,r){var i=e._id;return e.each(function(){var n=Ne(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return Me(n,i).value[t]}}function pd(e,t){var r;return(typeof t=="number"?be:t instanceof $r?Ia:(r=$r(t))?(t=r,Ia):od)(e,t)}function E_(e){return function(){this.removeAttribute(e)}}function $_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function F_(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttribute(e);return s===n?null:s===i?a:a=t(i=s,r)}}function D_(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===n?null:s===i?a:a=t(i=s,r)}}function O_(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function R_(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function I_(e,t){var r=ks(e),i=r==="transform"?y_:pd;return this.attrTween(e,typeof t=="function"?(r.local?R_:O_)(r,i,ec(this,"attr."+e,t)):t==null?(r.local?$_:E_)(r):(r.local?D_:F_)(r,i,t))}function P_(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function N_(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function z_(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&N_(e,a)),r}return n._value=t,n}function W_(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&P_(e,a)),r}return n._value=t,n}function q_(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=ks(e);return this.tween(r,(i.local?z_:W_)(i,t))}function H_(e,t){return function(){tc(this,e).delay=+t.apply(this,arguments)}}function U_(e,t){return t=+t,function(){tc(this,e).delay=t}}function j_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?H_:U_)(t,e)):Me(this.node(),t).delay}function Y_(e,t){return function(){Ne(this,e).duration=+t.apply(this,arguments)}}function G_(e,t){return t=+t,function(){Ne(this,e).duration=t}}function V_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Y_:G_)(t,e)):Me(this.node(),t).duration}function X_(e,t){if(typeof t!="function")throw new Error;return function(){Ne(this,e).ease=t}}function Z_(e){var t=this._id;return arguments.length?this.each(X_(t,e)):Me(this.node(),t).ease}function K_(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ne(this,e).ease=r}}function Q_(e){if(typeof e!="function")throw new Error;return this.each(K_(this._id,e))}function J_(e){typeof e!="function"&&(e=Wf(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new tr(i,this._parents,this._name,this._id)}function tw(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),s=new Array(i),o=0;o<a;++o)for(var l=t[o],c=r[o],h=l.length,u=s[o]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;o<i;++o)s[o]=t[o];return new tr(s,this._parents,this._name,this._id)}function ew(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 rw(e,t,r){var i,n,a=ew(t)?tc:Ne;return function(){var s=a(this,e),o=s.on;o!==i&&(n=(i=o).copy()).on(t,r),s.on=n}}function iw(e,t){var r=this._id;return arguments.length<2?Me(this.node(),r).on.on(e):this.each(rw(r,e,t))}function nw(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function aw(){return this.on("end.remove",nw(this._id))}function sw(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Zl(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o=i[s],l=o.length,c=a[s]=new Array(l),h,u,f=0;f<l;++f)(h=o[f])&&(u=e.call(h,h.__data__,f,o))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,As(c[f],t,r,f,c,Me(h,r)));return new tr(a,this._parents,t,r)}function ow(e){var t=this._name,r=this._id;typeof e!="function"&&(e=zf(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l=i[o],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,g=Me(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&As(d,t,r,m,f,g);a.push(f),s.push(h)}return new tr(a,s,t,r)}var lw=En.prototype.constructor;function cw(){return new lw(this._groups,this._parents)}function hw(e,t){var r,i,n;return function(){var a=_i(this,e),s=(this.style.removeProperty(e),_i(this,e));return a===s?null:a===r&&s===i?n:n=t(r=a,i=s)}}function gd(e){return function(){this.style.removeProperty(e)}}function uw(e,t,r){var i,n=r+"",a;return function(){var s=_i(this,e);return s===n?null:s===i?a:a=t(i=s,r)}}function fw(e,t,r){var i,n,a;return function(){var s=_i(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),_i(this,e))),s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o))}}function dw(e,t){var r,i,n,a="style."+t,s="end."+a,o;return function(){var l=Ne(this,e),c=l.on,h=l.value[a]==null?o||(o=gd(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(s,n=h),l.on=i}}function pw(e,t,r){var i=(e+="")=="transform"?m_:pd;return t==null?this.styleTween(e,hw(e,i)).on("end.style."+e,gd(e)):typeof t=="function"?this.styleTween(e,fw(e,i,ec(this,"style."+e,t))).each(dw(this._id,e)):this.styleTween(e,uw(e,i,t),r).on("end.style."+e,null)}function gw(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function mw(e,t,r){var i,n;function a(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&gw(e,s,r)),i}return a._value=t,a}function yw(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,mw(e,t,r??""))}function xw(e){return function(){this.textContent=e}}function bw(e){return function(){var t=e(this);this.textContent=t??""}}function _w(e){return this.tween("text",typeof e=="function"?bw(ec(this,"text",e)):xw(e==null?"":e+""))}function ww(e){return function(t){this.textContent=e.call(this,t)}}function Cw(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&ww(n)),t}return i._value=e,i}function vw(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,Cw(e))}function kw(){for(var e=this._name,t=this._id,r=md(),i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var h=Me(l,t);As(l,e,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new tr(i,this._parents,e,r)}function Sw(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--n===0&&a()}};r.each(function(){var c=Ne(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),n===0&&a()})}var Tw=0;function tr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function md(){return++Tw}var Ye=En.prototype;tr.prototype={constructor:tr,select:sw,selectAll:ow,selectChild:Ye.selectChild,selectChildren:Ye.selectChildren,filter:J_,merge:tw,selection:cw,transition:kw,call:Ye.call,nodes:Ye.nodes,node:Ye.node,size:Ye.size,empty:Ye.empty,each:Ye.each,on:iw,attr:I_,attrTween:q_,style:pw,styleTween:yw,text:_w,textTween:vw,remove:aw,tween:B_,delay:j_,duration:V_,ease:Z_,easeVarying:Q_,end:Sw,[Symbol.iterator]:Ye[Symbol.iterator]};function Mw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Aw={time:null,delay:0,duration:250,ease:Mw};function Lw(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 Bw(e){var t,r;e instanceof tr?(t=e._id,e=e._name):(t=md(),(r=Aw).time=Jl(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&As(l,e,t,c,s,r||Lw(l,t));return new tr(i,this._parents,e,t)}En.prototype.interrupt=M_;En.prototype.transition=Bw;const rl=Math.PI,il=2*rl,_r=1e-6,Ew=il-_r;function yd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function $w(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return yd;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class Fw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?yd:$w(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,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,s){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=i-t,c=n-r,h=s-t,u=o-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>_r)if(!(Math.abs(u*l-c*h)>_r)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-s,g=n-o,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),_=a*Math.tan((rl-Math.acos((m+f-y)/(2*x*b)))/2),w=_/b,C=_/x;Math.abs(w-1)>_r&&this._append`L${t+w*h},${r+w*u}`,this._append`A${a},${a},0,0,${+(u*d>h*g)},${this._x1=t+C*l},${this._y1=r+C*c}`}}arc(t,r,i,n,a,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,h=r+l,u=1^s,f=s?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>_r||Math.abs(this._y1-h)>_r)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%il+il),f>Ew?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>_r&&this._append`A${i},${i},0,${+(f>=rl)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Dw(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Wa(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function Ci(e){return e=Wa(Math.abs(e)),e?e[1]:NaN}function Ow(e,t){return function(r,i){for(var n=r.length,a=[],s=0,o=e[0],l=0;n>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),a.push(r.substring(n-=o,n+o)),!((l+=o+1)>i));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function Rw(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Iw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qa(e){if(!(t=Iw.exec(e)))throw new Error("invalid format: "+e);var t;return new rc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}qa.prototype=rc.prototype;function rc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}rc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Pw(e){t:for(var t=e.length,r=1,i=-1,n;r<t;++r)switch(e[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+e[r])break t;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var Ha;function Nw(e,t){var r=Wa(e,t);if(!r)return Ha=void 0,e.toPrecision(t);var i=r[0],n=r[1],a=n-(Ha=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Wa(e,Math.max(0,t+a-1))[0]}function jh(e,t){var r=Wa(e,t);if(!r)return e+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const Yh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Dw,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>jh(e*100,t),r:jh,s:Nw,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Gh(e){return e}var Vh=Array.prototype.map,Xh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zw(e){var t=e.grouping===void 0||e.thousands===void 0?Gh:Ow(Vh.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Gh:Rw(Vh.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(u,f){u=qa(u);var d=u.fill,g=u.align,m=u.sign,y=u.symbol,x=u.zero,b=u.width,_=u.comma,w=u.precision,C=u.trim,v=u.type;v==="n"?(_=!0,v="g"):Yh[v]||(w===void 0&&(w=12),C=!0,v="g"),(x||d==="0"&&g==="=")&&(x=!0,d="0",g="=");var S=(f&&f.prefix!==void 0?f.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),O=(y==="$"?i:/[%p]/.test(v)?s:"")+(f&&f.suffix!==void 0?f.suffix:""),I=Yh[v],R=/[defgprs%]/.test(v);w=w===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function B($){var L=S,T=O,E,A,D;if(v==="c")T=I($)+T,$="";else{$=+$;var F=$<0||1/$<0;if($=isNaN($)?l:I(Math.abs($),w),C&&($=Pw($)),F&&+$==0&&m!=="+"&&(F=!1),L=(F?m==="("?m:o:m==="-"||m==="("?"":m)+L,T=(v==="s"&&!isNaN($)&&Ha!==void 0?Xh[8+Ha/3]:"")+T+(F&&m==="("?")":""),R){for(E=-1,A=$.length;++E<A;)if(D=$.charCodeAt(E),48>D||D>57){T=(D===46?n+$.slice(E+1):$.slice(E))+T,$=$.slice(0,E);break}}}_&&!x&&($=t($,1/0));var U=L.length+$.length+T.length,W=U<b?new Array(b-U+1).join(d):"";switch(_&&x&&($=t(W+$,W.length?b-T.length:1/0),W=""),g){case"<":$=L+$+T+W;break;case"=":$=L+W+$+T;break;case"^":$=W.slice(0,U=W.length>>1)+L+$+T+W.slice(U);break;default:$=W+L+$+T;break}return a($)}return B.toString=function(){return u+""},B}function h(u,f){var d=Math.max(-8,Math.min(8,Math.floor(Ci(f)/3)))*3,g=Math.pow(10,-d),m=c((u=qa(u),u.type="f",u),{suffix:Xh[8+d/3]});return function(y){return m(g*y)}}return{format:c,formatPrefix:h}}var Qn,xd,bd;Ww({thousands:",",grouping:[3],currency:["$",""]});function Ww(e){return Qn=zw(e),xd=Qn.format,bd=Qn.formatPrefix,Qn}function qw(e){return Math.max(0,-Ci(Math.abs(e)))}function Hw(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ci(t)/3)))*3-Ci(Math.abs(e)))}function Uw(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ci(t)-Ci(e))+1}function jw(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function Yw(){return this.eachAfter(jw)}function Gw(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function Vw(e,t){for(var r=this,i=[r],n,a,s=-1;r=i.pop();)if(e.call(t,r,++s,this),n=r.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}function Xw(e,t){for(var r=this,i=[r],n=[],a,s,o,l=-1;r=i.pop();)if(n.push(r),a=r.children)for(s=0,o=a.length;s<o;++s)i.push(a[s]);for(;r=n.pop();)e.call(t,r,++l,this);return this}function Zw(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function Kw(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})}function Qw(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Jw(e){for(var t=this,r=tC(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function tC(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}function eC(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function rC(){return Array.from(this)}function iC(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function nC(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*aC(){var e=this,t,r=[e],i,n,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(n=0,a=i.length;n<a;++n)r.push(i[n]);while(r.length)}function _d(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=lC)):t===void 0&&(t=oC);for(var r=new Ua(e),i,n=[r],a,s,o,l;i=n.pop();)if((s=t(i.data))&&(l=(s=Array.from(s)).length))for(i.children=s,o=l-1;o>=0;--o)n.push(a=s[o]=new Ua(s[o])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(hC)}function sC(){return _d(this).eachBefore(cC)}function oC(e){return e.children}function lC(e){return Array.isArray(e)?e[1]:null}function cC(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function hC(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ua(e){this.data=e,this.depth=this.height=0,this.parent=null}Ua.prototype=_d.prototype={constructor:Ua,count:Yw,each:Gw,eachAfter:Xw,eachBefore:Vw,find:Zw,sum:Kw,sort:Qw,path:Jw,ancestors:eC,descendants:rC,leaves:iC,links:nC,copy:sC,[Symbol.iterator]:aC};function uC(e){if(typeof e!="function")throw new Error;return e}function Hi(){return 0}function Ui(e){return function(){return e}}function fC(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function dC(e,t,r,i,n){for(var a=e.children,s,o=-1,l=a.length,c=e.value&&(i-t)/e.value;++o<l;)s=a[o],s.y0=r,s.y1=n,s.x0=t,s.x1=t+=s.value*c}function pC(e,t,r,i,n){for(var a=e.children,s,o=-1,l=a.length,c=e.value&&(n-r)/e.value;++o<l;)s=a[o],s.x0=t,s.x1=i,s.y0=r,s.y1=r+=s.value*c}var gC=(1+Math.sqrt(5))/2;function mC(e,t,r,i,n,a){for(var s=[],o=t.children,l,c,h=0,u=0,f=o.length,d,g,m=t.value,y,x,b,_,w,C,v;h<f;){d=n-r,g=a-i;do y=o[u++].value;while(!y&&u<f);for(x=b=y,C=Math.max(g/d,d/g)/(m*e),v=y*y*C,w=Math.max(b/v,v/x);u<f;++u){if(y+=c=o[u].value,c<x&&(x=c),c>b&&(b=c),v=y*y*C,_=Math.max(b/v,v/x),_>w){y-=c;break}w=_}s.push(l={value:y,dice:d<g,children:o.slice(h,u)}),l.dice?dC(l,r,i,n,m?i+=g*y/m:a):pC(l,r,i,m?r+=d*y/m:n,a),m-=y,h=u}return s}const yC=(function e(t){function r(i,n,a,s,o){mC(t,i,n,a,s,o)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r})(gC);function m3(){var e=yC,t=!1,r=1,i=1,n=[0],a=Hi,s=Hi,o=Hi,l=Hi,c=Hi;function h(f){return f.x0=f.y0=0,f.x1=r,f.y1=i,f.eachBefore(u),n=[0],t&&f.eachBefore(fC),f}function u(f){var d=n[f.depth],g=f.x0+d,m=f.y0+d,y=f.x1-d,x=f.y1-d;y<g&&(g=y=(g+y)/2),x<m&&(m=x=(m+x)/2),f.x0=g,f.y0=m,f.x1=y,f.y1=x,f.children&&(d=n[f.depth+1]=a(f)/2,g+=c(f)-d,m+=s(f)-d,y-=o(f)-d,x-=l(f)-d,y<g&&(g=y=(g+y)/2),x<m&&(m=x=(m+x)/2),e(f,g,m,y,x))}return h.round=function(f){return arguments.length?(t=!!f,h):t},h.size=function(f){return arguments.length?(r=+f[0],i=+f[1],h):[r,i]},h.tile=function(f){return arguments.length?(e=uC(f),h):e},h.padding=function(f){return arguments.length?h.paddingInner(f).paddingOuter(f):h.paddingInner()},h.paddingInner=function(f){return arguments.length?(a=typeof f=="function"?f:Ui(+f),h):a},h.paddingOuter=function(f){return arguments.length?h.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):h.paddingTop()},h.paddingTop=function(f){return arguments.length?(s=typeof f=="function"?f:Ui(+f),h):s},h.paddingRight=function(f){return arguments.length?(o=typeof f=="function"?f:Ui(+f),h):o},h.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Ui(+f),h):l},h.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Ui(+f),h):c},h}function Ls(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Zh=Symbol("implicit");function wd(){var e=new Mh,t=[],r=[],i=Zh;function n(a){let s=e.get(a);if(s===void 0){if(i!==Zh)return i;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return n.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Mh;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return n},n.range=function(a){return arguments.length?(r=Array.from(a),n):r.slice()},n.unknown=function(a){return arguments.length?(i=a,n):i},n.copy=function(){return wd(t,r).unknown(i)},Ls.apply(n,arguments),n}function xC(){var e=wd().unknown(void 0),t=e.domain,r=e.range,i=0,n=1,a,s,o=!1,l=0,c=0,h=.5;delete e.unknown;function u(){var f=t().length,d=n<i,g=d?n:i,m=d?i:n;a=(m-g)/Math.max(1,f-l+c*2),o&&(a=Math.floor(a)),g+=(m-g-a*(f-l))*h,s=a*(1-l),o&&(g=Math.round(g),s=Math.round(s));var y=Jb(f).map(function(x){return g+a*x});return r(d?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),u()):t()},e.range=function(f){return arguments.length?([i,n]=f,i=+i,n=+n,u()):[i,n]},e.rangeRound=function(f){return[i,n]=f,i=+i,n=+n,o=!0,u()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(f){return arguments.length?(o=!!f,u()):o},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),u()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),u()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,u()):c},e.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},e.copy=function(){return xC(t(),[i,n]).round(o).paddingInner(l).paddingOuter(c).align(h)},Ls.apply(u(),arguments)}function bC(e){return function(){return e}}function _C(e){return+e}var Kh=[0,1];function ei(e){return e}function nl(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:bC(isNaN(t)?NaN:.5)}function wC(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function CC(e,t,r){var i=e[0],n=e[1],a=t[0],s=t[1];return n<i?(i=nl(n,i),a=r(s,a)):(i=nl(i,n),a=r(a,s)),function(o){return a(i(o))}}function vC(e,t,r){var i=Math.min(e.length,t.length)-1,n=new Array(i),a=new Array(i),s=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)n[s]=nl(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(o){var l=jb(e,o,1,i)-1;return a[l](n[l](o))}}function Cd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function kC(){var e=Kh,t=Kh,r=Ql,i,n,a,s=ei,o,l,c;function h(){var f=Math.min(e.length,t.length);return s!==ei&&(s=wC(e[0],e[f-1])),o=f>2?vC:CC,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?a:(l||(l=o(e.map(i),t,r)))(i(s(f)))}return u.invert=function(f){return s(n((c||(c=o(t,e.map(i),be)))(f)))},u.domain=function(f){return arguments.length?(e=Array.from(f,_C),h()):e.slice()},u.range=function(f){return arguments.length?(t=Array.from(f),h()):t.slice()},u.rangeRound=function(f){return t=Array.from(f),r=d_,h()},u.clamp=function(f){return arguments.length?(s=f?!0:ei,h()):s!==ei},u.interpolate=function(f){return arguments.length?(r=f,h()):r},u.unknown=function(f){return arguments.length?(a=f,u):a},function(f,d){return i=f,n=d,h()}}function vd(){return kC()(ei,ei)}function SC(e,t,r,i){var n=Yo(e,t,r),a;switch(i=qa(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(a=Hw(n,s))&&(i.precision=a),bd(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Uw(n,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=qw(n))&&(i.precision=a-(i.type==="%")*2);break}}return xd(i)}function TC(e){var t=e.domain;return e.ticks=function(r){var i=t();return Qb(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var n=t();return SC(n[0],n[n.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),n=0,a=i.length-1,s=i[n],o=i[a],l,c,h=10;for(o<s&&(c=s,s=o,o=c,c=n,n=a,a=c);h-- >0;){if(c=jo(s,o,r),c===l)return i[n]=s,i[a]=o,t(i);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function MC(){var e=vd();return e.copy=function(){return Cd(e,MC())},Ls.apply(e,arguments),TC(e)}function AC(e,t){e=e.slice();var r=0,i=e.length-1,n=e[r],a=e[i],s;return a<n&&(s=r,r=i,i=s,s=n,n=a,a=s),e[r]=t.floor(n),e[i]=t.ceil(a),e}const bo=new Date,_o=new Date;function Pt(e,t,r,i){function n(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return n.floor=a=>(e(a=new Date(+a)),a),n.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),n.round=a=>{const s=n(a),o=n.ceil(a);return a-s<o-a?s:o},n.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),n.range=(a,s,o)=>{const l=[];if(a=n.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let c;do l.push(c=new Date(+a)),t(a,o),e(a);while(c<a&&a<s);return l},n.filter=a=>Pt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),r&&(n.count=(a,s)=>(bo.setTime(+a),_o.setTime(+s),e(bo),e(_o),Math.floor(r(bo,_o))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(i?s=>i(s)%a===0:s=>n.count(0,s)%a===0):n)),n}const ja=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ja.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ja);ja.range;const Ze=1e3,pe=Ze*60,Ke=pe*60,er=Ke*24,ic=er*7,Qh=er*30,wo=er*365,ri=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ze)},(e,t)=>(t-e)/Ze,e=>e.getUTCSeconds());ri.range;const nc=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze)},(e,t)=>{e.setTime(+e+t*pe)},(e,t)=>(t-e)/pe,e=>e.getMinutes());nc.range;const LC=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pe)},(e,t)=>(t-e)/pe,e=>e.getUTCMinutes());LC.range;const ac=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze-e.getMinutes()*pe)},(e,t)=>{e.setTime(+e+t*Ke)},(e,t)=>(t-e)/Ke,e=>e.getHours());ac.range;const BC=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ke)},(e,t)=>(t-e)/Ke,e=>e.getUTCHours());BC.range;const Fn=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pe)/er,e=>e.getDate()-1);Fn.range;const sc=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/er,e=>e.getUTCDate()-1);sc.range;const EC=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/er,e=>Math.floor(e/er));EC.range;function zr(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*pe)/ic)}const Bs=zr(0),Ya=zr(1),$C=zr(2),FC=zr(3),vi=zr(4),DC=zr(5),OC=zr(6);Bs.range;Ya.range;$C.range;FC.range;vi.range;DC.range;OC.range;function Wr(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/ic)}const kd=Wr(0),Ga=Wr(1),RC=Wr(2),IC=Wr(3),ki=Wr(4),PC=Wr(5),NC=Wr(6);kd.range;Ga.range;RC.range;IC.range;ki.range;PC.range;NC.range;const oc=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());oc.range;const zC=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());zC.range;const rr=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());rr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});rr.range;const Dr=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Dr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Dr.range;function WC(e,t,r,i,n,a){const s=[[ri,1,Ze],[ri,5,5*Ze],[ri,15,15*Ze],[ri,30,30*Ze],[a,1,pe],[a,5,5*pe],[a,15,15*pe],[a,30,30*pe],[n,1,Ke],[n,3,3*Ke],[n,6,6*Ke],[n,12,12*Ke],[i,1,er],[i,2,2*er],[r,1,ic],[t,1,Qh],[t,3,3*Qh],[e,1,wo]];function o(c,h,u){const f=h<c;f&&([c,h]=[h,c]);const d=u&&typeof u.range=="function"?u:l(c,h,u),g=d?d.range(c,+h+1):[];return f?g.reverse():g}function l(c,h,u){const f=Math.abs(h-c)/u,d=Xl(([,,y])=>y).right(s,f);if(d===s.length)return e.every(Yo(c/wo,h/wo,u));if(d===0)return ja.every(Math.max(Yo(c,h,u),1));const[g,m]=s[f/s[d-1][2]<s[d][2]/f?d-1:d];return g.every(m)}return[o,l]}const[qC,HC]=WC(rr,oc,Bs,Fn,ac,nc);function Co(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function vo(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ji(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function UC(e){var t=e.dateTime,r=e.date,i=e.time,n=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=Yi(n),h=Gi(n),u=Yi(a),f=Gi(a),d=Yi(s),g=Gi(s),m=Yi(o),y=Gi(o),x=Yi(l),b=Gi(l),_={a:D,A:F,b:U,B:W,c:null,d:nu,e:nu,f:dv,g:vv,G:Sv,H:hv,I:uv,j:fv,L:Sd,m:pv,M:gv,p:Y,q:Q,Q:ou,s:lu,S:mv,u:yv,U:xv,V:bv,w:_v,W:wv,x:null,X:null,y:Cv,Y:kv,Z:Tv,"%":su},w={a:G,A:ut,b:rt,B:Ct,c:null,d:au,e:au,f:Bv,g:zv,G:qv,H:Mv,I:Av,j:Lv,L:Md,m:Ev,M:$v,p:wt,q:Mt,Q:ou,s:lu,S:Fv,u:Dv,U:Ov,V:Rv,w:Iv,W:Pv,x:null,X:null,y:Nv,Y:Wv,Z:Hv,"%":su},C={a:R,A:B,b:$,B:L,c:T,d:ru,e:ru,f:sv,g:eu,G:tu,H:iu,I:iu,j:rv,L:av,m:ev,M:iv,p:I,q:tv,Q:lv,s:cv,S:nv,u:XC,U:ZC,V:KC,w:VC,W:QC,x:E,X:A,y:eu,Y:tu,Z:JC,"%":ov};_.x=v(r,_),_.X=v(i,_),_.c=v(t,_),w.x=v(r,w),w.X=v(i,w),w.c=v(t,w);function v(q,J){return function(ht){var N=[],vt=-1,yt=0,At=q.length,zt,xe,We;for(ht instanceof Date||(ht=new Date(+ht));++vt<At;)q.charCodeAt(vt)===37&&(N.push(q.slice(yt,vt)),(xe=Jh[zt=q.charAt(++vt)])!=null?zt=q.charAt(++vt):xe=zt==="e"?" ":"0",(We=J[zt])&&(zt=We(ht,xe)),N.push(zt),yt=vt+1);return N.push(q.slice(yt,vt)),N.join("")}}function S(q,J){return function(ht){var N=ji(1900,void 0,1),vt=O(N,q,ht+="",0),yt,At;if(vt!=ht.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(J&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(yt=vo(ji(N.y,0,1)),At=yt.getUTCDay(),yt=At>4||At===0?Ga.ceil(yt):Ga(yt),yt=sc.offset(yt,(N.V-1)*7),N.y=yt.getUTCFullYear(),N.m=yt.getUTCMonth(),N.d=yt.getUTCDate()+(N.w+6)%7):(yt=Co(ji(N.y,0,1)),At=yt.getDay(),yt=At>4||At===0?Ya.ceil(yt):Ya(yt),yt=Fn.offset(yt,(N.V-1)*7),N.y=yt.getFullYear(),N.m=yt.getMonth(),N.d=yt.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),At="Z"in N?vo(ji(N.y,0,1)).getUTCDay():Co(ji(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(At+5)%7:N.w+N.U*7-(At+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,vo(N)):Co(N)}}function O(q,J,ht,N){for(var vt=0,yt=J.length,At=ht.length,zt,xe;vt<yt;){if(N>=At)return-1;if(zt=J.charCodeAt(vt++),zt===37){if(zt=J.charAt(vt++),xe=C[zt in Jh?J.charAt(vt++):zt],!xe||(N=xe(q,ht,N))<0)return-1}else if(zt!=ht.charCodeAt(N++))return-1}return N}function I(q,J,ht){var N=c.exec(J.slice(ht));return N?(q.p=h.get(N[0].toLowerCase()),ht+N[0].length):-1}function R(q,J,ht){var N=d.exec(J.slice(ht));return N?(q.w=g.get(N[0].toLowerCase()),ht+N[0].length):-1}function B(q,J,ht){var N=u.exec(J.slice(ht));return N?(q.w=f.get(N[0].toLowerCase()),ht+N[0].length):-1}function $(q,J,ht){var N=x.exec(J.slice(ht));return N?(q.m=b.get(N[0].toLowerCase()),ht+N[0].length):-1}function L(q,J,ht){var N=m.exec(J.slice(ht));return N?(q.m=y.get(N[0].toLowerCase()),ht+N[0].length):-1}function T(q,J,ht){return O(q,t,J,ht)}function E(q,J,ht){return O(q,r,J,ht)}function A(q,J,ht){return O(q,i,J,ht)}function D(q){return s[q.getDay()]}function F(q){return a[q.getDay()]}function U(q){return l[q.getMonth()]}function W(q){return o[q.getMonth()]}function Y(q){return n[+(q.getHours()>=12)]}function Q(q){return 1+~~(q.getMonth()/3)}function G(q){return s[q.getUTCDay()]}function ut(q){return a[q.getUTCDay()]}function rt(q){return l[q.getUTCMonth()]}function Ct(q){return o[q.getUTCMonth()]}function wt(q){return n[+(q.getUTCHours()>=12)]}function Mt(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var J=v(q+="",_);return J.toString=function(){return q},J},parse:function(q){var J=S(q+="",!1);return J.toString=function(){return q},J},utcFormat:function(q){var J=v(q+="",w);return J.toString=function(){return q},J},utcParse:function(q){var J=S(q+="",!0);return J.toString=function(){return q},J}}}var Jh={"-":"",_:" ",0:"0"},Nt=/^\s*\d+/,jC=/^%/,YC=/[\\^$*+?|[\]().{}]/g;function gt(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a<r?new Array(r-a+1).join(t)+n:n)}function GC(e){return e.replace(YC,"\\$&")}function Yi(e){return new RegExp("^(?:"+e.map(GC).join("|")+")","i")}function Gi(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function VC(e,t,r){var i=Nt.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function XC(e,t,r){var i=Nt.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function ZC(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function KC(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function QC(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function tu(e,t,r){var i=Nt.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function eu(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function JC(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function tv(e,t,r){var i=Nt.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function ev(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function ru(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function rv(e,t,r){var i=Nt.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function iu(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function iv(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function nv(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function av(e,t,r){var i=Nt.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function sv(e,t,r){var i=Nt.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function ov(e,t,r){var i=jC.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function lv(e,t,r){var i=Nt.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function cv(e,t,r){var i=Nt.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function nu(e,t){return gt(e.getDate(),t,2)}function hv(e,t){return gt(e.getHours(),t,2)}function uv(e,t){return gt(e.getHours()%12||12,t,2)}function fv(e,t){return gt(1+Fn.count(rr(e),e),t,3)}function Sd(e,t){return gt(e.getMilliseconds(),t,3)}function dv(e,t){return Sd(e,t)+"000"}function pv(e,t){return gt(e.getMonth()+1,t,2)}function gv(e,t){return gt(e.getMinutes(),t,2)}function mv(e,t){return gt(e.getSeconds(),t,2)}function yv(e){var t=e.getDay();return t===0?7:t}function xv(e,t){return gt(Bs.count(rr(e)-1,e),t,2)}function Td(e){var t=e.getDay();return t>=4||t===0?vi(e):vi.ceil(e)}function bv(e,t){return e=Td(e),gt(vi.count(rr(e),e)+(rr(e).getDay()===4),t,2)}function _v(e){return e.getDay()}function wv(e,t){return gt(Ya.count(rr(e)-1,e),t,2)}function Cv(e,t){return gt(e.getFullYear()%100,t,2)}function vv(e,t){return e=Td(e),gt(e.getFullYear()%100,t,2)}function kv(e,t){return gt(e.getFullYear()%1e4,t,4)}function Sv(e,t){var r=e.getDay();return e=r>=4||r===0?vi(e):vi.ceil(e),gt(e.getFullYear()%1e4,t,4)}function Tv(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+gt(t/60|0,"0",2)+gt(t%60,"0",2)}function au(e,t){return gt(e.getUTCDate(),t,2)}function Mv(e,t){return gt(e.getUTCHours(),t,2)}function Av(e,t){return gt(e.getUTCHours()%12||12,t,2)}function Lv(e,t){return gt(1+sc.count(Dr(e),e),t,3)}function Md(e,t){return gt(e.getUTCMilliseconds(),t,3)}function Bv(e,t){return Md(e,t)+"000"}function Ev(e,t){return gt(e.getUTCMonth()+1,t,2)}function $v(e,t){return gt(e.getUTCMinutes(),t,2)}function Fv(e,t){return gt(e.getUTCSeconds(),t,2)}function Dv(e){var t=e.getUTCDay();return t===0?7:t}function Ov(e,t){return gt(kd.count(Dr(e)-1,e),t,2)}function Ad(e){var t=e.getUTCDay();return t>=4||t===0?ki(e):ki.ceil(e)}function Rv(e,t){return e=Ad(e),gt(ki.count(Dr(e),e)+(Dr(e).getUTCDay()===4),t,2)}function Iv(e){return e.getUTCDay()}function Pv(e,t){return gt(Ga.count(Dr(e)-1,e),t,2)}function Nv(e,t){return gt(e.getUTCFullYear()%100,t,2)}function zv(e,t){return e=Ad(e),gt(e.getUTCFullYear()%100,t,2)}function Wv(e,t){return gt(e.getUTCFullYear()%1e4,t,4)}function qv(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ki(e):ki.ceil(e),gt(e.getUTCFullYear()%1e4,t,4)}function Hv(){return"+0000"}function su(){return"%"}function ou(e){return+e}function lu(e){return Math.floor(+e/1e3)}var Kr,Ld;Uv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Uv(e){return Kr=UC(e),Ld=Kr.format,Kr.parse,Kr.utcFormat,Kr.utcParse,Kr}function jv(e){return new Date(e)}function Yv(e){return e instanceof Date?+e:+new Date(+e)}function Bd(e,t,r,i,n,a,s,o,l,c){var h=vd(),u=h.invert,f=h.domain,d=c(".%L"),g=c(":%S"),m=c("%I:%M"),y=c("%I %p"),x=c("%a %d"),b=c("%b %d"),_=c("%B"),w=c("%Y");function C(v){return(l(v)<v?d:o(v)<v?g:s(v)<v?m:a(v)<v?y:i(v)<v?n(v)<v?x:b:r(v)<v?_:w)(v)}return h.invert=function(v){return new Date(u(v))},h.domain=function(v){return arguments.length?f(Array.from(v,Yv)):f().map(jv)},h.ticks=function(v){var S=f();return e(S[0],S[S.length-1],v??10)},h.tickFormat=function(v,S){return S==null?C:c(S)},h.nice=function(v){var S=f();return(!v||typeof v.range!="function")&&(v=t(S[0],S[S.length-1],v??10)),v?f(AC(S,v)):h},h.copy=function(){return Cd(h,Bd(e,t,r,i,n,a,s,o,l,c))},h}function y3(){return Ls.apply(Bd(qC,HC,rr,oc,Bs,Fn,ac,nc,ri,Ld).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Gv(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(i*6,++i*6);return r}const x3=Gv("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Lt(e){return function(){return e}}const cu=Math.abs,jt=Math.atan2,xr=Math.cos,Vv=Math.max,ko=Math.min,Ee=Math.sin,ii=Math.sqrt,Gt=1e-12,bn=Math.PI,Va=bn/2,xa=2*bn;function Xv(e){return e>1?0:e<-1?bn:Math.acos(e)}function hu(e){return e>=1?Va:e<=-1?-Va:Math.asin(e)}function Ed(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 Fw(t)}function Zv(e){return e.innerRadius}function Kv(e){return e.outerRadius}function Qv(e){return e.startAngle}function Jv(e){return e.endAngle}function tk(e){return e&&e.padAngle}function ek(e,t,r,i,n,a,s,o){var l=r-e,c=i-t,h=s-n,u=o-a,f=u*l-h*c;if(!(f*f<Gt))return f=(h*(t-a)-u*(e-n))/f,[e+f*l,t+f*c]}function Jn(e,t,r,i,n,a,s){var o=e-r,l=t-i,c=(s?a:-a)/ii(o*o+l*l),h=c*l,u=-c*o,f=e+h,d=t+u,g=r+h,m=i+u,y=(f+g)/2,x=(d+m)/2,b=g-f,_=m-d,w=b*b+_*_,C=n-a,v=f*m-g*d,S=(_<0?-1:1)*ii(Vv(0,C*C*w-v*v)),O=(v*_-b*S)/w,I=(-v*b-_*S)/w,R=(v*_+b*S)/w,B=(-v*b+_*S)/w,$=O-y,L=I-x,T=R-y,E=B-x;return $*$+L*L>T*T+E*E&&(O=R,I=B),{cx:O,cy:I,x01:-h,y01:-u,x11:O*(n/C-1),y11:I*(n/C-1)}}function b3(){var e=Zv,t=Kv,r=Lt(0),i=null,n=Qv,a=Jv,s=tk,o=null,l=Ed(c);function c(){var h,u,f=+e.apply(this,arguments),d=+t.apply(this,arguments),g=n.apply(this,arguments)-Va,m=a.apply(this,arguments)-Va,y=cu(m-g),x=m>g;if(o||(o=h=l()),d<f&&(u=d,d=f,f=u),!(d>Gt))o.moveTo(0,0);else if(y>xa-Gt)o.moveTo(d*xr(g),d*Ee(g)),o.arc(0,0,d,g,m,!x),f>Gt&&(o.moveTo(f*xr(m),f*Ee(m)),o.arc(0,0,f,m,g,x));else{var b=g,_=m,w=g,C=m,v=y,S=y,O=s.apply(this,arguments)/2,I=O>Gt&&(i?+i.apply(this,arguments):ii(f*f+d*d)),R=ko(cu(d-f)/2,+r.apply(this,arguments)),B=R,$=R,L,T;if(I>Gt){var E=hu(I/f*Ee(O)),A=hu(I/d*Ee(O));(v-=E*2)>Gt?(E*=x?1:-1,w+=E,C-=E):(v=0,w=C=(g+m)/2),(S-=A*2)>Gt?(A*=x?1:-1,b+=A,_-=A):(S=0,b=_=(g+m)/2)}var D=d*xr(b),F=d*Ee(b),U=f*xr(C),W=f*Ee(C);if(R>Gt){var Y=d*xr(_),Q=d*Ee(_),G=f*xr(w),ut=f*Ee(w),rt;if(y<bn)if(rt=ek(D,F,G,ut,Y,Q,U,W)){var Ct=D-rt[0],wt=F-rt[1],Mt=Y-rt[0],q=Q-rt[1],J=1/Ee(Xv((Ct*Mt+wt*q)/(ii(Ct*Ct+wt*wt)*ii(Mt*Mt+q*q)))/2),ht=ii(rt[0]*rt[0]+rt[1]*rt[1]);B=ko(R,(f-ht)/(J-1)),$=ko(R,(d-ht)/(J+1))}else B=$=0}S>Gt?$>Gt?(L=Jn(G,ut,D,F,d,$,x),T=Jn(Y,Q,U,W,d,$,x),o.moveTo(L.cx+L.x01,L.cy+L.y01),$<R?o.arc(L.cx,L.cy,$,jt(L.y01,L.x01),jt(T.y01,T.x01),!x):(o.arc(L.cx,L.cy,$,jt(L.y01,L.x01),jt(L.y11,L.x11),!x),o.arc(0,0,d,jt(L.cy+L.y11,L.cx+L.x11),jt(T.cy+T.y11,T.cx+T.x11),!x),o.arc(T.cx,T.cy,$,jt(T.y11,T.x11),jt(T.y01,T.x01),!x))):(o.moveTo(D,F),o.arc(0,0,d,b,_,!x)):o.moveTo(D,F),!(f>Gt)||!(v>Gt)?o.lineTo(U,W):B>Gt?(L=Jn(U,W,Y,Q,f,-B,x),T=Jn(D,F,G,ut,f,-B,x),o.lineTo(L.cx+L.x01,L.cy+L.y01),B<R?o.arc(L.cx,L.cy,B,jt(L.y01,L.x01),jt(T.y01,T.x01),!x):(o.arc(L.cx,L.cy,B,jt(L.y01,L.x01),jt(L.y11,L.x11),!x),o.arc(0,0,f,jt(L.cy+L.y11,L.cx+L.x11),jt(T.cy+T.y11,T.cx+T.x11),x),o.arc(T.cx,T.cy,B,jt(T.y11,T.x11),jt(T.y01,T.x01),!x))):o.arc(0,0,f,C,w,x)}if(o.closePath(),h)return o=null,h+""||null}return c.centroid=function(){var h=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+n.apply(this,arguments)+ +a.apply(this,arguments))/2-bn/2;return[xr(u)*h,Ee(u)*h]},c.innerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:Lt(+h),c):e},c.outerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:Lt(+h),c):t},c.cornerRadius=function(h){return arguments.length?(r=typeof h=="function"?h:Lt(+h),c):r},c.padRadius=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:Lt(+h),c):i},c.startAngle=function(h){return arguments.length?(n=typeof h=="function"?h:Lt(+h),c):n},c.endAngle=function(h){return arguments.length?(a=typeof h=="function"?h:Lt(+h),c):a},c.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:Lt(+h),c):s},c.context=function(h){return arguments.length?(o=h??null,c):o},c}function $d(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fd(e){this._context=e}Fd.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 Xa(e){return new Fd(e)}function rk(e){return e[0]}function ik(e){return e[1]}function nk(e,t){var r=Lt(!0),i=null,n=Xa,a=null,s=Ed(o);e=typeof e=="function"?e:e===void 0?rk:Lt(e),t=typeof t=="function"?t:t===void 0?ik:Lt(t);function o(l){var c,h=(l=$d(l)).length,u,f=!1,d;for(i==null&&(a=n(d=s())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,c,l),+t(u,c,l));if(d)return a=null,d+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Lt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Lt(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),o):i},o}function ak(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function sk(e){return e}function _3(){var e=sk,t=ak,r=null,i=Lt(0),n=Lt(xa),a=Lt(0);function s(o){var l,c=(o=$d(o)).length,h,u,f=0,d=new Array(c),g=new Array(c),m=+i.apply(this,arguments),y=Math.min(xa,Math.max(-xa,n.apply(this,arguments)-m)),x,b=Math.min(Math.abs(y)/c,a.apply(this,arguments)),_=b*(y<0?-1:1),w;for(l=0;l<c;++l)(w=g[d[l]=l]=+e(o[l],l,o))>0&&(f+=w);for(t!=null?d.sort(function(C,v){return t(g[C],g[v])}):r!=null&&d.sort(function(C,v){return r(o[C],o[v])}),l=0,u=f?(y-c*_)/f:0;l<c;++l,m=x)h=d[l],w=g[h],x=m+(w>0?w*u:0)+_,g[h]={data:o[h],index:l,value:w,startAngle:m,endAngle:x,padAngle:b};return g}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:Lt(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,r=null,s):t},s.sort=function(o){return arguments.length?(r=o,t=null,s):r},s.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Lt(+o),s):i},s.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Lt(+o),s):n},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Lt(+o),s):a},s}class Dd{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 Od(e){return new Dd(e,!0)}function Rd(e){return new Dd(e,!1)}function cr(){}function Za(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 Es(e){this._context=e}Es.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:Za(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:Za(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ba(e){return new Es(e)}function Id(e){this._context=e}Id.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:Za(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ok(e){return new Id(e)}function Pd(e){this._context=e}Pd.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:Za(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lk(e){return new Pd(e)}function Nd(e,t){this._basis=new Es(e),this._beta=t}Nd.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],n=t[0],a=e[r]-i,s=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const ck=(function e(t){function r(i){return t===1?new Es(i):new Nd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Ka(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 lc(e,t){this._context=e,this._k=(1-t)/6}lc.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:Ka(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:Ka(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 zd=(function e(t){function r(i){return new lc(i,t)}return r.tension=function(i){return e(+i)},r})(0);function cc(e,t){this._context=e,this._k=(1-t)/6}cc.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:Ka(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 hk=(function e(t){function r(i){return new cc(i,t)}return r.tension=function(i){return e(+i)},r})(0);function hc(e,t){this._context=e,this._k=(1-t)/6}hc.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:Ka(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 uk=(function e(t){function r(i){return new hc(i,t)}return r.tension=function(i){return e(+i)},r})(0);function uc(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Gt){var o=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*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Gt){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);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function Wd(e,t){this._context=e,this._alpha=t}Wd.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:uc(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 qd=(function e(t){function r(i){return t?new Wd(i,t):new lc(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Hd(e,t){this._context=e,this._alpha=t}Hd.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:uc(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 fk=(function e(t){function r(i){return t?new Hd(i,t):new cc(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ud(e,t){this._context=e,this._alpha=t}Ud.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:uc(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 dk=(function e(t){function r(i){return t?new Ud(i,t):new hc(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function jd(e){this._context=e}jd.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 pk(e){return new jd(e)}function uu(e){return e<0?-1:1}function fu(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),o=(a*n+s*i)/(i+n);return(uu(a)+uu(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function du(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function So(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,n+o*t,a-o,s-o*r,a,s)}function Qa(e){this._context=e}Qa.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:So(this,this._t0,du(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,So(this,du(this,r=fu(this,e,t)),r);break;default:So(this,this._t0,r=fu(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Yd(e){this._context=new Gd(e)}(Yd.prototype=Object.create(Qa.prototype)).point=function(e,t){Qa.prototype.point.call(this,t,e)};function Gd(e){this._context=e}Gd.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,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function Vd(e){return new Qa(e)}function Xd(e){return new Yd(e)}function Zd(e){this._context=e}Zd.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=pu(e),n=pu(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[s],t[s]);(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 pu(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,s[t]-=i*s[t-1];for(n[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function Kd(e){return new Zd(e)}function $s(e,t){this._context=e,this._t=t}$s.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 Qd(e){return new $s(e,.5)}function Jd(e){return new $s(e,0)}function tp(e){return new $s(e,1)}function rn(e,t,r){this.k=e,this.x=t,this.y=r}rn.prototype={constructor:rn,scale:function(e){return e===1?this:new rn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new rn(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+")"}};rn.prototype;var gk=p(e=>{const{securityLevel:t}=xt();let r=pt("body");if(t==="sandbox"){const a=pt(`#i${e}`).node()?.contentDocument??document;r=pt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function fc(e){return typeof e>"u"||e===null}p(fc,"isNothing");function ep(e){return typeof e=="object"&&e!==null}p(ep,"isObject");function rp(e){return Array.isArray(e)?e:fc(e)?[]:[e]}p(rp,"toArray");function ip(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(ip,"extend");function np(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(np,"repeat");function ap(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(ap,"isNegativeZero");var mk=fc,yk=ep,xk=rp,bk=np,_k=ap,wk=ip,Rt={isNothing:mk,isObject:yk,toArray:xk,repeat:bk,isNegativeZero:_k,extend:wk};function dc(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+=`
80
+ `},"getStyles"),Ab=p((e,t)=>{t!==void 0&&(fa[e]=t)},"addStylesForDiagram"),Lb=Mb,If={};yx(If,{clear:()=>Bb,getAccDescription:()=>Db,getAccTitle:()=>$b,getDiagramTitle:()=>Rb,setAccDescription:()=>Fb,setAccTitle:()=>Eb,setDiagramTitle:()=>Ob});var jl="",Yl="",Gl="",Vl=p(e=>me(e,Zt()),"sanitizeText"),Bb=p(()=>{jl="",Gl="",Yl=""},"clear"),Eb=p(e=>{jl=Vl(e).replace(/^\s+/g,"")},"setAccTitle"),$b=p(()=>jl,"getAccTitle"),Fb=p(e=>{Gl=Vl(e).replace(/\n\s+/g,`
81
+ `)},"setAccDescription"),Db=p(()=>Gl,"getAccDescription"),Ob=p(e=>{Yl=Vl(e)},"setDiagramTitle"),Rb=p(()=>Yl,"getDiagramTitle"),Mh=P,Ib=ql,xt=Zt,c3=Bf,h3=bi,Xl=p(e=>me(e,xt()),"sanitizeText"),Pb=Tb,Nb=p(()=>If,"getCommonDb"),Ba={},Ea=p((e,t,r)=>{Ba[e]&&Mh.warn(`Diagram with id ${e} already registered. Overwriting.`),Ba[e]=t,r&&Sf(e,r),Ab(e,t.styles),t.injectUtils?.(Mh,Ib,xt,Xl,Pb,Nb(),()=>{})},"registerDiagram"),jo=p(e=>{if(e in Ba)return Ba[e];throw new zb(e)},"getDiagram"),mi,zb=(mi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(mi,"DiagramNotFoundError"),mi);function da(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wb(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Zl(e){let t,r,i;e.length!==2?(t=da,r=(o,l)=>da(e(o),l),i=(o,l)=>e(o)-l):(t=e===da||e===Wb?e:qb,r=e,i=e);function n(o,l,c=0,h=o.length){if(c<h){if(t(l,l)!==0)return h;do{const u=c+h>>>1;r(o[u],l)<0?c=u+1:h=u}while(c<h)}return c}function a(o,l,c=0,h=o.length){if(c<h){if(t(l,l)!==0)return h;do{const u=c+h>>>1;r(o[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(o,l,c=0,h=o.length){const u=n(o,l,c,h-1);return u>c&&i(o[u-1],l)>-i(o[u],l)?u-1:u}return{left:n,center:s,right:a}}function qb(){return 0}function Hb(e){return e===null?NaN:+e}const Ub=Zl(da),jb=Ub.right;Zl(Hb).center;class Ah extends Map{constructor(t,r=Vb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,n]of t)this.set(i,n)}get(t){return super.get(Lh(this,t))}has(t){return super.has(Lh(this,t))}set(t,r){return super.set(Yb(this,t),r)}delete(t){return super.delete(Gb(this,t))}}function Lh({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function Yb({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function Gb({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function Vb(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Xb=Math.sqrt(50),Zb=Math.sqrt(10),Kb=Math.sqrt(2);function $a(e,t,r){const i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=a>=Xb?10:a>=Zb?5:a>=Kb?2:1;let o,l,c;return n<0?(c=Math.pow(10,-n)/s,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=r&&r<2?$a(e,t,r*2):[o,l,c]}function Qb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[n,a,s]=i?$a(t,e,r):$a(e,t,r);if(!(a>=n))return[];const o=a-n+1,l=new Array(o);if(i)if(s<0)for(let c=0;c<o;++c)l[c]=(a-c)/-s;else for(let c=0;c<o;++c)l[c]=(a-c)*s;else if(s<0)for(let c=0;c<o;++c)l[c]=(n+c)/-s;else for(let c=0;c<o;++c)l[c]=(n+c)*s;return l}function Yo(e,t,r){return t=+t,e=+e,r=+r,$a(e,t,r)[2]}function Go(e,t,r){t=+t,e=+e,r=+r;const i=t<e,n=i?Yo(t,e,r):Yo(e,t,r);return(i?-1:1)*(n<0?1/-n:n)}function u3(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function f3(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function Jb(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(n);++i<n;)a[i]=e+i*r;return a}function t1(e){return e}var pa=1,fo=2,Vo=3,Xn=4,Bh=1e-6;function e1(e){return"translate("+e+",0)"}function r1(e){return"translate(0,"+e+")"}function i1(e){return t=>+e(t)}function n1(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function a1(){return!this.__axis}function Pf(e,t){var r=[],i=null,n=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===pa||e===Xn?-1:1,h=e===Xn||e===fo?"x":"y",u=e===pa||e===Vo?e1:r1;function f(d){var g=i??(t.ticks?t.ticks.apply(t,r):t.domain()),m=n??(t.tickFormat?t.tickFormat.apply(t,r):t1),y=Math.max(a,0)+o,x=t.range(),b=+x[0]+l,_=+x[x.length-1]+l,w=(t.bandwidth?n1:i1)(t.copy(),l),C=d.selection?d.selection():d,v=C.selectAll(".domain").data([null]),T=C.selectAll(".tick").data(g,t).order(),O=T.exit(),I=T.enter().append("g").attr("class","tick"),R=T.select("line"),B=T.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(I),R=R.merge(I.append("line").attr("stroke","currentColor").attr(h+"2",c*a)),B=B.merge(I.append("text").attr("fill","currentColor").attr(h,c*y).attr("dy",e===pa?"0em":e===Vo?"0.71em":"0.32em")),d!==C&&(v=v.transition(d),T=T.transition(d),R=R.transition(d),B=B.transition(d),O=O.transition(d).attr("opacity",Bh).attr("transform",function($){return isFinite($=w($))?u($+l):this.getAttribute("transform")}),I.attr("opacity",Bh).attr("transform",function($){var L=this.parentNode.__axis;return u((L&&isFinite(L=L($))?L:w($))+l)})),O.remove(),v.attr("d",e===Xn||e===fo?s?"M"+c*s+","+b+"H"+l+"V"+_+"H"+c*s:"M"+l+","+b+"V"+_:s?"M"+b+","+c*s+"V"+l+"H"+_+"V"+c*s:"M"+b+","+l+"H"+_),T.attr("opacity",1).attr("transform",function($){return u(w($)+l)}),R.attr(h+"2",c*a),B.attr(h,c*y).text(m),C.filter(a1).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===fo?"start":e===Xn?"end":"middle"),C.each(function(){this.__axis=w})}return f.scale=function(d){return arguments.length?(t=d,f):t},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(r=d==null?[]:Array.from(d),f):r.slice()},f.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),f):i&&i.slice()},f.tickFormat=function(d){return arguments.length?(n=d,f):n},f.tickSize=function(d){return arguments.length?(a=s=+d,f):a},f.tickSizeInner=function(d){return arguments.length?(a=+d,f):a},f.tickSizeOuter=function(d){return arguments.length?(s=+d,f):s},f.tickPadding=function(d){return arguments.length?(o=+d,f):o},f.offset=function(d){return arguments.length?(l=+d,f):l},f}function d3(e){return Pf(pa,e)}function p3(e){return Pf(Vo,e)}var s1={value:()=>{}};function Nf(){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 ga(r)}function ga(e){this._=e}function o1(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}ga.prototype=Nf.prototype={constructor:ga,on:function(e,t){var r=this._,i=o1(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((n=(e=i[a]).type)&&(n=l1(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=i[a]).type)r[n]=Eh(r[n],e.name,t);else if(t==null)for(n in r)r[n]=Eh(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new ga(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function l1(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function Eh(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=s1,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Xo="http://www.w3.org/1999/xhtml";const $h={svg:"http://www.w3.org/2000/svg",xhtml:Xo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ks(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),$h.hasOwnProperty(t)?{space:$h[t],local:e}:e}function c1(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Xo&&t.documentElement.namespaceURI===Xo?t.createElement(e):t.createElementNS(r,e)}}function h1(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zf(e){var t=ks(e);return(t.local?h1:c1)(t)}function u1(){}function Kl(e){return e==null?u1:function(){return this.querySelector(e)}}function f1(e){typeof e!="function"&&(e=Kl(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=new Array(s),l,c,h=0;h<s;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new fe(i,this._parents)}function d1(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function p1(){return[]}function Wf(e){return e==null?p1:function(){return this.querySelectorAll(e)}}function g1(e){return function(){return d1(e.apply(this,arguments))}}function m1(e){typeof e=="function"?e=g1(e):e=Wf(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(i.push(e.call(l,l.__data__,c,s)),n.push(l));return new fe(i,n)}function qf(e){return function(){return this.matches(e)}}function Hf(e){return function(t){return t.matches(e)}}var y1=Array.prototype.find;function x1(e){return function(){return y1.call(this.children,e)}}function b1(){return this.firstElementChild}function _1(e){return this.select(e==null?b1:x1(typeof e=="function"?e:Hf(e)))}var w1=Array.prototype.filter;function C1(){return Array.from(this.children)}function v1(e){return function(){return w1.call(this.children,e)}}function k1(e){return this.selectAll(e==null?C1:v1(typeof e=="function"?e:Hf(e)))}function S1(e){typeof e!="function"&&(e=qf(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new fe(i,this._parents)}function Uf(e){return new Array(e.length)}function T1(){return new fe(this._enter||this._groups.map(Uf),this._parents)}function Fa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Fa.prototype={constructor:Fa,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 M1(e){return function(){return e}}function A1(e,t,r,i,n,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],i[s]=o):r[s]=new Fa(e,a[s]);for(;s<l;++s)(o=t[s])&&(n[s]=o)}function L1(e,t,r,i,n,a,s){var o,l,c=new Map,h=t.length,u=a.length,f=new Array(h),d;for(o=0;o<h;++o)(l=t[o])&&(f[o]=d=s.call(l,l.__data__,o,t)+"",c.has(d)?n[o]=l:c.set(d,l));for(o=0;o<u;++o)d=s.call(e,a[o],o,a)+"",(l=c.get(d))?(i[o]=l,l.__data__=a[o],c.delete(d)):r[o]=new Fa(e,a[o]);for(o=0;o<h;++o)(l=t[o])&&c.get(f[o])===l&&(n[o]=l)}function B1(e){return e.__data__}function E1(e,t){if(!arguments.length)return Array.from(this,B1);var r=t?L1:A1,i=this._parents,n=this._groups;typeof e!="function"&&(e=M1(e));for(var a=n.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],f=u.length,d=$1(e.call(h,h&&h.__data__,c,i)),g=d.length,m=o[c]=new Array(g),y=s[c]=new Array(g),x=l[c]=new Array(f);r(h,u,m,y,x,d,t);for(var b=0,_=0,w,C;b<g;++b)if(w=m[b]){for(b>=_&&(_=b+1);!(C=y[_])&&++_<g;);w._next=C||null}}return s=new fe(s,i),s._enter=o,s._exit=l,s}function $1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function F1(){return new fe(this._exit||this._groups.map(Uf),this._parents)}function D1(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function O1(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,s=Math.min(n,a),o=new Array(n),l=0;l<s;++l)for(var c=r[l],h=i[l],u=c.length,f=o[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(f[g]=d);for(;l<n;++l)o[l]=r[l];return new fe(o,this._parents)}function R1(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],s;--n>=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function I1(e){e||(e=P1);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var s=r[a],o=s.length,l=n[a]=new Array(o),c,h=0;h<o;++h)(c=s[h])&&(l[h]=c);l.sort(t)}return new fe(n,this._parents).order()}function P1(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function N1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function z1(){return Array.from(this)}function W1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}function q1(){let e=0;for(const t of this)++e;return e}function H1(){return!this.node()}function U1(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,s=n.length,o;a<s;++a)(o=n[a])&&e.call(o,o.__data__,a,n);return this}function j1(e){return function(){this.removeAttribute(e)}}function Y1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function G1(e,t){return function(){this.setAttribute(e,t)}}function V1(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function X1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Z1(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 K1(e,t){var r=ks(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?Y1:j1:typeof t=="function"?r.local?Z1:X1:r.local?V1:G1)(r,t))}function jf(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Q1(e){return function(){this.style.removeProperty(e)}}function J1(e,t,r){return function(){this.style.setProperty(e,t,r)}}function t2(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function e2(e,t,r){return arguments.length>1?this.each((t==null?Q1:typeof t=="function"?t2:J1)(e,t,r??"")):wi(this.node(),e)}function wi(e,t){return e.style.getPropertyValue(t)||jf(e).getComputedStyle(e,null).getPropertyValue(t)}function r2(e){return function(){delete this[e]}}function i2(e,t){return function(){this[e]=t}}function n2(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function a2(e,t){return arguments.length>1?this.each((t==null?r2:typeof t=="function"?n2:i2)(e,t)):this.node()[e]}function Yf(e){return e.trim().split(/^|\s+/)}function Ql(e){return e.classList||new Gf(e)}function Gf(e){this._node=e,this._names=Yf(e.getAttribute("class")||"")}Gf.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 Vf(e,t){for(var r=Ql(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Xf(e,t){for(var r=Ql(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function s2(e){return function(){Vf(this,e)}}function o2(e){return function(){Xf(this,e)}}function l2(e,t){return function(){(t.apply(this,arguments)?Vf:Xf)(this,e)}}function c2(e,t){var r=Yf(e+"");if(arguments.length<2){for(var i=Ql(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?l2:t?s2:o2)(r,t))}function h2(){this.textContent=""}function u2(e){return function(){this.textContent=e}}function f2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function d2(e){return arguments.length?this.each(e==null?h2:(typeof e=="function"?f2:u2)(e)):this.node().textContent}function p2(){this.innerHTML=""}function g2(e){return function(){this.innerHTML=e}}function m2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function y2(e){return arguments.length?this.each(e==null?p2:(typeof e=="function"?m2:g2)(e)):this.node().innerHTML}function x2(){this.nextSibling&&this.parentNode.appendChild(this)}function b2(){return this.each(x2)}function _2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function w2(){return this.each(_2)}function C2(e){var t=typeof e=="function"?e:zf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function v2(){return null}function k2(e,t){var r=typeof e=="function"?e:zf(e),i=t==null?v2:typeof t=="function"?t:Kl(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function S2(){var e=this.parentNode;e&&e.removeChild(this)}function T2(){return this.each(S2)}function M2(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function A2(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function L2(e){return this.select(e?A2:M2)}function B2(e){return arguments.length?this.property("__data__",e):this.node().__data__}function E2(e){return function(t){e.call(this,t,this.__data__)}}function $2(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 F2(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function D2(e,t,r){return function(){var i=this.__on,n,a=E2(t);if(i){for(var s=0,o=i.length;s<o;++s)if((n=i[s]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function O2(e,t,r){var i=$2(e+""),n,a=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,h;l<c;++l)for(n=0,h=o[l];n<a;++n)if((s=i[n]).type===h.type&&s.name===h.name)return h.value}return}for(o=t?D2:F2,n=0;n<a;++n)this.each(o(i[n],t,r));return this}function Zf(e,t,r){var i=jf(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function R2(e,t){return function(){return Zf(this,e,t)}}function I2(e,t){return function(){return Zf(this,e,t.apply(this,arguments))}}function P2(e,t){return this.each((typeof t=="function"?I2:R2)(e,t))}function*N2(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,s;n<a;++n)(s=i[n])&&(yield s)}var Kf=[null];function fe(e,t){this._groups=e,this._parents=t}function Fn(){return new fe([[document.documentElement]],Kf)}function z2(){return this}fe.prototype=Fn.prototype={constructor:fe,select:f1,selectAll:m1,selectChild:_1,selectChildren:k1,filter:S1,data:E1,enter:T1,exit:F1,join:D1,merge:O1,selection:z2,order:R1,sort:I1,call:N1,nodes:z1,node:W1,size:q1,empty:H1,each:U1,attr:K1,style:e2,property:a2,classed:c2,text:d2,html:y2,raise:b2,lower:w2,append:C2,insert:k2,remove:T2,clone:L2,datum:B2,on:O2,dispatch:P2,[Symbol.iterator]:N2};function pt(e){return typeof e=="string"?new fe([[document.querySelector(e)]],[document.documentElement]):new fe([[e]],Kf)}function Dn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ss(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function zr(){}var xn=.7,Da=1/xn,oi="\\s*([+-]?\\d+)\\s*",bn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W2=/^#([0-9a-f]{3,8})$/,q2=new RegExp(`^rgb\\(${oi},${oi},${oi}\\)$`),H2=new RegExp(`^rgb\\(${Pe},${Pe},${Pe}\\)$`),U2=new RegExp(`^rgba\\(${oi},${oi},${oi},${bn}\\)$`),j2=new RegExp(`^rgba\\(${Pe},${Pe},${Pe},${bn}\\)$`),Y2=new RegExp(`^hsl\\(${bn},${Pe},${Pe}\\)$`),G2=new RegExp(`^hsla\\(${bn},${Pe},${Pe},${bn}\\)$`),Fh={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};Dn(zr,Fr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dh,formatHex:Dh,formatHex8:V2,formatHsl:X2,formatRgb:Oh,toString:Oh});function Dh(){return this.rgb().formatHex()}function V2(){return this.rgb().formatHex8()}function X2(){return Jf(this).formatHsl()}function Oh(){return this.rgb().formatRgb()}function Fr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=W2.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Rh(t):r===3?new Xt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Zn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Zn(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=q2.exec(e))?new Xt(t[1],t[2],t[3],1):(t=H2.exec(e))?new Xt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=U2.exec(e))?Zn(t[1],t[2],t[3],t[4]):(t=j2.exec(e))?Zn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Y2.exec(e))?Nh(t[1],t[2]/100,t[3]/100,1):(t=G2.exec(e))?Nh(t[1],t[2]/100,t[3]/100,t[4]):Fh.hasOwnProperty(e)?Rh(Fh[e]):e==="transparent"?new Xt(NaN,NaN,NaN,0):null}function Rh(e){return new Xt(e>>16&255,e>>8&255,e&255,1)}function Zn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Xt(e,t,r,i)}function Qf(e){return e instanceof zr||(e=Fr(e)),e?(e=e.rgb(),new Xt(e.r,e.g,e.b,e.opacity)):new Xt}function Zo(e,t,r,i){return arguments.length===1?Qf(e):new Xt(e,t,r,i??1)}function Xt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Dn(Xt,Zo,Ss(zr,{brighter(e){return e=e==null?Da:Math.pow(Da,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xn:Math.pow(xn,e),new Xt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xt(Lr(this.r),Lr(this.g),Lr(this.b),Oa(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:Ih,formatHex:Ih,formatHex8:Z2,formatRgb:Ph,toString:Ph}));function Ih(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function Z2(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ph(){const e=Oa(this.opacity);return`${e===1?"rgb(":"rgba("}${Lr(this.r)}, ${Lr(this.g)}, ${Lr(this.b)}${e===1?")":`, ${e})`}`}function Oa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Lr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sr(e){return e=Lr(e),(e<16?"0":"")+e.toString(16)}function Nh(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 Jf(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof zr||(e=Fr(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,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,o=a-n,l=(a+n)/2;return o?(t===a?s=(r-i)/o+(r<i)*6:r===a?s=(i-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=l>0&&l<1?0:s,new ke(s,o,l,e.opacity)}function K2(e,t,r,i){return arguments.length===1?Jf(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}Dn(ke,K2,Ss(zr,{brighter(e){return e=e==null?Da:Math.pow(Da,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xn:Math.pow(xn,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,n=2*r-i;return new Xt(po(e>=240?e-240:e+120,n,i),po(e,n,i),po(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ke(zh(this.h),Kn(this.s),Kn(this.l),Oa(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=Oa(this.opacity);return`${e===1?"hsl(":"hsla("}${zh(this.h)}, ${Kn(this.s)*100}%, ${Kn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zh(e){return e=(e||0)%360,e<0?e+360:e}function Kn(e){return Math.max(0,Math.min(1,e||0))}function po(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 Q2=Math.PI/180,J2=180/Math.PI,Ra=18,td=.96422,ed=1,rd=.82521,id=4/29,li=6/29,nd=3*li*li,t_=li*li*li;function ad(e){if(e instanceof Ne)return new Ne(e.l,e.a,e.b,e.opacity);if(e instanceof Xe)return sd(e);e instanceof Xt||(e=Qf(e));var t=xo(e.r),r=xo(e.g),i=xo(e.b),n=go((.2225045*t+.7168786*r+.0606169*i)/ed),a,s;return t===r&&r===i?a=s=n:(a=go((.4360747*t+.3850649*r+.1430804*i)/td),s=go((.0139322*t+.0971045*r+.7141733*i)/rd)),new Ne(116*n-16,500*(a-n),200*(n-s),e.opacity)}function e_(e,t,r,i){return arguments.length===1?ad(e):new Ne(e,t,r,i??1)}function Ne(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}Dn(Ne,e_,Ss(zr,{brighter(e){return new Ne(this.l+Ra*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ne(this.l-Ra*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=td*mo(t),e=ed*mo(e),r=rd*mo(r),new Xt(yo(3.1338561*t-1.6168667*e-.4906146*r),yo(-.9787684*t+1.9161415*e+.033454*r),yo(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function go(e){return e>t_?Math.pow(e,1/3):e/nd+id}function mo(e){return e>li?e*e*e:nd*(e-id)}function yo(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function xo(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function r_(e){if(e instanceof Xe)return new Xe(e.h,e.c,e.l,e.opacity);if(e instanceof Ne||(e=ad(e)),e.a===0&&e.b===0)return new Xe(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*J2;return new Xe(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ko(e,t,r,i){return arguments.length===1?r_(e):new Xe(e,t,r,i??1)}function Xe(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function sd(e){if(isNaN(e.h))return new Ne(e.l,0,0,e.opacity);var t=e.h*Q2;return new Ne(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Dn(Xe,Ko,Ss(zr,{brighter(e){return new Xe(this.h,this.c,this.l+Ra*(e??1),this.opacity)},darker(e){return new Xe(this.h,this.c,this.l-Ra*(e??1),this.opacity)},rgb(){return sd(this).rgb()}}));const Ts=e=>()=>e;function od(e,t){return function(r){return e+r*t}}function i_(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 n_(e,t){var r=t-e;return r?od(e,r>180||r<-180?r-360*Math.round(r/360):r):Ts(isNaN(e)?t:e)}function a_(e){return(e=+e)==1?gn:function(t,r){return r-t?i_(t,r,e):Ts(isNaN(t)?r:t)}}function gn(e,t){var r=t-e;return r?od(e,r):Ts(isNaN(e)?t:e)}const Ia=(function e(t){var r=a_(t);function i(n,a){var s=r((n=Zo(n)).r,(a=Zo(a)).r),o=r(n.g,a.g),l=r(n.b,a.b),c=gn(n.opacity,a.opacity);return function(h){return n.r=s(h),n.g=o(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function s_(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}}function o_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function l_(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),s;for(s=0;s<i;++s)n[s]=Jl(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(o){for(s=0;s<i;++s)a[s]=n[s](o);return a}}function c_(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function we(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function h_(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=Jl(e[n],t[n]):i[n]=t[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var Qo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bo=new RegExp(Qo.source,"g");function u_(e){return function(){return e}}function f_(e){return function(t){return e(t)+""}}function ld(e,t){var r=Qo.lastIndex=bo.lastIndex=0,i,n,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Qo.exec(e))&&(n=bo.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:we(i,n)})),r=bo.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?f_(l[0].x):u_(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)o[(u=l[h]).i]=u.x(c);return o.join("")})}function Jl(e,t){var r=typeof t,i;return t==null||r==="boolean"?Ts(t):(r==="number"?we:r==="string"?(i=Fr(t))?(t=i,Ia):ld:t instanceof Fr?Ia:t instanceof Date?c_:o_(t)?s_:Array.isArray(t)?l_:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?h_:we)(e,t)}function d_(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Wh=180/Math.PI,Jo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cd(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*Wh,skewX:Math.atan(l)*Wh,scaleX:s,scaleY:o}}var Qn;function p_(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jo:cd(t.a,t.b,t.c,t.d,t.e,t.f)}function g_(e){return e==null||(Qn||(Qn=document.createElementNS("http://www.w3.org/2000/svg","g")),Qn.setAttribute("transform",e),!(e=Qn.transform.baseVal.consolidate()))?Jo:(e=e.matrix,cd(e.a,e.b,e.c,e.d,e.e,e.f))}function hd(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:we(c,u)},{i:m-2,x:we(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:we(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function o(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:we(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push(n(d)+"scale(",null,",",null,")");g.push({i:m-4,x:we(c,u)},{i:m-2,x:we(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),o(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,m=f.length,y;++g<m;)u[(y=f[g]).i]=y.x(d);return u.join("")}}}var m_=hd(p_,"px, ","px)","deg)"),y_=hd(g_,", ",")",")");function x_(e){return function(t,r){var i=e((t=Ko(t)).h,(r=Ko(r)).h),n=gn(t.c,r.c),a=gn(t.l,r.l),s=gn(t.opacity,r.opacity);return function(o){return t.h=i(o),t.c=n(o),t.l=a(o),t.opacity=s(o),t+""}}}const g3=x_(n_);var Ci=0,rn=0,Hi=0,ud=1e3,Pa,nn,Na=0,Dr=0,Ms=0,_n=typeof performance=="object"&&performance.now?performance:Date,fd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function tc(){return Dr||(fd(b_),Dr=_n.now()+Ms)}function b_(){Dr=0}function za(){this._call=this._time=this._next=null}za.prototype=dd.prototype={constructor:za,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?tc():+r)+(t==null?0:+t),!this._next&&nn!==this&&(nn?nn._next=this:Pa=this,nn=this),this._call=e,this._time=r,tl()},stop:function(){this._call&&(this._call=null,this._time=1/0,tl())}};function dd(e,t,r){var i=new za;return i.restart(e,t,r),i}function __(){tc(),++Ci;for(var e=Pa,t;e;)(t=Dr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ci}function qh(){Dr=(Na=_n.now())+Ms,Ci=rn=0;try{__()}finally{Ci=0,C_(),Dr=0}}function w_(){var e=_n.now(),t=e-Na;t>ud&&(Ms-=t,Na=e)}function C_(){for(var e,t=Pa,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:Pa=r);nn=e,tl(i)}function tl(e){if(!Ci){rn&&(rn=clearTimeout(rn));var t=e-Dr;t>24?(e<1/0&&(rn=setTimeout(qh,e-_n.now()-Ms)),Hi&&(Hi=clearInterval(Hi))):(Hi||(Na=_n.now(),Hi=setInterval(w_,ud)),Ci=1,fd(qh))}}function Hh(e,t,r){var i=new za;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var v_=Nf("start","end","cancel","interrupt"),k_=[],pd=0,Uh=1,el=2,ma=3,jh=4,rl=5,ya=6;function As(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;S_(e,r,{name:t,index:i,group:n,on:v_,tween:k_,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:pd})}function ec(e,t){var r=Le(e,t);if(r.state>pd)throw new Error("too late; already scheduled");return r}function We(e,t){var r=Le(e,t);if(r.state>ma)throw new Error("too late; already running");return r}function Le(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function S_(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=dd(a,0,r.time);function a(c){r.state=Uh,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,f,d;if(r.state!==Uh)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===ma)return Hh(s);d.state===jh?(d.state=ya,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=ya,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Hh(function(){r.state===ma&&(r.state=jh,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=el,r.on.call("start",e,e.__data__,r.index,r.group),r.state===el){for(r.state=ma,n=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))&&(n[++u]=d);n.length=u+1}}function o(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=rl,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===rl&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=ya,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function T_(e,t){var r=e.__transition,i,n,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((i=r[s]).name!==t){a=!1;continue}n=i.state>el&&i.state<rl,i.state=ya,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function M_(e){return this.each(function(){T_(this,e)})}function A_(e,t){var r,i;return function(){var n=We(this,e),a=n.tween;if(a!==r){i=r=a;for(var s=0,o=i.length;s<o;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}n.tween=i}}function L_(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=We(this,e),s=a.tween;if(s!==i){n=(i=s).slice();for(var o={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=o;break}l===c&&n.push(o)}a.tween=n}}function B_(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Le(this.node(),r).tween,n=0,a=i.length,s;n<a;++n)if((s=i[n]).name===e)return s.value;return null}return this.each((t==null?A_:L_)(r,e,t))}function rc(e,t,r){var i=e._id;return e.each(function(){var n=We(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return Le(n,i).value[t]}}function gd(e,t){var r;return(typeof t=="number"?we:t instanceof Fr?Ia:(r=Fr(t))?(t=r,Ia):ld)(e,t)}function E_(e){return function(){this.removeAttribute(e)}}function $_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function F_(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttribute(e);return s===n?null:s===i?a:a=t(i=s,r)}}function D_(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===n?null:s===i?a:a=t(i=s,r)}}function O_(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function R_(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function I_(e,t){var r=ks(e),i=r==="transform"?y_:gd;return this.attrTween(e,typeof t=="function"?(r.local?R_:O_)(r,i,rc(this,"attr."+e,t)):t==null?(r.local?$_:E_)(r):(r.local?D_:F_)(r,i,t))}function P_(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function N_(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function z_(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&N_(e,a)),r}return n._value=t,n}function W_(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&P_(e,a)),r}return n._value=t,n}function q_(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=ks(e);return this.tween(r,(i.local?z_:W_)(i,t))}function H_(e,t){return function(){ec(this,e).delay=+t.apply(this,arguments)}}function U_(e,t){return t=+t,function(){ec(this,e).delay=t}}function j_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?H_:U_)(t,e)):Le(this.node(),t).delay}function Y_(e,t){return function(){We(this,e).duration=+t.apply(this,arguments)}}function G_(e,t){return t=+t,function(){We(this,e).duration=t}}function V_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Y_:G_)(t,e)):Le(this.node(),t).duration}function X_(e,t){if(typeof t!="function")throw new Error;return function(){We(this,e).ease=t}}function Z_(e){var t=this._id;return arguments.length?this.each(X_(t,e)):Le(this.node(),t).ease}function K_(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;We(this,e).ease=r}}function Q_(e){if(typeof e!="function")throw new Error;return this.each(K_(this._id,e))}function J_(e){typeof e!="function"&&(e=qf(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new tr(i,this._parents,this._name,this._id)}function tw(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),s=new Array(i),o=0;o<a;++o)for(var l=t[o],c=r[o],h=l.length,u=s[o]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;o<i;++o)s[o]=t[o];return new tr(s,this._parents,this._name,this._id)}function ew(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 rw(e,t,r){var i,n,a=ew(t)?ec:We;return function(){var s=a(this,e),o=s.on;o!==i&&(n=(i=o).copy()).on(t,r),s.on=n}}function iw(e,t){var r=this._id;return arguments.length<2?Le(this.node(),r).on.on(e):this.each(rw(r,e,t))}function nw(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function aw(){return this.on("end.remove",nw(this._id))}function sw(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Kl(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o=i[s],l=o.length,c=a[s]=new Array(l),h,u,f=0;f<l;++f)(h=o[f])&&(u=e.call(h,h.__data__,f,o))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,As(c[f],t,r,f,c,Le(h,r)));return new tr(a,this._parents,t,r)}function ow(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Wf(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l=i[o],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,g=Le(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&As(d,t,r,m,f,g);a.push(f),s.push(h)}return new tr(a,s,t,r)}var lw=Fn.prototype.constructor;function cw(){return new lw(this._groups,this._parents)}function hw(e,t){var r,i,n;return function(){var a=wi(this,e),s=(this.style.removeProperty(e),wi(this,e));return a===s?null:a===r&&s===i?n:n=t(r=a,i=s)}}function md(e){return function(){this.style.removeProperty(e)}}function uw(e,t,r){var i,n=r+"",a;return function(){var s=wi(this,e);return s===n?null:s===i?a:a=t(i=s,r)}}function fw(e,t,r){var i,n,a;return function(){var s=wi(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),wi(this,e))),s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o))}}function dw(e,t){var r,i,n,a="style."+t,s="end."+a,o;return function(){var l=We(this,e),c=l.on,h=l.value[a]==null?o||(o=md(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(s,n=h),l.on=i}}function pw(e,t,r){var i=(e+="")=="transform"?m_:gd;return t==null?this.styleTween(e,hw(e,i)).on("end.style."+e,md(e)):typeof t=="function"?this.styleTween(e,fw(e,i,rc(this,"style."+e,t))).each(dw(this._id,e)):this.styleTween(e,uw(e,i,t),r).on("end.style."+e,null)}function gw(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function mw(e,t,r){var i,n;function a(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&gw(e,s,r)),i}return a._value=t,a}function yw(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,mw(e,t,r??""))}function xw(e){return function(){this.textContent=e}}function bw(e){return function(){var t=e(this);this.textContent=t??""}}function _w(e){return this.tween("text",typeof e=="function"?bw(rc(this,"text",e)):xw(e==null?"":e+""))}function ww(e){return function(t){this.textContent=e.call(this,t)}}function Cw(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&ww(n)),t}return i._value=e,i}function vw(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,Cw(e))}function kw(){for(var e=this._name,t=this._id,r=yd(),i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var h=Le(l,t);As(l,e,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new tr(i,this._parents,e,r)}function Sw(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--n===0&&a()}};r.each(function(){var c=We(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),n===0&&a()})}var Tw=0;function tr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function yd(){return++Tw}var Ye=Fn.prototype;tr.prototype={constructor:tr,select:sw,selectAll:ow,selectChild:Ye.selectChild,selectChildren:Ye.selectChildren,filter:J_,merge:tw,selection:cw,transition:kw,call:Ye.call,nodes:Ye.nodes,node:Ye.node,size:Ye.size,empty:Ye.empty,each:Ye.each,on:iw,attr:I_,attrTween:q_,style:pw,styleTween:yw,text:_w,textTween:vw,remove:aw,tween:B_,delay:j_,duration:V_,ease:Z_,easeVarying:Q_,end:Sw,[Symbol.iterator]:Ye[Symbol.iterator]};function Mw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Aw={time:null,delay:0,duration:250,ease:Mw};function Lw(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 Bw(e){var t,r;e instanceof tr?(t=e._id,e=e._name):(t=yd(),(r=Aw).time=tc(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&As(l,e,t,c,s,r||Lw(l,t));return new tr(i,this._parents,e,t)}Fn.prototype.interrupt=M_;Fn.prototype.transition=Bw;const il=Math.PI,nl=2*il,wr=1e-6,Ew=nl-wr;function xd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function $w(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return xd;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class Fw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?xd:$w(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,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,s){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=i-t,c=n-r,h=s-t,u=o-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>wr)if(!(Math.abs(u*l-c*h)>wr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-s,g=n-o,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),_=a*Math.tan((il-Math.acos((m+f-y)/(2*x*b)))/2),w=_/b,C=_/x;Math.abs(w-1)>wr&&this._append`L${t+w*h},${r+w*u}`,this._append`A${a},${a},0,0,${+(u*d>h*g)},${this._x1=t+C*l},${this._y1=r+C*c}`}}arc(t,r,i,n,a,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,h=r+l,u=1^s,f=s?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>wr||Math.abs(this._y1-h)>wr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%nl+nl),f>Ew?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>wr&&this._append`A${i},${i},0,${+(f>=il)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Dw(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Wa(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function vi(e){return e=Wa(Math.abs(e)),e?e[1]:NaN}function Ow(e,t){return function(r,i){for(var n=r.length,a=[],s=0,o=e[0],l=0;n>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),a.push(r.substring(n-=o,n+o)),!((l+=o+1)>i));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function Rw(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Iw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qa(e){if(!(t=Iw.exec(e)))throw new Error("invalid format: "+e);var t;return new ic({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}qa.prototype=ic.prototype;function ic(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ic.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Pw(e){t:for(var t=e.length,r=1,i=-1,n;r<t;++r)switch(e[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+e[r])break t;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var Ha;function Nw(e,t){var r=Wa(e,t);if(!r)return Ha=void 0,e.toPrecision(t);var i=r[0],n=r[1],a=n-(Ha=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Wa(e,Math.max(0,t+a-1))[0]}function Yh(e,t){var r=Wa(e,t);if(!r)return e+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const Gh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Dw,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Yh(e*100,t),r:Yh,s:Nw,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Vh(e){return e}var Xh=Array.prototype.map,Zh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zw(e){var t=e.grouping===void 0||e.thousands===void 0?Vh:Ow(Xh.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Vh:Rw(Xh.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(u,f){u=qa(u);var d=u.fill,g=u.align,m=u.sign,y=u.symbol,x=u.zero,b=u.width,_=u.comma,w=u.precision,C=u.trim,v=u.type;v==="n"?(_=!0,v="g"):Gh[v]||(w===void 0&&(w=12),C=!0,v="g"),(x||d==="0"&&g==="=")&&(x=!0,d="0",g="=");var T=(f&&f.prefix!==void 0?f.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),O=(y==="$"?i:/[%p]/.test(v)?s:"")+(f&&f.suffix!==void 0?f.suffix:""),I=Gh[v],R=/[defgprs%]/.test(v);w=w===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function B($){var L=T,S=O,E,A,D;if(v==="c")S=I($)+S,$="";else{$=+$;var F=$<0||1/$<0;if($=isNaN($)?l:I(Math.abs($),w),C&&($=Pw($)),F&&+$==0&&m!=="+"&&(F=!1),L=(F?m==="("?m:o:m==="-"||m==="("?"":m)+L,S=(v==="s"&&!isNaN($)&&Ha!==void 0?Zh[8+Ha/3]:"")+S+(F&&m==="("?")":""),R){for(E=-1,A=$.length;++E<A;)if(D=$.charCodeAt(E),48>D||D>57){S=(D===46?n+$.slice(E+1):$.slice(E))+S,$=$.slice(0,E);break}}}_&&!x&&($=t($,1/0));var U=L.length+$.length+S.length,W=U<b?new Array(b-U+1).join(d):"";switch(_&&x&&($=t(W+$,W.length?b-S.length:1/0),W=""),g){case"<":$=L+$+S+W;break;case"=":$=L+W+$+S;break;case"^":$=W.slice(0,U=W.length>>1)+L+$+S+W.slice(U);break;default:$=W+L+$+S;break}return a($)}return B.toString=function(){return u+""},B}function h(u,f){var d=Math.max(-8,Math.min(8,Math.floor(vi(f)/3)))*3,g=Math.pow(10,-d),m=c((u=qa(u),u.type="f",u),{suffix:Zh[8+d/3]});return function(y){return m(g*y)}}return{format:c,formatPrefix:h}}var Jn,bd,_d;Ww({thousands:",",grouping:[3],currency:["$",""]});function Ww(e){return Jn=zw(e),bd=Jn.format,_d=Jn.formatPrefix,Jn}function qw(e){return Math.max(0,-vi(Math.abs(e)))}function Hw(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vi(t)/3)))*3-vi(Math.abs(e)))}function Uw(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vi(t)-vi(e))+1}function jw(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function Yw(){return this.eachAfter(jw)}function Gw(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function Vw(e,t){for(var r=this,i=[r],n,a,s=-1;r=i.pop();)if(e.call(t,r,++s,this),n=r.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}function Xw(e,t){for(var r=this,i=[r],n=[],a,s,o,l=-1;r=i.pop();)if(n.push(r),a=r.children)for(s=0,o=a.length;s<o;++s)i.push(a[s]);for(;r=n.pop();)e.call(t,r,++l,this);return this}function Zw(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function Kw(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})}function Qw(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Jw(e){for(var t=this,r=tC(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function tC(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}function eC(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function rC(){return Array.from(this)}function iC(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function nC(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*aC(){var e=this,t,r=[e],i,n,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(n=0,a=i.length;n<a;++n)r.push(i[n]);while(r.length)}function wd(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=lC)):t===void 0&&(t=oC);for(var r=new Ua(e),i,n=[r],a,s,o,l;i=n.pop();)if((s=t(i.data))&&(l=(s=Array.from(s)).length))for(i.children=s,o=l-1;o>=0;--o)n.push(a=s[o]=new Ua(s[o])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(hC)}function sC(){return wd(this).eachBefore(cC)}function oC(e){return e.children}function lC(e){return Array.isArray(e)?e[1]:null}function cC(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function hC(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ua(e){this.data=e,this.depth=this.height=0,this.parent=null}Ua.prototype=wd.prototype={constructor:Ua,count:Yw,each:Gw,eachAfter:Xw,eachBefore:Vw,find:Zw,sum:Kw,sort:Qw,path:Jw,ancestors:eC,descendants:rC,leaves:iC,links:nC,copy:sC,[Symbol.iterator]:aC};function uC(e){if(typeof e!="function")throw new Error;return e}function Ui(){return 0}function ji(e){return function(){return e}}function fC(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function dC(e,t,r,i,n){for(var a=e.children,s,o=-1,l=a.length,c=e.value&&(i-t)/e.value;++o<l;)s=a[o],s.y0=r,s.y1=n,s.x0=t,s.x1=t+=s.value*c}function pC(e,t,r,i,n){for(var a=e.children,s,o=-1,l=a.length,c=e.value&&(n-r)/e.value;++o<l;)s=a[o],s.x0=t,s.x1=i,s.y0=r,s.y1=r+=s.value*c}var gC=(1+Math.sqrt(5))/2;function mC(e,t,r,i,n,a){for(var s=[],o=t.children,l,c,h=0,u=0,f=o.length,d,g,m=t.value,y,x,b,_,w,C,v;h<f;){d=n-r,g=a-i;do y=o[u++].value;while(!y&&u<f);for(x=b=y,C=Math.max(g/d,d/g)/(m*e),v=y*y*C,w=Math.max(b/v,v/x);u<f;++u){if(y+=c=o[u].value,c<x&&(x=c),c>b&&(b=c),v=y*y*C,_=Math.max(b/v,v/x),_>w){y-=c;break}w=_}s.push(l={value:y,dice:d<g,children:o.slice(h,u)}),l.dice?dC(l,r,i,n,m?i+=g*y/m:a):pC(l,r,i,m?r+=d*y/m:n,a),m-=y,h=u}return s}const yC=(function e(t){function r(i,n,a,s,o){mC(t,i,n,a,s,o)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r})(gC);function m3(){var e=yC,t=!1,r=1,i=1,n=[0],a=Ui,s=Ui,o=Ui,l=Ui,c=Ui;function h(f){return f.x0=f.y0=0,f.x1=r,f.y1=i,f.eachBefore(u),n=[0],t&&f.eachBefore(fC),f}function u(f){var d=n[f.depth],g=f.x0+d,m=f.y0+d,y=f.x1-d,x=f.y1-d;y<g&&(g=y=(g+y)/2),x<m&&(m=x=(m+x)/2),f.x0=g,f.y0=m,f.x1=y,f.y1=x,f.children&&(d=n[f.depth+1]=a(f)/2,g+=c(f)-d,m+=s(f)-d,y-=o(f)-d,x-=l(f)-d,y<g&&(g=y=(g+y)/2),x<m&&(m=x=(m+x)/2),e(f,g,m,y,x))}return h.round=function(f){return arguments.length?(t=!!f,h):t},h.size=function(f){return arguments.length?(r=+f[0],i=+f[1],h):[r,i]},h.tile=function(f){return arguments.length?(e=uC(f),h):e},h.padding=function(f){return arguments.length?h.paddingInner(f).paddingOuter(f):h.paddingInner()},h.paddingInner=function(f){return arguments.length?(a=typeof f=="function"?f:ji(+f),h):a},h.paddingOuter=function(f){return arguments.length?h.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):h.paddingTop()},h.paddingTop=function(f){return arguments.length?(s=typeof f=="function"?f:ji(+f),h):s},h.paddingRight=function(f){return arguments.length?(o=typeof f=="function"?f:ji(+f),h):o},h.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:ji(+f),h):l},h.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:ji(+f),h):c},h}function Ls(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Kh=Symbol("implicit");function Cd(){var e=new Ah,t=[],r=[],i=Kh;function n(a){let s=e.get(a);if(s===void 0){if(i!==Kh)return i;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return n.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Ah;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return n},n.range=function(a){return arguments.length?(r=Array.from(a),n):r.slice()},n.unknown=function(a){return arguments.length?(i=a,n):i},n.copy=function(){return Cd(t,r).unknown(i)},Ls.apply(n,arguments),n}function xC(){var e=Cd().unknown(void 0),t=e.domain,r=e.range,i=0,n=1,a,s,o=!1,l=0,c=0,h=.5;delete e.unknown;function u(){var f=t().length,d=n<i,g=d?n:i,m=d?i:n;a=(m-g)/Math.max(1,f-l+c*2),o&&(a=Math.floor(a)),g+=(m-g-a*(f-l))*h,s=a*(1-l),o&&(g=Math.round(g),s=Math.round(s));var y=Jb(f).map(function(x){return g+a*x});return r(d?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),u()):t()},e.range=function(f){return arguments.length?([i,n]=f,i=+i,n=+n,u()):[i,n]},e.rangeRound=function(f){return[i,n]=f,i=+i,n=+n,o=!0,u()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(f){return arguments.length?(o=!!f,u()):o},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),u()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),u()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,u()):c},e.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},e.copy=function(){return xC(t(),[i,n]).round(o).paddingInner(l).paddingOuter(c).align(h)},Ls.apply(u(),arguments)}function bC(e){return function(){return e}}function _C(e){return+e}var Qh=[0,1];function ri(e){return e}function al(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:bC(isNaN(t)?NaN:.5)}function wC(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function CC(e,t,r){var i=e[0],n=e[1],a=t[0],s=t[1];return n<i?(i=al(n,i),a=r(s,a)):(i=al(i,n),a=r(a,s)),function(o){return a(i(o))}}function vC(e,t,r){var i=Math.min(e.length,t.length)-1,n=new Array(i),a=new Array(i),s=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)n[s]=al(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(o){var l=jb(e,o,1,i)-1;return a[l](n[l](o))}}function vd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function kC(){var e=Qh,t=Qh,r=Jl,i,n,a,s=ri,o,l,c;function h(){var f=Math.min(e.length,t.length);return s!==ri&&(s=wC(e[0],e[f-1])),o=f>2?vC:CC,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?a:(l||(l=o(e.map(i),t,r)))(i(s(f)))}return u.invert=function(f){return s(n((c||(c=o(t,e.map(i),we)))(f)))},u.domain=function(f){return arguments.length?(e=Array.from(f,_C),h()):e.slice()},u.range=function(f){return arguments.length?(t=Array.from(f),h()):t.slice()},u.rangeRound=function(f){return t=Array.from(f),r=d_,h()},u.clamp=function(f){return arguments.length?(s=f?!0:ri,h()):s!==ri},u.interpolate=function(f){return arguments.length?(r=f,h()):r},u.unknown=function(f){return arguments.length?(a=f,u):a},function(f,d){return i=f,n=d,h()}}function kd(){return kC()(ri,ri)}function SC(e,t,r,i){var n=Go(e,t,r),a;switch(i=qa(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(a=Hw(n,s))&&(i.precision=a),_d(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Uw(n,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=qw(n))&&(i.precision=a-(i.type==="%")*2);break}}return bd(i)}function TC(e){var t=e.domain;return e.ticks=function(r){var i=t();return Qb(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var n=t();return SC(n[0],n[n.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),n=0,a=i.length-1,s=i[n],o=i[a],l,c,h=10;for(o<s&&(c=s,s=o,o=c,c=n,n=a,a=c);h-- >0;){if(c=Yo(s,o,r),c===l)return i[n]=s,i[a]=o,t(i);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function MC(){var e=kd();return e.copy=function(){return vd(e,MC())},Ls.apply(e,arguments),TC(e)}function AC(e,t){e=e.slice();var r=0,i=e.length-1,n=e[r],a=e[i],s;return a<n&&(s=r,r=i,i=s,s=n,n=a,a=s),e[r]=t.floor(n),e[i]=t.ceil(a),e}const _o=new Date,wo=new Date;function Pt(e,t,r,i){function n(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return n.floor=a=>(e(a=new Date(+a)),a),n.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),n.round=a=>{const s=n(a),o=n.ceil(a);return a-s<o-a?s:o},n.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),n.range=(a,s,o)=>{const l=[];if(a=n.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let c;do l.push(c=new Date(+a)),t(a,o),e(a);while(c<a&&a<s);return l},n.filter=a=>Pt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),r&&(n.count=(a,s)=>(_o.setTime(+a),wo.setTime(+s),e(_o),e(wo),Math.floor(r(_o,wo))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(i?s=>i(s)%a===0:s=>n.count(0,s)%a===0):n)),n}const ja=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ja.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ja);ja.range;const Ze=1e3,pe=Ze*60,Ke=pe*60,er=Ke*24,nc=er*7,Jh=er*30,Co=er*365,ii=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ze)},(e,t)=>(t-e)/Ze,e=>e.getUTCSeconds());ii.range;const ac=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze)},(e,t)=>{e.setTime(+e+t*pe)},(e,t)=>(t-e)/pe,e=>e.getMinutes());ac.range;const LC=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pe)},(e,t)=>(t-e)/pe,e=>e.getUTCMinutes());LC.range;const sc=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze-e.getMinutes()*pe)},(e,t)=>{e.setTime(+e+t*Ke)},(e,t)=>(t-e)/Ke,e=>e.getHours());sc.range;const BC=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ke)},(e,t)=>(t-e)/Ke,e=>e.getUTCHours());BC.range;const On=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pe)/er,e=>e.getDate()-1);On.range;const oc=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/er,e=>e.getUTCDate()-1);oc.range;const EC=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/er,e=>Math.floor(e/er));EC.range;function Wr(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*pe)/nc)}const Bs=Wr(0),Ya=Wr(1),$C=Wr(2),FC=Wr(3),ki=Wr(4),DC=Wr(5),OC=Wr(6);Bs.range;Ya.range;$C.range;FC.range;ki.range;DC.range;OC.range;function qr(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/nc)}const Sd=qr(0),Ga=qr(1),RC=qr(2),IC=qr(3),Si=qr(4),PC=qr(5),NC=qr(6);Sd.range;Ga.range;RC.range;IC.range;Si.range;PC.range;NC.range;const lc=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());lc.range;const zC=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());zC.range;const rr=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());rr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});rr.range;const Or=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Or.range;function WC(e,t,r,i,n,a){const s=[[ii,1,Ze],[ii,5,5*Ze],[ii,15,15*Ze],[ii,30,30*Ze],[a,1,pe],[a,5,5*pe],[a,15,15*pe],[a,30,30*pe],[n,1,Ke],[n,3,3*Ke],[n,6,6*Ke],[n,12,12*Ke],[i,1,er],[i,2,2*er],[r,1,nc],[t,1,Jh],[t,3,3*Jh],[e,1,Co]];function o(c,h,u){const f=h<c;f&&([c,h]=[h,c]);const d=u&&typeof u.range=="function"?u:l(c,h,u),g=d?d.range(c,+h+1):[];return f?g.reverse():g}function l(c,h,u){const f=Math.abs(h-c)/u,d=Zl(([,,y])=>y).right(s,f);if(d===s.length)return e.every(Go(c/Co,h/Co,u));if(d===0)return ja.every(Math.max(Go(c,h,u),1));const[g,m]=s[f/s[d-1][2]<s[d][2]/f?d-1:d];return g.every(m)}return[o,l]}const[qC,HC]=WC(rr,lc,Bs,On,sc,ac);function vo(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ko(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Yi(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function UC(e){var t=e.dateTime,r=e.date,i=e.time,n=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=Gi(n),h=Vi(n),u=Gi(a),f=Vi(a),d=Gi(s),g=Vi(s),m=Gi(o),y=Vi(o),x=Gi(l),b=Vi(l),_={a:D,A:F,b:U,B:W,c:null,d:au,e:au,f:dv,g:vv,G:Sv,H:hv,I:uv,j:fv,L:Td,m:pv,M:gv,p:Y,q:Q,Q:lu,s:cu,S:mv,u:yv,U:xv,V:bv,w:_v,W:wv,x:null,X:null,y:Cv,Y:kv,Z:Tv,"%":ou},w={a:G,A:ut,b:rt,B:vt,c:null,d:su,e:su,f:Bv,g:zv,G:qv,H:Mv,I:Av,j:Lv,L:Ad,m:Ev,M:$v,p:wt,q:Mt,Q:lu,s:cu,S:Fv,u:Dv,U:Ov,V:Rv,w:Iv,W:Pv,x:null,X:null,y:Nv,Y:Wv,Z:Hv,"%":ou},C={a:R,A:B,b:$,B:L,c:S,d:iu,e:iu,f:sv,g:ru,G:eu,H:nu,I:nu,j:rv,L:av,m:ev,M:iv,p:I,q:tv,Q:lv,s:cv,S:nv,u:XC,U:ZC,V:KC,w:VC,W:QC,x:E,X:A,y:ru,Y:eu,Z:JC,"%":ov};_.x=v(r,_),_.X=v(i,_),_.c=v(t,_),w.x=v(r,w),w.X=v(i,w),w.c=v(t,w);function v(q,J){return function(ht){var N=[],Ct=-1,gt=0,At=q.length,zt,xe,He;for(ht instanceof Date||(ht=new Date(+ht));++Ct<At;)q.charCodeAt(Ct)===37&&(N.push(q.slice(gt,Ct)),(xe=tu[zt=q.charAt(++Ct)])!=null?zt=q.charAt(++Ct):xe=zt==="e"?" ":"0",(He=J[zt])&&(zt=He(ht,xe)),N.push(zt),gt=Ct+1);return N.push(q.slice(gt,Ct)),N.join("")}}function T(q,J){return function(ht){var N=Yi(1900,void 0,1),Ct=O(N,q,ht+="",0),gt,At;if(Ct!=ht.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(J&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(gt=ko(Yi(N.y,0,1)),At=gt.getUTCDay(),gt=At>4||At===0?Ga.ceil(gt):Ga(gt),gt=oc.offset(gt,(N.V-1)*7),N.y=gt.getUTCFullYear(),N.m=gt.getUTCMonth(),N.d=gt.getUTCDate()+(N.w+6)%7):(gt=vo(Yi(N.y,0,1)),At=gt.getDay(),gt=At>4||At===0?Ya.ceil(gt):Ya(gt),gt=On.offset(gt,(N.V-1)*7),N.y=gt.getFullYear(),N.m=gt.getMonth(),N.d=gt.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),At="Z"in N?ko(Yi(N.y,0,1)).getUTCDay():vo(Yi(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(At+5)%7:N.w+N.U*7-(At+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,ko(N)):vo(N)}}function O(q,J,ht,N){for(var Ct=0,gt=J.length,At=ht.length,zt,xe;Ct<gt;){if(N>=At)return-1;if(zt=J.charCodeAt(Ct++),zt===37){if(zt=J.charAt(Ct++),xe=C[zt in tu?J.charAt(Ct++):zt],!xe||(N=xe(q,ht,N))<0)return-1}else if(zt!=ht.charCodeAt(N++))return-1}return N}function I(q,J,ht){var N=c.exec(J.slice(ht));return N?(q.p=h.get(N[0].toLowerCase()),ht+N[0].length):-1}function R(q,J,ht){var N=d.exec(J.slice(ht));return N?(q.w=g.get(N[0].toLowerCase()),ht+N[0].length):-1}function B(q,J,ht){var N=u.exec(J.slice(ht));return N?(q.w=f.get(N[0].toLowerCase()),ht+N[0].length):-1}function $(q,J,ht){var N=x.exec(J.slice(ht));return N?(q.m=b.get(N[0].toLowerCase()),ht+N[0].length):-1}function L(q,J,ht){var N=m.exec(J.slice(ht));return N?(q.m=y.get(N[0].toLowerCase()),ht+N[0].length):-1}function S(q,J,ht){return O(q,t,J,ht)}function E(q,J,ht){return O(q,r,J,ht)}function A(q,J,ht){return O(q,i,J,ht)}function D(q){return s[q.getDay()]}function F(q){return a[q.getDay()]}function U(q){return l[q.getMonth()]}function W(q){return o[q.getMonth()]}function Y(q){return n[+(q.getHours()>=12)]}function Q(q){return 1+~~(q.getMonth()/3)}function G(q){return s[q.getUTCDay()]}function ut(q){return a[q.getUTCDay()]}function rt(q){return l[q.getUTCMonth()]}function vt(q){return o[q.getUTCMonth()]}function wt(q){return n[+(q.getUTCHours()>=12)]}function Mt(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var J=v(q+="",_);return J.toString=function(){return q},J},parse:function(q){var J=T(q+="",!1);return J.toString=function(){return q},J},utcFormat:function(q){var J=v(q+="",w);return J.toString=function(){return q},J},utcParse:function(q){var J=T(q+="",!0);return J.toString=function(){return q},J}}}var tu={"-":"",_:" ",0:"0"},Nt=/^\s*\d+/,jC=/^%/,YC=/[\\^$*+?|[\]().{}]/g;function mt(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a<r?new Array(r-a+1).join(t)+n:n)}function GC(e){return e.replace(YC,"\\$&")}function Gi(e){return new RegExp("^(?:"+e.map(GC).join("|")+")","i")}function Vi(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function VC(e,t,r){var i=Nt.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function XC(e,t,r){var i=Nt.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function ZC(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function KC(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function QC(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function eu(e,t,r){var i=Nt.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function ru(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function JC(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function tv(e,t,r){var i=Nt.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function ev(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function iu(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function rv(e,t,r){var i=Nt.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function nu(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function iv(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function nv(e,t,r){var i=Nt.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function av(e,t,r){var i=Nt.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function sv(e,t,r){var i=Nt.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function ov(e,t,r){var i=jC.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function lv(e,t,r){var i=Nt.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function cv(e,t,r){var i=Nt.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function au(e,t){return mt(e.getDate(),t,2)}function hv(e,t){return mt(e.getHours(),t,2)}function uv(e,t){return mt(e.getHours()%12||12,t,2)}function fv(e,t){return mt(1+On.count(rr(e),e),t,3)}function Td(e,t){return mt(e.getMilliseconds(),t,3)}function dv(e,t){return Td(e,t)+"000"}function pv(e,t){return mt(e.getMonth()+1,t,2)}function gv(e,t){return mt(e.getMinutes(),t,2)}function mv(e,t){return mt(e.getSeconds(),t,2)}function yv(e){var t=e.getDay();return t===0?7:t}function xv(e,t){return mt(Bs.count(rr(e)-1,e),t,2)}function Md(e){var t=e.getDay();return t>=4||t===0?ki(e):ki.ceil(e)}function bv(e,t){return e=Md(e),mt(ki.count(rr(e),e)+(rr(e).getDay()===4),t,2)}function _v(e){return e.getDay()}function wv(e,t){return mt(Ya.count(rr(e)-1,e),t,2)}function Cv(e,t){return mt(e.getFullYear()%100,t,2)}function vv(e,t){return e=Md(e),mt(e.getFullYear()%100,t,2)}function kv(e,t){return mt(e.getFullYear()%1e4,t,4)}function Sv(e,t){var r=e.getDay();return e=r>=4||r===0?ki(e):ki.ceil(e),mt(e.getFullYear()%1e4,t,4)}function Tv(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+mt(t/60|0,"0",2)+mt(t%60,"0",2)}function su(e,t){return mt(e.getUTCDate(),t,2)}function Mv(e,t){return mt(e.getUTCHours(),t,2)}function Av(e,t){return mt(e.getUTCHours()%12||12,t,2)}function Lv(e,t){return mt(1+oc.count(Or(e),e),t,3)}function Ad(e,t){return mt(e.getUTCMilliseconds(),t,3)}function Bv(e,t){return Ad(e,t)+"000"}function Ev(e,t){return mt(e.getUTCMonth()+1,t,2)}function $v(e,t){return mt(e.getUTCMinutes(),t,2)}function Fv(e,t){return mt(e.getUTCSeconds(),t,2)}function Dv(e){var t=e.getUTCDay();return t===0?7:t}function Ov(e,t){return mt(Sd.count(Or(e)-1,e),t,2)}function Ld(e){var t=e.getUTCDay();return t>=4||t===0?Si(e):Si.ceil(e)}function Rv(e,t){return e=Ld(e),mt(Si.count(Or(e),e)+(Or(e).getUTCDay()===4),t,2)}function Iv(e){return e.getUTCDay()}function Pv(e,t){return mt(Ga.count(Or(e)-1,e),t,2)}function Nv(e,t){return mt(e.getUTCFullYear()%100,t,2)}function zv(e,t){return e=Ld(e),mt(e.getUTCFullYear()%100,t,2)}function Wv(e,t){return mt(e.getUTCFullYear()%1e4,t,4)}function qv(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Si(e):Si.ceil(e),mt(e.getUTCFullYear()%1e4,t,4)}function Hv(){return"+0000"}function ou(){return"%"}function lu(e){return+e}function cu(e){return Math.floor(+e/1e3)}var Qr,Bd;Uv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Uv(e){return Qr=UC(e),Bd=Qr.format,Qr.parse,Qr.utcFormat,Qr.utcParse,Qr}function jv(e){return new Date(e)}function Yv(e){return e instanceof Date?+e:+new Date(+e)}function Ed(e,t,r,i,n,a,s,o,l,c){var h=kd(),u=h.invert,f=h.domain,d=c(".%L"),g=c(":%S"),m=c("%I:%M"),y=c("%I %p"),x=c("%a %d"),b=c("%b %d"),_=c("%B"),w=c("%Y");function C(v){return(l(v)<v?d:o(v)<v?g:s(v)<v?m:a(v)<v?y:i(v)<v?n(v)<v?x:b:r(v)<v?_:w)(v)}return h.invert=function(v){return new Date(u(v))},h.domain=function(v){return arguments.length?f(Array.from(v,Yv)):f().map(jv)},h.ticks=function(v){var T=f();return e(T[0],T[T.length-1],v??10)},h.tickFormat=function(v,T){return T==null?C:c(T)},h.nice=function(v){var T=f();return(!v||typeof v.range!="function")&&(v=t(T[0],T[T.length-1],v??10)),v?f(AC(T,v)):h},h.copy=function(){return vd(h,Ed(e,t,r,i,n,a,s,o,l,c))},h}function y3(){return Ls.apply(Ed(qC,HC,rr,lc,Bs,On,sc,ac,ii,Bd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Gv(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(i*6,++i*6);return r}const x3=Gv("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Lt(e){return function(){return e}}const hu=Math.abs,jt=Math.atan2,br=Math.cos,Vv=Math.max,So=Math.min,Fe=Math.sin,ni=Math.sqrt,Gt=1e-12,wn=Math.PI,Va=wn/2,xa=2*wn;function Xv(e){return e>1?0:e<-1?wn:Math.acos(e)}function uu(e){return e>=1?Va:e<=-1?-Va:Math.asin(e)}function $d(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 Fw(t)}function Zv(e){return e.innerRadius}function Kv(e){return e.outerRadius}function Qv(e){return e.startAngle}function Jv(e){return e.endAngle}function tk(e){return e&&e.padAngle}function ek(e,t,r,i,n,a,s,o){var l=r-e,c=i-t,h=s-n,u=o-a,f=u*l-h*c;if(!(f*f<Gt))return f=(h*(t-a)-u*(e-n))/f,[e+f*l,t+f*c]}function ta(e,t,r,i,n,a,s){var o=e-r,l=t-i,c=(s?a:-a)/ni(o*o+l*l),h=c*l,u=-c*o,f=e+h,d=t+u,g=r+h,m=i+u,y=(f+g)/2,x=(d+m)/2,b=g-f,_=m-d,w=b*b+_*_,C=n-a,v=f*m-g*d,T=(_<0?-1:1)*ni(Vv(0,C*C*w-v*v)),O=(v*_-b*T)/w,I=(-v*b-_*T)/w,R=(v*_+b*T)/w,B=(-v*b+_*T)/w,$=O-y,L=I-x,S=R-y,E=B-x;return $*$+L*L>S*S+E*E&&(O=R,I=B),{cx:O,cy:I,x01:-h,y01:-u,x11:O*(n/C-1),y11:I*(n/C-1)}}function b3(){var e=Zv,t=Kv,r=Lt(0),i=null,n=Qv,a=Jv,s=tk,o=null,l=$d(c);function c(){var h,u,f=+e.apply(this,arguments),d=+t.apply(this,arguments),g=n.apply(this,arguments)-Va,m=a.apply(this,arguments)-Va,y=hu(m-g),x=m>g;if(o||(o=h=l()),d<f&&(u=d,d=f,f=u),!(d>Gt))o.moveTo(0,0);else if(y>xa-Gt)o.moveTo(d*br(g),d*Fe(g)),o.arc(0,0,d,g,m,!x),f>Gt&&(o.moveTo(f*br(m),f*Fe(m)),o.arc(0,0,f,m,g,x));else{var b=g,_=m,w=g,C=m,v=y,T=y,O=s.apply(this,arguments)/2,I=O>Gt&&(i?+i.apply(this,arguments):ni(f*f+d*d)),R=So(hu(d-f)/2,+r.apply(this,arguments)),B=R,$=R,L,S;if(I>Gt){var E=uu(I/f*Fe(O)),A=uu(I/d*Fe(O));(v-=E*2)>Gt?(E*=x?1:-1,w+=E,C-=E):(v=0,w=C=(g+m)/2),(T-=A*2)>Gt?(A*=x?1:-1,b+=A,_-=A):(T=0,b=_=(g+m)/2)}var D=d*br(b),F=d*Fe(b),U=f*br(C),W=f*Fe(C);if(R>Gt){var Y=d*br(_),Q=d*Fe(_),G=f*br(w),ut=f*Fe(w),rt;if(y<wn)if(rt=ek(D,F,G,ut,Y,Q,U,W)){var vt=D-rt[0],wt=F-rt[1],Mt=Y-rt[0],q=Q-rt[1],J=1/Fe(Xv((vt*Mt+wt*q)/(ni(vt*vt+wt*wt)*ni(Mt*Mt+q*q)))/2),ht=ni(rt[0]*rt[0]+rt[1]*rt[1]);B=So(R,(f-ht)/(J-1)),$=So(R,(d-ht)/(J+1))}else B=$=0}T>Gt?$>Gt?(L=ta(G,ut,D,F,d,$,x),S=ta(Y,Q,U,W,d,$,x),o.moveTo(L.cx+L.x01,L.cy+L.y01),$<R?o.arc(L.cx,L.cy,$,jt(L.y01,L.x01),jt(S.y01,S.x01),!x):(o.arc(L.cx,L.cy,$,jt(L.y01,L.x01),jt(L.y11,L.x11),!x),o.arc(0,0,d,jt(L.cy+L.y11,L.cx+L.x11),jt(S.cy+S.y11,S.cx+S.x11),!x),o.arc(S.cx,S.cy,$,jt(S.y11,S.x11),jt(S.y01,S.x01),!x))):(o.moveTo(D,F),o.arc(0,0,d,b,_,!x)):o.moveTo(D,F),!(f>Gt)||!(v>Gt)?o.lineTo(U,W):B>Gt?(L=ta(U,W,Y,Q,f,-B,x),S=ta(D,F,G,ut,f,-B,x),o.lineTo(L.cx+L.x01,L.cy+L.y01),B<R?o.arc(L.cx,L.cy,B,jt(L.y01,L.x01),jt(S.y01,S.x01),!x):(o.arc(L.cx,L.cy,B,jt(L.y01,L.x01),jt(L.y11,L.x11),!x),o.arc(0,0,f,jt(L.cy+L.y11,L.cx+L.x11),jt(S.cy+S.y11,S.cx+S.x11),x),o.arc(S.cx,S.cy,B,jt(S.y11,S.x11),jt(S.y01,S.x01),!x))):o.arc(0,0,f,C,w,x)}if(o.closePath(),h)return o=null,h+""||null}return c.centroid=function(){var h=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+n.apply(this,arguments)+ +a.apply(this,arguments))/2-wn/2;return[br(u)*h,Fe(u)*h]},c.innerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:Lt(+h),c):e},c.outerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:Lt(+h),c):t},c.cornerRadius=function(h){return arguments.length?(r=typeof h=="function"?h:Lt(+h),c):r},c.padRadius=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:Lt(+h),c):i},c.startAngle=function(h){return arguments.length?(n=typeof h=="function"?h:Lt(+h),c):n},c.endAngle=function(h){return arguments.length?(a=typeof h=="function"?h:Lt(+h),c):a},c.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:Lt(+h),c):s},c.context=function(h){return arguments.length?(o=h??null,c):o},c}function Fd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Dd(e){this._context=e}Dd.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 Xa(e){return new Dd(e)}function rk(e){return e[0]}function ik(e){return e[1]}function nk(e,t){var r=Lt(!0),i=null,n=Xa,a=null,s=$d(o);e=typeof e=="function"?e:e===void 0?rk:Lt(e),t=typeof t=="function"?t:t===void 0?ik:Lt(t);function o(l){var c,h=(l=Fd(l)).length,u,f=!1,d;for(i==null&&(a=n(d=s())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,c,l),+t(u,c,l));if(d)return a=null,d+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Lt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Lt(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),o):i},o}function ak(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function sk(e){return e}function _3(){var e=sk,t=ak,r=null,i=Lt(0),n=Lt(xa),a=Lt(0);function s(o){var l,c=(o=Fd(o)).length,h,u,f=0,d=new Array(c),g=new Array(c),m=+i.apply(this,arguments),y=Math.min(xa,Math.max(-xa,n.apply(this,arguments)-m)),x,b=Math.min(Math.abs(y)/c,a.apply(this,arguments)),_=b*(y<0?-1:1),w;for(l=0;l<c;++l)(w=g[d[l]=l]=+e(o[l],l,o))>0&&(f+=w);for(t!=null?d.sort(function(C,v){return t(g[C],g[v])}):r!=null&&d.sort(function(C,v){return r(o[C],o[v])}),l=0,u=f?(y-c*_)/f:0;l<c;++l,m=x)h=d[l],w=g[h],x=m+(w>0?w*u:0)+_,g[h]={data:o[h],index:l,value:w,startAngle:m,endAngle:x,padAngle:b};return g}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:Lt(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,r=null,s):t},s.sort=function(o){return arguments.length?(r=o,t=null,s):r},s.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Lt(+o),s):i},s.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Lt(+o),s):n},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Lt(+o),s):a},s}class Od{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 Rd(e){return new Od(e,!0)}function Id(e){return new Od(e,!1)}function hr(){}function Za(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 Es(e){this._context=e}Es.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:Za(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:Za(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ba(e){return new Es(e)}function Pd(e){this._context=e}Pd.prototype={areaStart:hr,areaEnd:hr,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:Za(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ok(e){return new Pd(e)}function Nd(e){this._context=e}Nd.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:Za(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lk(e){return new Nd(e)}function zd(e,t){this._basis=new Es(e),this._beta=t}zd.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],n=t[0],a=e[r]-i,s=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const ck=(function e(t){function r(i){return t===1?new Es(i):new zd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Ka(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 cc(e,t){this._context=e,this._k=(1-t)/6}cc.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:Ka(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:Ka(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 Wd=(function e(t){function r(i){return new cc(i,t)}return r.tension=function(i){return e(+i)},r})(0);function hc(e,t){this._context=e,this._k=(1-t)/6}hc.prototype={areaStart:hr,areaEnd:hr,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:Ka(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 hk=(function e(t){function r(i){return new hc(i,t)}return r.tension=function(i){return e(+i)},r})(0);function uc(e,t){this._context=e,this._k=(1-t)/6}uc.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:Ka(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 uk=(function e(t){function r(i){return new uc(i,t)}return r.tension=function(i){return e(+i)},r})(0);function fc(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Gt){var o=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*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Gt){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);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function qd(e,t){this._context=e,this._alpha=t}qd.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:fc(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 Hd=(function e(t){function r(i){return t?new qd(i,t):new cc(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ud(e,t){this._context=e,this._alpha=t}Ud.prototype={areaStart:hr,areaEnd:hr,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:fc(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 fk=(function e(t){function r(i){return t?new Ud(i,t):new hc(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function jd(e,t){this._context=e,this._alpha=t}jd.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:fc(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 dk=(function e(t){function r(i){return t?new jd(i,t):new uc(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Yd(e){this._context=e}Yd.prototype={areaStart:hr,areaEnd:hr,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 pk(e){return new Yd(e)}function fu(e){return e<0?-1:1}function du(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),o=(a*n+s*i)/(i+n);return(fu(a)+fu(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function pu(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function To(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,n+o*t,a-o,s-o*r,a,s)}function Qa(e){this._context=e}Qa.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:To(this,this._t0,pu(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,To(this,pu(this,r=du(this,e,t)),r);break;default:To(this,this._t0,r=du(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Gd(e){this._context=new Vd(e)}(Gd.prototype=Object.create(Qa.prototype)).point=function(e,t){Qa.prototype.point.call(this,t,e)};function Vd(e){this._context=e}Vd.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,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function Xd(e){return new Qa(e)}function Zd(e){return new Gd(e)}function Kd(e){this._context=e}Kd.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=gu(e),n=gu(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[s],t[s]);(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 gu(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,s[t]-=i*s[t-1];for(n[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function Qd(e){return new Kd(e)}function $s(e,t){this._context=e,this._t=t}$s.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 Jd(e){return new $s(e,.5)}function tp(e){return new $s(e,0)}function ep(e){return new $s(e,1)}function an(e,t,r){this.k=e,this.x=t,this.y=r}an.prototype={constructor:an,scale:function(e){return e===1?this:new an(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new an(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+")"}};an.prototype;var gk=p(e=>{const{securityLevel:t}=xt();let r=pt("body");if(t==="sandbox"){const a=pt(`#i${e}`).node()?.contentDocument??document;r=pt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function dc(e){return typeof e>"u"||e===null}p(dc,"isNothing");function rp(e){return typeof e=="object"&&e!==null}p(rp,"isObject");function ip(e){return Array.isArray(e)?e:dc(e)?[]:[e]}p(ip,"toArray");function np(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(np,"extend");function ap(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(ap,"repeat");function sp(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(sp,"isNegativeZero");var mk=dc,yk=rp,xk=ip,bk=ap,_k=sp,wk=np,Rt={isNothing:mk,isObject:yk,toArray:xk,repeat:bk,isNegativeZero:_k,extend:wk};function pc(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+=`
82
82
 
83
- `+e.mark.snippet),i+" "+r):i}p(dc,"formatError");function Si(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=dc(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Si,"YAMLException$1");Si.prototype=Object.create(Error.prototype);Si.prototype.constructor=Si;Si.prototype.toString=p(function(t){return this.name+": "+dc(this,t)},"toString");var ce=Si;function _a(e,t,r,i,n){var a="",s="",o=Math.floor(n/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}p(_a,"getLine");function wa(e,t){return Rt.repeat(" ",t-e.length)+e}p(wa,"padStart");function sp(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],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=_a(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),o=Rt.repeat(" ",t.indent)+wa((e.line-l+1).toString(),h)+" | "+c.str+`
83
+ `+e.mark.snippet),i+" "+r):i}p(pc,"formatError");function Ti(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=pc(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Ti,"YAMLException$1");Ti.prototype=Object.create(Error.prototype);Ti.prototype.constructor=Ti;Ti.prototype.toString=p(function(t){return this.name+": "+pc(this,t)},"toString");var ce=Ti;function _a(e,t,r,i,n){var a="",s="",o=Math.floor(n/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}p(_a,"getLine");function wa(e,t){return Rt.repeat(" ",t-e.length)+e}p(wa,"padStart");function op(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],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=_a(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),o=Rt.repeat(" ",t.indent)+wa((e.line-l+1).toString(),h)+" | "+c.str+`
84
84
  `+o;for(c=_a(e.buffer,i[s],n[s],e.position,u),o+=Rt.repeat(" ",t.indent)+wa((e.line+1).toString(),h)+" | "+c.str+`
85
85
  `,o+=Rt.repeat("-",t.indent+h+3+c.pos)+`^
86
86
  `,l=1;l<=t.linesAfter&&!(s+l>=n.length);l++)c=_a(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),u),o+=Rt.repeat(" ",t.indent)+wa((e.line+l+1).toString(),h)+" | "+c.str+`
87
- `;return o.replace(/\n$/,"")}p(sp,"makeSnippet");var Ck=sp,vk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],kk=["scalar","sequence","mapping"];function op(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(op,"compileStyleAliases");function lp(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(vk.indexOf(r)===-1)throw new ce('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=op(t.styleAliases||null),kk.indexOf(this.kind)===-1)throw new ce('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(lp,"Type$1");var Kt=lp;function al(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}p(al,"compileList");function cp(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(cp,"compileMap");function Ja(e){return this.extend(e)}p(Ja,"Schema$1");Ja.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Kt)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 ce("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Kt))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new ce("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new ce("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Kt))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Ja.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=al(n,"implicit"),n.compiledExplicit=al(n,"explicit"),n.compiledTypeMap=cp(n.compiledImplicit,n.compiledExplicit),n},"extend");var Sk=Ja,Tk=new Kt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),Mk=new Kt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),Ak=new Kt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Lk=new Sk({explicit:[Tk,Mk,Ak]});function hp(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(hp,"resolveYamlNull");function up(){return null}p(up,"constructYamlNull");function fp(e){return e===null}p(fp,"isNull");var Bk=new Kt("tag:yaml.org,2002:null",{kind:"scalar",resolve:hp,construct:up,predicate:fp,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 dp(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(dp,"resolveYamlBoolean");function pp(e){return e==="true"||e==="True"||e==="TRUE"}p(pp,"constructYamlBoolean");function gp(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(gp,"isBoolean");var Ek=new Kt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:dp,construct:pp,predicate:gp,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 mp(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(mp,"isHexCode");function yp(e){return 48<=e&&e<=55}p(yp,"isOctCode");function xp(e){return 48<=e&&e<=57}p(xp,"isDecCode");function bp(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!mp(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!yp(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!xp(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(bp,"resolveYamlInteger");function _p(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(_p,"constructYamlInteger");function wp(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Rt.isNegativeZero(e)}p(wp,"isInteger");var $k=new Kt("tag:yaml.org,2002:int",{kind:"scalar",resolve:bp,construct:_p,predicate:wp,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"]}}),Fk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Cp(e){return!(e===null||!Fk.test(e)||e[e.length-1]==="_")}p(Cp,"resolveYamlFloat");function vp(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(vp,"constructYamlFloat");var Dk=/^[-+]?[0-9]+e/;function kp(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(Rt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Dk.test(r)?r.replace("e",".e"):r}p(kp,"representYamlFloat");function Sp(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Rt.isNegativeZero(e))}p(Sp,"isFloat");var Ok=new Kt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Cp,construct:vp,predicate:Sp,represent:kp,defaultStyle:"lowercase"}),Tp=Lk.extend({implicit:[Bk,Ek,$k,Ok]}),Rk=Tp,Mp=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ap=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 Lp(e){return e===null?!1:Mp.exec(e)!==null||Ap.exec(e)!==null}p(Lp,"resolveYamlTimestamp");function Bp(e){var t,r,i,n,a,s,o,l=0,c=null,h,u,f;if(t=Mp.exec(e),t===null&&(t=Ap.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],o=+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,n,a,s,o,l)),c&&f.setTime(f.getTime()-c),f}p(Bp,"constructYamlTimestamp");function Ep(e){return e.toISOString()}p(Ep,"representYamlTimestamp");var Ik=new Kt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Lp,construct:Bp,instanceOf:Date,represent:Ep});function $p(e){return e==="<<"||e===null}p($p,"resolveYamlMerge");var Pk=new Kt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:$p}),pc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
- \r`;function Fp(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=pc;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Fp,"resolveYamlBinary");function Dp(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=pc,s=0,o=[];for(t=0;t<n;t++)t%4===0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}p(Dp,"constructYamlBinary");function Op(e){var t="",r=0,i,n,a=e.length,s=pc;for(i=0;i<a;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}p(Op,"representYamlBinary");function Rp(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Rp,"isBinary");var Nk=new Kt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Fp,construct:Dp,predicate:Rp,represent:Op}),zk=Object.prototype.hasOwnProperty,Wk=Object.prototype.toString;function Ip(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],s=!1,Wk.call(n)!=="[object Object]")return!1;for(a in n)if(zk.call(n,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(Ip,"resolveYamlOmap");function Pp(e){return e!==null?e:[]}p(Pp,"constructYamlOmap");var qk=new Kt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ip,construct:Pp}),Hk=Object.prototype.toString;function Np(e){if(e===null)return!0;var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],Hk.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(Np,"resolveYamlPairs");function zp(e){if(e===null)return[];var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(zp,"constructYamlPairs");var Uk=new Kt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Np,construct:zp}),jk=Object.prototype.hasOwnProperty;function Wp(e){if(e===null)return!0;var t,r=e;for(t in r)if(jk.call(r,t)&&r[t]!==null)return!1;return!0}p(Wp,"resolveYamlSet");function qp(e){return e!==null?e:{}}p(qp,"constructYamlSet");var Yk=new Kt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Wp,construct:qp}),Hp=Rk.extend({implicit:[Ik,Pk],explicit:[Nk,qk,Uk,Yk]}),hr=Object.prototype.hasOwnProperty,ts=1,Up=2,jp=3,es=4,To=1,Gk=2,gu=3,Vk=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Xk=/[\x85\u2028\u2029]/,Zk=/[,\[\]\{\}]/,Yp=/^(?:!|!!|![a-z\-]+!)$/i,Gp=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function sl(e){return Object.prototype.toString.call(e)}p(sl,"_class");function ke(e){return e===10||e===13}p(ke,"is_EOL");function lr(e){return e===9||e===32}p(lr,"is_WHITE_SPACE");function re(e){return e===9||e===32||e===10||e===13}p(re,"is_WS_OR_EOL");function Sr(e){return e===44||e===91||e===93||e===123||e===125}p(Sr,"is_FLOW_INDICATOR");function Vp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Vp,"fromHexCode");function Xp(e){return e===120?2:e===117?4:e===85?8:0}p(Xp,"escapedHexLen");function Zp(e){return 48<=e&&e<=57?e-48:-1}p(Zp,"fromDecimalCode");function ol(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
- `: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(ol,"simpleEscapeSequence");function Kp(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Kp,"charFromCodepoint");var Qp=new Array(256),Jp=new Array(256);for(br=0;br<256;br++)Qp[br]=ol(br)?1:0,Jp[br]=ol(br);var br;function tg(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Hp,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(tg,"State$1");function gc(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=Ck(r),new ce(t,r)}p(gc,"generateError");function it(e,t){throw gc(e,t)}p(it,"throwError");function _n(e,t){e.onWarning&&e.onWarning.call(null,gc(e,t))}p(_n,"throwWarning");var mu={YAML:p(function(t,r,i){var n,a,s;t.version!==null&&it(t,"duplication of %YAML directive"),i.length!==1&&it(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&it(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&it(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&_n(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&it(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Yp.test(n)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),hr.call(t.tagMap,n)&&it(t,'there is a previously declared suffix for "'+n+'" tag handle'),Gp.test(a)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{it(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function Je(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)s=o.charCodeAt(n),s===9||32<=s&&s<=1114111||it(e,"expected valid JSON character");else Vk.test(o)&&it(e,"the stream contains non-printable characters");e.result+=o}}p(Je,"captureSegment");function ll(e,t,r,i){var n,a,s,o;for(Rt.isObject(r)||it(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,o=n.length;s<o;s+=1)a=n[s],hr.call(t,a)||(t[a]=r[a],i[a]=!0)}p(ll,"mergeMappings");function Tr(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&it(e,"nested arrays are not supported inside keys"),typeof n=="object"&&sl(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&sl(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)ll(e,t,a[c],r);else ll(e,t,a,r);else!e.json&&!hr.call(r,n)&&hr.call(t,n)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,it(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(Tr,"storeMappingPair");function Fs(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++):it(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Fs,"readLineBreak");function Bt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;lr(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(ke(n))for(Fs(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&_n(e,"deficient indentation"),i}p(Bt,"skipSeparationSpace");function Dn(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||re(r)))}p(Dn,"testDocumentSeparator");function Ds(e,t){t===1?e.result+=" ":t>1&&(e.result+=Rt.repeat(`
90
- `,t-1))}p(Ds,"writeFoldedLines");function eg(e,t,r){var i,n,a,s,o,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),re(d)||Sr(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)&&(n=e.input.charCodeAt(e.position+1),re(n)||r&&Sr(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),re(n)||r&&Sr(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),re(i))break}else{if(e.position===e.lineStart&&Dn(e)||r&&Sr(d))break;if(ke(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Bt(e,!1,-1),e.lineIndent>=t){o=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}o&&(Je(e,a,s,!1),Ds(e,e.line-l),a=s=e.position,o=!1),lr(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return Je(e,a,s,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(eg,"readPlainScalar");function rg(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Je(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else ke(r)?(Je(e,i,n,!0),Ds(e,Bt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Dn(e)?it(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);it(e,"unexpected end of the stream within a single quoted scalar")}p(rg,"readSingleQuotedScalar");function ig(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Je(e,r,e.position,!0),e.position++,!0;if(o===92){if(Je(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),ke(o))Bt(e,!1,t);else if(o<256&&Qp[o])e.result+=Jp[o],e.position++;else if((s=Xp(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=Vp(o))>=0?a=(a<<4)+s:it(e,"expected hexadecimal character");e.result+=Kp(a),e.position++}else it(e,"unknown escape sequence");r=i=e.position}else ke(o)?(Je(e,r,i,!0),Ds(e,Bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Dn(e)?it(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}it(e,"unexpected end of the stream within a double quoted scalar")}p(ig,"readDoubleQuotedScalar");function ng(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,c,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,o=[];else if(b===123)h=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=s,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=o,!0;r?b===44&&it(e,"expected the node content, but found ','"):it(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),re(c)&&(u=f=!0,e.position++,Bt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,Or(e,t,ts,!1,!0),y=e.tag,m=e.result,Bt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Bt(e,!0,t),Or(e,t,ts,!1,!0),x=e.result),d?Tr(e,o,g,y,m,x,i,n,a):u?o.push(Tr(e,null,g,y,m,x,i,n,a)):o.push(m),Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}it(e,"unexpected end of the stream within a flow collection")}p(ng,"readFlowCollection");function ag(e,t){var r,i,n=To,a=!1,s=!1,o=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)To===n?n=u===43?gu:Gk:it(e,"repeat of a chomping mode identifier");else if((h=Zp(u))>=0)h===0?it(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?it(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(lr(u)){do u=e.input.charCodeAt(++e.position);while(lr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ke(u)&&u!==0)}for(;u!==0;){for(Fs(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndent<o)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>o&&(o=e.lineIndent),ke(u)){l++;continue}if(e.lineIndent<o){n===gu?e.result+=Rt.repeat(`
91
- `,a?1+l:l):n===To&&a&&(e.result+=`
92
- `);break}for(i?lr(u)?(c=!0,e.result+=Rt.repeat(`
87
+ `;return o.replace(/\n$/,"")}p(op,"makeSnippet");var Ck=op,vk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],kk=["scalar","sequence","mapping"];function lp(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(lp,"compileStyleAliases");function cp(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(vk.indexOf(r)===-1)throw new ce('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=lp(t.styleAliases||null),kk.indexOf(this.kind)===-1)throw new ce('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(cp,"Type$1");var Kt=cp;function sl(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}p(sl,"compileList");function hp(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(hp,"compileMap");function Ja(e){return this.extend(e)}p(Ja,"Schema$1");Ja.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Kt)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 ce("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Kt))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new ce("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new ce("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Kt))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Ja.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=sl(n,"implicit"),n.compiledExplicit=sl(n,"explicit"),n.compiledTypeMap=hp(n.compiledImplicit,n.compiledExplicit),n},"extend");var Sk=Ja,Tk=new Kt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),Mk=new Kt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),Ak=new Kt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Lk=new Sk({explicit:[Tk,Mk,Ak]});function up(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(up,"resolveYamlNull");function fp(){return null}p(fp,"constructYamlNull");function dp(e){return e===null}p(dp,"isNull");var Bk=new Kt("tag:yaml.org,2002:null",{kind:"scalar",resolve:up,construct:fp,predicate:dp,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 pp(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(pp,"resolveYamlBoolean");function gp(e){return e==="true"||e==="True"||e==="TRUE"}p(gp,"constructYamlBoolean");function mp(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(mp,"isBoolean");var Ek=new Kt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:pp,construct:gp,predicate:mp,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 yp(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(yp,"isHexCode");function xp(e){return 48<=e&&e<=55}p(xp,"isOctCode");function bp(e){return 48<=e&&e<=57}p(bp,"isDecCode");function _p(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!yp(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!xp(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!bp(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(_p,"resolveYamlInteger");function wp(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(wp,"constructYamlInteger");function Cp(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Rt.isNegativeZero(e)}p(Cp,"isInteger");var $k=new Kt("tag:yaml.org,2002:int",{kind:"scalar",resolve:_p,construct:wp,predicate:Cp,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"]}}),Fk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vp(e){return!(e===null||!Fk.test(e)||e[e.length-1]==="_")}p(vp,"resolveYamlFloat");function kp(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(kp,"constructYamlFloat");var Dk=/^[-+]?[0-9]+e/;function Sp(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(Rt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Dk.test(r)?r.replace("e",".e"):r}p(Sp,"representYamlFloat");function Tp(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Rt.isNegativeZero(e))}p(Tp,"isFloat");var Ok=new Kt("tag:yaml.org,2002:float",{kind:"scalar",resolve:vp,construct:kp,predicate:Tp,represent:Sp,defaultStyle:"lowercase"}),Mp=Lk.extend({implicit:[Bk,Ek,$k,Ok]}),Rk=Mp,Ap=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Lp=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 Bp(e){return e===null?!1:Ap.exec(e)!==null||Lp.exec(e)!==null}p(Bp,"resolveYamlTimestamp");function Ep(e){var t,r,i,n,a,s,o,l=0,c=null,h,u,f;if(t=Ap.exec(e),t===null&&(t=Lp.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],o=+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,n,a,s,o,l)),c&&f.setTime(f.getTime()-c),f}p(Ep,"constructYamlTimestamp");function $p(e){return e.toISOString()}p($p,"representYamlTimestamp");var Ik=new Kt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Bp,construct:Ep,instanceOf:Date,represent:$p});function Fp(e){return e==="<<"||e===null}p(Fp,"resolveYamlMerge");var Pk=new Kt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Fp}),gc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
+ \r`;function Dp(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=gc;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Dp,"resolveYamlBinary");function Op(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=gc,s=0,o=[];for(t=0;t<n;t++)t%4===0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}p(Op,"constructYamlBinary");function Rp(e){var t="",r=0,i,n,a=e.length,s=gc;for(i=0;i<a;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}p(Rp,"representYamlBinary");function Ip(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Ip,"isBinary");var Nk=new Kt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Dp,construct:Op,predicate:Ip,represent:Rp}),zk=Object.prototype.hasOwnProperty,Wk=Object.prototype.toString;function Pp(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],s=!1,Wk.call(n)!=="[object Object]")return!1;for(a in n)if(zk.call(n,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(Pp,"resolveYamlOmap");function Np(e){return e!==null?e:[]}p(Np,"constructYamlOmap");var qk=new Kt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Pp,construct:Np}),Hk=Object.prototype.toString;function zp(e){if(e===null)return!0;var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],Hk.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(zp,"resolveYamlPairs");function Wp(e){if(e===null)return[];var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(Wp,"constructYamlPairs");var Uk=new Kt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:zp,construct:Wp}),jk=Object.prototype.hasOwnProperty;function qp(e){if(e===null)return!0;var t,r=e;for(t in r)if(jk.call(r,t)&&r[t]!==null)return!1;return!0}p(qp,"resolveYamlSet");function Hp(e){return e!==null?e:{}}p(Hp,"constructYamlSet");var Yk=new Kt("tag:yaml.org,2002:set",{kind:"mapping",resolve:qp,construct:Hp}),Up=Rk.extend({implicit:[Ik,Pk],explicit:[Nk,qk,Uk,Yk]}),ur=Object.prototype.hasOwnProperty,ts=1,jp=2,Yp=3,es=4,Mo=1,Gk=2,mu=3,Vk=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Xk=/[\x85\u2028\u2029]/,Zk=/[,\[\]\{\}]/,Gp=/^(?:!|!!|![a-z\-]+!)$/i,Vp=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ol(e){return Object.prototype.toString.call(e)}p(ol,"_class");function Te(e){return e===10||e===13}p(Te,"is_EOL");function cr(e){return e===9||e===32}p(cr,"is_WHITE_SPACE");function re(e){return e===9||e===32||e===10||e===13}p(re,"is_WS_OR_EOL");function Tr(e){return e===44||e===91||e===93||e===123||e===125}p(Tr,"is_FLOW_INDICATOR");function Xp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Xp,"fromHexCode");function Zp(e){return e===120?2:e===117?4:e===85?8:0}p(Zp,"escapedHexLen");function Kp(e){return 48<=e&&e<=57?e-48:-1}p(Kp,"fromDecimalCode");function ll(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
+ `: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(ll,"simpleEscapeSequence");function Qp(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Qp,"charFromCodepoint");var Jp=new Array(256),tg=new Array(256);for(_r=0;_r<256;_r++)Jp[_r]=ll(_r)?1:0,tg[_r]=ll(_r);var _r;function eg(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Up,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(eg,"State$1");function mc(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=Ck(r),new ce(t,r)}p(mc,"generateError");function it(e,t){throw mc(e,t)}p(it,"throwError");function Cn(e,t){e.onWarning&&e.onWarning.call(null,mc(e,t))}p(Cn,"throwWarning");var yu={YAML:p(function(t,r,i){var n,a,s;t.version!==null&&it(t,"duplication of %YAML directive"),i.length!==1&&it(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&it(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&it(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Cn(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&it(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Gp.test(n)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),ur.call(t.tagMap,n)&&it(t,'there is a previously declared suffix for "'+n+'" tag handle'),Vp.test(a)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{it(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function Je(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)s=o.charCodeAt(n),s===9||32<=s&&s<=1114111||it(e,"expected valid JSON character");else Vk.test(o)&&it(e,"the stream contains non-printable characters");e.result+=o}}p(Je,"captureSegment");function cl(e,t,r,i){var n,a,s,o;for(Rt.isObject(r)||it(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,o=n.length;s<o;s+=1)a=n[s],ur.call(t,a)||(t[a]=r[a],i[a]=!0)}p(cl,"mergeMappings");function Mr(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&it(e,"nested arrays are not supported inside keys"),typeof n=="object"&&ol(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&ol(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)cl(e,t,a[c],r);else cl(e,t,a,r);else!e.json&&!ur.call(r,n)&&ur.call(t,n)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,it(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(Mr,"storeMappingPair");function Fs(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++):it(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Fs,"readLineBreak");function Bt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;cr(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Te(n))for(Fs(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Cn(e,"deficient indentation"),i}p(Bt,"skipSeparationSpace");function Rn(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||re(r)))}p(Rn,"testDocumentSeparator");function Ds(e,t){t===1?e.result+=" ":t>1&&(e.result+=Rt.repeat(`
90
+ `,t-1))}p(Ds,"writeFoldedLines");function rg(e,t,r){var i,n,a,s,o,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),re(d)||Tr(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)&&(n=e.input.charCodeAt(e.position+1),re(n)||r&&Tr(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),re(n)||r&&Tr(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),re(i))break}else{if(e.position===e.lineStart&&Rn(e)||r&&Tr(d))break;if(Te(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Bt(e,!1,-1),e.lineIndent>=t){o=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}o&&(Je(e,a,s,!1),Ds(e,e.line-l),a=s=e.position,o=!1),cr(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return Je(e,a,s,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(rg,"readPlainScalar");function ig(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Je(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Te(r)?(Je(e,i,n,!0),Ds(e,Bt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Rn(e)?it(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);it(e,"unexpected end of the stream within a single quoted scalar")}p(ig,"readSingleQuotedScalar");function ng(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Je(e,r,e.position,!0),e.position++,!0;if(o===92){if(Je(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Te(o))Bt(e,!1,t);else if(o<256&&Jp[o])e.result+=tg[o],e.position++;else if((s=Zp(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=Xp(o))>=0?a=(a<<4)+s:it(e,"expected hexadecimal character");e.result+=Qp(a),e.position++}else it(e,"unknown escape sequence");r=i=e.position}else Te(o)?(Je(e,r,i,!0),Ds(e,Bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Rn(e)?it(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}it(e,"unexpected end of the stream within a double quoted scalar")}p(ng,"readDoubleQuotedScalar");function ag(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,c,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,o=[];else if(b===123)h=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=s,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=o,!0;r?b===44&&it(e,"expected the node content, but found ','"):it(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),re(c)&&(u=f=!0,e.position++,Bt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,Rr(e,t,ts,!1,!0),y=e.tag,m=e.result,Bt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Bt(e,!0,t),Rr(e,t,ts,!1,!0),x=e.result),d?Mr(e,o,g,y,m,x,i,n,a):u?o.push(Mr(e,null,g,y,m,x,i,n,a)):o.push(m),Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}it(e,"unexpected end of the stream within a flow collection")}p(ag,"readFlowCollection");function sg(e,t){var r,i,n=Mo,a=!1,s=!1,o=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)Mo===n?n=u===43?mu:Gk:it(e,"repeat of a chomping mode identifier");else if((h=Kp(u))>=0)h===0?it(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?it(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(cr(u)){do u=e.input.charCodeAt(++e.position);while(cr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Te(u)&&u!==0)}for(;u!==0;){for(Fs(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndent<o)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>o&&(o=e.lineIndent),Te(u)){l++;continue}if(e.lineIndent<o){n===mu?e.result+=Rt.repeat(`
91
+ `,a?1+l:l):n===Mo&&a&&(e.result+=`
92
+ `);break}for(i?cr(u)?(c=!0,e.result+=Rt.repeat(`
93
93
  `,a?1+l:l)):c?(c=!1,e.result+=Rt.repeat(`
94
94
  `,l+1)):l===0?a&&(e.result+=" "):e.result+=Rt.repeat(`
95
95
  `,l):e.result+=Rt.repeat(`
96
- `,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!ke(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Je(e,r,e.position,!1)}return!0}p(ag,"readBlockScalar");function cl(e,t){var r,i=e.tag,n=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!re(s))));){if(o=!0,e.position++,Bt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Or(e,t,jp,!1,!0),a.push(e.result),Bt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)it(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(cl,"readBlockSequence");function sg(e,t,r){var i,n,a,s,o,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!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(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&re(i))b===63?(y&&(Tr(e,u,f,d,g,null,s,o,l),d=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):it(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(s=e.line,o=e.lineStart,l=e.position,!Or(e,r,Up,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);lr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),re(b)||it(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Tr(e,u,f,d,g,null,s,o,l),d=g=m=null),x=!0,y=!1,n=!1,d=e.tag,g=e.result;else if(x)it(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)it(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===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),Or(e,t,es,!0,n)&&(y?g=e.result:m=e.result),y||(Tr(e,u,f,d,g,m,s,o,l),d=g=m=null),Bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)it(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Tr(e,u,f,d,g,null,s,o,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(sg,"readBlockMapping");function og(e){var t,r=!1,i=!1,n,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&it(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):it(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!re(s);)s===33&&(i?it(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Yp.test(n)||it(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Zk.test(a)&&it(e,"tag suffix cannot contain flow indicator characters")}a&&!Gp.test(a)&&it(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{it(e,"tag name is malformed: "+a)}return r?e.tag=a:hr.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:it(e,'undeclared tag handle "'+n+'"'),!0}p(og,"readTagProperty");function lg(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&it(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!re(r)&&!Sr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(lg,"readAnchorProperty");function cg(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&&!re(i)&&!Sr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),hr.call(e.anchorMap,r)||it(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Bt(e,!0,-1),!0}p(cg,"readAlias");function Or(e,t,r,i,n){var a,s,o,l=1,c=!1,h=!1,u,f,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=es===r||jp===r,i&&Bt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;og(e)||lg(e);)Bt(e,!0,-1)?(c=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=c||n),(l===1||es===r)&&(ts===r||Up===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?o&&(cl(e,y)||sg(e,y,m))||ng(e,m)?h=!0:(s&&ag(e,m)||rg(e,m)||ig(e,m)?h=!0:cg(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&it(e,"alias node should not have any properties")):eg(e,m,ts===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=o&&cl(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&it(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(hr.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=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){g=d[u];break}g||it(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&it(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):it(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(Or,"composeNode");function hg(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Bt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!re(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&it(e,"directive name must not be less than one character in length");s!==0;){for(;lr(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!ke(s));break}if(ke(s))break;for(r=e.position;s!==0&&!re(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&Fs(e),hr.call(mu,i)?mu[i](e,i,n):_n(e,'unknown document directive "'+i+'"')}if(Bt(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,Bt(e,!0,-1)):a&&it(e,"directives end mark is expected"),Or(e,e.lineIndent-1,es,!1,!0),Bt(e,!0,-1),e.checkLineBreaks&&Xk.test(e.input.slice(t,e.position))&&_n(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Dn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Bt(e,!0,-1));return}if(e.position<e.length-1)it(e,"end of the stream or a document separator is expected");else return}p(hg,"readDocument");function mc(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new tg(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,it(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;)hg(r);return r.documents}p(mc,"loadDocuments");function Kk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=mc(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Kk,"loadAll$1");function ug(e,t){var r=mc(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ce("expected a single document in the stream, but found more")}}p(ug,"load$1");var Qk=ug,Jk={load:Qk},fg=Object.prototype.toString,dg=Object.prototype.hasOwnProperty,yc=65279,tS=9,wn=10,eS=13,rS=32,iS=33,nS=34,hl=35,aS=37,sS=38,oS=39,lS=42,pg=44,cS=45,rs=58,hS=61,uS=62,fS=63,dS=64,gg=91,mg=93,pS=96,yg=123,gS=124,xg=125,Jt={};Jt[0]="\\0";Jt[7]="\\a";Jt[8]="\\b";Jt[9]="\\t";Jt[10]="\\n";Jt[11]="\\v";Jt[12]="\\f";Jt[13]="\\r";Jt[27]="\\e";Jt[34]='\\"';Jt[92]="\\\\";Jt[133]="\\N";Jt[160]="\\_";Jt[8232]="\\L";Jt[8233]="\\P";var mS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],yS=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function bg(e,t){var r,i,n,a,s,o,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)s=i[n],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&dg.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}p(bg,"compileStyleMap");function _g(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 ce("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Rt.repeat("0",i-t.length)+t}p(_g,"encodeHex");var xS=1,Cn=2;function wg(e){this.schema=e.schema||Hp,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Rt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=bg(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==='"'?Cn:xS,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(wg,"State");function ul(e,t){for(var r=Rt.repeat(" ",t),i=0,n=-1,a="",s,o=e.length;i<o;)n=e.indexOf(`
96
+ `,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!Te(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Je(e,r,e.position,!1)}return!0}p(sg,"readBlockScalar");function hl(e,t){var r,i=e.tag,n=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!re(s))));){if(o=!0,e.position++,Bt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Rr(e,t,Yp,!1,!0),a.push(e.result),Bt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)it(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(hl,"readBlockSequence");function og(e,t,r){var i,n,a,s,o,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!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(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&re(i))b===63?(y&&(Mr(e,u,f,d,g,null,s,o,l),d=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):it(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(s=e.line,o=e.lineStart,l=e.position,!Rr(e,r,jp,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);cr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),re(b)||it(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Mr(e,u,f,d,g,null,s,o,l),d=g=m=null),x=!0,y=!1,n=!1,d=e.tag,g=e.result;else if(x)it(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)it(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===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),Rr(e,t,es,!0,n)&&(y?g=e.result:m=e.result),y||(Mr(e,u,f,d,g,m,s,o,l),d=g=m=null),Bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)it(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Mr(e,u,f,d,g,null,s,o,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(og,"readBlockMapping");function lg(e){var t,r=!1,i=!1,n,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&it(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):it(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!re(s);)s===33&&(i?it(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Gp.test(n)||it(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Zk.test(a)&&it(e,"tag suffix cannot contain flow indicator characters")}a&&!Vp.test(a)&&it(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{it(e,"tag name is malformed: "+a)}return r?e.tag=a:ur.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:it(e,'undeclared tag handle "'+n+'"'),!0}p(lg,"readTagProperty");function cg(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&it(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!re(r)&&!Tr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(cg,"readAnchorProperty");function hg(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&&!re(i)&&!Tr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ur.call(e.anchorMap,r)||it(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Bt(e,!0,-1),!0}p(hg,"readAlias");function Rr(e,t,r,i,n){var a,s,o,l=1,c=!1,h=!1,u,f,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=es===r||Yp===r,i&&Bt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;lg(e)||cg(e);)Bt(e,!0,-1)?(c=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=c||n),(l===1||es===r)&&(ts===r||jp===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?o&&(hl(e,y)||og(e,y,m))||ag(e,m)?h=!0:(s&&sg(e,m)||ig(e,m)||ng(e,m)?h=!0:hg(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&it(e,"alias node should not have any properties")):rg(e,m,ts===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=o&&hl(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&it(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.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))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=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){g=d[u];break}g||it(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&it(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):it(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(Rr,"composeNode");function ug(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Bt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!re(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&it(e,"directive name must not be less than one character in length");s!==0;){for(;cr(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Te(s));break}if(Te(s))break;for(r=e.position;s!==0&&!re(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&Fs(e),ur.call(yu,i)?yu[i](e,i,n):Cn(e,'unknown document directive "'+i+'"')}if(Bt(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,Bt(e,!0,-1)):a&&it(e,"directives end mark is expected"),Rr(e,e.lineIndent-1,es,!1,!0),Bt(e,!0,-1),e.checkLineBreaks&&Xk.test(e.input.slice(t,e.position))&&Cn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Rn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Bt(e,!0,-1));return}if(e.position<e.length-1)it(e,"end of the stream or a document separator is expected");else return}p(ug,"readDocument");function yc(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new eg(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,it(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;)ug(r);return r.documents}p(yc,"loadDocuments");function Kk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=yc(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Kk,"loadAll$1");function fg(e,t){var r=yc(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ce("expected a single document in the stream, but found more")}}p(fg,"load$1");var Qk=fg,Jk={load:Qk},dg=Object.prototype.toString,pg=Object.prototype.hasOwnProperty,xc=65279,tS=9,vn=10,eS=13,rS=32,iS=33,nS=34,ul=35,aS=37,sS=38,oS=39,lS=42,gg=44,cS=45,rs=58,hS=61,uS=62,fS=63,dS=64,mg=91,yg=93,pS=96,xg=123,gS=124,bg=125,Jt={};Jt[0]="\\0";Jt[7]="\\a";Jt[8]="\\b";Jt[9]="\\t";Jt[10]="\\n";Jt[11]="\\v";Jt[12]="\\f";Jt[13]="\\r";Jt[27]="\\e";Jt[34]='\\"';Jt[92]="\\\\";Jt[133]="\\N";Jt[160]="\\_";Jt[8232]="\\L";Jt[8233]="\\P";var mS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],yS=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function _g(e,t){var r,i,n,a,s,o,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)s=i[n],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&pg.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}p(_g,"compileStyleMap");function wg(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 ce("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Rt.repeat("0",i-t.length)+t}p(wg,"encodeHex");var xS=1,kn=2;function Cg(e){this.schema=e.schema||Up,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Rt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=_g(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==='"'?kn:xS,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(Cg,"State");function fl(e,t){for(var r=Rt.repeat(" ",t),i=0,n=-1,a="",s,o=e.length;i<o;)n=e.indexOf(`
98
98
  `,i),n===-1?(s=e.slice(i),i=o):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
99
- `&&(a+=r),a+=s;return a}p(ul,"indentString");function is(e,t){return`
100
- `+Rt.repeat(" ",e.indent*t)}p(is,"generateNextLine");function Cg(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(Cg,"testImplicitResolving");function vn(e){return e===rS||e===tS}p(vn,"isWhitespace");function Ti(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==yc||65536<=e&&e<=1114111}p(Ti,"isPrintable");function fl(e){return Ti(e)&&e!==yc&&e!==eS&&e!==wn}p(fl,"isNsCharOrWhitespace");function dl(e,t,r){var i=fl(e),n=i&&!vn(e);return(r?i:i&&e!==pg&&e!==gg&&e!==mg&&e!==yg&&e!==xg)&&e!==hl&&!(t===rs&&!n)||fl(t)&&!vn(t)&&e===hl||t===rs&&n}p(dl,"isPlainSafe");function vg(e){return Ti(e)&&e!==yc&&!vn(e)&&e!==cS&&e!==fS&&e!==rs&&e!==pg&&e!==gg&&e!==mg&&e!==yg&&e!==xg&&e!==hl&&e!==sS&&e!==lS&&e!==iS&&e!==gS&&e!==hS&&e!==uS&&e!==oS&&e!==nS&&e!==aS&&e!==dS&&e!==pS}p(vg,"isPlainSafeFirst");function kg(e){return!vn(e)&&e!==rs}p(kg,"isPlainSafeLast");function ni(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(ni,"codePointAt");function xc(e){var t=/^\n* /;return t.test(e)}p(xc,"needIndentIndicator");var Sg=1,pl=2,Tg=3,Mg=4,Jr=5;function Ag(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=vg(ni(e,0))&&kg(ni(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=ni(e,l),!Ti(c))return Jr;m=m&&dl(c,h,o),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=ni(e,l),c===wn)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Ti(c))return Jr;m=m&&dl(c,h,o),h=c}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!s&&!n(e)?Sg:a===Cn?Jr:pl:r>9&&xc(e)?Jr:s?a===Cn?Jr:pl:f?Mg:Tg}p(Ag,"chooseScalarStyle");function Lg(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Cn?'""':"''";if(!e.noCompatMode&&(mS.indexOf(t)!==-1||yS.test(t)))return e.quotingType===Cn?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Cg(e,c)}switch(p(l,"testAmbiguity"),Ag(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case Sg:return t;case pl:return"'"+t.replace(/'/g,"''")+"'";case Tg:return"|"+gl(t,e.indent)+ml(ul(t,a));case Mg:return">"+gl(t,e.indent)+ml(ul(Bg(t,s),a));case Jr:return'"'+Eg(t)+'"';default:throw new ce("impossible error: invalid scalar style")}})()}p(Lg,"writeScalar");function gl(e,t){var r=xc(e)?String(t):"",i=e[e.length-1]===`
99
+ `&&(a+=r),a+=s;return a}p(fl,"indentString");function is(e,t){return`
100
+ `+Rt.repeat(" ",e.indent*t)}p(is,"generateNextLine");function vg(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(vg,"testImplicitResolving");function Sn(e){return e===rS||e===tS}p(Sn,"isWhitespace");function Mi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==xc||65536<=e&&e<=1114111}p(Mi,"isPrintable");function dl(e){return Mi(e)&&e!==xc&&e!==eS&&e!==vn}p(dl,"isNsCharOrWhitespace");function pl(e,t,r){var i=dl(e),n=i&&!Sn(e);return(r?i:i&&e!==gg&&e!==mg&&e!==yg&&e!==xg&&e!==bg)&&e!==ul&&!(t===rs&&!n)||dl(t)&&!Sn(t)&&e===ul||t===rs&&n}p(pl,"isPlainSafe");function kg(e){return Mi(e)&&e!==xc&&!Sn(e)&&e!==cS&&e!==fS&&e!==rs&&e!==gg&&e!==mg&&e!==yg&&e!==xg&&e!==bg&&e!==ul&&e!==sS&&e!==lS&&e!==iS&&e!==gS&&e!==hS&&e!==uS&&e!==oS&&e!==nS&&e!==aS&&e!==dS&&e!==pS}p(kg,"isPlainSafeFirst");function Sg(e){return!Sn(e)&&e!==rs}p(Sg,"isPlainSafeLast");function ai(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(ai,"codePointAt");function bc(e){var t=/^\n* /;return t.test(e)}p(bc,"needIndentIndicator");var Tg=1,gl=2,Mg=3,Ag=4,ti=5;function Lg(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=kg(ai(e,0))&&Sg(ai(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=ai(e,l),!Mi(c))return ti;m=m&&pl(c,h,o),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=ai(e,l),c===vn)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Mi(c))return ti;m=m&&pl(c,h,o),h=c}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!s&&!n(e)?Tg:a===kn?ti:gl:r>9&&bc(e)?ti:s?a===kn?ti:gl:f?Ag:Mg}p(Lg,"chooseScalarStyle");function Bg(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===kn?'""':"''";if(!e.noCompatMode&&(mS.indexOf(t)!==-1||yS.test(t)))return e.quotingType===kn?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return vg(e,c)}switch(p(l,"testAmbiguity"),Lg(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case Tg:return t;case gl:return"'"+t.replace(/'/g,"''")+"'";case Mg:return"|"+ml(t,e.indent)+yl(fl(t,a));case Ag:return">"+ml(t,e.indent)+yl(fl(Eg(t,s),a));case ti:return'"'+$g(t)+'"';default:throw new ce("impossible error: invalid scalar style")}})()}p(Bg,"writeScalar");function ml(e,t){var r=bc(e)?String(t):"",i=e[e.length-1]===`
101
101
  `,n=i&&(e[e.length-2]===`
102
102
  `||e===`
103
103
  `),a=n?"+":i?"":"-";return r+a+`
104
- `}p(gl,"blockHeader");function ml(e){return e[e.length-1]===`
105
- `?e.slice(0,-1):e}p(ml,"dropEndingNewline");function Bg(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
106
- `);return c=c!==-1?c:e.length,r.lastIndex=c,yl(e.slice(0,c),t)})(),n=e[0]===`
104
+ `}p(ml,"blockHeader");function yl(e){return e[e.length-1]===`
105
+ `?e.slice(0,-1):e}p(yl,"dropEndingNewline");function Eg(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
106
+ `);return c=c!==-1?c:e.length,r.lastIndex=c,xl(e.slice(0,c),t)})(),n=e[0]===`
107
107
  `||e[0]===" ",a,s;s=r.exec(e);){var o=s[1],l=s[2];a=l[0]===" ",i+=o+(!n&&!a&&l!==""?`
108
- `:"")+yl(l,t),n=a}return i}p(Bg,"foldString");function yl(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=`
108
+ `:"")+xl(l,t),n=a}return i}p(Eg,"foldString");function xl(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=`
109
109
  `+e.slice(n,a),n=a+1),s=o;return l+=`
110
110
  `,e.length-n>t&&s>n?l+=e.slice(n,s)+`
111
- `+e.slice(s+1):l+=e.slice(n),l.slice(1)}p(yl,"foldLine");function Eg(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=ni(e,n),i=Jt[r],!i&&Ti(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||_g(r);return t}p(Eg,"escapeString");function $g(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(Pe(e,t,o,!1,!1)||typeof o>"u"&&Pe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p($g,"writeFlowSequence");function xl(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(Pe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Pe(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=is(e,t)),e.dump&&wn===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(xl,"writeBlockSequence");function Fg(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s<o;s+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[s],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=n,e.dump="{"+i+"}"}p(Fg,"writeFlowMapping");function Dg(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,c,h,u,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new ce("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)f="",(!i||n!=="")&&(f+=is(e,t)),c=s[o],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&&wn===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=is(e,t)),Pe(e,t+1,h,!0,u)&&(e.dump&&wn===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}p(Dg,"writeBlockMapping");function bl(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a<s;a+=1)if(o=n[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,fg.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(dg.call(o.represent,l))i=o.represent[l](t,l);else throw new ce("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(bl,"detectType");function Pe(e,t,r,i,n,a,s){e.tag=null,e.dump=r,bl(e,r,!1)||bl(e,r,!0);var o=fg.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[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)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Dg(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(Fg(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?xl(e,t-1,e.dump,n):xl(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):($g(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Lg(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ce("unacceptable kind of an object to dump "+o)}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 Og(e,t){var r=[],i=[],n,a;for(ns(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(Og,"getDuplicateReferences");function ns(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)ns(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)ns(e[i[n]],t,r)}p(ns,"inspectNode");function bS(e,t){t=t||{};var r=new wg(t);r.noRefs||Og(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Pe(r,0,i,!0,!0)?r.dump+`
112
- `:""}p(bS,"dump$1");function _S(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(_S,"renamed");var wS=Tp,CS=Jk.load;var Vt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},yu={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function nn(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Tt(e),t=Tt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,o=a-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}p(nn,"calculateDeltaAndAngle");var Tt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),vS=p(e=>({x:p(function(t,r,i){let n=0;const a=Tt(i[0]).x<Tt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Vt,e.arrowTypeStart)){const{angle:d,deltaX:g}=nn(i[0],i[1]);n=Vt[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Vt,e.arrowTypeEnd)){const{angle:d,deltaX:g}=nn(i[i.length-1],i[i.length-2]);n=Vt[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const s=Math.abs(Tt(t).x-Tt(i[i.length-1]).x),o=Math.abs(Tt(t).y-Tt(i[i.length-1]).y),l=Math.abs(Tt(t).x-Tt(i[0]).x),c=Math.abs(Tt(t).y-Tt(i[0]).y),h=Vt[e.arrowTypeStart],u=Vt[e.arrowTypeEnd],f=1;if(s<u&&s>0&&o<u){let d=u+f-s;d*=a==="right"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="right"?-1:1,n+=d}return Tt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=Tt(i[0]).y<Tt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Vt,e.arrowTypeStart)){const{angle:d,deltaY:g}=nn(i[0],i[1]);n=Vt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Vt,e.arrowTypeEnd)){const{angle:d,deltaY:g}=nn(i[i.length-1],i[i.length-2]);n=Vt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const s=Math.abs(Tt(t).y-Tt(i[i.length-1]).y),o=Math.abs(Tt(t).x-Tt(i[i.length-1]).x),l=Math.abs(Tt(t).y-Tt(i[0]).y),c=Math.abs(Tt(t).x-Tt(i[0]).x),h=Vt[e.arrowTypeStart],u=Vt[e.arrowTypeEnd],f=1;if(s<u&&s>0&&o<u){let d=u+f-s;d*=a==="up"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="up"?-1:1,n+=d}return Tt(t).y+n},"y")}),"getLineFunctionsWithOffset"),bc=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),kS=p(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Bi=p(e=>{const t=SS([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),SS=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),Rg=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"),K=p(e=>{const{stylesArray:t}=Bi(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{const o=s[0];Rg(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),Z=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=Bi(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:TS(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),TS=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),ta={},Dt={},xu;function MS(){return xu||(xu=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.BLANK_URL=Dt.relativeFirstCharacters=Dt.whitespaceEscapeCharsRegex=Dt.urlSchemeRegex=Dt.ctrlCharactersRegex=Dt.htmlCtrlEntityRegex=Dt.htmlEntitiesRegex=Dt.invalidProtocolRegex=void 0,Dt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Dt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Dt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Dt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Dt.urlSchemeRegex=/^.+(:|&colon;)/gim,Dt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Dt.relativeFirstCharacters=[".","/"],Dt.BLANK_URL="about:blank"),Dt}var bu;function AS(){if(bu)return ta;bu=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.sanitizeUrl=a;var e=MS();function t(s){return e.relativeFirstCharacters.indexOf(s[0])>-1}function r(s){var o=s.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(s){return URL.canParse(s)}function n(s){try{return decodeURIComponent(s)}catch{return s}}function a(s){if(!s)return e.BLANK_URL;var o,l=n(s.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return ta}var LS=AS(),Ig=typeof global=="object"&&global&&global.Object===Object&&global,BS=typeof self=="object"&&self&&self.Object===Object&&self,ze=Ig||BS||Function("return this")(),as=ze.Symbol,Pg=Object.prototype,ES=Pg.hasOwnProperty,$S=Pg.toString,Vi=as?as.toStringTag:void 0;function FS(e){var t=ES.call(e,Vi),r=e[Vi];try{e[Vi]=void 0;var i=!0}catch{}var n=$S.call(e);return i&&(t?e[Vi]=r:delete e[Vi]),n}var DS=Object.prototype,OS=DS.toString;function RS(e){return OS.call(e)}var IS="[object Null]",PS="[object Undefined]",_u=as?as.toStringTag:void 0;function Ei(e){return e==null?e===void 0?PS:IS:_u&&_u in Object(e)?FS(e):RS(e)}function qr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var NS="[object AsyncFunction]",zS="[object Function]",WS="[object GeneratorFunction]",qS="[object Proxy]";function _c(e){if(!qr(e))return!1;var t=Ei(e);return t==zS||t==WS||t==NS||t==qS}var Mo=ze["__core-js_shared__"],wu=(function(){var e=/[^.]+$/.exec(Mo&&Mo.keys&&Mo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function HS(e){return!!wu&&wu in e}var US=Function.prototype,jS=US.toString;function Hr(e){if(e!=null){try{return jS.call(e)}catch{}try{return e+""}catch{}}return""}var YS=/[\\^$.*+?()[\]{}|]/g,GS=/^\[object .+?Constructor\]$/,VS=Function.prototype,XS=Object.prototype,ZS=VS.toString,KS=XS.hasOwnProperty,QS=RegExp("^"+ZS.call(KS).replace(YS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function JS(e){if(!qr(e)||HS(e))return!1;var t=_c(e)?QS:GS;return t.test(Hr(e))}function tT(e,t){return e?.[t]}function Ur(e,t){var r=tT(e,t);return JS(r)?r:void 0}var kn=Ur(Object,"create");function eT(){this.__data__=kn?kn(null):{},this.size=0}function rT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var iT="__lodash_hash_undefined__",nT=Object.prototype,aT=nT.hasOwnProperty;function sT(e){var t=this.__data__;if(kn){var r=t[e];return r===iT?void 0:r}return aT.call(t,e)?t[e]:void 0}var oT=Object.prototype,lT=oT.hasOwnProperty;function cT(e){var t=this.__data__;return kn?t[e]!==void 0:lT.call(t,e)}var hT="__lodash_hash_undefined__";function uT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=kn&&t===void 0?hT:t,this}function Rr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Rr.prototype.clear=eT;Rr.prototype.delete=rT;Rr.prototype.get=sT;Rr.prototype.has=cT;Rr.prototype.set=uT;function fT(){this.__data__=[],this.size=0}function Os(e,t){return e===t||e!==e&&t!==t}function Rs(e,t){for(var r=e.length;r--;)if(Os(e[r][0],t))return r;return-1}var dT=Array.prototype,pT=dT.splice;function gT(e){var t=this.__data__,r=Rs(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():pT.call(t,r,1),--this.size,!0}function mT(e){var t=this.__data__,r=Rs(t,e);return r<0?void 0:t[r][1]}function yT(e){return Rs(this.__data__,e)>-1}function xT(e,t){var r=this.__data__,i=Rs(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ar(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ar.prototype.clear=fT;ar.prototype.delete=gT;ar.prototype.get=mT;ar.prototype.has=yT;ar.prototype.set=xT;var Sn=Ur(ze,"Map");function bT(){this.size=0,this.__data__={hash:new Rr,map:new(Sn||ar),string:new Rr}}function _T(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Is(e,t){var r=e.__data__;return _T(t)?r[typeof t=="string"?"string":"hash"]:r.map}function wT(e){var t=Is(this,e).delete(e);return this.size-=t?1:0,t}function CT(e){return Is(this,e).get(e)}function vT(e){return Is(this,e).has(e)}function kT(e,t){var r=Is(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function dr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}dr.prototype.clear=bT;dr.prototype.delete=wT;dr.prototype.get=CT;dr.prototype.has=vT;dr.prototype.set=kT;var ST="Expected a function";function On(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ST);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var s=e.apply(this,i);return r.cache=a.set(n,s)||a,s};return r.cache=new(On.Cache||dr),r}On.Cache=dr;function TT(){this.__data__=new ar,this.size=0}function MT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function AT(e){return this.__data__.get(e)}function LT(e){return this.__data__.has(e)}var BT=200;function ET(e,t){var r=this.__data__;if(r instanceof ar){var i=r.__data__;if(!Sn||i.length<BT-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new dr(i)}return r.set(e,t),this.size=r.size,this}function $i(e){var t=this.__data__=new ar(e);this.size=t.size}$i.prototype.clear=TT;$i.prototype.delete=MT;$i.prototype.get=AT;$i.prototype.has=LT;$i.prototype.set=ET;var ss=(function(){try{var e=Ur(Object,"defineProperty");return e({},"",{}),e}catch{}})();function wc(e,t,r){t=="__proto__"&&ss?ss(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function _l(e,t,r){(r!==void 0&&!Os(e[t],r)||r===void 0&&!(t in e))&&wc(e,t,r)}function $T(e){return function(t,r,i){for(var n=-1,a=Object(t),s=i(t),o=s.length;o--;){var l=s[++n];if(r(a[l],l,a)===!1)break}return t}}var FT=$T(),Ng=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cu=Ng&&typeof module=="object"&&module&&!module.nodeType&&module,DT=Cu&&Cu.exports===Ng,vu=DT?ze.Buffer:void 0,ku=vu?vu.allocUnsafe:void 0;function OT(e,t){if(t)return e.slice();var r=e.length,i=ku?ku(r):new e.constructor(r);return e.copy(i),i}var Su=ze.Uint8Array;function RT(e){var t=new e.constructor(e.byteLength);return new Su(t).set(new Su(e)),t}function IT(e,t){var r=t?RT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function PT(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Tu=Object.create,NT=(function(){function e(){}return function(t){if(!qr(t))return{};if(Tu)return Tu(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function zg(e,t){return function(r){return e(t(r))}}var Wg=zg(Object.getPrototypeOf,Object),zT=Object.prototype;function Ps(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||zT;return e===r}function WT(e){return typeof e.constructor=="function"&&!Ps(e)?NT(Wg(e)):{}}function Rn(e){return e!=null&&typeof e=="object"}var qT="[object Arguments]";function Mu(e){return Rn(e)&&Ei(e)==qT}var qg=Object.prototype,HT=qg.hasOwnProperty,UT=qg.propertyIsEnumerable,os=Mu((function(){return arguments})())?Mu:function(e){return Rn(e)&&HT.call(e,"callee")&&!UT.call(e,"callee")},ls=Array.isArray,jT=9007199254740991;function Hg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=jT}function Ns(e){return e!=null&&Hg(e.length)&&!_c(e)}function YT(e){return Rn(e)&&Ns(e)}function GT(){return!1}var Ug=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Au=Ug&&typeof module=="object"&&module&&!module.nodeType&&module,VT=Au&&Au.exports===Ug,Lu=VT?ze.Buffer:void 0,XT=Lu?Lu.isBuffer:void 0,Cc=XT||GT,ZT="[object Object]",KT=Function.prototype,QT=Object.prototype,jg=KT.toString,JT=QT.hasOwnProperty,tM=jg.call(Object);function eM(e){if(!Rn(e)||Ei(e)!=ZT)return!1;var t=Wg(e);if(t===null)return!0;var r=JT.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&jg.call(r)==tM}var rM="[object Arguments]",iM="[object Array]",nM="[object Boolean]",aM="[object Date]",sM="[object Error]",oM="[object Function]",lM="[object Map]",cM="[object Number]",hM="[object Object]",uM="[object RegExp]",fM="[object Set]",dM="[object String]",pM="[object WeakMap]",gM="[object ArrayBuffer]",mM="[object DataView]",yM="[object Float32Array]",xM="[object Float64Array]",bM="[object Int8Array]",_M="[object Int16Array]",wM="[object Int32Array]",CM="[object Uint8Array]",vM="[object Uint8ClampedArray]",kM="[object Uint16Array]",SM="[object Uint32Array]",kt={};kt[yM]=kt[xM]=kt[bM]=kt[_M]=kt[wM]=kt[CM]=kt[vM]=kt[kM]=kt[SM]=!0;kt[rM]=kt[iM]=kt[gM]=kt[nM]=kt[mM]=kt[aM]=kt[sM]=kt[oM]=kt[lM]=kt[cM]=kt[hM]=kt[uM]=kt[fM]=kt[dM]=kt[pM]=!1;function TM(e){return Rn(e)&&Hg(e.length)&&!!kt[Ei(e)]}function MM(e){return function(t){return e(t)}}var Yg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pn=Yg&&typeof module=="object"&&module&&!module.nodeType&&module,AM=pn&&pn.exports===Yg,Ao=AM&&Ig.process,Bu=(function(){try{var e=pn&&pn.require&&pn.require("util").types;return e||Ao&&Ao.binding&&Ao.binding("util")}catch{}})(),Eu=Bu&&Bu.isTypedArray,vc=Eu?MM(Eu):TM;function wl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var LM=Object.prototype,BM=LM.hasOwnProperty;function EM(e,t,r){var i=e[t];(!(BM.call(e,t)&&Os(i,r))||r===void 0&&!(t in e))&&wc(e,t,r)}function $M(e,t,r,i){var n=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;l===void 0&&(l=e[o]),n?wc(r,o,l):EM(r,o,l)}return r}function FM(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var DM=9007199254740991,OM=/^(?:0|[1-9]\d*)$/;function Gg(e,t){var r=typeof e;return t=t??DM,!!t&&(r=="number"||r!="symbol"&&OM.test(e))&&e>-1&&e%1==0&&e<t}var RM=Object.prototype,IM=RM.hasOwnProperty;function PM(e,t){var r=ls(e),i=!r&&os(e),n=!r&&!i&&Cc(e),a=!r&&!i&&!n&&vc(e),s=r||i||n||a,o=s?FM(e.length,String):[],l=o.length;for(var c in e)(t||IM.call(e,c))&&!(s&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Gg(c,l)))&&o.push(c);return o}function NM(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var zM=Object.prototype,WM=zM.hasOwnProperty;function qM(e){if(!qr(e))return NM(e);var t=Ps(e),r=[];for(var i in e)i=="constructor"&&(t||!WM.call(e,i))||r.push(i);return r}function Vg(e){return Ns(e)?PM(e,!0):qM(e)}function HM(e){return $M(e,Vg(e))}function UM(e,t,r,i,n,a,s){var o=wl(e,r),l=wl(t,r),c=s.get(l);if(c){_l(e,r,c);return}var h=a?a(o,l,r+"",e,t,s):void 0,u=h===void 0;if(u){var f=ls(l),d=!f&&Cc(l),g=!f&&!d&&vc(l);h=l,f||d||g?ls(o)?h=o:YT(o)?h=PT(o):d?(u=!1,h=OT(l,!0)):g?(u=!1,h=IT(l,!0)):h=[]:eM(l)||os(l)?(h=o,os(o)?h=HM(o):(!qr(o)||_c(o))&&(h=WT(l))):u=!1}u&&(s.set(l,h),n(h,l,i,a,s),s.delete(l)),_l(e,r,h)}function Xg(e,t,r,i,n){e!==t&&FT(t,function(a,s){if(n||(n=new $i),qr(a))UM(e,t,s,r,Xg,i,n);else{var o=i?i(wl(e,s),a,s+"",e,t,n):void 0;o===void 0&&(o=a),_l(e,s,o)}},Vg)}function Zg(e){return e}function jM(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var $u=Math.max;function YM(e,t,r){return t=$u(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=$u(i.length-t,0),s=Array(a);++n<a;)s[n]=i[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=i[n];return o[t]=r(s),jM(e,this,o)}}function GM(e){return function(){return e}}var VM=ss?function(e,t){return ss(e,"toString",{configurable:!0,enumerable:!1,value:GM(t),writable:!0})}:Zg,XM=800,ZM=16,KM=Date.now;function QM(e){var t=0,r=0;return function(){var i=KM(),n=ZM-(i-r);if(r=i,n>0){if(++t>=XM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var JM=QM(VM);function tA(e,t){return JM(YM(e,t,Zg),e+"")}function eA(e,t,r){if(!qr(r))return!1;var i=typeof t;return(i=="number"?Ns(r)&&Gg(t,r.length):i=="string"&&t in r)?Os(r[t],e):!1}function rA(e){return tA(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&eA(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var o=r[i];o&&e(t,o,i,a)}return t})}var iA=rA(function(e,t,r){Xg(e,t,r)}),nA="​",aA={curveBasis:ba,curveBasisClosed:ok,curveBasisOpen:lk,curveBumpX:Od,curveBumpY:Rd,curveBundle:ck,curveCardinalClosed:hk,curveCardinalOpen:uk,curveCardinal:zd,curveCatmullRomClosed:fk,curveCatmullRomOpen:dk,curveCatmullRom:qd,curveLinear:Xa,curveLinearClosed:pk,curveMonotoneX:Vd,curveMonotoneY:Xd,curveNatural:Kd,curveStep:Qd,curveStepAfter:tp,curveStepBefore:Jd},sA=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,oA=p(function(e,t){const r=Kg(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(o=>o.args);Ma(s),i=Ot(i,[...s])}else i=r.args;if(!i)return;let n=ql(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Kg=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${sA.source})(?=[}][%]{2}).*
113
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=un.exec(e))!==null;)if(i.index===un.lastIndex&&un.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return P.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),lA=p(function(e){return e.replace(un,"")},"removeDirectives"),cA=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function kc(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return aA[r]??t}p(kc,"interpolateToCurve");function Qg(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?LS.sanitizeUrl(r):r}p(Qg,"formatUrl");var hA=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s<i;s++)if(a=a[r[s]],!a){P.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Sc(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Sc,"distance");function Jg(e){let t,r=0;e.forEach(n=>{r+=Sc(n,t),t=n});const i=r/2;return Tc(e,i)}p(Jg,"traverseEdge");function tm(e){return e.length===1?e[0]:Jg(e)}p(tm,"calcLabelPosition");var Fu=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Tc=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Sc(n,r);if(a===0)return r;if(a<i)i-=a;else{const s=i/a;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:Fu((1-s)*r.x+s*n.x,5),y:Fu((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),uA=p((e,t,r)=>{P.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Tc(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function em(e,t,r){const i=structuredClone(r);P.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Tc(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}p(em,"calcTerminalLabelPosition");function rm(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(rm,"getStylesFromArray");var Du=0,fA=p(()=>(Du++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Du),"generateId");function im(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(im,"makeRandomHex");var dA=p(e=>im(e.length),"random"),pA=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"),gA=p(function(e,t){const r=t.text.replace(Li.lineBreakRegex," "),[,i]=zs(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),mA=On((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Li.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((s,o)=>{const l=ir(`${s} `,r),c=ir(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=yA(s,t,"-",r);n.push(a,...f),a=d}else c+l>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),yA=On((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let s="";return n.forEach((o,l)=>{const c=`${s}${o}`;if(ir(c,i)>=t){const u=l+1,f=n.length===u,d=`${c}${r}`;a.push(f?c:d),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function nm(e,t){return Mc(e,t).height}p(nm,"calculateTextHeight");function ir(e,t){return Mc(e,t).width}p(ir,"calculateTextWidth");var Mc=On((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=zs(r),s=["sans-serif",i],o=e.split(Li.lineBreakRegex),l=[],c=pt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of s){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of o){const y=pA();y.text=m||nA;const x=gA(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}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}`),mi,xA=(mi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(mi,"InitIDGenerator"),mi),ea,bA=p(function(e){return ea=ea||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ea.innerHTML=e,unescape(ea.textContent)},"entityDecode");function Ac(e){return"str"in e}p(Ac,"isDetailedError");var _A=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),zs=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 Lc(e,t){return iA({},e,t)}p(Lc,"cleanAndMerge");var ve={assignWithDepth:Ot,wrapLabel:mA,calculateTextHeight:nm,calculateTextWidth:ir,calculateTextDimensions:Mc,cleanAndMerge:Lc,detectInit:oA,detectDirective:Kg,isSubstringInArray:cA,interpolateToCurve:kc,calcLabelPosition:tm,calcCardinalityPosition:uA,calcTerminalLabelPosition:em,formatUrl:Qg,getStylesFromArray:rm,generateId:fA,random:dA,runFunc:hA,entityDecode:bA,insertTitle:_A,isLabelCoordinateInPath:am,parseFontSize:zs,InitIDGenerator:xA},wA=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"),jr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),w3=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Qt(e){return e??null}p(Qt,"handleUndefinedAttr");function am(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(am,"isLabelCoordinateInPath");const CA=Object.freeze({left:0,top:0,width:16,height:16}),cs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sm=Object.freeze({...CA,...cs}),vA=Object.freeze({...sm,body:"",hidden:!1}),kA=Object.freeze({width:null,height:null}),SA=Object.freeze({...kA,...cs}),TA=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return Lo(c)?c:null}const a=n[0],s=a.split("-");if(s.length>1){const o={provider:i,prefix:s.shift(),name:s.join("-")};return Lo(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return Lo(o,r)?o:null}return null},Lo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function MA(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 Ou(e,t){const r=MA(e,t);for(const i in vA)i in cs?i in e&&!(i in r)&&(r[i]=cs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function AA(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;const o=i[s]&&i[s].parent,l=o&&a(o);l&&(n[s]=[o].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Ru(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function s(o){a=Ou(i[o]||n[o],a)}return s(t),r.forEach(s),Ou(e,a)}function LA(e,t){if(e.icons[t])return Ru(e,t,[]);const r=AA(e,[t])[t];return r?Ru(e,t,r):null}const BA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,EA=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Iu(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(BA);if(i===null||!i.length)return e;const n=[];let a=i.shift(),s=EA.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?n.push(a):n.push(Math.ceil(o*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}function $A(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const s=e.indexOf(">",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function FA(e,t){return e?"<defs>"+e+"</defs>"+t:t}function DA(e,t,r){const i=$A(e);return FA(i.defs,t+i.content+r)}const OA=e=>e==="unset"||e==="undefined"||e==="none";function RA(e,t){const r={...sm,...e},i={...SA,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let w;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:w=n.height/2+n.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:w=n.width/2+n.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}_%2===1&&(n.left!==n.top&&(w=n.left,n.left=n.top,n.top=w),n.width!==n.height&&(w=n.width,n.width=n.height,n.height=w)),y.length&&(a=DA(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const s=i.width,o=i.height,l=n.width,c=n.height;let h,u;s===null?(u=o===null?"1em":o==="auto"?c:o,h=Iu(u,l/c)):(h=s==="auto"?l:s,u=o===null?Iu(h,c/l):o==="auto"?c:o);const f={},d=(m,y)=>{OA(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[n.left,n.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const IA=/\sid="(\S+)"/g,Pu=new Map;function PA(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Pu.get(e)||0;return Pu.set(e,t+1),t?`${e}${t}`:e}function NA(e){const t=[];let r;for(;r=IA.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const a=PA(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function zA(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Bc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Yr=Bc();function om(e){Yr=e}var gn={exec:()=>null};function mt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(ie.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var WA=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ie={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")},qA=/^(?:[ \t]*(?:\n|$))+/,HA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,UA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,In=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ec=/(?:[*+-]|\d{1,9}[.)])/,lm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,cm=mt(lm).replace(/bull/g,Ec).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(),YA=mt(lm).replace(/bull/g,Ec).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(),$c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,GA=/^[^\n]+/,Fc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,VA=mt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Fc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),XA=mt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ec).getRegex(),Ws="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",Dc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ZA=mt("^ {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",Dc).replace("tag",Ws).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),hm=mt($c).replace("hr",In).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",Ws).getRegex(),KA=mt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",hm).getRegex(),Oc={blockquote:KA,code:HA,def:VA,fences:UA,heading:jA,hr:In,html:ZA,lheading:cm,list:XA,newline:qA,paragraph:hm,table:gn,text:GA},Nu=mt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",In).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",Ws).getRegex(),QA={...Oc,lheading:YA,table:Nu,paragraph:mt($c).replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Nu).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",Ws).getRegex()},JA={...Oc,html:mt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dc).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:gn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mt($c).replace("hr",In).replace("heading",` *#{1,6} *[^
114
- ]`).replace("lheading",cm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,um=/^( {2,}|\\)\n(?!\s*$)/,rL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qs=/[\p{P}\p{S}]/u,Rc=/[\s\p{P}\p{S}]/u,fm=/[^\s\p{P}\p{S}]/u,iL=mt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rc).getRegex(),dm=/(?!~)[\p{P}\p{S}]/u,nL=/(?!~)[\s\p{P}\p{S}]/u,aL=/(?:[^\s\p{P}\p{S}]|~)/u,sL=mt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",WA?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,oL=mt(pm,"u").replace(/punct/g,qs).getRegex(),lL=mt(pm,"u").replace(/punct/g,dm).getRegex(),gm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cL=mt(gm,"gu").replace(/notPunctSpace/g,fm).replace(/punctSpace/g,Rc).replace(/punct/g,qs).getRegex(),hL=mt(gm,"gu").replace(/notPunctSpace/g,aL).replace(/punctSpace/g,nL).replace(/punct/g,dm).getRegex(),uL=mt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fm).replace(/punctSpace/g,Rc).replace(/punct/g,qs).getRegex(),fL=mt(/\\(punct)/,"gu").replace(/punct/g,qs).getRegex(),dL=mt(/^<(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(),pL=mt(Dc).replace("(?:-->|$)","-->").getRegex(),gL=mt("^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",pL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mL=mt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",hs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mm=mt(/^!?\[(label)\]\[(ref)\]/).replace("label",hs).replace("ref",Fc).getRegex(),ym=mt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fc).getRegex(),yL=mt("reflink|nolink(?!\\()","g").replace("reflink",mm).replace("nolink",ym).getRegex(),zu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ic={_backpedal:gn,anyPunctuation:fL,autolink:dL,blockSkip:sL,br:um,code:eL,del:gn,emStrongLDelim:oL,emStrongRDelimAst:cL,emStrongRDelimUnd:uL,escape:tL,link:mL,nolink:ym,punctuation:iL,reflink:mm,reflinkSearch:yL,tag:gL,text:rL,url:gn},xL={...Ic,link:mt(/^!?\[(label)\]\((.*?)\)/).replace("label",hs).getRegex(),reflink:mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",hs).getRegex()},Cl={...Ic,emStrongRDelimAst:hL,emStrongLDelim:lL,url:mt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",zu).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:mt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",zu).getRegex()},bL={...Cl,br:mt(um).replace("{2,}","*").getRegex(),text:mt(Cl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ra={normal:Oc,gfm:QA,pedantic:JA},Xi={normal:Ic,gfm:Cl,breaks:bL,pedantic:xL},_L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Wu=e=>_L[e];function Fe(e,t){if(t){if(ie.escapeTest.test(e))return e.replace(ie.escapeReplace,Wu)}else if(ie.escapeTestNoEncode.test(e))return e.replace(ie.escapeReplaceNoEncode,Wu);return e}function qu(e){try{e=encodeURI(e).replace(ie.percentDecode,"%")}catch{return null}return e}function Hu(e,t){let r=e.replace(ie.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(ie.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(ie.slashPipe,"|");return i}function Zi(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function wL(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 Uu(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function CL(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
111
+ `+e.slice(s+1):l+=e.slice(n),l.slice(1)}p(xl,"foldLine");function $g(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=ai(e,n),i=Jt[r],!i&&Mi(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||wg(r);return t}p($g,"escapeString");function Fg(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(ze(e,t,o,!1,!1)||typeof o>"u"&&ze(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(Fg,"writeFlowSequence");function bl(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(ze(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ze(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=is(e,t)),e.dump&&vn===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(bl,"writeBlockSequence");function Dg(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s<o;s+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[s],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ze(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ze(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(Dg,"writeFlowMapping");function Og(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,c,h,u,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new ce("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)f="",(!i||n!=="")&&(f+=is(e,t)),c=s[o],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ze(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&vn===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=is(e,t)),ze(e,t+1,h,!0,u)&&(e.dump&&vn===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}p(Og,"writeBlockMapping");function _l(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a<s;a+=1)if(o=n[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,dg.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(pg.call(o.represent,l))i=o.represent[l](t,l);else throw new ce("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(_l,"detectType");function ze(e,t,r,i,n,a,s){e.tag=null,e.dump=r,_l(e,r,!1)||_l(e,r,!0);var o=dg.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[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)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Og(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(Dg(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?bl(e,t-1,e.dump,n):bl(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(Fg(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Bg(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ce("unacceptable kind of an object to dump "+o)}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(ze,"writeNode");function Rg(e,t){var r=[],i=[],n,a;for(ns(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(Rg,"getDuplicateReferences");function ns(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)ns(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)ns(e[i[n]],t,r)}p(ns,"inspectNode");function bS(e,t){t=t||{};var r=new Cg(t);r.noRefs||Rg(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ze(r,0,i,!0,!0)?r.dump+`
112
+ `:""}p(bS,"dump$1");function _S(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(_S,"renamed");var wS=Mp,CS=Jk.load;var Vt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},xu={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function sn(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Tt(e),t=Tt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,o=a-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}p(sn,"calculateDeltaAndAngle");var Tt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),vS=p(e=>({x:p(function(t,r,i){let n=0;const a=Tt(i[0]).x<Tt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Vt,e.arrowTypeStart)){const{angle:d,deltaX:g}=sn(i[0],i[1]);n=Vt[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Vt,e.arrowTypeEnd)){const{angle:d,deltaX:g}=sn(i[i.length-1],i[i.length-2]);n=Vt[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const s=Math.abs(Tt(t).x-Tt(i[i.length-1]).x),o=Math.abs(Tt(t).y-Tt(i[i.length-1]).y),l=Math.abs(Tt(t).x-Tt(i[0]).x),c=Math.abs(Tt(t).y-Tt(i[0]).y),h=Vt[e.arrowTypeStart],u=Vt[e.arrowTypeEnd],f=1;if(s<u&&s>0&&o<u){let d=u+f-s;d*=a==="right"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="right"?-1:1,n+=d}return Tt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=Tt(i[0]).y<Tt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Vt,e.arrowTypeStart)){const{angle:d,deltaY:g}=sn(i[0],i[1]);n=Vt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Vt,e.arrowTypeEnd)){const{angle:d,deltaY:g}=sn(i[i.length-1],i[i.length-2]);n=Vt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const s=Math.abs(Tt(t).y-Tt(i[i.length-1]).y),o=Math.abs(Tt(t).x-Tt(i[i.length-1]).x),l=Math.abs(Tt(t).y-Tt(i[0]).y),c=Math.abs(Tt(t).x-Tt(i[0]).x),h=Vt[e.arrowTypeStart],u=Vt[e.arrowTypeEnd],f=1;if(s<u&&s>0&&o<u){let d=u+f-s;d*=a==="up"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="up"?-1:1,n+=d}return Tt(t).y+n},"y")}),"getLineFunctionsWithOffset"),_c=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),kS=p(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Ei=p(e=>{const t=SS([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),SS=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),Ig=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"),K=p(e=>{const{stylesArray:t}=Ei(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{const o=s[0];Ig(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),Z=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=Ei(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:TS(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),TS=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),ea={},Dt={},bu;function MS(){return bu||(bu=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.BLANK_URL=Dt.relativeFirstCharacters=Dt.whitespaceEscapeCharsRegex=Dt.urlSchemeRegex=Dt.ctrlCharactersRegex=Dt.htmlCtrlEntityRegex=Dt.htmlEntitiesRegex=Dt.invalidProtocolRegex=void 0,Dt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Dt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Dt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Dt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Dt.urlSchemeRegex=/^.+(:|&colon;)/gim,Dt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Dt.relativeFirstCharacters=[".","/"],Dt.BLANK_URL="about:blank"),Dt}var _u;function AS(){if(_u)return ea;_u=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.sanitizeUrl=a;var e=MS();function t(s){return e.relativeFirstCharacters.indexOf(s[0])>-1}function r(s){var o=s.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(s){return URL.canParse(s)}function n(s){try{return decodeURIComponent(s)}catch{return s}}function a(s){if(!s)return e.BLANK_URL;var o,l=n(s.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return ea}var LS=AS(),Pg=typeof global=="object"&&global&&global.Object===Object&&global,BS=typeof self=="object"&&self&&self.Object===Object&&self,qe=Pg||BS||Function("return this")(),as=qe.Symbol,Ng=Object.prototype,ES=Ng.hasOwnProperty,$S=Ng.toString,Xi=as?as.toStringTag:void 0;function FS(e){var t=ES.call(e,Xi),r=e[Xi];try{e[Xi]=void 0;var i=!0}catch{}var n=$S.call(e);return i&&(t?e[Xi]=r:delete e[Xi]),n}var DS=Object.prototype,OS=DS.toString;function RS(e){return OS.call(e)}var IS="[object Null]",PS="[object Undefined]",wu=as?as.toStringTag:void 0;function $i(e){return e==null?e===void 0?PS:IS:wu&&wu in Object(e)?FS(e):RS(e)}function Hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var NS="[object AsyncFunction]",zS="[object Function]",WS="[object GeneratorFunction]",qS="[object Proxy]";function wc(e){if(!Hr(e))return!1;var t=$i(e);return t==zS||t==WS||t==NS||t==qS}var Ao=qe["__core-js_shared__"],Cu=(function(){var e=/[^.]+$/.exec(Ao&&Ao.keys&&Ao.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function HS(e){return!!Cu&&Cu in e}var US=Function.prototype,jS=US.toString;function Ur(e){if(e!=null){try{return jS.call(e)}catch{}try{return e+""}catch{}}return""}var YS=/[\\^$.*+?()[\]{}|]/g,GS=/^\[object .+?Constructor\]$/,VS=Function.prototype,XS=Object.prototype,ZS=VS.toString,KS=XS.hasOwnProperty,QS=RegExp("^"+ZS.call(KS).replace(YS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function JS(e){if(!Hr(e)||HS(e))return!1;var t=wc(e)?QS:GS;return t.test(Ur(e))}function tT(e,t){return e?.[t]}function jr(e,t){var r=tT(e,t);return JS(r)?r:void 0}var Tn=jr(Object,"create");function eT(){this.__data__=Tn?Tn(null):{},this.size=0}function rT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var iT="__lodash_hash_undefined__",nT=Object.prototype,aT=nT.hasOwnProperty;function sT(e){var t=this.__data__;if(Tn){var r=t[e];return r===iT?void 0:r}return aT.call(t,e)?t[e]:void 0}var oT=Object.prototype,lT=oT.hasOwnProperty;function cT(e){var t=this.__data__;return Tn?t[e]!==void 0:lT.call(t,e)}var hT="__lodash_hash_undefined__";function uT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tn&&t===void 0?hT:t,this}function Ir(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ir.prototype.clear=eT;Ir.prototype.delete=rT;Ir.prototype.get=sT;Ir.prototype.has=cT;Ir.prototype.set=uT;function fT(){this.__data__=[],this.size=0}function Os(e,t){return e===t||e!==e&&t!==t}function Rs(e,t){for(var r=e.length;r--;)if(Os(e[r][0],t))return r;return-1}var dT=Array.prototype,pT=dT.splice;function gT(e){var t=this.__data__,r=Rs(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():pT.call(t,r,1),--this.size,!0}function mT(e){var t=this.__data__,r=Rs(t,e);return r<0?void 0:t[r][1]}function yT(e){return Rs(this.__data__,e)>-1}function xT(e,t){var r=this.__data__,i=Rs(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ar(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ar.prototype.clear=fT;ar.prototype.delete=gT;ar.prototype.get=mT;ar.prototype.has=yT;ar.prototype.set=xT;var Mn=jr(qe,"Map");function bT(){this.size=0,this.__data__={hash:new Ir,map:new(Mn||ar),string:new Ir}}function _T(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Is(e,t){var r=e.__data__;return _T(t)?r[typeof t=="string"?"string":"hash"]:r.map}function wT(e){var t=Is(this,e).delete(e);return this.size-=t?1:0,t}function CT(e){return Is(this,e).get(e)}function vT(e){return Is(this,e).has(e)}function kT(e,t){var r=Is(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function pr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}pr.prototype.clear=bT;pr.prototype.delete=wT;pr.prototype.get=CT;pr.prototype.has=vT;pr.prototype.set=kT;var ST="Expected a function";function In(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ST);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var s=e.apply(this,i);return r.cache=a.set(n,s)||a,s};return r.cache=new(In.Cache||pr),r}In.Cache=pr;function TT(){this.__data__=new ar,this.size=0}function MT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function AT(e){return this.__data__.get(e)}function LT(e){return this.__data__.has(e)}var BT=200;function ET(e,t){var r=this.__data__;if(r instanceof ar){var i=r.__data__;if(!Mn||i.length<BT-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new pr(i)}return r.set(e,t),this.size=r.size,this}function Fi(e){var t=this.__data__=new ar(e);this.size=t.size}Fi.prototype.clear=TT;Fi.prototype.delete=MT;Fi.prototype.get=AT;Fi.prototype.has=LT;Fi.prototype.set=ET;var ss=(function(){try{var e=jr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Cc(e,t,r){t=="__proto__"&&ss?ss(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function wl(e,t,r){(r!==void 0&&!Os(e[t],r)||r===void 0&&!(t in e))&&Cc(e,t,r)}function $T(e){return function(t,r,i){for(var n=-1,a=Object(t),s=i(t),o=s.length;o--;){var l=s[++n];if(r(a[l],l,a)===!1)break}return t}}var FT=$T(),zg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vu=zg&&typeof module=="object"&&module&&!module.nodeType&&module,DT=vu&&vu.exports===zg,ku=DT?qe.Buffer:void 0,Su=ku?ku.allocUnsafe:void 0;function OT(e,t){if(t)return e.slice();var r=e.length,i=Su?Su(r):new e.constructor(r);return e.copy(i),i}var Tu=qe.Uint8Array;function RT(e){var t=new e.constructor(e.byteLength);return new Tu(t).set(new Tu(e)),t}function IT(e,t){var r=t?RT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function PT(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Mu=Object.create,NT=(function(){function e(){}return function(t){if(!Hr(t))return{};if(Mu)return Mu(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Wg(e,t){return function(r){return e(t(r))}}var qg=Wg(Object.getPrototypeOf,Object),zT=Object.prototype;function Ps(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||zT;return e===r}function WT(e){return typeof e.constructor=="function"&&!Ps(e)?NT(qg(e)):{}}function Pn(e){return e!=null&&typeof e=="object"}var qT="[object Arguments]";function Au(e){return Pn(e)&&$i(e)==qT}var Hg=Object.prototype,HT=Hg.hasOwnProperty,UT=Hg.propertyIsEnumerable,os=Au((function(){return arguments})())?Au:function(e){return Pn(e)&&HT.call(e,"callee")&&!UT.call(e,"callee")},ls=Array.isArray,jT=9007199254740991;function Ug(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=jT}function Ns(e){return e!=null&&Ug(e.length)&&!wc(e)}function YT(e){return Pn(e)&&Ns(e)}function GT(){return!1}var jg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Lu=jg&&typeof module=="object"&&module&&!module.nodeType&&module,VT=Lu&&Lu.exports===jg,Bu=VT?qe.Buffer:void 0,XT=Bu?Bu.isBuffer:void 0,vc=XT||GT,ZT="[object Object]",KT=Function.prototype,QT=Object.prototype,Yg=KT.toString,JT=QT.hasOwnProperty,tM=Yg.call(Object);function eM(e){if(!Pn(e)||$i(e)!=ZT)return!1;var t=qg(e);if(t===null)return!0;var r=JT.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Yg.call(r)==tM}var rM="[object Arguments]",iM="[object Array]",nM="[object Boolean]",aM="[object Date]",sM="[object Error]",oM="[object Function]",lM="[object Map]",cM="[object Number]",hM="[object Object]",uM="[object RegExp]",fM="[object Set]",dM="[object String]",pM="[object WeakMap]",gM="[object ArrayBuffer]",mM="[object DataView]",yM="[object Float32Array]",xM="[object Float64Array]",bM="[object Int8Array]",_M="[object Int16Array]",wM="[object Int32Array]",CM="[object Uint8Array]",vM="[object Uint8ClampedArray]",kM="[object Uint16Array]",SM="[object Uint32Array]",kt={};kt[yM]=kt[xM]=kt[bM]=kt[_M]=kt[wM]=kt[CM]=kt[vM]=kt[kM]=kt[SM]=!0;kt[rM]=kt[iM]=kt[gM]=kt[nM]=kt[mM]=kt[aM]=kt[sM]=kt[oM]=kt[lM]=kt[cM]=kt[hM]=kt[uM]=kt[fM]=kt[dM]=kt[pM]=!1;function TM(e){return Pn(e)&&Ug(e.length)&&!!kt[$i(e)]}function MM(e){return function(t){return e(t)}}var Gg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mn=Gg&&typeof module=="object"&&module&&!module.nodeType&&module,AM=mn&&mn.exports===Gg,Lo=AM&&Pg.process,Eu=(function(){try{var e=mn&&mn.require&&mn.require("util").types;return e||Lo&&Lo.binding&&Lo.binding("util")}catch{}})(),$u=Eu&&Eu.isTypedArray,kc=$u?MM($u):TM;function Cl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var LM=Object.prototype,BM=LM.hasOwnProperty;function EM(e,t,r){var i=e[t];(!(BM.call(e,t)&&Os(i,r))||r===void 0&&!(t in e))&&Cc(e,t,r)}function $M(e,t,r,i){var n=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;l===void 0&&(l=e[o]),n?Cc(r,o,l):EM(r,o,l)}return r}function FM(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var DM=9007199254740991,OM=/^(?:0|[1-9]\d*)$/;function Vg(e,t){var r=typeof e;return t=t??DM,!!t&&(r=="number"||r!="symbol"&&OM.test(e))&&e>-1&&e%1==0&&e<t}var RM=Object.prototype,IM=RM.hasOwnProperty;function PM(e,t){var r=ls(e),i=!r&&os(e),n=!r&&!i&&vc(e),a=!r&&!i&&!n&&kc(e),s=r||i||n||a,o=s?FM(e.length,String):[],l=o.length;for(var c in e)(t||IM.call(e,c))&&!(s&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vg(c,l)))&&o.push(c);return o}function NM(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var zM=Object.prototype,WM=zM.hasOwnProperty;function qM(e){if(!Hr(e))return NM(e);var t=Ps(e),r=[];for(var i in e)i=="constructor"&&(t||!WM.call(e,i))||r.push(i);return r}function Xg(e){return Ns(e)?PM(e,!0):qM(e)}function HM(e){return $M(e,Xg(e))}function UM(e,t,r,i,n,a,s){var o=Cl(e,r),l=Cl(t,r),c=s.get(l);if(c){wl(e,r,c);return}var h=a?a(o,l,r+"",e,t,s):void 0,u=h===void 0;if(u){var f=ls(l),d=!f&&vc(l),g=!f&&!d&&kc(l);h=l,f||d||g?ls(o)?h=o:YT(o)?h=PT(o):d?(u=!1,h=OT(l,!0)):g?(u=!1,h=IT(l,!0)):h=[]:eM(l)||os(l)?(h=o,os(o)?h=HM(o):(!Hr(o)||wc(o))&&(h=WT(l))):u=!1}u&&(s.set(l,h),n(h,l,i,a,s),s.delete(l)),wl(e,r,h)}function Zg(e,t,r,i,n){e!==t&&FT(t,function(a,s){if(n||(n=new Fi),Hr(a))UM(e,t,s,r,Zg,i,n);else{var o=i?i(Cl(e,s),a,s+"",e,t,n):void 0;o===void 0&&(o=a),wl(e,s,o)}},Xg)}function Kg(e){return e}function jM(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Fu=Math.max;function YM(e,t,r){return t=Fu(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=Fu(i.length-t,0),s=Array(a);++n<a;)s[n]=i[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=i[n];return o[t]=r(s),jM(e,this,o)}}function GM(e){return function(){return e}}var VM=ss?function(e,t){return ss(e,"toString",{configurable:!0,enumerable:!1,value:GM(t),writable:!0})}:Kg,XM=800,ZM=16,KM=Date.now;function QM(e){var t=0,r=0;return function(){var i=KM(),n=ZM-(i-r);if(r=i,n>0){if(++t>=XM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var JM=QM(VM);function tA(e,t){return JM(YM(e,t,Kg),e+"")}function eA(e,t,r){if(!Hr(r))return!1;var i=typeof t;return(i=="number"?Ns(r)&&Vg(t,r.length):i=="string"&&t in r)?Os(r[t],e):!1}function rA(e){return tA(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&eA(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var o=r[i];o&&e(t,o,i,a)}return t})}var iA=rA(function(e,t,r){Zg(e,t,r)}),nA="​",aA={curveBasis:ba,curveBasisClosed:ok,curveBasisOpen:lk,curveBumpX:Rd,curveBumpY:Id,curveBundle:ck,curveCardinalClosed:hk,curveCardinalOpen:uk,curveCardinal:Wd,curveCatmullRomClosed:fk,curveCatmullRomOpen:dk,curveCatmullRom:Hd,curveLinear:Xa,curveLinearClosed:pk,curveMonotoneX:Xd,curveMonotoneY:Zd,curveNatural:Qd,curveStep:Jd,curveStepAfter:ep,curveStepBefore:tp},sA=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,oA=p(function(e,t){const r=Qg(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(o=>o.args);Ma(s),i=Ot(i,[...s])}else i=r.args;if(!i)return;let n=Hl(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Qg=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${sA.source})(?=[}][%]{2}).*
113
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=dn.exec(e))!==null;)if(i.index===dn.lastIndex&&dn.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return P.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),lA=p(function(e){return e.replace(dn,"")},"removeDirectives"),cA=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Sc(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return aA[r]??t}p(Sc,"interpolateToCurve");function Jg(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?LS.sanitizeUrl(r):r}p(Jg,"formatUrl");var hA=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s<i;s++)if(a=a[r[s]],!a){P.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Tc(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Tc,"distance");function tm(e){let t,r=0;e.forEach(n=>{r+=Tc(n,t),t=n});const i=r/2;return Mc(e,i)}p(tm,"traverseEdge");function em(e){return e.length===1?e[0]:tm(e)}p(em,"calcLabelPosition");var Du=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Mc=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Tc(n,r);if(a===0)return r;if(a<i)i-=a;else{const s=i/a;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:Du((1-s)*r.x+s*n.x,5),y:Du((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),uA=p((e,t,r)=>{P.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Mc(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function rm(e,t,r){const i=structuredClone(r);P.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Mc(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}p(rm,"calcTerminalLabelPosition");function im(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(im,"getStylesFromArray");var Ou=0,fA=p(()=>(Ou++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ou),"generateId");function nm(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(nm,"makeRandomHex");var dA=p(e=>nm(e.length),"random"),pA=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"),gA=p(function(e,t){const r=t.text.replace(Bi.lineBreakRegex," "),[,i]=zs(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),mA=In((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Bi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((s,o)=>{const l=ir(`${s} `,r),c=ir(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=yA(s,t,"-",r);n.push(a,...f),a=d}else c+l>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),yA=In((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let s="";return n.forEach((o,l)=>{const c=`${s}${o}`;if(ir(c,i)>=t){const u=l+1,f=n.length===u,d=`${c}${r}`;a.push(f?c:d),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function am(e,t){return Ac(e,t).height}p(am,"calculateTextHeight");function ir(e,t){return Ac(e,t).width}p(ir,"calculateTextWidth");var Ac=In((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=zs(r),s=["sans-serif",i],o=e.split(Bi.lineBreakRegex),l=[],c=pt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of s){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of o){const y=pA();y.text=m||nA;const x=gA(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}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}`),yi,xA=(yi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(yi,"InitIDGenerator"),yi),ra,bA=p(function(e){return ra=ra||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ra.innerHTML=e,unescape(ra.textContent)},"entityDecode");function Lc(e){return"str"in e}p(Lc,"isDetailedError");var _A=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),zs=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 Bc(e,t){return iA({},e,t)}p(Bc,"cleanAndMerge");var Se={assignWithDepth:Ot,wrapLabel:mA,calculateTextHeight:am,calculateTextWidth:ir,calculateTextDimensions:Ac,cleanAndMerge:Bc,detectInit:oA,detectDirective:Qg,isSubstringInArray:cA,interpolateToCurve:Sc,calcLabelPosition:em,calcCardinalityPosition:uA,calcTerminalLabelPosition:rm,formatUrl:Jg,getStylesFromArray:im,generateId:fA,random:dA,runFunc:hA,entityDecode:bA,insertTitle:_A,isLabelCoordinateInPath:sm,parseFontSize:zs,InitIDGenerator:xA},wA=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"),Yr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),w3=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Qt(e){return e??null}p(Qt,"handleUndefinedAttr");function sm(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(sm,"isLabelCoordinateInPath");const CA=Object.freeze({left:0,top:0,width:16,height:16}),cs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),om=Object.freeze({...CA,...cs}),vA=Object.freeze({...om,body:"",hidden:!1}),kA=Object.freeze({width:null,height:null}),SA=Object.freeze({...kA,...cs}),TA=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return Bo(c)?c:null}const a=n[0],s=a.split("-");if(s.length>1){const o={provider:i,prefix:s.shift(),name:s.join("-")};return Bo(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return Bo(o,r)?o:null}return null},Bo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function MA(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 Ru(e,t){const r=MA(e,t);for(const i in vA)i in cs?i in e&&!(i in r)&&(r[i]=cs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function AA(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;const o=i[s]&&i[s].parent,l=o&&a(o);l&&(n[s]=[o].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Iu(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function s(o){a=Ru(i[o]||n[o],a)}return s(t),r.forEach(s),Ru(e,a)}function LA(e,t){if(e.icons[t])return Iu(e,t,[]);const r=AA(e,[t])[t];return r?Iu(e,t,r):null}const BA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,EA=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Pu(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(BA);if(i===null||!i.length)return e;const n=[];let a=i.shift(),s=EA.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?n.push(a):n.push(Math.ceil(o*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}function $A(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const s=e.indexOf(">",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function FA(e,t){return e?"<defs>"+e+"</defs>"+t:t}function DA(e,t,r){const i=$A(e);return FA(i.defs,t+i.content+r)}const OA=e=>e==="unset"||e==="undefined"||e==="none";function RA(e,t){const r={...om,...e},i={...SA,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let w;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:w=n.height/2+n.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:w=n.width/2+n.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}_%2===1&&(n.left!==n.top&&(w=n.left,n.left=n.top,n.top=w),n.width!==n.height&&(w=n.width,n.width=n.height,n.height=w)),y.length&&(a=DA(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const s=i.width,o=i.height,l=n.width,c=n.height;let h,u;s===null?(u=o===null?"1em":o==="auto"?c:o,h=Pu(u,l/c)):(h=s==="auto"?l:s,u=o===null?Pu(h,c/l):o==="auto"?c:o);const f={},d=(m,y)=>{OA(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[n.left,n.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const IA=/\sid="(\S+)"/g,Nu=new Map;function PA(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Nu.get(e)||0;return Nu.set(e,t+1),t?`${e}${t}`:e}function NA(e){const t=[];let r;for(;r=IA.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const a=PA(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function zA(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Ec(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gr=Ec();function lm(e){Gr=e}var yn={exec:()=>null};function yt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(ie.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var WA=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ie={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")},qA=/^(?:[ \t]*(?:\n|$))+/,HA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,UA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Nn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$c=/(?:[*+-]|\d{1,9}[.)])/,cm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,hm=yt(cm).replace(/bull/g,$c).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(),YA=yt(cm).replace(/bull/g,$c).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(),Fc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,GA=/^[^\n]+/,Dc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,VA=yt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Dc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),XA=yt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$c).getRegex(),Ws="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",Oc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ZA=yt("^ {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",Oc).replace("tag",Ws).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),um=yt(Fc).replace("hr",Nn).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",Ws).getRegex(),KA=yt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",um).getRegex(),Rc={blockquote:KA,code:HA,def:VA,fences:UA,heading:jA,hr:Nn,html:ZA,lheading:hm,list:XA,newline:qA,paragraph:um,table:yn,text:GA},zu=yt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Nn).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",Ws).getRegex(),QA={...Rc,lheading:YA,table:zu,paragraph:yt(Fc).replace("hr",Nn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zu).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",Ws).getRegex()},JA={...Rc,html:yt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Oc).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:yn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:yt(Fc).replace("hr",Nn).replace("heading",` *#{1,6} *[^
114
+ ]`).replace("lheading",hm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fm=/^( {2,}|\\)\n(?!\s*$)/,rL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qs=/[\p{P}\p{S}]/u,Ic=/[\s\p{P}\p{S}]/u,dm=/[^\s\p{P}\p{S}]/u,iL=yt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ic).getRegex(),pm=/(?!~)[\p{P}\p{S}]/u,nL=/(?!~)[\s\p{P}\p{S}]/u,aL=/(?:[^\s\p{P}\p{S}]|~)/u,sL=yt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",WA?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),gm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,oL=yt(gm,"u").replace(/punct/g,qs).getRegex(),lL=yt(gm,"u").replace(/punct/g,pm).getRegex(),mm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cL=yt(mm,"gu").replace(/notPunctSpace/g,dm).replace(/punctSpace/g,Ic).replace(/punct/g,qs).getRegex(),hL=yt(mm,"gu").replace(/notPunctSpace/g,aL).replace(/punctSpace/g,nL).replace(/punct/g,pm).getRegex(),uL=yt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,dm).replace(/punctSpace/g,Ic).replace(/punct/g,qs).getRegex(),fL=yt(/\\(punct)/,"gu").replace(/punct/g,qs).getRegex(),dL=yt(/^<(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(),pL=yt(Oc).replace("(?:-->|$)","-->").getRegex(),gL=yt("^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",pL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mL=yt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",hs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ym=yt(/^!?\[(label)\]\[(ref)\]/).replace("label",hs).replace("ref",Dc).getRegex(),xm=yt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Dc).getRegex(),yL=yt("reflink|nolink(?!\\()","g").replace("reflink",ym).replace("nolink",xm).getRegex(),Wu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Pc={_backpedal:yn,anyPunctuation:fL,autolink:dL,blockSkip:sL,br:fm,code:eL,del:yn,emStrongLDelim:oL,emStrongRDelimAst:cL,emStrongRDelimUnd:uL,escape:tL,link:mL,nolink:xm,punctuation:iL,reflink:ym,reflinkSearch:yL,tag:gL,text:rL,url:yn},xL={...Pc,link:yt(/^!?\[(label)\]\((.*?)\)/).replace("label",hs).getRegex(),reflink:yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",hs).getRegex()},vl={...Pc,emStrongRDelimAst:hL,emStrongLDelim:lL,url:yt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wu).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:yt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wu).getRegex()},bL={...vl,br:yt(fm).replace("{2,}","*").getRegex(),text:yt(vl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ia={normal:Rc,gfm:QA,pedantic:JA},Zi={normal:Pc,gfm:vl,breaks:bL,pedantic:xL},_L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},qu=e=>_L[e];function Oe(e,t){if(t){if(ie.escapeTest.test(e))return e.replace(ie.escapeReplace,qu)}else if(ie.escapeTestNoEncode.test(e))return e.replace(ie.escapeReplaceNoEncode,qu);return e}function Hu(e){try{e=encodeURI(e).replace(ie.percentDecode,"%")}catch{return null}return e}function Uu(e,t){let r=e.replace(ie.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(ie.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(ie.slashPipe,"|");return i}function Ki(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function wL(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 ju(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function CL(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
115
115
  `).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=n.length?a.slice(n.length):a}).join(`
116
- `)}var us=class{options;rules;lexer;constructor(t){this.options=t||Yr}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:Zi(i,`
117
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=CL(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:n}}}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 n=Zi(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.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:Zi(r[0],`
118
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Zi(r[0],`
116
+ `)}var us=class{options;rules;lexer;constructor(t){this.options=t||Gr}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:Ki(i,`
117
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=CL(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:n}}}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 n=Ki(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.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:Ki(r[0],`
118
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ki(r[0],`
119
119
  `).split(`
120
120
  `),n="",a="",s=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
121
121
  `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
@@ -129,13 +129,13 @@ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
129
129
  `);continue}}return{type:"blockquote",raw:n,tokens:s,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let s=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,h="",u="";if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
130
130
  `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
131
131
  `,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
132
- `,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),_=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),C=this.rules.other.headingBeginRegex(m),v=this.rules.other.htmlBeginRegex(m);for(;t;){let S=t.split(`
133
- `,1)[0],O;if(d=S,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),O=d):O=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||C.test(d)||v.test(d)||b.test(d)||_.test(d))break;if(O.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
132
+ `,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),_=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),C=this.rules.other.headingBeginRegex(m),v=this.rules.other.htmlBeginRegex(m);for(;t;){let T=t.split(`
133
+ `,1)[0],O;if(d=T,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),O=d):O=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||C.test(d)||v.test(d)||b.test(d)||_.test(d))break;if(O.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
134
134
  `+O.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||C.test(f)||_.test(f))break;u+=`
135
- `+d}!g&&!d.trim()&&(g=!0),h+=S+`
136
- `,t=t.substring(S.length+1),f=O.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Hu(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
137
- `):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(Hu(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}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)===`
138
- `?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 s=Zi(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=wL(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Uu(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return Uu(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,f=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}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," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},_e=class vl{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Yr,this.options.tokenizer=this.options.tokenizer||new us,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:ie,block:ra.normal,inline:Xi.normal};this.options.pedantic?(r.block=ra.pedantic,r.inline=Xi.pedantic):this.options.gfm&&(r.block=ra.gfm,this.options.breaks?r.inline=Xi.breaks:r.inline=Xi.gfm),this.tokenizer.rules=r}static get rules(){return{block:ra,inline:Xi}}static lex(t,r){return new vl(r).lex(t)}static lexInline(t,r){return new vl(r).inlineTokens(t)}lex(t){t=t.replace(ie.carriageReturn,`
135
+ `+d}!g&&!d.trim()&&(g=!0),h+=T+`
136
+ `,t=t.substring(T.length+1),f=O.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Uu(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
137
+ `):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(Uu(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}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)===`
138
+ `?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 s=Ki(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=wL(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),ju(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return ju(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,f=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}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," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ce=class kl{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Gr,this.options.tokenizer=this.options.tokenizer||new us,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:ie,block:ia.normal,inline:Zi.normal};this.options.pedantic?(r.block=ia.pedantic,r.inline=Zi.pedantic):this.options.gfm&&(r.block=ia.gfm,this.options.breaks?r.inline=Zi.breaks:r.inline=Zi.gfm),this.tokenizer.rules=r}static get rules(){return{block:ia,inline:Zi}}static lex(t,r){return new kl(r).lex(t)}static lexInline(t,r){return new kl(r).inlineTokens(t)}lex(t){t=t.replace(ie.carriageReturn,`
139
139
  `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(ie.tabCharGlobal," ").replace(ie.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(s=>(n=s.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 s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=`
140
140
  `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
141
141
  `)?"":`
@@ -149,16 +149,16 @@ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
149
149
  `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
150
150
  `)?"":`
151
151
  `)+n.raw,s.text+=`
152
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=n[2]?n[2].length:0,i=i.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},fs=class{options;parser;constructor(t){this.options=t||Yr}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(ie.notSpaceStart)?.[0],a=t.replace(ie.endingNewline,"")+`
153
- `;return n?'<pre><code class="language-'+Fe(n)+'">'+(i?a:Fe(a,!0))+`</code></pre>
154
- `:"<pre><code>"+(i?a:Fe(a,!0))+`</code></pre>
152
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=n[2]?n[2].length:0,i=i.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},fs=class{options;parser;constructor(t){this.options=t||Gr}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(ie.notSpaceStart)?.[0],a=t.replace(ie.endingNewline,"")+`
153
+ `;return n?'<pre><code class="language-'+Oe(n)+'">'+(i?a:Oe(a,!0))+`</code></pre>
154
+ `:"<pre><code>"+(i?a:Oe(a,!0))+`</code></pre>
155
155
  `}blockquote({tokens:t}){return`<blockquote>
156
156
  ${this.parser.parse(t)}</blockquote>
157
157
  `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
158
158
  `}hr(t){return`<hr>
159
159
  `}list(t){let r=t.ordered,i=t.start,n="";for(let o=0;o<t.items.length;o++){let l=t.items[o];n+=this.listitem(l)}let a=r?"ol":"ul",s=r&&i!==1?' start="'+i+'"':"";return"<"+a+s+`>
160
160
  `+n+"</"+a+`>
161
- `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Fe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
161
+ `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Oe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
162
162
  `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
163
163
  `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let n="";for(let a=0;a<t.rows.length;a++){let s=t.rows[a];i="";for(let o=0;o<s.length;o++)i+=this.tablecell(s[o]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
164
164
  <thead>
@@ -167,29 +167,29 @@ ${this.parser.parse(t)}</blockquote>
167
167
  `}tablerow({text:t}){return`<tr>
168
168
  ${t}</tr>
169
169
  `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
170
- `}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>${Fe(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 n=this.parser.parseInline(i),a=qu(t);if(a===null)return n;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+Fe(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=qu(t);if(a===null)return Fe(i);t=a;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${Fe(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Fe(t.text)}},Pc=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""}},we=class kl{options;renderer;textRenderer;constructor(t){this.options=t||Yr,this.options.renderer=this.options.renderer||new fs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pc}static parse(t,r){return new kl(r).parse(t)}static parseInline(t,r){return new kl(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=l||"";continue}}let s=a;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;n+1<t.length&&t[n+1].type==="text";)o=t[++n],l+=`
171
- `+this.renderer.text(o);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=o||"";continue}}let s=a;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},an=class{options;block;constructor(t){this.options=t||Yr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?_e.lex:_e.lexInline}provideParser(){return this.block?we.parse:we.parseInline}},vL=class{defaults=Bc();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=we;Renderer=fs;TextRenderer=Pc;Lexer=_e;Tokenizer=us;Hooks=an;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let s of a.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new fs(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new us(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new an;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];an.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async&&an.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await l.call(a,h);return c.call(a,f)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return _e.lex(t,r??this.defaults)}parser(t,r){return we.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return s(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 s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?_e.lex:_e.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?we.parse:we.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?_e.lex:_e.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?we.parse:we.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return i=>{if(i.message+=`
172
- Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Fe(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},Ir=new vL;function bt(e,t){return Ir.parse(e,t)}bt.options=bt.setOptions=function(e){return Ir.setOptions(e),bt.defaults=Ir.defaults,om(bt.defaults),bt};bt.getDefaults=Bc;bt.defaults=Yr;bt.use=function(...e){return Ir.use(...e),bt.defaults=Ir.defaults,om(bt.defaults),bt};bt.walkTokens=function(e,t){return Ir.walkTokens(e,t)};bt.parseInline=Ir.parseInline;bt.Parser=we;bt.parser=we.parse;bt.Renderer=fs;bt.TextRenderer=Pc;bt.Lexer=_e;bt.lexer=_e.lex;bt.Tokenizer=us;bt.Hooks=an;bt.parse=bt;bt.options;bt.setOptions;bt.use;bt.walkTokens;bt.parseInline;we.parse;_e.lex;function xm(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 n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.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})):o},[]);if(n.length){var a=new RegExp(`
170
+ `}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>${Oe(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 n=this.parser.parseInline(i),a=Hu(t);if(a===null)return n;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+Oe(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=Hu(t);if(a===null)return Oe(i);t=a;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${Oe(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Oe(t.text)}},Nc=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""}},ve=class Sl{options;renderer;textRenderer;constructor(t){this.options=t||Gr,this.options.renderer=this.options.renderer||new fs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Nc}static parse(t,r){return new Sl(r).parse(t)}static parseInline(t,r){return new Sl(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=l||"";continue}}let s=a;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;n+1<t.length&&t[n+1].type==="text";)o=t[++n],l+=`
171
+ `+this.renderer.text(o);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=o||"";continue}}let s=a;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},on=class{options;block;constructor(t){this.options=t||Gr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ce.lex:Ce.lexInline}provideParser(){return this.block?ve.parse:ve.parseInline}},vL=class{defaults=Ec();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ve;Renderer=fs;TextRenderer=Nc;Lexer=Ce;Tokenizer=us;Hooks=on;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let s of a.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new fs(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new us(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new on;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];on.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async&&on.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await l.call(a,h);return c.call(a,f)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ce.lex(t,r??this.defaults)}parser(t,r){return ve.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return s(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 s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?ve.parse:ve.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?ve.parse:ve.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return i=>{if(i.message+=`
172
+ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Oe(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},Pr=new vL;function bt(e,t){return Pr.parse(e,t)}bt.options=bt.setOptions=function(e){return Pr.setOptions(e),bt.defaults=Pr.defaults,lm(bt.defaults),bt};bt.getDefaults=Ec;bt.defaults=Gr;bt.use=function(...e){return Pr.use(...e),bt.defaults=Pr.defaults,lm(bt.defaults),bt};bt.walkTokens=function(e,t){return Pr.walkTokens(e,t)};bt.parseInline=Pr.parseInline;bt.Parser=ve;bt.parser=ve.parse;bt.Renderer=fs;bt.TextRenderer=Nc;bt.Lexer=Ce;bt.lexer=Ce.lex;bt.Tokenizer=us;bt.Hooks=on;bt.parse=bt;bt.options;bt.setOptions;bt.use;bt.walkTokens;bt.parseInline;ve.parse;Ce.lex;function bm(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 n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.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})):o},[]);if(n.length){var a=new RegExp(`
173
173
  [ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(o){return o.replace(a,`
174
174
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(o,l){var c=s.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=o;typeof o=="string"&&o.includes(`
175
175
  `)&&(u=String(o).split(`
176
176
  `).map(function(f,d){return d===0?f:""+h+f}).join(`
177
- `)),s+=u+i[l+1]}),s}var kL={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},Sl=new Map,bm=new Map,SL=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(P.debug("Registering icon pack:",t.name),"loader"in t)bm.set(t.name,t.loader);else if("icons"in t)Sl.set(t.name,t.icons);else throw P.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),_m=p(async(e,t)=>{const r=TA(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 n=Sl.get(i);if(!n){const s=bm.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},Sl.set(i,n)}catch(o){throw P.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=LA(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),TL=p(async e=>{try{return await _m(e),!0}catch{return!1}},"isIconAvailable"),Pn=p(async(e,t,r)=>{let i;try{i=await _m(e,t?.fallbackPrefix)}catch(s){P.error(s),i=kL}const n=RA(i,t),a=zA(NA(n.body),{...n.attributes,...r});return me(a,Zt())},"getIconSVG");function wm(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
177
+ `)),s+=u+i[l+1]}),s}var kL={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},Tl=new Map,_m=new Map,SL=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(P.debug("Registering icon pack:",t.name),"loader"in t)_m.set(t.name,t.loader);else if("icons"in t)Tl.set(t.name,t.icons);else throw P.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),wm=p(async(e,t)=>{const r=TA(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 n=Tl.get(i);if(!n){const s=_m.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},Tl.set(i,n)}catch(o){throw P.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=LA(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),TL=p(async e=>{try{return await wm(e),!0}catch{return!1}},"isIconAvailable"),zn=p(async(e,t,r)=>{let i;try{i=await wm(e,t?.fallbackPrefix)}catch(s){P.error(s),i=kL}const n=RA(i,t),a=zA(NA(n.body),{...n.attributes,...r});return me(a,Zt())},"getIconSVG");function Cm(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
178
178
  `).replace(/\n{2,}/g,`
179
- `),n=xm(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(wm,"preprocessMarkdown");function Cm(e,t={}){const r=wm(e,t),i=bt.lexer(r),n=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
180
- `).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&n[a].push({content:f,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return p(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}p(Cm,"markdownToLines");function vm(e,{markdownAutoWrap:t}={}){const r=bt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(P.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(vm,"markdownToHTML");function km(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(km,"splitTextToChars");function Sm(e,t){const r=km(t.content);return Nc(e,[],r,t.type)}p(Sm,"splitWordToFitWidth");function Nc(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?Nc(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Nc,"splitWordToFitWidthRecursion");function Tm(e,t){if(e.some(({content:r})=>r.includes(`
181
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ds(e,t)}p(Tm,"splitLineToFitWidth");function ds(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return ds(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=Sm(t,a);r.push([o]),l.content&&e.unshift(l)}return ds(e,t,r)}p(ds,"splitLineToFitWidthRecursion");function Tl(e,t){t&&e.attr("style",t)}p(Tl,"applyStyle");async function Mm(e,t,r,i,n=!1,a=Zt()){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=bi(t.label)?await Hl(t.label.replace(Li.lineBreakRegex,`
182
- `),a):me(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),Tl(h,t.labelStyle),h.attr("class",`${c} ${i}`),Tl(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}p(Mm,"addHtmlSpan");function Hs(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(Hs,"createTspan");function Am(e,t,r){const i=e.append("text"),n=Hs(i,1,t);Us(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Am,"computeWidthOfText");function ML(e,t,r){const i=e.append("text"),n=Hs(i,1,t);Us(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(ML,"computeDimensionOfText");function Lm(e,t,r,i=!1){const a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(f=>Am(a,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:Tm(c,h);for(const f of u){const d=Hs(o,l,1.1);Us(d,f),l++}}if(i){const c=o.node().getBBox(),h=2;return s.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return o.node()}p(Lm,"createFormattedText");function Us(e,t){e.text(""),t.forEach((r,i)=>{const n=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?n.text(r.content):n.text(" "+r.content)})}p(Us,"updateTextContentAndStyles");async function Bm(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await TL(o)?await Pn(o,void 0,{class:"label-icon"}):`<i class='${me(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Bm,"replaceIconSubstring");var pr=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(P.debug("XYZ createText",t,r,i,n,a,s,"addSvgBackground: ",l),a){const h=vm(t,c),u=await Bm(jr(h),c),f=t.replace(/\\\\/g,"\\"),d={isNode:s,label:bi(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Mm(e,d,o,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=Cm(h.replace("<br>","<br/>"),c),f=Lm(o,e,u,t?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");pt(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");pt(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");pt(f).select("text").attr("style",g)}return f}},"createText");function Bo(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*s+n}}}function AL(e,t){return e[0]===t[0]&&e[1]===t[1]}function LL(e,t,r,i=1){const n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of s)Bo(c,o,n);const l=(function(c,h,u){const f=[];for(const b of c){const _=[...b];AL(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_<b.length-1;_++){const w=b[_],C=b[_+1];if(w[1]!==C[1]){const v=Math.min(w[1],C[1]);g.push({ymin:v,ymax:Math.max(w[1],C[1]),x:v===w[1]?w[0]:C[0],islope:(C[0]-w[0])/(C[1]-w[1])})}}if(g.sort(((b,_)=>b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax))),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let _=0;_<g.length&&!(g[_].ymin>y);_++)b=_;g.splice(0,b+1).forEach((_=>{m.push({s:y,edge:_})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const _=b+1;if(_>=m.length)break;const w=m[b].edge,C=m[_].edge;d.push([[Math.round(w.x),y],[Math.round(C.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(s,a,i);if(n){for(const c of s)Bo(c,o,-n);(function(c,h,u){const f=[];c.forEach((d=>f.push(...d))),Bo(f,h,u)})(l,o,-n)}return l}function Nn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),LL(e,n,i,a||1)}class zc{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Nn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function js(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 BL extends zc{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Nn(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)js([c,h])&&s.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class EL extends zc{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class $L{constructor(t){this.helper=t}fillPolygons(t,r){const i=Nn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=n/4;for(const o of t){const l=js(o),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(o[0][0]+o[1][0])/2-n/4,d=Math.min(o[0][1],o[1][1]);for(let g=0;g<h;g++){const m=d+u+g*n,y=f-s+2*Math.random()*s,x=m-s+2*Math.random()*s,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class FL{constructor(t){this.helper=t}fillPolygons(t,r){const i=Nn(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,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((s=>{const o=js(s),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+n),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),a}}class DL{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Nn(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const s=js(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<o;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),n}}const oe={};class OL{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const RL=0,Eo=1,ju=2,ia={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function $o(e,t){return e.type===t}function Wc(e){const t=[],r=(function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:RL,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Eo,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:ju,text:""},o})(e);let i="BOD",n=0,a=r[n];for(;!$o(a,ju);){let s=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return Wc("M0,0"+e);n++,s=ia[a.text],i=a.text}else $o(a,Eo)?s=ia[i]:(n++,s=ia[a.text],i=a.text);if(!(n+s<r.length))throw new Error("Path data ended short");for(let l=n;l<n+s;l++){const c=r[l];if(!$o(c,Eo))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof ia[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),n+=s,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Em(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,n]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function $m(e){const t=[];let r="",i=0,n=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-o),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-o),g=n+(n-l)):(d=i,g=n);const m=i+2*(d-i)/3,y=n+2*(g-n)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),o=d,l=g,i=u,n=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),o=u,l=f,i=d,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(Fm(i,n,y,x,u,f,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=c}return t}function Ki(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Fm(e,t,r,i,n,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=Ki(e,t,-h),[r,i]=Ki(r,i,-h);const L=(e-r)/2,T=(t-i)/2;let E=L*L/(n*n)+T*T/(a*a);E>1&&(E=Math.sqrt(E),n*=E,a*=E);const A=n*n,D=a*a,F=A*D-A*T*T-D*L*L,U=A*T*T+D*L*L,W=(o===l?-1:1)*Math.sqrt(Math.abs(F/U));m=W*n*T/a+(e+r)/2,y=W*-a*L/n+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const L=g,T=r,E=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Fm(r=m+n*Math.cos(g),i=y+a*Math.sin(g),T,E,n,a,s,0,l,[g,L,m,y])}x=g-d;const b=Math.cos(d),_=Math.sin(d),w=Math.cos(g),C=Math.sin(g),v=Math.tan(x/4),S=4/3*n*v,O=4/3*a*v,I=[e,t],R=[e+S*_,t-O*b],B=[r+S*C,i-O*w],$=[r,i];if(R[0]=2*I[0]-R[0],R[1]=2*I[1]-R[1],c)return[R,B,$].concat(f);{f=[R,B,$].concat(f);const L=[];for(let T=0;T<f.length;T+=3){const E=Ki(f[T][0],f[T][1],h),A=Ki(f[T+1][0],f[T+1][1],h),D=Ki(f[T+2][0],f[T+2][1],h);L.push([E[0],E[1],A[0],A[1],D[0],D[1]])}return L}}const IL={randOffset:function(e,t){return lt(e,t)},randOffsetWithRange:function(e,t,r){return ps(e,t,r)},ellipse:function(e,t,r,i,n){const a=Om(r,i,n);return Ml(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return ur(e,t,r,i,n,!0)}};function Dm(e,t,r,i,n){return{type:"path",ops:ur(e,t,r,i,n)}}function Ca(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...ur(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...ur(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Dm(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function PL(e,t,r,i,n){return(function(a,s){return Ca(a,!0,s)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Yu(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=na(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:na(r[0],1.5*(1+.22*t.roughness),Xu(t));for(let a=1;a<r.length;a++){const s=r[a];if(s.length){const o=na(s,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:na(s,1.5*(1+.22*t.roughness),Xu(t));for(const c of o)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Om(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let s=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return s+=lt(s*l,r),o+=lt(o*l,r),{increment:a,rx:s,ry:o}}function Ml(e,t,r,i){const[n,a]=Zu(i.increment,e,t,i.rx,i.ry,1,i.increment*ps(.1,ps(.4,1,r),r),r);let s=gs(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=Zu(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=gs(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function Gu(e,t,r,i,n,a,s,o,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=lt(.01*u,l),f+=lt(.01*f,l);let d=n,g=a;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Ku(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=Ku(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return s&&(o?x.push(...ur(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...ur(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Vu(e,t){const r=$m(Em(Wc(e))),i=[];let n=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...ur(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,f,d]=o;i.push(...NL(l,c,h,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...ur(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Fo(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+lt(n,t),i[0][1]+lt(n,t)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[i[s][0]+lt(n,t),i[s][1]+lt(n,t)]})}}return{type:"fillPath",ops:r}}function Qr(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!oe[n])switch(n){case"zigzag":oe[n]||(oe[n]=new BL(i));break;case"cross-hatch":oe[n]||(oe[n]=new EL(i));break;case"dots":oe[n]||(oe[n]=new $L(i));break;case"dashed":oe[n]||(oe[n]=new FL(i));break;case"zigzag-line":oe[n]||(oe[n]=new DL(i));break;default:n="hachure",oe[n]||(oe[n]=new zc(i))}return oe[n]})(t,IL).fillPolygons(e,t)}function Xu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Rm(e){return e.randomizer||(e.randomizer=new OL(e.seed||0)),e.randomizer.next()}function ps(e,t,r,i=1){return r.roughness*i*(Rm(r)*(t-e)+e)}function lt(e,t,r=1){return ps(-e,e,t,r)}function ur(e,t,r,i,n,a=!1){const s=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=Al(e,t,r,i,n,!0,!1);if(s)return o;const l=Al(e,t,r,i,n,!0,!0);return o.concat(l)}function Al(e,t,r,i,n,a,s){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,f=.2+.2*Rm(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=lt(d,n,c),g=lt(g,n,c);const m=[],y=()=>lt(u,n,c),x=()=>lt(h,n,c),b=n.preserveVertices;return s?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:lt(h,n,c)),t+(b?0:lt(h,n,c))]}),s?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function na(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+lt(t,r),e[0][1]+lt(t,r)]),i.push([e[0][0]+lt(t,r),e[0][1]+lt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+lt(t,r),e[n][1]+lt(t,r)]),n===e.length-1&&i.push([e[n][0]+lt(t,r),e[n][1]+lt(t,r)]);return gs(i,null,r)}function gs(e,t,r){const i=e.length,n=[];if(i>3){const a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*e[o+1][0]-s*e[o-1][0])/6,l[1]+(s*e[o+1][1]-s*e[o-1][1])/6],a[2]=[e[o+1][0]+(s*e[o][0]-s*e[o+2][0])/6,e[o+1][1]+(s*e[o][1]-s*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...Al(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Zu(e,t,r,i,n,a,s,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=lt(.5,o)-Math.PI/2;c.push([lt(a,o)+t+.9*i*Math.cos(h-e),lt(a,o)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[lt(a,o)+t+i*Math.cos(f),lt(a,o)+r+n*Math.sin(f)];l.push(d),c.push(d)}c.push([lt(a,o)+t+i*Math.cos(h+2*Math.PI+.5*s),lt(a,o)+r+n*Math.sin(h+2*Math.PI+.5*s)]),c.push([lt(a,o)+t+.98*i*Math.cos(h+s),lt(a,o)+r+.98*n*Math.sin(h+s)]),c.push([lt(a,o)+t+.9*i*Math.cos(h+.5*s),lt(a,o)+r+.9*n*Math.sin(h+.5*s)])}return[c,l]}function Ku(e,t,r,i,n,a,s,o,l){const c=a+lt(.1,l),h=[];h.push([lt(o,l)+t+.9*i*Math.cos(c-e),lt(o,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=s;u+=e)h.push([lt(o,l)+t+i*Math.cos(u),lt(o,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),gs(h,null,l)}function NL(e,t,r,i,n,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,f=o.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:lt(c[0],o)),s[1]+(f?0:lt(c[0],o))]}),h=f?[n,a]:[n+lt(c[d],o),a+lt(c[d],o)],l.push({op:"bcurveTo",data:[e+lt(c[d],o),t+lt(c[d],o),r+lt(c[d],o),i+lt(c[d],o),h[0],h[1]]});return l}function Qi(e){return[...e]}function Qu(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(Qi(e[0]),Qi(e[1]),Qi(e[2]),Qi(e[2]));else{const n=[];n.push(e[0],e[0]);for(let o=1;o<e.length;o++)n.push(e[o]),o===e.length-1&&n.push(e[o]);const a=[],s=1-t;i.push(Qi(n[0]));for(let o=1;o+2<n.length;o++){const l=n[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*n[o+1][0]-s*n[o-1][0])/6,l[1]+(s*n[o+1][1]-s*n[o-1][1])/6],a[2]=[n[o+1][0]+(s*n[o][0]-s*n[o+2][0])/6,n[o+1][1]+(s*n[o][1]-s*n[o+2][1])/6],a[3]=[n[o+1][0],n[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function va(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function zL(e,t,r){const i=va(t,r);if(i===0)return va(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),va(e,wr(t,r,n))}function wr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ll(e,t,r,i){const n=i||[];if((function(o,l){const c=o[l+0],h=o[l+1],u=o[l+2],f=o[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-c[0];m*=m;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const o=e[t+0];n.length?(a=n[n.length-1],s=o,Math.sqrt(va(a,s))>1&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=wr(l,c,.5),d=wr(c,h,.5),g=wr(h,u,.5),m=wr(f,d,.5),y=wr(d,g,.5),x=wr(m,y,.5);Ll([l,f,m,x],0,r,n),Ll([x,y,g,u],0,r,n)}var a,s;return n}function WL(e,t){return ms(e,0,e.length,t)}function ms(e,t,r,i,n){const a=n||[],s=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=zL(e[h],s,o);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(ms(e,t,c+1,i,a),ms(e,c,r,i,a)):(a.length||a.push(s),a.push(o)),a}function Do(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)Ll(e,3*a,t,i);return r&&r>0?ms(i,0,i.length,r):i}const he="none";class ys{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,n,a){const s=this._o(a);return this._d("line",[Dm(t,r,i,n,s)],s)}rectangle(t,r,i,n,a){const s=this._o(a),o=[],l=PL(t,r,i,n,s);if(s.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];s.fillStyle==="solid"?o.push(Fo([c],s)):o.push(Qr([c],s))}return s.stroke!==he&&o.push(l),this._d("rectangle",o,s)}ellipse(t,r,i,n,a){const s=this._o(a),o=[],l=Om(i,n,s),c=Ml(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Ml(t,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(Qr([c.estimatedPoints],s));return s.stroke!==he&&o.push(c.opset),this._d("ellipse",o,s)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ca(t,!1,i)],i)}arc(t,r,i,n,a,s,o=!1,l){const c=this._o(l),h=[],u=Gu(t,r,i,n,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=Gu(t,r,i,n,a,s,!0,!1,f);d.type="fillPath",h.push(d)}else h.push((function(f,d,g,m,y,x,b){const _=f,w=d;let C=Math.abs(g/2),v=Math.abs(m/2);C+=lt(.01*C,b),v+=lt(.01*v,b);let S=y,O=x;for(;S<0;)S+=2*Math.PI,O+=2*Math.PI;O-S>2*Math.PI&&(S=0,O=2*Math.PI);const I=(O-S)/b.curveStepCount,R=[];for(let B=S;B<=O;B+=I)R.push([_+C*Math.cos(B),w+v*Math.sin(B)]);return R.push([_+C*Math.cos(O),w+v*Math.sin(O)]),R.push([_,w]),Qr([R],b)})(t,r,i,n,a,s,c));return c.stroke!==he&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=Yu(t,i);if(i.fill&&i.fill!==he)if(i.fillStyle==="solid"){const s=Yu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...Do(Qu([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):s.push(...Do(Qu(c),10,(1+i.roughness)/2))}s.length&&n.push(Qr([s],i))}return i.stroke!==he&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=Ca(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Fo([t],i)):n.push(Qr([t],i))),i.stroke!==he&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==he,s=i.stroke!==he,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,f){const d=$m(Em(Wc(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Do(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:C,data:v}of d)switch(C){case"M":_(),y=[v[0],v[1]],m.push(y);break;case"L":b(),m.push([v[0],v[1]]);break;case"C":if(!x.length){const S=m.length?m[m.length-1]:y;x.push([S[0],S[1]])}x.push([v[0],v[1]]),x.push([v[2],v[3]]),x.push([v[4],v[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!f)return g;const w=[];for(const C of g){const v=WL(C,f);v.length&&w.push(v)}return w})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=Vu(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Vu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Fo(l,i));else n.push(Qr(l,i));return s&&(o?l.forEach((h=>{n.push(Ca(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:he};break;case"fillPath":s={d:this.opsToPath(a),stroke:he,strokeWidth:0,fill:i.fill||he};break;case"fillSketch":s=this.fillSketch(a,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||he,strokeWidth:i,fill:he}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class qL{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,a,o),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const s=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s),s}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s),s}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s),s}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,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 aa="http://www.w3.org/2000/svg";class HL{constructor(t,r){this.svg=t,this.gen=new ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(aa,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(aa,"path"),l.setAttribute("d",this.opsToPath(o,s)),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=n.createElementNS(aa,"path"),l.setAttribute("d",this.opsToPath(o,s)),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(n,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(aa,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s)}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s)}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,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 X={canvas:(e,t)=>new qL(e,t),svg:(e,t)=>new HL(e,t),generator:e=>new ys(e),newSeed:()=>ys.newSeed()},ot=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||It(xt()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",Qt(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=await pr(s,me(jr(o),xt()),{useHtmlLabels:n,width:t.width||xt().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],f=pt(l),d=u.getElementsByTagName("img");if(d){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[w=Mf.fontSize]=zs(b),C=w*_+"px";m.style.minWidth=C,m.style.maxWidth=C}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),Oo=p(async(e,t,r)=>{const i=r.useHtmlLabels||It(xt()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await pr(n,me(jr(t),xt()),{useHtmlLabels:i,width:r.width||xt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(It(xt()?.flowchart?.htmlLabels)){const l=a.children[0],c=pt(a);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),tt=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),st=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function dt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(dt,"createPathFromPoints");function fr(e,t,r,i,n,a){const s=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=f+n*Math.sin(u*(m-e));s.push({x:m,y})}return s}p(fr,"generateFullSineWavePoints");function Tn(e,t,r,i,n,a){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-d,y:-g})}return s}p(Tn,"generateCirclePoints");var UL=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,c;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,c=o):(n<0&&(s=-s),l=s,c=n===0?0:s*a/n),{x:r+l,y:i+c}},"intersectRect"),Fi=UL;function Im(e,t){t&&e.attr("style",t)}p(Im,"applyStyle");async function Pm(e){const t=pt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=xt();let n=e.label;e.label&&bi(e.label)&&(n=await Hl(e.label.replace(Li.lineBreakRegex,`
183
- `),i));const s='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(me(s,i)),Im(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(Pm,"addHtmlLabel");var jL=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),It(xt().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),P.info("vertexText"+n);const a={isNode:i,label:jr(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Pm(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof n=="string"?s=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?s=n:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Mr=jL,gr=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),Nm=p(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=K(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=It(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await pr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(It(r.flowchart.htmlLabels)){const S=g.children[0],O=pt(g);m=S.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;P.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const S=X.svg(u),O=Z(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),I=S.path(gr(b,_,y,x,0),O);w=u.insert(()=>(P.debug("Rough node insert CXC",I),I),":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",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:C}=bc(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+C})`),o){const S=d.select("span");S&&S.attr("style",o)}const v=w.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return Fi(t,S)},{cluster:u,labelBBox:m}},"rect"),YL=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return Fi(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),GL=p(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).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=u.node().appendChild(await Mr(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(It(r.flowchart.htmlLabels)){const I=d.children[0],R=pt(d);g=I.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,_=t.height+m-g.height-6,w=t.x-x/2,C=t.y-b/2;t.width=x;const v=t.y-t.height/2-y+g.height+2;let S;if(t.look==="handDrawn"){const I=t.cssClasses.includes("statediagram-cluster-alt"),R=X.svg(c),B=t.rx||t.ry?R.path(gr(w,C,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):R.rectangle(w,C,x,b,{seed:n});S=c.insert(()=>B,":first-child");const $=R.rectangle(w,v,x,_,{fill:I?a:s,fillStyle:I?"hachure":"solid",stroke:l,seed:n});S=c.insert(()=>B,":first-child"),f=c.insert(()=>$)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",w).attr("y",C).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",w).attr("y",v).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${C+1-(It(r.flowchart.htmlLabels)?0:3)})`);const O=S.node().getBBox();return t.height=O.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(I){return Fi(t,I)},{cluster:c,labelBBox:g}},"roundedWithTitle"),VL=p(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=K(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=It(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await pr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(It(r.flowchart.htmlLabels)){const S=g.children[0],O=pt(g);m=S.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;P.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const S=X.svg(u),O=Z(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),I=S.path(gr(b,_,y,x,t.rx),O);w=u.insert(()=>(P.debug("Rough node insert CXC",I),I),":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",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:C}=bc(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+C})`),o){const S=d.select("span");S&&S.attr("style",o)}const v=w.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return Fi(t,S)},{cluster:u,labelBBox:m}},"kanbanSection"),XL=p((e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.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 y=X.svg(s).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});d=s.insert(()=>y,":first-child")}else d=o.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Fi(t,m)},{cluster:s,labelBBox:{}}},"divider"),ZL=Nm,KL={rect:Nm,squareRect:ZL,roundedWithTitle:GL,noteGroup:YL,divider:XL,kanbanSection:VL},zm=new Map,QL=p(async(e,t)=>{const r=t.shape||"rect",i=await KL[r](e,t);return zm.set(t.id,i),i},"insertCluster"),M3=p(()=>{zm=new Map},"clear");function Wm(e,t){return e.intersect(t)}p(Wm,"intersectNode");var JL=Wm;function qm(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),c=Math.abs(t*r*s/l);i.x<n&&(c=-c);var h=Math.abs(t*r*o/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(qm,"intersectEllipse");var Hm=qm;function Um(e,t,r){return Hm(e,t,t,r)}p(Um,"intersectCircle");var tB=Um;function jm(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s,c=1e-6;if(o!==0&&l!==0&&Bl(o,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,g=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(g)<c&&Bl(d,g))return;const m=n*u-h*a;if(m===0)return;const y=Math.abs(m/2);let x=a*f-u*s;const b=x<0?(x-y)/m:(x+y)/m;x=h*s-n*f;const _=x<0?(x-y)/m:(x+y)/m;return{x:b,y:_}}}p(jm,"intersectLine");function Bl(e,t){return e*t>0}p(Bl,"sameSign");var eB=jm;function Ym(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=i-e.width/2-s,c=n-e.height/2-o;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=eB(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}p(Ym,"intersectPolygon");var rB=Ym,j={node:JL,circle:tB,ellipse:Hm,polygon:rB,rect:Fi};function Gm(e,t){const{labelStyles:r}=K(t);t.labelStyle=r;const i=st(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=1,{cssStyles:o}=t,l=X.svg(a),c=Z(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,s*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Qt(o)),tt(t,u),t.intersect=function(f){return P.info("Circle intersect",t,s,f),j.circle(t,s,f)},a}p(Gm,"anchor");function El(e,t,r,i,n,a,s){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/n,g=f/a,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),_=Math.atan2((t-b)/a,(e-x)/n);let C=Math.atan2((i-b)/a,(r-x)/n)-_;s&&C<0&&(C+=2*Math.PI),!s&&C>0&&(C-=2*Math.PI);const v=[];for(let S=0;S<20;S++){const O=S/19,I=_+O*C,R=x+n*Math.cos(I),B=b+a*Math.sin(I);v.push({x:R,y:B})}return v}p(El,"generateArcPoints");async function Vm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=t,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...El(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...El(s/2,o/2,s/2,-o/2,c,l,!0)],f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=dt(u),m=f.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),tt(t,y),t.intersect=function(x){return j.polygon(t,u,x)},n}p(Vm,"bowTieRect");function mr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(mr,"insertPolygonShape");async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.height+t.padding,o=12,l=a.width+t.padding+o,c=0,h=l,u=-s,f=0,d=[{x:c+o,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+o},{x:c+o,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=X.svg(n),x=Z(t,{}),b=dt(d),_=y.path(b,x);g=n.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=mr(n,l,s,d);return i&&g.attr("style",i),tt(t,g),t.intersect=function(y){return j.polygon(t,d,y)},n}p(Xm,"card");function Zm(e,t){const{nodeStyles:r}=K(t);t.label="";const i=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=X.svg(i),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=dt(s),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return j.polygon(t,s,f)},i}p(Zm,"choice");async function qc(e,t,r){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:o}=await ot(e,t,st(t)),l=r?.padding??o,c=s.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=X.svg(a),d=Z(t,{}),g=f.circle(0,0,c*2,d);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Qt(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return tt(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return j.circle(f,g,d)},t.intersect=function(f){return P.info("Circle intersect",t,c,f),j.circle(t,c,f)},a}p(qc,"circle");function Km(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
184
- M ${n.x},${n.y} L ${s.x},${s.y}`}p(Km,"createLine");function Qm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=X.svg(n),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=Km(a),u=o.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),tt(t,f),t.intersect=function(d){return P.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},n}p(Qm,"crossedCircle");function Ge(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-d,y:-g})}return s}p(Ge,"generateCirclePoints");async function Jm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ge(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Ge(o/2+c*2,-c,c,20,-180,-270),...Ge(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Ge(o/2,l/2,c,20,0,90)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Ge(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Ge(o/2+o*.1,-c,c,20,-180,-270),...Ge(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Ge(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],d=X.svg(n),g=Z(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=dt(u).replace("Z",""),x=d.path(y,g),b=dt(f),_=d.path(b,{...g}),w=n.insert("g",":first-child");return w.insert(()=>_,":first-child").attr("stroke-opacity",0),w.insert(()=>x,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),tt(t,w),t.intersect=function(C){return j.polygon(t,f,C)},n}p(Jm,"curlyBraceLeft");function Ve(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:d,y:g})}return s}p(Ve,"generateCirclePoints");async function t0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ve(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Ve(o/2+c*2,-c,c,20,-180,-270),...Ve(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Ve(o/2,l/2,c,20,0,90)],f=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...Ve(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Ve(o/2+c*2,-c,c,20,-180,-270),...Ve(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Ve(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],d=X.svg(n),g=Z(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=dt(u).replace("Z",""),x=d.path(y,g),b=dt(f),_=d.path(b,{...g}),w=n.insert("g",":first-child");return w.insert(()=>_,":first-child").attr("stroke-opacity",0),w.insert(()=>x,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),tt(t,w),t.intersect=function(C){return j.polygon(t,f,C)},n}p(t0,"curlyBraceRight");function qt(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-d,y:-g})}return s}p(qt,"generateCirclePoints");async function e0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...qt(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...qt(o/2+c*2,-c,c,20,-180,-270),...qt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...qt(o/2,l/2,c,20,0,90)],f=[...qt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...qt(-o/2-c/2,-c,c,20,0,90),...qt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...qt(-o/2+c+c/2,l/2,c,30,-180,-270)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...qt(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...qt(o/2+c*2,-c,c,20,-180,-270),...qt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...qt(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...qt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...qt(-o/2-c/2,-c,c,20,0,90),...qt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...qt(-o/2+c+c/2,l/2,c,30,-180,-270)],g=X.svg(n),m=Z(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=dt(u).replace("Z",""),b=g.path(x,m),w=dt(f).replace("Z",""),C=g.path(w,m),v=dt(d),S=g.path(v,{...m}),O=n.insert("g",":first-child");return O.insert(()=>S,":first-child").attr("stroke-opacity",0),O.insert(()=>b,":first-child"),O.insert(()=>C,":first-child"),O.attr("class","text"),h&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),tt(t,O),t.intersect=function(I){return j.polygon(t,d,I)},n}p(e0,"curlyBraces");async function r0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=80,o=20,l=Math.max(s,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Tn(-y,-m/2,h,50,270,90)],_=dt(b),w=f.path(_,d),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),C.attr("transform",`translate(${-l/2}, ${-c/2})`),tt(t,C),t.intersect=function(v){return j.polygon(t,b,v)},n}p(r0,"curvedTrapezoid");var iB=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),nB=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),aB=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function i0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+t.padding,t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=X.svg(n),g=nB(0,0,o,h,l,c),m=aB(0,c,o,h,l,c),y=d.path(g,Z(t,{})),x=d.path(m,Z(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=iB(0,0,o,h,l,c);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",Qt(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),tt(t,u),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(d){const g=j.rect(t,d),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(i0,"cylinder");async function n0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),tt(t,x),t.intersect=function(b){return j.rect(t,b)},n}p(n0,"dividedRectangle");async function a0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s}=await ot(e,t,st(t)),l=a.width/2+s+5,c=a.width/2+s;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=X.svg(n),d=Z(t,{roughness:.2,strokeWidth:2.5}),g=Z(t,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,l*2,d),y=f.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",Qt(t.cssClasses)).attr("style",Qt(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return tt(t,h),t.intersect=function(f){return P.info("DoubleCircle intersect",t,l,f),j.circle(t,l,f)},n}p(a0,"doublecircle");function s0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=K(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=X.svg(a),{nodeBorder:c}=r,h=Z(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),tt(t,f),t.intersect=function(d){return P.info("filledCircle intersect",t,{radius:s,point:d}),j.circle(t,s,d)},a}p(s0,"filledCircle");async function o0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=dt(h),m=f.path(g,d),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=o,t.height=l,tt(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return P.info("Triangle intersect",t,h,x),j.polygon(t,h,x)},n}p(o0,"flippedTriangle");function l0(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=K(t);t.label="";const s=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,f=X.svg(s),d=Z(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),tt(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return j.rect(t,x)},s}p(l0,"forkJoin");async function c0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:s,bbox:o}=await ot(e,t,st(t)),l=Math.max(n,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,o.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=X.svg(s),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Tn(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=dt(g),y=f.path(m,d),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),tt(t,x),t.intersect=function(b){return P.info("Pill intersect",t,{radius:h,point:b}),j.polygon(t,g,b)},s}p(c0,"halfRoundedRectangle");async function h0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.height+(t.padding??0),o=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=X.svg(n),h=Z(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=o/2;const f=u/6;u=u+f;const d=s/2,g=d/2,m=u-g,y=[{x:-m,y:-d},{x:0,y:-d},{x:m,y:-d},{x:u,y:0},{x:m,y:d},{x:0,y:d},{x:-m,y:d},{x:-u,y:0}],x=dt(y),b=c.path(x,h),_=n.insert(()=>b,":first-child");return _.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),t.width=o,t.height=s,tt(t,_),t.intersect=function(w){return j.polygon(t,y,w)},n}p(h0,"hexagon");async function u0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await ot(e,t,st(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=X.svg(n),c=Z(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=dt(h),f=l.path(u,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-s/2})`),tt(t,d),t.intersect=function(g){return P.info("Pill intersect",t,{points:h}),j.polygon(t,h,g)},n}p(u0,"hourglass");async function f0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=K(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await ot(e,t,"icon-shape default"),f=t.pos==="t",d=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=Bi(t),x=-g/2,b=-d/2,_=t.label?8:0,w=X.svg(c),C=Z(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=w.rectangle(x,b,g,d,C),S=Math.max(g,h.width),O=d+h.height+_,I=w.rectangle(-S/2,-O/2,S,O,{...C,fill:"transparent",stroke:"none"}),R=c.insert(()=>v,":first-child"),B=c.insert(()=>I);if(t.icon){const $=c.append("g");$.html(`<g>${await Pn(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=$.node().getBBox(),T=L.width,E=L.height,A=L.x,D=L.y;$.attr("transform",`translate(${-T/2-A},${f?h.height/2+_/2-E/2-D:-h.height/2-_/2-E/2-D})`),$.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),R.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),tt(t,B),t.intersect=function($){if(P.info("iconSquare intersect",t,$),!t.label)return j.rect(t,$);const L=t.x??0,T=t.y??0,E=t.height??0;let A=[];return f?A=[{x:L-h.width/2,y:T-E/2},{x:L+h.width/2,y:T-E/2},{x:L+h.width/2,y:T-E/2+h.height+_},{x:L+g/2,y:T-E/2+h.height+_},{x:L+g/2,y:T+E/2},{x:L-g/2,y:T+E/2},{x:L-g/2,y:T-E/2+h.height+_},{x:L-h.width/2,y:T-E/2+h.height+_}]:A=[{x:L-g/2,y:T-E/2},{x:L+g/2,y:T-E/2},{x:L+g/2,y:T-E/2+d},{x:L+h.width/2,y:T-E/2+d},{x:L+h.width/2/2,y:T+E/2},{x:L-h.width/2,y:T+E/2},{x:L-h.width/2,y:T-E/2+d},{x:L-g/2,y:T-E/2+d}],j.polygon(t,A,$)},c}p(f0,"icon");async function d0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=K(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await ot(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Bi(t),b=X.svg(c),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=x.get("fill");_.stroke=w??y;const C=c.append("g");t.icon&&C.html(`<g>${await Pn(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=C.node().getBBox(),S=v.width,O=v.height,I=v.x,R=v.y,B=Math.max(S,O)*Math.SQRT2+f*2,$=b.circle(0,0,B,_),L=Math.max(B,h.width),T=B+h.height+d,E=b.rectangle(-L/2,-T/2,L,T,{..._,fill:"transparent",stroke:"none"}),A=c.insert(()=>$,":first-child"),D=c.insert(()=>E);return C.attr("transform",`translate(${-S/2-I},${g?h.height/2+d/2-O/2-R:-h.height/2-d/2-O/2-R})`),C.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-T/2:T/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),tt(t,D),t.intersect=function(F){return P.info("iconSquare intersect",t,F),j.rect(t,F)},c}p(d0,"iconCircle");async function p0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=K(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ot(e,t,"icon-shape default"),d=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Bi(t),_=-m/2,w=-g/2,C=t.label?8:0,v=X.svg(c),S=Z(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const O=b.get("fill");S.stroke=O??x;const I=v.path(gr(_,w,m,g,5),S),R=Math.max(m,h.width),B=g+h.height+C,$=v.rectangle(-R/2,-B/2,R,B,{...S,fill:"transparent",stroke:"none"}),L=c.insert(()=>I,":first-child").attr("class","icon-shape2"),T=c.insert(()=>$);if(t.icon){const E=c.append("g");E.html(`<g>${await Pn(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const A=E.node().getBBox(),D=A.width,F=A.height,U=A.x,W=A.y;E.attr("transform",`translate(${-D/2-U},${d?h.height/2+C/2-F/2-W:-h.height/2-C/2-F/2-W})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-B/2:B/2-h.height})`),L.attr("transform",`translate(0,${d?h.height/2+C/2:-h.height/2-C/2})`),tt(t,T),t.intersect=function(E){if(P.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const A=t.x??0,D=t.y??0,F=t.height??0;let U=[];return d?U=[{x:A-h.width/2,y:D-F/2},{x:A+h.width/2,y:D-F/2},{x:A+h.width/2,y:D-F/2+h.height+C},{x:A+m/2,y:D-F/2+h.height+C},{x:A+m/2,y:D+F/2},{x:A-m/2,y:D+F/2},{x:A-m/2,y:D-F/2+h.height+C},{x:A-h.width/2,y:D-F/2+h.height+C}]:U=[{x:A-m/2,y:D-F/2},{x:A+m/2,y:D-F/2},{x:A+m/2,y:D-F/2+g},{x:A+h.width/2,y:D-F/2+g},{x:A+h.width/2/2,y:D+F/2},{x:A-h.width/2,y:D+F/2},{x:A-h.width/2,y:D-F/2+g},{x:A-m/2,y:D-F/2+g}],j.polygon(t,U,E)},c}p(p0,"iconRounded");async function g0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=K(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ot(e,t,"icon-shape default"),d=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Bi(t),_=-m/2,w=-g/2,C=t.label?8:0,v=X.svg(c),S=Z(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const O=b.get("fill");S.stroke=O??x;const I=v.path(gr(_,w,m,g,.1),S),R=Math.max(m,h.width),B=g+h.height+C,$=v.rectangle(-R/2,-B/2,R,B,{...S,fill:"transparent",stroke:"none"}),L=c.insert(()=>I,":first-child"),T=c.insert(()=>$);if(t.icon){const E=c.append("g");E.html(`<g>${await Pn(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const A=E.node().getBBox(),D=A.width,F=A.height,U=A.x,W=A.y;E.attr("transform",`translate(${-D/2-U},${d?h.height/2+C/2-F/2-W:-h.height/2-C/2-F/2-W})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-B/2:B/2-h.height})`),L.attr("transform",`translate(0,${d?h.height/2+C/2:-h.height/2-C/2})`),tt(t,T),t.intersect=function(E){if(P.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const A=t.x??0,D=t.y??0,F=t.height??0;let U=[];return d?U=[{x:A-h.width/2,y:D-F/2},{x:A+h.width/2,y:D-F/2},{x:A+h.width/2,y:D-F/2+h.height+C},{x:A+m/2,y:D-F/2+h.height+C},{x:A+m/2,y:D+F/2},{x:A-m/2,y:D+F/2},{x:A-m/2,y:D-F/2+h.height+C},{x:A-h.width/2,y:D-F/2+h.height+C}]:U=[{x:A-m/2,y:D-F/2},{x:A+m/2,y:D-F/2},{x:A+m/2,y:D-F/2+g},{x:A+h.width/2,y:D-F/2+g},{x:A+h.width/2/2,y:D+F/2},{x:A-h.width/2,y:D+F/2},{x:A-h.width/2,y:D-F/2+g},{x:A-m/2,y:D-F/2+g}],j.polygon(t,U,E)},c}p(g0,"iconSquare");async function m0(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:s}=K(t);t.labelStyle=s;const o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?o??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,o??0);const{shapeSvg:u,bbox:f,label:d}=await ot(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=X.svg(u),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=b.rectangle(m,y,c,h,_),C=Math.max(c,f.width),v=h+f.height+x,S=b.rectangle(-C/2,-v/2,C,v,{..._,fill:"none",stroke:"none"}),O=u.insert(()=>w,":first-child"),I=u.insert(()=>S);if(t.img){const R=u.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${g?v/2-h:-v/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),O.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),tt(t,I),t.intersect=function(R){if(P.info("iconSquare intersect",t,R),!t.label)return j.rect(t,R);const B=t.x??0,$=t.y??0,L=t.height??0;let T=[];return g?T=[{x:B-f.width/2,y:$-L/2},{x:B+f.width/2,y:$-L/2},{x:B+f.width/2,y:$-L/2+f.height+x},{x:B+c/2,y:$-L/2+f.height+x},{x:B+c/2,y:$+L/2},{x:B-c/2,y:$+L/2},{x:B-c/2,y:$-L/2+f.height+x},{x:B-f.width/2,y:$-L/2+f.height+x}]:T=[{x:B-c/2,y:$-L/2},{x:B+c/2,y:$-L/2},{x:B+c/2,y:$-L/2+h},{x:B+f.width/2,y:$-L/2+h},{x:B+f.width/2/2,y:$+L/2},{x:B-f.width/2,y:$+L/2},{x:B-f.width/2,y:$-L/2+h},{x:B-c/2,y:$-L/2+h}],j.polygon(t,T,R)},u}p(m0,"imageSquare");async function y0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=Z(t,{}),d=dt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=mr(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,tt(t,c),t.intersect=function(u){return j.polygon(t,l,u)},n}p(y0,"inv_trapezoid");async function Ys(e,t,r){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i;const{shapeSvg:a,bbox:s}=await ot(e,t,st(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),c=-o/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=X.svg(a),y=Z(t,{}),x=f||d?m.path(gr(c,h,o,l,f||0),y):m.rectangle(c,h,o,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Qt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Qt(f)).attr("ry",Qt(d)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return tt(t,u),t.calcIntersect=function(m,y){return j.rect(m,y)},t.intersect=function(m){return j.rect(t,m)},a}p(Ys,"drawRect");async function x0(e,t){const{shapeSvg:r,bbox:i,label:n}=await ot(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),tt(t,a),t.intersect=function(l){return j.rect(t,l)},r}p(x0,"labelRect");async function b0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=Z(t,{}),d=dt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=mr(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,tt(t,c),t.intersect=function(u){return j.polygon(t,l,u)},n}p(b0,"lean_left");async function _0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=Z(t,{}),d=dt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=mr(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,tt(t,c),t.intersect=function(u){return j.polygon(t,l,u)},n}p(_0,"lean_right");function w0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=X.svg(n),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=dt(c),d=h.path(f,u),g=n.insert(()=>d,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),tt(t,g),t.intersect=function(m){return P.info("lightningBolt intersect",t,m),j.polygon(t,c,m)},n}p(w0,"lightningBolt");var sB=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oB=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lB=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function C0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0),t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=oB(0,0,o,h,l,c,u),y=lB(0,c,o,h,l,c),x=Z(t,{}),b=g.path(m,x),_=g.path(y,x);n.insert(()=>_,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=sB(0,0,o,h,l,c,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Qt(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),tt(t,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=j.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(C0,"linedCylinder");async function v0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...fr(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),tt(t,y),t.intersect=function(x){return j.polygon(t,g,x)},n}p(v0,"linedWaveEdgedRect");async function k0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=dt(m),b=d.path(x,g),_=dt(y),w=d.path(_,{...g,fill:"none"}),C=n.insert(()=>w,":first-child");return C.insert(()=>b,":first-child"),C.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),tt(t,C),t.intersect=function(v){return j.polygon(t,m,v)},n}p(k0,"multiRect");async function S0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-o/2,f=-h/2,d=5,{cssStyles:g}=t,m=fr(u-d,f+h+d,u+o-d,f+h+d,c,.8),y=m?.[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+o-d,y:y.y-d},{x:u+o,y:y.y-d},{x:u+o,y:y.y-2*d},{x:u+o+d,y:y.y-2*d},{x:u+o+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+o-d,y:f+d},{x:u+o-d,y:y.y-d},{x:u+o,y:y.y-d},{x:u+o,y:f},{x:u,y:f}],_=X.svg(n),w=Z(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=dt(x),v=_.path(C,w),S=dt(b),O=_.path(S,w),I=n.insert(()=>v,":first-child");return I.insert(()=>O),I.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)+d-c/2-(a.y-(a.top??0))})`),tt(t,I),t.intersect=function(R){return j.polygon(t,x,R)},n}p(S0,"multiWaveEdgedRectangle");async function T0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i,t.useHtmlLabels||Zt().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await ot(e,t,st(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,f=-h/2,{cssStyles:d}=t,g=X.svg(s),m=Z(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,c,h,m),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),tt(t,x),t.intersect=function(b){return j.rect(t,b)},s}p(T0,"note");var cB=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 M0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.width+t.padding,o=a.height+t.padding,l=s+o,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=X.svg(n),g=Z(t,{}),m=cB(0,0,l),y=d.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=mr(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),tt(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=j.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},n}p(M0,"question");async function A0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,g=X.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=dt(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),tt(t,b),t.intersect=function(_){return j.polygon(t,f,_)},n}p(A0,"rect_left_inv_arrow");async function L0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=o.node().appendChild(await Mr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(It(xt()?.flowchart?.htmlLabels)){const O=h.children[0],I=pt(h);u=O.getBoundingClientRect(),I.attr("width",u.width),I.attr("height",u.height)}P.info("Text 2",l);const f=l||[],d=h.getBBox(),g=o.node().appendChild(await Mr(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=pt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;pt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),pt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),_=u.height+(t.padding||0),w=-u.width/2-x,C=-u.height/2-x;let v,S;if(t.look==="handDrawn"){const O=X.svg(a),I=Z(t,{}),R=O.path(gr(w,C,b,_,t.rx||0),I),B=O.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,I);S=a.insert(()=>(P.debug("Rough node insert CXC",R),B),":first-child"),v=a.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child")}else v=s.insert("rect",":first-child"),S=s.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),S.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return tt(t,v),t.intersect=function(O){return j.rect(t,O)},a}p(L0,"rectWithTitle");function sn(e,t,r,i,n,a,s){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/n,g=f/a,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),_=Math.atan2((t-b)/a,(e-x)/n);let C=Math.atan2((i-b)/a,(r-x)/n)-_;s&&C<0&&(C+=2*Math.PI),!s&&C>0&&(C-=2*Math.PI);const v=[];for(let S=0;S<20;S++){const O=S/19,I=_+O*C,R=x+n*Math.cos(I),B=b+a*Math.sin(I);v.push({x:R,y:B})}return v}p(sn,"generateArcPoints");async function B0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=t?.padding??0,o=t?.padding??0,l=(t?.width?t?.width:a.width)+s*2,c=(t?.height?t?.height:a.height)+o*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...sn(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...sn(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...sn(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...sn(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=dt(m),x=d.path(y,g),b=n.insert(()=>x,":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),tt(t,b),t.intersect=function(_){return j.polygon(t,m,_)},n}p(B0,"roundedRect");async function E0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Qt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),tt(t,x),t.intersect=function(b){return j.rect(t,b)},n}p(E0,"shadedProcess");async function $0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=t,f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],m=dt(g),y=f.path(m,d),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),tt(t,x),t.intersect=function(b){return j.polygon(t,g,b)},n}p($0,"slopedRect");async function F0(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Ys(e,t,r)}p(F0,"squareRect");async function D0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.height+t.padding,o=a.width+s/4+t.padding,l=s/2,{cssStyles:c}=t,h=X.svg(n),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...Tn(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...Tn(o/2-l,0,l,50,270,450)],d=dt(f),g=h.path(d,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),tt(t,m),t.intersect=function(y){return j.polygon(t,f,y)},n}p(D0,"stadium");async function O0(e,t){return Ys(e,t,{rx:5,ry:5})}p(O0,"state");function R0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=X.svg(c),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),d=o??l,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),tt(t,m),t.intersect=function(y){return j.circle(t,7,y)},c}p(R0,"stateEnd");function I0(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const o=X.svg(n).circle(0,0,14,kS(i));a=n.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return tt(t,a),t.intersect=function(s){return j.circle(t,7,s)},n}p(I0,"stateStart");async function P0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=(t?.padding||0)/2,o=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=X.svg(n),d=Z(t,{}),g=f.rectangle(c-8,h,o+16,l,d),m=f.line(c,h,c,h+l,d),y=f.line(c+o,h,c+o,h+l,d);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Qt(b)),tt(t,x)}else{const f=mr(n,o,l,u);i&&f.attr("style",i),tt(t,f)}return t.intersect=function(f){return j.polygon(t,u,f)},n}p(P0,"subroutine");async function N0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{}),m=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],y=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=dt(m),b=d.path(x,g),_=dt(y),w=d.path(_,{...g,fillStyle:"solid"}),C=n.insert(()=>w,":first-child");return C.insert(()=>b,":first-child"),C.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),tt(t,C),t.intersect=function(v){return j.polygon(t,m,v)},n}p(N0,"taggedRect");async function z0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*o,u=.2*l,f=l+c,{cssStyles:d}=t,g=X.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:f/2},...fr(-o/2-o/2*.1,f/2,o/2+o/2*.1,f/2,c,.8),{x:o/2+o/2*.1,y:-f/2},{x:-o/2-o/2*.1,y:-f/2}],x=-o/2+o/2*.1,b=-f/2-u*.4,_=[{x:x+o-h,y:(b+l)*1.4},{x:x+o,y:b+l-u},{x:x+o,y:(b+l)*.9},...fr(x+o,(b+l)*1.3,x+o-h,(b+l)*1.5,-l*.03,.5)],w=dt(y),C=g.path(w,m),v=dt(_),S=g.path(v,{...m,fillStyle:"solid"}),O=n.insert(()=>S,":first-child");return O.insert(()=>C,":first-child"),O.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),tt(t,O),t.intersect=function(I){return j.polygon(t,y,I)},n}p(z0,"taggedWaveEdgedRectangle");async function W0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+t.padding,t?.width||0),o=Math.max(a.height+t.padding,t?.height||0),l=-s/2,c=-o/2,h=n.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",s).attr("height",o),tt(t,h),t.intersect=function(u){return j.rect(t,u)},n}p(W0,"text");var hB=p((e,t,r,i,n,a)=>`M${e},${t}
179
+ `),n=bm(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(Cm,"preprocessMarkdown");function vm(e,t={}){const r=Cm(e,t),i=bt.lexer(r),n=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
180
+ `).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&n[a].push({content:f,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return p(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}p(vm,"markdownToLines");function km(e,{markdownAutoWrap:t}={}){const r=bt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(P.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(km,"markdownToHTML");function Sm(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Sm,"splitTextToChars");function Tm(e,t){const r=Sm(t.content);return zc(e,[],r,t.type)}p(Tm,"splitWordToFitWidth");function zc(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?zc(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(zc,"splitWordToFitWidthRecursion");function Mm(e,t){if(e.some(({content:r})=>r.includes(`
181
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ds(e,t)}p(Mm,"splitLineToFitWidth");function ds(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return ds(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=Tm(t,a);r.push([o]),l.content&&e.unshift(l)}return ds(e,t,r)}p(ds,"splitLineToFitWidthRecursion");function Ml(e,t){t&&e.attr("style",t)}p(Ml,"applyStyle");async function Am(e,t,r,i,n=!1,a=Zt()){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=_i(t.label)?await Ul(t.label.replace(Bi.lineBreakRegex,`
182
+ `),a):me(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),Ml(h,t.labelStyle),h.attr("class",`${c} ${i}`),Ml(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}p(Am,"addHtmlSpan");function Hs(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(Hs,"createTspan");function Lm(e,t,r){const i=e.append("text"),n=Hs(i,1,t);Us(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Lm,"computeWidthOfText");function ML(e,t,r){const i=e.append("text"),n=Hs(i,1,t);Us(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(ML,"computeDimensionOfText");function Bm(e,t,r,i=!1){const a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(f=>Lm(a,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:Mm(c,h);for(const f of u){const d=Hs(o,l,1.1);Us(d,f),l++}}if(i){const c=o.node().getBBox(),h=2;return s.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return o.node()}p(Bm,"createFormattedText");function Us(e,t){e.text(""),t.forEach((r,i)=>{const n=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?n.text(r.content):n.text(" "+r.content)})}p(Us,"updateTextContentAndStyles");async function Em(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await TL(o)?await zn(o,void 0,{class:"label-icon"}):`<i class='${me(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Em,"replaceIconSubstring");var gr=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(P.debug("XYZ createText",t,r,i,n,a,s,"addSvgBackground: ",l),a){const h=km(t,c),u=await Em(Yr(h),c),f=t.replace(/\\\\/g,"\\"),d={isNode:s,label:_i(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Am(e,d,o,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=vm(h.replace("<br>","<br/>"),c),f=Bm(o,e,u,t?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");pt(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");pt(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");pt(f).select("text").attr("style",g)}return f}},"createText");function Eo(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*s+n}}}function AL(e,t){return e[0]===t[0]&&e[1]===t[1]}function LL(e,t,r,i=1){const n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of s)Eo(c,o,n);const l=(function(c,h,u){const f=[];for(const b of c){const _=[...b];AL(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_<b.length-1;_++){const w=b[_],C=b[_+1];if(w[1]!==C[1]){const v=Math.min(w[1],C[1]);g.push({ymin:v,ymax:Math.max(w[1],C[1]),x:v===w[1]?w[0]:C[0],islope:(C[0]-w[0])/(C[1]-w[1])})}}if(g.sort(((b,_)=>b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax))),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let _=0;_<g.length&&!(g[_].ymin>y);_++)b=_;g.splice(0,b+1).forEach((_=>{m.push({s:y,edge:_})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const _=b+1;if(_>=m.length)break;const w=m[b].edge,C=m[_].edge;d.push([[Math.round(w.x),y],[Math.round(C.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(s,a,i);if(n){for(const c of s)Eo(c,o,-n);(function(c,h,u){const f=[];c.forEach((d=>f.push(...d))),Eo(f,h,u)})(l,o,-n)}return l}function Wn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),LL(e,n,i,a||1)}class Wc{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Wn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function js(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 BL extends Wc{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Wn(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)js([c,h])&&s.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class EL extends Wc{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class $L{constructor(t){this.helper=t}fillPolygons(t,r){const i=Wn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=n/4;for(const o of t){const l=js(o),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(o[0][0]+o[1][0])/2-n/4,d=Math.min(o[0][1],o[1][1]);for(let g=0;g<h;g++){const m=d+u+g*n,y=f-s+2*Math.random()*s,x=m-s+2*Math.random()*s,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class FL{constructor(t){this.helper=t}fillPolygons(t,r){const i=Wn(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,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((s=>{const o=js(s),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+n),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),a}}class DL{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Wn(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const s=js(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<o;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),n}}const oe={};class OL{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const RL=0,$o=1,Yu=2,na={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 Fo(e,t){return e.type===t}function qc(e){const t=[],r=(function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:RL,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:$o,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:Yu,text:""},o})(e);let i="BOD",n=0,a=r[n];for(;!Fo(a,Yu);){let s=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return qc("M0,0"+e);n++,s=na[a.text],i=a.text}else Fo(a,$o)?s=na[i]:(n++,s=na[a.text],i=a.text);if(!(n+s<r.length))throw new Error("Path data ended short");for(let l=n;l<n+s;l++){const c=r[l];if(!Fo(c,$o))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof na[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),n+=s,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function $m(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,n]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function Fm(e){const t=[];let r="",i=0,n=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-o),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-o),g=n+(n-l)):(d=i,g=n);const m=i+2*(d-i)/3,y=n+2*(g-n)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),o=d,l=g,i=u,n=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),o=u,l=f,i=d,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(Dm(i,n,y,x,u,f,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=c}return t}function Qi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Dm(e,t,r,i,n,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=Qi(e,t,-h),[r,i]=Qi(r,i,-h);const L=(e-r)/2,S=(t-i)/2;let E=L*L/(n*n)+S*S/(a*a);E>1&&(E=Math.sqrt(E),n*=E,a*=E);const A=n*n,D=a*a,F=A*D-A*S*S-D*L*L,U=A*S*S+D*L*L,W=(o===l?-1:1)*Math.sqrt(Math.abs(F/U));m=W*n*S/a+(e+r)/2,y=W*-a*L/n+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const L=g,S=r,E=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Dm(r=m+n*Math.cos(g),i=y+a*Math.sin(g),S,E,n,a,s,0,l,[g,L,m,y])}x=g-d;const b=Math.cos(d),_=Math.sin(d),w=Math.cos(g),C=Math.sin(g),v=Math.tan(x/4),T=4/3*n*v,O=4/3*a*v,I=[e,t],R=[e+T*_,t-O*b],B=[r+T*C,i-O*w],$=[r,i];if(R[0]=2*I[0]-R[0],R[1]=2*I[1]-R[1],c)return[R,B,$].concat(f);{f=[R,B,$].concat(f);const L=[];for(let S=0;S<f.length;S+=3){const E=Qi(f[S][0],f[S][1],h),A=Qi(f[S+1][0],f[S+1][1],h),D=Qi(f[S+2][0],f[S+2][1],h);L.push([E[0],E[1],A[0],A[1],D[0],D[1]])}return L}}const IL={randOffset:function(e,t){return lt(e,t)},randOffsetWithRange:function(e,t,r){return ps(e,t,r)},ellipse:function(e,t,r,i,n){const a=Rm(r,i,n);return Al(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return fr(e,t,r,i,n,!0)}};function Om(e,t,r,i,n){return{type:"path",ops:fr(e,t,r,i,n)}}function Ca(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...fr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...fr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Om(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function PL(e,t,r,i,n){return(function(a,s){return Ca(a,!0,s)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Gu(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=aa(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:aa(r[0],1.5*(1+.22*t.roughness),Zu(t));for(let a=1;a<r.length;a++){const s=r[a];if(s.length){const o=aa(s,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:aa(s,1.5*(1+.22*t.roughness),Zu(t));for(const c of o)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Rm(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let s=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return s+=lt(s*l,r),o+=lt(o*l,r),{increment:a,rx:s,ry:o}}function Al(e,t,r,i){const[n,a]=Ku(i.increment,e,t,i.rx,i.ry,1,i.increment*ps(.1,ps(.4,1,r),r),r);let s=gs(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=Ku(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=gs(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function Vu(e,t,r,i,n,a,s,o,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=lt(.01*u,l),f+=lt(.01*f,l);let d=n,g=a;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Qu(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=Qu(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return s&&(o?x.push(...fr(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...fr(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Xu(e,t){const r=Fm($m(qc(e))),i=[];let n=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...fr(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,f,d]=o;i.push(...NL(l,c,h,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...fr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Do(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+lt(n,t),i[0][1]+lt(n,t)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[i[s][0]+lt(n,t),i[s][1]+lt(n,t)]})}}return{type:"fillPath",ops:r}}function Jr(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!oe[n])switch(n){case"zigzag":oe[n]||(oe[n]=new BL(i));break;case"cross-hatch":oe[n]||(oe[n]=new EL(i));break;case"dots":oe[n]||(oe[n]=new $L(i));break;case"dashed":oe[n]||(oe[n]=new FL(i));break;case"zigzag-line":oe[n]||(oe[n]=new DL(i));break;default:n="hachure",oe[n]||(oe[n]=new Wc(i))}return oe[n]})(t,IL).fillPolygons(e,t)}function Zu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Im(e){return e.randomizer||(e.randomizer=new OL(e.seed||0)),e.randomizer.next()}function ps(e,t,r,i=1){return r.roughness*i*(Im(r)*(t-e)+e)}function lt(e,t,r=1){return ps(-e,e,t,r)}function fr(e,t,r,i,n,a=!1){const s=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=Ll(e,t,r,i,n,!0,!1);if(s)return o;const l=Ll(e,t,r,i,n,!0,!0);return o.concat(l)}function Ll(e,t,r,i,n,a,s){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,f=.2+.2*Im(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=lt(d,n,c),g=lt(g,n,c);const m=[],y=()=>lt(u,n,c),x=()=>lt(h,n,c),b=n.preserveVertices;return s?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:lt(h,n,c)),t+(b?0:lt(h,n,c))]}),s?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function aa(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+lt(t,r),e[0][1]+lt(t,r)]),i.push([e[0][0]+lt(t,r),e[0][1]+lt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+lt(t,r),e[n][1]+lt(t,r)]),n===e.length-1&&i.push([e[n][0]+lt(t,r),e[n][1]+lt(t,r)]);return gs(i,null,r)}function gs(e,t,r){const i=e.length,n=[];if(i>3){const a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*e[o+1][0]-s*e[o-1][0])/6,l[1]+(s*e[o+1][1]-s*e[o-1][1])/6],a[2]=[e[o+1][0]+(s*e[o][0]-s*e[o+2][0])/6,e[o+1][1]+(s*e[o][1]-s*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...Ll(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Ku(e,t,r,i,n,a,s,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=lt(.5,o)-Math.PI/2;c.push([lt(a,o)+t+.9*i*Math.cos(h-e),lt(a,o)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[lt(a,o)+t+i*Math.cos(f),lt(a,o)+r+n*Math.sin(f)];l.push(d),c.push(d)}c.push([lt(a,o)+t+i*Math.cos(h+2*Math.PI+.5*s),lt(a,o)+r+n*Math.sin(h+2*Math.PI+.5*s)]),c.push([lt(a,o)+t+.98*i*Math.cos(h+s),lt(a,o)+r+.98*n*Math.sin(h+s)]),c.push([lt(a,o)+t+.9*i*Math.cos(h+.5*s),lt(a,o)+r+.9*n*Math.sin(h+.5*s)])}return[c,l]}function Qu(e,t,r,i,n,a,s,o,l){const c=a+lt(.1,l),h=[];h.push([lt(o,l)+t+.9*i*Math.cos(c-e),lt(o,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=s;u+=e)h.push([lt(o,l)+t+i*Math.cos(u),lt(o,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),gs(h,null,l)}function NL(e,t,r,i,n,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,f=o.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:lt(c[0],o)),s[1]+(f?0:lt(c[0],o))]}),h=f?[n,a]:[n+lt(c[d],o),a+lt(c[d],o)],l.push({op:"bcurveTo",data:[e+lt(c[d],o),t+lt(c[d],o),r+lt(c[d],o),i+lt(c[d],o),h[0],h[1]]});return l}function Ji(e){return[...e]}function Ju(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(Ji(e[0]),Ji(e[1]),Ji(e[2]),Ji(e[2]));else{const n=[];n.push(e[0],e[0]);for(let o=1;o<e.length;o++)n.push(e[o]),o===e.length-1&&n.push(e[o]);const a=[],s=1-t;i.push(Ji(n[0]));for(let o=1;o+2<n.length;o++){const l=n[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*n[o+1][0]-s*n[o-1][0])/6,l[1]+(s*n[o+1][1]-s*n[o-1][1])/6],a[2]=[n[o+1][0]+(s*n[o][0]-s*n[o+2][0])/6,n[o+1][1]+(s*n[o][1]-s*n[o+2][1])/6],a[3]=[n[o+1][0],n[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function va(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function zL(e,t,r){const i=va(t,r);if(i===0)return va(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),va(e,Cr(t,r,n))}function Cr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Bl(e,t,r,i){const n=i||[];if((function(o,l){const c=o[l+0],h=o[l+1],u=o[l+2],f=o[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-c[0];m*=m;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const o=e[t+0];n.length?(a=n[n.length-1],s=o,Math.sqrt(va(a,s))>1&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=Cr(l,c,.5),d=Cr(c,h,.5),g=Cr(h,u,.5),m=Cr(f,d,.5),y=Cr(d,g,.5),x=Cr(m,y,.5);Bl([l,f,m,x],0,r,n),Bl([x,y,g,u],0,r,n)}var a,s;return n}function WL(e,t){return ms(e,0,e.length,t)}function ms(e,t,r,i,n){const a=n||[],s=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=zL(e[h],s,o);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(ms(e,t,c+1,i,a),ms(e,c,r,i,a)):(a.length||a.push(s),a.push(o)),a}function Oo(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)Bl(e,3*a,t,i);return r&&r>0?ms(i,0,i.length,r):i}const ue="none";class ys{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,n,a){const s=this._o(a);return this._d("line",[Om(t,r,i,n,s)],s)}rectangle(t,r,i,n,a){const s=this._o(a),o=[],l=PL(t,r,i,n,s);if(s.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];s.fillStyle==="solid"?o.push(Do([c],s)):o.push(Jr([c],s))}return s.stroke!==ue&&o.push(l),this._d("rectangle",o,s)}ellipse(t,r,i,n,a){const s=this._o(a),o=[],l=Rm(i,n,s),c=Al(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Al(t,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(Jr([c.estimatedPoints],s));return s.stroke!==ue&&o.push(c.opset),this._d("ellipse",o,s)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ca(t,!1,i)],i)}arc(t,r,i,n,a,s,o=!1,l){const c=this._o(l),h=[],u=Vu(t,r,i,n,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=Vu(t,r,i,n,a,s,!0,!1,f);d.type="fillPath",h.push(d)}else h.push((function(f,d,g,m,y,x,b){const _=f,w=d;let C=Math.abs(g/2),v=Math.abs(m/2);C+=lt(.01*C,b),v+=lt(.01*v,b);let T=y,O=x;for(;T<0;)T+=2*Math.PI,O+=2*Math.PI;O-T>2*Math.PI&&(T=0,O=2*Math.PI);const I=(O-T)/b.curveStepCount,R=[];for(let B=T;B<=O;B+=I)R.push([_+C*Math.cos(B),w+v*Math.sin(B)]);return R.push([_+C*Math.cos(O),w+v*Math.sin(O)]),R.push([_,w]),Jr([R],b)})(t,r,i,n,a,s,c));return c.stroke!==ue&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=Gu(t,i);if(i.fill&&i.fill!==ue)if(i.fillStyle==="solid"){const s=Gu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...Oo(Ju([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):s.push(...Oo(Ju(c),10,(1+i.roughness)/2))}s.length&&n.push(Jr([s],i))}return i.stroke!==ue&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=Ca(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Do([t],i)):n.push(Jr([t],i))),i.stroke!==ue&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ue,s=i.stroke!==ue,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,f){const d=Fm($m(qc(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Oo(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:C,data:v}of d)switch(C){case"M":_(),y=[v[0],v[1]],m.push(y);break;case"L":b(),m.push([v[0],v[1]]);break;case"C":if(!x.length){const T=m.length?m[m.length-1]:y;x.push([T[0],T[1]])}x.push([v[0],v[1]]),x.push([v[2],v[3]]),x.push([v[4],v[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!f)return g;const w=[];for(const C of g){const v=WL(C,f);v.length&&w.push(v)}return w})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=Xu(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Xu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Do(l,i));else n.push(Jr(l,i));return s&&(o?l.forEach((h=>{n.push(Ca(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ue};break;case"fillPath":s={d:this.opsToPath(a),stroke:ue,strokeWidth:0,fill:i.fill||ue};break;case"fillSketch":s=this.fillSketch(a,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ue,strokeWidth:i,fill:ue}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class qL{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,a,o),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const s=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s),s}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s),s}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s),s}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,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 sa="http://www.w3.org/2000/svg";class HL{constructor(t,r){this.svg=t,this.gen=new ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(sa,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(sa,"path"),l.setAttribute("d",this.opsToPath(o,s)),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=n.createElementNS(sa,"path"),l.setAttribute("d",this.opsToPath(o,s)),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(n,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(sa,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s)}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s)}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,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 X={canvas:(e,t)=>new qL(e,t),svg:(e,t)=>new HL(e,t),generator:e=>new ys(e),newSeed:()=>ys.newSeed()},ot=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||It(xt()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",Qt(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=await gr(s,me(Yr(o),xt()),{useHtmlLabels:n,width:t.width||xt().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],f=pt(l),d=u.getElementsByTagName("img");if(d){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[w=Af.fontSize]=zs(b),C=w*_+"px";m.style.minWidth=C,m.style.maxWidth=C}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),Ro=p(async(e,t,r)=>{const i=r.useHtmlLabels||It(xt()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await gr(n,me(Yr(t),xt()),{useHtmlLabels:i,width:r.width||xt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(It(xt()?.flowchart?.htmlLabels)){const l=a.children[0],c=pt(a);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),et=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),st=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function dt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(dt,"createPathFromPoints");function dr(e,t,r,i,n,a){const s=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=f+n*Math.sin(u*(m-e));s.push({x:m,y})}return s}p(dr,"generateFullSineWavePoints");function An(e,t,r,i,n,a){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-d,y:-g})}return s}p(An,"generateCirclePoints");var UL=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,c;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,c=o):(n<0&&(s=-s),l=s,c=n===0?0:s*a/n),{x:r+l,y:i+c}},"intersectRect"),Di=UL;function Pm(e,t){t&&e.attr("style",t)}p(Pm,"applyStyle");async function Nm(e){const t=pt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=xt();let n=e.label;e.label&&_i(e.label)&&(n=await Ul(e.label.replace(Bi.lineBreakRegex,`
183
+ `),i));const s='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(me(s,i)),Pm(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(Nm,"addHtmlLabel");var jL=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),It(xt().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),P.info("vertexText"+n);const a={isNode:i,label:Yr(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Nm(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof n=="string"?s=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?s=n:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Ar=jL,mr=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),zm=p(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=K(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=It(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await gr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(It(r.flowchart.htmlLabels)){const T=g.children[0],O=pt(g);m=T.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;P.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const T=X.svg(u),O=Z(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),I=T.path(mr(b,_,y,x,0),O);w=u.insert(()=>(P.debug("Rough node insert CXC",I),I),":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",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:C}=_c(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+C})`),o){const T=d.select("span");T&&T.attr("style",o)}const v=w.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return Di(t,T)},{cluster:u,labelBBox:m}},"rect"),YL=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return Di(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),GL=p(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).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=u.node().appendChild(await Ar(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(It(r.flowchart.htmlLabels)){const I=d.children[0],R=pt(d);g=I.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,_=t.height+m-g.height-6,w=t.x-x/2,C=t.y-b/2;t.width=x;const v=t.y-t.height/2-y+g.height+2;let T;if(t.look==="handDrawn"){const I=t.cssClasses.includes("statediagram-cluster-alt"),R=X.svg(c),B=t.rx||t.ry?R.path(mr(w,C,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):R.rectangle(w,C,x,b,{seed:n});T=c.insert(()=>B,":first-child");const $=R.rectangle(w,v,x,_,{fill:I?a:s,fillStyle:I?"hachure":"solid",stroke:l,seed:n});T=c.insert(()=>B,":first-child"),f=c.insert(()=>$)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",w).attr("y",C).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",w).attr("y",v).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${C+1-(It(r.flowchart.htmlLabels)?0:3)})`);const O=T.node().getBBox();return t.height=O.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(I){return Di(t,I)},{cluster:c,labelBBox:g}},"roundedWithTitle"),VL=p(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=K(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=It(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await gr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(It(r.flowchart.htmlLabels)){const T=g.children[0],O=pt(g);m=T.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;P.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const T=X.svg(u),O=Z(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),I=T.path(mr(b,_,y,x,t.rx),O);w=u.insert(()=>(P.debug("Rough node insert CXC",I),I),":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",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:C}=_c(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+C})`),o){const T=d.select("span");T&&T.attr("style",o)}const v=w.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return Di(t,T)},{cluster:u,labelBBox:m}},"kanbanSection"),XL=p((e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.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 y=X.svg(s).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});d=s.insert(()=>y,":first-child")}else d=o.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Di(t,m)},{cluster:s,labelBBox:{}}},"divider"),ZL=zm,KL={rect:zm,squareRect:ZL,roundedWithTitle:GL,noteGroup:YL,divider:XL,kanbanSection:VL},Wm=new Map,QL=p(async(e,t)=>{const r=t.shape||"rect",i=await KL[r](e,t);return Wm.set(t.id,i),i},"insertCluster"),M3=p(()=>{Wm=new Map},"clear");function qm(e,t){return e.intersect(t)}p(qm,"intersectNode");var JL=qm;function Hm(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),c=Math.abs(t*r*s/l);i.x<n&&(c=-c);var h=Math.abs(t*r*o/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(Hm,"intersectEllipse");var Um=Hm;function jm(e,t,r){return Um(e,t,t,r)}p(jm,"intersectCircle");var tB=jm;function Ym(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s,c=1e-6;if(o!==0&&l!==0&&El(o,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,g=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(g)<c&&El(d,g))return;const m=n*u-h*a;if(m===0)return;const y=Math.abs(m/2);let x=a*f-u*s;const b=x<0?(x-y)/m:(x+y)/m;x=h*s-n*f;const _=x<0?(x-y)/m:(x+y)/m;return{x:b,y:_}}}p(Ym,"intersectLine");function El(e,t){return e*t>0}p(El,"sameSign");var eB=Ym;function Gm(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=i-e.width/2-s,c=n-e.height/2-o;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=eB(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}p(Gm,"intersectPolygon");var rB=Gm,j={node:JL,circle:tB,ellipse:Um,polygon:rB,rect:Di};function Vm(e,t){const{labelStyles:r}=K(t);t.labelStyle=r;const i=st(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=1,{cssStyles:o}=t,l=X.svg(a),c=Z(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,s*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Qt(o)),et(t,u),t.intersect=function(f){return P.info("Circle intersect",t,s,f),j.circle(t,s,f)},a}p(Vm,"anchor");function $l(e,t,r,i,n,a,s){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/n,g=f/a,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),_=Math.atan2((t-b)/a,(e-x)/n);let C=Math.atan2((i-b)/a,(r-x)/n)-_;s&&C<0&&(C+=2*Math.PI),!s&&C>0&&(C-=2*Math.PI);const v=[];for(let T=0;T<20;T++){const O=T/19,I=_+O*C,R=x+n*Math.cos(I),B=b+a*Math.sin(I);v.push({x:R,y:B})}return v}p($l,"generateArcPoints");async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=t,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...$l(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...$l(s/2,o/2,s/2,-o/2,c,l,!0)],f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=dt(u),m=f.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),et(t,y),t.intersect=function(x){return j.polygon(t,u,x)},n}p(Xm,"bowTieRect");function yr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(yr,"insertPolygonShape");async function Zm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.height+t.padding,o=12,l=a.width+t.padding+o,c=0,h=l,u=-s,f=0,d=[{x:c+o,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+o},{x:c+o,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=X.svg(n),x=Z(t,{}),b=dt(d),_=y.path(b,x);g=n.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=yr(n,l,s,d);return i&&g.attr("style",i),et(t,g),t.intersect=function(y){return j.polygon(t,d,y)},n}p(Zm,"card");function Km(e,t){const{nodeStyles:r}=K(t);t.label="";const i=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=X.svg(i),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=dt(s),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return j.polygon(t,s,f)},i}p(Km,"choice");async function Hc(e,t,r){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:o}=await ot(e,t,st(t)),l=r?.padding??o,c=s.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=X.svg(a),d=Z(t,{}),g=f.circle(0,0,c*2,d);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Qt(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return et(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return j.circle(f,g,d)},t.intersect=function(f){return P.info("Circle intersect",t,c,f),j.circle(t,c,f)},a}p(Hc,"circle");function Qm(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
184
+ M ${n.x},${n.y} L ${s.x},${s.y}`}p(Qm,"createLine");function Jm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=X.svg(n),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=Qm(a),u=o.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),et(t,f),t.intersect=function(d){return P.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},n}p(Jm,"crossedCircle");function Ge(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-d,y:-g})}return s}p(Ge,"generateCirclePoints");async function t0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ge(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Ge(o/2+c*2,-c,c,20,-180,-270),...Ge(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Ge(o/2,l/2,c,20,0,90)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Ge(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Ge(o/2+o*.1,-c,c,20,-180,-270),...Ge(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Ge(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],d=X.svg(n),g=Z(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=dt(u).replace("Z",""),x=d.path(y,g),b=dt(f),_=d.path(b,{...g}),w=n.insert("g",":first-child");return w.insert(()=>_,":first-child").attr("stroke-opacity",0),w.insert(()=>x,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),et(t,w),t.intersect=function(C){return j.polygon(t,f,C)},n}p(t0,"curlyBraceLeft");function Ve(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:d,y:g})}return s}p(Ve,"generateCirclePoints");async function e0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ve(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Ve(o/2+c*2,-c,c,20,-180,-270),...Ve(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Ve(o/2,l/2,c,20,0,90)],f=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...Ve(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Ve(o/2+c*2,-c,c,20,-180,-270),...Ve(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Ve(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],d=X.svg(n),g=Z(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=dt(u).replace("Z",""),x=d.path(y,g),b=dt(f),_=d.path(b,{...g}),w=n.insert("g",":first-child");return w.insert(()=>_,":first-child").attr("stroke-opacity",0),w.insert(()=>x,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),et(t,w),t.intersect=function(C){return j.polygon(t,f,C)},n}p(e0,"curlyBraceRight");function qt(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-d,y:-g})}return s}p(qt,"generateCirclePoints");async function r0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...qt(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...qt(o/2+c*2,-c,c,20,-180,-270),...qt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...qt(o/2,l/2,c,20,0,90)],f=[...qt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...qt(-o/2-c/2,-c,c,20,0,90),...qt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...qt(-o/2+c+c/2,l/2,c,30,-180,-270)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...qt(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...qt(o/2+c*2,-c,c,20,-180,-270),...qt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...qt(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...qt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...qt(-o/2-c/2,-c,c,20,0,90),...qt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...qt(-o/2+c+c/2,l/2,c,30,-180,-270)],g=X.svg(n),m=Z(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=dt(u).replace("Z",""),b=g.path(x,m),w=dt(f).replace("Z",""),C=g.path(w,m),v=dt(d),T=g.path(v,{...m}),O=n.insert("g",":first-child");return O.insert(()=>T,":first-child").attr("stroke-opacity",0),O.insert(()=>b,":first-child"),O.insert(()=>C,":first-child"),O.attr("class","text"),h&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),et(t,O),t.intersect=function(I){return j.polygon(t,d,I)},n}p(r0,"curlyBraces");async function i0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=80,o=20,l=Math.max(s,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...An(-y,-m/2,h,50,270,90)],_=dt(b),w=f.path(_,d),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),C.attr("transform",`translate(${-l/2}, ${-c/2})`),et(t,C),t.intersect=function(v){return j.polygon(t,b,v)},n}p(i0,"curvedTrapezoid");var iB=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),nB=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),aB=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function n0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+t.padding,t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=X.svg(n),g=nB(0,0,o,h,l,c),m=aB(0,c,o,h,l,c),y=d.path(g,Z(t,{})),x=d.path(m,Z(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=iB(0,0,o,h,l,c);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",Qt(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),et(t,u),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(d){const g=j.rect(t,d),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(n0,"cylinder");async function a0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),et(t,x),t.intersect=function(b){return j.rect(t,b)},n}p(a0,"dividedRectangle");async function s0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s}=await ot(e,t,st(t)),l=a.width/2+s+5,c=a.width/2+s;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=X.svg(n),d=Z(t,{roughness:.2,strokeWidth:2.5}),g=Z(t,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,l*2,d),y=f.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",Qt(t.cssClasses)).attr("style",Qt(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return et(t,h),t.intersect=function(f){return P.info("DoubleCircle intersect",t,l,f),j.circle(t,l,f)},n}p(s0,"doublecircle");function o0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=K(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=X.svg(a),{nodeBorder:c}=r,h=Z(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),et(t,f),t.intersect=function(d){return P.info("filledCircle intersect",t,{radius:s,point:d}),j.circle(t,s,d)},a}p(o0,"filledCircle");async function l0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=dt(h),m=f.path(g,d),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=o,t.height=l,et(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return P.info("Triangle intersect",t,h,x),j.polygon(t,h,x)},n}p(l0,"flippedTriangle");function c0(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=K(t);t.label="";const s=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,f=X.svg(s),d=Z(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),et(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return j.rect(t,x)},s}p(c0,"forkJoin");async function h0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:s,bbox:o}=await ot(e,t,st(t)),l=Math.max(n,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,o.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=X.svg(s),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...An(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=dt(g),y=f.path(m,d),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),et(t,x),t.intersect=function(b){return P.info("Pill intersect",t,{radius:h,point:b}),j.polygon(t,g,b)},s}p(h0,"halfRoundedRectangle");async function u0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.height+(t.padding??0),o=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=X.svg(n),h=Z(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=o/2;const f=u/6;u=u+f;const d=s/2,g=d/2,m=u-g,y=[{x:-m,y:-d},{x:0,y:-d},{x:m,y:-d},{x:u,y:0},{x:m,y:d},{x:0,y:d},{x:-m,y:d},{x:-u,y:0}],x=dt(y),b=c.path(x,h),_=n.insert(()=>b,":first-child");return _.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),t.width=o,t.height=s,et(t,_),t.intersect=function(w){return j.polygon(t,y,w)},n}p(u0,"hexagon");async function f0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await ot(e,t,st(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=X.svg(n),c=Z(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=dt(h),f=l.path(u,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-s/2})`),et(t,d),t.intersect=function(g){return P.info("Pill intersect",t,{points:h}),j.polygon(t,h,g)},n}p(f0,"hourglass");async function d0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=K(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await ot(e,t,"icon-shape default"),f=t.pos==="t",d=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=Ei(t),x=-g/2,b=-d/2,_=t.label?8:0,w=X.svg(c),C=Z(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=w.rectangle(x,b,g,d,C),T=Math.max(g,h.width),O=d+h.height+_,I=w.rectangle(-T/2,-O/2,T,O,{...C,fill:"transparent",stroke:"none"}),R=c.insert(()=>v,":first-child"),B=c.insert(()=>I);if(t.icon){const $=c.append("g");$.html(`<g>${await zn(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=$.node().getBBox(),S=L.width,E=L.height,A=L.x,D=L.y;$.attr("transform",`translate(${-S/2-A},${f?h.height/2+_/2-E/2-D:-h.height/2-_/2-E/2-D})`),$.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),R.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),et(t,B),t.intersect=function($){if(P.info("iconSquare intersect",t,$),!t.label)return j.rect(t,$);const L=t.x??0,S=t.y??0,E=t.height??0;let A=[];return f?A=[{x:L-h.width/2,y:S-E/2},{x:L+h.width/2,y:S-E/2},{x:L+h.width/2,y:S-E/2+h.height+_},{x:L+g/2,y:S-E/2+h.height+_},{x:L+g/2,y:S+E/2},{x:L-g/2,y:S+E/2},{x:L-g/2,y:S-E/2+h.height+_},{x:L-h.width/2,y:S-E/2+h.height+_}]:A=[{x:L-g/2,y:S-E/2},{x:L+g/2,y:S-E/2},{x:L+g/2,y:S-E/2+d},{x:L+h.width/2,y:S-E/2+d},{x:L+h.width/2/2,y:S+E/2},{x:L-h.width/2,y:S+E/2},{x:L-h.width/2,y:S-E/2+d},{x:L-g/2,y:S-E/2+d}],j.polygon(t,A,$)},c}p(d0,"icon");async function p0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=K(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await ot(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Ei(t),b=X.svg(c),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=x.get("fill");_.stroke=w??y;const C=c.append("g");t.icon&&C.html(`<g>${await zn(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=C.node().getBBox(),T=v.width,O=v.height,I=v.x,R=v.y,B=Math.max(T,O)*Math.SQRT2+f*2,$=b.circle(0,0,B,_),L=Math.max(B,h.width),S=B+h.height+d,E=b.rectangle(-L/2,-S/2,L,S,{..._,fill:"transparent",stroke:"none"}),A=c.insert(()=>$,":first-child"),D=c.insert(()=>E);return C.attr("transform",`translate(${-T/2-I},${g?h.height/2+d/2-O/2-R:-h.height/2-d/2-O/2-R})`),C.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-S/2:S/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),et(t,D),t.intersect=function(F){return P.info("iconSquare intersect",t,F),j.rect(t,F)},c}p(p0,"iconCircle");async function g0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=K(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ot(e,t,"icon-shape default"),d=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Ei(t),_=-m/2,w=-g/2,C=t.label?8:0,v=X.svg(c),T=Z(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const O=b.get("fill");T.stroke=O??x;const I=v.path(mr(_,w,m,g,5),T),R=Math.max(m,h.width),B=g+h.height+C,$=v.rectangle(-R/2,-B/2,R,B,{...T,fill:"transparent",stroke:"none"}),L=c.insert(()=>I,":first-child").attr("class","icon-shape2"),S=c.insert(()=>$);if(t.icon){const E=c.append("g");E.html(`<g>${await zn(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const A=E.node().getBBox(),D=A.width,F=A.height,U=A.x,W=A.y;E.attr("transform",`translate(${-D/2-U},${d?h.height/2+C/2-F/2-W:-h.height/2-C/2-F/2-W})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-B/2:B/2-h.height})`),L.attr("transform",`translate(0,${d?h.height/2+C/2:-h.height/2-C/2})`),et(t,S),t.intersect=function(E){if(P.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const A=t.x??0,D=t.y??0,F=t.height??0;let U=[];return d?U=[{x:A-h.width/2,y:D-F/2},{x:A+h.width/2,y:D-F/2},{x:A+h.width/2,y:D-F/2+h.height+C},{x:A+m/2,y:D-F/2+h.height+C},{x:A+m/2,y:D+F/2},{x:A-m/2,y:D+F/2},{x:A-m/2,y:D-F/2+h.height+C},{x:A-h.width/2,y:D-F/2+h.height+C}]:U=[{x:A-m/2,y:D-F/2},{x:A+m/2,y:D-F/2},{x:A+m/2,y:D-F/2+g},{x:A+h.width/2,y:D-F/2+g},{x:A+h.width/2/2,y:D+F/2},{x:A-h.width/2,y:D+F/2},{x:A-h.width/2,y:D-F/2+g},{x:A-m/2,y:D-F/2+g}],j.polygon(t,U,E)},c}p(g0,"iconRounded");async function m0(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=K(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ot(e,t,"icon-shape default"),d=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Ei(t),_=-m/2,w=-g/2,C=t.label?8:0,v=X.svg(c),T=Z(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const O=b.get("fill");T.stroke=O??x;const I=v.path(mr(_,w,m,g,.1),T),R=Math.max(m,h.width),B=g+h.height+C,$=v.rectangle(-R/2,-B/2,R,B,{...T,fill:"transparent",stroke:"none"}),L=c.insert(()=>I,":first-child"),S=c.insert(()=>$);if(t.icon){const E=c.append("g");E.html(`<g>${await zn(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const A=E.node().getBBox(),D=A.width,F=A.height,U=A.x,W=A.y;E.attr("transform",`translate(${-D/2-U},${d?h.height/2+C/2-F/2-W:-h.height/2-C/2-F/2-W})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-B/2:B/2-h.height})`),L.attr("transform",`translate(0,${d?h.height/2+C/2:-h.height/2-C/2})`),et(t,S),t.intersect=function(E){if(P.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const A=t.x??0,D=t.y??0,F=t.height??0;let U=[];return d?U=[{x:A-h.width/2,y:D-F/2},{x:A+h.width/2,y:D-F/2},{x:A+h.width/2,y:D-F/2+h.height+C},{x:A+m/2,y:D-F/2+h.height+C},{x:A+m/2,y:D+F/2},{x:A-m/2,y:D+F/2},{x:A-m/2,y:D-F/2+h.height+C},{x:A-h.width/2,y:D-F/2+h.height+C}]:U=[{x:A-m/2,y:D-F/2},{x:A+m/2,y:D-F/2},{x:A+m/2,y:D-F/2+g},{x:A+h.width/2,y:D-F/2+g},{x:A+h.width/2/2,y:D+F/2},{x:A-h.width/2,y:D+F/2},{x:A-h.width/2,y:D-F/2+g},{x:A-m/2,y:D-F/2+g}],j.polygon(t,U,E)},c}p(m0,"iconSquare");async function y0(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:s}=K(t);t.labelStyle=s;const o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?o??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,o??0);const{shapeSvg:u,bbox:f,label:d}=await ot(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=X.svg(u),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=b.rectangle(m,y,c,h,_),C=Math.max(c,f.width),v=h+f.height+x,T=b.rectangle(-C/2,-v/2,C,v,{..._,fill:"none",stroke:"none"}),O=u.insert(()=>w,":first-child"),I=u.insert(()=>T);if(t.img){const R=u.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${g?v/2-h:-v/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),O.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),et(t,I),t.intersect=function(R){if(P.info("iconSquare intersect",t,R),!t.label)return j.rect(t,R);const B=t.x??0,$=t.y??0,L=t.height??0;let S=[];return g?S=[{x:B-f.width/2,y:$-L/2},{x:B+f.width/2,y:$-L/2},{x:B+f.width/2,y:$-L/2+f.height+x},{x:B+c/2,y:$-L/2+f.height+x},{x:B+c/2,y:$+L/2},{x:B-c/2,y:$+L/2},{x:B-c/2,y:$-L/2+f.height+x},{x:B-f.width/2,y:$-L/2+f.height+x}]:S=[{x:B-c/2,y:$-L/2},{x:B+c/2,y:$-L/2},{x:B+c/2,y:$-L/2+h},{x:B+f.width/2,y:$-L/2+h},{x:B+f.width/2/2,y:$+L/2},{x:B-f.width/2,y:$+L/2},{x:B-f.width/2,y:$-L/2+h},{x:B-c/2,y:$-L/2+h}],j.polygon(t,S,R)},u}p(y0,"imageSquare");async function x0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=Z(t,{}),d=dt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=yr(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,et(t,c),t.intersect=function(u){return j.polygon(t,l,u)},n}p(x0,"inv_trapezoid");async function Ys(e,t,r){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i;const{shapeSvg:a,bbox:s}=await ot(e,t,st(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),c=-o/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=X.svg(a),y=Z(t,{}),x=f||d?m.path(mr(c,h,o,l,f||0),y):m.rectangle(c,h,o,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Qt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Qt(f)).attr("ry",Qt(d)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return et(t,u),t.calcIntersect=function(m,y){return j.rect(m,y)},t.intersect=function(m){return j.rect(t,m)},a}p(Ys,"drawRect");async function b0(e,t){const{shapeSvg:r,bbox:i,label:n}=await ot(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),et(t,a),t.intersect=function(l){return j.rect(t,l)},r}p(b0,"labelRect");async function _0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=Z(t,{}),d=dt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=yr(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,et(t,c),t.intersect=function(u){return j.polygon(t,l,u)},n}p(_0,"lean_left");async function w0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=Z(t,{}),d=dt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=yr(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,et(t,c),t.intersect=function(u){return j.polygon(t,l,u)},n}p(w0,"lean_right");function C0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=X.svg(n),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=dt(c),d=h.path(f,u),g=n.insert(()=>d,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),et(t,g),t.intersect=function(m){return P.info("lightningBolt intersect",t,m),j.polygon(t,c,m)},n}p(C0,"lightningBolt");var sB=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oB=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lB=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function v0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0),t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=oB(0,0,o,h,l,c,u),y=lB(0,c,o,h,l,c),x=Z(t,{}),b=g.path(m,x),_=g.path(y,x);n.insert(()=>_,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=sB(0,0,o,h,l,c,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Qt(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),et(t,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=j.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(v0,"linedCylinder");async function k0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...dr(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),et(t,y),t.intersect=function(x){return j.polygon(t,g,x)},n}p(k0,"linedWaveEdgedRect");async function S0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=dt(m),b=d.path(x,g),_=dt(y),w=d.path(_,{...g,fill:"none"}),C=n.insert(()=>w,":first-child");return C.insert(()=>b,":first-child"),C.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),et(t,C),t.intersect=function(v){return j.polygon(t,m,v)},n}p(S0,"multiRect");async function T0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-o/2,f=-h/2,d=5,{cssStyles:g}=t,m=dr(u-d,f+h+d,u+o-d,f+h+d,c,.8),y=m?.[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+o-d,y:y.y-d},{x:u+o,y:y.y-d},{x:u+o,y:y.y-2*d},{x:u+o+d,y:y.y-2*d},{x:u+o+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+o-d,y:f+d},{x:u+o-d,y:y.y-d},{x:u+o,y:y.y-d},{x:u+o,y:f},{x:u,y:f}],_=X.svg(n),w=Z(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=dt(x),v=_.path(C,w),T=dt(b),O=_.path(T,w),I=n.insert(()=>v,":first-child");return I.insert(()=>O),I.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)+d-c/2-(a.y-(a.top??0))})`),et(t,I),t.intersect=function(R){return j.polygon(t,x,R)},n}p(T0,"multiWaveEdgedRectangle");async function M0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i,t.useHtmlLabels||Zt().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await ot(e,t,st(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,f=-h/2,{cssStyles:d}=t,g=X.svg(s),m=Z(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,c,h,m),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),et(t,x),t.intersect=function(b){return j.rect(t,b)},s}p(M0,"note");var cB=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 A0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.width+t.padding,o=a.height+t.padding,l=s+o,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=X.svg(n),g=Z(t,{}),m=cB(0,0,l),y=d.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=yr(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),et(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=j.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},n}p(A0,"question");async function L0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,g=X.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=dt(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),et(t,b),t.intersect=function(_){return j.polygon(t,f,_)},n}p(L0,"rect_left_inv_arrow");async function B0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=o.node().appendChild(await Ar(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(It(xt()?.flowchart?.htmlLabels)){const O=h.children[0],I=pt(h);u=O.getBoundingClientRect(),I.attr("width",u.width),I.attr("height",u.height)}P.info("Text 2",l);const f=l||[],d=h.getBBox(),g=o.node().appendChild(await Ar(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=pt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;pt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),pt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),_=u.height+(t.padding||0),w=-u.width/2-x,C=-u.height/2-x;let v,T;if(t.look==="handDrawn"){const O=X.svg(a),I=Z(t,{}),R=O.path(mr(w,C,b,_,t.rx||0),I),B=O.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,I);T=a.insert(()=>(P.debug("Rough node insert CXC",R),B),":first-child"),v=a.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child")}else v=s.insert("rect",":first-child"),T=s.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return et(t,v),t.intersect=function(O){return j.rect(t,O)},a}p(B0,"rectWithTitle");function ln(e,t,r,i,n,a,s){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/n,g=f/a,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),_=Math.atan2((t-b)/a,(e-x)/n);let C=Math.atan2((i-b)/a,(r-x)/n)-_;s&&C<0&&(C+=2*Math.PI),!s&&C>0&&(C-=2*Math.PI);const v=[];for(let T=0;T<20;T++){const O=T/19,I=_+O*C,R=x+n*Math.cos(I),B=b+a*Math.sin(I);v.push({x:R,y:B})}return v}p(ln,"generateArcPoints");async function E0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=t?.padding??0,o=t?.padding??0,l=(t?.width?t?.width:a.width)+s*2,c=(t?.height?t?.height:a.height)+o*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...ln(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...ln(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...ln(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...ln(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=dt(m),x=d.path(y,g),b=n.insert(()=>x,":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),et(t,b),t.intersect=function(_){return j.polygon(t,m,_)},n}p(E0,"roundedRect");async function $0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Qt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),et(t,x),t.intersect=function(b){return j.rect(t,b)},n}p($0,"shadedProcess");async function F0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=t,f=X.svg(n),d=Z(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],m=dt(g),y=f.path(m,d),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),et(t,x),t.intersect=function(b){return j.polygon(t,g,b)},n}p(F0,"slopedRect");async function D0(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Ys(e,t,r)}p(D0,"squareRect");async function O0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.height+t.padding,o=a.width+s/4+t.padding,l=s/2,{cssStyles:c}=t,h=X.svg(n),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...An(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...An(o/2-l,0,l,50,270,450)],d=dt(f),g=h.path(d,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),et(t,m),t.intersect=function(y){return j.polygon(t,f,y)},n}p(O0,"stadium");async function R0(e,t){return Ys(e,t,{rx:5,ry:5})}p(R0,"state");function I0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=X.svg(c),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),d=o??l,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),et(t,m),t.intersect=function(y){return j.circle(t,7,y)},c}p(I0,"stateEnd");function P0(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const o=X.svg(n).circle(0,0,14,kS(i));a=n.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return et(t,a),t.intersect=function(s){return j.circle(t,7,s)},n}p(P0,"stateStart");async function N0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=(t?.padding||0)/2,o=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=X.svg(n),d=Z(t,{}),g=f.rectangle(c-8,h,o+16,l,d),m=f.line(c,h,c,h+l,d),y=f.line(c+o,h,c+o,h+l,d);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Qt(b)),et(t,x)}else{const f=yr(n,o,l,u);i&&f.attr("style",i),et(t,f)}return t.intersect=function(f){return j.polygon(t,u,f)},n}p(N0,"subroutine");async function z0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{}),m=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],y=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=dt(m),b=d.path(x,g),_=dt(y),w=d.path(_,{...g,fillStyle:"solid"}),C=n.insert(()=>w,":first-child");return C.insert(()=>b,":first-child"),C.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),et(t,C),t.intersect=function(v){return j.polygon(t,m,v)},n}p(z0,"taggedRect");async function W0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*o,u=.2*l,f=l+c,{cssStyles:d}=t,g=X.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:f/2},...dr(-o/2-o/2*.1,f/2,o/2+o/2*.1,f/2,c,.8),{x:o/2+o/2*.1,y:-f/2},{x:-o/2-o/2*.1,y:-f/2}],x=-o/2+o/2*.1,b=-f/2-u*.4,_=[{x:x+o-h,y:(b+l)*1.4},{x:x+o,y:b+l-u},{x:x+o,y:(b+l)*.9},...dr(x+o,(b+l)*1.3,x+o-h,(b+l)*1.5,-l*.03,.5)],w=dt(y),C=g.path(w,m),v=dt(_),T=g.path(v,{...m,fillStyle:"solid"}),O=n.insert(()=>T,":first-child");return O.insert(()=>C,":first-child"),O.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),et(t,O),t.intersect=function(I){return j.polygon(t,y,I)},n}p(W0,"taggedWaveEdgedRectangle");async function q0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=Math.max(a.width+t.padding,t?.width||0),o=Math.max(a.height+t.padding,t?.height||0),l=-s/2,c=-o/2,h=n.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",s).attr("height",o),et(t,h),t.intersect=function(u){return j.rect(t,u)},n}p(q0,"text");var hB=p((e,t,r,i,n,a)=>`M${e},${t}
185
185
  a${n},${a} 0,0,1 0,${-i}
186
186
  l${r},0
187
187
  a${n},${a} 0,0,1 0,${i}
188
188
  M${r},${-i}
189
189
  a${n},${a} 0,0,0 0,${i}
190
- l${-r},0`,"createCylinderPathD"),uB=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),fB=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function q0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s,halfPadding:o}=await ot(e,t,st(t)),l=t.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=X.svg(n),y=uB(0,0,f,c,u,h),x=fB(0,0,f,c,u,h),b=m.path(y,Z(t,{})),_=m.path(x,Z(t,{fill:"none"}));g=n.insert(()=>_,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=hB(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Qt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),tt(t,g),t.intersect=function(m){const y=j.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(q0,"tiltedCylinder");async function H0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=Z(t,{}),d=dt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=mr(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,tt(t,c),t.intersect=function(u){return j.polygon(t,l,u)},n}p(H0,"trapezoid");async function U0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=X.svg(n),f=Z(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=dt(d),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),tt(t,y),t.intersect=function(x){return j.polygon(t,d,x)},n}p(U0,"trapezoidalPentagon");async function j0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=It(xt().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=X.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=dt(u),y=d.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,tt(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return P.info("Triangle intersect",t,u,b),j.polygon(t,u,b)},n}p(j0,"triangle");async function Y0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-o,g=d>0?d/2:0,m=X.svg(n),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-g,y:h/2},...fr(-o/2-g,h/2,o/2+g,h/2,c,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=dt(x),_=m.path(b,y),w=n.insert(()=>_,":first-child");return w.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),tt(t,w),t.intersect=function(C){return j.polygon(t,x,C)},n}p(Y0,"waveEdgedRectangle");async function G0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=100,o=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,s),f=Math.max(f,o);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=X.svg(n),x=Z(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...fr(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...fr(u/2,-g/2,-u/2,-g/2,d,-1)],_=dt(b),w=y.path(_,x),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),tt(t,C),t.intersect=function(v){return j.polygon(t,b,v)},n}p(G0,"waveRectangle");async function V0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],y=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c}
190
+ l${-r},0`,"createCylinderPathD"),uB=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),fB=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function H0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s,halfPadding:o}=await ot(e,t,st(t)),l=t.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=X.svg(n),y=uB(0,0,f,c,u,h),x=fB(0,0,f,c,u,h),b=m.path(y,Z(t,{})),_=m.path(x,Z(t,{fill:"none"}));g=n.insert(()=>_,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=hB(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Qt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),et(t,g),t.intersect=function(m){const y=j.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(H0,"tiltedCylinder");async function U0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=Z(t,{}),d=dt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=yr(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,et(t,c),t.intersect=function(u){return j.polygon(t,l,u)},n}p(U0,"trapezoid");async function j0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=X.svg(n),f=Z(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=dt(d),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),et(t,y),t.intersect=function(x){return j.polygon(t,d,x)},n}p(j0,"trapezoidalPentagon");async function Y0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=It(xt().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=X.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=dt(u),y=d.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,et(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return P.info("Triangle intersect",t,u,b),j.polygon(t,u,b)},n}p(Y0,"triangle");async function G0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-o,g=d>0?d/2:0,m=X.svg(n),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-g,y:h/2},...dr(-o/2-g,h/2,o/2+g,h/2,c,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=dt(x),_=m.path(b,y),w=n.insert(()=>_,":first-child");return w.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),et(t,w),t.intersect=function(C){return j.polygon(t,x,C)},n}p(G0,"waveEdgedRectangle");async function V0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await ot(e,t,st(t)),s=100,o=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,s),f=Math.max(f,o);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=X.svg(n),x=Z(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...dr(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...dr(u/2,-g/2,-u/2,-g/2,d,-1)],_=dt(b),w=y.path(_,x),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),et(t,C),t.intersect=function(v){return j.polygon(t,b,v)},n}p(V0,"waveRectangle");async function X0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await ot(e,t,st(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=t,d=X.svg(n),g=Z(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],y=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c}
191
191
  M${h-c},${u} L${h+o},${u}
192
- M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),tt(t,b),t.intersect=function(_){return j.polygon(t,m,_)},n}p(V0,"windowPane");async function Hc(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:Q}=Zt(),{background:G}=Q,ut={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${G}`]};await Hc(e,ut)}const i=Zt();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=K(t);if(r.attributes.length===0&&t.label){const Q={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};ir(t.label,i)+Q.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const G=await Ys(e,t,Q);if(!It(i.htmlLabels)){const ut=G.select("text"),rt=ut.node()?.getBBox();ut.attr("transform",`translate(${-rt.width/2}, 0)`)}return G}i.htmlLabels||(n*=1.25,a*=1.25);let c=st(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await ti(h,t.label??"",i,0,0,["name"],o);u.height+=a;let f=0;const d=[],g=[];let m=0,y=0,x=0,b=0,_=!0,w=!0;for(const Q of r.attributes){const G=await ti(h,Q.type,i,0,f,["attribute-type"],o);m=Math.max(m,G.width+n);const ut=await ti(h,Q.name,i,0,f,["attribute-name"],o);y=Math.max(y,ut.width+n);const rt=await ti(h,Q.keys.join(),i,0,f,["attribute-keys"],o);x=Math.max(x,rt.width+n);const Ct=await ti(h,Q.comment,i,0,f,["attribute-comment"],o);b=Math.max(b,Ct.width+n);const wt=Math.max(G.height,ut.height,rt.height,Ct.height)+a;g.push({yOffset:f,rowHeight:wt}),f+=wt}let C=4;x<=n&&(_=!1,x=0,C--),b<=n&&(w=!1,b=0,C--);const v=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const Q=u.width+n*2-(m+y+x+b);m+=Q/C,y+=Q/C,x>0&&(x+=Q/C),b>0&&(b+=Q/C)}const S=m+y+x+b,O=X.svg(h),I=Z(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let R=0;g.length>0&&(R=g.reduce((Q,G)=>Q+(G?.rowHeight??0),0));const B=Math.max(v.width+n*2,t?.width||0,S),$=Math.max((R??0)+u.height,t?.height||0),L=-B/2,T=-$/2;h.selectAll("g:not(:first-child)").each((Q,G,ut)=>{const rt=pt(ut[G]),Ct=rt.attr("transform");let wt=0,Mt=0;if(Ct){const J=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ct);J&&(wt=parseFloat(J[1]),Mt=parseFloat(J[2]),rt.attr("class").includes("attribute-name")?wt+=m:rt.attr("class").includes("attribute-keys")?wt+=m+y:rt.attr("class").includes("attribute-comment")&&(wt+=m+y+x))}rt.attr("transform",`translate(${L+n/2+wt}, ${Mt+T+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(T+a/2)+")");const E=O.rectangle(L,T,B,$,I),A=h.insert(()=>E,":first-child").attr("style",s.join("")),{themeVariables:D}=Zt(),{rowEven:F,rowOdd:U,nodeBorder:W}=D;d.push(0);for(const[Q,G]of g.entries()){const rt=(Q+1)%2===0&&G.yOffset!==0,Ct=O.rectangle(L,u.height+T+G?.yOffset,B,G?.rowHeight,{...I,fill:rt?F:U,stroke:W});h.insert(()=>Ct,"g.label").attr("style",s.join("")).attr("class",`row-rect-${rt?"even":"odd"}`)}let Y=O.line(L,u.height+T,B+L,u.height+T,I);h.insert(()=>Y).attr("class","divider"),Y=O.line(m+L,u.height+T,m+L,$+T,I),h.insert(()=>Y).attr("class","divider"),_&&(Y=O.line(m+y+L,u.height+T,m+y+L,$+T,I),h.insert(()=>Y).attr("class","divider")),w&&(Y=O.line(m+y+x+L,u.height+T,m+y+x+L,$+T,I),h.insert(()=>Y).attr("class","divider"));for(const Q of d)Y=O.line(L,u.height+T+Q,B+L,u.height+T+Q,I),h.insert(()=>Y).attr("class","divider");if(tt(t,A),l&&t.look!=="handDrawn"){const G=l.split(";")?.filter(ut=>ut.includes("stroke"))?.map(ut=>`${ut}`).join("; ");h.selectAll("path").attr("style",G??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(Q){return j.rect(t,Q)},h}p(Hc,"erBox");async function ti(e,t,r,i=0,n=0,a=[],s=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==kh(t)&&(t=kh(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=o.node().appendChild(await pr(o,t,{width:ir(t,r)+100,style:s,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(It(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=pt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(ti,"addText");async function X0(e,t,r,i,n=r.class.padding??12){const a=i?0:3,s=e.insert("g").attr("class",st(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,f=0,d=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await on(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await on(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const _=await on(c,b,m,[b.parseClassifier()]);m+=_+a}d=c.node().getBBox().height,d<=0&&(d=n/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const _=await on(h,b,y,[b.parseClassifier()]);y+=_+a}let x=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=s.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}p(X0,"textHelper");async function on(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Zt();let s="useHtmlLabels"in t?t.useHtmlLabels:It(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),bi(o)&&(s=!0);const l=await pr(n,Vl(jr(o)),{width:ir(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,h=1;if(s){const u=l.children[0],f=pt(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 g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,w=parseInt(b,10)*5+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&pt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(on,"addText");async function Z0(e,t){const r=xt(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??It(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await X0(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=K(t);t.labelStyle=c,t.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,d=X.svg(o),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;s.members.length===0&&s.methods.length===0?y+=n:s.members.length>0&&s.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,_=d.rectangle(x-i,b-i-(f?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),w=o.insert(()=>_,":first-child");w.attr("class","basic label-container");const C=w.node().getBBox();o.selectAll(".text").each((I,R,B)=>{const $=pt(B[R]),L=$.attr("transform");let T=0;if(L){const F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);F&&(T=parseFloat(F[2]))}let E=T+b+i-(f?i:s.members.length===0&&s.methods.length===0?-i/2:0);a||(E-=4);let A=x;($.attr("class").includes("label-group")||$.attr("class").includes("annotation-group"))&&(A=-$.node()?.getBBox().width/2||0,o.selectAll("text").each(function(D,F,U){window.getComputedStyle(U[F]).textAnchor==="middle"&&(A=0)})),$.attr("transform",`translate(${A}, ${E})`)});const v=o.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,S=o.select(".label-group").node().getBBox().height-(f?i/2:0)||0,O=o.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(s.members.length>0||s.methods.length>0||f){const I=d.line(C.x,v+S+b+i,C.x+C.width,v+S+b+i,g);o.insert(()=>I).attr("class","divider").attr("style",u)}if(f||s.members.length>0||s.methods.length>0){const I=d.line(C.x,v+S+O+b+n*2+i,C.x+C.width,v+S+O+b+i+n*2,g);o.insert(()=>I).attr("class","divider").attr("style",u)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",u),w.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",u),!a){const I=RegExp(/color\s*:\s*([^;]*)/),R=I.exec(u);if(R){const B=R[0].replace("color","fill");o.selectAll("tspan").attr("style",B)}else if(c){const B=I.exec(c);if(B){const $=B[0].replace("color","fill");o.selectAll("tspan").attr("style",$)}}}return tt(t,w),t.intersect=function(I){return j.rect(t,I)},o}p(Z0,"classBox");async function K0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const n=t,a=t,s=20,o=20,l="verifyMethod"in t,c=st(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await De(h,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):u=await De(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=u;const d=await De(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+o,l){const v=await De(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,f,t.labelStyle);f+=v;const S=await De(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=S;const O=await De(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=O,await De(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const v=await De(h,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=v,await De(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+s,m=(h.node()?.getBBox().height??200)+s,y=-g/2,x=-m/2,b=X.svg(h),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=b.rectangle(y,x,g,m,_),C=h.insert(()=>w,":first-child");if(C.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((v,S,O)=>{const I=pt(O[S]),R=I.attr("transform");let B=0,$=0;if(R){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);A&&(B=parseFloat(A[1]),$=parseFloat(A[2]))}const L=$-m/2;let T=y+s/2;(S===0||S===1)&&(T=B),I.attr("transform",`translate(${T}, ${L+s})`)}),f>u+d+o){const v=b.line(y,x+u+d+o,y+g,x+u+d+o,_);h.insert(()=>v).attr("style",i)}return tt(t,C),t.intersect=function(v){return j.rect(t,v)},h}p(K0,"requirementBox");async function De(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=xt(),s=a.htmlLabels??!0,o=await pr(n,Vl(jr(t)),{width:ir(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const c=o.children[0],h=pt(o);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=o.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=o.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(De,"addText");var dB=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 Q0(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i||"";const a=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await ot(e,t,st(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=o.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 g,m;f?{label:g,bbox:m}=await Oo(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await Oo(o,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await Oo(o,"assigned"in t&&t.assigned||"",d);t.width=s;const b=10,_=t?.width||0,w=Math.max(m.height,x.height)/2,C=Math.max(l.height+b*2,t?.height||0)+w,v=-_/2,S=-C/2;c.attr("transform","translate("+(h-_/2)+", "+(-w-l.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(h+_/2-x.width-2*a)+", "+(-w+l.height/2)+")");let O;const{rx:I,ry:R}=t,{cssStyles:B}=t;if(t.look==="handDrawn"){const $=X.svg(o),L=Z(t,{}),T=I||R?$.path(gr(v,S,_,C,I||0),L):$.rectangle(v,S,_,C,L);O=o.insert(()=>T,":first-child"),O.attr("class","basic label-container").attr("style",B||null)}else{O=o.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",n).attr("rx",I??5).attr("ry",R??5).attr("x",v).attr("y",S).attr("width",_).attr("height",C);const $="priority"in t&&t.priority;if($){const L=o.append("line"),T=v+2,E=S+Math.floor((I??0)/2),A=S+C-Math.floor((I??0)/2);L.attr("x1",T).attr("y1",E).attr("x2",T).attr("y2",A).attr("stroke-width","4").attr("stroke",dB($))}}return tt(t,O),t.height=C,t.intersect=function($){return j.rect(t,$)},o}p(Q0,"kanbanItem");async function J0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await ot(e,t,st(t)),l=a.width+10*s,c=a.height+8*s,h=.15*l,{cssStyles:u}=t,f=a.width+20,d=a.height+20,g=Math.max(l,f),m=Math.max(c,d);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0
192
+ M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),et(t,b),t.intersect=function(_){return j.polygon(t,m,_)},n}p(X0,"windowPane");async function Uc(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:Q}=Zt(),{background:G}=Q,ut={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${G}`]};await Uc(e,ut)}const i=Zt();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=K(t);if(r.attributes.length===0&&t.label){const Q={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};ir(t.label,i)+Q.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const G=await Ys(e,t,Q);if(!It(i.htmlLabels)){const ut=G.select("text"),rt=ut.node()?.getBBox();ut.attr("transform",`translate(${-rt.width/2}, 0)`)}return G}i.htmlLabels||(n*=1.25,a*=1.25);let c=st(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await ei(h,t.label??"",i,0,0,["name"],o);u.height+=a;let f=0;const d=[],g=[];let m=0,y=0,x=0,b=0,_=!0,w=!0;for(const Q of r.attributes){const G=await ei(h,Q.type,i,0,f,["attribute-type"],o);m=Math.max(m,G.width+n);const ut=await ei(h,Q.name,i,0,f,["attribute-name"],o);y=Math.max(y,ut.width+n);const rt=await ei(h,Q.keys.join(),i,0,f,["attribute-keys"],o);x=Math.max(x,rt.width+n);const vt=await ei(h,Q.comment,i,0,f,["attribute-comment"],o);b=Math.max(b,vt.width+n);const wt=Math.max(G.height,ut.height,rt.height,vt.height)+a;g.push({yOffset:f,rowHeight:wt}),f+=wt}let C=4;x<=n&&(_=!1,x=0,C--),b<=n&&(w=!1,b=0,C--);const v=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const Q=u.width+n*2-(m+y+x+b);m+=Q/C,y+=Q/C,x>0&&(x+=Q/C),b>0&&(b+=Q/C)}const T=m+y+x+b,O=X.svg(h),I=Z(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let R=0;g.length>0&&(R=g.reduce((Q,G)=>Q+(G?.rowHeight??0),0));const B=Math.max(v.width+n*2,t?.width||0,T),$=Math.max((R??0)+u.height,t?.height||0),L=-B/2,S=-$/2;h.selectAll("g:not(:first-child)").each((Q,G,ut)=>{const rt=pt(ut[G]),vt=rt.attr("transform");let wt=0,Mt=0;if(vt){const J=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(vt);J&&(wt=parseFloat(J[1]),Mt=parseFloat(J[2]),rt.attr("class").includes("attribute-name")?wt+=m:rt.attr("class").includes("attribute-keys")?wt+=m+y:rt.attr("class").includes("attribute-comment")&&(wt+=m+y+x))}rt.attr("transform",`translate(${L+n/2+wt}, ${Mt+S+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(S+a/2)+")");const E=O.rectangle(L,S,B,$,I),A=h.insert(()=>E,":first-child").attr("style",s.join("")),{themeVariables:D}=Zt(),{rowEven:F,rowOdd:U,nodeBorder:W}=D;d.push(0);for(const[Q,G]of g.entries()){const rt=(Q+1)%2===0&&G.yOffset!==0,vt=O.rectangle(L,u.height+S+G?.yOffset,B,G?.rowHeight,{...I,fill:rt?F:U,stroke:W});h.insert(()=>vt,"g.label").attr("style",s.join("")).attr("class",`row-rect-${rt?"even":"odd"}`)}let Y=O.line(L,u.height+S,B+L,u.height+S,I);h.insert(()=>Y).attr("class","divider"),Y=O.line(m+L,u.height+S,m+L,$+S,I),h.insert(()=>Y).attr("class","divider"),_&&(Y=O.line(m+y+L,u.height+S,m+y+L,$+S,I),h.insert(()=>Y).attr("class","divider")),w&&(Y=O.line(m+y+x+L,u.height+S,m+y+x+L,$+S,I),h.insert(()=>Y).attr("class","divider"));for(const Q of d)Y=O.line(L,u.height+S+Q,B+L,u.height+S+Q,I),h.insert(()=>Y).attr("class","divider");if(et(t,A),l&&t.look!=="handDrawn"){const G=l.split(";")?.filter(ut=>ut.includes("stroke"))?.map(ut=>`${ut}`).join("; ");h.selectAll("path").attr("style",G??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(Q){return j.rect(t,Q)},h}p(Uc,"erBox");async function ei(e,t,r,i=0,n=0,a=[],s=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==Sh(t)&&(t=Sh(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=o.node().appendChild(await gr(o,t,{width:ir(t,r)+100,style:s,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(It(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=pt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(ei,"addText");async function Z0(e,t,r,i,n=r.class.padding??12){const a=i?0:3,s=e.insert("g").attr("class",st(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,f=0,d=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await cn(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await cn(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const _=await cn(c,b,m,[b.parseClassifier()]);m+=_+a}d=c.node().getBBox().height,d<=0&&(d=n/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const _=await cn(h,b,y,[b.parseClassifier()]);y+=_+a}let x=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=s.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}p(Z0,"textHelper");async function cn(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Zt();let s="useHtmlLabels"in t?t.useHtmlLabels:It(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),_i(o)&&(s=!0);const l=await gr(n,Xl(Yr(o)),{width:ir(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,h=1;if(s){const u=l.children[0],f=pt(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 g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,w=parseInt(b,10)*5+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&pt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(cn,"addText");async function K0(e,t){const r=xt(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??It(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await Z0(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=K(t);t.labelStyle=c,t.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,d=X.svg(o),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;s.members.length===0&&s.methods.length===0?y+=n:s.members.length>0&&s.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,_=d.rectangle(x-i,b-i-(f?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),w=o.insert(()=>_,":first-child");w.attr("class","basic label-container");const C=w.node().getBBox();o.selectAll(".text").each((I,R,B)=>{const $=pt(B[R]),L=$.attr("transform");let S=0;if(L){const F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);F&&(S=parseFloat(F[2]))}let E=S+b+i-(f?i:s.members.length===0&&s.methods.length===0?-i/2:0);a||(E-=4);let A=x;($.attr("class").includes("label-group")||$.attr("class").includes("annotation-group"))&&(A=-$.node()?.getBBox().width/2||0,o.selectAll("text").each(function(D,F,U){window.getComputedStyle(U[F]).textAnchor==="middle"&&(A=0)})),$.attr("transform",`translate(${A}, ${E})`)});const v=o.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,T=o.select(".label-group").node().getBBox().height-(f?i/2:0)||0,O=o.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(s.members.length>0||s.methods.length>0||f){const I=d.line(C.x,v+T+b+i,C.x+C.width,v+T+b+i,g);o.insert(()=>I).attr("class","divider").attr("style",u)}if(f||s.members.length>0||s.methods.length>0){const I=d.line(C.x,v+T+O+b+n*2+i,C.x+C.width,v+T+O+b+i+n*2,g);o.insert(()=>I).attr("class","divider").attr("style",u)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",u),w.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",u),!a){const I=RegExp(/color\s*:\s*([^;]*)/),R=I.exec(u);if(R){const B=R[0].replace("color","fill");o.selectAll("tspan").attr("style",B)}else if(c){const B=I.exec(c);if(B){const $=B[0].replace("color","fill");o.selectAll("tspan").attr("style",$)}}}return et(t,w),t.intersect=function(I){return j.rect(t,I)},o}p(K0,"classBox");async function Q0(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const n=t,a=t,s=20,o=20,l="verifyMethod"in t,c=st(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await Re(h,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):u=await Re(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=u;const d=await Re(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+o,l){const v=await Re(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,f,t.labelStyle);f+=v;const T=await Re(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=T;const O=await Re(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=O,await Re(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const v=await Re(h,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=v,await Re(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+s,m=(h.node()?.getBBox().height??200)+s,y=-g/2,x=-m/2,b=X.svg(h),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=b.rectangle(y,x,g,m,_),C=h.insert(()=>w,":first-child");if(C.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((v,T,O)=>{const I=pt(O[T]),R=I.attr("transform");let B=0,$=0;if(R){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);A&&(B=parseFloat(A[1]),$=parseFloat(A[2]))}const L=$-m/2;let S=y+s/2;(T===0||T===1)&&(S=B),I.attr("transform",`translate(${S}, ${L+s})`)}),f>u+d+o){const v=b.line(y,x+u+d+o,y+g,x+u+d+o,_);h.insert(()=>v).attr("style",i)}return et(t,C),t.intersect=function(v){return j.rect(t,v)},h}p(Q0,"requirementBox");async function Re(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=xt(),s=a.htmlLabels??!0,o=await gr(n,Xl(Yr(t)),{width:ir(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const c=o.children[0],h=pt(o);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=o.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=o.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(Re,"addText");var dB=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 J0(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=K(t);t.labelStyle=i||"";const a=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await ot(e,t,st(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=o.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 g,m;f?{label:g,bbox:m}=await Ro(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await Ro(o,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await Ro(o,"assigned"in t&&t.assigned||"",d);t.width=s;const b=10,_=t?.width||0,w=Math.max(m.height,x.height)/2,C=Math.max(l.height+b*2,t?.height||0)+w,v=-_/2,T=-C/2;c.attr("transform","translate("+(h-_/2)+", "+(-w-l.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(h+_/2-x.width-2*a)+", "+(-w+l.height/2)+")");let O;const{rx:I,ry:R}=t,{cssStyles:B}=t;if(t.look==="handDrawn"){const $=X.svg(o),L=Z(t,{}),S=I||R?$.path(mr(v,T,_,C,I||0),L):$.rectangle(v,T,_,C,L);O=o.insert(()=>S,":first-child"),O.attr("class","basic label-container").attr("style",B||null)}else{O=o.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",n).attr("rx",I??5).attr("ry",R??5).attr("x",v).attr("y",T).attr("width",_).attr("height",C);const $="priority"in t&&t.priority;if($){const L=o.append("line"),S=v+2,E=T+Math.floor((I??0)/2),A=T+C-Math.floor((I??0)/2);L.attr("x1",S).attr("y1",E).attr("x2",S).attr("y2",A).attr("stroke-width","4").attr("stroke",dB($))}}return et(t,O),t.height=C,t.intersect=function($){return j.rect(t,$)},o}p(J0,"kanbanItem");async function ty(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await ot(e,t,st(t)),l=a.width+10*s,c=a.height+8*s,h=.15*l,{cssStyles:u}=t,f=a.width+20,d=a.height+20,g=Math.max(l,f),m=Math.max(c,d);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0
193
193
  a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
194
194
  a${h},${h} 1 0,0 ${g*.25},0
195
195
  a${h},${h} 1 0,0 ${g*.25},0
@@ -207,7 +207,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
207
207
  a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
208
208
  a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
209
209
  a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
210
- H0 V0 Z`;if(t.look==="handDrawn"){const b=X.svg(n),_=Z(t,{}),w=b.path(x,_);y=n.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",Qt(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),tt(t,y),t.calcIntersect=function(b,_){return j.rect(b,_)},t.intersect=function(b){return P.info("Bang intersect",t,b),j.rect(t,b)},n}p(J0,"bang");async function ty(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await ot(e,t,st(t)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
210
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=X.svg(n),_=Z(t,{}),w=b.path(x,_);y=n.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",Qt(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),et(t,y),t.calcIntersect=function(b,_){return j.rect(b,_)},t.intersect=function(b){return P.info("Bang intersect",t,b),j.rect(t,b)},n}p(ty,"bang");async function ey(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await ot(e,t,st(t)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
211
211
  a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
212
212
  a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
213
213
  a${u},${u} 1 0,1 ${l*.35},${l*.2}
@@ -221,7 +221,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
221
221
 
222
222
  a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
223
223
  a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
224
- H0 V0 Z`;if(t.look==="handDrawn"){const x=X.svg(n),b=Z(t,{}),_=x.path(y,b);m=n.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",Qt(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),tt(t,m),t.calcIntersect=function(x,b){return j.rect(x,b)},t.intersect=function(x){return P.info("Cloud intersect",t,x),j.rect(t,x)},n}p(ty,"cloud");async function ey(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await ot(e,t,st(t)),l=a.width+8*s,c=a.height+2*s,h=5,u=`
224
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=X.svg(n),b=Z(t,{}),_=x.path(y,b);m=n.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",Qt(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),et(t,m),t.calcIntersect=function(x,b){return j.rect(x,b)},t.intersect=function(x){return P.info("Cloud intersect",t,x),j.rect(t,x)},n}p(ey,"cloud");async function ry(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await ot(e,t,st(t)),l=a.width+8*s,c=a.height+2*s,h=5,u=`
225
225
  M${-l/2} ${c/2-h}
226
226
  v${-c+2*h}
227
227
  q0,-${h} ${h},-${h}
@@ -232,19 +232,19 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
232
232
  h${-l+2*h}
233
233
  q-${h},0 -${h},-${h}
234
234
  Z
235
- `,f=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),tt(t,f),t.calcIntersect=function(d,g){return j.rect(d,g)},t.intersect=function(d){return j.rect(t,d)},n}p(ey,"defaultMindmapNode");async function ry(e,t){const r={padding:t.padding??0};return qc(e,t,r)}p(ry,"mindmapCircle");var pB=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:F0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:B0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:D0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:P0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:i0},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:qc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:J0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ty},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:M0},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:h0},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_0},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:b0},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:H0},{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:y0},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:a0},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:W0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Xm},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:E0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:I0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:R0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:l0},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:u0},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Jm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:t0},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:e0},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:w0},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Y0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:c0},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:q0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:C0},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:r0},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:n0},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:j0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:V0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:s0},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:U0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:o0},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:S0},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:k0},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Vm},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Qm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:z0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:N0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:G0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:A0},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:v0}],gB=p(()=>{const t=[...Object.entries({state:O0,choice:Zm,note:T0,rectWithTitle:L0,labelRect:x0,iconSquare:g0,iconCircle:d0,icon:f0,iconRounded:p0,imageSquare:m0,anchor:Gm,kanbanItem:Q0,mindmapCircle:ry,defaultMindmapNode:ey,classBox:Z0,erBox:Hc,requirementBox:K0}),...pB.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),iy=gB();function mB(e){return e in iy}p(mB,"isValidShape");var Gs=new Map;async function ny(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?iy[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Gs.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(ny,"insertNode");var A3=p((e,t)=>{Gs.set(t.id,e)},"setNodeElem"),L3=p(()=>{Gs.clear()},"clear"),B3=p(e=>{const t=Gs.get(e.id);P.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"),yB=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&Ju(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&Ju(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),xB={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{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}},Ju=p((e,t,r,i,n,a,s)=>{const o=xB[r];if(!o){P.warn(`Unknown arrow type: ${r}`);return}const l=o.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const u=s.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const g=d.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",s),o.fill&&y.setAttribute("fill",s)}),d.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),xs=new Map,Ht=new Map,E3=p(()=>{xs.clear(),Ht.clear()},"clear"),sa=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),bB=p(async(e,t)=>{let r=It(xt().flowchart.htmlLabels);const{labelStyles:i}=K(t);t.labelStyle=i;const n=await pr(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});P.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(n);let o=n.getBBox();if(r){const c=n.children[0],h=pt(n);o=c.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),xs.set(t.id,a),t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){const c=await Mr(t.startLabelLeft,sa(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=h,ln(l,t.startLabelLeft)}if(t.startLabelRight){const c=await Mr(t.startLabelRight,sa(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=h,ln(l,t.startLabelRight)}if(t.endLabelLeft){const c=await Mr(t.endLabelLeft,sa(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=h,ln(l,t.endLabelLeft)}if(t.endLabelRight){const c=await Mr(t.endLabelRight,sa(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=h,ln(l,t.endLabelRight)}return n},"insertEdgeLabel");function ln(e,t){xt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(ln,"setTerminalWidth");var _B=p((e,t)=>{P.debug("Moving label abc88 ",e.id,e.label,xs.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:n}=bc(i);if(e.label){const a=xs.get(e.id);let s=e.x,o=e.y;if(r){const l=ve.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){const a=Ht.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const l=ve.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const a=Ht.get(e.id).startRight;let s=e.x,o=e.y;if(r){const l=ve.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const a=Ht.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const l=ve.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const a=Ht.get(e.id).endRight;let s=e.x,o=e.y;if(r){const l=ve.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),wB=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),CB=p((e,t,r)=>{P.debug(`intersection calc abc89:
235
+ `,f=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),et(t,f),t.calcIntersect=function(d,g){return j.rect(d,g)},t.intersect=function(d){return j.rect(t,d)},n}p(ry,"defaultMindmapNode");async function iy(e,t){const r={padding:t.padding??0};return Hc(e,t,r)}p(iy,"mindmapCircle");var pB=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:D0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:E0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:O0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:N0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:n0},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Hc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ty},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ey},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:A0},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:u0},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:w0},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:_0},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:U0},{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:x0},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:s0},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:q0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Zm},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:$0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:P0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:I0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:c0},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:f0},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:t0},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:e0},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:r0},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:C0},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:G0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:h0},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:H0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:v0},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:i0},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:a0},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Y0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:X0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:o0},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:j0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:l0},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:F0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:T0},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:S0},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Xm},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Jm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:W0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:z0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:V0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:L0},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:k0}],gB=p(()=>{const t=[...Object.entries({state:R0,choice:Km,note:M0,rectWithTitle:B0,labelRect:b0,iconSquare:m0,iconCircle:p0,icon:d0,iconRounded:g0,imageSquare:y0,anchor:Vm,kanbanItem:J0,mindmapCircle:iy,defaultMindmapNode:ry,classBox:K0,erBox:Uc,requirementBox:Q0}),...pB.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ny=gB();function mB(e){return e in ny}p(mB,"isValidShape");var Gs=new Map;async function ay(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?ny[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Gs.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(ay,"insertNode");var A3=p((e,t)=>{Gs.set(t.id,e)},"setNodeElem"),L3=p(()=>{Gs.clear()},"clear"),B3=p(e=>{const t=Gs.get(e.id);P.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"),yB=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&tf(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&tf(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),xB={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{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}},tf=p((e,t,r,i,n,a,s)=>{const o=xB[r];if(!o){P.warn(`Unknown arrow type: ${r}`);return}const l=o.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const u=s.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const g=d.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",s),o.fill&&y.setAttribute("fill",s)}),d.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),xs=new Map,Ht=new Map,E3=p(()=>{xs.clear(),Ht.clear()},"clear"),oa=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),bB=p(async(e,t)=>{let r=It(xt().flowchart.htmlLabels);const{labelStyles:i}=K(t);t.labelStyle=i;const n=await gr(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});P.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(n);let o=n.getBBox();if(r){const c=n.children[0],h=pt(n);o=c.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),xs.set(t.id,a),t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){const c=await Ar(t.startLabelLeft,oa(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=h,hn(l,t.startLabelLeft)}if(t.startLabelRight){const c=await Ar(t.startLabelRight,oa(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=h,hn(l,t.startLabelRight)}if(t.endLabelLeft){const c=await Ar(t.endLabelLeft,oa(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=h,hn(l,t.endLabelLeft)}if(t.endLabelRight){const c=await Ar(t.endLabelRight,oa(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=h,hn(l,t.endLabelRight)}return n},"insertEdgeLabel");function hn(e,t){xt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(hn,"setTerminalWidth");var _B=p((e,t)=>{P.debug("Moving label abc88 ",e.id,e.label,xs.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:n}=_c(i);if(e.label){const a=xs.get(e.id);let s=e.x,o=e.y;if(r){const l=Se.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){const a=Ht.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const l=Se.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const a=Ht.get(e.id).startRight;let s=e.x,o=e.y;if(r){const l=Se.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const a=Ht.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const l=Se.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const a=Ht.get(e.id).endRight;let s=e.x,o=e.y;if(r){const l=Se.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),wB=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),CB=p((e,t,r)=>{P.debug(`intersection calc abc89:
236
236
  outsidePoint: ${JSON.stringify(t)}
237
237
  insidePoint : ${JSON.stringify(r)}
238
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2;let o=r.x<t.x?s-a:s+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*s>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;o=h*u/c;const f={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),P.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,f),f}else{r.x<t.x?o=t.x-s-i:o=i-s-t.x;let u=c*o/h,f=r.x<t.x?r.x+h-o:r.x-h+o,d=r.y<t.y?r.y+u:r.y-u;return P.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:f,_y:d}),o===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),tf=p((e,t)=>{P.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(P.info("abc88 checking point",a,t),!wB(t,a)&&!n){const s=CB(t,i,a);P.debug("abc88 inside",a,i,s),P.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?P.warn("abc88 no intersect",s,r):r.push(s),n=!0}else P.warn("abc88 outside",a,i),i=a,n||r.push(a)}),P.debug("returning points",r),r},"cutPathAtIntersect");function ay(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],s=e[i+1];(n.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(ay,"extractCornerPoints");var ef=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),vB=p(function(e){const{cornerPointPositions:t}=ay(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],s=e[i],o=ef(n,s,5),l=ef(a,s,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let f={x:s.x,y:s.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){P.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const d=5;s.x===o.x?f={x:c<0?o.x-d+u:o.x+d-u,y:h<0?o.y-u:o.y+u}:f={x:c<0?o.x-u:o.x+u,y:h<0?o.y-d+u:o.y+d-u}}else P.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),kB=p((e,t,r)=>{const i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),SB=p(function(e,t,r,i,n,a,s,o=!1){const{handDrawnSeed:l}=xt();let c=t.points,h=!1;const u=n;var f=a;const d=[];for(const T in t.cssCompiledStyles)Rg(T)||d.push(t.cssCompiledStyles[T]);P.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),P.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(P.info("to cluster abc88",r.get(t.toCluster)),c=tf(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(P.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=tf(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(T=>!Number.isNaN(T.y));m=vB(m);let y=ba;switch(y=Xa,t.curve){case"linear":y=Xa;break;case"basis":y=ba;break;case"cardinal":y=zd;break;case"bumpX":y=Od;break;case"bumpY":y=Rd;break;case"catmullRom":y=qd;break;case"monotoneX":y=Vd;break;case"monotoneY":y=Xd;break;case"natural":y=Kd;break;case"step":y=Qd;break;case"stepAfter":y=tp;break;case"stepBefore":y=Jd;break;default:y=ba}const{x,y:b}=vS(t),_=nk().x(x).y(b).curve(y);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let C,v=t.curve==="rounded"?sy(oy(m,t),5):_(m);const S=Array.isArray(t.style)?t.style:[t.style];let O=S.find(T=>T?.startsWith("stroke:")),I=!1;if(t.look==="handDrawn"){const T=X.svg(e);Object.assign([],m);const E=T.path(v,{roughness:.3,seed:l});w+=" transition",C=pt(E).select("path").attr("id",t.id).attr("class"," "+w+(t.classes?" "+t.classes:"")).attr("style",S?S.reduce((D,F)=>D+";"+F,""):"");let A=C.attr("d");C.attr("d",A),e.node().appendChild(C.node())}else{const T=d.join(";"),E=S?S.reduce((Q,G)=>Q+G+";",""):"";let A="";t.animate&&(A=" edge-animation-fast"),t.animation&&(A=" edge-animation-"+t.animation);const D=(T?T+";"+E+";":E)+";"+(S?S.reduce((Q,G)=>Q+";"+G,""):"");C=e.append("path").attr("d",v).attr("id",t.id).attr("class"," "+w+(t.classes?" "+t.classes:"")+(A??"")).attr("style",D),O=D.match(/stroke:([^;]+)/)?.[1],I=t.animate===!0||!!t.animation||T.includes("animation");const F=C.node(),U=typeof F.getTotalLength=="function"?F.getTotalLength():0,W=yu[t.arrowTypeStart]||0,Y=yu[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const G=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?kB(U,W,Y):`0 ${W} ${U-W-Y} ${Y}`}; stroke-dashoffset: 0;`;C.attr("style",G+C.attr("style"))}}C.attr("data-edge",!0),C.attr("data-et","edge"),C.attr("data-id",t.id),C.attr("data-points",g),t.showPoints&&m.forEach(T=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",T.x).attr("cy",T.y)});let R="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",t.arrowTypeStart),P.info("arrowTypeEnd",t.arrowTypeEnd),yB(C,t,R,s,i,O);const B=Math.floor(c.length/2),$=c[B];ve.isLabelCoordinateInPath($,C.attr("d"))||(h=!0);let L={};return h&&(L.updatedPath=c),L.originalPath=t.points,L},"insertEdge");function sy(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const s=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const c=s.x-o.x,h=s.y-o.y,u=l.x-s.x,f=l.y-s.y,d=Math.hypot(c,h),g=Math.hypot(u,f);if(d<n||g<n){r+=`L${s.x},${s.y}`;continue}const m=c/d,y=h/d,x=u/g,b=f/g,_=m*x+y*b,w=Math.max(-1,Math.min(1,_)),C=Math.acos(w);if(C<n||Math.abs(Math.PI-C)<n){r+=`L${s.x},${s.y}`;continue}const v=Math.min(t/Math.sin(C/2),d/2,g/2),S=s.x-m*v,O=s.y-y*v,I=s.x+x*v,R=s.y+b*v;r+=`L${S},${O}`,r+=`Q${s.x},${s.y} ${I},${R}`}}return r}p(sy,"generateRoundedPath");function $l(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($l,"calculateDeltaAndAngle");function oy(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Vt[t.arrowTypeStart]){const n=Vt[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=$l(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Vt[t.arrowTypeEnd]){const n=Vt[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:o}=$l(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(oy,"applyMarkerOffsetsToPoints");var TB=p((e,t,r,i)=>{t.forEach(n=>{qB[n](e,r,i)})},"insertMarkers"),MB=p((e,t,r)=>{P.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",190).attr("markerHeight",240).attr("orient","auto").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")},"extension"),AB=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")},"composition"),LB=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")},"aggregation"),BB=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")},"dependency"),EB=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("stroke","black").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("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),$B=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")},"point"),FB=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")},"circle"),DB=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")},"cross"),OB=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"),RB=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"),IB=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),PB=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"),NB=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),zB=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
238
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2;let o=r.x<t.x?s-a:s+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*s>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;o=h*u/c;const f={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),P.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,f),f}else{r.x<t.x?o=t.x-s-i:o=i-s-t.x;let u=c*o/h,f=r.x<t.x?r.x+h-o:r.x-h+o,d=r.y<t.y?r.y+u:r.y-u;return P.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:f,_y:d}),o===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),ef=p((e,t)=>{P.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(P.info("abc88 checking point",a,t),!wB(t,a)&&!n){const s=CB(t,i,a);P.debug("abc88 inside",a,i,s),P.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?P.warn("abc88 no intersect",s,r):r.push(s),n=!0}else P.warn("abc88 outside",a,i),i=a,n||r.push(a)}),P.debug("returning points",r),r},"cutPathAtIntersect");function sy(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],s=e[i+1];(n.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(sy,"extractCornerPoints");var rf=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),vB=p(function(e){const{cornerPointPositions:t}=sy(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],s=e[i],o=rf(n,s,5),l=rf(a,s,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let f={x:s.x,y:s.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){P.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const d=5;s.x===o.x?f={x:c<0?o.x-d+u:o.x+d-u,y:h<0?o.y-u:o.y+u}:f={x:c<0?o.x-u:o.x+u,y:h<0?o.y-d+u:o.y+d-u}}else P.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),kB=p((e,t,r)=>{const i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),SB=p(function(e,t,r,i,n,a,s,o=!1){const{handDrawnSeed:l}=xt();let c=t.points,h=!1;const u=n;var f=a;const d=[];for(const S in t.cssCompiledStyles)Ig(S)||d.push(t.cssCompiledStyles[S]);P.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),P.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(P.info("to cluster abc88",r.get(t.toCluster)),c=ef(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(P.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=ef(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(S=>!Number.isNaN(S.y));m=vB(m);let y=ba;switch(y=Xa,t.curve){case"linear":y=Xa;break;case"basis":y=ba;break;case"cardinal":y=Wd;break;case"bumpX":y=Rd;break;case"bumpY":y=Id;break;case"catmullRom":y=Hd;break;case"monotoneX":y=Xd;break;case"monotoneY":y=Zd;break;case"natural":y=Qd;break;case"step":y=Jd;break;case"stepAfter":y=ep;break;case"stepBefore":y=tp;break;default:y=ba}const{x,y:b}=vS(t),_=nk().x(x).y(b).curve(y);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let C,v=t.curve==="rounded"?oy(ly(m,t),5):_(m);const T=Array.isArray(t.style)?t.style:[t.style];let O=T.find(S=>S?.startsWith("stroke:")),I=!1;if(t.look==="handDrawn"){const S=X.svg(e);Object.assign([],m);const E=S.path(v,{roughness:.3,seed:l});w+=" transition",C=pt(E).select("path").attr("id",t.id).attr("class"," "+w+(t.classes?" "+t.classes:"")).attr("style",T?T.reduce((D,F)=>D+";"+F,""):"");let A=C.attr("d");C.attr("d",A),e.node().appendChild(C.node())}else{const S=d.join(";"),E=T?T.reduce((Q,G)=>Q+G+";",""):"";let A="";t.animate&&(A=" edge-animation-fast"),t.animation&&(A=" edge-animation-"+t.animation);const D=(S?S+";"+E+";":E)+";"+(T?T.reduce((Q,G)=>Q+";"+G,""):"");C=e.append("path").attr("d",v).attr("id",t.id).attr("class"," "+w+(t.classes?" "+t.classes:"")+(A??"")).attr("style",D),O=D.match(/stroke:([^;]+)/)?.[1],I=t.animate===!0||!!t.animation||S.includes("animation");const F=C.node(),U=typeof F.getTotalLength=="function"?F.getTotalLength():0,W=xu[t.arrowTypeStart]||0,Y=xu[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const G=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?kB(U,W,Y):`0 ${W} ${U-W-Y} ${Y}`}; stroke-dashoffset: 0;`;C.attr("style",G+C.attr("style"))}}C.attr("data-edge",!0),C.attr("data-et","edge"),C.attr("data-id",t.id),C.attr("data-points",g),t.showPoints&&m.forEach(S=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",S.x).attr("cy",S.y)});let R="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",t.arrowTypeStart),P.info("arrowTypeEnd",t.arrowTypeEnd),yB(C,t,R,s,i,O);const B=Math.floor(c.length/2),$=c[B];Se.isLabelCoordinateInPath($,C.attr("d"))||(h=!0);let L={};return h&&(L.updatedPath=c),L.originalPath=t.points,L},"insertEdge");function oy(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const s=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const c=s.x-o.x,h=s.y-o.y,u=l.x-s.x,f=l.y-s.y,d=Math.hypot(c,h),g=Math.hypot(u,f);if(d<n||g<n){r+=`L${s.x},${s.y}`;continue}const m=c/d,y=h/d,x=u/g,b=f/g,_=m*x+y*b,w=Math.max(-1,Math.min(1,_)),C=Math.acos(w);if(C<n||Math.abs(Math.PI-C)<n){r+=`L${s.x},${s.y}`;continue}const v=Math.min(t/Math.sin(C/2),d/2,g/2),T=s.x-m*v,O=s.y-y*v,I=s.x+x*v,R=s.y+b*v;r+=`L${T},${O}`,r+=`Q${s.x},${s.y} ${I},${R}`}}return r}p(oy,"generateRoundedPath");function Fl(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(Fl,"calculateDeltaAndAngle");function ly(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Vt[t.arrowTypeStart]){const n=Vt[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=Fl(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Vt[t.arrowTypeEnd]){const n=Vt[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:o}=Fl(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(ly,"applyMarkerOffsetsToPoints");var TB=p((e,t,r,i)=>{t.forEach(n=>{qB[n](e,r,i)})},"insertMarkers"),MB=p((e,t,r)=>{P.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",190).attr("markerHeight",240).attr("orient","auto").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")},"extension"),AB=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")},"composition"),LB=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")},"aggregation"),BB=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")},"dependency"),EB=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("stroke","black").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("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),$B=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")},"point"),FB=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")},"circle"),DB=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")},"cross"),OB=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"),RB=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"),IB=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),PB=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"),NB=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),zB=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
239
239
  L20,10
240
240
  M20,10
241
- L0,20`)},"requirement_arrow"),WB=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"),qB={extension:MB,composition:AB,aggregation:LB,dependency:BB,lollipop:EB,point:$B,circle:FB,cross:DB,barb:OB,only_one:RB,zero_or_one:IB,one_or_more:PB,zero_or_more:NB,requirement_arrow:zB,requirement_contains:WB},HB=TB,UB={common:Li,getConfig:Zt,insertCluster:QL,insertEdge:SB,insertEdgeLabel:bB,insertMarkers:HB,insertNode:ny,interpolateToCurve:kc,labelHelper:ot,log:P,positionEdgeLabel:_B},Mn={},ly=p(e=>{for(const t of e)Mn[t.name]=t},"registerLayoutLoaders"),jB=p(()=>{ly([{name:"dagre",loader:p(async()=>await _t(()=>import("./dagre-6UL2VRFP-BqkmE-LI.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:p(async()=>await _t(()=>import("./cose-bilkent-S5V4N54A-CB9Zfu50.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");jB();var $3=p(async(e,t)=>{if(!(e.layoutAlgorithm in Mn))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Mn[e.layoutAlgorithm];return(await r.loader()).render(e,t,UB,{algorithm:r.algorithm})},"render"),F3=p((e="",{fallback:t="dagre"}={})=>{if(e in Mn)return e;if(t in Mn)return P.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"),cy="comm",hy="rule",uy="decl",YB="@import",GB="@namespace",VB="@keyframes",XB="@layer",fy=Math.abs,Uc=String.fromCharCode;function dy(e){return e.trim()}function ka(e,t,r){return e.replace(t,r)}function ZB(e,t,r){return e.indexOf(t,r)}function li(e,t){return e.charCodeAt(t)|0}function Mi(e,t,r){return e.slice(t,r)}function Oe(e){return e.length}function KB(e){return e.length}function oa(e,t){return t.push(e),e}var Vs=1,Ai=1,py=0,ye=0,$t=0,Di="";function jc(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Vs,column:Ai,length:s,return:"",siblings:o}}function QB(){return $t}function JB(){return $t=ye>0?li(Di,--ye):0,Ai--,$t===10&&(Ai=1,Vs--),$t}function Se(){return $t=ye<py?li(Di,ye++):0,Ai++,$t===10&&(Ai=1,Vs++),$t}function or(){return li(Di,ye)}function Sa(){return ye}function Xs(e,t){return Mi(Di,e,t)}function An(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 tE(e){return Vs=Ai=1,py=Oe(Di=e),ye=0,[]}function eE(e){return Di="",e}function Ro(e){return dy(Xs(ye-1,Fl(e===91?e+2:e===40?e+1:e)))}function rE(e){for(;($t=or())&&$t<33;)Se();return An(e)>2||An($t)>3?"":" "}function iE(e,t){for(;--t&&Se()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return Xs(e,Sa()+(t<6&&or()==32&&Se()==32))}function Fl(e){for(;Se();)switch($t){case e:return ye;case 34:case 39:e!==34&&e!==39&&Fl($t);break;case 40:e===41&&Fl(e);break;case 92:Se();break}return ye}function nE(e,t){for(;Se()&&e+$t!==57;)if(e+$t===84&&or()===47)break;return"/*"+Xs(t,ye-1)+"*"+Uc(e===47?e:Se())}function aE(e){for(;!An(or());)Se();return Xs(e,ye)}function sE(e){return eE(Ta("",null,null,null,[""],e=tE(e),0,[0],e))}function Ta(e,t,r,i,n,a,s,o,l){for(var c=0,h=0,u=s,f=0,d=0,g=0,m=1,y=1,x=1,b=0,_="",w=n,C=a,v=i,S=_;y;)switch(g=b,b=Se()){case 40:if(g!=108&&li(S,u-1)==58){ZB(S+=ka(Ro(b),"&","&\f"),"&\f",fy(c?o[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:S+=Ro(b);break;case 9:case 10:case 13:case 32:S+=rE(g);break;case 92:S+=iE(Sa()-1,7);continue;case 47:switch(or()){case 42:case 47:oa(oE(nE(Se(),Sa()),t,r,l),l),(An(g||1)==5||An(or()||1)==5)&&Oe(S)&&Mi(S,-1,void 0)!==" "&&(S+=" ");break;default:S+="/"}break;case 123*m:o[c++]=Oe(S)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(S=ka(S,/\f/g,"")),d>0&&(Oe(S)-u||m===0&&g===47)&&oa(d>32?nf(S+";",i,r,u-1,l):nf(ka(S," ","")+";",i,r,u-2,l),l);break;case 59:S+=";";default:if(oa(v=rf(S,t,r,c,h,n,o,_,w=[],C=[],u,a),a),b===123)if(h===0)Ta(S,t,v,v,w,a,u,o,C);else{switch(f){case 99:if(li(S,3)===110)break;case 108:if(li(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Ta(e,v,v,i&&oa(rf(e,v,v,0,0,n,o,_,n,w=[],u,C),C),n,C,u,o,i?w:C):Ta(S,v,v,v,[""],C,0,o,C)}}c=h=d=0,m=x=1,_=S="",u=s;break;case 58:u=1+Oe(S),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&JB()==125)continue}switch(S+=Uc(b),b*m){case 38:x=h>0?1:(S+="\f",-1);break;case 44:o[c++]=(Oe(S)-1)*x,x=1;break;case 64:or()===45&&(S+=Ro(Se())),f=or(),h=u=Oe(_=S+=aE(Sa())),b++;break;case 45:g===45&&Oe(S)==2&&(m=0)}}return a}function rf(e,t,r,i,n,a,s,o,l,c,h,u){for(var f=n-1,d=n===0?a:[""],g=KB(d),m=0,y=0,x=0;m<i;++m)for(var b=0,_=Mi(e,f+1,f=fy(y=s[m])),w=e;b<g;++b)(w=dy(y>0?d[b]+" "+_:ka(_,/&\f/g,d[b])))&&(l[x++]=w);return jc(e,t,r,n===0?hy:o,l,c,h,u)}function oE(e,t,r,i){return jc(e,t,r,cy,Uc(QB()),Mi(e,2,-2),0,i)}function nf(e,t,r,i,n){return jc(e,t,r,uy,Mi(e,0,i),Mi(e,i+1,-1),i,n)}function Dl(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function lE(e,t,r,i){switch(e.type){case XB:if(e.children.length)break;case YB:case GB:case uy:return e.return=e.return||e.value;case cy:return"";case VB:return e.return=e.value+"{"+Dl(e.children,i)+"}";case hy:if(!Oe(e.value=e.props.join(",")))return""}return Oe(r=Dl(e.children,i))?e.return=e.value+"{"+r+"}":""}var cE=zg(Object.keys,Object),hE=Object.prototype,uE=hE.hasOwnProperty;function fE(e){if(!Ps(e))return cE(e);var t=[];for(var r in Object(e))uE.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ol=Ur(ze,"DataView"),Rl=Ur(ze,"Promise"),Il=Ur(ze,"Set"),Pl=Ur(ze,"WeakMap"),af="[object Map]",dE="[object Object]",sf="[object Promise]",of="[object Set]",lf="[object WeakMap]",cf="[object DataView]",pE=Hr(Ol),gE=Hr(Sn),mE=Hr(Rl),yE=Hr(Il),xE=Hr(Pl),Cr=Ei;(Ol&&Cr(new Ol(new ArrayBuffer(1)))!=cf||Sn&&Cr(new Sn)!=af||Rl&&Cr(Rl.resolve())!=sf||Il&&Cr(new Il)!=of||Pl&&Cr(new Pl)!=lf)&&(Cr=function(e){var t=Ei(e),r=t==dE?e.constructor:void 0,i=r?Hr(r):"";if(i)switch(i){case pE:return cf;case gE:return af;case mE:return sf;case yE:return of;case xE:return lf}return t});var bE="[object Map]",_E="[object Set]",wE=Object.prototype,CE=wE.hasOwnProperty;function hf(e){if(e==null)return!0;if(Ns(e)&&(ls(e)||typeof e=="string"||typeof e.splice=="function"||Cc(e)||vc(e)||os(e)))return!e.length;var t=Cr(e);if(t==bE||t==_E)return!e.size;if(Ps(e))return!fE(e).length;for(var r in e)if(CE.call(e,r))return!1;return!0}var gy="c4",vE=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),kE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-eYY3hprM.js");return{diagram:t}},__vite__mapDeps([8,9]));return{id:gy,diagram:e}},"loader"),SE={id:gy,detector:vE,loader:kE},TE=SE,my="flowchart",ME=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),AE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-wuqPowTd.js");return{diagram:t}},__vite__mapDeps([10,11,12,13]));return{id:my,diagram:e}},"loader"),LE={id:my,detector:ME,loader:AE},BE=LE,yy="flowchart-v2",EE=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),$E=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-wuqPowTd.js");return{diagram:t}},__vite__mapDeps([10,11,12,13]));return{id:yy,diagram:e}},"loader"),FE={id:yy,detector:EE,loader:$E},DE=FE,xy="er",OE=p(e=>/^\s*erDiagram/.test(e),"detector"),RE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-BnliyziJ.js");return{diagram:t}},__vite__mapDeps([14,12,13]));return{id:xy,diagram:e}},"loader"),IE={id:xy,detector:OE,loader:RE},PE=IE,by="gitGraph",NE=p(e=>/^\s*gitGraph/.test(e),"detector"),zE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./gitGraphDiagram-V2S2FVAM-OA7VyugW.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,2,4,5]));return{id:by,diagram:e}},"loader"),WE={id:by,detector:NE,loader:zE},qE=WE,_y="gantt",HE=p(e=>/^\s*gantt/.test(e),"detector"),UE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3-GSffAIH3.js");return{diagram:t}},[]);return{id:_y,diagram:e}},"loader"),jE={id:_y,detector:HE,loader:UE},YE=jE,wy="info",GE=p(e=>/^\s*info/.test(e),"detector"),VE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./infoDiagram-HS3SLOUP-nlVe2qgv.js");return{diagram:t}},__vite__mapDeps([19,18,2,4,5]));return{id:wy,diagram:e}},"loader"),XE={id:wy,detector:GE,loader:VE},Cy="pie",ZE=p(e=>/^\s*pie/.test(e),"detector"),KE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-CyCNgw3u.js");return{diagram:t}},__vite__mapDeps([20,16,18,2,4,5]));return{id:Cy,diagram:e}},"loader"),QE={id:Cy,detector:ZE,loader:KE},vy="quadrantChart",JE=p(e=>/^\s*quadrantChart/.test(e),"detector"),t$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-CkPh8g02.js");return{diagram:t}},[]);return{id:vy,diagram:e}},"loader"),e$={id:vy,detector:JE,loader:t$},r$=e$,ky="xychart",i$=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),n$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-B1ZJZtDC.js");return{diagram:t}},[]);return{id:ky,diagram:e}},"loader"),a$={id:ky,detector:i$,loader:n$},s$=a$,Sy="requirement",o$=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),l$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-Dkt6OSlY.js");return{diagram:t}},__vite__mapDeps([21,12,13]));return{id:Sy,diagram:e}},"loader"),c$={id:Sy,detector:o$,loader:l$},h$=c$,Ty="sequence",u$=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),f$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-CTmTe1FQ.js");return{diagram:t}},__vite__mapDeps([22,9,17]));return{id:Ty,diagram:e}},"loader"),d$={id:Ty,detector:u$,loader:f$},p$=d$,My="class",g$=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),m$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-jGlvI-Za.js");return{diagram:t}},__vite__mapDeps([23,24,11,12,13]));return{id:My,diagram:e}},"loader"),y$={id:My,detector:g$,loader:m$},x$=y$,Ay="classDiagram",b$=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),_$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-jGlvI-Za.js");return{diagram:t}},__vite__mapDeps([25,24,11,12,13]));return{id:Ay,diagram:e}},"loader"),w$={id:Ay,detector:b$,loader:_$},C$=w$,Ly="state",v$=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),k$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-CphqmkEU.js");return{diagram:t}},__vite__mapDeps([26,27,12,13,1,2,3,4]));return{id:Ly,diagram:e}},"loader"),S$={id:Ly,detector:v$,loader:k$},T$=S$,By="stateDiagram",M$=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),A$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-CxaDW5sW.js");return{diagram:t}},__vite__mapDeps([28,27,12,13]));return{id:By,diagram:e}},"loader"),L$={id:By,detector:M$,loader:A$},B$=L$,Ey="journey",E$=p(e=>/^\s*journey/.test(e),"detector"),$$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-CtTIcKwf.js");return{diagram:t}},__vite__mapDeps([29,9,11]));return{id:Ey,diagram:e}},"loader"),F$={id:Ey,detector:E$,loader:$$},D$=F$,O$=p((e,t,r)=>{P.debug(`rendering svg for syntax error
242
- `);const i=gk(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Of(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),$y={draw:O$},R$=$y,I$={db:{},renderer:$y,parser:{parse:p(()=>{},"parse")}},P$=I$,Fy="flowchart-elk",N$=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),z$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-wuqPowTd.js");return{diagram:t}},__vite__mapDeps([10,11,12,13]));return{id:Fy,diagram:e}},"loader"),W$={id:Fy,detector:N$,loader:z$},q$=W$,Dy="timeline",H$=p(e=>/^\s*timeline/.test(e),"detector"),U$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-CSQUZkyE.js");return{diagram:t}},[]);return{id:Dy,diagram:e}},"loader"),j$={id:Dy,detector:H$,loader:U$},Y$=j$,Oy="mindmap",G$=p(e=>/^\s*mindmap/.test(e),"detector"),V$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-9gLF2AoY.js");return{diagram:t}},__vite__mapDeps([30,12,13]));return{id:Oy,diagram:e}},"loader"),X$={id:Oy,detector:G$,loader:V$},Z$=X$,Ry="kanban",K$=p(e=>/^\s*kanban/.test(e),"detector"),Q$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-837KX0sW.js");return{diagram:t}},__vite__mapDeps([31,11]));return{id:Ry,diagram:e}},"loader"),J$={id:Ry,detector:K$,loader:Q$},tF=J$,Iy="sankey",eF=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),rF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-BqprTk8x.js");return{diagram:t}},[]);return{id:Iy,diagram:e}},"loader"),iF={id:Iy,detector:eF,loader:rF},nF=iF,Py="packet",aF=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),sF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-BlXC6Cia.js");return{diagram:t}},__vite__mapDeps([32,16,18,2,4,5]));return{id:Py,diagram:e}},"loader"),oF={id:Py,detector:aF,loader:sF},Ny="radar",lF=p(e=>/^\s*radar-beta/.test(e),"detector"),cF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-B78rOlvK.js");return{diagram:t}},__vite__mapDeps([33,16,18,2,4,5]));return{id:Ny,diagram:e}},"loader"),hF={id:Ny,detector:lF,loader:cF},zy="block",uF=p(e=>/^\s*block(-beta)?/.test(e),"detector"),fF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-B5488Hes.js");return{diagram:t}},__vite__mapDeps([34,11,5,2,1]));return{id:zy,diagram:e}},"loader"),dF={id:zy,detector:uF,loader:fF},pF=dF,Wy="architecture",gF=p(e=>/^\s*architecture/.test(e),"detector"),mF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-CJXNpTr5.js");return{diagram:t}},__vite__mapDeps([35,16,18,2,4,5,7]));return{id:Wy,diagram:e}},"loader"),yF={id:Wy,detector:gF,loader:mF},xF=yF,qy="treemap",bF=p(e=>/^\s*treemap/.test(e),"detector"),_F=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-CKBfqtw3.js");return{diagram:t}},__vite__mapDeps([36,13,16,18,2,4,5]));return{id:qy,diagram:e}},"loader"),wF={id:qy,detector:bF,loader:_F},uf=!1,Zs=p(()=>{uf||(uf=!0,Ea("error",P$,e=>e.toLowerCase().trim()==="error"),Ea("---",{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("---")),zo(q$,Z$,xF),zo(TE,tF,C$,x$,PE,YE,XE,QE,h$,p$,DE,BE,Y$,qE,B$,T$,D$,r$,nF,oF,s$,pF,hF,wF))},"addDiagrams"),CF=p(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Br).map(async([r,{detector:i,loader:n}])=>{if(n)try{Uo(r)}catch{try{const{diagram:a,id:s}=await n();Ea(s,a,i)}catch(a){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Br[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),vF="graphics-document document";function Hy(e,t){e.attr("role",vF),t!==""&&e.attr("aria-roledescription",t)}p(Hy,"setA11yDiagramInfo");function Uy(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(Uy,"addSVGa11yTitleDescription");var Lr,Nl=(Lr=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=Zt(),n=ql(t,i);t=wA(t)+`
243
- `;try{Uo(n)}catch{const c=Gx(n);if(!c)throw new vf(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Ea(h,u)}const{db:a,parser:s,renderer:o,init:l}=Uo(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new Lr(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Lr,"Diagram"),Lr),ff=[],kF=p(()=>{ff.forEach(e=>{e()}),ff=[]},"attachFunctions"),SF=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function jy(e){const t=e.match(Cf);if(!t)return{text:e,metadata:{}};let r=CS(t[1],{schema:wS})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(jy,"extractFrontMatter");var TF=p(e=>e.replace(/\r\n?/g,`
244
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),MF=p(e=>{const{text:t,metadata:r}=jy(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),AF=p(e=>{const t=ve.detectInit(e)??{},r=ve.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:lA(e),directive:t}},"processDirectives");function Yc(e){const t=TF(e),r=MF(t),i=AF(r.text),n=Lc(r.config,i.directive);return e=SF(i.text),{code:e,title:r.title,config:n}}p(Yc,"preprocessDiagram");function Yy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Yy,"toBase64");var LF=5e4,BF="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",EF="sandbox",$F="loose",FF="http://www.w3.org/2000/svg",DF="http://www.w3.org/1999/xlink",OF="http://www.w3.org/1999/xhtml",RF="100%",IF="100%",PF="border:0;margin:0;",NF="margin:0",zF="allow-top-navigation-by-user-activation allow-popups",WF='The "iframe" tag is not supported by your browser.',qF=["foreignobject"],HF=["dominant-baseline"];function Gc(e){const t=Yc(e);return La(),cb(t.config??{}),t}p(Gc,"processAndSetConfigs");async function Gy(e,t){Zs();try{const{code:r,config:i}=Gc(e);return{diagramType:(await Xy(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Gy,"parse");var df=p((e,t,r=[])=>`
241
+ L0,20`)},"requirement_arrow"),WB=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"),qB={extension:MB,composition:AB,aggregation:LB,dependency:BB,lollipop:EB,point:$B,circle:FB,cross:DB,barb:OB,only_one:RB,zero_or_one:IB,one_or_more:PB,zero_or_more:NB,requirement_arrow:zB,requirement_contains:WB},HB=TB,UB={common:Bi,getConfig:Zt,insertCluster:QL,insertEdge:SB,insertEdgeLabel:bB,insertMarkers:HB,insertNode:ay,interpolateToCurve:Sc,labelHelper:ot,log:P,positionEdgeLabel:_B},Ln={},cy=p(e=>{for(const t of e)Ln[t.name]=t},"registerLayoutLoaders"),jB=p(()=>{cy([{name:"dagre",loader:p(async()=>await _t(()=>import("./dagre-6UL2VRFP-D13da1qu.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:p(async()=>await _t(()=>import("./cose-bilkent-S5V4N54A-CfkQxn-a.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");jB();var $3=p(async(e,t)=>{if(!(e.layoutAlgorithm in Ln))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Ln[e.layoutAlgorithm];return(await r.loader()).render(e,t,UB,{algorithm:r.algorithm})},"render"),F3=p((e="",{fallback:t="dagre"}={})=>{if(e in Ln)return e;if(t in Ln)return P.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"),hy="comm",uy="rule",fy="decl",YB="@import",GB="@namespace",VB="@keyframes",XB="@layer",dy=Math.abs,jc=String.fromCharCode;function py(e){return e.trim()}function ka(e,t,r){return e.replace(t,r)}function ZB(e,t,r){return e.indexOf(t,r)}function ci(e,t){return e.charCodeAt(t)|0}function Ai(e,t,r){return e.slice(t,r)}function Ie(e){return e.length}function KB(e){return e.length}function la(e,t){return t.push(e),e}var Vs=1,Li=1,gy=0,ye=0,$t=0,Oi="";function Yc(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Vs,column:Li,length:s,return:"",siblings:o}}function QB(){return $t}function JB(){return $t=ye>0?ci(Oi,--ye):0,Li--,$t===10&&(Li=1,Vs--),$t}function Me(){return $t=ye<gy?ci(Oi,ye++):0,Li++,$t===10&&(Li=1,Vs++),$t}function lr(){return ci(Oi,ye)}function Sa(){return ye}function Xs(e,t){return Ai(Oi,e,t)}function Bn(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 tE(e){return Vs=Li=1,gy=Ie(Oi=e),ye=0,[]}function eE(e){return Oi="",e}function Io(e){return py(Xs(ye-1,Dl(e===91?e+2:e===40?e+1:e)))}function rE(e){for(;($t=lr())&&$t<33;)Me();return Bn(e)>2||Bn($t)>3?"":" "}function iE(e,t){for(;--t&&Me()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return Xs(e,Sa()+(t<6&&lr()==32&&Me()==32))}function Dl(e){for(;Me();)switch($t){case e:return ye;case 34:case 39:e!==34&&e!==39&&Dl($t);break;case 40:e===41&&Dl(e);break;case 92:Me();break}return ye}function nE(e,t){for(;Me()&&e+$t!==57;)if(e+$t===84&&lr()===47)break;return"/*"+Xs(t,ye-1)+"*"+jc(e===47?e:Me())}function aE(e){for(;!Bn(lr());)Me();return Xs(e,ye)}function sE(e){return eE(Ta("",null,null,null,[""],e=tE(e),0,[0],e))}function Ta(e,t,r,i,n,a,s,o,l){for(var c=0,h=0,u=s,f=0,d=0,g=0,m=1,y=1,x=1,b=0,_="",w=n,C=a,v=i,T=_;y;)switch(g=b,b=Me()){case 40:if(g!=108&&ci(T,u-1)==58){ZB(T+=ka(Io(b),"&","&\f"),"&\f",dy(c?o[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=Io(b);break;case 9:case 10:case 13:case 32:T+=rE(g);break;case 92:T+=iE(Sa()-1,7);continue;case 47:switch(lr()){case 42:case 47:la(oE(nE(Me(),Sa()),t,r,l),l),(Bn(g||1)==5||Bn(lr()||1)==5)&&Ie(T)&&Ai(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:o[c++]=Ie(T)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=ka(T,/\f/g,"")),d>0&&(Ie(T)-u||m===0&&g===47)&&la(d>32?af(T+";",i,r,u-1,l):af(ka(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(la(v=nf(T,t,r,c,h,n,o,_,w=[],C=[],u,a),a),b===123)if(h===0)Ta(T,t,v,v,w,a,u,o,C);else{switch(f){case 99:if(ci(T,3)===110)break;case 108:if(ci(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Ta(e,v,v,i&&la(nf(e,v,v,0,0,n,o,_,n,w=[],u,C),C),n,C,u,o,i?w:C):Ta(T,v,v,v,[""],C,0,o,C)}}c=h=d=0,m=x=1,_=T="",u=s;break;case 58:u=1+Ie(T),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&JB()==125)continue}switch(T+=jc(b),b*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:o[c++]=(Ie(T)-1)*x,x=1;break;case 64:lr()===45&&(T+=Io(Me())),f=lr(),h=u=Ie(_=T+=aE(Sa())),b++;break;case 45:g===45&&Ie(T)==2&&(m=0)}}return a}function nf(e,t,r,i,n,a,s,o,l,c,h,u){for(var f=n-1,d=n===0?a:[""],g=KB(d),m=0,y=0,x=0;m<i;++m)for(var b=0,_=Ai(e,f+1,f=dy(y=s[m])),w=e;b<g;++b)(w=py(y>0?d[b]+" "+_:ka(_,/&\f/g,d[b])))&&(l[x++]=w);return Yc(e,t,r,n===0?uy:o,l,c,h,u)}function oE(e,t,r,i){return Yc(e,t,r,hy,jc(QB()),Ai(e,2,-2),0,i)}function af(e,t,r,i,n){return Yc(e,t,r,fy,Ai(e,0,i),Ai(e,i+1,-1),i,n)}function Ol(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function lE(e,t,r,i){switch(e.type){case XB:if(e.children.length)break;case YB:case GB:case fy:return e.return=e.return||e.value;case hy:return"";case VB:return e.return=e.value+"{"+Ol(e.children,i)+"}";case uy:if(!Ie(e.value=e.props.join(",")))return""}return Ie(r=Ol(e.children,i))?e.return=e.value+"{"+r+"}":""}var cE=Wg(Object.keys,Object),hE=Object.prototype,uE=hE.hasOwnProperty;function fE(e){if(!Ps(e))return cE(e);var t=[];for(var r in Object(e))uE.call(e,r)&&r!="constructor"&&t.push(r);return t}var Rl=jr(qe,"DataView"),Il=jr(qe,"Promise"),Pl=jr(qe,"Set"),Nl=jr(qe,"WeakMap"),sf="[object Map]",dE="[object Object]",of="[object Promise]",lf="[object Set]",cf="[object WeakMap]",hf="[object DataView]",pE=Ur(Rl),gE=Ur(Mn),mE=Ur(Il),yE=Ur(Pl),xE=Ur(Nl),vr=$i;(Rl&&vr(new Rl(new ArrayBuffer(1)))!=hf||Mn&&vr(new Mn)!=sf||Il&&vr(Il.resolve())!=of||Pl&&vr(new Pl)!=lf||Nl&&vr(new Nl)!=cf)&&(vr=function(e){var t=$i(e),r=t==dE?e.constructor:void 0,i=r?Ur(r):"";if(i)switch(i){case pE:return hf;case gE:return sf;case mE:return of;case yE:return lf;case xE:return cf}return t});var bE="[object Map]",_E="[object Set]",wE=Object.prototype,CE=wE.hasOwnProperty;function uf(e){if(e==null)return!0;if(Ns(e)&&(ls(e)||typeof e=="string"||typeof e.splice=="function"||vc(e)||kc(e)||os(e)))return!e.length;var t=vr(e);if(t==bE||t==_E)return!e.size;if(Ps(e))return!fE(e).length;for(var r in e)if(CE.call(e,r))return!1;return!0}var my="c4",vE=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),kE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-QzXboDJ8.js");return{diagram:t}},__vite__mapDeps([8,9]));return{id:my,diagram:e}},"loader"),SE={id:my,detector:vE,loader:kE},TE=SE,yy="flowchart",ME=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),AE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-DpRd5cPP.js");return{diagram:t}},__vite__mapDeps([10,11,12,13]));return{id:yy,diagram:e}},"loader"),LE={id:yy,detector:ME,loader:AE},BE=LE,xy="flowchart-v2",EE=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),$E=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-DpRd5cPP.js");return{diagram:t}},__vite__mapDeps([10,11,12,13]));return{id:xy,diagram:e}},"loader"),FE={id:xy,detector:EE,loader:$E},DE=FE,by="er",OE=p(e=>/^\s*erDiagram/.test(e),"detector"),RE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-D1mxJWSp.js");return{diagram:t}},__vite__mapDeps([14,12,13]));return{id:by,diagram:e}},"loader"),IE={id:by,detector:OE,loader:RE},PE=IE,_y="gitGraph",NE=p(e=>/^\s*gitGraph/.test(e),"detector"),zE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./gitGraphDiagram-V2S2FVAM-DgNNP2nj.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,2,4,5]));return{id:_y,diagram:e}},"loader"),WE={id:_y,detector:NE,loader:zE},qE=WE,wy="gantt",HE=p(e=>/^\s*gantt/.test(e),"detector"),UE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3-D04Sdd3Q.js");return{diagram:t}},[]);return{id:wy,diagram:e}},"loader"),jE={id:wy,detector:HE,loader:UE},YE=jE,Cy="info",GE=p(e=>/^\s*info/.test(e),"detector"),VE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./infoDiagram-HS3SLOUP-D5asL_9P.js");return{diagram:t}},__vite__mapDeps([19,18,2,4,5]));return{id:Cy,diagram:e}},"loader"),XE={id:Cy,detector:GE,loader:VE},vy="pie",ZE=p(e=>/^\s*pie/.test(e),"detector"),KE=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-mb757Gpq.js");return{diagram:t}},__vite__mapDeps([20,16,18,2,4,5]));return{id:vy,diagram:e}},"loader"),QE={id:vy,detector:ZE,loader:KE},ky="quadrantChart",JE=p(e=>/^\s*quadrantChart/.test(e),"detector"),t$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-DMtvHJQW.js");return{diagram:t}},[]);return{id:ky,diagram:e}},"loader"),e$={id:ky,detector:JE,loader:t$},r$=e$,Sy="xychart",i$=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),n$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-i_eB4HAQ.js");return{diagram:t}},[]);return{id:Sy,diagram:e}},"loader"),a$={id:Sy,detector:i$,loader:n$},s$=a$,Ty="requirement",o$=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),l$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-CHguirsB.js");return{diagram:t}},__vite__mapDeps([21,12,13]));return{id:Ty,diagram:e}},"loader"),c$={id:Ty,detector:o$,loader:l$},h$=c$,My="sequence",u$=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),f$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-B83ZoXls.js");return{diagram:t}},__vite__mapDeps([22,9,17]));return{id:My,diagram:e}},"loader"),d$={id:My,detector:u$,loader:f$},p$=d$,Ay="class",g$=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),m$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-C9Kk58xl.js");return{diagram:t}},__vite__mapDeps([23,24,11,12,13]));return{id:Ay,diagram:e}},"loader"),y$={id:Ay,detector:g$,loader:m$},x$=y$,Ly="classDiagram",b$=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),_$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-C9Kk58xl.js");return{diagram:t}},__vite__mapDeps([25,24,11,12,13]));return{id:Ly,diagram:e}},"loader"),w$={id:Ly,detector:b$,loader:_$},C$=w$,By="state",v$=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),k$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-Ct0OgmPh.js");return{diagram:t}},__vite__mapDeps([26,27,12,13,1,2,3,4]));return{id:By,diagram:e}},"loader"),S$={id:By,detector:v$,loader:k$},T$=S$,Ey="stateDiagram",M$=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),A$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-CJZXQ6xd.js");return{diagram:t}},__vite__mapDeps([28,27,12,13]));return{id:Ey,diagram:e}},"loader"),L$={id:Ey,detector:M$,loader:A$},B$=L$,$y="journey",E$=p(e=>/^\s*journey/.test(e),"detector"),$$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-D-SRalYk.js");return{diagram:t}},__vite__mapDeps([29,9,11]));return{id:$y,diagram:e}},"loader"),F$={id:$y,detector:E$,loader:$$},D$=F$,O$=p((e,t,r)=>{P.debug(`rendering svg for syntax error
242
+ `);const i=gk(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Rf(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),Fy={draw:O$},R$=Fy,I$={db:{},renderer:Fy,parser:{parse:p(()=>{},"parse")}},P$=I$,Dy="flowchart-elk",N$=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),z$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-DpRd5cPP.js");return{diagram:t}},__vite__mapDeps([10,11,12,13]));return{id:Dy,diagram:e}},"loader"),W$={id:Dy,detector:N$,loader:z$},q$=W$,Oy="timeline",H$=p(e=>/^\s*timeline/.test(e),"detector"),U$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-D1Wd-DLb.js");return{diagram:t}},[]);return{id:Oy,diagram:e}},"loader"),j$={id:Oy,detector:H$,loader:U$},Y$=j$,Ry="mindmap",G$=p(e=>/^\s*mindmap/.test(e),"detector"),V$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-BfbYXGBk.js");return{diagram:t}},__vite__mapDeps([30,12,13]));return{id:Ry,diagram:e}},"loader"),X$={id:Ry,detector:G$,loader:V$},Z$=X$,Iy="kanban",K$=p(e=>/^\s*kanban/.test(e),"detector"),Q$=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-CuOjHa3p.js");return{diagram:t}},__vite__mapDeps([31,11]));return{id:Iy,diagram:e}},"loader"),J$={id:Iy,detector:K$,loader:Q$},tF=J$,Py="sankey",eF=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),rF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-nblWMNF6.js");return{diagram:t}},[]);return{id:Py,diagram:e}},"loader"),iF={id:Py,detector:eF,loader:rF},nF=iF,Ny="packet",aF=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),sF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-FH65FafS.js");return{diagram:t}},__vite__mapDeps([32,16,18,2,4,5]));return{id:Ny,diagram:e}},"loader"),oF={id:Ny,detector:aF,loader:sF},zy="radar",lF=p(e=>/^\s*radar-beta/.test(e),"detector"),cF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-COjSoDC8.js");return{diagram:t}},__vite__mapDeps([33,16,18,2,4,5]));return{id:zy,diagram:e}},"loader"),hF={id:zy,detector:lF,loader:cF},Wy="block",uF=p(e=>/^\s*block(-beta)?/.test(e),"detector"),fF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-C8HXvtNT.js");return{diagram:t}},__vite__mapDeps([34,11,5,2,1]));return{id:Wy,diagram:e}},"loader"),dF={id:Wy,detector:uF,loader:fF},pF=dF,qy="architecture",gF=p(e=>/^\s*architecture/.test(e),"detector"),mF=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-Dg_wTk4u.js");return{diagram:t}},__vite__mapDeps([35,16,18,2,4,5,7]));return{id:qy,diagram:e}},"loader"),yF={id:qy,detector:gF,loader:mF},xF=yF,Hy="treemap",bF=p(e=>/^\s*treemap/.test(e),"detector"),_F=p(async()=>{const{diagram:e}=await _t(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-BwzbeHPK.js");return{diagram:t}},__vite__mapDeps([36,13,16,18,2,4,5]));return{id:Hy,diagram:e}},"loader"),wF={id:Hy,detector:bF,loader:_F},ff=!1,Zs=p(()=>{ff||(ff=!0,Ea("error",P$,e=>e.toLowerCase().trim()==="error"),Ea("---",{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("---")),Wo(q$,Z$,xF),Wo(TE,tF,C$,x$,PE,YE,XE,QE,h$,p$,DE,BE,Y$,qE,B$,T$,D$,r$,nF,oF,s$,pF,hF,wF))},"addDiagrams"),CF=p(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Er).map(async([r,{detector:i,loader:n}])=>{if(n)try{jo(r)}catch{try{const{diagram:a,id:s}=await n();Ea(s,a,i)}catch(a){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Er[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),vF="graphics-document document";function Uy(e,t){e.attr("role",vF),t!==""&&e.attr("aria-roledescription",t)}p(Uy,"setA11yDiagramInfo");function jy(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(jy,"addSVGa11yTitleDescription");var Br,zl=(Br=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=Zt(),n=Hl(t,i);t=wA(t)+`
243
+ `;try{jo(n)}catch{const c=Gx(n);if(!c)throw new kf(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Ea(h,u)}const{db:a,parser:s,renderer:o,init:l}=jo(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new Br(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Br,"Diagram"),Br),df=[],kF=p(()=>{df.forEach(e=>{e()}),df=[]},"attachFunctions"),SF=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Yy(e){const t=e.match(vf);if(!t)return{text:e,metadata:{}};let r=CS(t[1],{schema:wS})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Yy,"extractFrontMatter");var TF=p(e=>e.replace(/\r\n?/g,`
244
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),MF=p(e=>{const{text:t,metadata:r}=Yy(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),AF=p(e=>{const t=Se.detectInit(e)??{},r=Se.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:lA(e),directive:t}},"processDirectives");function Gc(e){const t=TF(e),r=MF(t),i=AF(r.text),n=Bc(r.config,i.directive);return e=SF(i.text),{code:e,title:r.title,config:n}}p(Gc,"preprocessDiagram");function Gy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Gy,"toBase64");var LF=5e4,BF="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",EF="sandbox",$F="loose",FF="http://www.w3.org/2000/svg",DF="http://www.w3.org/1999/xlink",OF="http://www.w3.org/1999/xhtml",RF="100%",IF="100%",PF="border:0;margin:0;",NF="margin:0",zF="allow-top-navigation-by-user-activation allow-popups",WF='The "iframe" tag is not supported by your browser.',qF=["foreignobject"],HF=["dominant-baseline"];function Vc(e){const t=Gc(e);return La(),cb(t.config??{}),t}p(Vc,"processAndSetConfigs");async function Vy(e,t){Zs();try{const{code:r,config:i}=Vc(e);return{diagramType:(await Zy(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Vy,"parse");var pf=p((e,t,r=[])=>`
245
245
  .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),UF=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
246
246
  ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
247
247
  :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
248
- :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{hf(o.styles)||s.forEach(l=>{r+=df(o.id,l,o.styles)}),hf(o.textStyles)||(r+=df(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),jF=p((e,t,r,i)=>{const n=UF(e,r),a=Lb(t,n,e.themeVariables);return Dl(sE(`${i}{${a}}`),lE)},"createUserStyles"),YF=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=jr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),GF=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":IF,i=Yy(`<body style="${NF}">${e}</body>`);return`<iframe style="width:${RF};height:${r};${PF}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${zF}">
248
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{uf(o.styles)||s.forEach(l=>{r+=pf(o.id,l,o.styles)}),uf(o.textStyles)||(r+=pf(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),jF=p((e,t,r,i)=>{const n=UF(e,r),a=Lb(t,n,e.themeVariables);return Ol(sE(`${i}{${a}}`),lE)},"createUserStyles"),YF=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=Yr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),GF=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":IF,i=Gy(`<body style="${NF}">${e}</body>`);return`<iframe style="width:${RF};height:${r};${PF}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${zF}">
249
249
  ${WF}
250
- </iframe>`},"putIntoIFrame"),pf=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",FF);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function zl(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(zl,"sandboxedIframe");var VF=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),XF=p(async function(e,t,r){Zs();const i=Gc(t);t=i.code;const n=Zt();P.debug(n),t.length>(n?.maxTextSize??LF)&&(t=BF);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=p(()=>{const L=pt(f?o:c).node();L&&"remove"in L&&L.remove()},"removeTempElements");let u=pt("body");const f=n.securityLevel===EF,d=n.securityLevel===$F,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const $=zl(pt(r),s);u=pt($.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=pt(r);pf(u,e,l,`font-family: ${g}`,DF)}else{if(VF(document,e,l,s),f){const $=zl(pt("body"),s);u=pt($.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=pt("body");pf(u,e,l)}let m,y;try{m=await Nl.fromText(t,{title:i.title})}catch($){if(n.suppressErrorRendering)throw h(),$;m=await Nl.fromText("error"),y=$}const x=u.select(c).node(),b=m.type,_=x.firstChild,w=_.firstChild,C=m.renderer.getClasses?.(t,m),v=jF(n,b,C,a),S=document.createElement("style");S.innerHTML=v,_.insertBefore(S,w);try{await m.renderer.draw(t,e,fh.version,m)}catch($){throw n.suppressErrorRendering?h():R$.draw(t,e,fh.version),$}const O=u.select(`${c} svg`),I=m.db.getAccTitle?.(),R=m.db.getAccDescription?.();Zy(b,O,I,R),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",OF);let B=u.select(c).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),B=YF(B,f,It(n.arrowMarkerAbsolute)),f){const $=u.select(c+" svg").node();B=GF(B,$)}else d||(B=yi.sanitize(B,{ADD_TAGS:qF,ADD_ATTR:HF,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(kF(),y)throw y;return h(),{diagramType:b,svg:B,bindFunctions:m.db.bindFunctions}},"render");function Vy(e={}){const t=Ot({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ob(t),t?.theme&&t.theme in Qe?t.themeVariables=Qe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Qe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?sb(t):Af();Wl(r.logLevel),Zs()}p(Vy,"initialize");var Xy=p((e,t={})=>{const{code:r}=Yc(e);return Nl.fromText(r,t)},"getDiagramFromText");function Zy(e,t,r,i){Hy(t,e),Uy(t,r,i,t.attr("id"))}p(Zy,"addA11yInfo");var Pr=Object.freeze({render:XF,parse:Gy,getDiagramFromText:Xy,initialize:Vy,getConfig:Zt,setConfig:Lf,getSiteConfig:Af,updateSiteConfig:lb,reset:p(()=>{La()},"reset"),globalReset:p(()=>{La(xi)},"globalReset"),defaultConfig:xi});Wl(Zt().logLevel);La(Zt());var ZF=p((e,t,r)=>{P.warn(e),Ac(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"),Ky=p(async function(e={querySelector:".mermaid"}){try{await KF(e)}catch(t){if(Ac(t)&&P.error(t.str),nr.parseError&&nr.parseError(t),!e.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KF=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Pr.getConfig();P.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");P.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(P.debug("Start On Load: "+i?.startOnLoad),Pr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new ve.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const l of Array.from(n)){if(P.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=xm(ve.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ve.detectInit(s);h&&P.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await ex(c,s,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){ZF(u,o,nr.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Qy=p(function(e){Pr.initialize(e)},"initialize"),QF=p(async function(e,t,r){P.warn("mermaid.init is deprecated. Please use run instead."),e&&Qy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Ky(i)},"init"),JF=p(async(e,{lazyLoad:t=!0}={})=>{Zs(),zo(...e),t===!1&&await CF()},"registerExternalDiagrams"),Jy=p(function(){if(nr.startOnLoad){const{startOnLoad:e}=Pr.getConfig();e&&nr.run().catch(t=>P.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Jy,!1);var t3=p(function(e){nr.parseError=e},"setParseErrorHandler"),bs=[],Io=!1,tx=p(async()=>{if(!Io){for(Io=!0;bs.length>0;){const e=bs.shift();if(e)try{await e()}catch(t){P.error("Error executing queue",t)}}Io=!1}},"executeQueue"),e3=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,s)=>{Pr.parse(e,t).then(o=>{a(o),r(o)},o=>{P.error("Error parsing",o),nr.parseError?.(o),s(o),i(o)})}),"performCall");bs.push(n),tx().catch(i)}),"parse"),ex=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((s,o)=>{Pr.render(e,t,r).then(l=>{s(l),i(l)},l=>{P.error("Error parsing",l),nr.parseError?.(l),o(l),n(l)})}),"performCall");bs.push(a),tx().catch(n)}),"render"),r3=p(()=>Object.keys(Br).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),nr={startOnLoad:!0,mermaidAPI:Pr,parse:e3,render:ex,init:QF,run:Ky,registerExternalDiagrams:JF,registerLayoutLoaders:ly,initialize:Qy,parseError:void 0,contentLoaded:Jy,setParseErrorHandler:t3,detectType:ql,registerIconPacks:SL,getRegisteredDiagramsMetadata:r3},i3=nr;const D3=Object.freeze(Object.defineProperty({__proto__:null,default:i3},Symbol.toStringTag,{value:"Module"}));export{kh as $,h3 as A,hn as B,s3 as C,yx as D,Pb as E,Lc as F,Mf as G,Zt as H,dA as I,wS as J,gk as K,fh as L,zs as M,b3 as N,wd as O,_3 as P,MC as Q,Jx as R,xC as S,ML as T,nk as U,bi as V,l3 as W,xb as X,Hl as Y,nA as Z,_t as _,$b as a,x3 as a$,ba as a0,fA as a1,Bn as a2,Tb as a3,Ln as a4,V as a5,at as a6,Rf as a7,QL as a8,ny as a9,bB as aA,o3 as aB,fx as aC,Pn as aD,SL as aE,kL as aF,y3 as aG,f3 as aH,u3 as aI,g3 as aJ,mx as aK,p3 as aL,Ld as aM,oc as aN,Bs as aO,OC as aP,DC as aQ,vi as aR,FC as aS,$C as aT,Ya as aU,Fn as aV,ac as aW,nc as aX,ri as aY,ja as aZ,d3 as a_,B3 as aa,vS as ab,It as ac,pr as ad,bc as ae,Bm as af,jr as ag,rm as ah,xd as ai,_d as aj,m3 as ak,K as al,Rg as am,tA as an,YT as ao,GM as ap,_c as aq,hf as ar,HB as as,L3 as at,E3 as au,M3 as av,tt as aw,A3 as ax,SB as ay,_B as az,Eb as b,qr as b0,eA as b1,Vg as b2,Os as b3,Ns as b4,ls as b5,Zg as b6,Gg as b7,EM as b8,n3 as b9,vc as bA,Hg as bB,Il as bC,rA as bD,Ps as bE,a3 as bF,D3 as bG,JM as ba,YM as bb,FT as bc,wc as bd,MM as be,iA as bf,Rn as bg,Ei as bh,as as bi,PM as bj,fE as bk,On as bl,os as bm,$M as bn,Wg as bo,RT as bp,IT as bq,Cr as br,Bu as bs,PT as bt,Cc as bu,OT as bv,WT as bw,$i as bx,dr as by,Su as bz,p as c,xt as d,pt as e,Of as f,Db as g,Ot as h,ir as i,me as j,LS as k,P as l,Li as m,nm as n,c3 as o,F3 as p,Ob as q,$3 as r,Fb as s,Rb as t,ve as u,CS as v,mA as w,mB as x,w3 as y,Bb as z};
250
+ </iframe>`},"putIntoIFrame"),gf=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",FF);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function Wl(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Wl,"sandboxedIframe");var VF=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),XF=p(async function(e,t,r){Zs();const i=Vc(t);t=i.code;const n=Zt();P.debug(n),t.length>(n?.maxTextSize??LF)&&(t=BF);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=p(()=>{const L=pt(f?o:c).node();L&&"remove"in L&&L.remove()},"removeTempElements");let u=pt("body");const f=n.securityLevel===EF,d=n.securityLevel===$F,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const $=Wl(pt(r),s);u=pt($.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=pt(r);gf(u,e,l,`font-family: ${g}`,DF)}else{if(VF(document,e,l,s),f){const $=Wl(pt("body"),s);u=pt($.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=pt("body");gf(u,e,l)}let m,y;try{m=await zl.fromText(t,{title:i.title})}catch($){if(n.suppressErrorRendering)throw h(),$;m=await zl.fromText("error"),y=$}const x=u.select(c).node(),b=m.type,_=x.firstChild,w=_.firstChild,C=m.renderer.getClasses?.(t,m),v=jF(n,b,C,a),T=document.createElement("style");T.innerHTML=v,_.insertBefore(T,w);try{await m.renderer.draw(t,e,dh.version,m)}catch($){throw n.suppressErrorRendering?h():R$.draw(t,e,dh.version),$}const O=u.select(`${c} svg`),I=m.db.getAccTitle?.(),R=m.db.getAccDescription?.();Ky(b,O,I,R),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",OF);let B=u.select(c).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),B=YF(B,f,It(n.arrowMarkerAbsolute)),f){const $=u.select(c+" svg").node();B=GF(B,$)}else d||(B=xi.sanitize(B,{ADD_TAGS:qF,ADD_ATTR:HF,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(kF(),y)throw y;return h(),{diagramType:b,svg:B,bindFunctions:m.db.bindFunctions}},"render");function Xy(e={}){const t=Ot({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ob(t),t?.theme&&t.theme in Qe?t.themeVariables=Qe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Qe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?sb(t):Lf();ql(r.logLevel),Zs()}p(Xy,"initialize");var Zy=p((e,t={})=>{const{code:r}=Gc(e);return zl.fromText(r,t)},"getDiagramFromText");function Ky(e,t,r,i){Uy(t,e),jy(t,r,i,t.attr("id"))}p(Ky,"addA11yInfo");var Nr=Object.freeze({render:XF,parse:Vy,getDiagramFromText:Zy,initialize:Xy,getConfig:Zt,setConfig:Bf,getSiteConfig:Lf,updateSiteConfig:lb,reset:p(()=>{La()},"reset"),globalReset:p(()=>{La(bi)},"globalReset"),defaultConfig:bi});ql(Zt().logLevel);La(Zt());var ZF=p((e,t,r)=>{P.warn(e),Lc(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"),Qy=p(async function(e={querySelector:".mermaid"}){try{await KF(e)}catch(t){if(Lc(t)&&P.error(t.str),nr.parseError&&nr.parseError(t),!e.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KF=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Nr.getConfig();P.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");P.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(P.debug("Start On Load: "+i?.startOnLoad),Nr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new Se.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const l of Array.from(n)){if(P.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=bm(Se.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Se.detectInit(s);h&&P.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await rx(c,s,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){ZF(u,o,nr.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Jy=p(function(e){Nr.initialize(e)},"initialize"),QF=p(async function(e,t,r){P.warn("mermaid.init is deprecated. Please use run instead."),e&&Jy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Qy(i)},"init"),JF=p(async(e,{lazyLoad:t=!0}={})=>{Zs(),Wo(...e),t===!1&&await CF()},"registerExternalDiagrams"),tx=p(function(){if(nr.startOnLoad){const{startOnLoad:e}=Nr.getConfig();e&&nr.run().catch(t=>P.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",tx,!1);var t3=p(function(e){nr.parseError=e},"setParseErrorHandler"),bs=[],Po=!1,ex=p(async()=>{if(!Po){for(Po=!0;bs.length>0;){const e=bs.shift();if(e)try{await e()}catch(t){P.error("Error executing queue",t)}}Po=!1}},"executeQueue"),e3=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,s)=>{Nr.parse(e,t).then(o=>{a(o),r(o)},o=>{P.error("Error parsing",o),nr.parseError?.(o),s(o),i(o)})}),"performCall");bs.push(n),ex().catch(i)}),"parse"),rx=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((s,o)=>{Nr.render(e,t,r).then(l=>{s(l),i(l)},l=>{P.error("Error parsing",l),nr.parseError?.(l),o(l),n(l)})}),"performCall");bs.push(a),ex().catch(n)}),"render"),r3=p(()=>Object.keys(Er).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),nr={startOnLoad:!0,mermaidAPI:Nr,parse:e3,render:rx,init:QF,run:Qy,registerExternalDiagrams:JF,registerLayoutLoaders:cy,initialize:Jy,parseError:void 0,contentLoaded:tx,setParseErrorHandler:t3,detectType:Hl,registerIconPacks:SL,getRegisteredDiagramsMetadata:r3},i3=nr;const D3=Object.freeze(Object.defineProperty({__proto__:null,default:i3},Symbol.toStringTag,{value:"Module"}));export{Sh as $,h3 as A,fn as B,s3 as C,yx as D,Pb as E,Bc as F,Af as G,Zt as H,dA as I,wS as J,gk as K,dh as L,zs as M,b3 as N,Cd as O,_3 as P,MC as Q,Jx as R,xC as S,ML as T,nk as U,_i as V,l3 as W,xb as X,Ul as Y,nA as Z,_t as _,$b as a,x3 as a$,ba as a0,fA as a1,$n as a2,Tb as a3,En as a4,V as a5,nt as a6,If as a7,QL as a8,ay as a9,bB as aA,o3 as aB,fx as aC,zn as aD,SL as aE,kL as aF,y3 as aG,f3 as aH,u3 as aI,g3 as aJ,mx as aK,p3 as aL,Bd as aM,lc as aN,Bs as aO,OC as aP,DC as aQ,ki as aR,FC as aS,$C as aT,Ya as aU,On as aV,sc as aW,ac as aX,ii as aY,ja as aZ,d3 as a_,B3 as aa,vS as ab,It as ac,gr as ad,_c as ae,Em as af,Yr as ag,im as ah,bd as ai,wd as aj,m3 as ak,K as al,Ig as am,tA as an,YT as ao,GM as ap,wc as aq,uf as ar,HB as as,L3 as at,E3 as au,M3 as av,et as aw,A3 as ax,SB as ay,_B as az,Eb as b,Hr as b0,eA as b1,Xg as b2,Os as b3,Ns as b4,ls as b5,Kg as b6,Vg as b7,EM as b8,n3 as b9,kc as bA,Ug as bB,Pl as bC,rA as bD,Ps as bE,a3 as bF,D3 as bG,JM as ba,YM as bb,FT as bc,Cc as bd,MM as be,iA as bf,Pn as bg,$i as bh,as as bi,PM as bj,fE as bk,In as bl,os as bm,$M as bn,qg as bo,RT as bp,IT as bq,vr as br,Eu as bs,PT as bt,vc as bu,OT as bv,WT as bw,Fi as bx,pr as by,Tu as bz,p as c,xt as d,pt as e,Rf as f,Db as g,Ot as h,ir as i,me as j,LS as k,P as l,Bi as m,am as n,c3 as o,F3 as p,Ob as q,$3 as r,Fb as s,Rb as t,Se as u,CS as v,mA as w,mB as x,w3 as y,Bb as z};